Gio-2.0.gir 4.0 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533
  1. <?xml version="1.0"?>
  2. <!-- This file was automatically generated from C sources - DO NOT EDIT!
  3. To affect the contents of this file, edit the original C definitions,
  4. and/or use gtk-doc annotations. -->
  5. <repository version="1.2"
  6. xmlns="http://www.gtk.org/introspection/core/1.0"
  7. xmlns:c="http://www.gtk.org/introspection/c/1.0"
  8. xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  9. <include name="GObject" version="2.0"/>
  10. <package name="gio-2.0"/>
  11. <package name="gio-unix-2.0"/>
  12. <c:include name="gio/gdesktopappinfo.h"/>
  13. <c:include name="gio/gfiledescriptorbased.h"/>
  14. <c:include name="gio/gio.h"/>
  15. <c:include name="gio/gunixconnection.h"/>
  16. <c:include name="gio/gunixcredentialsmessage.h"/>
  17. <c:include name="gio/gunixfdlist.h"/>
  18. <c:include name="gio/gunixfdmessage.h"/>
  19. <c:include name="gio/gunixinputstream.h"/>
  20. <c:include name="gio/gunixmounts.h"/>
  21. <c:include name="gio/gunixoutputstream.h"/>
  22. <c:include name="gio/gunixsocketaddress.h"/>
  23. <namespace name="Gio"
  24. version="2.0"
  25. shared-library="libgio-2.0.so.0"
  26. c:identifier-prefixes="G"
  27. c:symbol-prefixes="g">
  28. <interface name="Action"
  29. c:symbol-prefix="action"
  30. c:type="GAction"
  31. glib:type-name="GAction"
  32. glib:get-type="g_action_get_type"
  33. glib:type-struct="ActionInterface">
  34. <doc xml:space="preserve">#GAction represents a single named action.
  35. The main interface to an action is that it can be activated with
  36. g_action_activate(). This results in the 'activate' signal being
  37. emitted. An activation has a #GVariant parameter (which may be
  38. %NULL). The correct type for the parameter is determined by a static
  39. parameter type (which is given at construction time).
  40. An action may optionally have a state, in which case the state may be
  41. set with g_action_change_state(). This call takes a #GVariant. The
  42. correct type for the state is determined by a static state type
  43. (which is given at construction time).
  44. The state may have a hint associated with it, specifying its valid
  45. range.
  46. #GAction is merely the interface to the concept of an action, as
  47. described above. Various implementations of actions exist, including
  48. #GSimpleAction.
  49. In all cases, the implementing class is responsible for storing the
  50. name of the action, the parameter type, the enabled state, the
  51. optional state type and the state and emitting the appropriate
  52. signals when these change. The implementor is responsible for filtering
  53. calls to g_action_activate() and g_action_change_state() for type
  54. safety and for the state being enabled.
  55. Probably the only useful thing to do with a #GAction is to put it
  56. inside of a #GSimpleActionGroup.</doc>
  57. <function name="name_is_valid"
  58. c:identifier="g_action_name_is_valid"
  59. version="2.38">
  60. <doc xml:space="preserve">Checks if @action_name is valid.
  61. @action_name is valid if it consists only of alphanumeric characters,
  62. plus '-' and '.'. The empty string is not a valid action name.
  63. It is an error to call this function with a non-utf8 @action_name.
  64. @action_name must not be %NULL.</doc>
  65. <return-value transfer-ownership="none">
  66. <doc xml:space="preserve">%TRUE if @action_name is valid</doc>
  67. <type name="gboolean" c:type="gboolean"/>
  68. </return-value>
  69. <parameters>
  70. <parameter name="action_name" transfer-ownership="none">
  71. <doc xml:space="preserve">an potential action name</doc>
  72. <type name="utf8" c:type="const gchar*"/>
  73. </parameter>
  74. </parameters>
  75. </function>
  76. <function name="parse_detailed_name"
  77. c:identifier="g_action_parse_detailed_name"
  78. version="2.38"
  79. throws="1">
  80. <doc xml:space="preserve">Parses a detailed action name into its separate name and target
  81. components.
  82. Detailed action names can have three formats.
  83. The first format is used to represent an action name with no target
  84. value and consists of just an action name containing no whitespace
  85. nor the characters ':', '(' or ')'. For example: "app.action".
  86. The second format is used to represent an action with a target value
  87. that is a non-empty string consisting only of alphanumerics, plus '-'
  88. and '.'. In that case, the action name and target value are
  89. separated by a double colon ("::"). For example:
  90. "app.action::target".
  91. The third format is used to represent an action with any type of
  92. target value, including strings. The target value follows the action
  93. name, surrounded in parens. For example: "app.action(42)". The
  94. target value is parsed using g_variant_parse(). If a tuple-typed
  95. value is desired, it must be specified in the same way, resulting in
  96. two sets of parens, for example: "app.action((1,2,3))". A string
  97. target can be specified this way as well: "app.action('target')".
  98. For strings, this third format must be used if * target value is
  99. empty or contains characters other than alphanumerics, '-' and '.'.</doc>
  100. <return-value transfer-ownership="none">
  101. <doc xml:space="preserve">%TRUE if successful, else %FALSE with @error set</doc>
  102. <type name="gboolean" c:type="gboolean"/>
  103. </return-value>
  104. <parameters>
  105. <parameter name="detailed_name" transfer-ownership="none">
  106. <doc xml:space="preserve">a detailed action name</doc>
  107. <type name="utf8" c:type="const gchar*"/>
  108. </parameter>
  109. <parameter name="action_name"
  110. direction="out"
  111. caller-allocates="0"
  112. transfer-ownership="full">
  113. <doc xml:space="preserve">the action name</doc>
  114. <type name="utf8" c:type="gchar**"/>
  115. </parameter>
  116. <parameter name="target_value"
  117. direction="out"
  118. caller-allocates="0"
  119. transfer-ownership="full">
  120. <doc xml:space="preserve">the target value, or %NULL for no target</doc>
  121. <type name="GLib.Variant" c:type="GVariant**"/>
  122. </parameter>
  123. </parameters>
  124. </function>
  125. <function name="print_detailed_name"
  126. c:identifier="g_action_print_detailed_name"
  127. version="2.38">
  128. <doc xml:space="preserve">Formats a detailed action name from @action_name and @target_value.
  129. It is an error to call this function with an invalid action name.
  130. This function is the opposite of
  131. g_action_parse_detailed_action_name(). It will produce a string that
  132. can be parsed back to the @action_name and @target_value by that
  133. function.
  134. See that function for the types of strings that will be printed by
  135. this function.</doc>
  136. <return-value transfer-ownership="full">
  137. <doc xml:space="preserve">a detailed format string</doc>
  138. <type name="utf8" c:type="gchar*"/>
  139. </return-value>
  140. <parameters>
  141. <parameter name="action_name" transfer-ownership="none">
  142. <doc xml:space="preserve">a valid action name</doc>
  143. <type name="utf8" c:type="const gchar*"/>
  144. </parameter>
  145. <parameter name="target_value"
  146. transfer-ownership="none"
  147. nullable="1"
  148. allow-none="1">
  149. <doc xml:space="preserve">a #GVariant target value, or %NULL</doc>
  150. <type name="GLib.Variant" c:type="GVariant*"/>
  151. </parameter>
  152. </parameters>
  153. </function>
  154. <virtual-method name="activate" invoker="activate" version="2.28">
  155. <doc xml:space="preserve">Activates the action.
  156. @parameter must be the correct type of parameter for the action (ie:
  157. the parameter type given at construction time). If the parameter
  158. type was %NULL then @parameter must also be %NULL.
  159. If the @parameter GVariant is floating, it is consumed.</doc>
  160. <return-value transfer-ownership="none">
  161. <type name="none" c:type="void"/>
  162. </return-value>
  163. <parameters>
  164. <instance-parameter name="action" transfer-ownership="none">
  165. <doc xml:space="preserve">a #GAction</doc>
  166. <type name="Action" c:type="GAction*"/>
  167. </instance-parameter>
  168. <parameter name="parameter"
  169. transfer-ownership="none"
  170. nullable="1"
  171. allow-none="1">
  172. <doc xml:space="preserve">the parameter to the activation</doc>
  173. <type name="GLib.Variant" c:type="GVariant*"/>
  174. </parameter>
  175. </parameters>
  176. </virtual-method>
  177. <virtual-method name="change_state"
  178. invoker="change_state"
  179. version="2.30">
  180. <doc xml:space="preserve">Request for the state of @action to be changed to @value.
  181. The action must be stateful and @value must be of the correct type.
  182. See g_action_get_state_type().
  183. This call merely requests a change. The action may refuse to change
  184. its state or may change its state to something other than @value.
  185. See g_action_get_state_hint().
  186. If the @value GVariant is floating, it is consumed.</doc>
  187. <return-value transfer-ownership="none">
  188. <type name="none" c:type="void"/>
  189. </return-value>
  190. <parameters>
  191. <instance-parameter name="action" transfer-ownership="none">
  192. <doc xml:space="preserve">a #GAction</doc>
  193. <type name="Action" c:type="GAction*"/>
  194. </instance-parameter>
  195. <parameter name="value" transfer-ownership="none">
  196. <doc xml:space="preserve">the new state</doc>
  197. <type name="GLib.Variant" c:type="GVariant*"/>
  198. </parameter>
  199. </parameters>
  200. </virtual-method>
  201. <virtual-method name="get_enabled" invoker="get_enabled" version="2.28">
  202. <doc xml:space="preserve">Checks if @action is currently enabled.
  203. An action must be enabled in order to be activated or in order to
  204. have its state changed from outside callers.</doc>
  205. <return-value transfer-ownership="none">
  206. <doc xml:space="preserve">whether the action is enabled</doc>
  207. <type name="gboolean" c:type="gboolean"/>
  208. </return-value>
  209. <parameters>
  210. <instance-parameter name="action" transfer-ownership="none">
  211. <doc xml:space="preserve">a #GAction</doc>
  212. <type name="Action" c:type="GAction*"/>
  213. </instance-parameter>
  214. </parameters>
  215. </virtual-method>
  216. <virtual-method name="get_name" invoker="get_name" version="2.28">
  217. <doc xml:space="preserve">Queries the name of @action.</doc>
  218. <return-value transfer-ownership="none">
  219. <doc xml:space="preserve">the name of the action</doc>
  220. <type name="utf8" c:type="const gchar*"/>
  221. </return-value>
  222. <parameters>
  223. <instance-parameter name="action" transfer-ownership="none">
  224. <doc xml:space="preserve">a #GAction</doc>
  225. <type name="Action" c:type="GAction*"/>
  226. </instance-parameter>
  227. </parameters>
  228. </virtual-method>
  229. <virtual-method name="get_parameter_type"
  230. invoker="get_parameter_type"
  231. version="2.28">
  232. <doc xml:space="preserve">Queries the type of the parameter that must be given when activating
  233. @action.
  234. When activating the action using g_action_activate(), the #GVariant
  235. given to that function must be of the type returned by this function.
  236. In the case that this function returns %NULL, you must not give any
  237. #GVariant, but %NULL instead.</doc>
  238. <return-value transfer-ownership="none" nullable="1">
  239. <doc xml:space="preserve">the parameter type</doc>
  240. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  241. </return-value>
  242. <parameters>
  243. <instance-parameter name="action" transfer-ownership="none">
  244. <doc xml:space="preserve">a #GAction</doc>
  245. <type name="Action" c:type="GAction*"/>
  246. </instance-parameter>
  247. </parameters>
  248. </virtual-method>
  249. <virtual-method name="get_state" invoker="get_state" version="2.28">
  250. <doc xml:space="preserve">Queries the current state of @action.
  251. If the action is not stateful then %NULL will be returned. If the
  252. action is stateful then the type of the return value is the type
  253. given by g_action_get_state_type().
  254. The return value (if non-%NULL) should be freed with
  255. g_variant_unref() when it is no longer required.</doc>
  256. <return-value transfer-ownership="full">
  257. <doc xml:space="preserve">the current state of the action</doc>
  258. <type name="GLib.Variant" c:type="GVariant*"/>
  259. </return-value>
  260. <parameters>
  261. <instance-parameter name="action" transfer-ownership="none">
  262. <doc xml:space="preserve">a #GAction</doc>
  263. <type name="Action" c:type="GAction*"/>
  264. </instance-parameter>
  265. </parameters>
  266. </virtual-method>
  267. <virtual-method name="get_state_hint"
  268. invoker="get_state_hint"
  269. version="2.28">
  270. <doc xml:space="preserve">Requests a hint about the valid range of values for the state of
  271. @action.
  272. If %NULL is returned it either means that the action is not stateful
  273. or that there is no hint about the valid range of values for the
  274. state of the action.
  275. If a #GVariant array is returned then each item in the array is a
  276. possible value for the state. If a #GVariant pair (ie: two-tuple) is
  277. returned then the tuple specifies the inclusive lower and upper bound
  278. of valid values for the state.
  279. In any case, the information is merely a hint. It may be possible to
  280. have a state value outside of the hinted range and setting a value
  281. within the range may fail.
  282. The return value (if non-%NULL) should be freed with
  283. g_variant_unref() when it is no longer required.</doc>
  284. <return-value transfer-ownership="full" nullable="1">
  285. <doc xml:space="preserve">the state range hint</doc>
  286. <type name="GLib.Variant" c:type="GVariant*"/>
  287. </return-value>
  288. <parameters>
  289. <instance-parameter name="action" transfer-ownership="none">
  290. <doc xml:space="preserve">a #GAction</doc>
  291. <type name="Action" c:type="GAction*"/>
  292. </instance-parameter>
  293. </parameters>
  294. </virtual-method>
  295. <virtual-method name="get_state_type"
  296. invoker="get_state_type"
  297. version="2.28">
  298. <doc xml:space="preserve">Queries the type of the state of @action.
  299. If the action is stateful (e.g. created with
  300. g_simple_action_new_stateful()) then this function returns the
  301. #GVariantType of the state. This is the type of the initial value
  302. given as the state. All calls to g_action_change_state() must give a
  303. #GVariant of this type and g_action_get_state() will return a
  304. #GVariant of the same type.
  305. If the action is not stateful (e.g. created with g_simple_action_new())
  306. then this function will return %NULL. In that case, g_action_get_state()
  307. will return %NULL and you must not call g_action_change_state().</doc>
  308. <return-value transfer-ownership="none" nullable="1">
  309. <doc xml:space="preserve">the state type, if the action is stateful</doc>
  310. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  311. </return-value>
  312. <parameters>
  313. <instance-parameter name="action" transfer-ownership="none">
  314. <doc xml:space="preserve">a #GAction</doc>
  315. <type name="Action" c:type="GAction*"/>
  316. </instance-parameter>
  317. </parameters>
  318. </virtual-method>
  319. <method name="activate" c:identifier="g_action_activate" version="2.28">
  320. <doc xml:space="preserve">Activates the action.
  321. @parameter must be the correct type of parameter for the action (ie:
  322. the parameter type given at construction time). If the parameter
  323. type was %NULL then @parameter must also be %NULL.
  324. If the @parameter GVariant is floating, it is consumed.</doc>
  325. <return-value transfer-ownership="none">
  326. <type name="none" c:type="void"/>
  327. </return-value>
  328. <parameters>
  329. <instance-parameter name="action" transfer-ownership="none">
  330. <doc xml:space="preserve">a #GAction</doc>
  331. <type name="Action" c:type="GAction*"/>
  332. </instance-parameter>
  333. <parameter name="parameter"
  334. transfer-ownership="none"
  335. nullable="1"
  336. allow-none="1">
  337. <doc xml:space="preserve">the parameter to the activation</doc>
  338. <type name="GLib.Variant" c:type="GVariant*"/>
  339. </parameter>
  340. </parameters>
  341. </method>
  342. <method name="change_state"
  343. c:identifier="g_action_change_state"
  344. version="2.30">
  345. <doc xml:space="preserve">Request for the state of @action to be changed to @value.
  346. The action must be stateful and @value must be of the correct type.
  347. See g_action_get_state_type().
  348. This call merely requests a change. The action may refuse to change
  349. its state or may change its state to something other than @value.
  350. See g_action_get_state_hint().
  351. If the @value GVariant is floating, it is consumed.</doc>
  352. <return-value transfer-ownership="none">
  353. <type name="none" c:type="void"/>
  354. </return-value>
  355. <parameters>
  356. <instance-parameter name="action" transfer-ownership="none">
  357. <doc xml:space="preserve">a #GAction</doc>
  358. <type name="Action" c:type="GAction*"/>
  359. </instance-parameter>
  360. <parameter name="value" transfer-ownership="none">
  361. <doc xml:space="preserve">the new state</doc>
  362. <type name="GLib.Variant" c:type="GVariant*"/>
  363. </parameter>
  364. </parameters>
  365. </method>
  366. <method name="get_enabled"
  367. c:identifier="g_action_get_enabled"
  368. version="2.28">
  369. <doc xml:space="preserve">Checks if @action is currently enabled.
  370. An action must be enabled in order to be activated or in order to
  371. have its state changed from outside callers.</doc>
  372. <return-value transfer-ownership="none">
  373. <doc xml:space="preserve">whether the action is enabled</doc>
  374. <type name="gboolean" c:type="gboolean"/>
  375. </return-value>
  376. <parameters>
  377. <instance-parameter name="action" transfer-ownership="none">
  378. <doc xml:space="preserve">a #GAction</doc>
  379. <type name="Action" c:type="GAction*"/>
  380. </instance-parameter>
  381. </parameters>
  382. </method>
  383. <method name="get_name" c:identifier="g_action_get_name" version="2.28">
  384. <doc xml:space="preserve">Queries the name of @action.</doc>
  385. <return-value transfer-ownership="none">
  386. <doc xml:space="preserve">the name of the action</doc>
  387. <type name="utf8" c:type="const gchar*"/>
  388. </return-value>
  389. <parameters>
  390. <instance-parameter name="action" transfer-ownership="none">
  391. <doc xml:space="preserve">a #GAction</doc>
  392. <type name="Action" c:type="GAction*"/>
  393. </instance-parameter>
  394. </parameters>
  395. </method>
  396. <method name="get_parameter_type"
  397. c:identifier="g_action_get_parameter_type"
  398. version="2.28">
  399. <doc xml:space="preserve">Queries the type of the parameter that must be given when activating
  400. @action.
  401. When activating the action using g_action_activate(), the #GVariant
  402. given to that function must be of the type returned by this function.
  403. In the case that this function returns %NULL, you must not give any
  404. #GVariant, but %NULL instead.</doc>
  405. <return-value transfer-ownership="none" nullable="1">
  406. <doc xml:space="preserve">the parameter type</doc>
  407. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  408. </return-value>
  409. <parameters>
  410. <instance-parameter name="action" transfer-ownership="none">
  411. <doc xml:space="preserve">a #GAction</doc>
  412. <type name="Action" c:type="GAction*"/>
  413. </instance-parameter>
  414. </parameters>
  415. </method>
  416. <method name="get_state"
  417. c:identifier="g_action_get_state"
  418. version="2.28">
  419. <doc xml:space="preserve">Queries the current state of @action.
  420. If the action is not stateful then %NULL will be returned. If the
  421. action is stateful then the type of the return value is the type
  422. given by g_action_get_state_type().
  423. The return value (if non-%NULL) should be freed with
  424. g_variant_unref() when it is no longer required.</doc>
  425. <return-value transfer-ownership="full">
  426. <doc xml:space="preserve">the current state of the action</doc>
  427. <type name="GLib.Variant" c:type="GVariant*"/>
  428. </return-value>
  429. <parameters>
  430. <instance-parameter name="action" transfer-ownership="none">
  431. <doc xml:space="preserve">a #GAction</doc>
  432. <type name="Action" c:type="GAction*"/>
  433. </instance-parameter>
  434. </parameters>
  435. </method>
  436. <method name="get_state_hint"
  437. c:identifier="g_action_get_state_hint"
  438. version="2.28">
  439. <doc xml:space="preserve">Requests a hint about the valid range of values for the state of
  440. @action.
  441. If %NULL is returned it either means that the action is not stateful
  442. or that there is no hint about the valid range of values for the
  443. state of the action.
  444. If a #GVariant array is returned then each item in the array is a
  445. possible value for the state. If a #GVariant pair (ie: two-tuple) is
  446. returned then the tuple specifies the inclusive lower and upper bound
  447. of valid values for the state.
  448. In any case, the information is merely a hint. It may be possible to
  449. have a state value outside of the hinted range and setting a value
  450. within the range may fail.
  451. The return value (if non-%NULL) should be freed with
  452. g_variant_unref() when it is no longer required.</doc>
  453. <return-value transfer-ownership="full" nullable="1">
  454. <doc xml:space="preserve">the state range hint</doc>
  455. <type name="GLib.Variant" c:type="GVariant*"/>
  456. </return-value>
  457. <parameters>
  458. <instance-parameter name="action" transfer-ownership="none">
  459. <doc xml:space="preserve">a #GAction</doc>
  460. <type name="Action" c:type="GAction*"/>
  461. </instance-parameter>
  462. </parameters>
  463. </method>
  464. <method name="get_state_type"
  465. c:identifier="g_action_get_state_type"
  466. version="2.28">
  467. <doc xml:space="preserve">Queries the type of the state of @action.
  468. If the action is stateful (e.g. created with
  469. g_simple_action_new_stateful()) then this function returns the
  470. #GVariantType of the state. This is the type of the initial value
  471. given as the state. All calls to g_action_change_state() must give a
  472. #GVariant of this type and g_action_get_state() will return a
  473. #GVariant of the same type.
  474. If the action is not stateful (e.g. created with g_simple_action_new())
  475. then this function will return %NULL. In that case, g_action_get_state()
  476. will return %NULL and you must not call g_action_change_state().</doc>
  477. <return-value transfer-ownership="none" nullable="1">
  478. <doc xml:space="preserve">the state type, if the action is stateful</doc>
  479. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  480. </return-value>
  481. <parameters>
  482. <instance-parameter name="action" transfer-ownership="none">
  483. <doc xml:space="preserve">a #GAction</doc>
  484. <type name="Action" c:type="GAction*"/>
  485. </instance-parameter>
  486. </parameters>
  487. </method>
  488. <property name="enabled" version="2.28" transfer-ownership="none">
  489. <doc xml:space="preserve">If @action is currently enabled.
  490. If the action is disabled then calls to g_action_activate() and
  491. g_action_change_state() have no effect.</doc>
  492. <type name="gboolean" c:type="gboolean"/>
  493. </property>
  494. <property name="name" version="2.28" transfer-ownership="none">
  495. <doc xml:space="preserve">The name of the action. This is mostly meaningful for identifying
  496. the action once it has been added to a #GActionGroup. It is immutable.</doc>
  497. <type name="utf8" c:type="gchar*"/>
  498. </property>
  499. <property name="parameter-type" version="2.28" transfer-ownership="none">
  500. <doc xml:space="preserve">The type of the parameter that must be given when activating the
  501. action. This is immutable, and may be %NULL if no parameter is needed when
  502. activating the action.</doc>
  503. <type name="GLib.VariantType"/>
  504. </property>
  505. <property name="state" version="2.28" transfer-ownership="none">
  506. <doc xml:space="preserve">The state of the action, or %NULL if the action is stateless.</doc>
  507. <type name="GLib.Variant"/>
  508. </property>
  509. <property name="state-type" version="2.28" transfer-ownership="none">
  510. <doc xml:space="preserve">The #GVariantType of the state that the action has, or %NULL if the
  511. action is stateless. This is immutable.</doc>
  512. <type name="GLib.VariantType"/>
  513. </property>
  514. </interface>
  515. <record name="ActionEntry" c:type="GActionEntry">
  516. <doc xml:space="preserve">This struct defines a single action. It is for use with
  517. g_action_map_add_action_entries().
  518. The order of the items in the structure are intended to reflect
  519. frequency of use. It is permissible to use an incomplete initialiser
  520. in order to leave some of the later values as %NULL. All values
  521. after @name are optional. Additional optional fields may be added in
  522. the future.
  523. See g_action_map_add_action_entries() for an example.</doc>
  524. <field name="name" writable="1">
  525. <doc xml:space="preserve">the name of the action</doc>
  526. <type name="utf8" c:type="const gchar*"/>
  527. </field>
  528. <field name="activate">
  529. <callback name="activate">
  530. <return-value transfer-ownership="none">
  531. <type name="none" c:type="void"/>
  532. </return-value>
  533. <parameters>
  534. <parameter name="action" transfer-ownership="none">
  535. <type name="SimpleAction" c:type="GSimpleAction*"/>
  536. </parameter>
  537. <parameter name="parameter" transfer-ownership="none">
  538. <type name="GLib.Variant" c:type="GVariant*"/>
  539. </parameter>
  540. <parameter name="user_data"
  541. transfer-ownership="none"
  542. nullable="1"
  543. allow-none="1"
  544. closure="2">
  545. <type name="gpointer" c:type="gpointer"/>
  546. </parameter>
  547. </parameters>
  548. </callback>
  549. </field>
  550. <field name="parameter_type" writable="1">
  551. <doc xml:space="preserve">the type of the parameter that must be passed to the
  552. activate function for this action, given as a single
  553. GVariant type string (or %NULL for no parameter)</doc>
  554. <type name="utf8" c:type="const gchar*"/>
  555. </field>
  556. <field name="state" writable="1">
  557. <doc xml:space="preserve">the initial state for this action, given in
  558. [GVariant text format][gvariant-text]. The state is parsed
  559. with no extra type information, so type tags must be added to
  560. the string if they are necessary. Stateless actions should
  561. give %NULL here.</doc>
  562. <type name="utf8" c:type="const gchar*"/>
  563. </field>
  564. <field name="change_state">
  565. <callback name="change_state">
  566. <return-value transfer-ownership="none">
  567. <type name="none" c:type="void"/>
  568. </return-value>
  569. <parameters>
  570. <parameter name="action" transfer-ownership="none">
  571. <type name="SimpleAction" c:type="GSimpleAction*"/>
  572. </parameter>
  573. <parameter name="value" transfer-ownership="none">
  574. <type name="GLib.Variant" c:type="GVariant*"/>
  575. </parameter>
  576. <parameter name="user_data"
  577. transfer-ownership="none"
  578. nullable="1"
  579. allow-none="1"
  580. closure="2">
  581. <type name="gpointer" c:type="gpointer"/>
  582. </parameter>
  583. </parameters>
  584. </callback>
  585. </field>
  586. <field name="padding" readable="0" private="1">
  587. <array zero-terminated="0" c:type="gsize" fixed-size="3">
  588. <type name="gsize" c:type="gsize"/>
  589. </array>
  590. </field>
  591. </record>
  592. <interface name="ActionGroup"
  593. c:symbol-prefix="action_group"
  594. c:type="GActionGroup"
  595. glib:type-name="GActionGroup"
  596. glib:get-type="g_action_group_get_type"
  597. glib:type-struct="ActionGroupInterface">
  598. <doc xml:space="preserve">#GActionGroup represents a group of actions. Actions can be used to
  599. expose functionality in a structured way, either from one part of a
  600. program to another, or to the outside world. Action groups are often
  601. used together with a #GMenuModel that provides additional
  602. representation data for displaying the actions to the user, e.g. in
  603. a menu.
  604. The main way to interact with the actions in a GActionGroup is to
  605. activate them with g_action_group_activate_action(). Activating an
  606. action may require a #GVariant parameter. The required type of the
  607. parameter can be inquired with g_action_group_get_action_parameter_type().
  608. Actions may be disabled, see g_action_group_get_action_enabled().
  609. Activating a disabled action has no effect.
  610. Actions may optionally have a state in the form of a #GVariant. The
  611. current state of an action can be inquired with
  612. g_action_group_get_action_state(). Activating a stateful action may
  613. change its state, but it is also possible to set the state by calling
  614. g_action_group_change_action_state().
  615. As typical example, consider a text editing application which has an
  616. option to change the current font to 'bold'. A good way to represent
  617. this would be a stateful action, with a boolean state. Activating the
  618. action would toggle the state.
  619. Each action in the group has a unique name (which is a string). All
  620. method calls, except g_action_group_list_actions() take the name of
  621. an action as an argument.
  622. The #GActionGroup API is meant to be the 'public' API to the action
  623. group. The calls here are exactly the interaction that 'external
  624. forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
  625. with actions. 'Internal' APIs (ie: ones meant only to be accessed by
  626. the action group implementation) are found on subclasses. This is
  627. why you will find - for example - g_action_group_get_action_enabled()
  628. but not an equivalent set() call.
  629. Signals are emitted on the action group in response to state changes
  630. on individual actions.
  631. Implementations of #GActionGroup should provide implementations for
  632. the virtual functions g_action_group_list_actions() and
  633. g_action_group_query_action(). The other virtual functions should
  634. not be implemented - their "wrappers" are actually implemented with
  635. calls to g_action_group_query_action().</doc>
  636. <virtual-method name="action_added"
  637. invoker="action_added"
  638. version="2.28">
  639. <doc xml:space="preserve">Emits the #GActionGroup::action-added signal on @action_group.
  640. This function should only be called by #GActionGroup implementations.</doc>
  641. <return-value transfer-ownership="none">
  642. <type name="none" c:type="void"/>
  643. </return-value>
  644. <parameters>
  645. <instance-parameter name="action_group" transfer-ownership="none">
  646. <doc xml:space="preserve">a #GActionGroup</doc>
  647. <type name="ActionGroup" c:type="GActionGroup*"/>
  648. </instance-parameter>
  649. <parameter name="action_name" transfer-ownership="none">
  650. <doc xml:space="preserve">the name of an action in the group</doc>
  651. <type name="utf8" c:type="const gchar*"/>
  652. </parameter>
  653. </parameters>
  654. </virtual-method>
  655. <virtual-method name="action_enabled_changed"
  656. invoker="action_enabled_changed"
  657. version="2.28">
  658. <doc xml:space="preserve">Emits the #GActionGroup::action-enabled-changed signal on @action_group.
  659. This function should only be called by #GActionGroup implementations.</doc>
  660. <return-value transfer-ownership="none">
  661. <type name="none" c:type="void"/>
  662. </return-value>
  663. <parameters>
  664. <instance-parameter name="action_group" transfer-ownership="none">
  665. <doc xml:space="preserve">a #GActionGroup</doc>
  666. <type name="ActionGroup" c:type="GActionGroup*"/>
  667. </instance-parameter>
  668. <parameter name="action_name" transfer-ownership="none">
  669. <doc xml:space="preserve">the name of an action in the group</doc>
  670. <type name="utf8" c:type="const gchar*"/>
  671. </parameter>
  672. <parameter name="enabled" transfer-ownership="none">
  673. <doc xml:space="preserve">whether or not the action is now enabled</doc>
  674. <type name="gboolean" c:type="gboolean"/>
  675. </parameter>
  676. </parameters>
  677. </virtual-method>
  678. <virtual-method name="action_removed"
  679. invoker="action_removed"
  680. version="2.28">
  681. <doc xml:space="preserve">Emits the #GActionGroup::action-removed signal on @action_group.
  682. This function should only be called by #GActionGroup implementations.</doc>
  683. <return-value transfer-ownership="none">
  684. <type name="none" c:type="void"/>
  685. </return-value>
  686. <parameters>
  687. <instance-parameter name="action_group" transfer-ownership="none">
  688. <doc xml:space="preserve">a #GActionGroup</doc>
  689. <type name="ActionGroup" c:type="GActionGroup*"/>
  690. </instance-parameter>
  691. <parameter name="action_name" transfer-ownership="none">
  692. <doc xml:space="preserve">the name of an action in the group</doc>
  693. <type name="utf8" c:type="const gchar*"/>
  694. </parameter>
  695. </parameters>
  696. </virtual-method>
  697. <virtual-method name="action_state_changed"
  698. invoker="action_state_changed"
  699. version="2.28">
  700. <doc xml:space="preserve">Emits the #GActionGroup::action-state-changed signal on @action_group.
  701. This function should only be called by #GActionGroup implementations.</doc>
  702. <return-value transfer-ownership="none">
  703. <type name="none" c:type="void"/>
  704. </return-value>
  705. <parameters>
  706. <instance-parameter name="action_group" transfer-ownership="none">
  707. <doc xml:space="preserve">a #GActionGroup</doc>
  708. <type name="ActionGroup" c:type="GActionGroup*"/>
  709. </instance-parameter>
  710. <parameter name="action_name" transfer-ownership="none">
  711. <doc xml:space="preserve">the name of an action in the group</doc>
  712. <type name="utf8" c:type="const gchar*"/>
  713. </parameter>
  714. <parameter name="state" transfer-ownership="none">
  715. <doc xml:space="preserve">the new state of the named action</doc>
  716. <type name="GLib.Variant" c:type="GVariant*"/>
  717. </parameter>
  718. </parameters>
  719. </virtual-method>
  720. <virtual-method name="activate_action"
  721. invoker="activate_action"
  722. version="2.28">
  723. <doc xml:space="preserve">Activate the named action within @action_group.
  724. If the action is expecting a parameter, then the correct type of
  725. parameter must be given as @parameter. If the action is expecting no
  726. parameters then @parameter must be %NULL. See
  727. g_action_group_get_action_parameter_type().</doc>
  728. <return-value transfer-ownership="none">
  729. <type name="none" c:type="void"/>
  730. </return-value>
  731. <parameters>
  732. <instance-parameter name="action_group" transfer-ownership="none">
  733. <doc xml:space="preserve">a #GActionGroup</doc>
  734. <type name="ActionGroup" c:type="GActionGroup*"/>
  735. </instance-parameter>
  736. <parameter name="action_name" transfer-ownership="none">
  737. <doc xml:space="preserve">the name of the action to activate</doc>
  738. <type name="utf8" c:type="const gchar*"/>
  739. </parameter>
  740. <parameter name="parameter"
  741. transfer-ownership="none"
  742. nullable="1"
  743. allow-none="1">
  744. <doc xml:space="preserve">parameters to the activation</doc>
  745. <type name="GLib.Variant" c:type="GVariant*"/>
  746. </parameter>
  747. </parameters>
  748. </virtual-method>
  749. <virtual-method name="change_action_state"
  750. invoker="change_action_state"
  751. version="2.28">
  752. <doc xml:space="preserve">Request for the state of the named action within @action_group to be
  753. changed to @value.
  754. The action must be stateful and @value must be of the correct type.
  755. See g_action_group_get_action_state_type().
  756. This call merely requests a change. The action may refuse to change
  757. its state or may change its state to something other than @value.
  758. See g_action_group_get_action_state_hint().
  759. If the @value GVariant is floating, it is consumed.</doc>
  760. <return-value transfer-ownership="none">
  761. <type name="none" c:type="void"/>
  762. </return-value>
  763. <parameters>
  764. <instance-parameter name="action_group" transfer-ownership="none">
  765. <doc xml:space="preserve">a #GActionGroup</doc>
  766. <type name="ActionGroup" c:type="GActionGroup*"/>
  767. </instance-parameter>
  768. <parameter name="action_name" transfer-ownership="none">
  769. <doc xml:space="preserve">the name of the action to request the change on</doc>
  770. <type name="utf8" c:type="const gchar*"/>
  771. </parameter>
  772. <parameter name="value" transfer-ownership="none">
  773. <doc xml:space="preserve">the new state</doc>
  774. <type name="GLib.Variant" c:type="GVariant*"/>
  775. </parameter>
  776. </parameters>
  777. </virtual-method>
  778. <virtual-method name="get_action_enabled"
  779. invoker="get_action_enabled"
  780. version="2.28">
  781. <doc xml:space="preserve">Checks if the named action within @action_group is currently enabled.
  782. An action must be enabled in order to be activated or in order to
  783. have its state changed from outside callers.</doc>
  784. <return-value transfer-ownership="none">
  785. <doc xml:space="preserve">whether or not the action is currently enabled</doc>
  786. <type name="gboolean" c:type="gboolean"/>
  787. </return-value>
  788. <parameters>
  789. <instance-parameter name="action_group" transfer-ownership="none">
  790. <doc xml:space="preserve">a #GActionGroup</doc>
  791. <type name="ActionGroup" c:type="GActionGroup*"/>
  792. </instance-parameter>
  793. <parameter name="action_name" transfer-ownership="none">
  794. <doc xml:space="preserve">the name of the action to query</doc>
  795. <type name="utf8" c:type="const gchar*"/>
  796. </parameter>
  797. </parameters>
  798. </virtual-method>
  799. <virtual-method name="get_action_parameter_type"
  800. invoker="get_action_parameter_type"
  801. version="2.28">
  802. <doc xml:space="preserve">Queries the type of the parameter that must be given when activating
  803. the named action within @action_group.
  804. When activating the action using g_action_group_activate_action(),
  805. the #GVariant given to that function must be of the type returned
  806. by this function.
  807. In the case that this function returns %NULL, you must not give any
  808. #GVariant, but %NULL instead.
  809. The parameter type of a particular action will never change but it is
  810. possible for an action to be removed and for a new action to be added
  811. with the same name but a different parameter type.</doc>
  812. <return-value transfer-ownership="none" nullable="1">
  813. <doc xml:space="preserve">the parameter type</doc>
  814. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  815. </return-value>
  816. <parameters>
  817. <instance-parameter name="action_group" transfer-ownership="none">
  818. <doc xml:space="preserve">a #GActionGroup</doc>
  819. <type name="ActionGroup" c:type="GActionGroup*"/>
  820. </instance-parameter>
  821. <parameter name="action_name" transfer-ownership="none">
  822. <doc xml:space="preserve">the name of the action to query</doc>
  823. <type name="utf8" c:type="const gchar*"/>
  824. </parameter>
  825. </parameters>
  826. </virtual-method>
  827. <virtual-method name="get_action_state"
  828. invoker="get_action_state"
  829. version="2.28">
  830. <doc xml:space="preserve">Queries the current state of the named action within @action_group.
  831. If the action is not stateful then %NULL will be returned. If the
  832. action is stateful then the type of the return value is the type
  833. given by g_action_group_get_action_state_type().
  834. The return value (if non-%NULL) should be freed with
  835. g_variant_unref() when it is no longer required.</doc>
  836. <return-value transfer-ownership="full" nullable="1">
  837. <doc xml:space="preserve">the current state of the action</doc>
  838. <type name="GLib.Variant" c:type="GVariant*"/>
  839. </return-value>
  840. <parameters>
  841. <instance-parameter name="action_group" transfer-ownership="none">
  842. <doc xml:space="preserve">a #GActionGroup</doc>
  843. <type name="ActionGroup" c:type="GActionGroup*"/>
  844. </instance-parameter>
  845. <parameter name="action_name" transfer-ownership="none">
  846. <doc xml:space="preserve">the name of the action to query</doc>
  847. <type name="utf8" c:type="const gchar*"/>
  848. </parameter>
  849. </parameters>
  850. </virtual-method>
  851. <virtual-method name="get_action_state_hint"
  852. invoker="get_action_state_hint"
  853. version="2.28">
  854. <doc xml:space="preserve">Requests a hint about the valid range of values for the state of the
  855. named action within @action_group.
  856. If %NULL is returned it either means that the action is not stateful
  857. or that there is no hint about the valid range of values for the
  858. state of the action.
  859. If a #GVariant array is returned then each item in the array is a
  860. possible value for the state. If a #GVariant pair (ie: two-tuple) is
  861. returned then the tuple specifies the inclusive lower and upper bound
  862. of valid values for the state.
  863. In any case, the information is merely a hint. It may be possible to
  864. have a state value outside of the hinted range and setting a value
  865. within the range may fail.
  866. The return value (if non-%NULL) should be freed with
  867. g_variant_unref() when it is no longer required.</doc>
  868. <return-value transfer-ownership="full" nullable="1">
  869. <doc xml:space="preserve">the state range hint</doc>
  870. <type name="GLib.Variant" c:type="GVariant*"/>
  871. </return-value>
  872. <parameters>
  873. <instance-parameter name="action_group" transfer-ownership="none">
  874. <doc xml:space="preserve">a #GActionGroup</doc>
  875. <type name="ActionGroup" c:type="GActionGroup*"/>
  876. </instance-parameter>
  877. <parameter name="action_name" transfer-ownership="none">
  878. <doc xml:space="preserve">the name of the action to query</doc>
  879. <type name="utf8" c:type="const gchar*"/>
  880. </parameter>
  881. </parameters>
  882. </virtual-method>
  883. <virtual-method name="get_action_state_type"
  884. invoker="get_action_state_type"
  885. version="2.28">
  886. <doc xml:space="preserve">Queries the type of the state of the named action within
  887. @action_group.
  888. If the action is stateful then this function returns the
  889. #GVariantType of the state. All calls to
  890. g_action_group_change_action_state() must give a #GVariant of this
  891. type and g_action_group_get_action_state() will return a #GVariant
  892. of the same type.
  893. If the action is not stateful then this function will return %NULL.
  894. In that case, g_action_group_get_action_state() will return %NULL
  895. and you must not call g_action_group_change_action_state().
  896. The state type of a particular action will never change but it is
  897. possible for an action to be removed and for a new action to be added
  898. with the same name but a different state type.</doc>
  899. <return-value transfer-ownership="none" nullable="1">
  900. <doc xml:space="preserve">the state type, if the action is stateful</doc>
  901. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  902. </return-value>
  903. <parameters>
  904. <instance-parameter name="action_group" transfer-ownership="none">
  905. <doc xml:space="preserve">a #GActionGroup</doc>
  906. <type name="ActionGroup" c:type="GActionGroup*"/>
  907. </instance-parameter>
  908. <parameter name="action_name" transfer-ownership="none">
  909. <doc xml:space="preserve">the name of the action to query</doc>
  910. <type name="utf8" c:type="const gchar*"/>
  911. </parameter>
  912. </parameters>
  913. </virtual-method>
  914. <virtual-method name="has_action" invoker="has_action" version="2.28">
  915. <doc xml:space="preserve">Checks if the named action exists within @action_group.</doc>
  916. <return-value transfer-ownership="none">
  917. <doc xml:space="preserve">whether the named action exists</doc>
  918. <type name="gboolean" c:type="gboolean"/>
  919. </return-value>
  920. <parameters>
  921. <instance-parameter name="action_group" transfer-ownership="none">
  922. <doc xml:space="preserve">a #GActionGroup</doc>
  923. <type name="ActionGroup" c:type="GActionGroup*"/>
  924. </instance-parameter>
  925. <parameter name="action_name" transfer-ownership="none">
  926. <doc xml:space="preserve">the name of the action to check for</doc>
  927. <type name="utf8" c:type="const gchar*"/>
  928. </parameter>
  929. </parameters>
  930. </virtual-method>
  931. <virtual-method name="list_actions"
  932. invoker="list_actions"
  933. version="2.28">
  934. <doc xml:space="preserve">Lists the actions contained within @action_group.
  935. The caller is responsible for freeing the list with g_strfreev() when
  936. it is no longer required.</doc>
  937. <return-value transfer-ownership="full">
  938. <doc xml:space="preserve">a %NULL-terminated array of the names of the
  939. actions in the group</doc>
  940. <array c:type="gchar**">
  941. <type name="utf8"/>
  942. </array>
  943. </return-value>
  944. <parameters>
  945. <instance-parameter name="action_group" transfer-ownership="none">
  946. <doc xml:space="preserve">a #GActionGroup</doc>
  947. <type name="ActionGroup" c:type="GActionGroup*"/>
  948. </instance-parameter>
  949. </parameters>
  950. </virtual-method>
  951. <virtual-method name="query_action"
  952. invoker="query_action"
  953. version="2.32">
  954. <doc xml:space="preserve">Queries all aspects of the named action within an @action_group.
  955. This function acquires the information available from
  956. g_action_group_has_action(), g_action_group_get_action_enabled(),
  957. g_action_group_get_action_parameter_type(),
  958. g_action_group_get_action_state_type(),
  959. g_action_group_get_action_state_hint() and
  960. g_action_group_get_action_state() with a single function call.
  961. This provides two main benefits.
  962. The first is the improvement in efficiency that comes with not having
  963. to perform repeated lookups of the action in order to discover
  964. different things about it. The second is that implementing
  965. #GActionGroup can now be done by only overriding this one virtual
  966. function.
  967. The interface provides a default implementation of this function that
  968. calls the individual functions, as required, to fetch the
  969. information. The interface also provides default implementations of
  970. those functions that call this function. All implementations,
  971. therefore, must override either this function or all of the others.
  972. If the action exists, %TRUE is returned and any of the requested
  973. fields (as indicated by having a non-%NULL reference passed in) are
  974. filled. If the action doesn't exist, %FALSE is returned and the
  975. fields may or may not have been modified.</doc>
  976. <return-value transfer-ownership="none">
  977. <doc xml:space="preserve">%TRUE if the action exists, else %FALSE</doc>
  978. <type name="gboolean" c:type="gboolean"/>
  979. </return-value>
  980. <parameters>
  981. <instance-parameter name="action_group" transfer-ownership="none">
  982. <doc xml:space="preserve">a #GActionGroup</doc>
  983. <type name="ActionGroup" c:type="GActionGroup*"/>
  984. </instance-parameter>
  985. <parameter name="action_name" transfer-ownership="none">
  986. <doc xml:space="preserve">the name of an action in the group</doc>
  987. <type name="utf8" c:type="const gchar*"/>
  988. </parameter>
  989. <parameter name="enabled"
  990. direction="out"
  991. caller-allocates="0"
  992. transfer-ownership="full">
  993. <doc xml:space="preserve">if the action is presently enabled</doc>
  994. <type name="gboolean" c:type="gboolean*"/>
  995. </parameter>
  996. <parameter name="parameter_type"
  997. direction="out"
  998. caller-allocates="0"
  999. transfer-ownership="full"
  1000. optional="1"
  1001. allow-none="1">
  1002. <doc xml:space="preserve">the parameter type, or %NULL if none needed</doc>
  1003. <type name="GLib.VariantType" c:type="const GVariantType**"/>
  1004. </parameter>
  1005. <parameter name="state_type"
  1006. direction="out"
  1007. caller-allocates="0"
  1008. transfer-ownership="full"
  1009. optional="1"
  1010. allow-none="1">
  1011. <doc xml:space="preserve">the state type, or %NULL if stateless</doc>
  1012. <type name="GLib.VariantType" c:type="const GVariantType**"/>
  1013. </parameter>
  1014. <parameter name="state_hint"
  1015. direction="out"
  1016. caller-allocates="0"
  1017. transfer-ownership="full"
  1018. optional="1"
  1019. allow-none="1">
  1020. <doc xml:space="preserve">the state hint, or %NULL if none</doc>
  1021. <type name="GLib.Variant" c:type="GVariant**"/>
  1022. </parameter>
  1023. <parameter name="state"
  1024. direction="out"
  1025. caller-allocates="0"
  1026. transfer-ownership="full"
  1027. optional="1"
  1028. allow-none="1">
  1029. <doc xml:space="preserve">the current state, or %NULL if stateless</doc>
  1030. <type name="GLib.Variant" c:type="GVariant**"/>
  1031. </parameter>
  1032. </parameters>
  1033. </virtual-method>
  1034. <method name="action_added"
  1035. c:identifier="g_action_group_action_added"
  1036. version="2.28">
  1037. <doc xml:space="preserve">Emits the #GActionGroup::action-added signal on @action_group.
  1038. This function should only be called by #GActionGroup implementations.</doc>
  1039. <return-value transfer-ownership="none">
  1040. <type name="none" c:type="void"/>
  1041. </return-value>
  1042. <parameters>
  1043. <instance-parameter name="action_group" transfer-ownership="none">
  1044. <doc xml:space="preserve">a #GActionGroup</doc>
  1045. <type name="ActionGroup" c:type="GActionGroup*"/>
  1046. </instance-parameter>
  1047. <parameter name="action_name" transfer-ownership="none">
  1048. <doc xml:space="preserve">the name of an action in the group</doc>
  1049. <type name="utf8" c:type="const gchar*"/>
  1050. </parameter>
  1051. </parameters>
  1052. </method>
  1053. <method name="action_enabled_changed"
  1054. c:identifier="g_action_group_action_enabled_changed"
  1055. version="2.28">
  1056. <doc xml:space="preserve">Emits the #GActionGroup::action-enabled-changed signal on @action_group.
  1057. This function should only be called by #GActionGroup implementations.</doc>
  1058. <return-value transfer-ownership="none">
  1059. <type name="none" c:type="void"/>
  1060. </return-value>
  1061. <parameters>
  1062. <instance-parameter name="action_group" transfer-ownership="none">
  1063. <doc xml:space="preserve">a #GActionGroup</doc>
  1064. <type name="ActionGroup" c:type="GActionGroup*"/>
  1065. </instance-parameter>
  1066. <parameter name="action_name" transfer-ownership="none">
  1067. <doc xml:space="preserve">the name of an action in the group</doc>
  1068. <type name="utf8" c:type="const gchar*"/>
  1069. </parameter>
  1070. <parameter name="enabled" transfer-ownership="none">
  1071. <doc xml:space="preserve">whether or not the action is now enabled</doc>
  1072. <type name="gboolean" c:type="gboolean"/>
  1073. </parameter>
  1074. </parameters>
  1075. </method>
  1076. <method name="action_removed"
  1077. c:identifier="g_action_group_action_removed"
  1078. version="2.28">
  1079. <doc xml:space="preserve">Emits the #GActionGroup::action-removed signal on @action_group.
  1080. This function should only be called by #GActionGroup implementations.</doc>
  1081. <return-value transfer-ownership="none">
  1082. <type name="none" c:type="void"/>
  1083. </return-value>
  1084. <parameters>
  1085. <instance-parameter name="action_group" transfer-ownership="none">
  1086. <doc xml:space="preserve">a #GActionGroup</doc>
  1087. <type name="ActionGroup" c:type="GActionGroup*"/>
  1088. </instance-parameter>
  1089. <parameter name="action_name" transfer-ownership="none">
  1090. <doc xml:space="preserve">the name of an action in the group</doc>
  1091. <type name="utf8" c:type="const gchar*"/>
  1092. </parameter>
  1093. </parameters>
  1094. </method>
  1095. <method name="action_state_changed"
  1096. c:identifier="g_action_group_action_state_changed"
  1097. version="2.28">
  1098. <doc xml:space="preserve">Emits the #GActionGroup::action-state-changed signal on @action_group.
  1099. This function should only be called by #GActionGroup implementations.</doc>
  1100. <return-value transfer-ownership="none">
  1101. <type name="none" c:type="void"/>
  1102. </return-value>
  1103. <parameters>
  1104. <instance-parameter name="action_group" transfer-ownership="none">
  1105. <doc xml:space="preserve">a #GActionGroup</doc>
  1106. <type name="ActionGroup" c:type="GActionGroup*"/>
  1107. </instance-parameter>
  1108. <parameter name="action_name" transfer-ownership="none">
  1109. <doc xml:space="preserve">the name of an action in the group</doc>
  1110. <type name="utf8" c:type="const gchar*"/>
  1111. </parameter>
  1112. <parameter name="state" transfer-ownership="none">
  1113. <doc xml:space="preserve">the new state of the named action</doc>
  1114. <type name="GLib.Variant" c:type="GVariant*"/>
  1115. </parameter>
  1116. </parameters>
  1117. </method>
  1118. <method name="activate_action"
  1119. c:identifier="g_action_group_activate_action"
  1120. version="2.28">
  1121. <doc xml:space="preserve">Activate the named action within @action_group.
  1122. If the action is expecting a parameter, then the correct type of
  1123. parameter must be given as @parameter. If the action is expecting no
  1124. parameters then @parameter must be %NULL. See
  1125. g_action_group_get_action_parameter_type().</doc>
  1126. <return-value transfer-ownership="none">
  1127. <type name="none" c:type="void"/>
  1128. </return-value>
  1129. <parameters>
  1130. <instance-parameter name="action_group" transfer-ownership="none">
  1131. <doc xml:space="preserve">a #GActionGroup</doc>
  1132. <type name="ActionGroup" c:type="GActionGroup*"/>
  1133. </instance-parameter>
  1134. <parameter name="action_name" transfer-ownership="none">
  1135. <doc xml:space="preserve">the name of the action to activate</doc>
  1136. <type name="utf8" c:type="const gchar*"/>
  1137. </parameter>
  1138. <parameter name="parameter"
  1139. transfer-ownership="none"
  1140. nullable="1"
  1141. allow-none="1">
  1142. <doc xml:space="preserve">parameters to the activation</doc>
  1143. <type name="GLib.Variant" c:type="GVariant*"/>
  1144. </parameter>
  1145. </parameters>
  1146. </method>
  1147. <method name="change_action_state"
  1148. c:identifier="g_action_group_change_action_state"
  1149. version="2.28">
  1150. <doc xml:space="preserve">Request for the state of the named action within @action_group to be
  1151. changed to @value.
  1152. The action must be stateful and @value must be of the correct type.
  1153. See g_action_group_get_action_state_type().
  1154. This call merely requests a change. The action may refuse to change
  1155. its state or may change its state to something other than @value.
  1156. See g_action_group_get_action_state_hint().
  1157. If the @value GVariant is floating, it is consumed.</doc>
  1158. <return-value transfer-ownership="none">
  1159. <type name="none" c:type="void"/>
  1160. </return-value>
  1161. <parameters>
  1162. <instance-parameter name="action_group" transfer-ownership="none">
  1163. <doc xml:space="preserve">a #GActionGroup</doc>
  1164. <type name="ActionGroup" c:type="GActionGroup*"/>
  1165. </instance-parameter>
  1166. <parameter name="action_name" transfer-ownership="none">
  1167. <doc xml:space="preserve">the name of the action to request the change on</doc>
  1168. <type name="utf8" c:type="const gchar*"/>
  1169. </parameter>
  1170. <parameter name="value" transfer-ownership="none">
  1171. <doc xml:space="preserve">the new state</doc>
  1172. <type name="GLib.Variant" c:type="GVariant*"/>
  1173. </parameter>
  1174. </parameters>
  1175. </method>
  1176. <method name="get_action_enabled"
  1177. c:identifier="g_action_group_get_action_enabled"
  1178. version="2.28">
  1179. <doc xml:space="preserve">Checks if the named action within @action_group is currently enabled.
  1180. An action must be enabled in order to be activated or in order to
  1181. have its state changed from outside callers.</doc>
  1182. <return-value transfer-ownership="none">
  1183. <doc xml:space="preserve">whether or not the action is currently enabled</doc>
  1184. <type name="gboolean" c:type="gboolean"/>
  1185. </return-value>
  1186. <parameters>
  1187. <instance-parameter name="action_group" transfer-ownership="none">
  1188. <doc xml:space="preserve">a #GActionGroup</doc>
  1189. <type name="ActionGroup" c:type="GActionGroup*"/>
  1190. </instance-parameter>
  1191. <parameter name="action_name" transfer-ownership="none">
  1192. <doc xml:space="preserve">the name of the action to query</doc>
  1193. <type name="utf8" c:type="const gchar*"/>
  1194. </parameter>
  1195. </parameters>
  1196. </method>
  1197. <method name="get_action_parameter_type"
  1198. c:identifier="g_action_group_get_action_parameter_type"
  1199. version="2.28">
  1200. <doc xml:space="preserve">Queries the type of the parameter that must be given when activating
  1201. the named action within @action_group.
  1202. When activating the action using g_action_group_activate_action(),
  1203. the #GVariant given to that function must be of the type returned
  1204. by this function.
  1205. In the case that this function returns %NULL, you must not give any
  1206. #GVariant, but %NULL instead.
  1207. The parameter type of a particular action will never change but it is
  1208. possible for an action to be removed and for a new action to be added
  1209. with the same name but a different parameter type.</doc>
  1210. <return-value transfer-ownership="none" nullable="1">
  1211. <doc xml:space="preserve">the parameter type</doc>
  1212. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  1213. </return-value>
  1214. <parameters>
  1215. <instance-parameter name="action_group" transfer-ownership="none">
  1216. <doc xml:space="preserve">a #GActionGroup</doc>
  1217. <type name="ActionGroup" c:type="GActionGroup*"/>
  1218. </instance-parameter>
  1219. <parameter name="action_name" transfer-ownership="none">
  1220. <doc xml:space="preserve">the name of the action to query</doc>
  1221. <type name="utf8" c:type="const gchar*"/>
  1222. </parameter>
  1223. </parameters>
  1224. </method>
  1225. <method name="get_action_state"
  1226. c:identifier="g_action_group_get_action_state"
  1227. version="2.28">
  1228. <doc xml:space="preserve">Queries the current state of the named action within @action_group.
  1229. If the action is not stateful then %NULL will be returned. If the
  1230. action is stateful then the type of the return value is the type
  1231. given by g_action_group_get_action_state_type().
  1232. The return value (if non-%NULL) should be freed with
  1233. g_variant_unref() when it is no longer required.</doc>
  1234. <return-value transfer-ownership="full" nullable="1">
  1235. <doc xml:space="preserve">the current state of the action</doc>
  1236. <type name="GLib.Variant" c:type="GVariant*"/>
  1237. </return-value>
  1238. <parameters>
  1239. <instance-parameter name="action_group" transfer-ownership="none">
  1240. <doc xml:space="preserve">a #GActionGroup</doc>
  1241. <type name="ActionGroup" c:type="GActionGroup*"/>
  1242. </instance-parameter>
  1243. <parameter name="action_name" transfer-ownership="none">
  1244. <doc xml:space="preserve">the name of the action to query</doc>
  1245. <type name="utf8" c:type="const gchar*"/>
  1246. </parameter>
  1247. </parameters>
  1248. </method>
  1249. <method name="get_action_state_hint"
  1250. c:identifier="g_action_group_get_action_state_hint"
  1251. version="2.28">
  1252. <doc xml:space="preserve">Requests a hint about the valid range of values for the state of the
  1253. named action within @action_group.
  1254. If %NULL is returned it either means that the action is not stateful
  1255. or that there is no hint about the valid range of values for the
  1256. state of the action.
  1257. If a #GVariant array is returned then each item in the array is a
  1258. possible value for the state. If a #GVariant pair (ie: two-tuple) is
  1259. returned then the tuple specifies the inclusive lower and upper bound
  1260. of valid values for the state.
  1261. In any case, the information is merely a hint. It may be possible to
  1262. have a state value outside of the hinted range and setting a value
  1263. within the range may fail.
  1264. The return value (if non-%NULL) should be freed with
  1265. g_variant_unref() when it is no longer required.</doc>
  1266. <return-value transfer-ownership="full" nullable="1">
  1267. <doc xml:space="preserve">the state range hint</doc>
  1268. <type name="GLib.Variant" c:type="GVariant*"/>
  1269. </return-value>
  1270. <parameters>
  1271. <instance-parameter name="action_group" transfer-ownership="none">
  1272. <doc xml:space="preserve">a #GActionGroup</doc>
  1273. <type name="ActionGroup" c:type="GActionGroup*"/>
  1274. </instance-parameter>
  1275. <parameter name="action_name" transfer-ownership="none">
  1276. <doc xml:space="preserve">the name of the action to query</doc>
  1277. <type name="utf8" c:type="const gchar*"/>
  1278. </parameter>
  1279. </parameters>
  1280. </method>
  1281. <method name="get_action_state_type"
  1282. c:identifier="g_action_group_get_action_state_type"
  1283. version="2.28">
  1284. <doc xml:space="preserve">Queries the type of the state of the named action within
  1285. @action_group.
  1286. If the action is stateful then this function returns the
  1287. #GVariantType of the state. All calls to
  1288. g_action_group_change_action_state() must give a #GVariant of this
  1289. type and g_action_group_get_action_state() will return a #GVariant
  1290. of the same type.
  1291. If the action is not stateful then this function will return %NULL.
  1292. In that case, g_action_group_get_action_state() will return %NULL
  1293. and you must not call g_action_group_change_action_state().
  1294. The state type of a particular action will never change but it is
  1295. possible for an action to be removed and for a new action to be added
  1296. with the same name but a different state type.</doc>
  1297. <return-value transfer-ownership="none" nullable="1">
  1298. <doc xml:space="preserve">the state type, if the action is stateful</doc>
  1299. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  1300. </return-value>
  1301. <parameters>
  1302. <instance-parameter name="action_group" transfer-ownership="none">
  1303. <doc xml:space="preserve">a #GActionGroup</doc>
  1304. <type name="ActionGroup" c:type="GActionGroup*"/>
  1305. </instance-parameter>
  1306. <parameter name="action_name" transfer-ownership="none">
  1307. <doc xml:space="preserve">the name of the action to query</doc>
  1308. <type name="utf8" c:type="const gchar*"/>
  1309. </parameter>
  1310. </parameters>
  1311. </method>
  1312. <method name="has_action"
  1313. c:identifier="g_action_group_has_action"
  1314. version="2.28">
  1315. <doc xml:space="preserve">Checks if the named action exists within @action_group.</doc>
  1316. <return-value transfer-ownership="none">
  1317. <doc xml:space="preserve">whether the named action exists</doc>
  1318. <type name="gboolean" c:type="gboolean"/>
  1319. </return-value>
  1320. <parameters>
  1321. <instance-parameter name="action_group" transfer-ownership="none">
  1322. <doc xml:space="preserve">a #GActionGroup</doc>
  1323. <type name="ActionGroup" c:type="GActionGroup*"/>
  1324. </instance-parameter>
  1325. <parameter name="action_name" transfer-ownership="none">
  1326. <doc xml:space="preserve">the name of the action to check for</doc>
  1327. <type name="utf8" c:type="const gchar*"/>
  1328. </parameter>
  1329. </parameters>
  1330. </method>
  1331. <method name="list_actions"
  1332. c:identifier="g_action_group_list_actions"
  1333. version="2.28">
  1334. <doc xml:space="preserve">Lists the actions contained within @action_group.
  1335. The caller is responsible for freeing the list with g_strfreev() when
  1336. it is no longer required.</doc>
  1337. <return-value transfer-ownership="full">
  1338. <doc xml:space="preserve">a %NULL-terminated array of the names of the
  1339. actions in the group</doc>
  1340. <array c:type="gchar**">
  1341. <type name="utf8"/>
  1342. </array>
  1343. </return-value>
  1344. <parameters>
  1345. <instance-parameter name="action_group" transfer-ownership="none">
  1346. <doc xml:space="preserve">a #GActionGroup</doc>
  1347. <type name="ActionGroup" c:type="GActionGroup*"/>
  1348. </instance-parameter>
  1349. </parameters>
  1350. </method>
  1351. <method name="query_action"
  1352. c:identifier="g_action_group_query_action"
  1353. version="2.32">
  1354. <doc xml:space="preserve">Queries all aspects of the named action within an @action_group.
  1355. This function acquires the information available from
  1356. g_action_group_has_action(), g_action_group_get_action_enabled(),
  1357. g_action_group_get_action_parameter_type(),
  1358. g_action_group_get_action_state_type(),
  1359. g_action_group_get_action_state_hint() and
  1360. g_action_group_get_action_state() with a single function call.
  1361. This provides two main benefits.
  1362. The first is the improvement in efficiency that comes with not having
  1363. to perform repeated lookups of the action in order to discover
  1364. different things about it. The second is that implementing
  1365. #GActionGroup can now be done by only overriding this one virtual
  1366. function.
  1367. The interface provides a default implementation of this function that
  1368. calls the individual functions, as required, to fetch the
  1369. information. The interface also provides default implementations of
  1370. those functions that call this function. All implementations,
  1371. therefore, must override either this function or all of the others.
  1372. If the action exists, %TRUE is returned and any of the requested
  1373. fields (as indicated by having a non-%NULL reference passed in) are
  1374. filled. If the action doesn't exist, %FALSE is returned and the
  1375. fields may or may not have been modified.</doc>
  1376. <return-value transfer-ownership="none">
  1377. <doc xml:space="preserve">%TRUE if the action exists, else %FALSE</doc>
  1378. <type name="gboolean" c:type="gboolean"/>
  1379. </return-value>
  1380. <parameters>
  1381. <instance-parameter name="action_group" transfer-ownership="none">
  1382. <doc xml:space="preserve">a #GActionGroup</doc>
  1383. <type name="ActionGroup" c:type="GActionGroup*"/>
  1384. </instance-parameter>
  1385. <parameter name="action_name" transfer-ownership="none">
  1386. <doc xml:space="preserve">the name of an action in the group</doc>
  1387. <type name="utf8" c:type="const gchar*"/>
  1388. </parameter>
  1389. <parameter name="enabled"
  1390. direction="out"
  1391. caller-allocates="0"
  1392. transfer-ownership="full">
  1393. <doc xml:space="preserve">if the action is presently enabled</doc>
  1394. <type name="gboolean" c:type="gboolean*"/>
  1395. </parameter>
  1396. <parameter name="parameter_type"
  1397. direction="out"
  1398. caller-allocates="0"
  1399. transfer-ownership="full"
  1400. optional="1"
  1401. allow-none="1">
  1402. <doc xml:space="preserve">the parameter type, or %NULL if none needed</doc>
  1403. <type name="GLib.VariantType" c:type="const GVariantType**"/>
  1404. </parameter>
  1405. <parameter name="state_type"
  1406. direction="out"
  1407. caller-allocates="0"
  1408. transfer-ownership="full"
  1409. optional="1"
  1410. allow-none="1">
  1411. <doc xml:space="preserve">the state type, or %NULL if stateless</doc>
  1412. <type name="GLib.VariantType" c:type="const GVariantType**"/>
  1413. </parameter>
  1414. <parameter name="state_hint"
  1415. direction="out"
  1416. caller-allocates="0"
  1417. transfer-ownership="full"
  1418. optional="1"
  1419. allow-none="1">
  1420. <doc xml:space="preserve">the state hint, or %NULL if none</doc>
  1421. <type name="GLib.Variant" c:type="GVariant**"/>
  1422. </parameter>
  1423. <parameter name="state"
  1424. direction="out"
  1425. caller-allocates="0"
  1426. transfer-ownership="full"
  1427. optional="1"
  1428. allow-none="1">
  1429. <doc xml:space="preserve">the current state, or %NULL if stateless</doc>
  1430. <type name="GLib.Variant" c:type="GVariant**"/>
  1431. </parameter>
  1432. </parameters>
  1433. </method>
  1434. <glib:signal name="action-added" when="last" detailed="1" version="2.28">
  1435. <doc xml:space="preserve">Signals that a new action was just added to the group.
  1436. This signal is emitted after the action has been added
  1437. and is now visible.</doc>
  1438. <return-value transfer-ownership="none">
  1439. <type name="none" c:type="void"/>
  1440. </return-value>
  1441. <parameters>
  1442. <parameter name="action_name" transfer-ownership="none">
  1443. <doc xml:space="preserve">the name of the action in @action_group</doc>
  1444. <type name="utf8" c:type="gchar*"/>
  1445. </parameter>
  1446. </parameters>
  1447. </glib:signal>
  1448. <glib:signal name="action-enabled-changed"
  1449. when="last"
  1450. detailed="1"
  1451. version="2.28">
  1452. <doc xml:space="preserve">Signals that the enabled status of the named action has changed.</doc>
  1453. <return-value transfer-ownership="none">
  1454. <type name="none" c:type="void"/>
  1455. </return-value>
  1456. <parameters>
  1457. <parameter name="action_name" transfer-ownership="none">
  1458. <doc xml:space="preserve">the name of the action in @action_group</doc>
  1459. <type name="utf8" c:type="gchar*"/>
  1460. </parameter>
  1461. <parameter name="enabled" transfer-ownership="none">
  1462. <doc xml:space="preserve">whether the action is enabled or not</doc>
  1463. <type name="gboolean" c:type="gboolean"/>
  1464. </parameter>
  1465. </parameters>
  1466. </glib:signal>
  1467. <glib:signal name="action-removed"
  1468. when="last"
  1469. detailed="1"
  1470. version="2.28">
  1471. <doc xml:space="preserve">Signals that an action is just about to be removed from the group.
  1472. This signal is emitted before the action is removed, so the action
  1473. is still visible and can be queried from the signal handler.</doc>
  1474. <return-value transfer-ownership="none">
  1475. <type name="none" c:type="void"/>
  1476. </return-value>
  1477. <parameters>
  1478. <parameter name="action_name" transfer-ownership="none">
  1479. <doc xml:space="preserve">the name of the action in @action_group</doc>
  1480. <type name="utf8" c:type="gchar*"/>
  1481. </parameter>
  1482. </parameters>
  1483. </glib:signal>
  1484. <glib:signal name="action-state-changed"
  1485. when="last"
  1486. detailed="1"
  1487. version="2.28">
  1488. <doc xml:space="preserve">Signals that the state of the named action has changed.</doc>
  1489. <return-value transfer-ownership="none">
  1490. <type name="none" c:type="void"/>
  1491. </return-value>
  1492. <parameters>
  1493. <parameter name="action_name" transfer-ownership="none">
  1494. <doc xml:space="preserve">the name of the action in @action_group</doc>
  1495. <type name="utf8" c:type="gchar*"/>
  1496. </parameter>
  1497. <parameter name="value" transfer-ownership="none">
  1498. <doc xml:space="preserve">the new value of the state</doc>
  1499. <type name="GLib.Variant"/>
  1500. </parameter>
  1501. </parameters>
  1502. </glib:signal>
  1503. </interface>
  1504. <record name="ActionGroupInterface"
  1505. c:type="GActionGroupInterface"
  1506. glib:is-gtype-struct-for="ActionGroup"
  1507. version="2.28">
  1508. <doc xml:space="preserve">The virtual function table for #GActionGroup.</doc>
  1509. <field name="g_iface">
  1510. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  1511. </field>
  1512. <field name="has_action">
  1513. <callback name="has_action">
  1514. <return-value transfer-ownership="none">
  1515. <doc xml:space="preserve">whether the named action exists</doc>
  1516. <type name="gboolean" c:type="gboolean"/>
  1517. </return-value>
  1518. <parameters>
  1519. <parameter name="action_group" transfer-ownership="none">
  1520. <doc xml:space="preserve">a #GActionGroup</doc>
  1521. <type name="ActionGroup" c:type="GActionGroup*"/>
  1522. </parameter>
  1523. <parameter name="action_name" transfer-ownership="none">
  1524. <doc xml:space="preserve">the name of the action to check for</doc>
  1525. <type name="utf8" c:type="const gchar*"/>
  1526. </parameter>
  1527. </parameters>
  1528. </callback>
  1529. </field>
  1530. <field name="list_actions">
  1531. <callback name="list_actions">
  1532. <return-value transfer-ownership="full">
  1533. <doc xml:space="preserve">a %NULL-terminated array of the names of the
  1534. actions in the group</doc>
  1535. <array c:type="gchar**">
  1536. <type name="utf8"/>
  1537. </array>
  1538. </return-value>
  1539. <parameters>
  1540. <parameter name="action_group" transfer-ownership="none">
  1541. <doc xml:space="preserve">a #GActionGroup</doc>
  1542. <type name="ActionGroup" c:type="GActionGroup*"/>
  1543. </parameter>
  1544. </parameters>
  1545. </callback>
  1546. </field>
  1547. <field name="get_action_enabled">
  1548. <callback name="get_action_enabled">
  1549. <return-value transfer-ownership="none">
  1550. <doc xml:space="preserve">whether or not the action is currently enabled</doc>
  1551. <type name="gboolean" c:type="gboolean"/>
  1552. </return-value>
  1553. <parameters>
  1554. <parameter name="action_group" transfer-ownership="none">
  1555. <doc xml:space="preserve">a #GActionGroup</doc>
  1556. <type name="ActionGroup" c:type="GActionGroup*"/>
  1557. </parameter>
  1558. <parameter name="action_name" transfer-ownership="none">
  1559. <doc xml:space="preserve">the name of the action to query</doc>
  1560. <type name="utf8" c:type="const gchar*"/>
  1561. </parameter>
  1562. </parameters>
  1563. </callback>
  1564. </field>
  1565. <field name="get_action_parameter_type">
  1566. <callback name="get_action_parameter_type">
  1567. <return-value transfer-ownership="none" nullable="1">
  1568. <doc xml:space="preserve">the parameter type</doc>
  1569. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  1570. </return-value>
  1571. <parameters>
  1572. <parameter name="action_group" transfer-ownership="none">
  1573. <doc xml:space="preserve">a #GActionGroup</doc>
  1574. <type name="ActionGroup" c:type="GActionGroup*"/>
  1575. </parameter>
  1576. <parameter name="action_name" transfer-ownership="none">
  1577. <doc xml:space="preserve">the name of the action to query</doc>
  1578. <type name="utf8" c:type="const gchar*"/>
  1579. </parameter>
  1580. </parameters>
  1581. </callback>
  1582. </field>
  1583. <field name="get_action_state_type">
  1584. <callback name="get_action_state_type">
  1585. <return-value transfer-ownership="none" nullable="1">
  1586. <doc xml:space="preserve">the state type, if the action is stateful</doc>
  1587. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  1588. </return-value>
  1589. <parameters>
  1590. <parameter name="action_group" transfer-ownership="none">
  1591. <doc xml:space="preserve">a #GActionGroup</doc>
  1592. <type name="ActionGroup" c:type="GActionGroup*"/>
  1593. </parameter>
  1594. <parameter name="action_name" transfer-ownership="none">
  1595. <doc xml:space="preserve">the name of the action to query</doc>
  1596. <type name="utf8" c:type="const gchar*"/>
  1597. </parameter>
  1598. </parameters>
  1599. </callback>
  1600. </field>
  1601. <field name="get_action_state_hint">
  1602. <callback name="get_action_state_hint">
  1603. <return-value transfer-ownership="full" nullable="1">
  1604. <doc xml:space="preserve">the state range hint</doc>
  1605. <type name="GLib.Variant" c:type="GVariant*"/>
  1606. </return-value>
  1607. <parameters>
  1608. <parameter name="action_group" transfer-ownership="none">
  1609. <doc xml:space="preserve">a #GActionGroup</doc>
  1610. <type name="ActionGroup" c:type="GActionGroup*"/>
  1611. </parameter>
  1612. <parameter name="action_name" transfer-ownership="none">
  1613. <doc xml:space="preserve">the name of the action to query</doc>
  1614. <type name="utf8" c:type="const gchar*"/>
  1615. </parameter>
  1616. </parameters>
  1617. </callback>
  1618. </field>
  1619. <field name="get_action_state">
  1620. <callback name="get_action_state">
  1621. <return-value transfer-ownership="full" nullable="1">
  1622. <doc xml:space="preserve">the current state of the action</doc>
  1623. <type name="GLib.Variant" c:type="GVariant*"/>
  1624. </return-value>
  1625. <parameters>
  1626. <parameter name="action_group" transfer-ownership="none">
  1627. <doc xml:space="preserve">a #GActionGroup</doc>
  1628. <type name="ActionGroup" c:type="GActionGroup*"/>
  1629. </parameter>
  1630. <parameter name="action_name" transfer-ownership="none">
  1631. <doc xml:space="preserve">the name of the action to query</doc>
  1632. <type name="utf8" c:type="const gchar*"/>
  1633. </parameter>
  1634. </parameters>
  1635. </callback>
  1636. </field>
  1637. <field name="change_action_state">
  1638. <callback name="change_action_state">
  1639. <return-value transfer-ownership="none">
  1640. <type name="none" c:type="void"/>
  1641. </return-value>
  1642. <parameters>
  1643. <parameter name="action_group" transfer-ownership="none">
  1644. <doc xml:space="preserve">a #GActionGroup</doc>
  1645. <type name="ActionGroup" c:type="GActionGroup*"/>
  1646. </parameter>
  1647. <parameter name="action_name" transfer-ownership="none">
  1648. <doc xml:space="preserve">the name of the action to request the change on</doc>
  1649. <type name="utf8" c:type="const gchar*"/>
  1650. </parameter>
  1651. <parameter name="value" transfer-ownership="none">
  1652. <doc xml:space="preserve">the new state</doc>
  1653. <type name="GLib.Variant" c:type="GVariant*"/>
  1654. </parameter>
  1655. </parameters>
  1656. </callback>
  1657. </field>
  1658. <field name="activate_action">
  1659. <callback name="activate_action">
  1660. <return-value transfer-ownership="none">
  1661. <type name="none" c:type="void"/>
  1662. </return-value>
  1663. <parameters>
  1664. <parameter name="action_group" transfer-ownership="none">
  1665. <doc xml:space="preserve">a #GActionGroup</doc>
  1666. <type name="ActionGroup" c:type="GActionGroup*"/>
  1667. </parameter>
  1668. <parameter name="action_name" transfer-ownership="none">
  1669. <doc xml:space="preserve">the name of the action to activate</doc>
  1670. <type name="utf8" c:type="const gchar*"/>
  1671. </parameter>
  1672. <parameter name="parameter"
  1673. transfer-ownership="none"
  1674. nullable="1"
  1675. allow-none="1">
  1676. <doc xml:space="preserve">parameters to the activation</doc>
  1677. <type name="GLib.Variant" c:type="GVariant*"/>
  1678. </parameter>
  1679. </parameters>
  1680. </callback>
  1681. </field>
  1682. <field name="action_added">
  1683. <callback name="action_added">
  1684. <return-value transfer-ownership="none">
  1685. <type name="none" c:type="void"/>
  1686. </return-value>
  1687. <parameters>
  1688. <parameter name="action_group" transfer-ownership="none">
  1689. <doc xml:space="preserve">a #GActionGroup</doc>
  1690. <type name="ActionGroup" c:type="GActionGroup*"/>
  1691. </parameter>
  1692. <parameter name="action_name" transfer-ownership="none">
  1693. <doc xml:space="preserve">the name of an action in the group</doc>
  1694. <type name="utf8" c:type="const gchar*"/>
  1695. </parameter>
  1696. </parameters>
  1697. </callback>
  1698. </field>
  1699. <field name="action_removed">
  1700. <callback name="action_removed">
  1701. <return-value transfer-ownership="none">
  1702. <type name="none" c:type="void"/>
  1703. </return-value>
  1704. <parameters>
  1705. <parameter name="action_group" transfer-ownership="none">
  1706. <doc xml:space="preserve">a #GActionGroup</doc>
  1707. <type name="ActionGroup" c:type="GActionGroup*"/>
  1708. </parameter>
  1709. <parameter name="action_name" transfer-ownership="none">
  1710. <doc xml:space="preserve">the name of an action in the group</doc>
  1711. <type name="utf8" c:type="const gchar*"/>
  1712. </parameter>
  1713. </parameters>
  1714. </callback>
  1715. </field>
  1716. <field name="action_enabled_changed">
  1717. <callback name="action_enabled_changed">
  1718. <return-value transfer-ownership="none">
  1719. <type name="none" c:type="void"/>
  1720. </return-value>
  1721. <parameters>
  1722. <parameter name="action_group" transfer-ownership="none">
  1723. <doc xml:space="preserve">a #GActionGroup</doc>
  1724. <type name="ActionGroup" c:type="GActionGroup*"/>
  1725. </parameter>
  1726. <parameter name="action_name" transfer-ownership="none">
  1727. <doc xml:space="preserve">the name of an action in the group</doc>
  1728. <type name="utf8" c:type="const gchar*"/>
  1729. </parameter>
  1730. <parameter name="enabled" transfer-ownership="none">
  1731. <doc xml:space="preserve">whether or not the action is now enabled</doc>
  1732. <type name="gboolean" c:type="gboolean"/>
  1733. </parameter>
  1734. </parameters>
  1735. </callback>
  1736. </field>
  1737. <field name="action_state_changed">
  1738. <callback name="action_state_changed">
  1739. <return-value transfer-ownership="none">
  1740. <type name="none" c:type="void"/>
  1741. </return-value>
  1742. <parameters>
  1743. <parameter name="action_group" transfer-ownership="none">
  1744. <doc xml:space="preserve">a #GActionGroup</doc>
  1745. <type name="ActionGroup" c:type="GActionGroup*"/>
  1746. </parameter>
  1747. <parameter name="action_name" transfer-ownership="none">
  1748. <doc xml:space="preserve">the name of an action in the group</doc>
  1749. <type name="utf8" c:type="const gchar*"/>
  1750. </parameter>
  1751. <parameter name="state" transfer-ownership="none">
  1752. <doc xml:space="preserve">the new state of the named action</doc>
  1753. <type name="GLib.Variant" c:type="GVariant*"/>
  1754. </parameter>
  1755. </parameters>
  1756. </callback>
  1757. </field>
  1758. <field name="query_action">
  1759. <callback name="query_action">
  1760. <return-value transfer-ownership="none">
  1761. <doc xml:space="preserve">%TRUE if the action exists, else %FALSE</doc>
  1762. <type name="gboolean" c:type="gboolean"/>
  1763. </return-value>
  1764. <parameters>
  1765. <parameter name="action_group" transfer-ownership="none">
  1766. <doc xml:space="preserve">a #GActionGroup</doc>
  1767. <type name="ActionGroup" c:type="GActionGroup*"/>
  1768. </parameter>
  1769. <parameter name="action_name" transfer-ownership="none">
  1770. <doc xml:space="preserve">the name of an action in the group</doc>
  1771. <type name="utf8" c:type="const gchar*"/>
  1772. </parameter>
  1773. <parameter name="enabled"
  1774. direction="out"
  1775. caller-allocates="0"
  1776. transfer-ownership="full">
  1777. <doc xml:space="preserve">if the action is presently enabled</doc>
  1778. <type name="gboolean" c:type="gboolean*"/>
  1779. </parameter>
  1780. <parameter name="parameter_type"
  1781. direction="out"
  1782. caller-allocates="0"
  1783. transfer-ownership="full"
  1784. optional="1"
  1785. allow-none="1">
  1786. <doc xml:space="preserve">the parameter type, or %NULL if none needed</doc>
  1787. <type name="GLib.VariantType" c:type="const GVariantType**"/>
  1788. </parameter>
  1789. <parameter name="state_type"
  1790. direction="out"
  1791. caller-allocates="0"
  1792. transfer-ownership="full"
  1793. optional="1"
  1794. allow-none="1">
  1795. <doc xml:space="preserve">the state type, or %NULL if stateless</doc>
  1796. <type name="GLib.VariantType" c:type="const GVariantType**"/>
  1797. </parameter>
  1798. <parameter name="state_hint"
  1799. direction="out"
  1800. caller-allocates="0"
  1801. transfer-ownership="full"
  1802. optional="1"
  1803. allow-none="1">
  1804. <doc xml:space="preserve">the state hint, or %NULL if none</doc>
  1805. <type name="GLib.Variant" c:type="GVariant**"/>
  1806. </parameter>
  1807. <parameter name="state"
  1808. direction="out"
  1809. caller-allocates="0"
  1810. transfer-ownership="full"
  1811. optional="1"
  1812. allow-none="1">
  1813. <doc xml:space="preserve">the current state, or %NULL if stateless</doc>
  1814. <type name="GLib.Variant" c:type="GVariant**"/>
  1815. </parameter>
  1816. </parameters>
  1817. </callback>
  1818. </field>
  1819. </record>
  1820. <record name="ActionInterface"
  1821. c:type="GActionInterface"
  1822. glib:is-gtype-struct-for="Action"
  1823. version="2.28">
  1824. <doc xml:space="preserve">The virtual function table for #GAction.</doc>
  1825. <field name="g_iface">
  1826. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  1827. </field>
  1828. <field name="get_name">
  1829. <callback name="get_name">
  1830. <return-value transfer-ownership="none">
  1831. <doc xml:space="preserve">the name of the action</doc>
  1832. <type name="utf8" c:type="const gchar*"/>
  1833. </return-value>
  1834. <parameters>
  1835. <parameter name="action" transfer-ownership="none">
  1836. <doc xml:space="preserve">a #GAction</doc>
  1837. <type name="Action" c:type="GAction*"/>
  1838. </parameter>
  1839. </parameters>
  1840. </callback>
  1841. </field>
  1842. <field name="get_parameter_type">
  1843. <callback name="get_parameter_type">
  1844. <return-value transfer-ownership="none" nullable="1">
  1845. <doc xml:space="preserve">the parameter type</doc>
  1846. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  1847. </return-value>
  1848. <parameters>
  1849. <parameter name="action" transfer-ownership="none">
  1850. <doc xml:space="preserve">a #GAction</doc>
  1851. <type name="Action" c:type="GAction*"/>
  1852. </parameter>
  1853. </parameters>
  1854. </callback>
  1855. </field>
  1856. <field name="get_state_type">
  1857. <callback name="get_state_type">
  1858. <return-value transfer-ownership="none" nullable="1">
  1859. <doc xml:space="preserve">the state type, if the action is stateful</doc>
  1860. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  1861. </return-value>
  1862. <parameters>
  1863. <parameter name="action" transfer-ownership="none">
  1864. <doc xml:space="preserve">a #GAction</doc>
  1865. <type name="Action" c:type="GAction*"/>
  1866. </parameter>
  1867. </parameters>
  1868. </callback>
  1869. </field>
  1870. <field name="get_state_hint">
  1871. <callback name="get_state_hint">
  1872. <return-value transfer-ownership="full" nullable="1">
  1873. <doc xml:space="preserve">the state range hint</doc>
  1874. <type name="GLib.Variant" c:type="GVariant*"/>
  1875. </return-value>
  1876. <parameters>
  1877. <parameter name="action" transfer-ownership="none">
  1878. <doc xml:space="preserve">a #GAction</doc>
  1879. <type name="Action" c:type="GAction*"/>
  1880. </parameter>
  1881. </parameters>
  1882. </callback>
  1883. </field>
  1884. <field name="get_enabled">
  1885. <callback name="get_enabled">
  1886. <return-value transfer-ownership="none">
  1887. <doc xml:space="preserve">whether the action is enabled</doc>
  1888. <type name="gboolean" c:type="gboolean"/>
  1889. </return-value>
  1890. <parameters>
  1891. <parameter name="action" transfer-ownership="none">
  1892. <doc xml:space="preserve">a #GAction</doc>
  1893. <type name="Action" c:type="GAction*"/>
  1894. </parameter>
  1895. </parameters>
  1896. </callback>
  1897. </field>
  1898. <field name="get_state">
  1899. <callback name="get_state">
  1900. <return-value transfer-ownership="full">
  1901. <doc xml:space="preserve">the current state of the action</doc>
  1902. <type name="GLib.Variant" c:type="GVariant*"/>
  1903. </return-value>
  1904. <parameters>
  1905. <parameter name="action" transfer-ownership="none">
  1906. <doc xml:space="preserve">a #GAction</doc>
  1907. <type name="Action" c:type="GAction*"/>
  1908. </parameter>
  1909. </parameters>
  1910. </callback>
  1911. </field>
  1912. <field name="change_state">
  1913. <callback name="change_state">
  1914. <return-value transfer-ownership="none">
  1915. <type name="none" c:type="void"/>
  1916. </return-value>
  1917. <parameters>
  1918. <parameter name="action" transfer-ownership="none">
  1919. <doc xml:space="preserve">a #GAction</doc>
  1920. <type name="Action" c:type="GAction*"/>
  1921. </parameter>
  1922. <parameter name="value" transfer-ownership="none">
  1923. <doc xml:space="preserve">the new state</doc>
  1924. <type name="GLib.Variant" c:type="GVariant*"/>
  1925. </parameter>
  1926. </parameters>
  1927. </callback>
  1928. </field>
  1929. <field name="activate">
  1930. <callback name="activate">
  1931. <return-value transfer-ownership="none">
  1932. <type name="none" c:type="void"/>
  1933. </return-value>
  1934. <parameters>
  1935. <parameter name="action" transfer-ownership="none">
  1936. <doc xml:space="preserve">a #GAction</doc>
  1937. <type name="Action" c:type="GAction*"/>
  1938. </parameter>
  1939. <parameter name="parameter"
  1940. transfer-ownership="none"
  1941. nullable="1"
  1942. allow-none="1">
  1943. <doc xml:space="preserve">the parameter to the activation</doc>
  1944. <type name="GLib.Variant" c:type="GVariant*"/>
  1945. </parameter>
  1946. </parameters>
  1947. </callback>
  1948. </field>
  1949. </record>
  1950. <interface name="ActionMap"
  1951. c:symbol-prefix="action_map"
  1952. c:type="GActionMap"
  1953. glib:type-name="GActionMap"
  1954. glib:get-type="g_action_map_get_type"
  1955. glib:type-struct="ActionMapInterface">
  1956. <doc xml:space="preserve">The GActionMap interface is implemented by #GActionGroup
  1957. implementations that operate by containing a number of
  1958. named #GAction instances, such as #GSimpleActionGroup.
  1959. One useful application of this interface is to map the
  1960. names of actions from various action groups to unique,
  1961. prefixed names (e.g. by prepending "app." or "win.").
  1962. This is the motivation for the 'Map' part of the interface
  1963. name.</doc>
  1964. <virtual-method name="add_action" invoker="add_action" version="2.32">
  1965. <doc xml:space="preserve">Adds an action to the @action_map.
  1966. If the action map already contains an action with the same name
  1967. as @action then the old action is dropped from the action map.
  1968. The action map takes its own reference on @action.</doc>
  1969. <return-value transfer-ownership="none">
  1970. <type name="none" c:type="void"/>
  1971. </return-value>
  1972. <parameters>
  1973. <instance-parameter name="action_map" transfer-ownership="none">
  1974. <doc xml:space="preserve">a #GActionMap</doc>
  1975. <type name="ActionMap" c:type="GActionMap*"/>
  1976. </instance-parameter>
  1977. <parameter name="action" transfer-ownership="none">
  1978. <doc xml:space="preserve">a #GAction</doc>
  1979. <type name="Action" c:type="GAction*"/>
  1980. </parameter>
  1981. </parameters>
  1982. </virtual-method>
  1983. <virtual-method name="lookup_action"
  1984. invoker="lookup_action"
  1985. version="2.32">
  1986. <doc xml:space="preserve">Looks up the action with the name @action_name in @action_map.
  1987. If no such action exists, returns %NULL.</doc>
  1988. <return-value transfer-ownership="none">
  1989. <doc xml:space="preserve">a #GAction, or %NULL</doc>
  1990. <type name="Action" c:type="GAction*"/>
  1991. </return-value>
  1992. <parameters>
  1993. <instance-parameter name="action_map" transfer-ownership="none">
  1994. <doc xml:space="preserve">a #GActionMap</doc>
  1995. <type name="ActionMap" c:type="GActionMap*"/>
  1996. </instance-parameter>
  1997. <parameter name="action_name" transfer-ownership="none">
  1998. <doc xml:space="preserve">the name of an action</doc>
  1999. <type name="utf8" c:type="const gchar*"/>
  2000. </parameter>
  2001. </parameters>
  2002. </virtual-method>
  2003. <virtual-method name="remove_action"
  2004. invoker="remove_action"
  2005. version="2.32">
  2006. <doc xml:space="preserve">Removes the named action from the action map.
  2007. If no action of this name is in the map then nothing happens.</doc>
  2008. <return-value transfer-ownership="none">
  2009. <type name="none" c:type="void"/>
  2010. </return-value>
  2011. <parameters>
  2012. <instance-parameter name="action_map" transfer-ownership="none">
  2013. <doc xml:space="preserve">a #GActionMap</doc>
  2014. <type name="ActionMap" c:type="GActionMap*"/>
  2015. </instance-parameter>
  2016. <parameter name="action_name" transfer-ownership="none">
  2017. <doc xml:space="preserve">the name of the action</doc>
  2018. <type name="utf8" c:type="const gchar*"/>
  2019. </parameter>
  2020. </parameters>
  2021. </virtual-method>
  2022. <method name="add_action"
  2023. c:identifier="g_action_map_add_action"
  2024. version="2.32">
  2025. <doc xml:space="preserve">Adds an action to the @action_map.
  2026. If the action map already contains an action with the same name
  2027. as @action then the old action is dropped from the action map.
  2028. The action map takes its own reference on @action.</doc>
  2029. <return-value transfer-ownership="none">
  2030. <type name="none" c:type="void"/>
  2031. </return-value>
  2032. <parameters>
  2033. <instance-parameter name="action_map" transfer-ownership="none">
  2034. <doc xml:space="preserve">a #GActionMap</doc>
  2035. <type name="ActionMap" c:type="GActionMap*"/>
  2036. </instance-parameter>
  2037. <parameter name="action" transfer-ownership="none">
  2038. <doc xml:space="preserve">a #GAction</doc>
  2039. <type name="Action" c:type="GAction*"/>
  2040. </parameter>
  2041. </parameters>
  2042. </method>
  2043. <method name="add_action_entries"
  2044. c:identifier="g_action_map_add_action_entries"
  2045. version="2.32">
  2046. <doc xml:space="preserve">A convenience function for creating multiple #GSimpleAction instances
  2047. and adding them to a #GActionMap.
  2048. Each action is constructed as per one #GActionEntry.
  2049. |[&lt;!-- language="C" --&gt;
  2050. static void
  2051. activate_quit (GSimpleAction *simple,
  2052. GVariant *parameter,
  2053. gpointer user_data)
  2054. {
  2055. exit (0);
  2056. }
  2057. static void
  2058. activate_print_string (GSimpleAction *simple,
  2059. GVariant *parameter,
  2060. gpointer user_data)
  2061. {
  2062. g_print ("%s\n", g_variant_get_string (parameter, NULL));
  2063. }
  2064. static GActionGroup *
  2065. create_action_group (void)
  2066. {
  2067. const GActionEntry entries[] = {
  2068. { "quit", activate_quit },
  2069. { "print-string", activate_print_string, "s" }
  2070. };
  2071. GSimpleActionGroup *group;
  2072. group = g_simple_action_group_new ();
  2073. g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL);
  2074. return G_ACTION_GROUP (group);
  2075. }
  2076. ]|</doc>
  2077. <return-value transfer-ownership="none">
  2078. <type name="none" c:type="void"/>
  2079. </return-value>
  2080. <parameters>
  2081. <instance-parameter name="action_map" transfer-ownership="none">
  2082. <doc xml:space="preserve">a #GActionMap</doc>
  2083. <type name="ActionMap" c:type="GActionMap*"/>
  2084. </instance-parameter>
  2085. <parameter name="entries" transfer-ownership="none">
  2086. <doc xml:space="preserve">a pointer to
  2087. the first item in an array of #GActionEntry structs</doc>
  2088. <array length="1" zero-terminated="0" c:type="GActionEntry*">
  2089. <type name="ActionEntry"/>
  2090. </array>
  2091. </parameter>
  2092. <parameter name="n_entries" transfer-ownership="none">
  2093. <doc xml:space="preserve">the length of @entries, or -1 if @entries is %NULL-terminated</doc>
  2094. <type name="gint" c:type="gint"/>
  2095. </parameter>
  2096. <parameter name="user_data"
  2097. transfer-ownership="none"
  2098. nullable="1"
  2099. allow-none="1">
  2100. <doc xml:space="preserve">the user data for signal connections</doc>
  2101. <type name="gpointer" c:type="gpointer"/>
  2102. </parameter>
  2103. </parameters>
  2104. </method>
  2105. <method name="lookup_action"
  2106. c:identifier="g_action_map_lookup_action"
  2107. version="2.32">
  2108. <doc xml:space="preserve">Looks up the action with the name @action_name in @action_map.
  2109. If no such action exists, returns %NULL.</doc>
  2110. <return-value transfer-ownership="none">
  2111. <doc xml:space="preserve">a #GAction, or %NULL</doc>
  2112. <type name="Action" c:type="GAction*"/>
  2113. </return-value>
  2114. <parameters>
  2115. <instance-parameter name="action_map" transfer-ownership="none">
  2116. <doc xml:space="preserve">a #GActionMap</doc>
  2117. <type name="ActionMap" c:type="GActionMap*"/>
  2118. </instance-parameter>
  2119. <parameter name="action_name" transfer-ownership="none">
  2120. <doc xml:space="preserve">the name of an action</doc>
  2121. <type name="utf8" c:type="const gchar*"/>
  2122. </parameter>
  2123. </parameters>
  2124. </method>
  2125. <method name="remove_action"
  2126. c:identifier="g_action_map_remove_action"
  2127. version="2.32">
  2128. <doc xml:space="preserve">Removes the named action from the action map.
  2129. If no action of this name is in the map then nothing happens.</doc>
  2130. <return-value transfer-ownership="none">
  2131. <type name="none" c:type="void"/>
  2132. </return-value>
  2133. <parameters>
  2134. <instance-parameter name="action_map" transfer-ownership="none">
  2135. <doc xml:space="preserve">a #GActionMap</doc>
  2136. <type name="ActionMap" c:type="GActionMap*"/>
  2137. </instance-parameter>
  2138. <parameter name="action_name" transfer-ownership="none">
  2139. <doc xml:space="preserve">the name of the action</doc>
  2140. <type name="utf8" c:type="const gchar*"/>
  2141. </parameter>
  2142. </parameters>
  2143. </method>
  2144. </interface>
  2145. <record name="ActionMapInterface"
  2146. c:type="GActionMapInterface"
  2147. glib:is-gtype-struct-for="ActionMap"
  2148. version="2.32">
  2149. <doc xml:space="preserve">The virtual function table for #GActionMap.</doc>
  2150. <field name="g_iface">
  2151. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  2152. </field>
  2153. <field name="lookup_action">
  2154. <callback name="lookup_action">
  2155. <return-value transfer-ownership="none">
  2156. <doc xml:space="preserve">a #GAction, or %NULL</doc>
  2157. <type name="Action" c:type="GAction*"/>
  2158. </return-value>
  2159. <parameters>
  2160. <parameter name="action_map" transfer-ownership="none">
  2161. <doc xml:space="preserve">a #GActionMap</doc>
  2162. <type name="ActionMap" c:type="GActionMap*"/>
  2163. </parameter>
  2164. <parameter name="action_name" transfer-ownership="none">
  2165. <doc xml:space="preserve">the name of an action</doc>
  2166. <type name="utf8" c:type="const gchar*"/>
  2167. </parameter>
  2168. </parameters>
  2169. </callback>
  2170. </field>
  2171. <field name="add_action">
  2172. <callback name="add_action">
  2173. <return-value transfer-ownership="none">
  2174. <type name="none" c:type="void"/>
  2175. </return-value>
  2176. <parameters>
  2177. <parameter name="action_map" transfer-ownership="none">
  2178. <doc xml:space="preserve">a #GActionMap</doc>
  2179. <type name="ActionMap" c:type="GActionMap*"/>
  2180. </parameter>
  2181. <parameter name="action" transfer-ownership="none">
  2182. <doc xml:space="preserve">a #GAction</doc>
  2183. <type name="Action" c:type="GAction*"/>
  2184. </parameter>
  2185. </parameters>
  2186. </callback>
  2187. </field>
  2188. <field name="remove_action">
  2189. <callback name="remove_action">
  2190. <return-value transfer-ownership="none">
  2191. <type name="none" c:type="void"/>
  2192. </return-value>
  2193. <parameters>
  2194. <parameter name="action_map" transfer-ownership="none">
  2195. <doc xml:space="preserve">a #GActionMap</doc>
  2196. <type name="ActionMap" c:type="GActionMap*"/>
  2197. </parameter>
  2198. <parameter name="action_name" transfer-ownership="none">
  2199. <doc xml:space="preserve">the name of the action</doc>
  2200. <type name="utf8" c:type="const gchar*"/>
  2201. </parameter>
  2202. </parameters>
  2203. </callback>
  2204. </field>
  2205. </record>
  2206. <interface name="AppInfo"
  2207. c:symbol-prefix="app_info"
  2208. c:type="GAppInfo"
  2209. glib:type-name="GAppInfo"
  2210. glib:get-type="g_app_info_get_type"
  2211. glib:type-struct="AppInfoIface">
  2212. <doc xml:space="preserve">#GAppInfo and #GAppLaunchContext are used for describing and launching
  2213. applications installed on the system.
  2214. As of GLib 2.20, URIs will always be converted to POSIX paths
  2215. (using g_file_get_path()) when using g_app_info_launch() even if
  2216. the application requested an URI and not a POSIX path. For example
  2217. for an desktop-file based application with Exec key `totem
  2218. %U` and a single URI, `sftp://foo/file.avi`, then
  2219. `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will
  2220. only work if a set of suitable GIO extensions (such as gvfs 2.26
  2221. compiled with FUSE support), is available and operational; if this
  2222. is not the case, the URI will be passed unmodified to the application.
  2223. Some URIs, such as `mailto:`, of course cannot be mapped to a POSIX
  2224. path (in gvfs there's no FUSE mount for it); such URIs will be
  2225. passed unmodified to the application.
  2226. Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
  2227. back to the GIO URI in the #GFile constructors (since gvfs
  2228. implements the #GVfs extension point). As such, if the application
  2229. needs to examine the URI, it needs to use g_file_get_uri() or
  2230. similar on #GFile. In other words, an application cannot assume
  2231. that the URI passed to e.g. g_file_new_for_commandline_arg() is
  2232. equal to the result of g_file_get_uri(). The following snippet
  2233. illustrates this:
  2234. |[
  2235. GFile *f;
  2236. char *uri;
  2237. file = g_file_new_for_commandline_arg (uri_from_commandline);
  2238. uri = g_file_get_uri (file);
  2239. strcmp (uri, uri_from_commandline) == 0;
  2240. g_free (uri);
  2241. if (g_file_has_uri_scheme (file, "cdda"))
  2242. {
  2243. // do something special with uri
  2244. }
  2245. g_object_unref (file);
  2246. ]|
  2247. This code will work when both `cdda://sr0/Track 1.wav` and
  2248. `/home/user/.gvfs/cdda on sr0/Track 1.wav` is passed to the
  2249. application. It should be noted that it's generally not safe
  2250. for applications to rely on the format of a particular URIs.
  2251. Different launcher applications (e.g. file managers) may have
  2252. different ideas of what a given URI means.</doc>
  2253. <function name="create_from_commandline"
  2254. c:identifier="g_app_info_create_from_commandline"
  2255. throws="1">
  2256. <doc xml:space="preserve">Creates a new #GAppInfo from the given information.
  2257. Note that for @commandline, the quoting rules of the Exec key of the
  2258. [freedesktop.org Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec)
  2259. are applied. For example, if the @commandline contains
  2260. percent-encoded URIs, the percent-character must be doubled in order to prevent it from
  2261. being swallowed by Exec key unquoting. See the specification for exact quoting rules.</doc>
  2262. <return-value transfer-ownership="full">
  2263. <doc xml:space="preserve">new #GAppInfo for given command.</doc>
  2264. <type name="AppInfo" c:type="GAppInfo*"/>
  2265. </return-value>
  2266. <parameters>
  2267. <parameter name="commandline" transfer-ownership="none">
  2268. <doc xml:space="preserve">the commandline to use</doc>
  2269. <type name="utf8" c:type="const char*"/>
  2270. </parameter>
  2271. <parameter name="application_name"
  2272. transfer-ownership="none"
  2273. nullable="1"
  2274. allow-none="1">
  2275. <doc xml:space="preserve">the application name, or %NULL to use @commandline</doc>
  2276. <type name="utf8" c:type="const char*"/>
  2277. </parameter>
  2278. <parameter name="flags" transfer-ownership="none">
  2279. <doc xml:space="preserve">flags that can specify details of the created #GAppInfo</doc>
  2280. <type name="AppInfoCreateFlags" c:type="GAppInfoCreateFlags"/>
  2281. </parameter>
  2282. </parameters>
  2283. </function>
  2284. <function name="get_all" c:identifier="g_app_info_get_all">
  2285. <doc xml:space="preserve">Gets a list of all of the applications currently registered
  2286. on this system.
  2287. For desktop files, this includes applications that have
  2288. `NoDisplay=true` set or are excluded from display by means
  2289. of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show().
  2290. The returned list does not include applications which have
  2291. the `Hidden` key set.</doc>
  2292. <return-value transfer-ownership="full">
  2293. <doc xml:space="preserve">a newly allocated #GList of references to #GAppInfos.</doc>
  2294. <type name="GLib.List" c:type="GList*">
  2295. <type name="AppInfo"/>
  2296. </type>
  2297. </return-value>
  2298. </function>
  2299. <function name="get_all_for_type"
  2300. c:identifier="g_app_info_get_all_for_type">
  2301. <doc xml:space="preserve">Gets a list of all #GAppInfos for a given content type,
  2302. including the recommended and fallback #GAppInfos. See
  2303. g_app_info_get_recommended_for_type() and
  2304. g_app_info_get_fallback_for_type().</doc>
  2305. <return-value transfer-ownership="full">
  2306. <doc xml:space="preserve">#GList of #GAppInfos
  2307. for given @content_type or %NULL on error.</doc>
  2308. <type name="GLib.List" c:type="GList*">
  2309. <type name="AppInfo"/>
  2310. </type>
  2311. </return-value>
  2312. <parameters>
  2313. <parameter name="content_type" transfer-ownership="none">
  2314. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  2315. <type name="utf8" c:type="const char*"/>
  2316. </parameter>
  2317. </parameters>
  2318. </function>
  2319. <function name="get_default_for_type"
  2320. c:identifier="g_app_info_get_default_for_type">
  2321. <doc xml:space="preserve">Gets the default #GAppInfo for a given content type.</doc>
  2322. <return-value transfer-ownership="full">
  2323. <doc xml:space="preserve">#GAppInfo for given @content_type or
  2324. %NULL on error.</doc>
  2325. <type name="AppInfo" c:type="GAppInfo*"/>
  2326. </return-value>
  2327. <parameters>
  2328. <parameter name="content_type" transfer-ownership="none">
  2329. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  2330. <type name="utf8" c:type="const char*"/>
  2331. </parameter>
  2332. <parameter name="must_support_uris" transfer-ownership="none">
  2333. <doc xml:space="preserve">if %TRUE, the #GAppInfo is expected to
  2334. support URIs</doc>
  2335. <type name="gboolean" c:type="gboolean"/>
  2336. </parameter>
  2337. </parameters>
  2338. </function>
  2339. <function name="get_default_for_uri_scheme"
  2340. c:identifier="g_app_info_get_default_for_uri_scheme">
  2341. <doc xml:space="preserve">Gets the default application for handling URIs with
  2342. the given URI scheme. A URI scheme is the initial part
  2343. of the URI, up to but not including the ':', e.g. "http",
  2344. "ftp" or "sip".</doc>
  2345. <return-value transfer-ownership="full">
  2346. <doc xml:space="preserve">#GAppInfo for given @uri_scheme or %NULL on error.</doc>
  2347. <type name="AppInfo" c:type="GAppInfo*"/>
  2348. </return-value>
  2349. <parameters>
  2350. <parameter name="uri_scheme" transfer-ownership="none">
  2351. <doc xml:space="preserve">a string containing a URI scheme.</doc>
  2352. <type name="utf8" c:type="const char*"/>
  2353. </parameter>
  2354. </parameters>
  2355. </function>
  2356. <function name="get_fallback_for_type"
  2357. c:identifier="g_app_info_get_fallback_for_type"
  2358. version="2.28">
  2359. <doc xml:space="preserve">Gets a list of fallback #GAppInfos for a given content type, i.e.
  2360. those applications which claim to support the given content type
  2361. by MIME type subclassing and not directly.</doc>
  2362. <return-value transfer-ownership="full">
  2363. <doc xml:space="preserve">#GList of #GAppInfos
  2364. for given @content_type or %NULL on error.</doc>
  2365. <type name="GLib.List" c:type="GList*">
  2366. <type name="AppInfo"/>
  2367. </type>
  2368. </return-value>
  2369. <parameters>
  2370. <parameter name="content_type" transfer-ownership="none">
  2371. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  2372. <type name="utf8" c:type="const gchar*"/>
  2373. </parameter>
  2374. </parameters>
  2375. </function>
  2376. <function name="get_recommended_for_type"
  2377. c:identifier="g_app_info_get_recommended_for_type"
  2378. version="2.28">
  2379. <doc xml:space="preserve">Gets a list of recommended #GAppInfos for a given content type, i.e.
  2380. those applications which claim to support the given content type exactly,
  2381. and not by MIME type subclassing.
  2382. Note that the first application of the list is the last used one, i.e.
  2383. the last one for which g_app_info_set_as_last_used_for_type() has been
  2384. called.</doc>
  2385. <return-value transfer-ownership="full">
  2386. <doc xml:space="preserve">#GList of #GAppInfos
  2387. for given @content_type or %NULL on error.</doc>
  2388. <type name="GLib.List" c:type="GList*">
  2389. <type name="AppInfo"/>
  2390. </type>
  2391. </return-value>
  2392. <parameters>
  2393. <parameter name="content_type" transfer-ownership="none">
  2394. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  2395. <type name="utf8" c:type="const gchar*"/>
  2396. </parameter>
  2397. </parameters>
  2398. </function>
  2399. <function name="launch_default_for_uri"
  2400. c:identifier="g_app_info_launch_default_for_uri"
  2401. throws="1">
  2402. <doc xml:space="preserve">Utility function that launches the default application
  2403. registered to handle the specified uri. Synchronous I/O
  2404. is done on the uri to detect the type of the file if
  2405. required.</doc>
  2406. <return-value transfer-ownership="none">
  2407. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  2408. <type name="gboolean" c:type="gboolean"/>
  2409. </return-value>
  2410. <parameters>
  2411. <parameter name="uri" transfer-ownership="none">
  2412. <doc xml:space="preserve">the uri to show</doc>
  2413. <type name="utf8" c:type="const char*"/>
  2414. </parameter>
  2415. <parameter name="launch_context"
  2416. transfer-ownership="none"
  2417. nullable="1"
  2418. allow-none="1">
  2419. <doc xml:space="preserve">an optional #GAppLaunchContext.</doc>
  2420. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  2421. </parameter>
  2422. </parameters>
  2423. </function>
  2424. <function name="reset_type_associations"
  2425. c:identifier="g_app_info_reset_type_associations"
  2426. version="2.20">
  2427. <doc xml:space="preserve">Removes all changes to the type associations done by
  2428. g_app_info_set_as_default_for_type(),
  2429. g_app_info_set_as_default_for_extension(),
  2430. g_app_info_add_supports_type() or
  2431. g_app_info_remove_supports_type().</doc>
  2432. <return-value transfer-ownership="none">
  2433. <type name="none" c:type="void"/>
  2434. </return-value>
  2435. <parameters>
  2436. <parameter name="content_type" transfer-ownership="none">
  2437. <doc xml:space="preserve">a content type</doc>
  2438. <type name="utf8" c:type="const char*"/>
  2439. </parameter>
  2440. </parameters>
  2441. </function>
  2442. <virtual-method name="add_supports_type"
  2443. invoker="add_supports_type"
  2444. throws="1">
  2445. <doc xml:space="preserve">Adds a content type to the application information to indicate the
  2446. application is capable of opening files with the given content type.</doc>
  2447. <return-value transfer-ownership="none">
  2448. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  2449. <type name="gboolean" c:type="gboolean"/>
  2450. </return-value>
  2451. <parameters>
  2452. <instance-parameter name="appinfo" transfer-ownership="none">
  2453. <doc xml:space="preserve">a #GAppInfo.</doc>
  2454. <type name="AppInfo" c:type="GAppInfo*"/>
  2455. </instance-parameter>
  2456. <parameter name="content_type" transfer-ownership="none">
  2457. <doc xml:space="preserve">a string.</doc>
  2458. <type name="utf8" c:type="const char*"/>
  2459. </parameter>
  2460. </parameters>
  2461. </virtual-method>
  2462. <virtual-method name="can_delete" invoker="can_delete" version="2.20">
  2463. <doc xml:space="preserve">Obtains the information whether the #GAppInfo can be deleted.
  2464. See g_app_info_delete().</doc>
  2465. <return-value transfer-ownership="none">
  2466. <doc xml:space="preserve">%TRUE if @appinfo can be deleted</doc>
  2467. <type name="gboolean" c:type="gboolean"/>
  2468. </return-value>
  2469. <parameters>
  2470. <instance-parameter name="appinfo" transfer-ownership="none">
  2471. <doc xml:space="preserve">a #GAppInfo</doc>
  2472. <type name="AppInfo" c:type="GAppInfo*"/>
  2473. </instance-parameter>
  2474. </parameters>
  2475. </virtual-method>
  2476. <virtual-method name="can_remove_supports_type"
  2477. invoker="can_remove_supports_type">
  2478. <doc xml:space="preserve">Checks if a supported content type can be removed from an application.</doc>
  2479. <return-value transfer-ownership="none">
  2480. <doc xml:space="preserve">%TRUE if it is possible to remove supported
  2481. content types from a given @appinfo, %FALSE if not.</doc>
  2482. <type name="gboolean" c:type="gboolean"/>
  2483. </return-value>
  2484. <parameters>
  2485. <instance-parameter name="appinfo" transfer-ownership="none">
  2486. <doc xml:space="preserve">a #GAppInfo.</doc>
  2487. <type name="AppInfo" c:type="GAppInfo*"/>
  2488. </instance-parameter>
  2489. </parameters>
  2490. </virtual-method>
  2491. <virtual-method name="do_delete" invoker="delete" version="2.20">
  2492. <doc xml:space="preserve">Tries to delete a #GAppInfo.
  2493. On some platforms, there may be a difference between user-defined
  2494. #GAppInfos which can be deleted, and system-wide ones which cannot.
  2495. See g_app_info_can_delete().</doc>
  2496. <return-value transfer-ownership="none">
  2497. <doc xml:space="preserve">%TRUE if @appinfo has been deleted</doc>
  2498. <type name="gboolean" c:type="gboolean"/>
  2499. </return-value>
  2500. <parameters>
  2501. <instance-parameter name="appinfo" transfer-ownership="none">
  2502. <doc xml:space="preserve">a #GAppInfo</doc>
  2503. <type name="AppInfo" c:type="GAppInfo*"/>
  2504. </instance-parameter>
  2505. </parameters>
  2506. </virtual-method>
  2507. <virtual-method name="dup" invoker="dup">
  2508. <doc xml:space="preserve">Creates a duplicate of a #GAppInfo.</doc>
  2509. <return-value transfer-ownership="full">
  2510. <doc xml:space="preserve">a duplicate of @appinfo.</doc>
  2511. <type name="AppInfo" c:type="GAppInfo*"/>
  2512. </return-value>
  2513. <parameters>
  2514. <instance-parameter name="appinfo" transfer-ownership="none">
  2515. <doc xml:space="preserve">a #GAppInfo.</doc>
  2516. <type name="AppInfo" c:type="GAppInfo*"/>
  2517. </instance-parameter>
  2518. </parameters>
  2519. </virtual-method>
  2520. <virtual-method name="equal" invoker="equal">
  2521. <doc xml:space="preserve">Checks if two #GAppInfos are equal.</doc>
  2522. <return-value transfer-ownership="none">
  2523. <doc xml:space="preserve">%TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.</doc>
  2524. <type name="gboolean" c:type="gboolean"/>
  2525. </return-value>
  2526. <parameters>
  2527. <instance-parameter name="appinfo1" transfer-ownership="none">
  2528. <doc xml:space="preserve">the first #GAppInfo.</doc>
  2529. <type name="AppInfo" c:type="GAppInfo*"/>
  2530. </instance-parameter>
  2531. <parameter name="appinfo2" transfer-ownership="none">
  2532. <doc xml:space="preserve">the second #GAppInfo.</doc>
  2533. <type name="AppInfo" c:type="GAppInfo*"/>
  2534. </parameter>
  2535. </parameters>
  2536. </virtual-method>
  2537. <virtual-method name="get_commandline"
  2538. invoker="get_commandline"
  2539. version="2.20">
  2540. <doc xml:space="preserve">Gets the commandline with which the application will be
  2541. started.</doc>
  2542. <return-value transfer-ownership="none">
  2543. <doc xml:space="preserve">a string containing the @appinfo's commandline,
  2544. or %NULL if this information is not available</doc>
  2545. <type name="utf8" c:type="const char*"/>
  2546. </return-value>
  2547. <parameters>
  2548. <instance-parameter name="appinfo" transfer-ownership="none">
  2549. <doc xml:space="preserve">a #GAppInfo</doc>
  2550. <type name="AppInfo" c:type="GAppInfo*"/>
  2551. </instance-parameter>
  2552. </parameters>
  2553. </virtual-method>
  2554. <virtual-method name="get_description" invoker="get_description">
  2555. <doc xml:space="preserve">Gets a human-readable description of an installed application.</doc>
  2556. <return-value transfer-ownership="none">
  2557. <doc xml:space="preserve">a string containing a description of the
  2558. application @appinfo, or %NULL if none.</doc>
  2559. <type name="utf8" c:type="const char*"/>
  2560. </return-value>
  2561. <parameters>
  2562. <instance-parameter name="appinfo" transfer-ownership="none">
  2563. <doc xml:space="preserve">a #GAppInfo.</doc>
  2564. <type name="AppInfo" c:type="GAppInfo*"/>
  2565. </instance-parameter>
  2566. </parameters>
  2567. </virtual-method>
  2568. <virtual-method name="get_display_name"
  2569. invoker="get_display_name"
  2570. version="2.24">
  2571. <doc xml:space="preserve">Gets the display name of the application. The display name is often more
  2572. descriptive to the user than the name itself.</doc>
  2573. <return-value transfer-ownership="none">
  2574. <doc xml:space="preserve">the display name of the application for @appinfo, or the name if
  2575. no display name is available.</doc>
  2576. <type name="utf8" c:type="const char*"/>
  2577. </return-value>
  2578. <parameters>
  2579. <instance-parameter name="appinfo" transfer-ownership="none">
  2580. <doc xml:space="preserve">a #GAppInfo.</doc>
  2581. <type name="AppInfo" c:type="GAppInfo*"/>
  2582. </instance-parameter>
  2583. </parameters>
  2584. </virtual-method>
  2585. <virtual-method name="get_executable" invoker="get_executable">
  2586. <doc xml:space="preserve">Gets the executable's name for the installed application.</doc>
  2587. <return-value transfer-ownership="none">
  2588. <doc xml:space="preserve">a string containing the @appinfo's application
  2589. binaries name</doc>
  2590. <type name="utf8" c:type="const char*"/>
  2591. </return-value>
  2592. <parameters>
  2593. <instance-parameter name="appinfo" transfer-ownership="none">
  2594. <doc xml:space="preserve">a #GAppInfo</doc>
  2595. <type name="AppInfo" c:type="GAppInfo*"/>
  2596. </instance-parameter>
  2597. </parameters>
  2598. </virtual-method>
  2599. <virtual-method name="get_icon" invoker="get_icon">
  2600. <doc xml:space="preserve">Gets the icon for the application.</doc>
  2601. <return-value transfer-ownership="none">
  2602. <doc xml:space="preserve">the default #GIcon for @appinfo or %NULL
  2603. if there is no default icon.</doc>
  2604. <type name="Icon" c:type="GIcon*"/>
  2605. </return-value>
  2606. <parameters>
  2607. <instance-parameter name="appinfo" transfer-ownership="none">
  2608. <doc xml:space="preserve">a #GAppInfo.</doc>
  2609. <type name="AppInfo" c:type="GAppInfo*"/>
  2610. </instance-parameter>
  2611. </parameters>
  2612. </virtual-method>
  2613. <virtual-method name="get_id" invoker="get_id">
  2614. <doc xml:space="preserve">Gets the ID of an application. An id is a string that
  2615. identifies the application. The exact format of the id is
  2616. platform dependent. For instance, on Unix this is the
  2617. desktop file id from the xdg menu specification.
  2618. Note that the returned ID may be %NULL, depending on how
  2619. the @appinfo has been constructed.</doc>
  2620. <return-value transfer-ownership="none">
  2621. <doc xml:space="preserve">a string containing the application's ID.</doc>
  2622. <type name="utf8" c:type="const char*"/>
  2623. </return-value>
  2624. <parameters>
  2625. <instance-parameter name="appinfo" transfer-ownership="none">
  2626. <doc xml:space="preserve">a #GAppInfo.</doc>
  2627. <type name="AppInfo" c:type="GAppInfo*"/>
  2628. </instance-parameter>
  2629. </parameters>
  2630. </virtual-method>
  2631. <virtual-method name="get_name" invoker="get_name">
  2632. <doc xml:space="preserve">Gets the installed name of the application.</doc>
  2633. <return-value transfer-ownership="none">
  2634. <doc xml:space="preserve">the name of the application for @appinfo.</doc>
  2635. <type name="utf8" c:type="const char*"/>
  2636. </return-value>
  2637. <parameters>
  2638. <instance-parameter name="appinfo" transfer-ownership="none">
  2639. <doc xml:space="preserve">a #GAppInfo.</doc>
  2640. <type name="AppInfo" c:type="GAppInfo*"/>
  2641. </instance-parameter>
  2642. </parameters>
  2643. </virtual-method>
  2644. <virtual-method name="get_supported_types"
  2645. invoker="get_supported_types"
  2646. version="2.34">
  2647. <doc xml:space="preserve">Retrieves the list of content types that @app_info claims to support.
  2648. If this information is not provided by the environment, this function
  2649. will return %NULL.
  2650. This function does not take in consideration associations added with
  2651. g_app_info_add_supports_type(), but only those exported directly by
  2652. the application.</doc>
  2653. <return-value transfer-ownership="none">
  2654. <doc xml:space="preserve">
  2655. a list of content types.</doc>
  2656. <array c:type="char**">
  2657. <type name="utf8"/>
  2658. </array>
  2659. </return-value>
  2660. <parameters>
  2661. <instance-parameter name="appinfo" transfer-ownership="none">
  2662. <doc xml:space="preserve">a #GAppInfo that can handle files</doc>
  2663. <type name="AppInfo" c:type="GAppInfo*"/>
  2664. </instance-parameter>
  2665. </parameters>
  2666. </virtual-method>
  2667. <virtual-method name="launch" invoker="launch" throws="1">
  2668. <doc xml:space="preserve">Launches the application. Passes @files to the launched application
  2669. as arguments, using the optional @launch_context to get information
  2670. about the details of the launcher (like what screen it is on).
  2671. On error, @error will be set accordingly.
  2672. To launch the application without arguments pass a %NULL @files list.
  2673. Note that even if the launch is successful the application launched
  2674. can fail to start if it runs into problems during startup. There is
  2675. no way to detect this.
  2676. Some URIs can be changed when passed through a GFile (for instance
  2677. unsupported URIs with strange formats like mailto:), so if you have
  2678. a textual URI you want to pass in as argument, consider using
  2679. g_app_info_launch_uris() instead.
  2680. The launched application inherits the environment of the launching
  2681. process, but it can be modified with g_app_launch_context_setenv()
  2682. and g_app_launch_context_unsetenv().
  2683. On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE`
  2684. environment variable with the path of the launched desktop file and
  2685. `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched
  2686. process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`,
  2687. should it be inherited by further processes. The `DISPLAY` and
  2688. `DESKTOP_STARTUP_ID` environment variables are also set, based
  2689. on information provided in @launch_context.</doc>
  2690. <return-value transfer-ownership="none">
  2691. <doc xml:space="preserve">%TRUE on successful launch, %FALSE otherwise.</doc>
  2692. <type name="gboolean" c:type="gboolean"/>
  2693. </return-value>
  2694. <parameters>
  2695. <instance-parameter name="appinfo" transfer-ownership="none">
  2696. <doc xml:space="preserve">a #GAppInfo</doc>
  2697. <type name="AppInfo" c:type="GAppInfo*"/>
  2698. </instance-parameter>
  2699. <parameter name="files"
  2700. transfer-ownership="none"
  2701. nullable="1"
  2702. allow-none="1">
  2703. <doc xml:space="preserve">a #GList of #GFile objects</doc>
  2704. <type name="GLib.List" c:type="GList*">
  2705. <type name="File"/>
  2706. </type>
  2707. </parameter>
  2708. <parameter name="launch_context"
  2709. transfer-ownership="none"
  2710. nullable="1"
  2711. allow-none="1">
  2712. <doc xml:space="preserve">a #GAppLaunchContext or %NULL</doc>
  2713. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  2714. </parameter>
  2715. </parameters>
  2716. </virtual-method>
  2717. <virtual-method name="launch_uris" invoker="launch_uris" throws="1">
  2718. <doc xml:space="preserve">Launches the application. This passes the @uris to the launched application
  2719. as arguments, using the optional @launch_context to get information
  2720. about the details of the launcher (like what screen it is on).
  2721. On error, @error will be set accordingly.
  2722. To launch the application without arguments pass a %NULL @uris list.
  2723. Note that even if the launch is successful the application launched
  2724. can fail to start if it runs into problems during startup. There is
  2725. no way to detect this.</doc>
  2726. <return-value transfer-ownership="none">
  2727. <doc xml:space="preserve">%TRUE on successful launch, %FALSE otherwise.</doc>
  2728. <type name="gboolean" c:type="gboolean"/>
  2729. </return-value>
  2730. <parameters>
  2731. <instance-parameter name="appinfo" transfer-ownership="none">
  2732. <doc xml:space="preserve">a #GAppInfo</doc>
  2733. <type name="AppInfo" c:type="GAppInfo*"/>
  2734. </instance-parameter>
  2735. <parameter name="uris"
  2736. transfer-ownership="none"
  2737. nullable="1"
  2738. allow-none="1">
  2739. <doc xml:space="preserve">a #GList containing URIs to launch.</doc>
  2740. <type name="GLib.List" c:type="GList*">
  2741. <type name="utf8"/>
  2742. </type>
  2743. </parameter>
  2744. <parameter name="launch_context"
  2745. transfer-ownership="none"
  2746. nullable="1"
  2747. allow-none="1">
  2748. <doc xml:space="preserve">a #GAppLaunchContext or %NULL</doc>
  2749. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  2750. </parameter>
  2751. </parameters>
  2752. </virtual-method>
  2753. <virtual-method name="remove_supports_type"
  2754. invoker="remove_supports_type"
  2755. throws="1">
  2756. <doc xml:space="preserve">Removes a supported type from an application, if possible.</doc>
  2757. <return-value transfer-ownership="none">
  2758. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  2759. <type name="gboolean" c:type="gboolean"/>
  2760. </return-value>
  2761. <parameters>
  2762. <instance-parameter name="appinfo" transfer-ownership="none">
  2763. <doc xml:space="preserve">a #GAppInfo.</doc>
  2764. <type name="AppInfo" c:type="GAppInfo*"/>
  2765. </instance-parameter>
  2766. <parameter name="content_type" transfer-ownership="none">
  2767. <doc xml:space="preserve">a string.</doc>
  2768. <type name="utf8" c:type="const char*"/>
  2769. </parameter>
  2770. </parameters>
  2771. </virtual-method>
  2772. <virtual-method name="set_as_default_for_extension"
  2773. invoker="set_as_default_for_extension"
  2774. throws="1">
  2775. <doc xml:space="preserve">Sets the application as the default handler for the given file extension.</doc>
  2776. <return-value transfer-ownership="none">
  2777. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  2778. <type name="gboolean" c:type="gboolean"/>
  2779. </return-value>
  2780. <parameters>
  2781. <instance-parameter name="appinfo" transfer-ownership="none">
  2782. <doc xml:space="preserve">a #GAppInfo.</doc>
  2783. <type name="AppInfo" c:type="GAppInfo*"/>
  2784. </instance-parameter>
  2785. <parameter name="extension" transfer-ownership="none">
  2786. <doc xml:space="preserve">a string containing the file extension (without the dot).</doc>
  2787. <type name="utf8" c:type="const char*"/>
  2788. </parameter>
  2789. </parameters>
  2790. </virtual-method>
  2791. <virtual-method name="set_as_default_for_type"
  2792. invoker="set_as_default_for_type"
  2793. throws="1">
  2794. <doc xml:space="preserve">Sets the application as the default handler for a given type.</doc>
  2795. <return-value transfer-ownership="none">
  2796. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  2797. <type name="gboolean" c:type="gboolean"/>
  2798. </return-value>
  2799. <parameters>
  2800. <instance-parameter name="appinfo" transfer-ownership="none">
  2801. <doc xml:space="preserve">a #GAppInfo.</doc>
  2802. <type name="AppInfo" c:type="GAppInfo*"/>
  2803. </instance-parameter>
  2804. <parameter name="content_type" transfer-ownership="none">
  2805. <doc xml:space="preserve">the content type.</doc>
  2806. <type name="utf8" c:type="const char*"/>
  2807. </parameter>
  2808. </parameters>
  2809. </virtual-method>
  2810. <virtual-method name="set_as_last_used_for_type"
  2811. invoker="set_as_last_used_for_type"
  2812. throws="1">
  2813. <doc xml:space="preserve">Sets the application as the last used application for a given type.
  2814. This will make the application appear as first in the list returned
  2815. by g_app_info_get_recommended_for_type(), regardless of the default
  2816. application for that content type.</doc>
  2817. <return-value transfer-ownership="none">
  2818. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  2819. <type name="gboolean" c:type="gboolean"/>
  2820. </return-value>
  2821. <parameters>
  2822. <instance-parameter name="appinfo" transfer-ownership="none">
  2823. <doc xml:space="preserve">a #GAppInfo.</doc>
  2824. <type name="AppInfo" c:type="GAppInfo*"/>
  2825. </instance-parameter>
  2826. <parameter name="content_type" transfer-ownership="none">
  2827. <doc xml:space="preserve">the content type.</doc>
  2828. <type name="utf8" c:type="const char*"/>
  2829. </parameter>
  2830. </parameters>
  2831. </virtual-method>
  2832. <virtual-method name="should_show" invoker="should_show">
  2833. <doc xml:space="preserve">Checks if the application info should be shown in menus that
  2834. list available applications.</doc>
  2835. <return-value transfer-ownership="none">
  2836. <doc xml:space="preserve">%TRUE if the @appinfo should be shown, %FALSE otherwise.</doc>
  2837. <type name="gboolean" c:type="gboolean"/>
  2838. </return-value>
  2839. <parameters>
  2840. <instance-parameter name="appinfo" transfer-ownership="none">
  2841. <doc xml:space="preserve">a #GAppInfo.</doc>
  2842. <type name="AppInfo" c:type="GAppInfo*"/>
  2843. </instance-parameter>
  2844. </parameters>
  2845. </virtual-method>
  2846. <virtual-method name="supports_files" invoker="supports_files">
  2847. <doc xml:space="preserve">Checks if the application accepts files as arguments.</doc>
  2848. <return-value transfer-ownership="none">
  2849. <doc xml:space="preserve">%TRUE if the @appinfo supports files.</doc>
  2850. <type name="gboolean" c:type="gboolean"/>
  2851. </return-value>
  2852. <parameters>
  2853. <instance-parameter name="appinfo" transfer-ownership="none">
  2854. <doc xml:space="preserve">a #GAppInfo.</doc>
  2855. <type name="AppInfo" c:type="GAppInfo*"/>
  2856. </instance-parameter>
  2857. </parameters>
  2858. </virtual-method>
  2859. <virtual-method name="supports_uris" invoker="supports_uris">
  2860. <doc xml:space="preserve">Checks if the application supports reading files and directories from URIs.</doc>
  2861. <return-value transfer-ownership="none">
  2862. <doc xml:space="preserve">%TRUE if the @appinfo supports URIs.</doc>
  2863. <type name="gboolean" c:type="gboolean"/>
  2864. </return-value>
  2865. <parameters>
  2866. <instance-parameter name="appinfo" transfer-ownership="none">
  2867. <doc xml:space="preserve">a #GAppInfo.</doc>
  2868. <type name="AppInfo" c:type="GAppInfo*"/>
  2869. </instance-parameter>
  2870. </parameters>
  2871. </virtual-method>
  2872. <method name="add_supports_type"
  2873. c:identifier="g_app_info_add_supports_type"
  2874. throws="1">
  2875. <doc xml:space="preserve">Adds a content type to the application information to indicate the
  2876. application is capable of opening files with the given content type.</doc>
  2877. <return-value transfer-ownership="none">
  2878. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  2879. <type name="gboolean" c:type="gboolean"/>
  2880. </return-value>
  2881. <parameters>
  2882. <instance-parameter name="appinfo" transfer-ownership="none">
  2883. <doc xml:space="preserve">a #GAppInfo.</doc>
  2884. <type name="AppInfo" c:type="GAppInfo*"/>
  2885. </instance-parameter>
  2886. <parameter name="content_type" transfer-ownership="none">
  2887. <doc xml:space="preserve">a string.</doc>
  2888. <type name="utf8" c:type="const char*"/>
  2889. </parameter>
  2890. </parameters>
  2891. </method>
  2892. <method name="can_delete"
  2893. c:identifier="g_app_info_can_delete"
  2894. version="2.20">
  2895. <doc xml:space="preserve">Obtains the information whether the #GAppInfo can be deleted.
  2896. See g_app_info_delete().</doc>
  2897. <return-value transfer-ownership="none">
  2898. <doc xml:space="preserve">%TRUE if @appinfo can be deleted</doc>
  2899. <type name="gboolean" c:type="gboolean"/>
  2900. </return-value>
  2901. <parameters>
  2902. <instance-parameter name="appinfo" transfer-ownership="none">
  2903. <doc xml:space="preserve">a #GAppInfo</doc>
  2904. <type name="AppInfo" c:type="GAppInfo*"/>
  2905. </instance-parameter>
  2906. </parameters>
  2907. </method>
  2908. <method name="can_remove_supports_type"
  2909. c:identifier="g_app_info_can_remove_supports_type">
  2910. <doc xml:space="preserve">Checks if a supported content type can be removed from an application.</doc>
  2911. <return-value transfer-ownership="none">
  2912. <doc xml:space="preserve">%TRUE if it is possible to remove supported
  2913. content types from a given @appinfo, %FALSE if not.</doc>
  2914. <type name="gboolean" c:type="gboolean"/>
  2915. </return-value>
  2916. <parameters>
  2917. <instance-parameter name="appinfo" transfer-ownership="none">
  2918. <doc xml:space="preserve">a #GAppInfo.</doc>
  2919. <type name="AppInfo" c:type="GAppInfo*"/>
  2920. </instance-parameter>
  2921. </parameters>
  2922. </method>
  2923. <method name="delete" c:identifier="g_app_info_delete" version="2.20">
  2924. <doc xml:space="preserve">Tries to delete a #GAppInfo.
  2925. On some platforms, there may be a difference between user-defined
  2926. #GAppInfos which can be deleted, and system-wide ones which cannot.
  2927. See g_app_info_can_delete().</doc>
  2928. <return-value transfer-ownership="none">
  2929. <doc xml:space="preserve">%TRUE if @appinfo has been deleted</doc>
  2930. <type name="gboolean" c:type="gboolean"/>
  2931. </return-value>
  2932. <parameters>
  2933. <instance-parameter name="appinfo" transfer-ownership="none">
  2934. <doc xml:space="preserve">a #GAppInfo</doc>
  2935. <type name="AppInfo" c:type="GAppInfo*"/>
  2936. </instance-parameter>
  2937. </parameters>
  2938. </method>
  2939. <method name="dup" c:identifier="g_app_info_dup">
  2940. <doc xml:space="preserve">Creates a duplicate of a #GAppInfo.</doc>
  2941. <return-value transfer-ownership="full">
  2942. <doc xml:space="preserve">a duplicate of @appinfo.</doc>
  2943. <type name="AppInfo" c:type="GAppInfo*"/>
  2944. </return-value>
  2945. <parameters>
  2946. <instance-parameter name="appinfo" transfer-ownership="none">
  2947. <doc xml:space="preserve">a #GAppInfo.</doc>
  2948. <type name="AppInfo" c:type="GAppInfo*"/>
  2949. </instance-parameter>
  2950. </parameters>
  2951. </method>
  2952. <method name="equal" c:identifier="g_app_info_equal">
  2953. <doc xml:space="preserve">Checks if two #GAppInfos are equal.</doc>
  2954. <return-value transfer-ownership="none">
  2955. <doc xml:space="preserve">%TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.</doc>
  2956. <type name="gboolean" c:type="gboolean"/>
  2957. </return-value>
  2958. <parameters>
  2959. <instance-parameter name="appinfo1" transfer-ownership="none">
  2960. <doc xml:space="preserve">the first #GAppInfo.</doc>
  2961. <type name="AppInfo" c:type="GAppInfo*"/>
  2962. </instance-parameter>
  2963. <parameter name="appinfo2" transfer-ownership="none">
  2964. <doc xml:space="preserve">the second #GAppInfo.</doc>
  2965. <type name="AppInfo" c:type="GAppInfo*"/>
  2966. </parameter>
  2967. </parameters>
  2968. </method>
  2969. <method name="get_commandline"
  2970. c:identifier="g_app_info_get_commandline"
  2971. version="2.20">
  2972. <doc xml:space="preserve">Gets the commandline with which the application will be
  2973. started.</doc>
  2974. <return-value transfer-ownership="none">
  2975. <doc xml:space="preserve">a string containing the @appinfo's commandline,
  2976. or %NULL if this information is not available</doc>
  2977. <type name="utf8" c:type="const char*"/>
  2978. </return-value>
  2979. <parameters>
  2980. <instance-parameter name="appinfo" transfer-ownership="none">
  2981. <doc xml:space="preserve">a #GAppInfo</doc>
  2982. <type name="AppInfo" c:type="GAppInfo*"/>
  2983. </instance-parameter>
  2984. </parameters>
  2985. </method>
  2986. <method name="get_description" c:identifier="g_app_info_get_description">
  2987. <doc xml:space="preserve">Gets a human-readable description of an installed application.</doc>
  2988. <return-value transfer-ownership="none">
  2989. <doc xml:space="preserve">a string containing a description of the
  2990. application @appinfo, or %NULL if none.</doc>
  2991. <type name="utf8" c:type="const char*"/>
  2992. </return-value>
  2993. <parameters>
  2994. <instance-parameter name="appinfo" transfer-ownership="none">
  2995. <doc xml:space="preserve">a #GAppInfo.</doc>
  2996. <type name="AppInfo" c:type="GAppInfo*"/>
  2997. </instance-parameter>
  2998. </parameters>
  2999. </method>
  3000. <method name="get_display_name"
  3001. c:identifier="g_app_info_get_display_name"
  3002. version="2.24">
  3003. <doc xml:space="preserve">Gets the display name of the application. The display name is often more
  3004. descriptive to the user than the name itself.</doc>
  3005. <return-value transfer-ownership="none">
  3006. <doc xml:space="preserve">the display name of the application for @appinfo, or the name if
  3007. no display name is available.</doc>
  3008. <type name="utf8" c:type="const char*"/>
  3009. </return-value>
  3010. <parameters>
  3011. <instance-parameter name="appinfo" transfer-ownership="none">
  3012. <doc xml:space="preserve">a #GAppInfo.</doc>
  3013. <type name="AppInfo" c:type="GAppInfo*"/>
  3014. </instance-parameter>
  3015. </parameters>
  3016. </method>
  3017. <method name="get_executable" c:identifier="g_app_info_get_executable">
  3018. <doc xml:space="preserve">Gets the executable's name for the installed application.</doc>
  3019. <return-value transfer-ownership="none">
  3020. <doc xml:space="preserve">a string containing the @appinfo's application
  3021. binaries name</doc>
  3022. <type name="utf8" c:type="const char*"/>
  3023. </return-value>
  3024. <parameters>
  3025. <instance-parameter name="appinfo" transfer-ownership="none">
  3026. <doc xml:space="preserve">a #GAppInfo</doc>
  3027. <type name="AppInfo" c:type="GAppInfo*"/>
  3028. </instance-parameter>
  3029. </parameters>
  3030. </method>
  3031. <method name="get_icon" c:identifier="g_app_info_get_icon">
  3032. <doc xml:space="preserve">Gets the icon for the application.</doc>
  3033. <return-value transfer-ownership="none">
  3034. <doc xml:space="preserve">the default #GIcon for @appinfo or %NULL
  3035. if there is no default icon.</doc>
  3036. <type name="Icon" c:type="GIcon*"/>
  3037. </return-value>
  3038. <parameters>
  3039. <instance-parameter name="appinfo" transfer-ownership="none">
  3040. <doc xml:space="preserve">a #GAppInfo.</doc>
  3041. <type name="AppInfo" c:type="GAppInfo*"/>
  3042. </instance-parameter>
  3043. </parameters>
  3044. </method>
  3045. <method name="get_id" c:identifier="g_app_info_get_id">
  3046. <doc xml:space="preserve">Gets the ID of an application. An id is a string that
  3047. identifies the application. The exact format of the id is
  3048. platform dependent. For instance, on Unix this is the
  3049. desktop file id from the xdg menu specification.
  3050. Note that the returned ID may be %NULL, depending on how
  3051. the @appinfo has been constructed.</doc>
  3052. <return-value transfer-ownership="none">
  3053. <doc xml:space="preserve">a string containing the application's ID.</doc>
  3054. <type name="utf8" c:type="const char*"/>
  3055. </return-value>
  3056. <parameters>
  3057. <instance-parameter name="appinfo" transfer-ownership="none">
  3058. <doc xml:space="preserve">a #GAppInfo.</doc>
  3059. <type name="AppInfo" c:type="GAppInfo*"/>
  3060. </instance-parameter>
  3061. </parameters>
  3062. </method>
  3063. <method name="get_name" c:identifier="g_app_info_get_name">
  3064. <doc xml:space="preserve">Gets the installed name of the application.</doc>
  3065. <return-value transfer-ownership="none">
  3066. <doc xml:space="preserve">the name of the application for @appinfo.</doc>
  3067. <type name="utf8" c:type="const char*"/>
  3068. </return-value>
  3069. <parameters>
  3070. <instance-parameter name="appinfo" transfer-ownership="none">
  3071. <doc xml:space="preserve">a #GAppInfo.</doc>
  3072. <type name="AppInfo" c:type="GAppInfo*"/>
  3073. </instance-parameter>
  3074. </parameters>
  3075. </method>
  3076. <method name="get_supported_types"
  3077. c:identifier="g_app_info_get_supported_types"
  3078. version="2.34">
  3079. <doc xml:space="preserve">Retrieves the list of content types that @app_info claims to support.
  3080. If this information is not provided by the environment, this function
  3081. will return %NULL.
  3082. This function does not take in consideration associations added with
  3083. g_app_info_add_supports_type(), but only those exported directly by
  3084. the application.</doc>
  3085. <return-value transfer-ownership="none">
  3086. <doc xml:space="preserve">
  3087. a list of content types.</doc>
  3088. <array c:type="char**">
  3089. <type name="utf8"/>
  3090. </array>
  3091. </return-value>
  3092. <parameters>
  3093. <instance-parameter name="appinfo" transfer-ownership="none">
  3094. <doc xml:space="preserve">a #GAppInfo that can handle files</doc>
  3095. <type name="AppInfo" c:type="GAppInfo*"/>
  3096. </instance-parameter>
  3097. </parameters>
  3098. </method>
  3099. <method name="launch" c:identifier="g_app_info_launch" throws="1">
  3100. <doc xml:space="preserve">Launches the application. Passes @files to the launched application
  3101. as arguments, using the optional @launch_context to get information
  3102. about the details of the launcher (like what screen it is on).
  3103. On error, @error will be set accordingly.
  3104. To launch the application without arguments pass a %NULL @files list.
  3105. Note that even if the launch is successful the application launched
  3106. can fail to start if it runs into problems during startup. There is
  3107. no way to detect this.
  3108. Some URIs can be changed when passed through a GFile (for instance
  3109. unsupported URIs with strange formats like mailto:), so if you have
  3110. a textual URI you want to pass in as argument, consider using
  3111. g_app_info_launch_uris() instead.
  3112. The launched application inherits the environment of the launching
  3113. process, but it can be modified with g_app_launch_context_setenv()
  3114. and g_app_launch_context_unsetenv().
  3115. On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE`
  3116. environment variable with the path of the launched desktop file and
  3117. `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched
  3118. process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`,
  3119. should it be inherited by further processes. The `DISPLAY` and
  3120. `DESKTOP_STARTUP_ID` environment variables are also set, based
  3121. on information provided in @launch_context.</doc>
  3122. <return-value transfer-ownership="none">
  3123. <doc xml:space="preserve">%TRUE on successful launch, %FALSE otherwise.</doc>
  3124. <type name="gboolean" c:type="gboolean"/>
  3125. </return-value>
  3126. <parameters>
  3127. <instance-parameter name="appinfo" transfer-ownership="none">
  3128. <doc xml:space="preserve">a #GAppInfo</doc>
  3129. <type name="AppInfo" c:type="GAppInfo*"/>
  3130. </instance-parameter>
  3131. <parameter name="files"
  3132. transfer-ownership="none"
  3133. nullable="1"
  3134. allow-none="1">
  3135. <doc xml:space="preserve">a #GList of #GFile objects</doc>
  3136. <type name="GLib.List" c:type="GList*">
  3137. <type name="File"/>
  3138. </type>
  3139. </parameter>
  3140. <parameter name="launch_context"
  3141. transfer-ownership="none"
  3142. nullable="1"
  3143. allow-none="1">
  3144. <doc xml:space="preserve">a #GAppLaunchContext or %NULL</doc>
  3145. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3146. </parameter>
  3147. </parameters>
  3148. </method>
  3149. <method name="launch_uris"
  3150. c:identifier="g_app_info_launch_uris"
  3151. throws="1">
  3152. <doc xml:space="preserve">Launches the application. This passes the @uris to the launched application
  3153. as arguments, using the optional @launch_context to get information
  3154. about the details of the launcher (like what screen it is on).
  3155. On error, @error will be set accordingly.
  3156. To launch the application without arguments pass a %NULL @uris list.
  3157. Note that even if the launch is successful the application launched
  3158. can fail to start if it runs into problems during startup. There is
  3159. no way to detect this.</doc>
  3160. <return-value transfer-ownership="none">
  3161. <doc xml:space="preserve">%TRUE on successful launch, %FALSE otherwise.</doc>
  3162. <type name="gboolean" c:type="gboolean"/>
  3163. </return-value>
  3164. <parameters>
  3165. <instance-parameter name="appinfo" transfer-ownership="none">
  3166. <doc xml:space="preserve">a #GAppInfo</doc>
  3167. <type name="AppInfo" c:type="GAppInfo*"/>
  3168. </instance-parameter>
  3169. <parameter name="uris"
  3170. transfer-ownership="none"
  3171. nullable="1"
  3172. allow-none="1">
  3173. <doc xml:space="preserve">a #GList containing URIs to launch.</doc>
  3174. <type name="GLib.List" c:type="GList*">
  3175. <type name="utf8"/>
  3176. </type>
  3177. </parameter>
  3178. <parameter name="launch_context"
  3179. transfer-ownership="none"
  3180. nullable="1"
  3181. allow-none="1">
  3182. <doc xml:space="preserve">a #GAppLaunchContext or %NULL</doc>
  3183. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3184. </parameter>
  3185. </parameters>
  3186. </method>
  3187. <method name="remove_supports_type"
  3188. c:identifier="g_app_info_remove_supports_type"
  3189. throws="1">
  3190. <doc xml:space="preserve">Removes a supported type from an application, if possible.</doc>
  3191. <return-value transfer-ownership="none">
  3192. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3193. <type name="gboolean" c:type="gboolean"/>
  3194. </return-value>
  3195. <parameters>
  3196. <instance-parameter name="appinfo" transfer-ownership="none">
  3197. <doc xml:space="preserve">a #GAppInfo.</doc>
  3198. <type name="AppInfo" c:type="GAppInfo*"/>
  3199. </instance-parameter>
  3200. <parameter name="content_type" transfer-ownership="none">
  3201. <doc xml:space="preserve">a string.</doc>
  3202. <type name="utf8" c:type="const char*"/>
  3203. </parameter>
  3204. </parameters>
  3205. </method>
  3206. <method name="set_as_default_for_extension"
  3207. c:identifier="g_app_info_set_as_default_for_extension"
  3208. throws="1">
  3209. <doc xml:space="preserve">Sets the application as the default handler for the given file extension.</doc>
  3210. <return-value transfer-ownership="none">
  3211. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3212. <type name="gboolean" c:type="gboolean"/>
  3213. </return-value>
  3214. <parameters>
  3215. <instance-parameter name="appinfo" transfer-ownership="none">
  3216. <doc xml:space="preserve">a #GAppInfo.</doc>
  3217. <type name="AppInfo" c:type="GAppInfo*"/>
  3218. </instance-parameter>
  3219. <parameter name="extension" transfer-ownership="none">
  3220. <doc xml:space="preserve">a string containing the file extension (without the dot).</doc>
  3221. <type name="utf8" c:type="const char*"/>
  3222. </parameter>
  3223. </parameters>
  3224. </method>
  3225. <method name="set_as_default_for_type"
  3226. c:identifier="g_app_info_set_as_default_for_type"
  3227. throws="1">
  3228. <doc xml:space="preserve">Sets the application as the default handler for a given type.</doc>
  3229. <return-value transfer-ownership="none">
  3230. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3231. <type name="gboolean" c:type="gboolean"/>
  3232. </return-value>
  3233. <parameters>
  3234. <instance-parameter name="appinfo" transfer-ownership="none">
  3235. <doc xml:space="preserve">a #GAppInfo.</doc>
  3236. <type name="AppInfo" c:type="GAppInfo*"/>
  3237. </instance-parameter>
  3238. <parameter name="content_type" transfer-ownership="none">
  3239. <doc xml:space="preserve">the content type.</doc>
  3240. <type name="utf8" c:type="const char*"/>
  3241. </parameter>
  3242. </parameters>
  3243. </method>
  3244. <method name="set_as_last_used_for_type"
  3245. c:identifier="g_app_info_set_as_last_used_for_type"
  3246. throws="1">
  3247. <doc xml:space="preserve">Sets the application as the last used application for a given type.
  3248. This will make the application appear as first in the list returned
  3249. by g_app_info_get_recommended_for_type(), regardless of the default
  3250. application for that content type.</doc>
  3251. <return-value transfer-ownership="none">
  3252. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3253. <type name="gboolean" c:type="gboolean"/>
  3254. </return-value>
  3255. <parameters>
  3256. <instance-parameter name="appinfo" transfer-ownership="none">
  3257. <doc xml:space="preserve">a #GAppInfo.</doc>
  3258. <type name="AppInfo" c:type="GAppInfo*"/>
  3259. </instance-parameter>
  3260. <parameter name="content_type" transfer-ownership="none">
  3261. <doc xml:space="preserve">the content type.</doc>
  3262. <type name="utf8" c:type="const char*"/>
  3263. </parameter>
  3264. </parameters>
  3265. </method>
  3266. <method name="should_show" c:identifier="g_app_info_should_show">
  3267. <doc xml:space="preserve">Checks if the application info should be shown in menus that
  3268. list available applications.</doc>
  3269. <return-value transfer-ownership="none">
  3270. <doc xml:space="preserve">%TRUE if the @appinfo should be shown, %FALSE otherwise.</doc>
  3271. <type name="gboolean" c:type="gboolean"/>
  3272. </return-value>
  3273. <parameters>
  3274. <instance-parameter name="appinfo" transfer-ownership="none">
  3275. <doc xml:space="preserve">a #GAppInfo.</doc>
  3276. <type name="AppInfo" c:type="GAppInfo*"/>
  3277. </instance-parameter>
  3278. </parameters>
  3279. </method>
  3280. <method name="supports_files" c:identifier="g_app_info_supports_files">
  3281. <doc xml:space="preserve">Checks if the application accepts files as arguments.</doc>
  3282. <return-value transfer-ownership="none">
  3283. <doc xml:space="preserve">%TRUE if the @appinfo supports files.</doc>
  3284. <type name="gboolean" c:type="gboolean"/>
  3285. </return-value>
  3286. <parameters>
  3287. <instance-parameter name="appinfo" transfer-ownership="none">
  3288. <doc xml:space="preserve">a #GAppInfo.</doc>
  3289. <type name="AppInfo" c:type="GAppInfo*"/>
  3290. </instance-parameter>
  3291. </parameters>
  3292. </method>
  3293. <method name="supports_uris" c:identifier="g_app_info_supports_uris">
  3294. <doc xml:space="preserve">Checks if the application supports reading files and directories from URIs.</doc>
  3295. <return-value transfer-ownership="none">
  3296. <doc xml:space="preserve">%TRUE if the @appinfo supports URIs.</doc>
  3297. <type name="gboolean" c:type="gboolean"/>
  3298. </return-value>
  3299. <parameters>
  3300. <instance-parameter name="appinfo" transfer-ownership="none">
  3301. <doc xml:space="preserve">a #GAppInfo.</doc>
  3302. <type name="AppInfo" c:type="GAppInfo*"/>
  3303. </instance-parameter>
  3304. </parameters>
  3305. </method>
  3306. </interface>
  3307. <bitfield name="AppInfoCreateFlags"
  3308. glib:type-name="GAppInfoCreateFlags"
  3309. glib:get-type="g_app_info_create_flags_get_type"
  3310. c:type="GAppInfoCreateFlags">
  3311. <doc xml:space="preserve">Flags used when creating a #GAppInfo.</doc>
  3312. <member name="none"
  3313. value="0"
  3314. c:identifier="G_APP_INFO_CREATE_NONE"
  3315. glib:nick="none">
  3316. <doc xml:space="preserve">No flags.</doc>
  3317. </member>
  3318. <member name="needs_terminal"
  3319. value="1"
  3320. c:identifier="G_APP_INFO_CREATE_NEEDS_TERMINAL"
  3321. glib:nick="needs-terminal">
  3322. <doc xml:space="preserve">Application opens in a terminal window.</doc>
  3323. </member>
  3324. <member name="supports_uris"
  3325. value="2"
  3326. c:identifier="G_APP_INFO_CREATE_SUPPORTS_URIS"
  3327. glib:nick="supports-uris">
  3328. <doc xml:space="preserve">Application supports URI arguments.</doc>
  3329. </member>
  3330. <member name="supports_startup_notification"
  3331. value="4"
  3332. c:identifier="G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION"
  3333. glib:nick="supports-startup-notification">
  3334. <doc xml:space="preserve">Application supports startup notification. Since 2.26</doc>
  3335. </member>
  3336. </bitfield>
  3337. <record name="AppInfoIface"
  3338. c:type="GAppInfoIface"
  3339. glib:is-gtype-struct-for="AppInfo">
  3340. <doc xml:space="preserve">Application Information interface, for operating system portability.</doc>
  3341. <field name="g_iface">
  3342. <doc xml:space="preserve">The parent interface.</doc>
  3343. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  3344. </field>
  3345. <field name="dup">
  3346. <callback name="dup">
  3347. <return-value transfer-ownership="full">
  3348. <doc xml:space="preserve">a duplicate of @appinfo.</doc>
  3349. <type name="AppInfo" c:type="GAppInfo*"/>
  3350. </return-value>
  3351. <parameters>
  3352. <parameter name="appinfo" transfer-ownership="none">
  3353. <doc xml:space="preserve">a #GAppInfo.</doc>
  3354. <type name="AppInfo" c:type="GAppInfo*"/>
  3355. </parameter>
  3356. </parameters>
  3357. </callback>
  3358. </field>
  3359. <field name="equal">
  3360. <callback name="equal">
  3361. <return-value transfer-ownership="none">
  3362. <doc xml:space="preserve">%TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.</doc>
  3363. <type name="gboolean" c:type="gboolean"/>
  3364. </return-value>
  3365. <parameters>
  3366. <parameter name="appinfo1" transfer-ownership="none">
  3367. <doc xml:space="preserve">the first #GAppInfo.</doc>
  3368. <type name="AppInfo" c:type="GAppInfo*"/>
  3369. </parameter>
  3370. <parameter name="appinfo2" transfer-ownership="none">
  3371. <doc xml:space="preserve">the second #GAppInfo.</doc>
  3372. <type name="AppInfo" c:type="GAppInfo*"/>
  3373. </parameter>
  3374. </parameters>
  3375. </callback>
  3376. </field>
  3377. <field name="get_id">
  3378. <callback name="get_id">
  3379. <return-value transfer-ownership="none">
  3380. <doc xml:space="preserve">a string containing the application's ID.</doc>
  3381. <type name="utf8" c:type="const char*"/>
  3382. </return-value>
  3383. <parameters>
  3384. <parameter name="appinfo" transfer-ownership="none">
  3385. <doc xml:space="preserve">a #GAppInfo.</doc>
  3386. <type name="AppInfo" c:type="GAppInfo*"/>
  3387. </parameter>
  3388. </parameters>
  3389. </callback>
  3390. </field>
  3391. <field name="get_name">
  3392. <callback name="get_name">
  3393. <return-value transfer-ownership="none">
  3394. <doc xml:space="preserve">the name of the application for @appinfo.</doc>
  3395. <type name="utf8" c:type="const char*"/>
  3396. </return-value>
  3397. <parameters>
  3398. <parameter name="appinfo" transfer-ownership="none">
  3399. <doc xml:space="preserve">a #GAppInfo.</doc>
  3400. <type name="AppInfo" c:type="GAppInfo*"/>
  3401. </parameter>
  3402. </parameters>
  3403. </callback>
  3404. </field>
  3405. <field name="get_description">
  3406. <callback name="get_description">
  3407. <return-value transfer-ownership="none">
  3408. <doc xml:space="preserve">a string containing a description of the
  3409. application @appinfo, or %NULL if none.</doc>
  3410. <type name="utf8" c:type="const char*"/>
  3411. </return-value>
  3412. <parameters>
  3413. <parameter name="appinfo" transfer-ownership="none">
  3414. <doc xml:space="preserve">a #GAppInfo.</doc>
  3415. <type name="AppInfo" c:type="GAppInfo*"/>
  3416. </parameter>
  3417. </parameters>
  3418. </callback>
  3419. </field>
  3420. <field name="get_executable">
  3421. <callback name="get_executable">
  3422. <return-value transfer-ownership="none">
  3423. <doc xml:space="preserve">a string containing the @appinfo's application
  3424. binaries name</doc>
  3425. <type name="utf8" c:type="const char*"/>
  3426. </return-value>
  3427. <parameters>
  3428. <parameter name="appinfo" transfer-ownership="none">
  3429. <doc xml:space="preserve">a #GAppInfo</doc>
  3430. <type name="AppInfo" c:type="GAppInfo*"/>
  3431. </parameter>
  3432. </parameters>
  3433. </callback>
  3434. </field>
  3435. <field name="get_icon">
  3436. <callback name="get_icon">
  3437. <return-value transfer-ownership="none">
  3438. <doc xml:space="preserve">the default #GIcon for @appinfo or %NULL
  3439. if there is no default icon.</doc>
  3440. <type name="Icon" c:type="GIcon*"/>
  3441. </return-value>
  3442. <parameters>
  3443. <parameter name="appinfo" transfer-ownership="none">
  3444. <doc xml:space="preserve">a #GAppInfo.</doc>
  3445. <type name="AppInfo" c:type="GAppInfo*"/>
  3446. </parameter>
  3447. </parameters>
  3448. </callback>
  3449. </field>
  3450. <field name="launch">
  3451. <callback name="launch" throws="1">
  3452. <return-value transfer-ownership="none">
  3453. <doc xml:space="preserve">%TRUE on successful launch, %FALSE otherwise.</doc>
  3454. <type name="gboolean" c:type="gboolean"/>
  3455. </return-value>
  3456. <parameters>
  3457. <parameter name="appinfo" transfer-ownership="none">
  3458. <doc xml:space="preserve">a #GAppInfo</doc>
  3459. <type name="AppInfo" c:type="GAppInfo*"/>
  3460. </parameter>
  3461. <parameter name="files"
  3462. transfer-ownership="none"
  3463. nullable="1"
  3464. allow-none="1">
  3465. <doc xml:space="preserve">a #GList of #GFile objects</doc>
  3466. <type name="GLib.List" c:type="GList*">
  3467. <type name="File"/>
  3468. </type>
  3469. </parameter>
  3470. <parameter name="launch_context"
  3471. transfer-ownership="none"
  3472. nullable="1"
  3473. allow-none="1">
  3474. <doc xml:space="preserve">a #GAppLaunchContext or %NULL</doc>
  3475. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3476. </parameter>
  3477. </parameters>
  3478. </callback>
  3479. </field>
  3480. <field name="supports_uris">
  3481. <callback name="supports_uris">
  3482. <return-value transfer-ownership="none">
  3483. <doc xml:space="preserve">%TRUE if the @appinfo supports URIs.</doc>
  3484. <type name="gboolean" c:type="gboolean"/>
  3485. </return-value>
  3486. <parameters>
  3487. <parameter name="appinfo" transfer-ownership="none">
  3488. <doc xml:space="preserve">a #GAppInfo.</doc>
  3489. <type name="AppInfo" c:type="GAppInfo*"/>
  3490. </parameter>
  3491. </parameters>
  3492. </callback>
  3493. </field>
  3494. <field name="supports_files">
  3495. <callback name="supports_files">
  3496. <return-value transfer-ownership="none">
  3497. <doc xml:space="preserve">%TRUE if the @appinfo supports files.</doc>
  3498. <type name="gboolean" c:type="gboolean"/>
  3499. </return-value>
  3500. <parameters>
  3501. <parameter name="appinfo" transfer-ownership="none">
  3502. <doc xml:space="preserve">a #GAppInfo.</doc>
  3503. <type name="AppInfo" c:type="GAppInfo*"/>
  3504. </parameter>
  3505. </parameters>
  3506. </callback>
  3507. </field>
  3508. <field name="launch_uris">
  3509. <callback name="launch_uris" throws="1">
  3510. <return-value transfer-ownership="none">
  3511. <doc xml:space="preserve">%TRUE on successful launch, %FALSE otherwise.</doc>
  3512. <type name="gboolean" c:type="gboolean"/>
  3513. </return-value>
  3514. <parameters>
  3515. <parameter name="appinfo" transfer-ownership="none">
  3516. <doc xml:space="preserve">a #GAppInfo</doc>
  3517. <type name="AppInfo" c:type="GAppInfo*"/>
  3518. </parameter>
  3519. <parameter name="uris"
  3520. transfer-ownership="none"
  3521. nullable="1"
  3522. allow-none="1">
  3523. <doc xml:space="preserve">a #GList containing URIs to launch.</doc>
  3524. <type name="GLib.List" c:type="GList*">
  3525. <type name="utf8"/>
  3526. </type>
  3527. </parameter>
  3528. <parameter name="launch_context"
  3529. transfer-ownership="none"
  3530. nullable="1"
  3531. allow-none="1">
  3532. <doc xml:space="preserve">a #GAppLaunchContext or %NULL</doc>
  3533. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3534. </parameter>
  3535. </parameters>
  3536. </callback>
  3537. </field>
  3538. <field name="should_show">
  3539. <callback name="should_show">
  3540. <return-value transfer-ownership="none">
  3541. <doc xml:space="preserve">%TRUE if the @appinfo should be shown, %FALSE otherwise.</doc>
  3542. <type name="gboolean" c:type="gboolean"/>
  3543. </return-value>
  3544. <parameters>
  3545. <parameter name="appinfo" transfer-ownership="none">
  3546. <doc xml:space="preserve">a #GAppInfo.</doc>
  3547. <type name="AppInfo" c:type="GAppInfo*"/>
  3548. </parameter>
  3549. </parameters>
  3550. </callback>
  3551. </field>
  3552. <field name="set_as_default_for_type">
  3553. <callback name="set_as_default_for_type" throws="1">
  3554. <return-value transfer-ownership="none">
  3555. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3556. <type name="gboolean" c:type="gboolean"/>
  3557. </return-value>
  3558. <parameters>
  3559. <parameter name="appinfo" transfer-ownership="none">
  3560. <doc xml:space="preserve">a #GAppInfo.</doc>
  3561. <type name="AppInfo" c:type="GAppInfo*"/>
  3562. </parameter>
  3563. <parameter name="content_type" transfer-ownership="none">
  3564. <doc xml:space="preserve">the content type.</doc>
  3565. <type name="utf8" c:type="const char*"/>
  3566. </parameter>
  3567. </parameters>
  3568. </callback>
  3569. </field>
  3570. <field name="set_as_default_for_extension">
  3571. <callback name="set_as_default_for_extension" throws="1">
  3572. <return-value transfer-ownership="none">
  3573. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3574. <type name="gboolean" c:type="gboolean"/>
  3575. </return-value>
  3576. <parameters>
  3577. <parameter name="appinfo" transfer-ownership="none">
  3578. <doc xml:space="preserve">a #GAppInfo.</doc>
  3579. <type name="AppInfo" c:type="GAppInfo*"/>
  3580. </parameter>
  3581. <parameter name="extension" transfer-ownership="none">
  3582. <doc xml:space="preserve">a string containing the file extension (without the dot).</doc>
  3583. <type name="utf8" c:type="const char*"/>
  3584. </parameter>
  3585. </parameters>
  3586. </callback>
  3587. </field>
  3588. <field name="add_supports_type">
  3589. <callback name="add_supports_type" throws="1">
  3590. <return-value transfer-ownership="none">
  3591. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3592. <type name="gboolean" c:type="gboolean"/>
  3593. </return-value>
  3594. <parameters>
  3595. <parameter name="appinfo" transfer-ownership="none">
  3596. <doc xml:space="preserve">a #GAppInfo.</doc>
  3597. <type name="AppInfo" c:type="GAppInfo*"/>
  3598. </parameter>
  3599. <parameter name="content_type" transfer-ownership="none">
  3600. <doc xml:space="preserve">a string.</doc>
  3601. <type name="utf8" c:type="const char*"/>
  3602. </parameter>
  3603. </parameters>
  3604. </callback>
  3605. </field>
  3606. <field name="can_remove_supports_type">
  3607. <callback name="can_remove_supports_type">
  3608. <return-value transfer-ownership="none">
  3609. <doc xml:space="preserve">%TRUE if it is possible to remove supported
  3610. content types from a given @appinfo, %FALSE if not.</doc>
  3611. <type name="gboolean" c:type="gboolean"/>
  3612. </return-value>
  3613. <parameters>
  3614. <parameter name="appinfo" transfer-ownership="none">
  3615. <doc xml:space="preserve">a #GAppInfo.</doc>
  3616. <type name="AppInfo" c:type="GAppInfo*"/>
  3617. </parameter>
  3618. </parameters>
  3619. </callback>
  3620. </field>
  3621. <field name="remove_supports_type">
  3622. <callback name="remove_supports_type" throws="1">
  3623. <return-value transfer-ownership="none">
  3624. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3625. <type name="gboolean" c:type="gboolean"/>
  3626. </return-value>
  3627. <parameters>
  3628. <parameter name="appinfo" transfer-ownership="none">
  3629. <doc xml:space="preserve">a #GAppInfo.</doc>
  3630. <type name="AppInfo" c:type="GAppInfo*"/>
  3631. </parameter>
  3632. <parameter name="content_type" transfer-ownership="none">
  3633. <doc xml:space="preserve">a string.</doc>
  3634. <type name="utf8" c:type="const char*"/>
  3635. </parameter>
  3636. </parameters>
  3637. </callback>
  3638. </field>
  3639. <field name="can_delete">
  3640. <callback name="can_delete">
  3641. <return-value transfer-ownership="none">
  3642. <doc xml:space="preserve">%TRUE if @appinfo can be deleted</doc>
  3643. <type name="gboolean" c:type="gboolean"/>
  3644. </return-value>
  3645. <parameters>
  3646. <parameter name="appinfo" transfer-ownership="none">
  3647. <doc xml:space="preserve">a #GAppInfo</doc>
  3648. <type name="AppInfo" c:type="GAppInfo*"/>
  3649. </parameter>
  3650. </parameters>
  3651. </callback>
  3652. </field>
  3653. <field name="do_delete">
  3654. <callback name="do_delete">
  3655. <return-value transfer-ownership="none">
  3656. <doc xml:space="preserve">%TRUE if @appinfo has been deleted</doc>
  3657. <type name="gboolean" c:type="gboolean"/>
  3658. </return-value>
  3659. <parameters>
  3660. <parameter name="appinfo" transfer-ownership="none">
  3661. <doc xml:space="preserve">a #GAppInfo</doc>
  3662. <type name="AppInfo" c:type="GAppInfo*"/>
  3663. </parameter>
  3664. </parameters>
  3665. </callback>
  3666. </field>
  3667. <field name="get_commandline">
  3668. <callback name="get_commandline">
  3669. <return-value transfer-ownership="none">
  3670. <doc xml:space="preserve">a string containing the @appinfo's commandline,
  3671. or %NULL if this information is not available</doc>
  3672. <type name="utf8" c:type="const char*"/>
  3673. </return-value>
  3674. <parameters>
  3675. <parameter name="appinfo" transfer-ownership="none">
  3676. <doc xml:space="preserve">a #GAppInfo</doc>
  3677. <type name="AppInfo" c:type="GAppInfo*"/>
  3678. </parameter>
  3679. </parameters>
  3680. </callback>
  3681. </field>
  3682. <field name="get_display_name">
  3683. <callback name="get_display_name">
  3684. <return-value transfer-ownership="none">
  3685. <doc xml:space="preserve">the display name of the application for @appinfo, or the name if
  3686. no display name is available.</doc>
  3687. <type name="utf8" c:type="const char*"/>
  3688. </return-value>
  3689. <parameters>
  3690. <parameter name="appinfo" transfer-ownership="none">
  3691. <doc xml:space="preserve">a #GAppInfo.</doc>
  3692. <type name="AppInfo" c:type="GAppInfo*"/>
  3693. </parameter>
  3694. </parameters>
  3695. </callback>
  3696. </field>
  3697. <field name="set_as_last_used_for_type">
  3698. <callback name="set_as_last_used_for_type" throws="1">
  3699. <return-value transfer-ownership="none">
  3700. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  3701. <type name="gboolean" c:type="gboolean"/>
  3702. </return-value>
  3703. <parameters>
  3704. <parameter name="appinfo" transfer-ownership="none">
  3705. <doc xml:space="preserve">a #GAppInfo.</doc>
  3706. <type name="AppInfo" c:type="GAppInfo*"/>
  3707. </parameter>
  3708. <parameter name="content_type" transfer-ownership="none">
  3709. <doc xml:space="preserve">the content type.</doc>
  3710. <type name="utf8" c:type="const char*"/>
  3711. </parameter>
  3712. </parameters>
  3713. </callback>
  3714. </field>
  3715. <field name="get_supported_types">
  3716. <callback name="get_supported_types">
  3717. <return-value transfer-ownership="none">
  3718. <doc xml:space="preserve">
  3719. a list of content types.</doc>
  3720. <array c:type="char**">
  3721. <type name="utf8"/>
  3722. </array>
  3723. </return-value>
  3724. <parameters>
  3725. <parameter name="appinfo" transfer-ownership="none">
  3726. <doc xml:space="preserve">a #GAppInfo that can handle files</doc>
  3727. <type name="AppInfo" c:type="GAppInfo*"/>
  3728. </parameter>
  3729. </parameters>
  3730. </callback>
  3731. </field>
  3732. </record>
  3733. <class name="AppInfoMonitor"
  3734. c:symbol-prefix="app_info_monitor"
  3735. c:type="GAppInfoMonitor"
  3736. version="2.40"
  3737. parent="GObject.Object"
  3738. glib:type-name="GAppInfoMonitor"
  3739. glib:get-type="g_app_info_monitor_get_type">
  3740. <doc xml:space="preserve">#GAppInfoMonitor is a very simple object used for monitoring the app
  3741. info database for changes (ie: newly installed or removed
  3742. applications).
  3743. Call g_app_info_monitor_get() to get a #GAppInfoMonitor and connect
  3744. to the "changed" signal.
  3745. In the usual case, applications should try to make note of the change
  3746. (doing things like invalidating caches) but not act on it. In
  3747. particular, applications should avoid making calls to #GAppInfo APIs
  3748. in response to the change signal, deferring these until the time that
  3749. the data is actually required. The exception to this case is when
  3750. application information is actually being displayed on the screen
  3751. (eg: during a search or when the list of all applications is shown).
  3752. The reason for this is that changes to the list of installed
  3753. applications often come in groups (like during system updates) and
  3754. rescanning the list on every change is pointless and expensive.</doc>
  3755. <function name="get"
  3756. c:identifier="g_app_info_monitor_get"
  3757. version="2.40">
  3758. <doc xml:space="preserve">Gets the #GAppInfoMonitor for the current thread-default main
  3759. context.
  3760. The #GAppInfoMonitor will emit a "changed" signal in the
  3761. thread-default main context whenever the list of installed
  3762. applications (as reported by g_app_info_get_all()) may have changed.
  3763. You must only call g_object_unref() on the return value from under
  3764. the same main context as you created it.</doc>
  3765. <return-value transfer-ownership="full">
  3766. <doc xml:space="preserve">a reference to a #GAppInfoMonitor</doc>
  3767. <type name="AppInfoMonitor" c:type="GAppInfoMonitor*"/>
  3768. </return-value>
  3769. </function>
  3770. <glib:signal name="changed" when="first">
  3771. <doc xml:space="preserve">Signal emitted when the app info database for changes (ie: newly installed
  3772. or removed applications).</doc>
  3773. <return-value transfer-ownership="none">
  3774. <type name="none" c:type="void"/>
  3775. </return-value>
  3776. </glib:signal>
  3777. </class>
  3778. <class name="AppLaunchContext"
  3779. c:symbol-prefix="app_launch_context"
  3780. c:type="GAppLaunchContext"
  3781. parent="GObject.Object"
  3782. glib:type-name="GAppLaunchContext"
  3783. glib:get-type="g_app_launch_context_get_type"
  3784. glib:type-struct="AppLaunchContextClass">
  3785. <doc xml:space="preserve">Integrating the launch with the launching application. This is used to
  3786. handle for instance startup notification and launching the new application
  3787. on the same screen as the launching window.</doc>
  3788. <constructor name="new" c:identifier="g_app_launch_context_new">
  3789. <doc xml:space="preserve">Creates a new application launch context. This is not normally used,
  3790. instead you instantiate a subclass of this, such as #GdkAppLaunchContext.</doc>
  3791. <return-value transfer-ownership="full">
  3792. <doc xml:space="preserve">a #GAppLaunchContext.</doc>
  3793. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3794. </return-value>
  3795. </constructor>
  3796. <virtual-method name="get_display" invoker="get_display">
  3797. <doc xml:space="preserve">Gets the display string for the @context. This is used to ensure new
  3798. applications are started on the same display as the launching
  3799. application, by setting the `DISPLAY` environment variable.</doc>
  3800. <return-value transfer-ownership="full">
  3801. <doc xml:space="preserve">a display string for the display.</doc>
  3802. <type name="utf8" c:type="char*"/>
  3803. </return-value>
  3804. <parameters>
  3805. <instance-parameter name="context" transfer-ownership="none">
  3806. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  3807. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3808. </instance-parameter>
  3809. <parameter name="info" transfer-ownership="none">
  3810. <doc xml:space="preserve">a #GAppInfo</doc>
  3811. <type name="AppInfo" c:type="GAppInfo*"/>
  3812. </parameter>
  3813. <parameter name="files" transfer-ownership="none">
  3814. <doc xml:space="preserve">a #GList of #GFile objects</doc>
  3815. <type name="GLib.List" c:type="GList*">
  3816. <type name="File"/>
  3817. </type>
  3818. </parameter>
  3819. </parameters>
  3820. </virtual-method>
  3821. <virtual-method name="get_startup_notify_id"
  3822. invoker="get_startup_notify_id">
  3823. <doc xml:space="preserve">Initiates startup notification for the application and returns the
  3824. `DESKTOP_STARTUP_ID` for the launched operation, if supported.
  3825. Startup notification IDs are defined in the
  3826. [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt").</doc>
  3827. <return-value transfer-ownership="full">
  3828. <doc xml:space="preserve">a startup notification ID for the application, or %NULL if
  3829. not supported.</doc>
  3830. <type name="utf8" c:type="char*"/>
  3831. </return-value>
  3832. <parameters>
  3833. <instance-parameter name="context" transfer-ownership="none">
  3834. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  3835. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3836. </instance-parameter>
  3837. <parameter name="info" transfer-ownership="none">
  3838. <doc xml:space="preserve">a #GAppInfo</doc>
  3839. <type name="AppInfo" c:type="GAppInfo*"/>
  3840. </parameter>
  3841. <parameter name="files" transfer-ownership="none">
  3842. <doc xml:space="preserve">a #GList of of #GFile objects</doc>
  3843. <type name="GLib.List" c:type="GList*">
  3844. <type name="File"/>
  3845. </type>
  3846. </parameter>
  3847. </parameters>
  3848. </virtual-method>
  3849. <virtual-method name="launch_failed" invoker="launch_failed">
  3850. <doc xml:space="preserve">Called when an application has failed to launch, so that it can cancel
  3851. the application startup notification started in g_app_launch_context_get_startup_notify_id().</doc>
  3852. <return-value transfer-ownership="none">
  3853. <type name="none" c:type="void"/>
  3854. </return-value>
  3855. <parameters>
  3856. <instance-parameter name="context" transfer-ownership="none">
  3857. <doc xml:space="preserve">a #GAppLaunchContext.</doc>
  3858. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3859. </instance-parameter>
  3860. <parameter name="startup_notify_id" transfer-ownership="none">
  3861. <doc xml:space="preserve">the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().</doc>
  3862. <type name="utf8" c:type="const char*"/>
  3863. </parameter>
  3864. </parameters>
  3865. </virtual-method>
  3866. <virtual-method name="launched">
  3867. <return-value transfer-ownership="none">
  3868. <type name="none" c:type="void"/>
  3869. </return-value>
  3870. <parameters>
  3871. <instance-parameter name="context" transfer-ownership="none">
  3872. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3873. </instance-parameter>
  3874. <parameter name="info" transfer-ownership="none">
  3875. <type name="AppInfo" c:type="GAppInfo*"/>
  3876. </parameter>
  3877. <parameter name="platform_data" transfer-ownership="none">
  3878. <type name="GLib.Variant" c:type="GVariant*"/>
  3879. </parameter>
  3880. </parameters>
  3881. </virtual-method>
  3882. <method name="get_display"
  3883. c:identifier="g_app_launch_context_get_display">
  3884. <doc xml:space="preserve">Gets the display string for the @context. This is used to ensure new
  3885. applications are started on the same display as the launching
  3886. application, by setting the `DISPLAY` environment variable.</doc>
  3887. <return-value transfer-ownership="full">
  3888. <doc xml:space="preserve">a display string for the display.</doc>
  3889. <type name="utf8" c:type="char*"/>
  3890. </return-value>
  3891. <parameters>
  3892. <instance-parameter name="context" transfer-ownership="none">
  3893. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  3894. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3895. </instance-parameter>
  3896. <parameter name="info" transfer-ownership="none">
  3897. <doc xml:space="preserve">a #GAppInfo</doc>
  3898. <type name="AppInfo" c:type="GAppInfo*"/>
  3899. </parameter>
  3900. <parameter name="files" transfer-ownership="none">
  3901. <doc xml:space="preserve">a #GList of #GFile objects</doc>
  3902. <type name="GLib.List" c:type="GList*">
  3903. <type name="File"/>
  3904. </type>
  3905. </parameter>
  3906. </parameters>
  3907. </method>
  3908. <method name="get_environment"
  3909. c:identifier="g_app_launch_context_get_environment"
  3910. version="2.32">
  3911. <doc xml:space="preserve">Gets the complete environment variable list to be passed to
  3912. the child process when @context is used to launch an application.
  3913. This is a %NULL-terminated array of strings, where each string has
  3914. the form `KEY=VALUE`.</doc>
  3915. <return-value transfer-ownership="full">
  3916. <doc xml:space="preserve">the
  3917. child's environment</doc>
  3918. <array c:type="char**">
  3919. <type name="utf8"/>
  3920. </array>
  3921. </return-value>
  3922. <parameters>
  3923. <instance-parameter name="context" transfer-ownership="none">
  3924. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  3925. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3926. </instance-parameter>
  3927. </parameters>
  3928. </method>
  3929. <method name="get_startup_notify_id"
  3930. c:identifier="g_app_launch_context_get_startup_notify_id">
  3931. <doc xml:space="preserve">Initiates startup notification for the application and returns the
  3932. `DESKTOP_STARTUP_ID` for the launched operation, if supported.
  3933. Startup notification IDs are defined in the
  3934. [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt").</doc>
  3935. <return-value transfer-ownership="full">
  3936. <doc xml:space="preserve">a startup notification ID for the application, or %NULL if
  3937. not supported.</doc>
  3938. <type name="utf8" c:type="char*"/>
  3939. </return-value>
  3940. <parameters>
  3941. <instance-parameter name="context" transfer-ownership="none">
  3942. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  3943. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3944. </instance-parameter>
  3945. <parameter name="info" transfer-ownership="none">
  3946. <doc xml:space="preserve">a #GAppInfo</doc>
  3947. <type name="AppInfo" c:type="GAppInfo*"/>
  3948. </parameter>
  3949. <parameter name="files" transfer-ownership="none">
  3950. <doc xml:space="preserve">a #GList of of #GFile objects</doc>
  3951. <type name="GLib.List" c:type="GList*">
  3952. <type name="File"/>
  3953. </type>
  3954. </parameter>
  3955. </parameters>
  3956. </method>
  3957. <method name="launch_failed"
  3958. c:identifier="g_app_launch_context_launch_failed">
  3959. <doc xml:space="preserve">Called when an application has failed to launch, so that it can cancel
  3960. the application startup notification started in g_app_launch_context_get_startup_notify_id().</doc>
  3961. <return-value transfer-ownership="none">
  3962. <type name="none" c:type="void"/>
  3963. </return-value>
  3964. <parameters>
  3965. <instance-parameter name="context" transfer-ownership="none">
  3966. <doc xml:space="preserve">a #GAppLaunchContext.</doc>
  3967. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3968. </instance-parameter>
  3969. <parameter name="startup_notify_id" transfer-ownership="none">
  3970. <doc xml:space="preserve">the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().</doc>
  3971. <type name="utf8" c:type="const char*"/>
  3972. </parameter>
  3973. </parameters>
  3974. </method>
  3975. <method name="setenv"
  3976. c:identifier="g_app_launch_context_setenv"
  3977. version="2.32">
  3978. <doc xml:space="preserve">Arranges for @variable to be set to @value in the child's
  3979. environment when @context is used to launch an application.</doc>
  3980. <return-value transfer-ownership="none">
  3981. <type name="none" c:type="void"/>
  3982. </return-value>
  3983. <parameters>
  3984. <instance-parameter name="context" transfer-ownership="none">
  3985. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  3986. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  3987. </instance-parameter>
  3988. <parameter name="variable" transfer-ownership="none">
  3989. <doc xml:space="preserve">the environment variable to set</doc>
  3990. <type name="utf8" c:type="const char*"/>
  3991. </parameter>
  3992. <parameter name="value" transfer-ownership="none">
  3993. <doc xml:space="preserve">the value for to set the variable to.</doc>
  3994. <type name="utf8" c:type="const char*"/>
  3995. </parameter>
  3996. </parameters>
  3997. </method>
  3998. <method name="unsetenv"
  3999. c:identifier="g_app_launch_context_unsetenv"
  4000. version="2.32">
  4001. <doc xml:space="preserve">Arranges for @variable to be unset in the child's environment
  4002. when @context is used to launch an application.</doc>
  4003. <return-value transfer-ownership="none">
  4004. <type name="none" c:type="void"/>
  4005. </return-value>
  4006. <parameters>
  4007. <instance-parameter name="context" transfer-ownership="none">
  4008. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  4009. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  4010. </instance-parameter>
  4011. <parameter name="variable" transfer-ownership="none">
  4012. <doc xml:space="preserve">the environment variable to remove</doc>
  4013. <type name="utf8" c:type="const char*"/>
  4014. </parameter>
  4015. </parameters>
  4016. </method>
  4017. <field name="parent_instance">
  4018. <type name="GObject.Object" c:type="GObject"/>
  4019. </field>
  4020. <field name="priv" readable="0" private="1">
  4021. <type name="AppLaunchContextPrivate"
  4022. c:type="GAppLaunchContextPrivate*"/>
  4023. </field>
  4024. <glib:signal name="launch-failed" when="last" version="2.36">
  4025. <doc xml:space="preserve">The ::launch-failed signal is emitted when a #GAppInfo launch
  4026. fails. The startup notification id is provided, so that the launcher
  4027. can cancel the startup notification.</doc>
  4028. <return-value transfer-ownership="none">
  4029. <type name="none" c:type="void"/>
  4030. </return-value>
  4031. <parameters>
  4032. <parameter name="startup_notify_id" transfer-ownership="none">
  4033. <doc xml:space="preserve">the startup notification id for the failed launch</doc>
  4034. <type name="utf8" c:type="gchar*"/>
  4035. </parameter>
  4036. </parameters>
  4037. </glib:signal>
  4038. <glib:signal name="launched" when="last" version="2.36">
  4039. <doc xml:space="preserve">The ::launched signal is emitted when a #GAppInfo is successfully
  4040. launched. The @platform_data is an GVariant dictionary mapping
  4041. strings to variants (ie a{sv}), which contains additional,
  4042. platform-specific data about this launch. On UNIX, at least the
  4043. "pid" and "startup-notification-id" keys will be present.</doc>
  4044. <return-value transfer-ownership="none">
  4045. <type name="none" c:type="void"/>
  4046. </return-value>
  4047. <parameters>
  4048. <parameter name="info" transfer-ownership="none">
  4049. <doc xml:space="preserve">the #GAppInfo that was just launched</doc>
  4050. <type name="AppInfo"/>
  4051. </parameter>
  4052. <parameter name="platform_data" transfer-ownership="none">
  4053. <doc xml:space="preserve">additional platform-specific data for this launch</doc>
  4054. <type name="GLib.Variant"/>
  4055. </parameter>
  4056. </parameters>
  4057. </glib:signal>
  4058. </class>
  4059. <record name="AppLaunchContextClass"
  4060. c:type="GAppLaunchContextClass"
  4061. glib:is-gtype-struct-for="AppLaunchContext">
  4062. <field name="parent_class">
  4063. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  4064. </field>
  4065. <field name="get_display">
  4066. <callback name="get_display">
  4067. <return-value transfer-ownership="full">
  4068. <doc xml:space="preserve">a display string for the display.</doc>
  4069. <type name="utf8" c:type="char*"/>
  4070. </return-value>
  4071. <parameters>
  4072. <parameter name="context" transfer-ownership="none">
  4073. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  4074. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  4075. </parameter>
  4076. <parameter name="info" transfer-ownership="none">
  4077. <doc xml:space="preserve">a #GAppInfo</doc>
  4078. <type name="AppInfo" c:type="GAppInfo*"/>
  4079. </parameter>
  4080. <parameter name="files" transfer-ownership="none">
  4081. <doc xml:space="preserve">a #GList of #GFile objects</doc>
  4082. <type name="GLib.List" c:type="GList*">
  4083. <type name="File"/>
  4084. </type>
  4085. </parameter>
  4086. </parameters>
  4087. </callback>
  4088. </field>
  4089. <field name="get_startup_notify_id">
  4090. <callback name="get_startup_notify_id">
  4091. <return-value transfer-ownership="full">
  4092. <doc xml:space="preserve">a startup notification ID for the application, or %NULL if
  4093. not supported.</doc>
  4094. <type name="utf8" c:type="char*"/>
  4095. </return-value>
  4096. <parameters>
  4097. <parameter name="context" transfer-ownership="none">
  4098. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  4099. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  4100. </parameter>
  4101. <parameter name="info" transfer-ownership="none">
  4102. <doc xml:space="preserve">a #GAppInfo</doc>
  4103. <type name="AppInfo" c:type="GAppInfo*"/>
  4104. </parameter>
  4105. <parameter name="files" transfer-ownership="none">
  4106. <doc xml:space="preserve">a #GList of of #GFile objects</doc>
  4107. <type name="GLib.List" c:type="GList*">
  4108. <type name="File"/>
  4109. </type>
  4110. </parameter>
  4111. </parameters>
  4112. </callback>
  4113. </field>
  4114. <field name="launch_failed">
  4115. <callback name="launch_failed">
  4116. <return-value transfer-ownership="none">
  4117. <type name="none" c:type="void"/>
  4118. </return-value>
  4119. <parameters>
  4120. <parameter name="context" transfer-ownership="none">
  4121. <doc xml:space="preserve">a #GAppLaunchContext.</doc>
  4122. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  4123. </parameter>
  4124. <parameter name="startup_notify_id" transfer-ownership="none">
  4125. <doc xml:space="preserve">the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().</doc>
  4126. <type name="utf8" c:type="const char*"/>
  4127. </parameter>
  4128. </parameters>
  4129. </callback>
  4130. </field>
  4131. <field name="launched">
  4132. <callback name="launched">
  4133. <return-value transfer-ownership="none">
  4134. <type name="none" c:type="void"/>
  4135. </return-value>
  4136. <parameters>
  4137. <parameter name="context" transfer-ownership="none">
  4138. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  4139. </parameter>
  4140. <parameter name="info" transfer-ownership="none">
  4141. <type name="AppInfo" c:type="GAppInfo*"/>
  4142. </parameter>
  4143. <parameter name="platform_data" transfer-ownership="none">
  4144. <type name="GLib.Variant" c:type="GVariant*"/>
  4145. </parameter>
  4146. </parameters>
  4147. </callback>
  4148. </field>
  4149. <field name="_g_reserved1" introspectable="0">
  4150. <callback name="_g_reserved1">
  4151. <return-value transfer-ownership="none">
  4152. <type name="none" c:type="void"/>
  4153. </return-value>
  4154. </callback>
  4155. </field>
  4156. <field name="_g_reserved2" introspectable="0">
  4157. <callback name="_g_reserved2">
  4158. <return-value transfer-ownership="none">
  4159. <type name="none" c:type="void"/>
  4160. </return-value>
  4161. </callback>
  4162. </field>
  4163. <field name="_g_reserved3" introspectable="0">
  4164. <callback name="_g_reserved3">
  4165. <return-value transfer-ownership="none">
  4166. <type name="none" c:type="void"/>
  4167. </return-value>
  4168. </callback>
  4169. </field>
  4170. <field name="_g_reserved4" introspectable="0">
  4171. <callback name="_g_reserved4">
  4172. <return-value transfer-ownership="none">
  4173. <type name="none" c:type="void"/>
  4174. </return-value>
  4175. </callback>
  4176. </field>
  4177. </record>
  4178. <record name="AppLaunchContextPrivate"
  4179. c:type="GAppLaunchContextPrivate"
  4180. disguised="1">
  4181. </record>
  4182. <class name="Application"
  4183. c:symbol-prefix="application"
  4184. c:type="GApplication"
  4185. version="2.28"
  4186. parent="GObject.Object"
  4187. glib:type-name="GApplication"
  4188. glib:get-type="g_application_get_type"
  4189. glib:type-struct="ApplicationClass">
  4190. <doc xml:space="preserve">A #GApplication is the foundation of an application. It wraps some
  4191. low-level platform-specific services and is intended to act as the
  4192. foundation for higher-level application classes such as
  4193. #GtkApplication or #MxApplication. In general, you should not use
  4194. this class outside of a higher level framework.
  4195. GApplication provides convenient life cycle management by maintaining
  4196. a "use count" for the primary application instance. The use count can
  4197. be changed using g_application_hold() and g_application_release(). If
  4198. it drops to zero, the application exits. Higher-level classes such as
  4199. #GtkApplication employ the use count to ensure that the application
  4200. stays alive as long as it has any opened windows.
  4201. Another feature that GApplication (optionally) provides is process
  4202. uniqueness. Applications can make use of this functionality by
  4203. providing a unique application ID. If given, only one application
  4204. with this ID can be running at a time per session. The session
  4205. concept is platform-dependent, but corresponds roughly to a graphical
  4206. desktop login. When your application is launched again, its
  4207. arguments are passed through platform communication to the already
  4208. running program. The already running instance of the program is
  4209. called the "primary instance"; for non-unique applications this is
  4210. the always the current instance. On Linux, the D-Bus session bus
  4211. is used for communication.
  4212. The use of #GApplication differs from some other commonly-used
  4213. uniqueness libraries (such as libunique) in important ways. The
  4214. application is not expected to manually register itself and check
  4215. if it is the primary instance. Instead, the main() function of a
  4216. #GApplication should do very little more than instantiating the
  4217. application instance, possibly connecting signal handlers, then
  4218. calling g_application_run(). All checks for uniqueness are done
  4219. internally. If the application is the primary instance then the
  4220. startup signal is emitted and the mainloop runs. If the application
  4221. is not the primary instance then a signal is sent to the primary
  4222. instance and g_application_run() promptly returns. See the code
  4223. examples below.
  4224. If used, the expected form of an application identifier is very close
  4225. to that of of a
  4226. [DBus bus name](http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface).
  4227. Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
  4228. For details on valid application identifiers, see g_application_id_is_valid().
  4229. On Linux, the application identifier is claimed as a well-known bus name
  4230. on the user's session bus. This means that the uniqueness of your
  4231. application is scoped to the current session. It also means that your
  4232. application may provide additional services (through registration of other
  4233. object paths) at that bus name. The registration of these object paths
  4234. should be done with the shared GDBus session bus. Note that due to the
  4235. internal architecture of GDBus, method calls can be dispatched at any time
  4236. (even if a main loop is not running). For this reason, you must ensure that
  4237. any object paths that you wish to register are registered before #GApplication
  4238. attempts to acquire the bus name of your application (which happens in
  4239. g_application_register()). Unfortunately, this means that you cannot use
  4240. g_application_get_is_remote() to decide if you want to register object paths.
  4241. GApplication also implements the #GActionGroup and #GActionMap
  4242. interfaces and lets you easily export actions by adding them with
  4243. g_action_map_add_action(). When invoking an action by calling
  4244. g_action_group_activate_action() on the application, it is always
  4245. invoked in the primary instance. The actions are also exported on
  4246. the session bus, and GIO provides the #GDBusActionGroup wrapper to
  4247. conveniently access them remotely. GIO provides a #GDBusMenuModel wrapper
  4248. for remote access to exported #GMenuModels.
  4249. There is a number of different entry points into a GApplication:
  4250. - via 'Activate' (i.e. just starting the application)
  4251. - via 'Open' (i.e. opening some files)
  4252. - by handling a command-line
  4253. - via activating an action
  4254. The #GApplication::startup signal lets you handle the application
  4255. initialization for all of these in a single place.
  4256. Regardless of which of these entry points is used to start the
  4257. application, GApplication passes some "platform data from the
  4258. launching instance to the primary instance, in the form of a
  4259. #GVariant dictionary mapping strings to variants. To use platform
  4260. data, override the @before_emit or @after_emit virtual functions
  4261. in your #GApplication subclass. When dealing with
  4262. #GApplicationCommandLine objects, the platform data is
  4263. directly available via g_application_command_line_get_cwd(),
  4264. g_application_command_line_get_environ() and
  4265. g_application_command_line_get_platform_data().
  4266. As the name indicates, the platform data may vary depending on the
  4267. operating system, but it always includes the current directory (key
  4268. "cwd"), and optionally the environment (ie the set of environment
  4269. variables and their values) of the calling process (key "environ").
  4270. The environment is only added to the platform data if the
  4271. %G_APPLICATION_SEND_ENVIRONMENT flag is set. #GApplication subclasses
  4272. can add their own platform data by overriding the @add_platform_data
  4273. virtual function. For instance, #GtkApplication adds startup notification
  4274. data in this way.
  4275. To parse commandline arguments you may handle the
  4276. #GApplication::command-line signal or override the local_command_line()
  4277. vfunc, to parse them in either the primary instance or the local instance,
  4278. respectively.
  4279. For an example of opening files with a GApplication, see
  4280. [gapplication-example-open.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-open.c).
  4281. For an example of using actions with GApplication, see
  4282. [gapplication-example-actions.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-actions.c).
  4283. For an example of using extra D-Bus hooks with GApplication, see
  4284. [gapplication-example-dbushooks.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-dbushooks.c).</doc>
  4285. <implements name="ActionGroup"/>
  4286. <implements name="ActionMap"/>
  4287. <constructor name="new" c:identifier="g_application_new">
  4288. <doc xml:space="preserve">Creates a new #GApplication instance.
  4289. If non-%NULL, the application id must be valid. See
  4290. g_application_id_is_valid().
  4291. If no application ID is given then some features of #GApplication
  4292. (most notably application uniqueness) will be disabled.</doc>
  4293. <return-value transfer-ownership="full">
  4294. <doc xml:space="preserve">a new #GApplication instance</doc>
  4295. <type name="Application" c:type="GApplication*"/>
  4296. </return-value>
  4297. <parameters>
  4298. <parameter name="application_id"
  4299. transfer-ownership="none"
  4300. nullable="1"
  4301. allow-none="1">
  4302. <doc xml:space="preserve">the application id</doc>
  4303. <type name="utf8" c:type="const gchar*"/>
  4304. </parameter>
  4305. <parameter name="flags" transfer-ownership="none">
  4306. <doc xml:space="preserve">the application flags</doc>
  4307. <type name="ApplicationFlags" c:type="GApplicationFlags"/>
  4308. </parameter>
  4309. </parameters>
  4310. </constructor>
  4311. <function name="get_default"
  4312. c:identifier="g_application_get_default"
  4313. version="2.32">
  4314. <doc xml:space="preserve">Returns the default #GApplication instance for this process.
  4315. Normally there is only one #GApplication per process and it becomes
  4316. the default when it is created. You can exercise more control over
  4317. this by using g_application_set_default().
  4318. If there is no default application then %NULL is returned.</doc>
  4319. <return-value transfer-ownership="none">
  4320. <doc xml:space="preserve">the default application for this process, or %NULL</doc>
  4321. <type name="Application" c:type="GApplication*"/>
  4322. </return-value>
  4323. </function>
  4324. <function name="id_is_valid" c:identifier="g_application_id_is_valid">
  4325. <doc xml:space="preserve">Checks if @application_id is a valid application identifier.
  4326. A valid ID is required for calls to g_application_new() and
  4327. g_application_set_application_id().
  4328. For convenience, the restrictions on application identifiers are
  4329. reproduced here:
  4330. - Application identifiers must contain only the ASCII characters
  4331. "[A-Z][a-z][0-9]_-." and must not begin with a digit.
  4332. - Application identifiers must contain at least one '.' (period)
  4333. character (and thus at least three elements).
  4334. - Application identifiers must not begin or end with a '.' (period)
  4335. character.
  4336. - Application identifiers must not contain consecutive '.' (period)
  4337. characters.
  4338. - Application identifiers must not exceed 255 characters.</doc>
  4339. <return-value transfer-ownership="none">
  4340. <doc xml:space="preserve">%TRUE if @application_id is valid</doc>
  4341. <type name="gboolean" c:type="gboolean"/>
  4342. </return-value>
  4343. <parameters>
  4344. <parameter name="application_id" transfer-ownership="none">
  4345. <doc xml:space="preserve">a potential application identifier</doc>
  4346. <type name="utf8" c:type="const gchar*"/>
  4347. </parameter>
  4348. </parameters>
  4349. </function>
  4350. <virtual-method name="activate" invoker="activate" version="2.28">
  4351. <doc xml:space="preserve">Activates the application.
  4352. In essence, this results in the #GApplication::activate signal being
  4353. emitted in the primary instance.
  4354. The application must be registered before calling this function.</doc>
  4355. <return-value transfer-ownership="none">
  4356. <type name="none" c:type="void"/>
  4357. </return-value>
  4358. <parameters>
  4359. <instance-parameter name="application" transfer-ownership="none">
  4360. <doc xml:space="preserve">a #GApplication</doc>
  4361. <type name="Application" c:type="GApplication*"/>
  4362. </instance-parameter>
  4363. </parameters>
  4364. </virtual-method>
  4365. <virtual-method name="add_platform_data">
  4366. <return-value transfer-ownership="none">
  4367. <type name="none" c:type="void"/>
  4368. </return-value>
  4369. <parameters>
  4370. <instance-parameter name="application" transfer-ownership="none">
  4371. <type name="Application" c:type="GApplication*"/>
  4372. </instance-parameter>
  4373. <parameter name="builder" transfer-ownership="none">
  4374. <type name="GLib.VariantBuilder" c:type="GVariantBuilder*"/>
  4375. </parameter>
  4376. </parameters>
  4377. </virtual-method>
  4378. <virtual-method name="after_emit">
  4379. <return-value transfer-ownership="none">
  4380. <type name="none" c:type="void"/>
  4381. </return-value>
  4382. <parameters>
  4383. <instance-parameter name="application" transfer-ownership="none">
  4384. <type name="Application" c:type="GApplication*"/>
  4385. </instance-parameter>
  4386. <parameter name="platform_data" transfer-ownership="none">
  4387. <type name="GLib.Variant" c:type="GVariant*"/>
  4388. </parameter>
  4389. </parameters>
  4390. </virtual-method>
  4391. <virtual-method name="before_emit">
  4392. <return-value transfer-ownership="none">
  4393. <type name="none" c:type="void"/>
  4394. </return-value>
  4395. <parameters>
  4396. <instance-parameter name="application" transfer-ownership="none">
  4397. <type name="Application" c:type="GApplication*"/>
  4398. </instance-parameter>
  4399. <parameter name="platform_data" transfer-ownership="none">
  4400. <type name="GLib.Variant" c:type="GVariant*"/>
  4401. </parameter>
  4402. </parameters>
  4403. </virtual-method>
  4404. <virtual-method name="command_line">
  4405. <return-value transfer-ownership="none">
  4406. <type name="gint" c:type="int"/>
  4407. </return-value>
  4408. <parameters>
  4409. <instance-parameter name="application" transfer-ownership="none">
  4410. <type name="Application" c:type="GApplication*"/>
  4411. </instance-parameter>
  4412. <parameter name="command_line" transfer-ownership="none">
  4413. <type name="ApplicationCommandLine"
  4414. c:type="GApplicationCommandLine*"/>
  4415. </parameter>
  4416. </parameters>
  4417. </virtual-method>
  4418. <virtual-method name="dbus_register" throws="1">
  4419. <return-value transfer-ownership="none">
  4420. <type name="gboolean" c:type="gboolean"/>
  4421. </return-value>
  4422. <parameters>
  4423. <instance-parameter name="application" transfer-ownership="none">
  4424. <type name="Application" c:type="GApplication*"/>
  4425. </instance-parameter>
  4426. <parameter name="connection" transfer-ownership="none">
  4427. <type name="DBusConnection" c:type="GDBusConnection*"/>
  4428. </parameter>
  4429. <parameter name="object_path" transfer-ownership="none">
  4430. <type name="utf8" c:type="const gchar*"/>
  4431. </parameter>
  4432. </parameters>
  4433. </virtual-method>
  4434. <virtual-method name="dbus_unregister">
  4435. <return-value transfer-ownership="none">
  4436. <type name="none" c:type="void"/>
  4437. </return-value>
  4438. <parameters>
  4439. <instance-parameter name="application" transfer-ownership="none">
  4440. <type name="Application" c:type="GApplication*"/>
  4441. </instance-parameter>
  4442. <parameter name="connection" transfer-ownership="none">
  4443. <type name="DBusConnection" c:type="GDBusConnection*"/>
  4444. </parameter>
  4445. <parameter name="object_path" transfer-ownership="none">
  4446. <type name="utf8" c:type="const gchar*"/>
  4447. </parameter>
  4448. </parameters>
  4449. </virtual-method>
  4450. <virtual-method name="handle_local_options">
  4451. <return-value transfer-ownership="none">
  4452. <type name="gint" c:type="gint"/>
  4453. </return-value>
  4454. <parameters>
  4455. <instance-parameter name="application" transfer-ownership="none">
  4456. <type name="Application" c:type="GApplication*"/>
  4457. </instance-parameter>
  4458. <parameter name="options" transfer-ownership="none">
  4459. <type name="GLib.VariantDict" c:type="GVariantDict*"/>
  4460. </parameter>
  4461. </parameters>
  4462. </virtual-method>
  4463. <virtual-method name="local_command_line">
  4464. <doc xml:space="preserve">This virtual function is always invoked in the local instance. It
  4465. gets passed a pointer to a %NULL-terminated copy of @argv and is
  4466. expected to remove arguments that it handled (shifting up remaining
  4467. arguments).
  4468. The last argument to local_command_line() is a pointer to the @status
  4469. variable which can used to set the exit status that is returned from
  4470. g_application_run().
  4471. See g_application_run() for more details on #GApplication startup.</doc>
  4472. <return-value transfer-ownership="none">
  4473. <doc xml:space="preserve">%TRUE if the commandline has been completely handled</doc>
  4474. <type name="gboolean" c:type="gboolean"/>
  4475. </return-value>
  4476. <parameters>
  4477. <instance-parameter name="application" transfer-ownership="none">
  4478. <doc xml:space="preserve">a #GApplication</doc>
  4479. <type name="Application" c:type="GApplication*"/>
  4480. </instance-parameter>
  4481. <parameter name="arguments"
  4482. direction="inout"
  4483. caller-allocates="0"
  4484. transfer-ownership="full">
  4485. <doc xml:space="preserve">array of command line arguments</doc>
  4486. <array c:type="gchar***">
  4487. <type name="utf8" c:type="gchar**"/>
  4488. </array>
  4489. </parameter>
  4490. <parameter name="exit_status"
  4491. direction="out"
  4492. caller-allocates="0"
  4493. transfer-ownership="full">
  4494. <doc xml:space="preserve">exit status to fill after processing the command line.</doc>
  4495. <type name="gint" c:type="int*"/>
  4496. </parameter>
  4497. </parameters>
  4498. </virtual-method>
  4499. <virtual-method name="open" invoker="open" version="2.28">
  4500. <doc xml:space="preserve">Opens the given files.
  4501. In essence, this results in the #GApplication::open signal being emitted
  4502. in the primary instance.
  4503. @n_files must be greater than zero.
  4504. @hint is simply passed through to the ::open signal. It is
  4505. intended to be used by applications that have multiple modes for
  4506. opening files (eg: "view" vs "edit", etc). Unless you have a need
  4507. for this functionality, you should use "".
  4508. The application must be registered before calling this function
  4509. and it must have the %G_APPLICATION_HANDLES_OPEN flag set.</doc>
  4510. <return-value transfer-ownership="none">
  4511. <type name="none" c:type="void"/>
  4512. </return-value>
  4513. <parameters>
  4514. <instance-parameter name="application" transfer-ownership="none">
  4515. <doc xml:space="preserve">a #GApplication</doc>
  4516. <type name="Application" c:type="GApplication*"/>
  4517. </instance-parameter>
  4518. <parameter name="files" transfer-ownership="none">
  4519. <doc xml:space="preserve">an array of #GFiles to open</doc>
  4520. <array length="1" zero-terminated="0" c:type="GFile**">
  4521. <type name="File" c:type="GFile*"/>
  4522. </array>
  4523. </parameter>
  4524. <parameter name="n_files" transfer-ownership="none">
  4525. <doc xml:space="preserve">the length of the @files array</doc>
  4526. <type name="gint" c:type="gint"/>
  4527. </parameter>
  4528. <parameter name="hint" transfer-ownership="none">
  4529. <doc xml:space="preserve">a hint (or ""), but never %NULL</doc>
  4530. <type name="utf8" c:type="const gchar*"/>
  4531. </parameter>
  4532. </parameters>
  4533. </virtual-method>
  4534. <virtual-method name="quit_mainloop">
  4535. <return-value transfer-ownership="none">
  4536. <type name="none" c:type="void"/>
  4537. </return-value>
  4538. <parameters>
  4539. <instance-parameter name="application" transfer-ownership="none">
  4540. <type name="Application" c:type="GApplication*"/>
  4541. </instance-parameter>
  4542. </parameters>
  4543. </virtual-method>
  4544. <virtual-method name="run_mainloop">
  4545. <return-value transfer-ownership="none">
  4546. <type name="none" c:type="void"/>
  4547. </return-value>
  4548. <parameters>
  4549. <instance-parameter name="application" transfer-ownership="none">
  4550. <type name="Application" c:type="GApplication*"/>
  4551. </instance-parameter>
  4552. </parameters>
  4553. </virtual-method>
  4554. <virtual-method name="shutdown">
  4555. <return-value transfer-ownership="none">
  4556. <type name="none" c:type="void"/>
  4557. </return-value>
  4558. <parameters>
  4559. <instance-parameter name="application" transfer-ownership="none">
  4560. <type name="Application" c:type="GApplication*"/>
  4561. </instance-parameter>
  4562. </parameters>
  4563. </virtual-method>
  4564. <virtual-method name="startup">
  4565. <return-value transfer-ownership="none">
  4566. <type name="none" c:type="void"/>
  4567. </return-value>
  4568. <parameters>
  4569. <instance-parameter name="application" transfer-ownership="none">
  4570. <type name="Application" c:type="GApplication*"/>
  4571. </instance-parameter>
  4572. </parameters>
  4573. </virtual-method>
  4574. <method name="activate"
  4575. c:identifier="g_application_activate"
  4576. version="2.28">
  4577. <doc xml:space="preserve">Activates the application.
  4578. In essence, this results in the #GApplication::activate signal being
  4579. emitted in the primary instance.
  4580. The application must be registered before calling this function.</doc>
  4581. <return-value transfer-ownership="none">
  4582. <type name="none" c:type="void"/>
  4583. </return-value>
  4584. <parameters>
  4585. <instance-parameter name="application" transfer-ownership="none">
  4586. <doc xml:space="preserve">a #GApplication</doc>
  4587. <type name="Application" c:type="GApplication*"/>
  4588. </instance-parameter>
  4589. </parameters>
  4590. </method>
  4591. <method name="add_main_option"
  4592. c:identifier="g_application_add_main_option"
  4593. version="2.42">
  4594. <doc xml:space="preserve">Add an option to be handled by @application.
  4595. Calling this function is the equivalent of calling
  4596. g_application_add_main_option_entries() with a single #GOptionEntry
  4597. that has its arg_data member set to %NULL.
  4598. The parsed arguments will be packed into a #GVariantDict which
  4599. is passed to #GApplication::handle-local-options. If
  4600. %G_APPLICATION_HANDLES_COMMAND_LINE is set, then it will also
  4601. be sent to the primary instance. See
  4602. g_application_add_main_option_entries() for more details.
  4603. See #GOptionEntry for more documentation of the arguments.</doc>
  4604. <return-value transfer-ownership="none">
  4605. <type name="none" c:type="void"/>
  4606. </return-value>
  4607. <parameters>
  4608. <instance-parameter name="application" transfer-ownership="none">
  4609. <doc xml:space="preserve">the #GApplication</doc>
  4610. <type name="Application" c:type="GApplication*"/>
  4611. </instance-parameter>
  4612. <parameter name="long_name" transfer-ownership="none">
  4613. <doc xml:space="preserve">the long name of an option used to specify it in a commandline</doc>
  4614. <type name="utf8" c:type="const char*"/>
  4615. </parameter>
  4616. <parameter name="short_name" transfer-ownership="none">
  4617. <doc xml:space="preserve">the short name of an option</doc>
  4618. <type name="gchar" c:type="char"/>
  4619. </parameter>
  4620. <parameter name="flags" transfer-ownership="none">
  4621. <doc xml:space="preserve">flags from #GOptionFlags</doc>
  4622. <type name="GLib.OptionFlags" c:type="GOptionFlags"/>
  4623. </parameter>
  4624. <parameter name="arg" transfer-ownership="none">
  4625. <doc xml:space="preserve">the type of the option, as a #GOptionArg</doc>
  4626. <type name="GLib.OptionArg" c:type="GOptionArg"/>
  4627. </parameter>
  4628. <parameter name="description" transfer-ownership="none">
  4629. <doc xml:space="preserve">the description for the option in `--help` output</doc>
  4630. <type name="utf8" c:type="const char*"/>
  4631. </parameter>
  4632. <parameter name="arg_description"
  4633. transfer-ownership="none"
  4634. nullable="1"
  4635. allow-none="1">
  4636. <doc xml:space="preserve">the placeholder to use for the extra argument
  4637. parsed by the option in `--help` output</doc>
  4638. <type name="utf8" c:type="const char*"/>
  4639. </parameter>
  4640. </parameters>
  4641. </method>
  4642. <method name="add_main_option_entries"
  4643. c:identifier="g_application_add_main_option_entries"
  4644. version="2.40">
  4645. <doc xml:space="preserve">Adds main option entries to be handled by @application.
  4646. This function is comparable to g_option_context_add_main_entries().
  4647. After the commandline arguments are parsed, the
  4648. #GApplication::handle-local-options signal will be emitted. At this
  4649. point, the application can inspect the values pointed to by @arg_data
  4650. in the given #GOptionEntrys.
  4651. Unlike #GOptionContext, #GApplication supports giving a %NULL
  4652. @arg_data for a non-callback #GOptionEntry. This results in the
  4653. argument in question being packed into a #GVariantDict which is also
  4654. passed to #GApplication::handle-local-options, where it can be
  4655. inspected and modified. If %G_APPLICATION_HANDLES_COMMAND_LINE is
  4656. set, then the resulting dictionary is sent to the primary instance,
  4657. where g_application_command_line_get_options_dict() will return it.
  4658. This "packing" is done according to the type of the argument --
  4659. booleans for normal flags, strings for strings, bytestrings for
  4660. filenames, etc. The packing only occurs if the flag is given (ie: we
  4661. do not pack a "false" #GVariant in the case that a flag is missing).
  4662. In general, it is recommended that all commandline arguments are
  4663. parsed locally. The options dictionary should then be used to
  4664. transmit the result of the parsing to the primary instance, where
  4665. g_variant_dict_lookup() can be used. For local options, it is
  4666. possible to either use @arg_data in the usual way, or to consult (and
  4667. potentially remove) the option from the options dictionary.
  4668. This function is new in GLib 2.40. Before then, the only real choice
  4669. was to send all of the commandline arguments (options and all) to the
  4670. primary instance for handling. #GApplication ignored them completely
  4671. on the local side. Calling this function "opts in" to the new
  4672. behaviour, and in particular, means that unrecognised options will be
  4673. treated as errors. Unrecognised options have never been ignored when
  4674. %G_APPLICATION_HANDLES_COMMAND_LINE is unset.
  4675. If #GApplication::handle-local-options needs to see the list of
  4676. filenames, then the use of %G_OPTION_REMAINING is recommended. If
  4677. @arg_data is %NULL then %G_OPTION_REMAINING can be used as a key into
  4678. the options dictionary. If you do use %G_OPTION_REMAINING then you
  4679. need to handle these arguments for yourself because once they are
  4680. consumed, they will no longer be visible to the default handling
  4681. (which treats them as filenames to be opened).
  4682. It is important to use the proper GVariant format when retrieving
  4683. the options with g_variant_dict_lookup():
  4684. - for %G_OPTION_ARG_NONE, use b
  4685. - for %G_OPTION_ARG_STRING, use &amp;s
  4686. - for %G_OPTION_ARG_INT, use i
  4687. - for %G_OPTION_ARG_INT64, use x
  4688. - for %G_OPTION_ARG_DOUBLE, use d
  4689. - for %G_OPTION_ARG_FILENAME, use ^ay
  4690. - for %G_OPTION_ARG_STRING_ARRAY, use &amp;as
  4691. - for %G_OPTION_ARG_FILENAME_ARRAY, use ^aay</doc>
  4692. <return-value transfer-ownership="none">
  4693. <type name="none" c:type="void"/>
  4694. </return-value>
  4695. <parameters>
  4696. <instance-parameter name="application" transfer-ownership="none">
  4697. <doc xml:space="preserve">a #GApplication</doc>
  4698. <type name="Application" c:type="GApplication*"/>
  4699. </instance-parameter>
  4700. <parameter name="entries" transfer-ownership="none">
  4701. <doc xml:space="preserve">a
  4702. %NULL-terminated list of #GOptionEntrys</doc>
  4703. <array c:type="GOptionEntry*">
  4704. <type name="GLib.OptionEntry"/>
  4705. </array>
  4706. </parameter>
  4707. </parameters>
  4708. </method>
  4709. <method name="add_option_group"
  4710. c:identifier="g_application_add_option_group"
  4711. version="2.40">
  4712. <doc xml:space="preserve">Adds a #GOptionGroup to the commandline handling of @application.
  4713. This function is comparable to g_option_context_add_group().
  4714. Unlike g_application_add_main_option_entries(), this function does
  4715. not deal with %NULL @arg_data and never transmits options to the
  4716. primary instance.
  4717. The reason for that is because, by the time the options arrive at the
  4718. primary instance, it is typically too late to do anything with them.
  4719. Taking the GTK option group as an example: GTK will already have been
  4720. initialised by the time the #GApplication::command-line handler runs.
  4721. In the case that this is not the first-running instance of the
  4722. application, the existing instance may already have been running for
  4723. a very long time.
  4724. This means that the options from #GOptionGroup are only really usable
  4725. in the case that the instance of the application being run is the
  4726. first instance. Passing options like `--display=` or `--gdk-debug=`
  4727. on future runs will have no effect on the existing primary instance.
  4728. Calling this function will cause the options in the supplied option
  4729. group to be parsed, but it does not cause you to be "opted in" to the
  4730. new functionality whereby unrecognised options are rejected even if
  4731. %G_APPLICATION_HANDLES_COMMAND_LINE was given.</doc>
  4732. <return-value transfer-ownership="none">
  4733. <type name="none" c:type="void"/>
  4734. </return-value>
  4735. <parameters>
  4736. <instance-parameter name="application" transfer-ownership="none">
  4737. <doc xml:space="preserve">the #GApplication</doc>
  4738. <type name="Application" c:type="GApplication*"/>
  4739. </instance-parameter>
  4740. <parameter name="group" transfer-ownership="full">
  4741. <doc xml:space="preserve">a #GOptionGroup</doc>
  4742. <type name="GLib.OptionGroup" c:type="GOptionGroup*"/>
  4743. </parameter>
  4744. </parameters>
  4745. </method>
  4746. <method name="bind_busy_property"
  4747. c:identifier="g_application_bind_busy_property"
  4748. version="2.44">
  4749. <doc xml:space="preserve">Marks @application as busy (see g_application_mark_busy()) while
  4750. @property on @object is %TRUE.
  4751. The binding holds a reference to @application while it is active, but
  4752. not to @object. Instead, the binding is destroyed when @object is
  4753. finalized.</doc>
  4754. <return-value transfer-ownership="none">
  4755. <type name="none" c:type="void"/>
  4756. </return-value>
  4757. <parameters>
  4758. <instance-parameter name="application" transfer-ownership="none">
  4759. <doc xml:space="preserve">a #GApplication</doc>
  4760. <type name="Application" c:type="GApplication*"/>
  4761. </instance-parameter>
  4762. <parameter name="object" transfer-ownership="none">
  4763. <doc xml:space="preserve">a #GObject</doc>
  4764. <type name="GObject.Object" c:type="gpointer"/>
  4765. </parameter>
  4766. <parameter name="property" transfer-ownership="none">
  4767. <doc xml:space="preserve">the name of a boolean property of @object</doc>
  4768. <type name="utf8" c:type="const gchar*"/>
  4769. </parameter>
  4770. </parameters>
  4771. </method>
  4772. <method name="get_application_id"
  4773. c:identifier="g_application_get_application_id"
  4774. version="2.28">
  4775. <doc xml:space="preserve">Gets the unique identifier for @application.</doc>
  4776. <return-value transfer-ownership="none">
  4777. <doc xml:space="preserve">the identifier for @application, owned by @application</doc>
  4778. <type name="utf8" c:type="const gchar*"/>
  4779. </return-value>
  4780. <parameters>
  4781. <instance-parameter name="application" transfer-ownership="none">
  4782. <doc xml:space="preserve">a #GApplication</doc>
  4783. <type name="Application" c:type="GApplication*"/>
  4784. </instance-parameter>
  4785. </parameters>
  4786. </method>
  4787. <method name="get_dbus_connection"
  4788. c:identifier="g_application_get_dbus_connection"
  4789. version="2.34">
  4790. <doc xml:space="preserve">Gets the #GDBusConnection being used by the application, or %NULL.
  4791. If #GApplication is using its D-Bus backend then this function will
  4792. return the #GDBusConnection being used for uniqueness and
  4793. communication with the desktop environment and other instances of the
  4794. application.
  4795. If #GApplication is not using D-Bus then this function will return
  4796. %NULL. This includes the situation where the D-Bus backend would
  4797. normally be in use but we were unable to connect to the bus.
  4798. This function must not be called before the application has been
  4799. registered. See g_application_get_is_registered().</doc>
  4800. <return-value transfer-ownership="none">
  4801. <doc xml:space="preserve">a #GDBusConnection, or %NULL</doc>
  4802. <type name="DBusConnection" c:type="GDBusConnection*"/>
  4803. </return-value>
  4804. <parameters>
  4805. <instance-parameter name="application" transfer-ownership="none">
  4806. <doc xml:space="preserve">a #GApplication</doc>
  4807. <type name="Application" c:type="GApplication*"/>
  4808. </instance-parameter>
  4809. </parameters>
  4810. </method>
  4811. <method name="get_dbus_object_path"
  4812. c:identifier="g_application_get_dbus_object_path"
  4813. version="2.34">
  4814. <doc xml:space="preserve">Gets the D-Bus object path being used by the application, or %NULL.
  4815. If #GApplication is using its D-Bus backend then this function will
  4816. return the D-Bus object path that #GApplication is using. If the
  4817. application is the primary instance then there is an object published
  4818. at this path. If the application is not the primary instance then
  4819. the result of this function is undefined.
  4820. If #GApplication is not using D-Bus then this function will return
  4821. %NULL. This includes the situation where the D-Bus backend would
  4822. normally be in use but we were unable to connect to the bus.
  4823. This function must not be called before the application has been
  4824. registered. See g_application_get_is_registered().</doc>
  4825. <return-value transfer-ownership="none">
  4826. <doc xml:space="preserve">the object path, or %NULL</doc>
  4827. <type name="utf8" c:type="const gchar*"/>
  4828. </return-value>
  4829. <parameters>
  4830. <instance-parameter name="application" transfer-ownership="none">
  4831. <doc xml:space="preserve">a #GApplication</doc>
  4832. <type name="Application" c:type="GApplication*"/>
  4833. </instance-parameter>
  4834. </parameters>
  4835. </method>
  4836. <method name="get_flags"
  4837. c:identifier="g_application_get_flags"
  4838. version="2.28">
  4839. <doc xml:space="preserve">Gets the flags for @application.
  4840. See #GApplicationFlags.</doc>
  4841. <return-value transfer-ownership="none">
  4842. <doc xml:space="preserve">the flags for @application</doc>
  4843. <type name="ApplicationFlags" c:type="GApplicationFlags"/>
  4844. </return-value>
  4845. <parameters>
  4846. <instance-parameter name="application" transfer-ownership="none">
  4847. <doc xml:space="preserve">a #GApplication</doc>
  4848. <type name="Application" c:type="GApplication*"/>
  4849. </instance-parameter>
  4850. </parameters>
  4851. </method>
  4852. <method name="get_inactivity_timeout"
  4853. c:identifier="g_application_get_inactivity_timeout"
  4854. version="2.28">
  4855. <doc xml:space="preserve">Gets the current inactivity timeout for the application.
  4856. This is the amount of time (in milliseconds) after the last call to
  4857. g_application_release() before the application stops running.</doc>
  4858. <return-value transfer-ownership="none">
  4859. <doc xml:space="preserve">the timeout, in milliseconds</doc>
  4860. <type name="guint" c:type="guint"/>
  4861. </return-value>
  4862. <parameters>
  4863. <instance-parameter name="application" transfer-ownership="none">
  4864. <doc xml:space="preserve">a #GApplication</doc>
  4865. <type name="Application" c:type="GApplication*"/>
  4866. </instance-parameter>
  4867. </parameters>
  4868. </method>
  4869. <method name="get_is_busy"
  4870. c:identifier="g_application_get_is_busy"
  4871. version="2.44">
  4872. <doc xml:space="preserve">Gets the application's current busy state, as set through
  4873. g_application_mark_busy() or g_application_bind_busy_property().</doc>
  4874. <return-value transfer-ownership="none">
  4875. <doc xml:space="preserve">%TRUE if @application is currenty marked as busy</doc>
  4876. <type name="gboolean" c:type="gboolean"/>
  4877. </return-value>
  4878. <parameters>
  4879. <instance-parameter name="application" transfer-ownership="none">
  4880. <doc xml:space="preserve">a #GApplication</doc>
  4881. <type name="Application" c:type="GApplication*"/>
  4882. </instance-parameter>
  4883. </parameters>
  4884. </method>
  4885. <method name="get_is_registered"
  4886. c:identifier="g_application_get_is_registered"
  4887. version="2.28">
  4888. <doc xml:space="preserve">Checks if @application is registered.
  4889. An application is registered if g_application_register() has been
  4890. successfully called.</doc>
  4891. <return-value transfer-ownership="none">
  4892. <doc xml:space="preserve">%TRUE if @application is registered</doc>
  4893. <type name="gboolean" c:type="gboolean"/>
  4894. </return-value>
  4895. <parameters>
  4896. <instance-parameter name="application" transfer-ownership="none">
  4897. <doc xml:space="preserve">a #GApplication</doc>
  4898. <type name="Application" c:type="GApplication*"/>
  4899. </instance-parameter>
  4900. </parameters>
  4901. </method>
  4902. <method name="get_is_remote"
  4903. c:identifier="g_application_get_is_remote"
  4904. version="2.28">
  4905. <doc xml:space="preserve">Checks if @application is remote.
  4906. If @application is remote then it means that another instance of
  4907. application already exists (the 'primary' instance). Calls to
  4908. perform actions on @application will result in the actions being
  4909. performed by the primary instance.
  4910. The value of this property cannot be accessed before
  4911. g_application_register() has been called. See
  4912. g_application_get_is_registered().</doc>
  4913. <return-value transfer-ownership="none">
  4914. <doc xml:space="preserve">%TRUE if @application is remote</doc>
  4915. <type name="gboolean" c:type="gboolean"/>
  4916. </return-value>
  4917. <parameters>
  4918. <instance-parameter name="application" transfer-ownership="none">
  4919. <doc xml:space="preserve">a #GApplication</doc>
  4920. <type name="Application" c:type="GApplication*"/>
  4921. </instance-parameter>
  4922. </parameters>
  4923. </method>
  4924. <method name="get_resource_base_path"
  4925. c:identifier="g_application_get_resource_base_path"
  4926. version="2.42">
  4927. <doc xml:space="preserve">Gets the resource base path of @application.
  4928. See g_application_set_resource_base_path() for more information.</doc>
  4929. <return-value transfer-ownership="none" nullable="1">
  4930. <doc xml:space="preserve">the base resource path, if one is set</doc>
  4931. <type name="utf8" c:type="const gchar*"/>
  4932. </return-value>
  4933. <parameters>
  4934. <instance-parameter name="application" transfer-ownership="none">
  4935. <doc xml:space="preserve">a #GApplication</doc>
  4936. <type name="Application" c:type="GApplication*"/>
  4937. </instance-parameter>
  4938. </parameters>
  4939. </method>
  4940. <method name="hold" c:identifier="g_application_hold">
  4941. <doc xml:space="preserve">Increases the use count of @application.
  4942. Use this function to indicate that the application has a reason to
  4943. continue to run. For example, g_application_hold() is called by GTK+
  4944. when a toplevel window is on the screen.
  4945. To cancel the hold, call g_application_release().</doc>
  4946. <return-value transfer-ownership="none">
  4947. <type name="none" c:type="void"/>
  4948. </return-value>
  4949. <parameters>
  4950. <instance-parameter name="application" transfer-ownership="none">
  4951. <doc xml:space="preserve">a #GApplication</doc>
  4952. <type name="Application" c:type="GApplication*"/>
  4953. </instance-parameter>
  4954. </parameters>
  4955. </method>
  4956. <method name="mark_busy"
  4957. c:identifier="g_application_mark_busy"
  4958. version="2.38">
  4959. <doc xml:space="preserve">Increases the busy count of @application.
  4960. Use this function to indicate that the application is busy, for instance
  4961. while a long running operation is pending.
  4962. The busy state will be exposed to other processes, so a session shell will
  4963. use that information to indicate the state to the user (e.g. with a
  4964. spinner).
  4965. To cancel the busy indication, use g_application_unmark_busy().</doc>
  4966. <return-value transfer-ownership="none">
  4967. <type name="none" c:type="void"/>
  4968. </return-value>
  4969. <parameters>
  4970. <instance-parameter name="application" transfer-ownership="none">
  4971. <doc xml:space="preserve">a #GApplication</doc>
  4972. <type name="Application" c:type="GApplication*"/>
  4973. </instance-parameter>
  4974. </parameters>
  4975. </method>
  4976. <method name="open" c:identifier="g_application_open" version="2.28">
  4977. <doc xml:space="preserve">Opens the given files.
  4978. In essence, this results in the #GApplication::open signal being emitted
  4979. in the primary instance.
  4980. @n_files must be greater than zero.
  4981. @hint is simply passed through to the ::open signal. It is
  4982. intended to be used by applications that have multiple modes for
  4983. opening files (eg: "view" vs "edit", etc). Unless you have a need
  4984. for this functionality, you should use "".
  4985. The application must be registered before calling this function
  4986. and it must have the %G_APPLICATION_HANDLES_OPEN flag set.</doc>
  4987. <return-value transfer-ownership="none">
  4988. <type name="none" c:type="void"/>
  4989. </return-value>
  4990. <parameters>
  4991. <instance-parameter name="application" transfer-ownership="none">
  4992. <doc xml:space="preserve">a #GApplication</doc>
  4993. <type name="Application" c:type="GApplication*"/>
  4994. </instance-parameter>
  4995. <parameter name="files" transfer-ownership="none">
  4996. <doc xml:space="preserve">an array of #GFiles to open</doc>
  4997. <array length="1" zero-terminated="0" c:type="GFile**">
  4998. <type name="File" c:type="GFile*"/>
  4999. </array>
  5000. </parameter>
  5001. <parameter name="n_files" transfer-ownership="none">
  5002. <doc xml:space="preserve">the length of the @files array</doc>
  5003. <type name="gint" c:type="gint"/>
  5004. </parameter>
  5005. <parameter name="hint" transfer-ownership="none">
  5006. <doc xml:space="preserve">a hint (or ""), but never %NULL</doc>
  5007. <type name="utf8" c:type="const gchar*"/>
  5008. </parameter>
  5009. </parameters>
  5010. </method>
  5011. <method name="quit" c:identifier="g_application_quit" version="2.32">
  5012. <doc xml:space="preserve">Immediately quits the application.
  5013. Upon return to the mainloop, g_application_run() will return,
  5014. calling only the 'shutdown' function before doing so.
  5015. The hold count is ignored.
  5016. The result of calling g_application_run() again after it returns is
  5017. unspecified.</doc>
  5018. <return-value transfer-ownership="none">
  5019. <type name="none" c:type="void"/>
  5020. </return-value>
  5021. <parameters>
  5022. <instance-parameter name="application" transfer-ownership="none">
  5023. <doc xml:space="preserve">a #GApplication</doc>
  5024. <type name="Application" c:type="GApplication*"/>
  5025. </instance-parameter>
  5026. </parameters>
  5027. </method>
  5028. <method name="register"
  5029. c:identifier="g_application_register"
  5030. version="2.28"
  5031. throws="1">
  5032. <doc xml:space="preserve">Attempts registration of the application.
  5033. This is the point at which the application discovers if it is the
  5034. primary instance or merely acting as a remote for an already-existing
  5035. primary instance. This is implemented by attempting to acquire the
  5036. application identifier as a unique bus name on the session bus using
  5037. GDBus.
  5038. If there is no application ID or if %G_APPLICATION_NON_UNIQUE was
  5039. given, then this process will always become the primary instance.
  5040. Due to the internal architecture of GDBus, method calls can be
  5041. dispatched at any time (even if a main loop is not running). For
  5042. this reason, you must ensure that any object paths that you wish to
  5043. register are registered before calling this function.
  5044. If the application has already been registered then %TRUE is
  5045. returned with no work performed.
  5046. The #GApplication::startup signal is emitted if registration succeeds
  5047. and @application is the primary instance (including the non-unique
  5048. case).
  5049. In the event of an error (such as @cancellable being cancelled, or a
  5050. failure to connect to the session bus), %FALSE is returned and @error
  5051. is set appropriately.
  5052. Note: the return value of this function is not an indicator that this
  5053. instance is or is not the primary instance of the application. See
  5054. g_application_get_is_remote() for that.</doc>
  5055. <return-value transfer-ownership="none">
  5056. <doc xml:space="preserve">%TRUE if registration succeeded</doc>
  5057. <type name="gboolean" c:type="gboolean"/>
  5058. </return-value>
  5059. <parameters>
  5060. <instance-parameter name="application" transfer-ownership="none">
  5061. <doc xml:space="preserve">a #GApplication</doc>
  5062. <type name="Application" c:type="GApplication*"/>
  5063. </instance-parameter>
  5064. <parameter name="cancellable"
  5065. transfer-ownership="none"
  5066. nullable="1"
  5067. allow-none="1">
  5068. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  5069. <type name="Cancellable" c:type="GCancellable*"/>
  5070. </parameter>
  5071. </parameters>
  5072. </method>
  5073. <method name="release" c:identifier="g_application_release">
  5074. <doc xml:space="preserve">Decrease the use count of @application.
  5075. When the use count reaches zero, the application will stop running.
  5076. Never call this function except to cancel the effect of a previous
  5077. call to g_application_hold().</doc>
  5078. <return-value transfer-ownership="none">
  5079. <type name="none" c:type="void"/>
  5080. </return-value>
  5081. <parameters>
  5082. <instance-parameter name="application" transfer-ownership="none">
  5083. <doc xml:space="preserve">a #GApplication</doc>
  5084. <type name="Application" c:type="GApplication*"/>
  5085. </instance-parameter>
  5086. </parameters>
  5087. </method>
  5088. <method name="run" c:identifier="g_application_run" version="2.28">
  5089. <doc xml:space="preserve">Runs the application.
  5090. This function is intended to be run from main() and its return value
  5091. is intended to be returned by main(). Although you are expected to pass
  5092. the @argc, @argv parameters from main() to this function, it is possible
  5093. to pass %NULL if @argv is not available or commandline handling is not
  5094. required. Note that on Windows, @argc and @argv are ignored, and
  5095. g_win32_get_command_line() is called internally (for proper support
  5096. of Unicode commandline arguments).
  5097. #GApplication will attempt to parse the commandline arguments. You
  5098. can add commandline flags to the list of recognised options by way of
  5099. g_application_add_main_option_entries(). After this, the
  5100. #GApplication::handle-local-options signal is emitted, from which the
  5101. application can inspect the values of its #GOptionEntrys.
  5102. #GApplication::handle-local-options is a good place to handle options
  5103. such as `--version`, where an immediate reply from the local process is
  5104. desired (instead of communicating with an already-running instance).
  5105. A #GApplication::handle-local-options handler can stop further processing
  5106. by returning a non-negative value, which then becomes the exit status of
  5107. the process.
  5108. What happens next depends on the flags: if
  5109. %G_APPLICATION_HANDLES_COMMAND_LINE was specified then the remaining
  5110. commandline arguments are sent to the primary instance, where a
  5111. #GApplication::command-line signal is emitted. Otherwise, the
  5112. remaining commandline arguments are assumed to be a list of files.
  5113. If there are no files listed, the application is activated via the
  5114. #GApplication::activate signal. If there are one or more files, and
  5115. %G_APPLICATION_HANDLES_OPEN was specified then the files are opened
  5116. via the #GApplication::open signal.
  5117. If you are interested in doing more complicated local handling of the
  5118. commandline then you should implement your own #GApplication subclass
  5119. and override local_command_line(). In this case, you most likely want
  5120. to return %TRUE from your local_command_line() implementation to
  5121. suppress the default handling. See
  5122. [gapplication-example-cmdline2.c][gapplication-example-cmdline2]
  5123. for an example.
  5124. If, after the above is done, the use count of the application is zero
  5125. then the exit status is returned immediately. If the use count is
  5126. non-zero then the default main context is iterated until the use count
  5127. falls to zero, at which point 0 is returned.
  5128. If the %G_APPLICATION_IS_SERVICE flag is set, then the service will
  5129. run for as much as 10 seconds with a use count of zero while waiting
  5130. for the message that caused the activation to arrive. After that,
  5131. if the use count falls to zero the application will exit immediately,
  5132. except in the case that g_application_set_inactivity_timeout() is in
  5133. use.
  5134. This function sets the prgname (g_set_prgname()), if not already set,
  5135. to the basename of argv[0].
  5136. Much like g_main_loop_run(), this function will acquire the main context
  5137. for the duration that the application is running.
  5138. Since 2.40, applications that are not explicitly flagged as services
  5139. or launchers (ie: neither %G_APPLICATION_IS_SERVICE or
  5140. %G_APPLICATION_IS_LAUNCHER are given as flags) will check (from the
  5141. default handler for local_command_line) if "--gapplication-service"
  5142. was given in the command line. If this flag is present then normal
  5143. commandline processing is interrupted and the
  5144. %G_APPLICATION_IS_SERVICE flag is set. This provides a "compromise"
  5145. solution whereby running an application directly from the commandline
  5146. will invoke it in the normal way (which can be useful for debugging)
  5147. while still allowing applications to be D-Bus activated in service
  5148. mode. The D-Bus service file should invoke the executable with
  5149. "--gapplication-service" as the sole commandline argument. This
  5150. approach is suitable for use by most graphical applications but
  5151. should not be used from applications like editors that need precise
  5152. control over when processes invoked via the commandline will exit and
  5153. what their exit status will be.</doc>
  5154. <return-value transfer-ownership="none">
  5155. <doc xml:space="preserve">the exit status</doc>
  5156. <type name="gint" c:type="int"/>
  5157. </return-value>
  5158. <parameters>
  5159. <instance-parameter name="application" transfer-ownership="none">
  5160. <doc xml:space="preserve">a #GApplication</doc>
  5161. <type name="Application" c:type="GApplication*"/>
  5162. </instance-parameter>
  5163. <parameter name="argc" transfer-ownership="none">
  5164. <doc xml:space="preserve">the argc from main() (or 0 if @argv is %NULL)</doc>
  5165. <type name="gint" c:type="int"/>
  5166. </parameter>
  5167. <parameter name="argv"
  5168. transfer-ownership="none"
  5169. nullable="1"
  5170. allow-none="1">
  5171. <doc xml:space="preserve">the argv from main(), or %NULL</doc>
  5172. <array length="0" zero-terminated="0" c:type="char**">
  5173. <type name="utf8" c:type="char*"/>
  5174. </array>
  5175. </parameter>
  5176. </parameters>
  5177. </method>
  5178. <method name="send_notification"
  5179. c:identifier="g_application_send_notification"
  5180. version="2.40">
  5181. <doc xml:space="preserve">Sends a notification on behalf of @application to the desktop shell.
  5182. There is no guarantee that the notification is displayed immediately,
  5183. or even at all.
  5184. Notifications may persist after the application exits. It will be
  5185. D-Bus-activated when the notification or one of its actions is
  5186. activated.
  5187. Modifying @notification after this call has no effect. However, the
  5188. object can be reused for a later call to this function.
  5189. @id may be any string that uniquely identifies the event for the
  5190. application. It does not need to be in any special format. For
  5191. example, "new-message" might be appropriate for a notification about
  5192. new messages.
  5193. If a previous notification was sent with the same @id, it will be
  5194. replaced with @notification and shown again as if it was a new
  5195. notification. This works even for notifications sent from a previous
  5196. execution of the application, as long as @id is the same string.
  5197. @id may be %NULL, but it is impossible to replace or withdraw
  5198. notifications without an id.
  5199. If @notification is no longer relevant, it can be withdrawn with
  5200. g_application_withdraw_notification().</doc>
  5201. <return-value transfer-ownership="none">
  5202. <type name="none" c:type="void"/>
  5203. </return-value>
  5204. <parameters>
  5205. <instance-parameter name="application" transfer-ownership="none">
  5206. <doc xml:space="preserve">a #GApplication</doc>
  5207. <type name="Application" c:type="GApplication*"/>
  5208. </instance-parameter>
  5209. <parameter name="id"
  5210. transfer-ownership="none"
  5211. nullable="1"
  5212. allow-none="1">
  5213. <doc xml:space="preserve">id of the notification, or %NULL</doc>
  5214. <type name="utf8" c:type="const gchar*"/>
  5215. </parameter>
  5216. <parameter name="notification" transfer-ownership="none">
  5217. <doc xml:space="preserve">the #GNotification to send</doc>
  5218. <type name="Notification" c:type="GNotification*"/>
  5219. </parameter>
  5220. </parameters>
  5221. </method>
  5222. <method name="set_action_group"
  5223. c:identifier="g_application_set_action_group"
  5224. version="2.28"
  5225. deprecated="1"
  5226. deprecated-version="2.32">
  5227. <doc xml:space="preserve">This used to be how actions were associated with a #GApplication.
  5228. Now there is #GActionMap for that.</doc>
  5229. <doc-deprecated xml:space="preserve">Use the #GActionMap interface instead. Never ever
  5230. mix use of this API with use of #GActionMap on the same @application
  5231. or things will go very badly wrong. This function is known to
  5232. introduce buggy behaviour (ie: signals not emitted on changes to the
  5233. action group), so you should really use #GActionMap instead.</doc-deprecated>
  5234. <return-value transfer-ownership="none">
  5235. <type name="none" c:type="void"/>
  5236. </return-value>
  5237. <parameters>
  5238. <instance-parameter name="application" transfer-ownership="none">
  5239. <doc xml:space="preserve">a #GApplication</doc>
  5240. <type name="Application" c:type="GApplication*"/>
  5241. </instance-parameter>
  5242. <parameter name="action_group"
  5243. transfer-ownership="none"
  5244. nullable="1"
  5245. allow-none="1">
  5246. <doc xml:space="preserve">a #GActionGroup, or %NULL</doc>
  5247. <type name="ActionGroup" c:type="GActionGroup*"/>
  5248. </parameter>
  5249. </parameters>
  5250. </method>
  5251. <method name="set_application_id"
  5252. c:identifier="g_application_set_application_id"
  5253. version="2.28">
  5254. <doc xml:space="preserve">Sets the unique identifier for @application.
  5255. The application id can only be modified if @application has not yet
  5256. been registered.
  5257. If non-%NULL, the application id must be valid. See
  5258. g_application_id_is_valid().</doc>
  5259. <return-value transfer-ownership="none">
  5260. <type name="none" c:type="void"/>
  5261. </return-value>
  5262. <parameters>
  5263. <instance-parameter name="application" transfer-ownership="none">
  5264. <doc xml:space="preserve">a #GApplication</doc>
  5265. <type name="Application" c:type="GApplication*"/>
  5266. </instance-parameter>
  5267. <parameter name="application_id"
  5268. transfer-ownership="none"
  5269. nullable="1"
  5270. allow-none="1">
  5271. <doc xml:space="preserve">the identifier for @application</doc>
  5272. <type name="utf8" c:type="const gchar*"/>
  5273. </parameter>
  5274. </parameters>
  5275. </method>
  5276. <method name="set_default"
  5277. c:identifier="g_application_set_default"
  5278. version="2.32">
  5279. <doc xml:space="preserve">Sets or unsets the default application for the process, as returned
  5280. by g_application_get_default().
  5281. This function does not take its own reference on @application. If
  5282. @application is destroyed then the default application will revert
  5283. back to %NULL.</doc>
  5284. <return-value transfer-ownership="none">
  5285. <type name="none" c:type="void"/>
  5286. </return-value>
  5287. <parameters>
  5288. <instance-parameter name="application"
  5289. transfer-ownership="none"
  5290. nullable="1"
  5291. allow-none="1">
  5292. <doc xml:space="preserve">the application to set as default, or %NULL</doc>
  5293. <type name="Application" c:type="GApplication*"/>
  5294. </instance-parameter>
  5295. </parameters>
  5296. </method>
  5297. <method name="set_flags"
  5298. c:identifier="g_application_set_flags"
  5299. version="2.28">
  5300. <doc xml:space="preserve">Sets the flags for @application.
  5301. The flags can only be modified if @application has not yet been
  5302. registered.
  5303. See #GApplicationFlags.</doc>
  5304. <return-value transfer-ownership="none">
  5305. <type name="none" c:type="void"/>
  5306. </return-value>
  5307. <parameters>
  5308. <instance-parameter name="application" transfer-ownership="none">
  5309. <doc xml:space="preserve">a #GApplication</doc>
  5310. <type name="Application" c:type="GApplication*"/>
  5311. </instance-parameter>
  5312. <parameter name="flags" transfer-ownership="none">
  5313. <doc xml:space="preserve">the flags for @application</doc>
  5314. <type name="ApplicationFlags" c:type="GApplicationFlags"/>
  5315. </parameter>
  5316. </parameters>
  5317. </method>
  5318. <method name="set_inactivity_timeout"
  5319. c:identifier="g_application_set_inactivity_timeout"
  5320. version="2.28">
  5321. <doc xml:space="preserve">Sets the current inactivity timeout for the application.
  5322. This is the amount of time (in milliseconds) after the last call to
  5323. g_application_release() before the application stops running.
  5324. This call has no side effects of its own. The value set here is only
  5325. used for next time g_application_release() drops the use count to
  5326. zero. Any timeouts currently in progress are not impacted.</doc>
  5327. <return-value transfer-ownership="none">
  5328. <type name="none" c:type="void"/>
  5329. </return-value>
  5330. <parameters>
  5331. <instance-parameter name="application" transfer-ownership="none">
  5332. <doc xml:space="preserve">a #GApplication</doc>
  5333. <type name="Application" c:type="GApplication*"/>
  5334. </instance-parameter>
  5335. <parameter name="inactivity_timeout" transfer-ownership="none">
  5336. <doc xml:space="preserve">the timeout, in milliseconds</doc>
  5337. <type name="guint" c:type="guint"/>
  5338. </parameter>
  5339. </parameters>
  5340. </method>
  5341. <method name="set_resource_base_path"
  5342. c:identifier="g_application_set_resource_base_path"
  5343. version="2.42">
  5344. <doc xml:space="preserve">Sets (or unsets) the base resource path of @application.
  5345. The path is used to automatically load various [application
  5346. resources][gresource] such as menu layouts and action descriptions.
  5347. The various types of resources will be found at fixed names relative
  5348. to the given base path.
  5349. By default, the resource base path is determined from the application
  5350. ID by prefixing '/' and replacing each '.' with '/'. This is done at
  5351. the time that the #GApplication object is constructed. Changes to
  5352. the application ID after that point will not have an impact on the
  5353. resource base path.
  5354. As an example, if the application has an ID of "org.example.app" then
  5355. the default resource base path will be "/org/example/app". If this
  5356. is a #GtkApplication (and you have not manually changed the path)
  5357. then Gtk will then search for the menus of the application at
  5358. "/org/example/app/gtk/menus.ui".
  5359. See #GResource for more information about adding resources to your
  5360. application.
  5361. You can disable automatic resource loading functionality by setting
  5362. the path to %NULL.
  5363. Changing the resource base path once the application is running is
  5364. not recommended. The point at which the resource path is consulted
  5365. for forming paths for various purposes is unspecified. When writing
  5366. a sub-class of #GApplication you should either set the
  5367. #GApplication:resource-base-path property at construction time, or call
  5368. this function during the instance initialization. Alternatively, you
  5369. can call this function in the #GApplicationClass.startup virtual function,
  5370. before chaining up to the parent implementation.</doc>
  5371. <return-value transfer-ownership="none">
  5372. <type name="none" c:type="void"/>
  5373. </return-value>
  5374. <parameters>
  5375. <instance-parameter name="application" transfer-ownership="none">
  5376. <doc xml:space="preserve">a #GApplication</doc>
  5377. <type name="Application" c:type="GApplication*"/>
  5378. </instance-parameter>
  5379. <parameter name="resource_path"
  5380. transfer-ownership="none"
  5381. nullable="1"
  5382. allow-none="1">
  5383. <doc xml:space="preserve">the resource path to use</doc>
  5384. <type name="utf8" c:type="const gchar*"/>
  5385. </parameter>
  5386. </parameters>
  5387. </method>
  5388. <method name="unbind_busy_property"
  5389. c:identifier="g_application_unbind_busy_property"
  5390. version="2.44">
  5391. <doc xml:space="preserve">Destroys a binding between @property and the busy state of
  5392. @application that was previously created with
  5393. g_application_bind_busy_property().</doc>
  5394. <return-value transfer-ownership="none">
  5395. <type name="none" c:type="void"/>
  5396. </return-value>
  5397. <parameters>
  5398. <instance-parameter name="application" transfer-ownership="none">
  5399. <doc xml:space="preserve">a #GApplication</doc>
  5400. <type name="Application" c:type="GApplication*"/>
  5401. </instance-parameter>
  5402. <parameter name="object" transfer-ownership="none">
  5403. <doc xml:space="preserve">a #GObject</doc>
  5404. <type name="GObject.Object" c:type="gpointer"/>
  5405. </parameter>
  5406. <parameter name="property" transfer-ownership="none">
  5407. <doc xml:space="preserve">the name of a boolean property of @object</doc>
  5408. <type name="utf8" c:type="const gchar*"/>
  5409. </parameter>
  5410. </parameters>
  5411. </method>
  5412. <method name="unmark_busy"
  5413. c:identifier="g_application_unmark_busy"
  5414. version="2.38">
  5415. <doc xml:space="preserve">Decreases the busy count of @application.
  5416. When the busy count reaches zero, the new state will be propagated
  5417. to other processes.
  5418. This function must only be called to cancel the effect of a previous
  5419. call to g_application_mark_busy().</doc>
  5420. <return-value transfer-ownership="none">
  5421. <type name="none" c:type="void"/>
  5422. </return-value>
  5423. <parameters>
  5424. <instance-parameter name="application" transfer-ownership="none">
  5425. <doc xml:space="preserve">a #GApplication</doc>
  5426. <type name="Application" c:type="GApplication*"/>
  5427. </instance-parameter>
  5428. </parameters>
  5429. </method>
  5430. <method name="withdraw_notification"
  5431. c:identifier="g_application_withdraw_notification"
  5432. version="2.40">
  5433. <doc xml:space="preserve">Withdraws a notification that was sent with
  5434. g_application_send_notification().
  5435. This call does nothing if a notification with @id doesn't exist or
  5436. the notification was never sent.
  5437. This function works even for notifications sent in previous
  5438. executions of this application, as long @id is the same as it was for
  5439. the sent notification.
  5440. Note that notifications are dismissed when the user clicks on one
  5441. of the buttons in a notification or triggers its default action, so
  5442. there is no need to explicitly withdraw the notification in that case.</doc>
  5443. <return-value transfer-ownership="none">
  5444. <type name="none" c:type="void"/>
  5445. </return-value>
  5446. <parameters>
  5447. <instance-parameter name="application" transfer-ownership="none">
  5448. <doc xml:space="preserve">a #GApplication</doc>
  5449. <type name="Application" c:type="GApplication*"/>
  5450. </instance-parameter>
  5451. <parameter name="id" transfer-ownership="none">
  5452. <doc xml:space="preserve">id of a previously sent notification</doc>
  5453. <type name="utf8" c:type="const gchar*"/>
  5454. </parameter>
  5455. </parameters>
  5456. </method>
  5457. <property name="action-group"
  5458. readable="0"
  5459. writable="1"
  5460. transfer-ownership="none">
  5461. <type name="ActionGroup"/>
  5462. </property>
  5463. <property name="application-id"
  5464. writable="1"
  5465. construct="1"
  5466. transfer-ownership="none">
  5467. <type name="utf8" c:type="gchar*"/>
  5468. </property>
  5469. <property name="flags" writable="1" transfer-ownership="none">
  5470. <type name="ApplicationFlags"/>
  5471. </property>
  5472. <property name="inactivity-timeout"
  5473. writable="1"
  5474. transfer-ownership="none">
  5475. <type name="guint" c:type="guint"/>
  5476. </property>
  5477. <property name="is-busy" version="2.44" transfer-ownership="none">
  5478. <doc xml:space="preserve">Whether the application is currently marked as busy through
  5479. g_application_mark_busy() or g_application_bind_busy_property().</doc>
  5480. <type name="gboolean" c:type="gboolean"/>
  5481. </property>
  5482. <property name="is-registered" transfer-ownership="none">
  5483. <type name="gboolean" c:type="gboolean"/>
  5484. </property>
  5485. <property name="is-remote" transfer-ownership="none">
  5486. <type name="gboolean" c:type="gboolean"/>
  5487. </property>
  5488. <property name="resource-base-path"
  5489. writable="1"
  5490. transfer-ownership="none">
  5491. <type name="utf8" c:type="gchar*"/>
  5492. </property>
  5493. <field name="parent_instance" readable="0" private="1">
  5494. <type name="GObject.Object" c:type="GObject"/>
  5495. </field>
  5496. <field name="priv" readable="0" private="1">
  5497. <type name="ApplicationPrivate" c:type="GApplicationPrivate*"/>
  5498. </field>
  5499. <glib:signal name="activate" when="last">
  5500. <doc xml:space="preserve">The ::activate signal is emitted on the primary instance when an
  5501. activation occurs. See g_application_activate().</doc>
  5502. <return-value transfer-ownership="none">
  5503. <type name="none" c:type="void"/>
  5504. </return-value>
  5505. </glib:signal>
  5506. <glib:signal name="command-line" when="last">
  5507. <doc xml:space="preserve">The ::command-line signal is emitted on the primary instance when
  5508. a commandline is not handled locally. See g_application_run() and
  5509. the #GApplicationCommandLine documentation for more information.</doc>
  5510. <return-value transfer-ownership="none">
  5511. <doc xml:space="preserve">An integer that is set as the exit status for the calling
  5512. process. See g_application_command_line_set_exit_status().</doc>
  5513. <type name="gint" c:type="gint"/>
  5514. </return-value>
  5515. <parameters>
  5516. <parameter name="command_line" transfer-ownership="none">
  5517. <doc xml:space="preserve">a #GApplicationCommandLine representing the
  5518. passed commandline</doc>
  5519. <type name="ApplicationCommandLine"/>
  5520. </parameter>
  5521. </parameters>
  5522. </glib:signal>
  5523. <glib:signal name="handle-local-options" when="last" version="2.40">
  5524. <doc xml:space="preserve">The ::handle-local-options signal is emitted on the local instance
  5525. after the parsing of the commandline options has occurred.
  5526. You can add options to be recognised during commandline option
  5527. parsing using g_application_add_main_option_entries() and
  5528. g_application_add_option_group().
  5529. Signal handlers can inspect @options (along with values pointed to
  5530. from the @arg_data of an installed #GOptionEntrys) in order to
  5531. decide to perform certain actions, including direct local handling
  5532. (which may be useful for options like --version).
  5533. In the event that the application is marked
  5534. %G_APPLICATION_HANDLES_COMMAND_LINE the "normal processing" will
  5535. send the @options dictionary to the primary instance where it can be
  5536. read with g_application_command_line_get_options_dict(). The signal
  5537. handler can modify the dictionary before returning, and the
  5538. modified dictionary will be sent.
  5539. In the event that %G_APPLICATION_HANDLES_COMMAND_LINE is not set,
  5540. "normal processing" will treat the remaining uncollected command
  5541. line arguments as filenames or URIs. If there are no arguments,
  5542. the application is activated by g_application_activate(). One or
  5543. more arguments results in a call to g_application_open().
  5544. If you want to handle the local commandline arguments for yourself
  5545. by converting them to calls to g_application_open() or
  5546. g_action_group_activate_action() then you must be sure to register
  5547. the application first. You should probably not call
  5548. g_application_activate() for yourself, however: just return -1 and
  5549. allow the default handler to do it for you. This will ensure that
  5550. the `--gapplication-service` switch works properly (i.e. no activation
  5551. in that case).
  5552. Note that this signal is emitted from the default implementation of
  5553. local_command_line(). If you override that function and don't
  5554. chain up then this signal will never be emitted.
  5555. You can override local_command_line() if you need more powerful
  5556. capabilities than what is provided here, but this should not
  5557. normally be required.</doc>
  5558. <return-value transfer-ownership="none">
  5559. <doc xml:space="preserve">an exit code. If you have handled your options and want
  5560. to exit the process, return a non-negative option, 0 for success,
  5561. and a positive value for failure. To continue, return -1 to let
  5562. the default option processing continue.</doc>
  5563. <type name="gint" c:type="gint"/>
  5564. </return-value>
  5565. <parameters>
  5566. <parameter name="options" transfer-ownership="none">
  5567. <doc xml:space="preserve">the options dictionary</doc>
  5568. <type name="GLib.VariantDict"/>
  5569. </parameter>
  5570. </parameters>
  5571. </glib:signal>
  5572. <glib:signal name="open" when="last">
  5573. <doc xml:space="preserve">The ::open signal is emitted on the primary instance when there are
  5574. files to open. See g_application_open() for more information.</doc>
  5575. <return-value transfer-ownership="none">
  5576. <type name="none" c:type="void"/>
  5577. </return-value>
  5578. <parameters>
  5579. <parameter name="files" transfer-ownership="none">
  5580. <doc xml:space="preserve">an array of #GFiles</doc>
  5581. <array length="1" zero-terminated="0" c:type="gpointer">
  5582. <type name="File"/>
  5583. </array>
  5584. </parameter>
  5585. <parameter name="n_files" transfer-ownership="none">
  5586. <doc xml:space="preserve">the length of @files</doc>
  5587. <type name="gint" c:type="gint"/>
  5588. </parameter>
  5589. <parameter name="hint" transfer-ownership="none">
  5590. <doc xml:space="preserve">a hint provided by the calling instance</doc>
  5591. <type name="utf8" c:type="gchar*"/>
  5592. </parameter>
  5593. </parameters>
  5594. </glib:signal>
  5595. <glib:signal name="shutdown" when="last">
  5596. <doc xml:space="preserve">The ::shutdown signal is emitted only on the registered primary instance
  5597. immediately after the main loop terminates.</doc>
  5598. <return-value transfer-ownership="none">
  5599. <type name="none" c:type="void"/>
  5600. </return-value>
  5601. </glib:signal>
  5602. <glib:signal name="startup" when="first">
  5603. <doc xml:space="preserve">The ::startup signal is emitted on the primary instance immediately
  5604. after registration. See g_application_register().</doc>
  5605. <return-value transfer-ownership="none">
  5606. <type name="none" c:type="void"/>
  5607. </return-value>
  5608. </glib:signal>
  5609. </class>
  5610. <record name="ApplicationClass"
  5611. c:type="GApplicationClass"
  5612. glib:is-gtype-struct-for="Application"
  5613. version="2.28">
  5614. <doc xml:space="preserve">Virtual function table for #GApplication.</doc>
  5615. <field name="parent_class" readable="0" private="1">
  5616. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  5617. </field>
  5618. <field name="startup">
  5619. <callback name="startup">
  5620. <return-value transfer-ownership="none">
  5621. <type name="none" c:type="void"/>
  5622. </return-value>
  5623. <parameters>
  5624. <parameter name="application" transfer-ownership="none">
  5625. <type name="Application" c:type="GApplication*"/>
  5626. </parameter>
  5627. </parameters>
  5628. </callback>
  5629. </field>
  5630. <field name="activate">
  5631. <callback name="activate">
  5632. <return-value transfer-ownership="none">
  5633. <type name="none" c:type="void"/>
  5634. </return-value>
  5635. <parameters>
  5636. <parameter name="application" transfer-ownership="none">
  5637. <doc xml:space="preserve">a #GApplication</doc>
  5638. <type name="Application" c:type="GApplication*"/>
  5639. </parameter>
  5640. </parameters>
  5641. </callback>
  5642. </field>
  5643. <field name="open">
  5644. <callback name="open">
  5645. <return-value transfer-ownership="none">
  5646. <type name="none" c:type="void"/>
  5647. </return-value>
  5648. <parameters>
  5649. <parameter name="application" transfer-ownership="none">
  5650. <doc xml:space="preserve">a #GApplication</doc>
  5651. <type name="Application" c:type="GApplication*"/>
  5652. </parameter>
  5653. <parameter name="files" transfer-ownership="none">
  5654. <doc xml:space="preserve">an array of #GFiles to open</doc>
  5655. <array length="2" zero-terminated="0" c:type="GFile**">
  5656. <type name="File" c:type="GFile*"/>
  5657. </array>
  5658. </parameter>
  5659. <parameter name="n_files" transfer-ownership="none">
  5660. <doc xml:space="preserve">the length of the @files array</doc>
  5661. <type name="gint" c:type="gint"/>
  5662. </parameter>
  5663. <parameter name="hint" transfer-ownership="none">
  5664. <doc xml:space="preserve">a hint (or ""), but never %NULL</doc>
  5665. <type name="utf8" c:type="const gchar*"/>
  5666. </parameter>
  5667. </parameters>
  5668. </callback>
  5669. </field>
  5670. <field name="command_line">
  5671. <callback name="command_line">
  5672. <return-value transfer-ownership="none">
  5673. <type name="gint" c:type="int"/>
  5674. </return-value>
  5675. <parameters>
  5676. <parameter name="application" transfer-ownership="none">
  5677. <type name="Application" c:type="GApplication*"/>
  5678. </parameter>
  5679. <parameter name="command_line" transfer-ownership="none">
  5680. <type name="ApplicationCommandLine"
  5681. c:type="GApplicationCommandLine*"/>
  5682. </parameter>
  5683. </parameters>
  5684. </callback>
  5685. </field>
  5686. <field name="local_command_line">
  5687. <callback name="local_command_line">
  5688. <return-value transfer-ownership="none">
  5689. <doc xml:space="preserve">%TRUE if the commandline has been completely handled</doc>
  5690. <type name="gboolean" c:type="gboolean"/>
  5691. </return-value>
  5692. <parameters>
  5693. <parameter name="application" transfer-ownership="none">
  5694. <doc xml:space="preserve">a #GApplication</doc>
  5695. <type name="Application" c:type="GApplication*"/>
  5696. </parameter>
  5697. <parameter name="arguments"
  5698. direction="inout"
  5699. caller-allocates="0"
  5700. transfer-ownership="full">
  5701. <doc xml:space="preserve">array of command line arguments</doc>
  5702. <array c:type="gchar***">
  5703. <type name="utf8" c:type="gchar**"/>
  5704. </array>
  5705. </parameter>
  5706. <parameter name="exit_status"
  5707. direction="out"
  5708. caller-allocates="0"
  5709. transfer-ownership="full">
  5710. <doc xml:space="preserve">exit status to fill after processing the command line.</doc>
  5711. <type name="gint" c:type="int*"/>
  5712. </parameter>
  5713. </parameters>
  5714. </callback>
  5715. </field>
  5716. <field name="before_emit">
  5717. <callback name="before_emit">
  5718. <return-value transfer-ownership="none">
  5719. <type name="none" c:type="void"/>
  5720. </return-value>
  5721. <parameters>
  5722. <parameter name="application" transfer-ownership="none">
  5723. <type name="Application" c:type="GApplication*"/>
  5724. </parameter>
  5725. <parameter name="platform_data" transfer-ownership="none">
  5726. <type name="GLib.Variant" c:type="GVariant*"/>
  5727. </parameter>
  5728. </parameters>
  5729. </callback>
  5730. </field>
  5731. <field name="after_emit">
  5732. <callback name="after_emit">
  5733. <return-value transfer-ownership="none">
  5734. <type name="none" c:type="void"/>
  5735. </return-value>
  5736. <parameters>
  5737. <parameter name="application" transfer-ownership="none">
  5738. <type name="Application" c:type="GApplication*"/>
  5739. </parameter>
  5740. <parameter name="platform_data" transfer-ownership="none">
  5741. <type name="GLib.Variant" c:type="GVariant*"/>
  5742. </parameter>
  5743. </parameters>
  5744. </callback>
  5745. </field>
  5746. <field name="add_platform_data">
  5747. <callback name="add_platform_data">
  5748. <return-value transfer-ownership="none">
  5749. <type name="none" c:type="void"/>
  5750. </return-value>
  5751. <parameters>
  5752. <parameter name="application" transfer-ownership="none">
  5753. <type name="Application" c:type="GApplication*"/>
  5754. </parameter>
  5755. <parameter name="builder" transfer-ownership="none">
  5756. <type name="GLib.VariantBuilder" c:type="GVariantBuilder*"/>
  5757. </parameter>
  5758. </parameters>
  5759. </callback>
  5760. </field>
  5761. <field name="quit_mainloop">
  5762. <callback name="quit_mainloop">
  5763. <return-value transfer-ownership="none">
  5764. <type name="none" c:type="void"/>
  5765. </return-value>
  5766. <parameters>
  5767. <parameter name="application" transfer-ownership="none">
  5768. <type name="Application" c:type="GApplication*"/>
  5769. </parameter>
  5770. </parameters>
  5771. </callback>
  5772. </field>
  5773. <field name="run_mainloop">
  5774. <callback name="run_mainloop">
  5775. <return-value transfer-ownership="none">
  5776. <type name="none" c:type="void"/>
  5777. </return-value>
  5778. <parameters>
  5779. <parameter name="application" transfer-ownership="none">
  5780. <type name="Application" c:type="GApplication*"/>
  5781. </parameter>
  5782. </parameters>
  5783. </callback>
  5784. </field>
  5785. <field name="shutdown">
  5786. <callback name="shutdown">
  5787. <return-value transfer-ownership="none">
  5788. <type name="none" c:type="void"/>
  5789. </return-value>
  5790. <parameters>
  5791. <parameter name="application" transfer-ownership="none">
  5792. <type name="Application" c:type="GApplication*"/>
  5793. </parameter>
  5794. </parameters>
  5795. </callback>
  5796. </field>
  5797. <field name="dbus_register">
  5798. <callback name="dbus_register" throws="1">
  5799. <return-value transfer-ownership="none">
  5800. <type name="gboolean" c:type="gboolean"/>
  5801. </return-value>
  5802. <parameters>
  5803. <parameter name="application" transfer-ownership="none">
  5804. <type name="Application" c:type="GApplication*"/>
  5805. </parameter>
  5806. <parameter name="connection" transfer-ownership="none">
  5807. <type name="DBusConnection" c:type="GDBusConnection*"/>
  5808. </parameter>
  5809. <parameter name="object_path" transfer-ownership="none">
  5810. <type name="utf8" c:type="const gchar*"/>
  5811. </parameter>
  5812. </parameters>
  5813. </callback>
  5814. </field>
  5815. <field name="dbus_unregister">
  5816. <callback name="dbus_unregister">
  5817. <return-value transfer-ownership="none">
  5818. <type name="none" c:type="void"/>
  5819. </return-value>
  5820. <parameters>
  5821. <parameter name="application" transfer-ownership="none">
  5822. <type name="Application" c:type="GApplication*"/>
  5823. </parameter>
  5824. <parameter name="connection" transfer-ownership="none">
  5825. <type name="DBusConnection" c:type="GDBusConnection*"/>
  5826. </parameter>
  5827. <parameter name="object_path" transfer-ownership="none">
  5828. <type name="utf8" c:type="const gchar*"/>
  5829. </parameter>
  5830. </parameters>
  5831. </callback>
  5832. </field>
  5833. <field name="handle_local_options">
  5834. <callback name="handle_local_options">
  5835. <return-value transfer-ownership="none">
  5836. <type name="gint" c:type="gint"/>
  5837. </return-value>
  5838. <parameters>
  5839. <parameter name="application" transfer-ownership="none">
  5840. <type name="Application" c:type="GApplication*"/>
  5841. </parameter>
  5842. <parameter name="options" transfer-ownership="none">
  5843. <type name="GLib.VariantDict" c:type="GVariantDict*"/>
  5844. </parameter>
  5845. </parameters>
  5846. </callback>
  5847. </field>
  5848. <field name="padding" readable="0" private="1">
  5849. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  5850. <type name="gpointer" c:type="gpointer"/>
  5851. </array>
  5852. </field>
  5853. </record>
  5854. <class name="ApplicationCommandLine"
  5855. c:symbol-prefix="application_command_line"
  5856. c:type="GApplicationCommandLine"
  5857. parent="GObject.Object"
  5858. glib:type-name="GApplicationCommandLine"
  5859. glib:get-type="g_application_command_line_get_type"
  5860. glib:type-struct="ApplicationCommandLineClass">
  5861. <doc xml:space="preserve">#GApplicationCommandLine represents a command-line invocation of
  5862. an application. It is created by #GApplication and emitted
  5863. in the #GApplication::command-line signal and virtual function.
  5864. The class contains the list of arguments that the program was invoked
  5865. with. It is also possible to query if the commandline invocation was
  5866. local (ie: the current process is running in direct response to the
  5867. invocation) or remote (ie: some other process forwarded the
  5868. commandline to this process).
  5869. The GApplicationCommandLine object can provide the @argc and @argv
  5870. parameters for use with the #GOptionContext command-line parsing API,
  5871. with the g_application_command_line_get_arguments() function. See
  5872. [gapplication-example-cmdline3.c][gapplication-example-cmdline3]
  5873. for an example.
  5874. The exit status of the originally-invoked process may be set and
  5875. messages can be printed to stdout or stderr of that process. The
  5876. lifecycle of the originally-invoked process is tied to the lifecycle
  5877. of this object (ie: the process exits when the last reference is
  5878. dropped).
  5879. The main use for #GApplicationCommandLine (and the
  5880. #GApplication::command-line signal) is 'Emacs server' like use cases:
  5881. You can set the `EDITOR` environment variable to have e.g. git use
  5882. your favourite editor to edit commit messages, and if you already
  5883. have an instance of the editor running, the editing will happen
  5884. in the running instance, instead of opening a new one. An important
  5885. aspect of this use case is that the process that gets started by git
  5886. does not return until the editing is done.
  5887. Normally, the commandline is completely handled in the
  5888. #GApplication::command-line handler. The launching instance exits
  5889. once the signal handler in the primary instance has returned, and
  5890. the return value of the signal handler becomes the exit status
  5891. of the launching instance.
  5892. |[&lt;!-- language="C" --&gt;
  5893. static int
  5894. command_line (GApplication *application,
  5895. GApplicationCommandLine *cmdline)
  5896. {
  5897. gchar **argv;
  5898. gint argc;
  5899. gint i;
  5900. argv = g_application_command_line_get_arguments (cmdline, &amp;argc);
  5901. g_application_command_line_print (cmdline,
  5902. "This text is written back\n"
  5903. "to stdout of the caller\n");
  5904. for (i = 0; i &lt; argc; i++)
  5905. g_print ("argument %d: %s\n", i, argv[i]);
  5906. g_strfreev (argv);
  5907. return 0;
  5908. }
  5909. ]|
  5910. The complete example can be found here:
  5911. [gapplication-example-cmdline.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline.c)
  5912. In more complicated cases, the handling of the comandline can be
  5913. split between the launcher and the primary instance.
  5914. |[&lt;!-- language="C" --&gt;
  5915. static gboolean
  5916. test_local_cmdline (GApplication *application,
  5917. gchar ***arguments,
  5918. gint *exit_status)
  5919. {
  5920. gint i, j;
  5921. gchar **argv;
  5922. argv = *arguments;
  5923. i = 1;
  5924. while (argv[i])
  5925. {
  5926. if (g_str_has_prefix (argv[i], "--local-"))
  5927. {
  5928. g_print ("handling argument %s locally\n", argv[i]);
  5929. g_free (argv[i]);
  5930. for (j = i; argv[j]; j++)
  5931. argv[j] = argv[j + 1];
  5932. }
  5933. else
  5934. {
  5935. g_print ("not handling argument %s locally\n", argv[i]);
  5936. i++;
  5937. }
  5938. }
  5939. *exit_status = 0;
  5940. return FALSE;
  5941. }
  5942. static void
  5943. test_application_class_init (TestApplicationClass *class)
  5944. {
  5945. G_APPLICATION_CLASS (class)-&gt;local_command_line = test_local_cmdline;
  5946. ...
  5947. }
  5948. ]|
  5949. In this example of split commandline handling, options that start
  5950. with `--local-` are handled locally, all other options are passed
  5951. to the #GApplication::command-line handler which runs in the primary
  5952. instance.
  5953. The complete example can be found here:
  5954. [gapplication-example-cmdline2.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline2.c)
  5955. If handling the commandline requires a lot of work, it may
  5956. be better to defer it.
  5957. |[&lt;!-- language="C" --&gt;
  5958. static gboolean
  5959. my_cmdline_handler (gpointer data)
  5960. {
  5961. GApplicationCommandLine *cmdline = data;
  5962. // do the heavy lifting in an idle
  5963. g_application_command_line_set_exit_status (cmdline, 0);
  5964. g_object_unref (cmdline); // this releases the application
  5965. return G_SOURCE_REMOVE;
  5966. }
  5967. static int
  5968. command_line (GApplication *application,
  5969. GApplicationCommandLine *cmdline)
  5970. {
  5971. // keep the application running until we are done with this commandline
  5972. g_application_hold (application);
  5973. g_object_set_data_full (G_OBJECT (cmdline),
  5974. "application", application,
  5975. (GDestroyNotify)g_application_release);
  5976. g_object_ref (cmdline);
  5977. g_idle_add (my_cmdline_handler, cmdline);
  5978. return 0;
  5979. }
  5980. ]|
  5981. In this example the commandline is not completely handled before
  5982. the #GApplication::command-line handler returns. Instead, we keep
  5983. a reference to the #GApplicationCommandLine object and handle it
  5984. later (in this example, in an idle). Note that it is necessary to
  5985. hold the application until you are done with the commandline.
  5986. The complete example can be found here:
  5987. [gapplication-example-cmdline3.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline3.c)</doc>
  5988. <virtual-method name="get_stdin" invoker="get_stdin" version="2.34">
  5989. <doc xml:space="preserve">Gets the stdin of the invoking process.
  5990. The #GInputStream can be used to read data passed to the standard
  5991. input of the invoking process.
  5992. This doesn't work on all platforms. Presently, it is only available
  5993. on UNIX when using a DBus daemon capable of passing file descriptors.
  5994. If stdin is not available then %NULL will be returned. In the
  5995. future, support may be expanded to other platforms.
  5996. You must only call this function once per commandline invocation.</doc>
  5997. <return-value transfer-ownership="full">
  5998. <doc xml:space="preserve">a #GInputStream for stdin</doc>
  5999. <type name="InputStream" c:type="GInputStream*"/>
  6000. </return-value>
  6001. <parameters>
  6002. <instance-parameter name="cmdline" transfer-ownership="none">
  6003. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6004. <type name="ApplicationCommandLine"
  6005. c:type="GApplicationCommandLine*"/>
  6006. </instance-parameter>
  6007. </parameters>
  6008. </virtual-method>
  6009. <virtual-method name="print_literal">
  6010. <return-value transfer-ownership="none">
  6011. <type name="none" c:type="void"/>
  6012. </return-value>
  6013. <parameters>
  6014. <instance-parameter name="cmdline" transfer-ownership="none">
  6015. <type name="ApplicationCommandLine"
  6016. c:type="GApplicationCommandLine*"/>
  6017. </instance-parameter>
  6018. <parameter name="message" transfer-ownership="none">
  6019. <type name="utf8" c:type="const gchar*"/>
  6020. </parameter>
  6021. </parameters>
  6022. </virtual-method>
  6023. <virtual-method name="printerr_literal">
  6024. <return-value transfer-ownership="none">
  6025. <type name="none" c:type="void"/>
  6026. </return-value>
  6027. <parameters>
  6028. <instance-parameter name="cmdline" transfer-ownership="none">
  6029. <type name="ApplicationCommandLine"
  6030. c:type="GApplicationCommandLine*"/>
  6031. </instance-parameter>
  6032. <parameter name="message" transfer-ownership="none">
  6033. <type name="utf8" c:type="const gchar*"/>
  6034. </parameter>
  6035. </parameters>
  6036. </virtual-method>
  6037. <method name="create_file_for_arg"
  6038. c:identifier="g_application_command_line_create_file_for_arg"
  6039. version="2.36">
  6040. <doc xml:space="preserve">Creates a #GFile corresponding to a filename that was given as part
  6041. of the invocation of @cmdline.
  6042. This differs from g_file_new_for_commandline_arg() in that it
  6043. resolves relative pathnames using the current working directory of
  6044. the invoking process rather than the local process.</doc>
  6045. <return-value transfer-ownership="full">
  6046. <doc xml:space="preserve">a new #GFile</doc>
  6047. <type name="File" c:type="GFile*"/>
  6048. </return-value>
  6049. <parameters>
  6050. <instance-parameter name="cmdline" transfer-ownership="none">
  6051. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6052. <type name="ApplicationCommandLine"
  6053. c:type="GApplicationCommandLine*"/>
  6054. </instance-parameter>
  6055. <parameter name="arg" transfer-ownership="none">
  6056. <doc xml:space="preserve">an argument from @cmdline</doc>
  6057. <type name="utf8" c:type="const gchar*"/>
  6058. </parameter>
  6059. </parameters>
  6060. </method>
  6061. <method name="get_arguments"
  6062. c:identifier="g_application_command_line_get_arguments"
  6063. version="2.28">
  6064. <doc xml:space="preserve">Gets the list of arguments that was passed on the command line.
  6065. The strings in the array may contain non-UTF-8 data on UNIX (such as
  6066. filenames or arguments given in the system locale) but are always in
  6067. UTF-8 on Windows.
  6068. If you wish to use the return value with #GOptionContext, you must
  6069. use g_option_context_parse_strv().
  6070. The return value is %NULL-terminated and should be freed using
  6071. g_strfreev().</doc>
  6072. <return-value transfer-ownership="full">
  6073. <doc xml:space="preserve">the string array
  6074. containing the arguments (the argv)</doc>
  6075. <array length="0" zero-terminated="0" c:type="gchar**">
  6076. <type name="utf8"/>
  6077. </array>
  6078. </return-value>
  6079. <parameters>
  6080. <instance-parameter name="cmdline" transfer-ownership="none">
  6081. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6082. <type name="ApplicationCommandLine"
  6083. c:type="GApplicationCommandLine*"/>
  6084. </instance-parameter>
  6085. <parameter name="argc"
  6086. direction="out"
  6087. caller-allocates="0"
  6088. transfer-ownership="full"
  6089. optional="1"
  6090. allow-none="1">
  6091. <doc xml:space="preserve">the length of the arguments array, or %NULL</doc>
  6092. <type name="gint" c:type="int*"/>
  6093. </parameter>
  6094. </parameters>
  6095. </method>
  6096. <method name="get_cwd"
  6097. c:identifier="g_application_command_line_get_cwd"
  6098. version="2.28">
  6099. <doc xml:space="preserve">Gets the working directory of the command line invocation.
  6100. The string may contain non-utf8 data.
  6101. It is possible that the remote application did not send a working
  6102. directory, so this may be %NULL.
  6103. The return value should not be modified or freed and is valid for as
  6104. long as @cmdline exists.</doc>
  6105. <return-value transfer-ownership="none">
  6106. <doc xml:space="preserve">the current directory, or %NULL</doc>
  6107. <type name="utf8" c:type="const gchar*"/>
  6108. </return-value>
  6109. <parameters>
  6110. <instance-parameter name="cmdline" transfer-ownership="none">
  6111. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6112. <type name="ApplicationCommandLine"
  6113. c:type="GApplicationCommandLine*"/>
  6114. </instance-parameter>
  6115. </parameters>
  6116. </method>
  6117. <method name="get_environ"
  6118. c:identifier="g_application_command_line_get_environ"
  6119. version="2.28">
  6120. <doc xml:space="preserve">Gets the contents of the 'environ' variable of the command line
  6121. invocation, as would be returned by g_get_environ(), ie as a
  6122. %NULL-terminated list of strings in the form 'NAME=VALUE'.
  6123. The strings may contain non-utf8 data.
  6124. The remote application usually does not send an environment. Use
  6125. %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
  6126. set it is possible that the environment is still not available (due
  6127. to invocation messages from other applications).
  6128. The return value should not be modified or freed and is valid for as
  6129. long as @cmdline exists.
  6130. See g_application_command_line_getenv() if you are only interested
  6131. in the value of a single environment variable.</doc>
  6132. <return-value transfer-ownership="none">
  6133. <doc xml:space="preserve">the environment
  6134. strings, or %NULL if they were not sent</doc>
  6135. <array c:type="gchar**">
  6136. <type name="utf8"/>
  6137. </array>
  6138. </return-value>
  6139. <parameters>
  6140. <instance-parameter name="cmdline" transfer-ownership="none">
  6141. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6142. <type name="ApplicationCommandLine"
  6143. c:type="GApplicationCommandLine*"/>
  6144. </instance-parameter>
  6145. </parameters>
  6146. </method>
  6147. <method name="get_exit_status"
  6148. c:identifier="g_application_command_line_get_exit_status"
  6149. version="2.28">
  6150. <doc xml:space="preserve">Gets the exit status of @cmdline. See
  6151. g_application_command_line_set_exit_status() for more information.</doc>
  6152. <return-value transfer-ownership="none">
  6153. <doc xml:space="preserve">the exit status</doc>
  6154. <type name="gint" c:type="int"/>
  6155. </return-value>
  6156. <parameters>
  6157. <instance-parameter name="cmdline" transfer-ownership="none">
  6158. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6159. <type name="ApplicationCommandLine"
  6160. c:type="GApplicationCommandLine*"/>
  6161. </instance-parameter>
  6162. </parameters>
  6163. </method>
  6164. <method name="get_is_remote"
  6165. c:identifier="g_application_command_line_get_is_remote"
  6166. version="2.28">
  6167. <doc xml:space="preserve">Determines if @cmdline represents a remote invocation.</doc>
  6168. <return-value transfer-ownership="none">
  6169. <doc xml:space="preserve">%TRUE if the invocation was remote</doc>
  6170. <type name="gboolean" c:type="gboolean"/>
  6171. </return-value>
  6172. <parameters>
  6173. <instance-parameter name="cmdline" transfer-ownership="none">
  6174. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6175. <type name="ApplicationCommandLine"
  6176. c:type="GApplicationCommandLine*"/>
  6177. </instance-parameter>
  6178. </parameters>
  6179. </method>
  6180. <method name="get_options_dict"
  6181. c:identifier="g_application_command_line_get_options_dict"
  6182. version="2.40">
  6183. <doc xml:space="preserve">Gets the options there were passed to g_application_command_line().
  6184. If you did not override local_command_line() then these are the same
  6185. options that were parsed according to the #GOptionEntrys added to the
  6186. application with g_application_add_main_option_entries() and possibly
  6187. modified from your GApplication::handle-local-options handler.
  6188. If no options were sent then an empty dictionary is returned so that
  6189. you don't need to check for %NULL.</doc>
  6190. <return-value transfer-ownership="none">
  6191. <doc xml:space="preserve">a #GVariantDict with the options</doc>
  6192. <type name="GLib.VariantDict" c:type="GVariantDict*"/>
  6193. </return-value>
  6194. <parameters>
  6195. <instance-parameter name="cmdline" transfer-ownership="none">
  6196. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6197. <type name="ApplicationCommandLine"
  6198. c:type="GApplicationCommandLine*"/>
  6199. </instance-parameter>
  6200. </parameters>
  6201. </method>
  6202. <method name="get_platform_data"
  6203. c:identifier="g_application_command_line_get_platform_data"
  6204. version="2.28">
  6205. <doc xml:space="preserve">Gets the platform data associated with the invocation of @cmdline.
  6206. This is a #GVariant dictionary containing information about the
  6207. context in which the invocation occurred. It typically contains
  6208. information like the current working directory and the startup
  6209. notification ID.
  6210. For local invocation, it will be %NULL.</doc>
  6211. <return-value transfer-ownership="full" nullable="1">
  6212. <doc xml:space="preserve">the platform data, or %NULL</doc>
  6213. <type name="GLib.Variant" c:type="GVariant*"/>
  6214. </return-value>
  6215. <parameters>
  6216. <instance-parameter name="cmdline" transfer-ownership="none">
  6217. <doc xml:space="preserve">#GApplicationCommandLine</doc>
  6218. <type name="ApplicationCommandLine"
  6219. c:type="GApplicationCommandLine*"/>
  6220. </instance-parameter>
  6221. </parameters>
  6222. </method>
  6223. <method name="get_stdin"
  6224. c:identifier="g_application_command_line_get_stdin"
  6225. version="2.34">
  6226. <doc xml:space="preserve">Gets the stdin of the invoking process.
  6227. The #GInputStream can be used to read data passed to the standard
  6228. input of the invoking process.
  6229. This doesn't work on all platforms. Presently, it is only available
  6230. on UNIX when using a DBus daemon capable of passing file descriptors.
  6231. If stdin is not available then %NULL will be returned. In the
  6232. future, support may be expanded to other platforms.
  6233. You must only call this function once per commandline invocation.</doc>
  6234. <return-value transfer-ownership="full">
  6235. <doc xml:space="preserve">a #GInputStream for stdin</doc>
  6236. <type name="InputStream" c:type="GInputStream*"/>
  6237. </return-value>
  6238. <parameters>
  6239. <instance-parameter name="cmdline" transfer-ownership="none">
  6240. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6241. <type name="ApplicationCommandLine"
  6242. c:type="GApplicationCommandLine*"/>
  6243. </instance-parameter>
  6244. </parameters>
  6245. </method>
  6246. <method name="getenv"
  6247. c:identifier="g_application_command_line_getenv"
  6248. version="2.28">
  6249. <doc xml:space="preserve">Gets the value of a particular environment variable of the command
  6250. line invocation, as would be returned by g_getenv(). The strings may
  6251. contain non-utf8 data.
  6252. The remote application usually does not send an environment. Use
  6253. %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
  6254. set it is possible that the environment is still not available (due
  6255. to invocation messages from other applications).
  6256. The return value should not be modified or freed and is valid for as
  6257. long as @cmdline exists.</doc>
  6258. <return-value transfer-ownership="none">
  6259. <doc xml:space="preserve">the value of the variable, or %NULL if unset or unsent</doc>
  6260. <type name="utf8" c:type="const gchar*"/>
  6261. </return-value>
  6262. <parameters>
  6263. <instance-parameter name="cmdline" transfer-ownership="none">
  6264. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6265. <type name="ApplicationCommandLine"
  6266. c:type="GApplicationCommandLine*"/>
  6267. </instance-parameter>
  6268. <parameter name="name" transfer-ownership="none">
  6269. <doc xml:space="preserve">the environment variable to get</doc>
  6270. <type name="utf8" c:type="const gchar*"/>
  6271. </parameter>
  6272. </parameters>
  6273. </method>
  6274. <method name="print"
  6275. c:identifier="g_application_command_line_print"
  6276. version="2.28"
  6277. introspectable="0">
  6278. <doc xml:space="preserve">Formats a message and prints it using the stdout print handler in the
  6279. invoking process.
  6280. If @cmdline is a local invocation then this is exactly equivalent to
  6281. g_print(). If @cmdline is remote then this is equivalent to calling
  6282. g_print() in the invoking process.</doc>
  6283. <return-value transfer-ownership="none">
  6284. <type name="none" c:type="void"/>
  6285. </return-value>
  6286. <parameters>
  6287. <instance-parameter name="cmdline" transfer-ownership="none">
  6288. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6289. <type name="ApplicationCommandLine"
  6290. c:type="GApplicationCommandLine*"/>
  6291. </instance-parameter>
  6292. <parameter name="format" transfer-ownership="none">
  6293. <doc xml:space="preserve">a printf-style format string</doc>
  6294. <type name="utf8" c:type="const gchar*"/>
  6295. </parameter>
  6296. <parameter name="..." transfer-ownership="none">
  6297. <doc xml:space="preserve">arguments, as per @format</doc>
  6298. <varargs/>
  6299. </parameter>
  6300. </parameters>
  6301. </method>
  6302. <method name="printerr"
  6303. c:identifier="g_application_command_line_printerr"
  6304. version="2.28"
  6305. introspectable="0">
  6306. <doc xml:space="preserve">Formats a message and prints it using the stderr print handler in the
  6307. invoking process.
  6308. If @cmdline is a local invocation then this is exactly equivalent to
  6309. g_printerr(). If @cmdline is remote then this is equivalent to
  6310. calling g_printerr() in the invoking process.</doc>
  6311. <return-value transfer-ownership="none">
  6312. <type name="none" c:type="void"/>
  6313. </return-value>
  6314. <parameters>
  6315. <instance-parameter name="cmdline" transfer-ownership="none">
  6316. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6317. <type name="ApplicationCommandLine"
  6318. c:type="GApplicationCommandLine*"/>
  6319. </instance-parameter>
  6320. <parameter name="format" transfer-ownership="none">
  6321. <doc xml:space="preserve">a printf-style format string</doc>
  6322. <type name="utf8" c:type="const gchar*"/>
  6323. </parameter>
  6324. <parameter name="..." transfer-ownership="none">
  6325. <doc xml:space="preserve">arguments, as per @format</doc>
  6326. <varargs/>
  6327. </parameter>
  6328. </parameters>
  6329. </method>
  6330. <method name="set_exit_status"
  6331. c:identifier="g_application_command_line_set_exit_status"
  6332. version="2.28">
  6333. <doc xml:space="preserve">Sets the exit status that will be used when the invoking process
  6334. exits.
  6335. The return value of the #GApplication::command-line signal is
  6336. passed to this function when the handler returns. This is the usual
  6337. way of setting the exit status.
  6338. In the event that you want the remote invocation to continue running
  6339. and want to decide on the exit status in the future, you can use this
  6340. call. For the case of a remote invocation, the remote process will
  6341. typically exit when the last reference is dropped on @cmdline. The
  6342. exit status of the remote process will be equal to the last value
  6343. that was set with this function.
  6344. In the case that the commandline invocation is local, the situation
  6345. is slightly more complicated. If the commandline invocation results
  6346. in the mainloop running (ie: because the use-count of the application
  6347. increased to a non-zero value) then the application is considered to
  6348. have been 'successful' in a certain sense, and the exit status is
  6349. always zero. If the application use count is zero, though, the exit
  6350. status of the local #GApplicationCommandLine is used.</doc>
  6351. <return-value transfer-ownership="none">
  6352. <type name="none" c:type="void"/>
  6353. </return-value>
  6354. <parameters>
  6355. <instance-parameter name="cmdline" transfer-ownership="none">
  6356. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6357. <type name="ApplicationCommandLine"
  6358. c:type="GApplicationCommandLine*"/>
  6359. </instance-parameter>
  6360. <parameter name="exit_status" transfer-ownership="none">
  6361. <doc xml:space="preserve">the exit status</doc>
  6362. <type name="gint" c:type="int"/>
  6363. </parameter>
  6364. </parameters>
  6365. </method>
  6366. <property name="arguments"
  6367. readable="0"
  6368. writable="1"
  6369. construct-only="1"
  6370. transfer-ownership="none">
  6371. <type name="GLib.Variant"/>
  6372. </property>
  6373. <property name="is-remote" transfer-ownership="none">
  6374. <type name="gboolean" c:type="gboolean"/>
  6375. </property>
  6376. <property name="options"
  6377. readable="0"
  6378. writable="1"
  6379. construct-only="1"
  6380. transfer-ownership="none">
  6381. <type name="GLib.Variant"/>
  6382. </property>
  6383. <property name="platform-data"
  6384. readable="0"
  6385. writable="1"
  6386. construct-only="1"
  6387. transfer-ownership="none">
  6388. <type name="GLib.Variant"/>
  6389. </property>
  6390. <field name="parent_instance" readable="0" private="1">
  6391. <type name="GObject.Object" c:type="GObject"/>
  6392. </field>
  6393. <field name="priv" readable="0" private="1">
  6394. <type name="ApplicationCommandLinePrivate"
  6395. c:type="GApplicationCommandLinePrivate*"/>
  6396. </field>
  6397. </class>
  6398. <record name="ApplicationCommandLineClass"
  6399. c:type="GApplicationCommandLineClass"
  6400. glib:is-gtype-struct-for="ApplicationCommandLine"
  6401. version="2.28">
  6402. <doc xml:space="preserve">The #GApplicationCommandLineClass-struct
  6403. contains private data only.</doc>
  6404. <field name="parent_class" readable="0" private="1">
  6405. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  6406. </field>
  6407. <field name="print_literal">
  6408. <callback name="print_literal">
  6409. <return-value transfer-ownership="none">
  6410. <type name="none" c:type="void"/>
  6411. </return-value>
  6412. <parameters>
  6413. <parameter name="cmdline" transfer-ownership="none">
  6414. <type name="ApplicationCommandLine"
  6415. c:type="GApplicationCommandLine*"/>
  6416. </parameter>
  6417. <parameter name="message" transfer-ownership="none">
  6418. <type name="utf8" c:type="const gchar*"/>
  6419. </parameter>
  6420. </parameters>
  6421. </callback>
  6422. </field>
  6423. <field name="printerr_literal">
  6424. <callback name="printerr_literal">
  6425. <return-value transfer-ownership="none">
  6426. <type name="none" c:type="void"/>
  6427. </return-value>
  6428. <parameters>
  6429. <parameter name="cmdline" transfer-ownership="none">
  6430. <type name="ApplicationCommandLine"
  6431. c:type="GApplicationCommandLine*"/>
  6432. </parameter>
  6433. <parameter name="message" transfer-ownership="none">
  6434. <type name="utf8" c:type="const gchar*"/>
  6435. </parameter>
  6436. </parameters>
  6437. </callback>
  6438. </field>
  6439. <field name="get_stdin">
  6440. <callback name="get_stdin">
  6441. <return-value transfer-ownership="full">
  6442. <doc xml:space="preserve">a #GInputStream for stdin</doc>
  6443. <type name="InputStream" c:type="GInputStream*"/>
  6444. </return-value>
  6445. <parameters>
  6446. <parameter name="cmdline" transfer-ownership="none">
  6447. <doc xml:space="preserve">a #GApplicationCommandLine</doc>
  6448. <type name="ApplicationCommandLine"
  6449. c:type="GApplicationCommandLine*"/>
  6450. </parameter>
  6451. </parameters>
  6452. </callback>
  6453. </field>
  6454. <field name="padding" readable="0" private="1">
  6455. <array zero-terminated="0" c:type="gpointer" fixed-size="11">
  6456. <type name="gpointer" c:type="gpointer"/>
  6457. </array>
  6458. </field>
  6459. </record>
  6460. <record name="ApplicationCommandLinePrivate"
  6461. c:type="GApplicationCommandLinePrivate"
  6462. disguised="1">
  6463. </record>
  6464. <bitfield name="ApplicationFlags"
  6465. version="2.28"
  6466. glib:type-name="GApplicationFlags"
  6467. glib:get-type="g_application_flags_get_type"
  6468. c:type="GApplicationFlags">
  6469. <doc xml:space="preserve">Flags used to define the behaviour of a #GApplication.</doc>
  6470. <member name="flags_none"
  6471. value="0"
  6472. c:identifier="G_APPLICATION_FLAGS_NONE"
  6473. glib:nick="flags-none">
  6474. <doc xml:space="preserve">Default</doc>
  6475. </member>
  6476. <member name="is_service"
  6477. value="1"
  6478. c:identifier="G_APPLICATION_IS_SERVICE"
  6479. glib:nick="is-service">
  6480. <doc xml:space="preserve">Run as a service. In this mode, registration
  6481. fails if the service is already running, and the application
  6482. will initially wait up to 10 seconds for an initial activation
  6483. message to arrive.</doc>
  6484. </member>
  6485. <member name="is_launcher"
  6486. value="2"
  6487. c:identifier="G_APPLICATION_IS_LAUNCHER"
  6488. glib:nick="is-launcher">
  6489. <doc xml:space="preserve">Don't try to become the primary instance.</doc>
  6490. </member>
  6491. <member name="handles_open"
  6492. value="4"
  6493. c:identifier="G_APPLICATION_HANDLES_OPEN"
  6494. glib:nick="handles-open">
  6495. <doc xml:space="preserve">This application handles opening files (in
  6496. the primary instance). Note that this flag only affects the default
  6497. implementation of local_command_line(), and has no effect if
  6498. %G_APPLICATION_HANDLES_COMMAND_LINE is given.
  6499. See g_application_run() for details.</doc>
  6500. </member>
  6501. <member name="handles_command_line"
  6502. value="8"
  6503. c:identifier="G_APPLICATION_HANDLES_COMMAND_LINE"
  6504. glib:nick="handles-command-line">
  6505. <doc xml:space="preserve">This application handles command line
  6506. arguments (in the primary instance). Note that this flag only affect
  6507. the default implementation of local_command_line().
  6508. See g_application_run() for details.</doc>
  6509. </member>
  6510. <member name="send_environment"
  6511. value="16"
  6512. c:identifier="G_APPLICATION_SEND_ENVIRONMENT"
  6513. glib:nick="send-environment">
  6514. <doc xml:space="preserve">Send the environment of the
  6515. launching process to the primary instance. Set this flag if your
  6516. application is expected to behave differently depending on certain
  6517. environment variables. For instance, an editor might be expected
  6518. to use the `GIT_COMMITTER_NAME` environment variable
  6519. when editing a git commit message. The environment is available
  6520. to the #GApplication::command-line signal handler, via
  6521. g_application_command_line_getenv().</doc>
  6522. </member>
  6523. <member name="non_unique"
  6524. value="32"
  6525. c:identifier="G_APPLICATION_NON_UNIQUE"
  6526. glib:nick="non-unique">
  6527. <doc xml:space="preserve">Make no attempts to do any of the typical
  6528. single-instance application negotiation, even if the application
  6529. ID is given. The application neither attempts to become the
  6530. owner of the application ID nor does it check if an existing
  6531. owner already exists. Everything occurs in the local process.
  6532. Since: 2.30.</doc>
  6533. </member>
  6534. <member name="can_override_app_id"
  6535. value="64"
  6536. c:identifier="G_APPLICATION_CAN_OVERRIDE_APP_ID"
  6537. glib:nick="can-override-app-id">
  6538. <doc xml:space="preserve">Allow users to override the
  6539. application ID from the command line with `--gapplication-app-id`.
  6540. Since: 2.48</doc>
  6541. </member>
  6542. </bitfield>
  6543. <record name="ApplicationPrivate"
  6544. c:type="GApplicationPrivate"
  6545. disguised="1">
  6546. </record>
  6547. <bitfield name="AskPasswordFlags"
  6548. glib:type-name="GAskPasswordFlags"
  6549. glib:get-type="g_ask_password_flags_get_type"
  6550. c:type="GAskPasswordFlags">
  6551. <doc xml:space="preserve">#GAskPasswordFlags are used to request specific information from the
  6552. user, or to notify the user of their choices in an authentication
  6553. situation.</doc>
  6554. <member name="need_password"
  6555. value="1"
  6556. c:identifier="G_ASK_PASSWORD_NEED_PASSWORD"
  6557. glib:nick="need-password">
  6558. <doc xml:space="preserve">operation requires a password.</doc>
  6559. </member>
  6560. <member name="need_username"
  6561. value="2"
  6562. c:identifier="G_ASK_PASSWORD_NEED_USERNAME"
  6563. glib:nick="need-username">
  6564. <doc xml:space="preserve">operation requires a username.</doc>
  6565. </member>
  6566. <member name="need_domain"
  6567. value="4"
  6568. c:identifier="G_ASK_PASSWORD_NEED_DOMAIN"
  6569. glib:nick="need-domain">
  6570. <doc xml:space="preserve">operation requires a domain.</doc>
  6571. </member>
  6572. <member name="saving_supported"
  6573. value="8"
  6574. c:identifier="G_ASK_PASSWORD_SAVING_SUPPORTED"
  6575. glib:nick="saving-supported">
  6576. <doc xml:space="preserve">operation supports saving settings.</doc>
  6577. </member>
  6578. <member name="anonymous_supported"
  6579. value="16"
  6580. c:identifier="G_ASK_PASSWORD_ANONYMOUS_SUPPORTED"
  6581. glib:nick="anonymous-supported">
  6582. <doc xml:space="preserve">operation supports anonymous users.</doc>
  6583. </member>
  6584. </bitfield>
  6585. <interface name="AsyncInitable"
  6586. c:symbol-prefix="async_initable"
  6587. c:type="GAsyncInitable"
  6588. version="2.22"
  6589. glib:type-name="GAsyncInitable"
  6590. glib:get-type="g_async_initable_get_type"
  6591. glib:type-struct="AsyncInitableIface">
  6592. <doc xml:space="preserve">This is the asynchronous version of #GInitable; it behaves the same
  6593. in all ways except that initialization is asynchronous. For more details
  6594. see the descriptions on #GInitable.
  6595. A class may implement both the #GInitable and #GAsyncInitable interfaces.
  6596. Users of objects implementing this are not intended to use the interface
  6597. method directly; instead it will be used automatically in various ways.
  6598. For C applications you generally just call g_async_initable_new_async()
  6599. directly, or indirectly via a foo_thing_new_async() wrapper. This will call
  6600. g_async_initable_init_async() under the cover, calling back with %NULL and
  6601. a set %GError on failure.
  6602. A typical implementation might look something like this:
  6603. |[&lt;!-- language="C" --&gt;
  6604. enum {
  6605. NOT_INITIALIZED,
  6606. INITIALIZING,
  6607. INITIALIZED
  6608. };
  6609. static void
  6610. _foo_ready_cb (Foo *self)
  6611. {
  6612. GList *l;
  6613. self-&gt;priv-&gt;state = INITIALIZED;
  6614. for (l = self-&gt;priv-&gt;init_results; l != NULL; l = l-&gt;next)
  6615. {
  6616. GTask *task = l-&gt;data;
  6617. if (self-&gt;priv-&gt;success)
  6618. g_task_return_boolean (task, TRUE);
  6619. else
  6620. g_task_return_new_error (task, ...);
  6621. g_object_unref (task);
  6622. }
  6623. g_list_free (self-&gt;priv-&gt;init_results);
  6624. self-&gt;priv-&gt;init_results = NULL;
  6625. }
  6626. static void
  6627. foo_init_async (GAsyncInitable *initable,
  6628. int io_priority,
  6629. GCancellable *cancellable,
  6630. GAsyncReadyCallback callback,
  6631. gpointer user_data)
  6632. {
  6633. Foo *self = FOO (initable);
  6634. GTask *task;
  6635. task = g_task_new (initable, cancellable, callback, user_data);
  6636. switch (self-&gt;priv-&gt;state)
  6637. {
  6638. case NOT_INITIALIZED:
  6639. _foo_get_ready (self);
  6640. self-&gt;priv-&gt;init_results = g_list_append (self-&gt;priv-&gt;init_results,
  6641. task);
  6642. self-&gt;priv-&gt;state = INITIALIZING;
  6643. break;
  6644. case INITIALIZING:
  6645. self-&gt;priv-&gt;init_results = g_list_append (self-&gt;priv-&gt;init_results,
  6646. task);
  6647. break;
  6648. case INITIALIZED:
  6649. if (!self-&gt;priv-&gt;success)
  6650. g_task_return_new_error (task, ...);
  6651. else
  6652. g_task_return_boolean (task, TRUE);
  6653. g_object_unref (task);
  6654. break;
  6655. }
  6656. }
  6657. static gboolean
  6658. foo_init_finish (GAsyncInitable *initable,
  6659. GAsyncResult *result,
  6660. GError **error)
  6661. {
  6662. g_return_val_if_fail (g_task_is_valid (result, initable), FALSE);
  6663. return g_task_propagate_boolean (G_TASK (result), error);
  6664. }
  6665. static void
  6666. foo_async_initable_iface_init (gpointer g_iface,
  6667. gpointer data)
  6668. {
  6669. GAsyncInitableIface *iface = g_iface;
  6670. iface-&gt;init_async = foo_init_async;
  6671. iface-&gt;init_finish = foo_init_finish;
  6672. }
  6673. ]|</doc>
  6674. <function name="new_async"
  6675. c:identifier="g_async_initable_new_async"
  6676. version="2.22"
  6677. introspectable="0">
  6678. <doc xml:space="preserve">Helper function for constructing #GAsyncInitable object. This is
  6679. similar to g_object_new() but also initializes the object asynchronously.
  6680. When the initialization is finished, @callback will be called. You can
  6681. then call g_async_initable_new_finish() to get the new object and check
  6682. for any errors.</doc>
  6683. <return-value transfer-ownership="none">
  6684. <type name="none" c:type="void"/>
  6685. </return-value>
  6686. <parameters>
  6687. <parameter name="object_type" transfer-ownership="none">
  6688. <doc xml:space="preserve">a #GType supporting #GAsyncInitable.</doc>
  6689. <type name="GType" c:type="GType"/>
  6690. </parameter>
  6691. <parameter name="io_priority" transfer-ownership="none">
  6692. <doc xml:space="preserve">the [I/O priority][io-priority] of the operation</doc>
  6693. <type name="gint" c:type="int"/>
  6694. </parameter>
  6695. <parameter name="cancellable"
  6696. transfer-ownership="none"
  6697. nullable="1"
  6698. allow-none="1">
  6699. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  6700. <type name="Cancellable" c:type="GCancellable*"/>
  6701. </parameter>
  6702. <parameter name="callback"
  6703. transfer-ownership="none"
  6704. nullable="1"
  6705. allow-none="1"
  6706. scope="async"
  6707. closure="4">
  6708. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the initialization is
  6709. finished</doc>
  6710. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  6711. </parameter>
  6712. <parameter name="user_data"
  6713. transfer-ownership="none"
  6714. nullable="1"
  6715. allow-none="1">
  6716. <doc xml:space="preserve">the data to pass to callback function</doc>
  6717. <type name="gpointer" c:type="gpointer"/>
  6718. </parameter>
  6719. <parameter name="first_property_name"
  6720. transfer-ownership="none"
  6721. nullable="1"
  6722. allow-none="1">
  6723. <doc xml:space="preserve">the name of the first property, or %NULL if no
  6724. properties</doc>
  6725. <type name="utf8" c:type="const gchar*"/>
  6726. </parameter>
  6727. <parameter name="..." transfer-ownership="none">
  6728. <doc xml:space="preserve">the value of the first property, followed by other property
  6729. value pairs, and ended by %NULL.</doc>
  6730. <varargs/>
  6731. </parameter>
  6732. </parameters>
  6733. </function>
  6734. <function name="new_valist_async"
  6735. c:identifier="g_async_initable_new_valist_async"
  6736. version="2.22"
  6737. introspectable="0">
  6738. <doc xml:space="preserve">Helper function for constructing #GAsyncInitable object. This is
  6739. similar to g_object_new_valist() but also initializes the object
  6740. asynchronously.
  6741. When the initialization is finished, @callback will be called. You can
  6742. then call g_async_initable_new_finish() to get the new object and check
  6743. for any errors.</doc>
  6744. <return-value transfer-ownership="none">
  6745. <type name="none" c:type="void"/>
  6746. </return-value>
  6747. <parameters>
  6748. <parameter name="object_type" transfer-ownership="none">
  6749. <doc xml:space="preserve">a #GType supporting #GAsyncInitable.</doc>
  6750. <type name="GType" c:type="GType"/>
  6751. </parameter>
  6752. <parameter name="first_property_name" transfer-ownership="none">
  6753. <doc xml:space="preserve">the name of the first property, followed by
  6754. the value, and other property value pairs, and ended by %NULL.</doc>
  6755. <type name="utf8" c:type="const gchar*"/>
  6756. </parameter>
  6757. <parameter name="var_args" transfer-ownership="none">
  6758. <doc xml:space="preserve">The var args list generated from @first_property_name.</doc>
  6759. <type name="va_list" c:type="va_list"/>
  6760. </parameter>
  6761. <parameter name="io_priority" transfer-ownership="none">
  6762. <doc xml:space="preserve">the [I/O priority][io-priority] of the operation</doc>
  6763. <type name="gint" c:type="int"/>
  6764. </parameter>
  6765. <parameter name="cancellable"
  6766. transfer-ownership="none"
  6767. nullable="1"
  6768. allow-none="1">
  6769. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  6770. <type name="Cancellable" c:type="GCancellable*"/>
  6771. </parameter>
  6772. <parameter name="callback"
  6773. transfer-ownership="none"
  6774. nullable="1"
  6775. allow-none="1"
  6776. scope="async"
  6777. closure="6">
  6778. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the initialization is
  6779. finished</doc>
  6780. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  6781. </parameter>
  6782. <parameter name="user_data"
  6783. transfer-ownership="none"
  6784. nullable="1"
  6785. allow-none="1">
  6786. <doc xml:space="preserve">the data to pass to callback function</doc>
  6787. <type name="gpointer" c:type="gpointer"/>
  6788. </parameter>
  6789. </parameters>
  6790. </function>
  6791. <function name="newv_async"
  6792. c:identifier="g_async_initable_newv_async"
  6793. version="2.22">
  6794. <doc xml:space="preserve">Helper function for constructing #GAsyncInitable object. This is
  6795. similar to g_object_newv() but also initializes the object asynchronously.
  6796. When the initialization is finished, @callback will be called. You can
  6797. then call g_async_initable_new_finish() to get the new object and check
  6798. for any errors.</doc>
  6799. <return-value transfer-ownership="none">
  6800. <type name="none" c:type="void"/>
  6801. </return-value>
  6802. <parameters>
  6803. <parameter name="object_type" transfer-ownership="none">
  6804. <doc xml:space="preserve">a #GType supporting #GAsyncInitable.</doc>
  6805. <type name="GType" c:type="GType"/>
  6806. </parameter>
  6807. <parameter name="n_parameters" transfer-ownership="none">
  6808. <doc xml:space="preserve">the number of parameters in @parameters</doc>
  6809. <type name="guint" c:type="guint"/>
  6810. </parameter>
  6811. <parameter name="parameters" transfer-ownership="none">
  6812. <doc xml:space="preserve">the parameters to use to construct the object</doc>
  6813. <type name="GObject.Parameter" c:type="GParameter*"/>
  6814. </parameter>
  6815. <parameter name="io_priority" transfer-ownership="none">
  6816. <doc xml:space="preserve">the [I/O priority][io-priority] of the operation</doc>
  6817. <type name="gint" c:type="int"/>
  6818. </parameter>
  6819. <parameter name="cancellable"
  6820. transfer-ownership="none"
  6821. nullable="1"
  6822. allow-none="1">
  6823. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  6824. <type name="Cancellable" c:type="GCancellable*"/>
  6825. </parameter>
  6826. <parameter name="callback"
  6827. transfer-ownership="none"
  6828. nullable="1"
  6829. allow-none="1"
  6830. scope="async"
  6831. closure="6">
  6832. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the initialization is
  6833. finished</doc>
  6834. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  6835. </parameter>
  6836. <parameter name="user_data"
  6837. transfer-ownership="none"
  6838. nullable="1"
  6839. allow-none="1">
  6840. <doc xml:space="preserve">the data to pass to callback function</doc>
  6841. <type name="gpointer" c:type="gpointer"/>
  6842. </parameter>
  6843. </parameters>
  6844. </function>
  6845. <virtual-method name="init_async" invoker="init_async" version="2.22">
  6846. <doc xml:space="preserve">Starts asynchronous initialization of the object implementing the
  6847. interface. This must be done before any real use of the object after
  6848. initial construction. If the object also implements #GInitable you can
  6849. optionally call g_initable_init() instead.
  6850. When the initialization is finished, @callback will be called. You can
  6851. then call g_async_initable_init_finish() to get the result of the
  6852. initialization.
  6853. Implementations may also support cancellation. If @cancellable is not
  6854. %NULL, then initialization can be cancelled by triggering the cancellable
  6855. object from another thread. If the operation was cancelled, the error
  6856. %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
  6857. the object doesn't support cancellable initialization, the error
  6858. %G_IO_ERROR_NOT_SUPPORTED will be returned.
  6859. As with #GInitable, if the object is not initialized, or initialization
  6860. returns with an error, then all operations on the object except
  6861. g_object_ref() and g_object_unref() are considered to be invalid, and
  6862. have undefined behaviour. They will often fail with g_critical() or
  6863. g_warning(), but this must not be relied on.
  6864. Implementations of this method must be idempotent: i.e. multiple calls
  6865. to this function with the same argument should return the same results.
  6866. Only the first call initializes the object; further calls return the result
  6867. of the first call. This is so that it's safe to implement the singleton
  6868. pattern in the GObject constructor function.
  6869. For classes that also support the #GInitable interface, the default
  6870. implementation of this method will run the g_initable_init() function
  6871. in a thread, so if you want to support asynchronous initialization via
  6872. threads, just implement the #GAsyncInitable interface without overriding
  6873. any interface methods.</doc>
  6874. <return-value transfer-ownership="none">
  6875. <type name="none" c:type="void"/>
  6876. </return-value>
  6877. <parameters>
  6878. <instance-parameter name="initable" transfer-ownership="none">
  6879. <doc xml:space="preserve">a #GAsyncInitable.</doc>
  6880. <type name="AsyncInitable" c:type="GAsyncInitable*"/>
  6881. </instance-parameter>
  6882. <parameter name="io_priority" transfer-ownership="none">
  6883. <doc xml:space="preserve">the [I/O priority][io-priority] of the operation</doc>
  6884. <type name="gint" c:type="int"/>
  6885. </parameter>
  6886. <parameter name="cancellable"
  6887. transfer-ownership="none"
  6888. nullable="1"
  6889. allow-none="1">
  6890. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  6891. <type name="Cancellable" c:type="GCancellable*"/>
  6892. </parameter>
  6893. <parameter name="callback"
  6894. transfer-ownership="none"
  6895. nullable="1"
  6896. allow-none="1"
  6897. scope="async"
  6898. closure="3">
  6899. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  6900. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  6901. </parameter>
  6902. <parameter name="user_data"
  6903. transfer-ownership="none"
  6904. nullable="1"
  6905. allow-none="1"
  6906. closure="3">
  6907. <doc xml:space="preserve">the data to pass to callback function</doc>
  6908. <type name="gpointer" c:type="gpointer"/>
  6909. </parameter>
  6910. </parameters>
  6911. </virtual-method>
  6912. <virtual-method name="init_finish"
  6913. invoker="init_finish"
  6914. version="2.22"
  6915. throws="1">
  6916. <doc xml:space="preserve">Finishes asynchronous initialization and returns the result.
  6917. See g_async_initable_init_async().</doc>
  6918. <return-value transfer-ownership="none">
  6919. <doc xml:space="preserve">%TRUE if successful. If an error has occurred, this function
  6920. will return %FALSE and set @error appropriately if present.</doc>
  6921. <type name="gboolean" c:type="gboolean"/>
  6922. </return-value>
  6923. <parameters>
  6924. <instance-parameter name="initable" transfer-ownership="none">
  6925. <doc xml:space="preserve">a #GAsyncInitable.</doc>
  6926. <type name="AsyncInitable" c:type="GAsyncInitable*"/>
  6927. </instance-parameter>
  6928. <parameter name="res" transfer-ownership="none">
  6929. <doc xml:space="preserve">a #GAsyncResult.</doc>
  6930. <type name="AsyncResult" c:type="GAsyncResult*"/>
  6931. </parameter>
  6932. </parameters>
  6933. </virtual-method>
  6934. <method name="init_async"
  6935. c:identifier="g_async_initable_init_async"
  6936. version="2.22">
  6937. <doc xml:space="preserve">Starts asynchronous initialization of the object implementing the
  6938. interface. This must be done before any real use of the object after
  6939. initial construction. If the object also implements #GInitable you can
  6940. optionally call g_initable_init() instead.
  6941. When the initialization is finished, @callback will be called. You can
  6942. then call g_async_initable_init_finish() to get the result of the
  6943. initialization.
  6944. Implementations may also support cancellation. If @cancellable is not
  6945. %NULL, then initialization can be cancelled by triggering the cancellable
  6946. object from another thread. If the operation was cancelled, the error
  6947. %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
  6948. the object doesn't support cancellable initialization, the error
  6949. %G_IO_ERROR_NOT_SUPPORTED will be returned.
  6950. As with #GInitable, if the object is not initialized, or initialization
  6951. returns with an error, then all operations on the object except
  6952. g_object_ref() and g_object_unref() are considered to be invalid, and
  6953. have undefined behaviour. They will often fail with g_critical() or
  6954. g_warning(), but this must not be relied on.
  6955. Implementations of this method must be idempotent: i.e. multiple calls
  6956. to this function with the same argument should return the same results.
  6957. Only the first call initializes the object; further calls return the result
  6958. of the first call. This is so that it's safe to implement the singleton
  6959. pattern in the GObject constructor function.
  6960. For classes that also support the #GInitable interface, the default
  6961. implementation of this method will run the g_initable_init() function
  6962. in a thread, so if you want to support asynchronous initialization via
  6963. threads, just implement the #GAsyncInitable interface without overriding
  6964. any interface methods.</doc>
  6965. <return-value transfer-ownership="none">
  6966. <type name="none" c:type="void"/>
  6967. </return-value>
  6968. <parameters>
  6969. <instance-parameter name="initable" transfer-ownership="none">
  6970. <doc xml:space="preserve">a #GAsyncInitable.</doc>
  6971. <type name="AsyncInitable" c:type="GAsyncInitable*"/>
  6972. </instance-parameter>
  6973. <parameter name="io_priority" transfer-ownership="none">
  6974. <doc xml:space="preserve">the [I/O priority][io-priority] of the operation</doc>
  6975. <type name="gint" c:type="int"/>
  6976. </parameter>
  6977. <parameter name="cancellable"
  6978. transfer-ownership="none"
  6979. nullable="1"
  6980. allow-none="1">
  6981. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  6982. <type name="Cancellable" c:type="GCancellable*"/>
  6983. </parameter>
  6984. <parameter name="callback"
  6985. transfer-ownership="none"
  6986. nullable="1"
  6987. allow-none="1"
  6988. scope="async"
  6989. closure="3">
  6990. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  6991. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  6992. </parameter>
  6993. <parameter name="user_data"
  6994. transfer-ownership="none"
  6995. nullable="1"
  6996. allow-none="1">
  6997. <doc xml:space="preserve">the data to pass to callback function</doc>
  6998. <type name="gpointer" c:type="gpointer"/>
  6999. </parameter>
  7000. </parameters>
  7001. </method>
  7002. <method name="init_finish"
  7003. c:identifier="g_async_initable_init_finish"
  7004. version="2.22"
  7005. throws="1">
  7006. <doc xml:space="preserve">Finishes asynchronous initialization and returns the result.
  7007. See g_async_initable_init_async().</doc>
  7008. <return-value transfer-ownership="none">
  7009. <doc xml:space="preserve">%TRUE if successful. If an error has occurred, this function
  7010. will return %FALSE and set @error appropriately if present.</doc>
  7011. <type name="gboolean" c:type="gboolean"/>
  7012. </return-value>
  7013. <parameters>
  7014. <instance-parameter name="initable" transfer-ownership="none">
  7015. <doc xml:space="preserve">a #GAsyncInitable.</doc>
  7016. <type name="AsyncInitable" c:type="GAsyncInitable*"/>
  7017. </instance-parameter>
  7018. <parameter name="res" transfer-ownership="none">
  7019. <doc xml:space="preserve">a #GAsyncResult.</doc>
  7020. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7021. </parameter>
  7022. </parameters>
  7023. </method>
  7024. <method name="new_finish"
  7025. c:identifier="g_async_initable_new_finish"
  7026. version="2.22"
  7027. throws="1">
  7028. <doc xml:space="preserve">Finishes the async construction for the various g_async_initable_new
  7029. calls, returning the created object or %NULL on error.</doc>
  7030. <return-value transfer-ownership="full">
  7031. <doc xml:space="preserve">a newly created #GObject,
  7032. or %NULL on error. Free with g_object_unref().</doc>
  7033. <type name="GObject.Object" c:type="GObject*"/>
  7034. </return-value>
  7035. <parameters>
  7036. <instance-parameter name="initable" transfer-ownership="none">
  7037. <doc xml:space="preserve">the #GAsyncInitable from the callback</doc>
  7038. <type name="AsyncInitable" c:type="GAsyncInitable*"/>
  7039. </instance-parameter>
  7040. <parameter name="res" transfer-ownership="none">
  7041. <doc xml:space="preserve">the #GAsyncResult from the callback</doc>
  7042. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7043. </parameter>
  7044. </parameters>
  7045. </method>
  7046. </interface>
  7047. <record name="AsyncInitableIface"
  7048. c:type="GAsyncInitableIface"
  7049. glib:is-gtype-struct-for="AsyncInitable"
  7050. version="2.22">
  7051. <doc xml:space="preserve">Provides an interface for asynchronous initializing object such that
  7052. initialization may fail.</doc>
  7053. <field name="g_iface">
  7054. <doc xml:space="preserve">The parent interface.</doc>
  7055. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  7056. </field>
  7057. <field name="init_async">
  7058. <callback name="init_async">
  7059. <return-value transfer-ownership="none">
  7060. <type name="none" c:type="void"/>
  7061. </return-value>
  7062. <parameters>
  7063. <parameter name="initable" transfer-ownership="none">
  7064. <doc xml:space="preserve">a #GAsyncInitable.</doc>
  7065. <type name="AsyncInitable" c:type="GAsyncInitable*"/>
  7066. </parameter>
  7067. <parameter name="io_priority" transfer-ownership="none">
  7068. <doc xml:space="preserve">the [I/O priority][io-priority] of the operation</doc>
  7069. <type name="gint" c:type="int"/>
  7070. </parameter>
  7071. <parameter name="cancellable"
  7072. transfer-ownership="none"
  7073. nullable="1"
  7074. allow-none="1">
  7075. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  7076. <type name="Cancellable" c:type="GCancellable*"/>
  7077. </parameter>
  7078. <parameter name="callback"
  7079. transfer-ownership="none"
  7080. nullable="1"
  7081. allow-none="1"
  7082. scope="async"
  7083. closure="4">
  7084. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  7085. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  7086. </parameter>
  7087. <parameter name="user_data"
  7088. transfer-ownership="none"
  7089. nullable="1"
  7090. allow-none="1"
  7091. closure="4">
  7092. <doc xml:space="preserve">the data to pass to callback function</doc>
  7093. <type name="gpointer" c:type="gpointer"/>
  7094. </parameter>
  7095. </parameters>
  7096. </callback>
  7097. </field>
  7098. <field name="init_finish">
  7099. <callback name="init_finish" throws="1">
  7100. <return-value transfer-ownership="none">
  7101. <doc xml:space="preserve">%TRUE if successful. If an error has occurred, this function
  7102. will return %FALSE and set @error appropriately if present.</doc>
  7103. <type name="gboolean" c:type="gboolean"/>
  7104. </return-value>
  7105. <parameters>
  7106. <parameter name="initable" transfer-ownership="none">
  7107. <doc xml:space="preserve">a #GAsyncInitable.</doc>
  7108. <type name="AsyncInitable" c:type="GAsyncInitable*"/>
  7109. </parameter>
  7110. <parameter name="res" transfer-ownership="none">
  7111. <doc xml:space="preserve">a #GAsyncResult.</doc>
  7112. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7113. </parameter>
  7114. </parameters>
  7115. </callback>
  7116. </field>
  7117. </record>
  7118. <callback name="AsyncReadyCallback" c:type="GAsyncReadyCallback">
  7119. <doc xml:space="preserve">Type definition for a function that will be called back when an asynchronous
  7120. operation within GIO has been completed.</doc>
  7121. <return-value transfer-ownership="none">
  7122. <type name="none" c:type="void"/>
  7123. </return-value>
  7124. <parameters>
  7125. <parameter name="source_object" transfer-ownership="none">
  7126. <doc xml:space="preserve">the object the asynchronous operation was started with.</doc>
  7127. <type name="GObject.Object" c:type="GObject*"/>
  7128. </parameter>
  7129. <parameter name="res" transfer-ownership="none">
  7130. <doc xml:space="preserve">a #GAsyncResult.</doc>
  7131. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7132. </parameter>
  7133. <parameter name="user_data"
  7134. transfer-ownership="none"
  7135. nullable="1"
  7136. allow-none="1"
  7137. closure="2">
  7138. <doc xml:space="preserve">user data passed to the callback.</doc>
  7139. <type name="gpointer" c:type="gpointer"/>
  7140. </parameter>
  7141. </parameters>
  7142. </callback>
  7143. <interface name="AsyncResult"
  7144. c:symbol-prefix="async_result"
  7145. c:type="GAsyncResult"
  7146. glib:type-name="GAsyncResult"
  7147. glib:get-type="g_async_result_get_type"
  7148. glib:type-struct="AsyncResultIface">
  7149. <doc xml:space="preserve">Provides a base class for implementing asynchronous function results.
  7150. Asynchronous operations are broken up into two separate operations
  7151. which are chained together by a #GAsyncReadyCallback. To begin
  7152. an asynchronous operation, provide a #GAsyncReadyCallback to the
  7153. asynchronous function. This callback will be triggered when the
  7154. operation has completed, and will be passed a #GAsyncResult instance
  7155. filled with the details of the operation's success or failure, the
  7156. object the asynchronous function was started for and any error codes
  7157. returned. The asynchronous callback function is then expected to call
  7158. the corresponding "_finish()" function, passing the object the
  7159. function was called for, the #GAsyncResult instance, and (optionally)
  7160. an @error to grab any error conditions that may have occurred.
  7161. The "_finish()" function for an operation takes the generic result
  7162. (of type #GAsyncResult) and returns the specific result that the
  7163. operation in question yields (e.g. a #GFileEnumerator for a
  7164. "enumerate children" operation). If the result or error status of the
  7165. operation is not needed, there is no need to call the "_finish()"
  7166. function; GIO will take care of cleaning up the result and error
  7167. information after the #GAsyncReadyCallback returns. You can pass
  7168. %NULL for the #GAsyncReadyCallback if you don't need to take any
  7169. action at all after the operation completes. Applications may also
  7170. take a reference to the #GAsyncResult and call "_finish()" later;
  7171. however, the "_finish()" function may be called at most once.
  7172. Example of a typical asynchronous operation flow:
  7173. |[&lt;!-- language="C" --&gt;
  7174. void _theoretical_frobnitz_async (Theoretical *t,
  7175. GCancellable *c,
  7176. GAsyncReadyCallback cb,
  7177. gpointer u);
  7178. gboolean _theoretical_frobnitz_finish (Theoretical *t,
  7179. GAsyncResult *res,
  7180. GError **e);
  7181. static void
  7182. frobnitz_result_func (GObject *source_object,
  7183. GAsyncResult *res,
  7184. gpointer user_data)
  7185. {
  7186. gboolean success = FALSE;
  7187. success = _theoretical_frobnitz_finish (source_object, res, NULL);
  7188. if (success)
  7189. g_printf ("Hurray!\n");
  7190. else
  7191. g_printf ("Uh oh!\n");
  7192. ...
  7193. }
  7194. int main (int argc, void *argv[])
  7195. {
  7196. ...
  7197. _theoretical_frobnitz_async (theoretical_data,
  7198. NULL,
  7199. frobnitz_result_func,
  7200. NULL);
  7201. ...
  7202. }
  7203. ]|
  7204. The callback for an asynchronous operation is called only once, and is
  7205. always called, even in the case of a cancelled operation. On cancellation
  7206. the result is a %G_IO_ERROR_CANCELLED error.
  7207. ## I/O Priority # {#io-priority}
  7208. Many I/O-related asynchronous operations have a priority parameter,
  7209. which is used in certain cases to determine the order in which
  7210. operations are executed. They are not used to determine system-wide
  7211. I/O scheduling. Priorities are integers, with lower numbers indicating
  7212. higher priority. It is recommended to choose priorities between
  7213. %G_PRIORITY_LOW and %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT
  7214. as a default.</doc>
  7215. <virtual-method name="get_source_object" invoker="get_source_object">
  7216. <doc xml:space="preserve">Gets the source object from a #GAsyncResult.</doc>
  7217. <return-value transfer-ownership="full">
  7218. <doc xml:space="preserve">a new reference to the source object for the @res,
  7219. or %NULL if there is none.</doc>
  7220. <type name="GObject.Object" c:type="GObject*"/>
  7221. </return-value>
  7222. <parameters>
  7223. <instance-parameter name="res" transfer-ownership="none">
  7224. <doc xml:space="preserve">a #GAsyncResult</doc>
  7225. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7226. </instance-parameter>
  7227. </parameters>
  7228. </virtual-method>
  7229. <virtual-method name="get_user_data" invoker="get_user_data">
  7230. <doc xml:space="preserve">Gets the user data from a #GAsyncResult.</doc>
  7231. <return-value transfer-ownership="full" nullable="1">
  7232. <doc xml:space="preserve">the user data for @res.</doc>
  7233. <type name="gpointer" c:type="gpointer"/>
  7234. </return-value>
  7235. <parameters>
  7236. <instance-parameter name="res" transfer-ownership="none">
  7237. <doc xml:space="preserve">a #GAsyncResult.</doc>
  7238. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7239. </instance-parameter>
  7240. </parameters>
  7241. </virtual-method>
  7242. <virtual-method name="is_tagged" invoker="is_tagged" version="2.34">
  7243. <doc xml:space="preserve">Checks if @res has the given @source_tag (generally a function
  7244. pointer indicating the function @res was created by).</doc>
  7245. <return-value transfer-ownership="none">
  7246. <doc xml:space="preserve">%TRUE if @res has the indicated @source_tag, %FALSE if
  7247. not.</doc>
  7248. <type name="gboolean" c:type="gboolean"/>
  7249. </return-value>
  7250. <parameters>
  7251. <instance-parameter name="res" transfer-ownership="none">
  7252. <doc xml:space="preserve">a #GAsyncResult</doc>
  7253. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7254. </instance-parameter>
  7255. <parameter name="source_tag"
  7256. transfer-ownership="none"
  7257. nullable="1"
  7258. allow-none="1">
  7259. <doc xml:space="preserve">an application-defined tag</doc>
  7260. <type name="gpointer" c:type="gpointer"/>
  7261. </parameter>
  7262. </parameters>
  7263. </virtual-method>
  7264. <method name="get_source_object"
  7265. c:identifier="g_async_result_get_source_object">
  7266. <doc xml:space="preserve">Gets the source object from a #GAsyncResult.</doc>
  7267. <return-value transfer-ownership="full">
  7268. <doc xml:space="preserve">a new reference to the source object for the @res,
  7269. or %NULL if there is none.</doc>
  7270. <type name="GObject.Object" c:type="GObject*"/>
  7271. </return-value>
  7272. <parameters>
  7273. <instance-parameter name="res" transfer-ownership="none">
  7274. <doc xml:space="preserve">a #GAsyncResult</doc>
  7275. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7276. </instance-parameter>
  7277. </parameters>
  7278. </method>
  7279. <method name="get_user_data" c:identifier="g_async_result_get_user_data">
  7280. <doc xml:space="preserve">Gets the user data from a #GAsyncResult.</doc>
  7281. <return-value transfer-ownership="full" nullable="1">
  7282. <doc xml:space="preserve">the user data for @res.</doc>
  7283. <type name="gpointer" c:type="gpointer"/>
  7284. </return-value>
  7285. <parameters>
  7286. <instance-parameter name="res" transfer-ownership="none">
  7287. <doc xml:space="preserve">a #GAsyncResult.</doc>
  7288. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7289. </instance-parameter>
  7290. </parameters>
  7291. </method>
  7292. <method name="is_tagged"
  7293. c:identifier="g_async_result_is_tagged"
  7294. version="2.34">
  7295. <doc xml:space="preserve">Checks if @res has the given @source_tag (generally a function
  7296. pointer indicating the function @res was created by).</doc>
  7297. <return-value transfer-ownership="none">
  7298. <doc xml:space="preserve">%TRUE if @res has the indicated @source_tag, %FALSE if
  7299. not.</doc>
  7300. <type name="gboolean" c:type="gboolean"/>
  7301. </return-value>
  7302. <parameters>
  7303. <instance-parameter name="res" transfer-ownership="none">
  7304. <doc xml:space="preserve">a #GAsyncResult</doc>
  7305. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7306. </instance-parameter>
  7307. <parameter name="source_tag"
  7308. transfer-ownership="none"
  7309. nullable="1"
  7310. allow-none="1">
  7311. <doc xml:space="preserve">an application-defined tag</doc>
  7312. <type name="gpointer" c:type="gpointer"/>
  7313. </parameter>
  7314. </parameters>
  7315. </method>
  7316. <method name="legacy_propagate_error"
  7317. c:identifier="g_async_result_legacy_propagate_error"
  7318. version="2.34"
  7319. throws="1">
  7320. <doc xml:space="preserve">If @res is a #GSimpleAsyncResult, this is equivalent to
  7321. g_simple_async_result_propagate_error(). Otherwise it returns
  7322. %FALSE.
  7323. This can be used for legacy error handling in async *_finish()
  7324. wrapper functions that traditionally handled #GSimpleAsyncResult
  7325. error returns themselves rather than calling into the virtual method.
  7326. This should not be used in new code; #GAsyncResult errors that are
  7327. set by virtual methods should also be extracted by virtual methods,
  7328. to enable subclasses to chain up correctly.</doc>
  7329. <return-value transfer-ownership="none">
  7330. <doc xml:space="preserve">%TRUE if @error is has been filled in with an error from
  7331. @res, %FALSE if not.</doc>
  7332. <type name="gboolean" c:type="gboolean"/>
  7333. </return-value>
  7334. <parameters>
  7335. <instance-parameter name="res" transfer-ownership="none">
  7336. <doc xml:space="preserve">a #GAsyncResult</doc>
  7337. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7338. </instance-parameter>
  7339. </parameters>
  7340. </method>
  7341. </interface>
  7342. <record name="AsyncResultIface"
  7343. c:type="GAsyncResultIface"
  7344. glib:is-gtype-struct-for="AsyncResult">
  7345. <doc xml:space="preserve">Interface definition for #GAsyncResult.</doc>
  7346. <field name="g_iface">
  7347. <doc xml:space="preserve">The parent interface.</doc>
  7348. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  7349. </field>
  7350. <field name="get_user_data">
  7351. <callback name="get_user_data">
  7352. <return-value transfer-ownership="full" nullable="1">
  7353. <doc xml:space="preserve">the user data for @res.</doc>
  7354. <type name="gpointer" c:type="gpointer"/>
  7355. </return-value>
  7356. <parameters>
  7357. <parameter name="res" transfer-ownership="none">
  7358. <doc xml:space="preserve">a #GAsyncResult.</doc>
  7359. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7360. </parameter>
  7361. </parameters>
  7362. </callback>
  7363. </field>
  7364. <field name="get_source_object">
  7365. <callback name="get_source_object">
  7366. <return-value transfer-ownership="full">
  7367. <doc xml:space="preserve">a new reference to the source object for the @res,
  7368. or %NULL if there is none.</doc>
  7369. <type name="GObject.Object" c:type="GObject*"/>
  7370. </return-value>
  7371. <parameters>
  7372. <parameter name="res" transfer-ownership="none">
  7373. <doc xml:space="preserve">a #GAsyncResult</doc>
  7374. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7375. </parameter>
  7376. </parameters>
  7377. </callback>
  7378. </field>
  7379. <field name="is_tagged">
  7380. <callback name="is_tagged">
  7381. <return-value transfer-ownership="none">
  7382. <doc xml:space="preserve">%TRUE if @res has the indicated @source_tag, %FALSE if
  7383. not.</doc>
  7384. <type name="gboolean" c:type="gboolean"/>
  7385. </return-value>
  7386. <parameters>
  7387. <parameter name="res" transfer-ownership="none">
  7388. <doc xml:space="preserve">a #GAsyncResult</doc>
  7389. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7390. </parameter>
  7391. <parameter name="source_tag"
  7392. transfer-ownership="none"
  7393. nullable="1"
  7394. allow-none="1">
  7395. <doc xml:space="preserve">an application-defined tag</doc>
  7396. <type name="gpointer" c:type="gpointer"/>
  7397. </parameter>
  7398. </parameters>
  7399. </callback>
  7400. </field>
  7401. </record>
  7402. <class name="BufferedInputStream"
  7403. c:symbol-prefix="buffered_input_stream"
  7404. c:type="GBufferedInputStream"
  7405. parent="FilterInputStream"
  7406. glib:type-name="GBufferedInputStream"
  7407. glib:get-type="g_buffered_input_stream_get_type"
  7408. glib:type-struct="BufferedInputStreamClass">
  7409. <doc xml:space="preserve">Buffered input stream implements #GFilterInputStream and provides
  7410. for buffered reads.
  7411. By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
  7412. To create a buffered input stream, use g_buffered_input_stream_new(),
  7413. or g_buffered_input_stream_new_sized() to specify the buffer's size at
  7414. construction.
  7415. To get the size of a buffer within a buffered input stream, use
  7416. g_buffered_input_stream_get_buffer_size(). To change the size of a
  7417. buffered input stream's buffer, use
  7418. g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
  7419. cannot be reduced below the size of the data within the buffer.</doc>
  7420. <implements name="Seekable"/>
  7421. <constructor name="new" c:identifier="g_buffered_input_stream_new">
  7422. <doc xml:space="preserve">Creates a new #GInputStream from the given @base_stream, with
  7423. a buffer set to the default size (4 kilobytes).</doc>
  7424. <return-value transfer-ownership="full">
  7425. <doc xml:space="preserve">a #GInputStream for the given @base_stream.</doc>
  7426. <type name="InputStream" c:type="GInputStream*"/>
  7427. </return-value>
  7428. <parameters>
  7429. <parameter name="base_stream" transfer-ownership="none">
  7430. <doc xml:space="preserve">a #GInputStream</doc>
  7431. <type name="InputStream" c:type="GInputStream*"/>
  7432. </parameter>
  7433. </parameters>
  7434. </constructor>
  7435. <constructor name="new_sized"
  7436. c:identifier="g_buffered_input_stream_new_sized">
  7437. <doc xml:space="preserve">Creates a new #GBufferedInputStream from the given @base_stream,
  7438. with a buffer set to @size.</doc>
  7439. <return-value transfer-ownership="full">
  7440. <doc xml:space="preserve">a #GInputStream.</doc>
  7441. <type name="InputStream" c:type="GInputStream*"/>
  7442. </return-value>
  7443. <parameters>
  7444. <parameter name="base_stream" transfer-ownership="none">
  7445. <doc xml:space="preserve">a #GInputStream</doc>
  7446. <type name="InputStream" c:type="GInputStream*"/>
  7447. </parameter>
  7448. <parameter name="size" transfer-ownership="none">
  7449. <doc xml:space="preserve">a #gsize</doc>
  7450. <type name="gsize" c:type="gsize"/>
  7451. </parameter>
  7452. </parameters>
  7453. </constructor>
  7454. <virtual-method name="fill" invoker="fill" throws="1">
  7455. <doc xml:space="preserve">Tries to read @count bytes from the stream into the buffer.
  7456. Will block during this read.
  7457. If @count is zero, returns zero and does nothing. A value of @count
  7458. larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  7459. On success, the number of bytes read into the buffer is returned.
  7460. It is not an error if this is not the same as the requested size, as it
  7461. can happen e.g. near the end of a file. Zero is returned on end of file
  7462. (or if @count is zero), but never otherwise.
  7463. If @count is -1 then the attempted read size is equal to the number of
  7464. bytes that are required to fill the buffer.
  7465. If @cancellable is not %NULL, then the operation can be cancelled by
  7466. triggering the cancellable object from another thread. If the operation
  7467. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  7468. operation was partially finished when the operation was cancelled the
  7469. partial result will be returned, without an error.
  7470. On error -1 is returned and @error is set accordingly.
  7471. For the asynchronous, non-blocking, version of this function, see
  7472. g_buffered_input_stream_fill_async().</doc>
  7473. <return-value transfer-ownership="none">
  7474. <doc xml:space="preserve">the number of bytes read into @stream's buffer, up to @count,
  7475. or -1 on error.</doc>
  7476. <type name="gssize" c:type="gssize"/>
  7477. </return-value>
  7478. <parameters>
  7479. <instance-parameter name="stream" transfer-ownership="none">
  7480. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7481. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7482. </instance-parameter>
  7483. <parameter name="count" transfer-ownership="none">
  7484. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  7485. <type name="gssize" c:type="gssize"/>
  7486. </parameter>
  7487. <parameter name="cancellable"
  7488. transfer-ownership="none"
  7489. nullable="1"
  7490. allow-none="1">
  7491. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  7492. <type name="Cancellable" c:type="GCancellable*"/>
  7493. </parameter>
  7494. </parameters>
  7495. </virtual-method>
  7496. <virtual-method name="fill_async" invoker="fill_async">
  7497. <doc xml:space="preserve">Reads data into @stream's buffer asynchronously, up to @count size.
  7498. @io_priority can be used to prioritize reads. For the synchronous
  7499. version of this function, see g_buffered_input_stream_fill().
  7500. If @count is -1 then the attempted read size is equal to the number
  7501. of bytes that are required to fill the buffer.</doc>
  7502. <return-value transfer-ownership="none">
  7503. <type name="none" c:type="void"/>
  7504. </return-value>
  7505. <parameters>
  7506. <instance-parameter name="stream" transfer-ownership="none">
  7507. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7508. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7509. </instance-parameter>
  7510. <parameter name="count" transfer-ownership="none">
  7511. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  7512. <type name="gssize" c:type="gssize"/>
  7513. </parameter>
  7514. <parameter name="io_priority" transfer-ownership="none">
  7515. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  7516. <type name="gint" c:type="int"/>
  7517. </parameter>
  7518. <parameter name="cancellable"
  7519. transfer-ownership="none"
  7520. nullable="1"
  7521. allow-none="1">
  7522. <doc xml:space="preserve">optional #GCancellable object</doc>
  7523. <type name="Cancellable" c:type="GCancellable*"/>
  7524. </parameter>
  7525. <parameter name="callback"
  7526. transfer-ownership="none"
  7527. nullable="1"
  7528. allow-none="1"
  7529. scope="async"
  7530. closure="4">
  7531. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  7532. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  7533. </parameter>
  7534. <parameter name="user_data"
  7535. transfer-ownership="none"
  7536. nullable="1"
  7537. allow-none="1"
  7538. closure="4">
  7539. <doc xml:space="preserve">a #gpointer</doc>
  7540. <type name="gpointer" c:type="gpointer"/>
  7541. </parameter>
  7542. </parameters>
  7543. </virtual-method>
  7544. <virtual-method name="fill_finish" invoker="fill_finish" throws="1">
  7545. <doc xml:space="preserve">Finishes an asynchronous read.</doc>
  7546. <return-value transfer-ownership="none">
  7547. <doc xml:space="preserve">a #gssize of the read stream, or %-1 on an error.</doc>
  7548. <type name="gssize" c:type="gssize"/>
  7549. </return-value>
  7550. <parameters>
  7551. <instance-parameter name="stream" transfer-ownership="none">
  7552. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7553. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7554. </instance-parameter>
  7555. <parameter name="result" transfer-ownership="none">
  7556. <doc xml:space="preserve">a #GAsyncResult</doc>
  7557. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7558. </parameter>
  7559. </parameters>
  7560. </virtual-method>
  7561. <method name="fill"
  7562. c:identifier="g_buffered_input_stream_fill"
  7563. throws="1">
  7564. <doc xml:space="preserve">Tries to read @count bytes from the stream into the buffer.
  7565. Will block during this read.
  7566. If @count is zero, returns zero and does nothing. A value of @count
  7567. larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  7568. On success, the number of bytes read into the buffer is returned.
  7569. It is not an error if this is not the same as the requested size, as it
  7570. can happen e.g. near the end of a file. Zero is returned on end of file
  7571. (or if @count is zero), but never otherwise.
  7572. If @count is -1 then the attempted read size is equal to the number of
  7573. bytes that are required to fill the buffer.
  7574. If @cancellable is not %NULL, then the operation can be cancelled by
  7575. triggering the cancellable object from another thread. If the operation
  7576. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  7577. operation was partially finished when the operation was cancelled the
  7578. partial result will be returned, without an error.
  7579. On error -1 is returned and @error is set accordingly.
  7580. For the asynchronous, non-blocking, version of this function, see
  7581. g_buffered_input_stream_fill_async().</doc>
  7582. <return-value transfer-ownership="none">
  7583. <doc xml:space="preserve">the number of bytes read into @stream's buffer, up to @count,
  7584. or -1 on error.</doc>
  7585. <type name="gssize" c:type="gssize"/>
  7586. </return-value>
  7587. <parameters>
  7588. <instance-parameter name="stream" transfer-ownership="none">
  7589. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7590. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7591. </instance-parameter>
  7592. <parameter name="count" transfer-ownership="none">
  7593. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  7594. <type name="gssize" c:type="gssize"/>
  7595. </parameter>
  7596. <parameter name="cancellable"
  7597. transfer-ownership="none"
  7598. nullable="1"
  7599. allow-none="1">
  7600. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  7601. <type name="Cancellable" c:type="GCancellable*"/>
  7602. </parameter>
  7603. </parameters>
  7604. </method>
  7605. <method name="fill_async"
  7606. c:identifier="g_buffered_input_stream_fill_async">
  7607. <doc xml:space="preserve">Reads data into @stream's buffer asynchronously, up to @count size.
  7608. @io_priority can be used to prioritize reads. For the synchronous
  7609. version of this function, see g_buffered_input_stream_fill().
  7610. If @count is -1 then the attempted read size is equal to the number
  7611. of bytes that are required to fill the buffer.</doc>
  7612. <return-value transfer-ownership="none">
  7613. <type name="none" c:type="void"/>
  7614. </return-value>
  7615. <parameters>
  7616. <instance-parameter name="stream" transfer-ownership="none">
  7617. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7618. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7619. </instance-parameter>
  7620. <parameter name="count" transfer-ownership="none">
  7621. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  7622. <type name="gssize" c:type="gssize"/>
  7623. </parameter>
  7624. <parameter name="io_priority" transfer-ownership="none">
  7625. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  7626. <type name="gint" c:type="int"/>
  7627. </parameter>
  7628. <parameter name="cancellable"
  7629. transfer-ownership="none"
  7630. nullable="1"
  7631. allow-none="1">
  7632. <doc xml:space="preserve">optional #GCancellable object</doc>
  7633. <type name="Cancellable" c:type="GCancellable*"/>
  7634. </parameter>
  7635. <parameter name="callback"
  7636. transfer-ownership="none"
  7637. nullable="1"
  7638. allow-none="1"
  7639. scope="async"
  7640. closure="4">
  7641. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  7642. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  7643. </parameter>
  7644. <parameter name="user_data"
  7645. transfer-ownership="none"
  7646. nullable="1"
  7647. allow-none="1">
  7648. <doc xml:space="preserve">a #gpointer</doc>
  7649. <type name="gpointer" c:type="gpointer"/>
  7650. </parameter>
  7651. </parameters>
  7652. </method>
  7653. <method name="fill_finish"
  7654. c:identifier="g_buffered_input_stream_fill_finish"
  7655. throws="1">
  7656. <doc xml:space="preserve">Finishes an asynchronous read.</doc>
  7657. <return-value transfer-ownership="none">
  7658. <doc xml:space="preserve">a #gssize of the read stream, or %-1 on an error.</doc>
  7659. <type name="gssize" c:type="gssize"/>
  7660. </return-value>
  7661. <parameters>
  7662. <instance-parameter name="stream" transfer-ownership="none">
  7663. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7664. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7665. </instance-parameter>
  7666. <parameter name="result" transfer-ownership="none">
  7667. <doc xml:space="preserve">a #GAsyncResult</doc>
  7668. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7669. </parameter>
  7670. </parameters>
  7671. </method>
  7672. <method name="get_available"
  7673. c:identifier="g_buffered_input_stream_get_available">
  7674. <doc xml:space="preserve">Gets the size of the available data within the stream.</doc>
  7675. <return-value transfer-ownership="none">
  7676. <doc xml:space="preserve">size of the available stream.</doc>
  7677. <type name="gsize" c:type="gsize"/>
  7678. </return-value>
  7679. <parameters>
  7680. <instance-parameter name="stream" transfer-ownership="none">
  7681. <doc xml:space="preserve">#GBufferedInputStream</doc>
  7682. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7683. </instance-parameter>
  7684. </parameters>
  7685. </method>
  7686. <method name="get_buffer_size"
  7687. c:identifier="g_buffered_input_stream_get_buffer_size">
  7688. <doc xml:space="preserve">Gets the size of the input buffer.</doc>
  7689. <return-value transfer-ownership="none">
  7690. <doc xml:space="preserve">the current buffer size.</doc>
  7691. <type name="gsize" c:type="gsize"/>
  7692. </return-value>
  7693. <parameters>
  7694. <instance-parameter name="stream" transfer-ownership="none">
  7695. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7696. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7697. </instance-parameter>
  7698. </parameters>
  7699. </method>
  7700. <method name="peek" c:identifier="g_buffered_input_stream_peek">
  7701. <doc xml:space="preserve">Peeks in the buffer, copying data of size @count into @buffer,
  7702. offset @offset bytes.</doc>
  7703. <return-value transfer-ownership="none">
  7704. <doc xml:space="preserve">a #gsize of the number of bytes peeked, or -1 on error.</doc>
  7705. <type name="gsize" c:type="gsize"/>
  7706. </return-value>
  7707. <parameters>
  7708. <instance-parameter name="stream" transfer-ownership="none">
  7709. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7710. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7711. </instance-parameter>
  7712. <parameter name="buffer" transfer-ownership="none">
  7713. <doc xml:space="preserve">a pointer to
  7714. an allocated chunk of memory</doc>
  7715. <array length="2" zero-terminated="0" c:type="void*">
  7716. <type name="guint8"/>
  7717. </array>
  7718. </parameter>
  7719. <parameter name="offset" transfer-ownership="none">
  7720. <doc xml:space="preserve">a #gsize</doc>
  7721. <type name="gsize" c:type="gsize"/>
  7722. </parameter>
  7723. <parameter name="count" transfer-ownership="none">
  7724. <doc xml:space="preserve">a #gsize</doc>
  7725. <type name="gsize" c:type="gsize"/>
  7726. </parameter>
  7727. </parameters>
  7728. </method>
  7729. <method name="peek_buffer"
  7730. c:identifier="g_buffered_input_stream_peek_buffer">
  7731. <doc xml:space="preserve">Returns the buffer with the currently available bytes. The returned
  7732. buffer must not be modified and will become invalid when reading from
  7733. the stream or filling the buffer.</doc>
  7734. <return-value transfer-ownership="none">
  7735. <doc xml:space="preserve">
  7736. read-only buffer</doc>
  7737. <array length="0" zero-terminated="0" c:type="void*">
  7738. <type name="guint8"/>
  7739. </array>
  7740. </return-value>
  7741. <parameters>
  7742. <instance-parameter name="stream" transfer-ownership="none">
  7743. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7744. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7745. </instance-parameter>
  7746. <parameter name="count"
  7747. direction="out"
  7748. caller-allocates="0"
  7749. transfer-ownership="full">
  7750. <doc xml:space="preserve">a #gsize to get the number of bytes available in the buffer</doc>
  7751. <type name="gsize" c:type="gsize*"/>
  7752. </parameter>
  7753. </parameters>
  7754. </method>
  7755. <method name="read_byte"
  7756. c:identifier="g_buffered_input_stream_read_byte"
  7757. throws="1">
  7758. <doc xml:space="preserve">Tries to read a single byte from the stream or the buffer. Will block
  7759. during this read.
  7760. On success, the byte read from the stream is returned. On end of stream
  7761. -1 is returned but it's not an exceptional error and @error is not set.
  7762. If @cancellable is not %NULL, then the operation can be cancelled by
  7763. triggering the cancellable object from another thread. If the operation
  7764. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  7765. operation was partially finished when the operation was cancelled the
  7766. partial result will be returned, without an error.
  7767. On error -1 is returned and @error is set accordingly.</doc>
  7768. <return-value transfer-ownership="none">
  7769. <doc xml:space="preserve">the byte read from the @stream, or -1 on end of stream or error.</doc>
  7770. <type name="gint" c:type="int"/>
  7771. </return-value>
  7772. <parameters>
  7773. <instance-parameter name="stream" transfer-ownership="none">
  7774. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7775. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7776. </instance-parameter>
  7777. <parameter name="cancellable"
  7778. transfer-ownership="none"
  7779. nullable="1"
  7780. allow-none="1">
  7781. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  7782. <type name="Cancellable" c:type="GCancellable*"/>
  7783. </parameter>
  7784. </parameters>
  7785. </method>
  7786. <method name="set_buffer_size"
  7787. c:identifier="g_buffered_input_stream_set_buffer_size">
  7788. <doc xml:space="preserve">Sets the size of the internal buffer of @stream to @size, or to the
  7789. size of the contents of the buffer. The buffer can never be resized
  7790. smaller than its current contents.</doc>
  7791. <return-value transfer-ownership="none">
  7792. <type name="none" c:type="void"/>
  7793. </return-value>
  7794. <parameters>
  7795. <instance-parameter name="stream" transfer-ownership="none">
  7796. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7797. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7798. </instance-parameter>
  7799. <parameter name="size" transfer-ownership="none">
  7800. <doc xml:space="preserve">a #gsize</doc>
  7801. <type name="gsize" c:type="gsize"/>
  7802. </parameter>
  7803. </parameters>
  7804. </method>
  7805. <property name="buffer-size"
  7806. writable="1"
  7807. construct="1"
  7808. transfer-ownership="none">
  7809. <type name="guint" c:type="guint"/>
  7810. </property>
  7811. <field name="parent_instance">
  7812. <type name="FilterInputStream" c:type="GFilterInputStream"/>
  7813. </field>
  7814. <field name="priv" readable="0" private="1">
  7815. <type name="BufferedInputStreamPrivate"
  7816. c:type="GBufferedInputStreamPrivate*"/>
  7817. </field>
  7818. </class>
  7819. <record name="BufferedInputStreamClass"
  7820. c:type="GBufferedInputStreamClass"
  7821. glib:is-gtype-struct-for="BufferedInputStream">
  7822. <field name="parent_class">
  7823. <type name="FilterInputStreamClass" c:type="GFilterInputStreamClass"/>
  7824. </field>
  7825. <field name="fill">
  7826. <callback name="fill" throws="1">
  7827. <return-value transfer-ownership="none">
  7828. <doc xml:space="preserve">the number of bytes read into @stream's buffer, up to @count,
  7829. or -1 on error.</doc>
  7830. <type name="gssize" c:type="gssize"/>
  7831. </return-value>
  7832. <parameters>
  7833. <parameter name="stream" transfer-ownership="none">
  7834. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7835. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7836. </parameter>
  7837. <parameter name="count" transfer-ownership="none">
  7838. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  7839. <type name="gssize" c:type="gssize"/>
  7840. </parameter>
  7841. <parameter name="cancellable"
  7842. transfer-ownership="none"
  7843. nullable="1"
  7844. allow-none="1">
  7845. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  7846. <type name="Cancellable" c:type="GCancellable*"/>
  7847. </parameter>
  7848. </parameters>
  7849. </callback>
  7850. </field>
  7851. <field name="fill_async">
  7852. <callback name="fill_async">
  7853. <return-value transfer-ownership="none">
  7854. <type name="none" c:type="void"/>
  7855. </return-value>
  7856. <parameters>
  7857. <parameter name="stream" transfer-ownership="none">
  7858. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7859. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7860. </parameter>
  7861. <parameter name="count" transfer-ownership="none">
  7862. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  7863. <type name="gssize" c:type="gssize"/>
  7864. </parameter>
  7865. <parameter name="io_priority" transfer-ownership="none">
  7866. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  7867. <type name="gint" c:type="int"/>
  7868. </parameter>
  7869. <parameter name="cancellable"
  7870. transfer-ownership="none"
  7871. nullable="1"
  7872. allow-none="1">
  7873. <doc xml:space="preserve">optional #GCancellable object</doc>
  7874. <type name="Cancellable" c:type="GCancellable*"/>
  7875. </parameter>
  7876. <parameter name="callback"
  7877. transfer-ownership="none"
  7878. nullable="1"
  7879. allow-none="1"
  7880. scope="async"
  7881. closure="5">
  7882. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  7883. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  7884. </parameter>
  7885. <parameter name="user_data"
  7886. transfer-ownership="none"
  7887. nullable="1"
  7888. allow-none="1"
  7889. closure="5">
  7890. <doc xml:space="preserve">a #gpointer</doc>
  7891. <type name="gpointer" c:type="gpointer"/>
  7892. </parameter>
  7893. </parameters>
  7894. </callback>
  7895. </field>
  7896. <field name="fill_finish">
  7897. <callback name="fill_finish" throws="1">
  7898. <return-value transfer-ownership="none">
  7899. <doc xml:space="preserve">a #gssize of the read stream, or %-1 on an error.</doc>
  7900. <type name="gssize" c:type="gssize"/>
  7901. </return-value>
  7902. <parameters>
  7903. <parameter name="stream" transfer-ownership="none">
  7904. <doc xml:space="preserve">a #GBufferedInputStream</doc>
  7905. <type name="BufferedInputStream" c:type="GBufferedInputStream*"/>
  7906. </parameter>
  7907. <parameter name="result" transfer-ownership="none">
  7908. <doc xml:space="preserve">a #GAsyncResult</doc>
  7909. <type name="AsyncResult" c:type="GAsyncResult*"/>
  7910. </parameter>
  7911. </parameters>
  7912. </callback>
  7913. </field>
  7914. <field name="_g_reserved1" introspectable="0">
  7915. <callback name="_g_reserved1">
  7916. <return-value transfer-ownership="none">
  7917. <type name="none" c:type="void"/>
  7918. </return-value>
  7919. </callback>
  7920. </field>
  7921. <field name="_g_reserved2" introspectable="0">
  7922. <callback name="_g_reserved2">
  7923. <return-value transfer-ownership="none">
  7924. <type name="none" c:type="void"/>
  7925. </return-value>
  7926. </callback>
  7927. </field>
  7928. <field name="_g_reserved3" introspectable="0">
  7929. <callback name="_g_reserved3">
  7930. <return-value transfer-ownership="none">
  7931. <type name="none" c:type="void"/>
  7932. </return-value>
  7933. </callback>
  7934. </field>
  7935. <field name="_g_reserved4" introspectable="0">
  7936. <callback name="_g_reserved4">
  7937. <return-value transfer-ownership="none">
  7938. <type name="none" c:type="void"/>
  7939. </return-value>
  7940. </callback>
  7941. </field>
  7942. <field name="_g_reserved5" introspectable="0">
  7943. <callback name="_g_reserved5">
  7944. <return-value transfer-ownership="none">
  7945. <type name="none" c:type="void"/>
  7946. </return-value>
  7947. </callback>
  7948. </field>
  7949. </record>
  7950. <record name="BufferedInputStreamPrivate"
  7951. c:type="GBufferedInputStreamPrivate"
  7952. disguised="1">
  7953. </record>
  7954. <class name="BufferedOutputStream"
  7955. c:symbol-prefix="buffered_output_stream"
  7956. c:type="GBufferedOutputStream"
  7957. parent="FilterOutputStream"
  7958. glib:type-name="GBufferedOutputStream"
  7959. glib:get-type="g_buffered_output_stream_get_type"
  7960. glib:type-struct="BufferedOutputStreamClass">
  7961. <doc xml:space="preserve">Buffered output stream implements #GFilterOutputStream and provides
  7962. for buffered writes.
  7963. By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
  7964. To create a buffered output stream, use g_buffered_output_stream_new(),
  7965. or g_buffered_output_stream_new_sized() to specify the buffer's size
  7966. at construction.
  7967. To get the size of a buffer within a buffered input stream, use
  7968. g_buffered_output_stream_get_buffer_size(). To change the size of a
  7969. buffered output stream's buffer, use
  7970. g_buffered_output_stream_set_buffer_size(). Note that the buffer's
  7971. size cannot be reduced below the size of the data within the buffer.</doc>
  7972. <implements name="Seekable"/>
  7973. <constructor name="new" c:identifier="g_buffered_output_stream_new">
  7974. <doc xml:space="preserve">Creates a new buffered output stream for a base stream.</doc>
  7975. <return-value transfer-ownership="full">
  7976. <doc xml:space="preserve">a #GOutputStream for the given @base_stream.</doc>
  7977. <type name="OutputStream" c:type="GOutputStream*"/>
  7978. </return-value>
  7979. <parameters>
  7980. <parameter name="base_stream" transfer-ownership="none">
  7981. <doc xml:space="preserve">a #GOutputStream.</doc>
  7982. <type name="OutputStream" c:type="GOutputStream*"/>
  7983. </parameter>
  7984. </parameters>
  7985. </constructor>
  7986. <constructor name="new_sized"
  7987. c:identifier="g_buffered_output_stream_new_sized">
  7988. <doc xml:space="preserve">Creates a new buffered output stream with a given buffer size.</doc>
  7989. <return-value transfer-ownership="full">
  7990. <doc xml:space="preserve">a #GOutputStream with an internal buffer set to @size.</doc>
  7991. <type name="OutputStream" c:type="GOutputStream*"/>
  7992. </return-value>
  7993. <parameters>
  7994. <parameter name="base_stream" transfer-ownership="none">
  7995. <doc xml:space="preserve">a #GOutputStream.</doc>
  7996. <type name="OutputStream" c:type="GOutputStream*"/>
  7997. </parameter>
  7998. <parameter name="size" transfer-ownership="none">
  7999. <doc xml:space="preserve">a #gsize.</doc>
  8000. <type name="gsize" c:type="gsize"/>
  8001. </parameter>
  8002. </parameters>
  8003. </constructor>
  8004. <method name="get_auto_grow"
  8005. c:identifier="g_buffered_output_stream_get_auto_grow">
  8006. <doc xml:space="preserve">Checks if the buffer automatically grows as data is added.</doc>
  8007. <return-value transfer-ownership="none">
  8008. <doc xml:space="preserve">%TRUE if the @stream's buffer automatically grows,
  8009. %FALSE otherwise.</doc>
  8010. <type name="gboolean" c:type="gboolean"/>
  8011. </return-value>
  8012. <parameters>
  8013. <instance-parameter name="stream" transfer-ownership="none">
  8014. <doc xml:space="preserve">a #GBufferedOutputStream.</doc>
  8015. <type name="BufferedOutputStream" c:type="GBufferedOutputStream*"/>
  8016. </instance-parameter>
  8017. </parameters>
  8018. </method>
  8019. <method name="get_buffer_size"
  8020. c:identifier="g_buffered_output_stream_get_buffer_size">
  8021. <doc xml:space="preserve">Gets the size of the buffer in the @stream.</doc>
  8022. <return-value transfer-ownership="none">
  8023. <doc xml:space="preserve">the current size of the buffer.</doc>
  8024. <type name="gsize" c:type="gsize"/>
  8025. </return-value>
  8026. <parameters>
  8027. <instance-parameter name="stream" transfer-ownership="none">
  8028. <doc xml:space="preserve">a #GBufferedOutputStream.</doc>
  8029. <type name="BufferedOutputStream" c:type="GBufferedOutputStream*"/>
  8030. </instance-parameter>
  8031. </parameters>
  8032. </method>
  8033. <method name="set_auto_grow"
  8034. c:identifier="g_buffered_output_stream_set_auto_grow">
  8035. <doc xml:space="preserve">Sets whether or not the @stream's buffer should automatically grow.
  8036. If @auto_grow is true, then each write will just make the buffer
  8037. larger, and you must manually flush the buffer to actually write out
  8038. the data to the underlying stream.</doc>
  8039. <return-value transfer-ownership="none">
  8040. <type name="none" c:type="void"/>
  8041. </return-value>
  8042. <parameters>
  8043. <instance-parameter name="stream" transfer-ownership="none">
  8044. <doc xml:space="preserve">a #GBufferedOutputStream.</doc>
  8045. <type name="BufferedOutputStream" c:type="GBufferedOutputStream*"/>
  8046. </instance-parameter>
  8047. <parameter name="auto_grow" transfer-ownership="none">
  8048. <doc xml:space="preserve">a #gboolean.</doc>
  8049. <type name="gboolean" c:type="gboolean"/>
  8050. </parameter>
  8051. </parameters>
  8052. </method>
  8053. <method name="set_buffer_size"
  8054. c:identifier="g_buffered_output_stream_set_buffer_size">
  8055. <doc xml:space="preserve">Sets the size of the internal buffer to @size.</doc>
  8056. <return-value transfer-ownership="none">
  8057. <type name="none" c:type="void"/>
  8058. </return-value>
  8059. <parameters>
  8060. <instance-parameter name="stream" transfer-ownership="none">
  8061. <doc xml:space="preserve">a #GBufferedOutputStream.</doc>
  8062. <type name="BufferedOutputStream" c:type="GBufferedOutputStream*"/>
  8063. </instance-parameter>
  8064. <parameter name="size" transfer-ownership="none">
  8065. <doc xml:space="preserve">a #gsize.</doc>
  8066. <type name="gsize" c:type="gsize"/>
  8067. </parameter>
  8068. </parameters>
  8069. </method>
  8070. <property name="auto-grow" writable="1" transfer-ownership="none">
  8071. <type name="gboolean" c:type="gboolean"/>
  8072. </property>
  8073. <property name="buffer-size"
  8074. writable="1"
  8075. construct="1"
  8076. transfer-ownership="none">
  8077. <type name="guint" c:type="guint"/>
  8078. </property>
  8079. <field name="parent_instance">
  8080. <type name="FilterOutputStream" c:type="GFilterOutputStream"/>
  8081. </field>
  8082. <field name="priv">
  8083. <type name="BufferedOutputStreamPrivate"
  8084. c:type="GBufferedOutputStreamPrivate*"/>
  8085. </field>
  8086. </class>
  8087. <record name="BufferedOutputStreamClass"
  8088. c:type="GBufferedOutputStreamClass"
  8089. glib:is-gtype-struct-for="BufferedOutputStream">
  8090. <field name="parent_class">
  8091. <type name="FilterOutputStreamClass"
  8092. c:type="GFilterOutputStreamClass"/>
  8093. </field>
  8094. <field name="_g_reserved1" introspectable="0">
  8095. <callback name="_g_reserved1">
  8096. <return-value transfer-ownership="none">
  8097. <type name="none" c:type="void"/>
  8098. </return-value>
  8099. </callback>
  8100. </field>
  8101. <field name="_g_reserved2" introspectable="0">
  8102. <callback name="_g_reserved2">
  8103. <return-value transfer-ownership="none">
  8104. <type name="none" c:type="void"/>
  8105. </return-value>
  8106. </callback>
  8107. </field>
  8108. </record>
  8109. <record name="BufferedOutputStreamPrivate"
  8110. c:type="GBufferedOutputStreamPrivate"
  8111. disguised="1">
  8112. </record>
  8113. <callback name="BusAcquiredCallback"
  8114. c:type="GBusAcquiredCallback"
  8115. version="2.26">
  8116. <doc xml:space="preserve">Invoked when a connection to a message bus has been obtained.</doc>
  8117. <return-value transfer-ownership="none">
  8118. <type name="none" c:type="void"/>
  8119. </return-value>
  8120. <parameters>
  8121. <parameter name="connection" transfer-ownership="none">
  8122. <doc xml:space="preserve">The #GDBusConnection to a message bus.</doc>
  8123. <type name="DBusConnection" c:type="GDBusConnection*"/>
  8124. </parameter>
  8125. <parameter name="name" transfer-ownership="none">
  8126. <doc xml:space="preserve">The name that is requested to be owned.</doc>
  8127. <type name="utf8" c:type="const gchar*"/>
  8128. </parameter>
  8129. <parameter name="user_data"
  8130. transfer-ownership="none"
  8131. nullable="1"
  8132. allow-none="1"
  8133. closure="2">
  8134. <doc xml:space="preserve">User data passed to g_bus_own_name().</doc>
  8135. <type name="gpointer" c:type="gpointer"/>
  8136. </parameter>
  8137. </parameters>
  8138. </callback>
  8139. <callback name="BusNameAcquiredCallback"
  8140. c:type="GBusNameAcquiredCallback"
  8141. version="2.26">
  8142. <doc xml:space="preserve">Invoked when the name is acquired.</doc>
  8143. <return-value transfer-ownership="none">
  8144. <type name="none" c:type="void"/>
  8145. </return-value>
  8146. <parameters>
  8147. <parameter name="connection" transfer-ownership="none">
  8148. <doc xml:space="preserve">The #GDBusConnection on which to acquired the name.</doc>
  8149. <type name="DBusConnection" c:type="GDBusConnection*"/>
  8150. </parameter>
  8151. <parameter name="name" transfer-ownership="none">
  8152. <doc xml:space="preserve">The name being owned.</doc>
  8153. <type name="utf8" c:type="const gchar*"/>
  8154. </parameter>
  8155. <parameter name="user_data"
  8156. transfer-ownership="none"
  8157. nullable="1"
  8158. allow-none="1"
  8159. closure="2">
  8160. <doc xml:space="preserve">User data passed to g_bus_own_name() or g_bus_own_name_on_connection().</doc>
  8161. <type name="gpointer" c:type="gpointer"/>
  8162. </parameter>
  8163. </parameters>
  8164. </callback>
  8165. <callback name="BusNameAppearedCallback"
  8166. c:type="GBusNameAppearedCallback"
  8167. version="2.26">
  8168. <doc xml:space="preserve">Invoked when the name being watched is known to have to have a owner.</doc>
  8169. <return-value transfer-ownership="none">
  8170. <type name="none" c:type="void"/>
  8171. </return-value>
  8172. <parameters>
  8173. <parameter name="connection" transfer-ownership="none">
  8174. <doc xml:space="preserve">The #GDBusConnection the name is being watched on.</doc>
  8175. <type name="DBusConnection" c:type="GDBusConnection*"/>
  8176. </parameter>
  8177. <parameter name="name" transfer-ownership="none">
  8178. <doc xml:space="preserve">The name being watched.</doc>
  8179. <type name="utf8" c:type="const gchar*"/>
  8180. </parameter>
  8181. <parameter name="name_owner" transfer-ownership="none">
  8182. <doc xml:space="preserve">Unique name of the owner of the name being watched.</doc>
  8183. <type name="utf8" c:type="const gchar*"/>
  8184. </parameter>
  8185. <parameter name="user_data"
  8186. transfer-ownership="none"
  8187. nullable="1"
  8188. allow-none="1"
  8189. closure="3">
  8190. <doc xml:space="preserve">User data passed to g_bus_watch_name().</doc>
  8191. <type name="gpointer" c:type="gpointer"/>
  8192. </parameter>
  8193. </parameters>
  8194. </callback>
  8195. <callback name="BusNameLostCallback"
  8196. c:type="GBusNameLostCallback"
  8197. version="2.26">
  8198. <doc xml:space="preserve">Invoked when the name is lost or @connection has been closed.</doc>
  8199. <return-value transfer-ownership="none">
  8200. <type name="none" c:type="void"/>
  8201. </return-value>
  8202. <parameters>
  8203. <parameter name="connection" transfer-ownership="none">
  8204. <doc xml:space="preserve">The #GDBusConnection on which to acquire the name or %NULL if
  8205. the connection was disconnected.</doc>
  8206. <type name="DBusConnection" c:type="GDBusConnection*"/>
  8207. </parameter>
  8208. <parameter name="name" transfer-ownership="none">
  8209. <doc xml:space="preserve">The name being owned.</doc>
  8210. <type name="utf8" c:type="const gchar*"/>
  8211. </parameter>
  8212. <parameter name="user_data"
  8213. transfer-ownership="none"
  8214. nullable="1"
  8215. allow-none="1"
  8216. closure="2">
  8217. <doc xml:space="preserve">User data passed to g_bus_own_name() or g_bus_own_name_on_connection().</doc>
  8218. <type name="gpointer" c:type="gpointer"/>
  8219. </parameter>
  8220. </parameters>
  8221. </callback>
  8222. <bitfield name="BusNameOwnerFlags"
  8223. version="2.26"
  8224. glib:type-name="GBusNameOwnerFlags"
  8225. glib:get-type="g_bus_name_owner_flags_get_type"
  8226. c:type="GBusNameOwnerFlags">
  8227. <doc xml:space="preserve">Flags used in g_bus_own_name().</doc>
  8228. <member name="none"
  8229. value="0"
  8230. c:identifier="G_BUS_NAME_OWNER_FLAGS_NONE"
  8231. glib:nick="none">
  8232. <doc xml:space="preserve">No flags set.</doc>
  8233. </member>
  8234. <member name="allow_replacement"
  8235. value="1"
  8236. c:identifier="G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT"
  8237. glib:nick="allow-replacement">
  8238. <doc xml:space="preserve">Allow another message bus connection to claim the name.</doc>
  8239. </member>
  8240. <member name="replace"
  8241. value="2"
  8242. c:identifier="G_BUS_NAME_OWNER_FLAGS_REPLACE"
  8243. glib:nick="replace">
  8244. <doc xml:space="preserve">If another message bus connection owns the name and have
  8245. specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.</doc>
  8246. </member>
  8247. </bitfield>
  8248. <callback name="BusNameVanishedCallback"
  8249. c:type="GBusNameVanishedCallback"
  8250. version="2.26">
  8251. <doc xml:space="preserve">Invoked when the name being watched is known not to have to have a owner.
  8252. This is also invoked when the #GDBusConection on which the watch was
  8253. established has been closed. In that case, @connection will be
  8254. %NULL.</doc>
  8255. <return-value transfer-ownership="none">
  8256. <type name="none" c:type="void"/>
  8257. </return-value>
  8258. <parameters>
  8259. <parameter name="connection" transfer-ownership="none">
  8260. <doc xml:space="preserve">The #GDBusConnection the name is being watched on, or
  8261. %NULL.</doc>
  8262. <type name="DBusConnection" c:type="GDBusConnection*"/>
  8263. </parameter>
  8264. <parameter name="name" transfer-ownership="none">
  8265. <doc xml:space="preserve">The name being watched.</doc>
  8266. <type name="utf8" c:type="const gchar*"/>
  8267. </parameter>
  8268. <parameter name="user_data"
  8269. transfer-ownership="none"
  8270. nullable="1"
  8271. allow-none="1"
  8272. closure="2">
  8273. <doc xml:space="preserve">User data passed to g_bus_watch_name().</doc>
  8274. <type name="gpointer" c:type="gpointer"/>
  8275. </parameter>
  8276. </parameters>
  8277. </callback>
  8278. <bitfield name="BusNameWatcherFlags"
  8279. version="2.26"
  8280. glib:type-name="GBusNameWatcherFlags"
  8281. glib:get-type="g_bus_name_watcher_flags_get_type"
  8282. c:type="GBusNameWatcherFlags">
  8283. <doc xml:space="preserve">Flags used in g_bus_watch_name().</doc>
  8284. <member name="none"
  8285. value="0"
  8286. c:identifier="G_BUS_NAME_WATCHER_FLAGS_NONE"
  8287. glib:nick="none">
  8288. <doc xml:space="preserve">No flags set.</doc>
  8289. </member>
  8290. <member name="auto_start"
  8291. value="1"
  8292. c:identifier="G_BUS_NAME_WATCHER_FLAGS_AUTO_START"
  8293. glib:nick="auto-start">
  8294. <doc xml:space="preserve">If no-one owns the name when
  8295. beginning to watch the name, ask the bus to launch an owner for the
  8296. name.</doc>
  8297. </member>
  8298. </bitfield>
  8299. <enumeration name="BusType"
  8300. version="2.26"
  8301. glib:type-name="GBusType"
  8302. glib:get-type="g_bus_type_get_type"
  8303. c:type="GBusType">
  8304. <doc xml:space="preserve">An enumeration for well-known message buses.</doc>
  8305. <member name="starter"
  8306. value="-1"
  8307. c:identifier="G_BUS_TYPE_STARTER"
  8308. glib:nick="starter">
  8309. <doc xml:space="preserve">An alias for the message bus that activated the process, if any.</doc>
  8310. </member>
  8311. <member name="none"
  8312. value="0"
  8313. c:identifier="G_BUS_TYPE_NONE"
  8314. glib:nick="none">
  8315. <doc xml:space="preserve">Not a message bus.</doc>
  8316. </member>
  8317. <member name="system"
  8318. value="1"
  8319. c:identifier="G_BUS_TYPE_SYSTEM"
  8320. glib:nick="system">
  8321. <doc xml:space="preserve">The system-wide message bus.</doc>
  8322. </member>
  8323. <member name="session"
  8324. value="2"
  8325. c:identifier="G_BUS_TYPE_SESSION"
  8326. glib:nick="session">
  8327. <doc xml:space="preserve">The login session message bus.</doc>
  8328. </member>
  8329. </enumeration>
  8330. <class name="BytesIcon"
  8331. c:symbol-prefix="bytes_icon"
  8332. c:type="GBytesIcon"
  8333. parent="GObject.Object"
  8334. glib:type-name="GBytesIcon"
  8335. glib:get-type="g_bytes_icon_get_type">
  8336. <doc xml:space="preserve">#GBytesIcon specifies an image held in memory in a common format (usually
  8337. png) to be used as icon.</doc>
  8338. <implements name="Icon"/>
  8339. <implements name="LoadableIcon"/>
  8340. <constructor name="new" c:identifier="g_bytes_icon_new" version="2.38">
  8341. <doc xml:space="preserve">Creates a new icon for a bytes.</doc>
  8342. <return-value transfer-ownership="full">
  8343. <doc xml:space="preserve">a #GIcon for the given
  8344. @bytes, or %NULL on error.</doc>
  8345. <type name="BytesIcon" c:type="GIcon*"/>
  8346. </return-value>
  8347. <parameters>
  8348. <parameter name="bytes" transfer-ownership="none">
  8349. <doc xml:space="preserve">a #GBytes.</doc>
  8350. <type name="GLib.Bytes" c:type="GBytes*"/>
  8351. </parameter>
  8352. </parameters>
  8353. </constructor>
  8354. <method name="get_bytes"
  8355. c:identifier="g_bytes_icon_get_bytes"
  8356. version="2.38">
  8357. <doc xml:space="preserve">Gets the #GBytes associated with the given @icon.</doc>
  8358. <return-value transfer-ownership="none">
  8359. <doc xml:space="preserve">a #GBytes, or %NULL.</doc>
  8360. <type name="GLib.Bytes" c:type="GBytes*"/>
  8361. </return-value>
  8362. <parameters>
  8363. <instance-parameter name="icon" transfer-ownership="none">
  8364. <doc xml:space="preserve">a #GIcon.</doc>
  8365. <type name="BytesIcon" c:type="GBytesIcon*"/>
  8366. </instance-parameter>
  8367. </parameters>
  8368. </method>
  8369. <property name="bytes"
  8370. writable="1"
  8371. construct-only="1"
  8372. transfer-ownership="none">
  8373. <doc xml:space="preserve">The bytes containing the icon.</doc>
  8374. <type name="GLib.Bytes"/>
  8375. </property>
  8376. </class>
  8377. <class name="Cancellable"
  8378. c:symbol-prefix="cancellable"
  8379. c:type="GCancellable"
  8380. parent="GObject.Object"
  8381. glib:type-name="GCancellable"
  8382. glib:get-type="g_cancellable_get_type"
  8383. glib:type-struct="CancellableClass">
  8384. <doc xml:space="preserve">GCancellable is a thread-safe operation cancellation stack used
  8385. throughout GIO to allow for cancellation of synchronous and
  8386. asynchronous operations.</doc>
  8387. <constructor name="new" c:identifier="g_cancellable_new">
  8388. <doc xml:space="preserve">Creates a new #GCancellable object.
  8389. Applications that want to start one or more operations
  8390. that should be cancellable should create a #GCancellable
  8391. and pass it to the operations.
  8392. One #GCancellable can be used in multiple consecutive
  8393. operations or in multiple concurrent operations.</doc>
  8394. <return-value transfer-ownership="full">
  8395. <doc xml:space="preserve">a #GCancellable.</doc>
  8396. <type name="Cancellable" c:type="GCancellable*"/>
  8397. </return-value>
  8398. </constructor>
  8399. <function name="get_current" c:identifier="g_cancellable_get_current">
  8400. <doc xml:space="preserve">Gets the top cancellable from the stack.</doc>
  8401. <return-value transfer-ownership="none" nullable="1">
  8402. <doc xml:space="preserve">a #GCancellable from the top
  8403. of the stack, or %NULL if the stack is empty.</doc>
  8404. <type name="Cancellable" c:type="GCancellable*"/>
  8405. </return-value>
  8406. </function>
  8407. <virtual-method name="cancelled">
  8408. <return-value transfer-ownership="none">
  8409. <type name="none" c:type="void"/>
  8410. </return-value>
  8411. <parameters>
  8412. <instance-parameter name="cancellable"
  8413. transfer-ownership="none"
  8414. nullable="1"
  8415. allow-none="1">
  8416. <type name="Cancellable" c:type="GCancellable*"/>
  8417. </instance-parameter>
  8418. </parameters>
  8419. </virtual-method>
  8420. <method name="cancel" c:identifier="g_cancellable_cancel">
  8421. <doc xml:space="preserve">Will set @cancellable to cancelled, and will emit the
  8422. #GCancellable::cancelled signal. (However, see the warning about
  8423. race conditions in the documentation for that signal if you are
  8424. planning to connect to it.)
  8425. This function is thread-safe. In other words, you can safely call
  8426. it from a thread other than the one running the operation that was
  8427. passed the @cancellable.
  8428. If @cancellable is %NULL, this function returns immediately for convenience.
  8429. The convention within GIO is that cancelling an asynchronous
  8430. operation causes it to complete asynchronously. That is, if you
  8431. cancel the operation from the same thread in which it is running,
  8432. then the operation's #GAsyncReadyCallback will not be invoked until
  8433. the application returns to the main loop.</doc>
  8434. <return-value transfer-ownership="none">
  8435. <type name="none" c:type="void"/>
  8436. </return-value>
  8437. <parameters>
  8438. <instance-parameter name="cancellable"
  8439. transfer-ownership="none"
  8440. nullable="1"
  8441. allow-none="1">
  8442. <doc xml:space="preserve">a #GCancellable object.</doc>
  8443. <type name="Cancellable" c:type="GCancellable*"/>
  8444. </instance-parameter>
  8445. </parameters>
  8446. </method>
  8447. <method name="connect"
  8448. c:identifier="g_cancellable_connect"
  8449. version="2.22">
  8450. <doc xml:space="preserve">Convenience function to connect to the #GCancellable::cancelled
  8451. signal. Also handles the race condition that may happen
  8452. if the cancellable is cancelled right before connecting.
  8453. @callback is called at most once, either directly at the
  8454. time of the connect if @cancellable is already cancelled,
  8455. or when @cancellable is cancelled in some thread.
  8456. @data_destroy_func will be called when the handler is
  8457. disconnected, or immediately if the cancellable is already
  8458. cancelled.
  8459. See #GCancellable::cancelled for details on how to use this.
  8460. Since GLib 2.40, the lock protecting @cancellable is not held when
  8461. @callback is invoked. This lifts a restriction in place for
  8462. earlier GLib versions which now makes it easier to write cleanup
  8463. code that unconditionally invokes e.g. g_cancellable_cancel().</doc>
  8464. <return-value transfer-ownership="none">
  8465. <doc xml:space="preserve">The id of the signal handler or 0 if @cancellable has already
  8466. been cancelled.</doc>
  8467. <type name="gulong" c:type="gulong"/>
  8468. </return-value>
  8469. <parameters>
  8470. <instance-parameter name="cancellable"
  8471. transfer-ownership="none"
  8472. nullable="1"
  8473. allow-none="1">
  8474. <doc xml:space="preserve">A #GCancellable.</doc>
  8475. <type name="Cancellable" c:type="GCancellable*"/>
  8476. </instance-parameter>
  8477. <parameter name="callback"
  8478. transfer-ownership="none"
  8479. scope="notified"
  8480. closure="1"
  8481. destroy="2">
  8482. <doc xml:space="preserve">The #GCallback to connect.</doc>
  8483. <type name="GObject.Callback" c:type="GCallback"/>
  8484. </parameter>
  8485. <parameter name="data"
  8486. transfer-ownership="none"
  8487. nullable="1"
  8488. allow-none="1">
  8489. <doc xml:space="preserve">Data to pass to @callback.</doc>
  8490. <type name="gpointer" c:type="gpointer"/>
  8491. </parameter>
  8492. <parameter name="data_destroy_func"
  8493. transfer-ownership="none"
  8494. nullable="1"
  8495. allow-none="1"
  8496. scope="async">
  8497. <doc xml:space="preserve">Free function for @data or %NULL.</doc>
  8498. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  8499. </parameter>
  8500. </parameters>
  8501. </method>
  8502. <method name="disconnect"
  8503. c:identifier="g_cancellable_disconnect"
  8504. version="2.22">
  8505. <doc xml:space="preserve">Disconnects a handler from a cancellable instance similar to
  8506. g_signal_handler_disconnect(). Additionally, in the event that a
  8507. signal handler is currently running, this call will block until the
  8508. handler has finished. Calling this function from a
  8509. #GCancellable::cancelled signal handler will therefore result in a
  8510. deadlock.
  8511. This avoids a race condition where a thread cancels at the
  8512. same time as the cancellable operation is finished and the
  8513. signal handler is removed. See #GCancellable::cancelled for
  8514. details on how to use this.
  8515. If @cancellable is %NULL or @handler_id is %0 this function does
  8516. nothing.</doc>
  8517. <return-value transfer-ownership="none">
  8518. <type name="none" c:type="void"/>
  8519. </return-value>
  8520. <parameters>
  8521. <instance-parameter name="cancellable"
  8522. transfer-ownership="none"
  8523. nullable="1"
  8524. allow-none="1">
  8525. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  8526. <type name="Cancellable" c:type="GCancellable*"/>
  8527. </instance-parameter>
  8528. <parameter name="handler_id" transfer-ownership="none">
  8529. <doc xml:space="preserve">Handler id of the handler to be disconnected, or %0.</doc>
  8530. <type name="gulong" c:type="gulong"/>
  8531. </parameter>
  8532. </parameters>
  8533. </method>
  8534. <method name="get_fd" c:identifier="g_cancellable_get_fd">
  8535. <doc xml:space="preserve">Gets the file descriptor for a cancellable job. This can be used to
  8536. implement cancellable operations on Unix systems. The returned fd will
  8537. turn readable when @cancellable is cancelled.
  8538. You are not supposed to read from the fd yourself, just check for
  8539. readable status. Reading to unset the readable status is done
  8540. with g_cancellable_reset().
  8541. After a successful return from this function, you should use
  8542. g_cancellable_release_fd() to free up resources allocated for
  8543. the returned file descriptor.
  8544. See also g_cancellable_make_pollfd().</doc>
  8545. <return-value transfer-ownership="none">
  8546. <doc xml:space="preserve">A valid file descriptor. %-1 if the file descriptor
  8547. is not supported, or on errors.</doc>
  8548. <type name="gint" c:type="int"/>
  8549. </return-value>
  8550. <parameters>
  8551. <instance-parameter name="cancellable"
  8552. transfer-ownership="none"
  8553. nullable="1"
  8554. allow-none="1">
  8555. <doc xml:space="preserve">a #GCancellable.</doc>
  8556. <type name="Cancellable" c:type="GCancellable*"/>
  8557. </instance-parameter>
  8558. </parameters>
  8559. </method>
  8560. <method name="is_cancelled" c:identifier="g_cancellable_is_cancelled">
  8561. <doc xml:space="preserve">Checks if a cancellable job has been cancelled.</doc>
  8562. <return-value transfer-ownership="none">
  8563. <doc xml:space="preserve">%TRUE if @cancellable is cancelled,
  8564. FALSE if called with %NULL or if item is not cancelled.</doc>
  8565. <type name="gboolean" c:type="gboolean"/>
  8566. </return-value>
  8567. <parameters>
  8568. <instance-parameter name="cancellable"
  8569. transfer-ownership="none"
  8570. nullable="1"
  8571. allow-none="1">
  8572. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  8573. <type name="Cancellable" c:type="GCancellable*"/>
  8574. </instance-parameter>
  8575. </parameters>
  8576. </method>
  8577. <method name="make_pollfd"
  8578. c:identifier="g_cancellable_make_pollfd"
  8579. version="2.22">
  8580. <doc xml:space="preserve">Creates a #GPollFD corresponding to @cancellable; this can be passed
  8581. to g_poll() and used to poll for cancellation. This is useful both
  8582. for unix systems without a native poll and for portability to
  8583. windows.
  8584. When this function returns %TRUE, you should use
  8585. g_cancellable_release_fd() to free up resources allocated for the
  8586. @pollfd. After a %FALSE return, do not call g_cancellable_release_fd().
  8587. If this function returns %FALSE, either no @cancellable was given or
  8588. resource limits prevent this function from allocating the necessary
  8589. structures for polling. (On Linux, you will likely have reached
  8590. the maximum number of file descriptors.) The suggested way to handle
  8591. these cases is to ignore the @cancellable.
  8592. You are not supposed to read from the fd yourself, just check for
  8593. readable status. Reading to unset the readable status is done
  8594. with g_cancellable_reset().</doc>
  8595. <return-value transfer-ownership="none">
  8596. <doc xml:space="preserve">%TRUE if @pollfd was successfully initialized, %FALSE on
  8597. failure to prepare the cancellable.</doc>
  8598. <type name="gboolean" c:type="gboolean"/>
  8599. </return-value>
  8600. <parameters>
  8601. <instance-parameter name="cancellable"
  8602. transfer-ownership="none"
  8603. nullable="1"
  8604. allow-none="1">
  8605. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  8606. <type name="Cancellable" c:type="GCancellable*"/>
  8607. </instance-parameter>
  8608. <parameter name="pollfd" transfer-ownership="none">
  8609. <doc xml:space="preserve">a pointer to a #GPollFD</doc>
  8610. <type name="GLib.PollFD" c:type="GPollFD*"/>
  8611. </parameter>
  8612. </parameters>
  8613. </method>
  8614. <method name="pop_current" c:identifier="g_cancellable_pop_current">
  8615. <doc xml:space="preserve">Pops @cancellable off the cancellable stack (verifying that @cancellable
  8616. is on the top of the stack).</doc>
  8617. <return-value transfer-ownership="none">
  8618. <type name="none" c:type="void"/>
  8619. </return-value>
  8620. <parameters>
  8621. <instance-parameter name="cancellable"
  8622. transfer-ownership="none"
  8623. nullable="1"
  8624. allow-none="1">
  8625. <doc xml:space="preserve">a #GCancellable object</doc>
  8626. <type name="Cancellable" c:type="GCancellable*"/>
  8627. </instance-parameter>
  8628. </parameters>
  8629. </method>
  8630. <method name="push_current" c:identifier="g_cancellable_push_current">
  8631. <doc xml:space="preserve">Pushes @cancellable onto the cancellable stack. The current
  8632. cancellable can then be received using g_cancellable_get_current().
  8633. This is useful when implementing cancellable operations in
  8634. code that does not allow you to pass down the cancellable object.
  8635. This is typically called automatically by e.g. #GFile operations,
  8636. so you rarely have to call this yourself.</doc>
  8637. <return-value transfer-ownership="none">
  8638. <type name="none" c:type="void"/>
  8639. </return-value>
  8640. <parameters>
  8641. <instance-parameter name="cancellable"
  8642. transfer-ownership="none"
  8643. nullable="1"
  8644. allow-none="1">
  8645. <doc xml:space="preserve">a #GCancellable object</doc>
  8646. <type name="Cancellable" c:type="GCancellable*"/>
  8647. </instance-parameter>
  8648. </parameters>
  8649. </method>
  8650. <method name="release_fd"
  8651. c:identifier="g_cancellable_release_fd"
  8652. version="2.22">
  8653. <doc xml:space="preserve">Releases a resources previously allocated by g_cancellable_get_fd()
  8654. or g_cancellable_make_pollfd().
  8655. For compatibility reasons with older releases, calling this function
  8656. is not strictly required, the resources will be automatically freed
  8657. when the @cancellable is finalized. However, the @cancellable will
  8658. block scarce file descriptors until it is finalized if this function
  8659. is not called. This can cause the application to run out of file
  8660. descriptors when many #GCancellables are used at the same time.</doc>
  8661. <return-value transfer-ownership="none">
  8662. <type name="none" c:type="void"/>
  8663. </return-value>
  8664. <parameters>
  8665. <instance-parameter name="cancellable"
  8666. transfer-ownership="none"
  8667. nullable="1"
  8668. allow-none="1">
  8669. <doc xml:space="preserve">a #GCancellable</doc>
  8670. <type name="Cancellable" c:type="GCancellable*"/>
  8671. </instance-parameter>
  8672. </parameters>
  8673. </method>
  8674. <method name="reset" c:identifier="g_cancellable_reset">
  8675. <doc xml:space="preserve">Resets @cancellable to its uncancelled state.
  8676. If cancellable is currently in use by any cancellable operation
  8677. then the behavior of this function is undefined.
  8678. Note that it is generally not a good idea to reuse an existing
  8679. cancellable for more operations after it has been cancelled once,
  8680. as this function might tempt you to do. The recommended practice
  8681. is to drop the reference to a cancellable after cancelling it,
  8682. and let it die with the outstanding async operations. You should
  8683. create a fresh cancellable for further async operations.</doc>
  8684. <return-value transfer-ownership="none">
  8685. <type name="none" c:type="void"/>
  8686. </return-value>
  8687. <parameters>
  8688. <instance-parameter name="cancellable"
  8689. transfer-ownership="none"
  8690. nullable="1"
  8691. allow-none="1">
  8692. <doc xml:space="preserve">a #GCancellable object.</doc>
  8693. <type name="Cancellable" c:type="GCancellable*"/>
  8694. </instance-parameter>
  8695. </parameters>
  8696. </method>
  8697. <method name="set_error_if_cancelled"
  8698. c:identifier="g_cancellable_set_error_if_cancelled"
  8699. throws="1">
  8700. <doc xml:space="preserve">If the @cancellable is cancelled, sets the error to notify
  8701. that the operation was cancelled.</doc>
  8702. <return-value transfer-ownership="none">
  8703. <doc xml:space="preserve">%TRUE if @cancellable was cancelled, %FALSE if it was not</doc>
  8704. <type name="gboolean" c:type="gboolean"/>
  8705. </return-value>
  8706. <parameters>
  8707. <instance-parameter name="cancellable"
  8708. transfer-ownership="none"
  8709. nullable="1"
  8710. allow-none="1">
  8711. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  8712. <type name="Cancellable" c:type="GCancellable*"/>
  8713. </instance-parameter>
  8714. </parameters>
  8715. </method>
  8716. <method name="source_new"
  8717. c:identifier="g_cancellable_source_new"
  8718. version="2.28"
  8719. introspectable="0">
  8720. <doc xml:space="preserve">Creates a source that triggers if @cancellable is cancelled and
  8721. calls its callback of type #GCancellableSourceFunc. This is
  8722. primarily useful for attaching to another (non-cancellable) source
  8723. with g_source_add_child_source() to add cancellability to it.
  8724. For convenience, you can call this with a %NULL #GCancellable,
  8725. in which case the source will never trigger.
  8726. The new #GSource will hold a reference to the #GCancellable.</doc>
  8727. <return-value transfer-ownership="full">
  8728. <doc xml:space="preserve">the new #GSource.</doc>
  8729. <type name="GLib.Source" c:type="GSource*"/>
  8730. </return-value>
  8731. <parameters>
  8732. <instance-parameter name="cancellable"
  8733. transfer-ownership="none"
  8734. nullable="1"
  8735. allow-none="1">
  8736. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  8737. <type name="Cancellable" c:type="GCancellable*"/>
  8738. </instance-parameter>
  8739. </parameters>
  8740. </method>
  8741. <field name="parent_instance">
  8742. <type name="GObject.Object" c:type="GObject"/>
  8743. </field>
  8744. <field name="priv" readable="0" private="1">
  8745. <type name="CancellablePrivate" c:type="GCancellablePrivate*"/>
  8746. </field>
  8747. <glib:signal name="cancelled" when="last">
  8748. <doc xml:space="preserve">Emitted when the operation has been cancelled.
  8749. Can be used by implementations of cancellable operations. If the
  8750. operation is cancelled from another thread, the signal will be
  8751. emitted in the thread that cancelled the operation, not the
  8752. thread that is running the operation.
  8753. Note that disconnecting from this signal (or any signal) in a
  8754. multi-threaded program is prone to race conditions. For instance
  8755. it is possible that a signal handler may be invoked even after
  8756. a call to g_signal_handler_disconnect() for that handler has
  8757. already returned.
  8758. There is also a problem when cancellation happens right before
  8759. connecting to the signal. If this happens the signal will
  8760. unexpectedly not be emitted, and checking before connecting to
  8761. the signal leaves a race condition where this is still happening.
  8762. In order to make it safe and easy to connect handlers there
  8763. are two helper functions: g_cancellable_connect() and
  8764. g_cancellable_disconnect() which protect against problems
  8765. like this.
  8766. An example of how to us this:
  8767. |[&lt;!-- language="C" --&gt;
  8768. // Make sure we don't do unnecessary work if already cancelled
  8769. if (g_cancellable_set_error_if_cancelled (cancellable, error))
  8770. return;
  8771. // Set up all the data needed to be able to handle cancellation
  8772. // of the operation
  8773. my_data = my_data_new (...);
  8774. id = 0;
  8775. if (cancellable)
  8776. id = g_cancellable_connect (cancellable,
  8777. G_CALLBACK (cancelled_handler)
  8778. data, NULL);
  8779. // cancellable operation here...
  8780. g_cancellable_disconnect (cancellable, id);
  8781. // cancelled_handler is never called after this, it is now safe
  8782. // to free the data
  8783. my_data_free (my_data);
  8784. ]|
  8785. Note that the cancelled signal is emitted in the thread that
  8786. the user cancelled from, which may be the main thread. So, the
  8787. cancellable signal should not do something that can block.</doc>
  8788. <return-value transfer-ownership="none">
  8789. <type name="none" c:type="void"/>
  8790. </return-value>
  8791. </glib:signal>
  8792. </class>
  8793. <record name="CancellableClass"
  8794. c:type="GCancellableClass"
  8795. glib:is-gtype-struct-for="Cancellable">
  8796. <field name="parent_class">
  8797. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  8798. </field>
  8799. <field name="cancelled">
  8800. <callback name="cancelled">
  8801. <return-value transfer-ownership="none">
  8802. <type name="none" c:type="void"/>
  8803. </return-value>
  8804. <parameters>
  8805. <parameter name="cancellable"
  8806. transfer-ownership="none"
  8807. nullable="1"
  8808. allow-none="1">
  8809. <type name="Cancellable" c:type="GCancellable*"/>
  8810. </parameter>
  8811. </parameters>
  8812. </callback>
  8813. </field>
  8814. <field name="_g_reserved1" introspectable="0">
  8815. <callback name="_g_reserved1">
  8816. <return-value transfer-ownership="none">
  8817. <type name="none" c:type="void"/>
  8818. </return-value>
  8819. </callback>
  8820. </field>
  8821. <field name="_g_reserved2" introspectable="0">
  8822. <callback name="_g_reserved2">
  8823. <return-value transfer-ownership="none">
  8824. <type name="none" c:type="void"/>
  8825. </return-value>
  8826. </callback>
  8827. </field>
  8828. <field name="_g_reserved3" introspectable="0">
  8829. <callback name="_g_reserved3">
  8830. <return-value transfer-ownership="none">
  8831. <type name="none" c:type="void"/>
  8832. </return-value>
  8833. </callback>
  8834. </field>
  8835. <field name="_g_reserved4" introspectable="0">
  8836. <callback name="_g_reserved4">
  8837. <return-value transfer-ownership="none">
  8838. <type name="none" c:type="void"/>
  8839. </return-value>
  8840. </callback>
  8841. </field>
  8842. <field name="_g_reserved5" introspectable="0">
  8843. <callback name="_g_reserved5">
  8844. <return-value transfer-ownership="none">
  8845. <type name="none" c:type="void"/>
  8846. </return-value>
  8847. </callback>
  8848. </field>
  8849. </record>
  8850. <record name="CancellablePrivate"
  8851. c:type="GCancellablePrivate"
  8852. disguised="1">
  8853. </record>
  8854. <callback name="CancellableSourceFunc"
  8855. c:type="GCancellableSourceFunc"
  8856. version="2.28">
  8857. <doc xml:space="preserve">This is the function type of the callback used for the #GSource
  8858. returned by g_cancellable_source_new().</doc>
  8859. <return-value transfer-ownership="none">
  8860. <doc xml:space="preserve">it should return %FALSE if the source should be removed.</doc>
  8861. <type name="gboolean" c:type="gboolean"/>
  8862. </return-value>
  8863. <parameters>
  8864. <parameter name="cancellable"
  8865. transfer-ownership="none"
  8866. nullable="1"
  8867. allow-none="1">
  8868. <doc xml:space="preserve">the #GCancellable</doc>
  8869. <type name="Cancellable" c:type="GCancellable*"/>
  8870. </parameter>
  8871. <parameter name="user_data"
  8872. transfer-ownership="none"
  8873. nullable="1"
  8874. allow-none="1"
  8875. closure="1">
  8876. <doc xml:space="preserve">data passed in by the user.</doc>
  8877. <type name="gpointer" c:type="gpointer"/>
  8878. </parameter>
  8879. </parameters>
  8880. </callback>
  8881. <class name="CharsetConverter"
  8882. c:symbol-prefix="charset_converter"
  8883. c:type="GCharsetConverter"
  8884. parent="GObject.Object"
  8885. glib:type-name="GCharsetConverter"
  8886. glib:get-type="g_charset_converter_get_type"
  8887. glib:type-struct="CharsetConverterClass">
  8888. <doc xml:space="preserve">#GCharsetConverter is an implementation of #GConverter based on
  8889. GIConv.</doc>
  8890. <implements name="Converter"/>
  8891. <implements name="Initable"/>
  8892. <constructor name="new"
  8893. c:identifier="g_charset_converter_new"
  8894. version="2.24"
  8895. throws="1">
  8896. <doc xml:space="preserve">Creates a new #GCharsetConverter.</doc>
  8897. <return-value transfer-ownership="full">
  8898. <doc xml:space="preserve">a new #GCharsetConverter or %NULL on error.</doc>
  8899. <type name="CharsetConverter" c:type="GCharsetConverter*"/>
  8900. </return-value>
  8901. <parameters>
  8902. <parameter name="to_charset" transfer-ownership="none">
  8903. <doc xml:space="preserve">destination charset</doc>
  8904. <type name="utf8" c:type="const gchar*"/>
  8905. </parameter>
  8906. <parameter name="from_charset" transfer-ownership="none">
  8907. <doc xml:space="preserve">source charset</doc>
  8908. <type name="utf8" c:type="const gchar*"/>
  8909. </parameter>
  8910. </parameters>
  8911. </constructor>
  8912. <method name="get_num_fallbacks"
  8913. c:identifier="g_charset_converter_get_num_fallbacks"
  8914. version="2.24">
  8915. <doc xml:space="preserve">Gets the number of fallbacks that @converter has applied so far.</doc>
  8916. <return-value transfer-ownership="none">
  8917. <doc xml:space="preserve">the number of fallbacks that @converter has applied</doc>
  8918. <type name="guint" c:type="guint"/>
  8919. </return-value>
  8920. <parameters>
  8921. <instance-parameter name="converter" transfer-ownership="none">
  8922. <doc xml:space="preserve">a #GCharsetConverter</doc>
  8923. <type name="CharsetConverter" c:type="GCharsetConverter*"/>
  8924. </instance-parameter>
  8925. </parameters>
  8926. </method>
  8927. <method name="get_use_fallback"
  8928. c:identifier="g_charset_converter_get_use_fallback"
  8929. version="2.24">
  8930. <doc xml:space="preserve">Gets the #GCharsetConverter:use-fallback property.</doc>
  8931. <return-value transfer-ownership="none">
  8932. <doc xml:space="preserve">%TRUE if fallbacks are used by @converter</doc>
  8933. <type name="gboolean" c:type="gboolean"/>
  8934. </return-value>
  8935. <parameters>
  8936. <instance-parameter name="converter" transfer-ownership="none">
  8937. <doc xml:space="preserve">a #GCharsetConverter</doc>
  8938. <type name="CharsetConverter" c:type="GCharsetConverter*"/>
  8939. </instance-parameter>
  8940. </parameters>
  8941. </method>
  8942. <method name="set_use_fallback"
  8943. c:identifier="g_charset_converter_set_use_fallback"
  8944. version="2.24">
  8945. <doc xml:space="preserve">Sets the #GCharsetConverter:use-fallback property.</doc>
  8946. <return-value transfer-ownership="none">
  8947. <type name="none" c:type="void"/>
  8948. </return-value>
  8949. <parameters>
  8950. <instance-parameter name="converter" transfer-ownership="none">
  8951. <doc xml:space="preserve">a #GCharsetConverter</doc>
  8952. <type name="CharsetConverter" c:type="GCharsetConverter*"/>
  8953. </instance-parameter>
  8954. <parameter name="use_fallback" transfer-ownership="none">
  8955. <doc xml:space="preserve">%TRUE to use fallbacks</doc>
  8956. <type name="gboolean" c:type="gboolean"/>
  8957. </parameter>
  8958. </parameters>
  8959. </method>
  8960. <property name="from-charset"
  8961. writable="1"
  8962. construct-only="1"
  8963. transfer-ownership="none">
  8964. <type name="utf8" c:type="gchar*"/>
  8965. </property>
  8966. <property name="to-charset"
  8967. writable="1"
  8968. construct-only="1"
  8969. transfer-ownership="none">
  8970. <type name="utf8" c:type="gchar*"/>
  8971. </property>
  8972. <property name="use-fallback"
  8973. writable="1"
  8974. construct="1"
  8975. transfer-ownership="none">
  8976. <type name="gboolean" c:type="gboolean"/>
  8977. </property>
  8978. </class>
  8979. <record name="CharsetConverterClass"
  8980. c:type="GCharsetConverterClass"
  8981. glib:is-gtype-struct-for="CharsetConverter">
  8982. <field name="parent_class">
  8983. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  8984. </field>
  8985. </record>
  8986. <interface name="Converter"
  8987. c:symbol-prefix="converter"
  8988. c:type="GConverter"
  8989. version="2.24"
  8990. glib:type-name="GConverter"
  8991. glib:get-type="g_converter_get_type"
  8992. glib:type-struct="ConverterIface">
  8993. <doc xml:space="preserve">#GConverter is implemented by objects that convert
  8994. binary data in various ways. The conversion can be
  8995. stateful and may fail at any place.
  8996. Some example conversions are: character set conversion,
  8997. compression, decompression and regular expression
  8998. replace.</doc>
  8999. <virtual-method name="convert"
  9000. invoker="convert"
  9001. version="2.24"
  9002. throws="1">
  9003. <doc xml:space="preserve">This is the main operation used when converting data. It is to be called
  9004. multiple times in a loop, and each time it will do some work, i.e.
  9005. producing some output (in @outbuf) or consuming some input (from @inbuf) or
  9006. both. If its not possible to do any work an error is returned.
  9007. Note that a single call may not consume all input (or any input at all).
  9008. Also a call may produce output even if given no input, due to state stored
  9009. in the converter producing output.
  9010. If any data was either produced or consumed, and then an error happens, then
  9011. only the successful conversion is reported and the error is returned on the
  9012. next call.
  9013. A full conversion loop involves calling this method repeatedly, each time
  9014. giving it new input and space output space. When there is no more input
  9015. data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
  9016. The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
  9017. each time until all data is consumed and all output is produced, then
  9018. %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
  9019. may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
  9020. in a decompression converter where the end of data is detectable from the
  9021. data (and there might even be other data after the end of the compressed data).
  9022. When some data has successfully been converted @bytes_read and is set to
  9023. the number of bytes read from @inbuf, and @bytes_written is set to indicate
  9024. how many bytes was written to @outbuf. If there are more data to output
  9025. or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then
  9026. %G_CONVERTER_CONVERTED is returned, and if no more data is to be output
  9027. then %G_CONVERTER_FINISHED is returned.
  9028. On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
  9029. Some errors need special handling:
  9030. %G_IO_ERROR_NO_SPACE is returned if there is not enough space
  9031. to write the resulting converted data, the application should
  9032. call the function again with a larger @outbuf to continue.
  9033. %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
  9034. input to fully determine what the conversion should produce,
  9035. and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
  9036. example with an incomplete multibyte sequence when converting text,
  9037. or when a regexp matches up to the end of the input (and may match
  9038. further input). It may also happen when @inbuf_size is zero and
  9039. there is no more data to produce.
  9040. When this happens the application should read more input and then
  9041. call the function again. If further input shows that there is no
  9042. more data call the function again with the same data but with
  9043. the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
  9044. to finish as e.g. in the regexp match case (or, to fail again with
  9045. %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
  9046. input is actually partial).
  9047. After g_converter_convert() has returned %G_CONVERTER_FINISHED the
  9048. converter object is in an invalid state where its not allowed
  9049. to call g_converter_convert() anymore. At this time you can only
  9050. free the object or call g_converter_reset() to reset it to the
  9051. initial state.
  9052. If the flag %G_CONVERTER_FLUSH is set then conversion is modified
  9053. to try to write out all internal state to the output. The application
  9054. has to call the function multiple times with the flag set, and when
  9055. the available input has been consumed and all internal state has
  9056. been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
  9057. really at the end) is returned instead of %G_CONVERTER_CONVERTED.
  9058. This is somewhat similar to what happens at the end of the input stream,
  9059. but done in the middle of the data.
  9060. This has different meanings for different conversions. For instance
  9061. in a compression converter it would mean that we flush all the
  9062. compression state into output such that if you uncompress the
  9063. compressed data you get back all the input data. Doing this may
  9064. make the final file larger due to padding though. Another example
  9065. is a regexp conversion, where if you at the end of the flushed data
  9066. have a match, but there is also a potential longer match. In the
  9067. non-flushed case we would ask for more input, but when flushing we
  9068. treat this as the end of input and do the match.
  9069. Flushing is not always possible (like if a charset converter flushes
  9070. at a partial multibyte sequence). Converters are supposed to try
  9071. to produce as much output as possible and then return an error
  9072. (typically %G_IO_ERROR_PARTIAL_INPUT).</doc>
  9073. <return-value transfer-ownership="none">
  9074. <doc xml:space="preserve">a #GConverterResult, %G_CONVERTER_ERROR on error.</doc>
  9075. <type name="ConverterResult" c:type="GConverterResult"/>
  9076. </return-value>
  9077. <parameters>
  9078. <instance-parameter name="converter" transfer-ownership="none">
  9079. <doc xml:space="preserve">a #GConverter.</doc>
  9080. <type name="Converter" c:type="GConverter*"/>
  9081. </instance-parameter>
  9082. <parameter name="inbuf"
  9083. transfer-ownership="none"
  9084. nullable="1"
  9085. allow-none="1">
  9086. <doc xml:space="preserve">the buffer
  9087. containing the data to convert.</doc>
  9088. <array length="1" zero-terminated="0" c:type="void*">
  9089. <type name="guint8"/>
  9090. </array>
  9091. </parameter>
  9092. <parameter name="inbuf_size" transfer-ownership="none">
  9093. <doc xml:space="preserve">the number of bytes in @inbuf</doc>
  9094. <type name="gsize" c:type="gsize"/>
  9095. </parameter>
  9096. <parameter name="outbuf"
  9097. transfer-ownership="none"
  9098. nullable="1"
  9099. allow-none="1">
  9100. <doc xml:space="preserve">a buffer to write
  9101. converted data in.</doc>
  9102. <array length="3" zero-terminated="0" c:type="void*">
  9103. <type name="guint8"/>
  9104. </array>
  9105. </parameter>
  9106. <parameter name="outbuf_size" transfer-ownership="none">
  9107. <doc xml:space="preserve">the number of bytes in @outbuf, must be at least one</doc>
  9108. <type name="gsize" c:type="gsize"/>
  9109. </parameter>
  9110. <parameter name="flags" transfer-ownership="none">
  9111. <doc xml:space="preserve">a #GConverterFlags controlling the conversion details</doc>
  9112. <type name="ConverterFlags" c:type="GConverterFlags"/>
  9113. </parameter>
  9114. <parameter name="bytes_read"
  9115. direction="out"
  9116. caller-allocates="0"
  9117. transfer-ownership="full">
  9118. <doc xml:space="preserve">will be set to the number of bytes read from @inbuf on success</doc>
  9119. <type name="gsize" c:type="gsize*"/>
  9120. </parameter>
  9121. <parameter name="bytes_written"
  9122. direction="out"
  9123. caller-allocates="0"
  9124. transfer-ownership="full">
  9125. <doc xml:space="preserve">will be set to the number of bytes written to @outbuf on success</doc>
  9126. <type name="gsize" c:type="gsize*"/>
  9127. </parameter>
  9128. </parameters>
  9129. </virtual-method>
  9130. <virtual-method name="reset" invoker="reset" version="2.24">
  9131. <doc xml:space="preserve">Resets all internal state in the converter, making it behave
  9132. as if it was just created. If the converter has any internal
  9133. state that would produce output then that output is lost.</doc>
  9134. <return-value transfer-ownership="none">
  9135. <type name="none" c:type="void"/>
  9136. </return-value>
  9137. <parameters>
  9138. <instance-parameter name="converter" transfer-ownership="none">
  9139. <doc xml:space="preserve">a #GConverter.</doc>
  9140. <type name="Converter" c:type="GConverter*"/>
  9141. </instance-parameter>
  9142. </parameters>
  9143. </virtual-method>
  9144. <method name="convert"
  9145. c:identifier="g_converter_convert"
  9146. version="2.24"
  9147. throws="1">
  9148. <doc xml:space="preserve">This is the main operation used when converting data. It is to be called
  9149. multiple times in a loop, and each time it will do some work, i.e.
  9150. producing some output (in @outbuf) or consuming some input (from @inbuf) or
  9151. both. If its not possible to do any work an error is returned.
  9152. Note that a single call may not consume all input (or any input at all).
  9153. Also a call may produce output even if given no input, due to state stored
  9154. in the converter producing output.
  9155. If any data was either produced or consumed, and then an error happens, then
  9156. only the successful conversion is reported and the error is returned on the
  9157. next call.
  9158. A full conversion loop involves calling this method repeatedly, each time
  9159. giving it new input and space output space. When there is no more input
  9160. data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
  9161. The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
  9162. each time until all data is consumed and all output is produced, then
  9163. %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
  9164. may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
  9165. in a decompression converter where the end of data is detectable from the
  9166. data (and there might even be other data after the end of the compressed data).
  9167. When some data has successfully been converted @bytes_read and is set to
  9168. the number of bytes read from @inbuf, and @bytes_written is set to indicate
  9169. how many bytes was written to @outbuf. If there are more data to output
  9170. or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then
  9171. %G_CONVERTER_CONVERTED is returned, and if no more data is to be output
  9172. then %G_CONVERTER_FINISHED is returned.
  9173. On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
  9174. Some errors need special handling:
  9175. %G_IO_ERROR_NO_SPACE is returned if there is not enough space
  9176. to write the resulting converted data, the application should
  9177. call the function again with a larger @outbuf to continue.
  9178. %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
  9179. input to fully determine what the conversion should produce,
  9180. and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
  9181. example with an incomplete multibyte sequence when converting text,
  9182. or when a regexp matches up to the end of the input (and may match
  9183. further input). It may also happen when @inbuf_size is zero and
  9184. there is no more data to produce.
  9185. When this happens the application should read more input and then
  9186. call the function again. If further input shows that there is no
  9187. more data call the function again with the same data but with
  9188. the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
  9189. to finish as e.g. in the regexp match case (or, to fail again with
  9190. %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
  9191. input is actually partial).
  9192. After g_converter_convert() has returned %G_CONVERTER_FINISHED the
  9193. converter object is in an invalid state where its not allowed
  9194. to call g_converter_convert() anymore. At this time you can only
  9195. free the object or call g_converter_reset() to reset it to the
  9196. initial state.
  9197. If the flag %G_CONVERTER_FLUSH is set then conversion is modified
  9198. to try to write out all internal state to the output. The application
  9199. has to call the function multiple times with the flag set, and when
  9200. the available input has been consumed and all internal state has
  9201. been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
  9202. really at the end) is returned instead of %G_CONVERTER_CONVERTED.
  9203. This is somewhat similar to what happens at the end of the input stream,
  9204. but done in the middle of the data.
  9205. This has different meanings for different conversions. For instance
  9206. in a compression converter it would mean that we flush all the
  9207. compression state into output such that if you uncompress the
  9208. compressed data you get back all the input data. Doing this may
  9209. make the final file larger due to padding though. Another example
  9210. is a regexp conversion, where if you at the end of the flushed data
  9211. have a match, but there is also a potential longer match. In the
  9212. non-flushed case we would ask for more input, but when flushing we
  9213. treat this as the end of input and do the match.
  9214. Flushing is not always possible (like if a charset converter flushes
  9215. at a partial multibyte sequence). Converters are supposed to try
  9216. to produce as much output as possible and then return an error
  9217. (typically %G_IO_ERROR_PARTIAL_INPUT).</doc>
  9218. <return-value transfer-ownership="none">
  9219. <doc xml:space="preserve">a #GConverterResult, %G_CONVERTER_ERROR on error.</doc>
  9220. <type name="ConverterResult" c:type="GConverterResult"/>
  9221. </return-value>
  9222. <parameters>
  9223. <instance-parameter name="converter" transfer-ownership="none">
  9224. <doc xml:space="preserve">a #GConverter.</doc>
  9225. <type name="Converter" c:type="GConverter*"/>
  9226. </instance-parameter>
  9227. <parameter name="inbuf" transfer-ownership="none">
  9228. <doc xml:space="preserve">the buffer
  9229. containing the data to convert.</doc>
  9230. <array length="1" zero-terminated="0" c:type="void*">
  9231. <type name="guint8"/>
  9232. </array>
  9233. </parameter>
  9234. <parameter name="inbuf_size" transfer-ownership="none">
  9235. <doc xml:space="preserve">the number of bytes in @inbuf</doc>
  9236. <type name="gsize" c:type="gsize"/>
  9237. </parameter>
  9238. <parameter name="outbuf" transfer-ownership="none">
  9239. <doc xml:space="preserve">a buffer to write
  9240. converted data in.</doc>
  9241. <array length="3" zero-terminated="0" c:type="void*">
  9242. <type name="guint8"/>
  9243. </array>
  9244. </parameter>
  9245. <parameter name="outbuf_size" transfer-ownership="none">
  9246. <doc xml:space="preserve">the number of bytes in @outbuf, must be at least one</doc>
  9247. <type name="gsize" c:type="gsize"/>
  9248. </parameter>
  9249. <parameter name="flags" transfer-ownership="none">
  9250. <doc xml:space="preserve">a #GConverterFlags controlling the conversion details</doc>
  9251. <type name="ConverterFlags" c:type="GConverterFlags"/>
  9252. </parameter>
  9253. <parameter name="bytes_read"
  9254. direction="out"
  9255. caller-allocates="0"
  9256. transfer-ownership="full">
  9257. <doc xml:space="preserve">will be set to the number of bytes read from @inbuf on success</doc>
  9258. <type name="gsize" c:type="gsize*"/>
  9259. </parameter>
  9260. <parameter name="bytes_written"
  9261. direction="out"
  9262. caller-allocates="0"
  9263. transfer-ownership="full">
  9264. <doc xml:space="preserve">will be set to the number of bytes written to @outbuf on success</doc>
  9265. <type name="gsize" c:type="gsize*"/>
  9266. </parameter>
  9267. </parameters>
  9268. </method>
  9269. <method name="reset" c:identifier="g_converter_reset" version="2.24">
  9270. <doc xml:space="preserve">Resets all internal state in the converter, making it behave
  9271. as if it was just created. If the converter has any internal
  9272. state that would produce output then that output is lost.</doc>
  9273. <return-value transfer-ownership="none">
  9274. <type name="none" c:type="void"/>
  9275. </return-value>
  9276. <parameters>
  9277. <instance-parameter name="converter" transfer-ownership="none">
  9278. <doc xml:space="preserve">a #GConverter.</doc>
  9279. <type name="Converter" c:type="GConverter*"/>
  9280. </instance-parameter>
  9281. </parameters>
  9282. </method>
  9283. </interface>
  9284. <bitfield name="ConverterFlags"
  9285. version="2.24"
  9286. glib:type-name="GConverterFlags"
  9287. glib:get-type="g_converter_flags_get_type"
  9288. c:type="GConverterFlags">
  9289. <doc xml:space="preserve">Flags used when calling a g_converter_convert().</doc>
  9290. <member name="none"
  9291. value="0"
  9292. c:identifier="G_CONVERTER_NO_FLAGS"
  9293. glib:nick="none">
  9294. <doc xml:space="preserve">No flags.</doc>
  9295. </member>
  9296. <member name="input_at_end"
  9297. value="1"
  9298. c:identifier="G_CONVERTER_INPUT_AT_END"
  9299. glib:nick="input-at-end">
  9300. <doc xml:space="preserve">At end of input data</doc>
  9301. </member>
  9302. <member name="flush"
  9303. value="2"
  9304. c:identifier="G_CONVERTER_FLUSH"
  9305. glib:nick="flush">
  9306. <doc xml:space="preserve">Flush data</doc>
  9307. </member>
  9308. </bitfield>
  9309. <record name="ConverterIface"
  9310. c:type="GConverterIface"
  9311. glib:is-gtype-struct-for="Converter"
  9312. version="2.24">
  9313. <doc xml:space="preserve">Provides an interface for converting data from one type
  9314. to another type. The conversion can be stateful
  9315. and may fail at any place.</doc>
  9316. <field name="g_iface">
  9317. <doc xml:space="preserve">The parent interface.</doc>
  9318. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  9319. </field>
  9320. <field name="convert">
  9321. <callback name="convert" throws="1">
  9322. <return-value transfer-ownership="none">
  9323. <doc xml:space="preserve">a #GConverterResult, %G_CONVERTER_ERROR on error.</doc>
  9324. <type name="ConverterResult" c:type="GConverterResult"/>
  9325. </return-value>
  9326. <parameters>
  9327. <parameter name="converter" transfer-ownership="none">
  9328. <doc xml:space="preserve">a #GConverter.</doc>
  9329. <type name="Converter" c:type="GConverter*"/>
  9330. </parameter>
  9331. <parameter name="inbuf"
  9332. transfer-ownership="none"
  9333. nullable="1"
  9334. allow-none="1">
  9335. <doc xml:space="preserve">the buffer
  9336. containing the data to convert.</doc>
  9337. <array length="2" zero-terminated="0" c:type="void*">
  9338. <type name="guint8"/>
  9339. </array>
  9340. </parameter>
  9341. <parameter name="inbuf_size" transfer-ownership="none">
  9342. <doc xml:space="preserve">the number of bytes in @inbuf</doc>
  9343. <type name="gsize" c:type="gsize"/>
  9344. </parameter>
  9345. <parameter name="outbuf"
  9346. transfer-ownership="none"
  9347. nullable="1"
  9348. allow-none="1">
  9349. <doc xml:space="preserve">a buffer to write
  9350. converted data in.</doc>
  9351. <array length="4" zero-terminated="0" c:type="void*">
  9352. <type name="guint8"/>
  9353. </array>
  9354. </parameter>
  9355. <parameter name="outbuf_size" transfer-ownership="none">
  9356. <doc xml:space="preserve">the number of bytes in @outbuf, must be at least one</doc>
  9357. <type name="gsize" c:type="gsize"/>
  9358. </parameter>
  9359. <parameter name="flags" transfer-ownership="none">
  9360. <doc xml:space="preserve">a #GConverterFlags controlling the conversion details</doc>
  9361. <type name="ConverterFlags" c:type="GConverterFlags"/>
  9362. </parameter>
  9363. <parameter name="bytes_read"
  9364. direction="out"
  9365. caller-allocates="0"
  9366. transfer-ownership="full">
  9367. <doc xml:space="preserve">will be set to the number of bytes read from @inbuf on success</doc>
  9368. <type name="gsize" c:type="gsize*"/>
  9369. </parameter>
  9370. <parameter name="bytes_written"
  9371. direction="out"
  9372. caller-allocates="0"
  9373. transfer-ownership="full">
  9374. <doc xml:space="preserve">will be set to the number of bytes written to @outbuf on success</doc>
  9375. <type name="gsize" c:type="gsize*"/>
  9376. </parameter>
  9377. </parameters>
  9378. </callback>
  9379. </field>
  9380. <field name="reset">
  9381. <callback name="reset">
  9382. <return-value transfer-ownership="none">
  9383. <type name="none" c:type="void"/>
  9384. </return-value>
  9385. <parameters>
  9386. <parameter name="converter" transfer-ownership="none">
  9387. <doc xml:space="preserve">a #GConverter.</doc>
  9388. <type name="Converter" c:type="GConverter*"/>
  9389. </parameter>
  9390. </parameters>
  9391. </callback>
  9392. </field>
  9393. </record>
  9394. <class name="ConverterInputStream"
  9395. c:symbol-prefix="converter_input_stream"
  9396. c:type="GConverterInputStream"
  9397. parent="FilterInputStream"
  9398. glib:type-name="GConverterInputStream"
  9399. glib:get-type="g_converter_input_stream_get_type"
  9400. glib:type-struct="ConverterInputStreamClass">
  9401. <doc xml:space="preserve">Converter input stream implements #GInputStream and allows
  9402. conversion of data of various types during reading.
  9403. As of GLib 2.34, #GConverterInputStream implements
  9404. #GPollableInputStream.</doc>
  9405. <implements name="PollableInputStream"/>
  9406. <constructor name="new" c:identifier="g_converter_input_stream_new">
  9407. <doc xml:space="preserve">Creates a new converter input stream for the @base_stream.</doc>
  9408. <return-value transfer-ownership="full">
  9409. <doc xml:space="preserve">a new #GInputStream.</doc>
  9410. <type name="InputStream" c:type="GInputStream*"/>
  9411. </return-value>
  9412. <parameters>
  9413. <parameter name="base_stream" transfer-ownership="none">
  9414. <doc xml:space="preserve">a #GInputStream</doc>
  9415. <type name="InputStream" c:type="GInputStream*"/>
  9416. </parameter>
  9417. <parameter name="converter" transfer-ownership="none">
  9418. <doc xml:space="preserve">a #GConverter</doc>
  9419. <type name="Converter" c:type="GConverter*"/>
  9420. </parameter>
  9421. </parameters>
  9422. </constructor>
  9423. <method name="get_converter"
  9424. c:identifier="g_converter_input_stream_get_converter"
  9425. version="2.24">
  9426. <doc xml:space="preserve">Gets the #GConverter that is used by @converter_stream.</doc>
  9427. <return-value transfer-ownership="none">
  9428. <doc xml:space="preserve">the converter of the converter input stream</doc>
  9429. <type name="Converter" c:type="GConverter*"/>
  9430. </return-value>
  9431. <parameters>
  9432. <instance-parameter name="converter_stream"
  9433. transfer-ownership="none">
  9434. <doc xml:space="preserve">a #GConverterInputStream</doc>
  9435. <type name="ConverterInputStream" c:type="GConverterInputStream*"/>
  9436. </instance-parameter>
  9437. </parameters>
  9438. </method>
  9439. <property name="converter"
  9440. writable="1"
  9441. construct-only="1"
  9442. transfer-ownership="none">
  9443. <type name="Converter"/>
  9444. </property>
  9445. <field name="parent_instance">
  9446. <type name="FilterInputStream" c:type="GFilterInputStream"/>
  9447. </field>
  9448. <field name="priv" readable="0" private="1">
  9449. <type name="ConverterInputStreamPrivate"
  9450. c:type="GConverterInputStreamPrivate*"/>
  9451. </field>
  9452. </class>
  9453. <record name="ConverterInputStreamClass"
  9454. c:type="GConverterInputStreamClass"
  9455. glib:is-gtype-struct-for="ConverterInputStream">
  9456. <field name="parent_class">
  9457. <type name="FilterInputStreamClass" c:type="GFilterInputStreamClass"/>
  9458. </field>
  9459. <field name="_g_reserved1" introspectable="0">
  9460. <callback name="_g_reserved1">
  9461. <return-value transfer-ownership="none">
  9462. <type name="none" c:type="void"/>
  9463. </return-value>
  9464. </callback>
  9465. </field>
  9466. <field name="_g_reserved2" introspectable="0">
  9467. <callback name="_g_reserved2">
  9468. <return-value transfer-ownership="none">
  9469. <type name="none" c:type="void"/>
  9470. </return-value>
  9471. </callback>
  9472. </field>
  9473. <field name="_g_reserved3" introspectable="0">
  9474. <callback name="_g_reserved3">
  9475. <return-value transfer-ownership="none">
  9476. <type name="none" c:type="void"/>
  9477. </return-value>
  9478. </callback>
  9479. </field>
  9480. <field name="_g_reserved4" introspectable="0">
  9481. <callback name="_g_reserved4">
  9482. <return-value transfer-ownership="none">
  9483. <type name="none" c:type="void"/>
  9484. </return-value>
  9485. </callback>
  9486. </field>
  9487. <field name="_g_reserved5" introspectable="0">
  9488. <callback name="_g_reserved5">
  9489. <return-value transfer-ownership="none">
  9490. <type name="none" c:type="void"/>
  9491. </return-value>
  9492. </callback>
  9493. </field>
  9494. </record>
  9495. <record name="ConverterInputStreamPrivate"
  9496. c:type="GConverterInputStreamPrivate"
  9497. disguised="1">
  9498. </record>
  9499. <class name="ConverterOutputStream"
  9500. c:symbol-prefix="converter_output_stream"
  9501. c:type="GConverterOutputStream"
  9502. parent="FilterOutputStream"
  9503. glib:type-name="GConverterOutputStream"
  9504. glib:get-type="g_converter_output_stream_get_type"
  9505. glib:type-struct="ConverterOutputStreamClass">
  9506. <doc xml:space="preserve">Converter output stream implements #GOutputStream and allows
  9507. conversion of data of various types during reading.
  9508. As of GLib 2.34, #GConverterOutputStream implements
  9509. #GPollableOutputStream.</doc>
  9510. <implements name="PollableOutputStream"/>
  9511. <constructor name="new" c:identifier="g_converter_output_stream_new">
  9512. <doc xml:space="preserve">Creates a new converter output stream for the @base_stream.</doc>
  9513. <return-value transfer-ownership="full">
  9514. <doc xml:space="preserve">a new #GOutputStream.</doc>
  9515. <type name="OutputStream" c:type="GOutputStream*"/>
  9516. </return-value>
  9517. <parameters>
  9518. <parameter name="base_stream" transfer-ownership="none">
  9519. <doc xml:space="preserve">a #GOutputStream</doc>
  9520. <type name="OutputStream" c:type="GOutputStream*"/>
  9521. </parameter>
  9522. <parameter name="converter" transfer-ownership="none">
  9523. <doc xml:space="preserve">a #GConverter</doc>
  9524. <type name="Converter" c:type="GConverter*"/>
  9525. </parameter>
  9526. </parameters>
  9527. </constructor>
  9528. <method name="get_converter"
  9529. c:identifier="g_converter_output_stream_get_converter"
  9530. version="2.24">
  9531. <doc xml:space="preserve">Gets the #GConverter that is used by @converter_stream.</doc>
  9532. <return-value transfer-ownership="none">
  9533. <doc xml:space="preserve">the converter of the converter output stream</doc>
  9534. <type name="Converter" c:type="GConverter*"/>
  9535. </return-value>
  9536. <parameters>
  9537. <instance-parameter name="converter_stream"
  9538. transfer-ownership="none">
  9539. <doc xml:space="preserve">a #GConverterOutputStream</doc>
  9540. <type name="ConverterOutputStream"
  9541. c:type="GConverterOutputStream*"/>
  9542. </instance-parameter>
  9543. </parameters>
  9544. </method>
  9545. <property name="converter"
  9546. writable="1"
  9547. construct-only="1"
  9548. transfer-ownership="none">
  9549. <type name="Converter"/>
  9550. </property>
  9551. <field name="parent_instance">
  9552. <type name="FilterOutputStream" c:type="GFilterOutputStream"/>
  9553. </field>
  9554. <field name="priv" readable="0" private="1">
  9555. <type name="ConverterOutputStreamPrivate"
  9556. c:type="GConverterOutputStreamPrivate*"/>
  9557. </field>
  9558. </class>
  9559. <record name="ConverterOutputStreamClass"
  9560. c:type="GConverterOutputStreamClass"
  9561. glib:is-gtype-struct-for="ConverterOutputStream">
  9562. <field name="parent_class">
  9563. <type name="FilterOutputStreamClass"
  9564. c:type="GFilterOutputStreamClass"/>
  9565. </field>
  9566. <field name="_g_reserved1" introspectable="0">
  9567. <callback name="_g_reserved1">
  9568. <return-value transfer-ownership="none">
  9569. <type name="none" c:type="void"/>
  9570. </return-value>
  9571. </callback>
  9572. </field>
  9573. <field name="_g_reserved2" introspectable="0">
  9574. <callback name="_g_reserved2">
  9575. <return-value transfer-ownership="none">
  9576. <type name="none" c:type="void"/>
  9577. </return-value>
  9578. </callback>
  9579. </field>
  9580. <field name="_g_reserved3" introspectable="0">
  9581. <callback name="_g_reserved3">
  9582. <return-value transfer-ownership="none">
  9583. <type name="none" c:type="void"/>
  9584. </return-value>
  9585. </callback>
  9586. </field>
  9587. <field name="_g_reserved4" introspectable="0">
  9588. <callback name="_g_reserved4">
  9589. <return-value transfer-ownership="none">
  9590. <type name="none" c:type="void"/>
  9591. </return-value>
  9592. </callback>
  9593. </field>
  9594. <field name="_g_reserved5" introspectable="0">
  9595. <callback name="_g_reserved5">
  9596. <return-value transfer-ownership="none">
  9597. <type name="none" c:type="void"/>
  9598. </return-value>
  9599. </callback>
  9600. </field>
  9601. </record>
  9602. <record name="ConverterOutputStreamPrivate"
  9603. c:type="GConverterOutputStreamPrivate"
  9604. disguised="1">
  9605. </record>
  9606. <enumeration name="ConverterResult"
  9607. version="2.24"
  9608. glib:type-name="GConverterResult"
  9609. glib:get-type="g_converter_result_get_type"
  9610. c:type="GConverterResult">
  9611. <doc xml:space="preserve">Results returned from g_converter_convert().</doc>
  9612. <member name="error"
  9613. value="0"
  9614. c:identifier="G_CONVERTER_ERROR"
  9615. glib:nick="error">
  9616. <doc xml:space="preserve">There was an error during conversion.</doc>
  9617. </member>
  9618. <member name="converted"
  9619. value="1"
  9620. c:identifier="G_CONVERTER_CONVERTED"
  9621. glib:nick="converted">
  9622. <doc xml:space="preserve">Some data was consumed or produced</doc>
  9623. </member>
  9624. <member name="finished"
  9625. value="2"
  9626. c:identifier="G_CONVERTER_FINISHED"
  9627. glib:nick="finished">
  9628. <doc xml:space="preserve">The conversion is finished</doc>
  9629. </member>
  9630. <member name="flushed"
  9631. value="3"
  9632. c:identifier="G_CONVERTER_FLUSHED"
  9633. glib:nick="flushed">
  9634. <doc xml:space="preserve">Flushing is finished</doc>
  9635. </member>
  9636. </enumeration>
  9637. <class name="Credentials"
  9638. c:symbol-prefix="credentials"
  9639. c:type="GCredentials"
  9640. version="2.26"
  9641. parent="GObject.Object"
  9642. glib:type-name="GCredentials"
  9643. glib:get-type="g_credentials_get_type"
  9644. glib:type-struct="CredentialsClass">
  9645. <doc xml:space="preserve">The #GCredentials type is a reference-counted wrapper for native
  9646. credentials. This information is typically used for identifying,
  9647. authenticating and authorizing other processes.
  9648. Some operating systems supports looking up the credentials of the
  9649. remote peer of a communication endpoint - see e.g.
  9650. g_socket_get_credentials().
  9651. Some operating systems supports securely sending and receiving
  9652. credentials over a Unix Domain Socket, see
  9653. #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
  9654. g_unix_connection_receive_credentials() for details.
  9655. On Linux, the native credential type is a struct ucred - see the
  9656. unix(7) man page for details. This corresponds to
  9657. %G_CREDENTIALS_TYPE_LINUX_UCRED.
  9658. On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native
  9659. credential type is a struct cmsgcred. This corresponds
  9660. to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
  9661. On NetBSD, the native credential type is a struct unpcbid.
  9662. This corresponds to %G_CREDENTIALS_TYPE_NETBSD_UNPCBID.
  9663. On OpenBSD, the native credential type is a struct sockpeercred.
  9664. This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.
  9665. On Solaris (including OpenSolaris and its derivatives), the native
  9666. credential type is a ucred_t. This corresponds to
  9667. %G_CREDENTIALS_TYPE_SOLARIS_UCRED.</doc>
  9668. <constructor name="new" c:identifier="g_credentials_new" version="2.26">
  9669. <doc xml:space="preserve">Creates a new #GCredentials object with credentials matching the
  9670. the current process.</doc>
  9671. <return-value transfer-ownership="full">
  9672. <doc xml:space="preserve">A #GCredentials. Free with g_object_unref().</doc>
  9673. <type name="Credentials" c:type="GCredentials*"/>
  9674. </return-value>
  9675. </constructor>
  9676. <method name="get_native"
  9677. c:identifier="g_credentials_get_native"
  9678. version="2.26"
  9679. introspectable="0">
  9680. <doc xml:space="preserve">Gets a pointer to native credentials of type @native_type from
  9681. @credentials.
  9682. It is a programming error (which will cause an warning to be
  9683. logged) to use this method if there is no #GCredentials support for
  9684. the OS or if @native_type isn't supported by the OS.</doc>
  9685. <return-value transfer-ownership="none" nullable="1">
  9686. <doc xml:space="preserve">The pointer to native credentials or %NULL if the
  9687. operation there is no #GCredentials support for the OS or if
  9688. @native_type isn't supported by the OS. Do not free the returned
  9689. data, it is owned by @credentials.</doc>
  9690. <type name="gpointer" c:type="gpointer"/>
  9691. </return-value>
  9692. <parameters>
  9693. <instance-parameter name="credentials" transfer-ownership="none">
  9694. <doc xml:space="preserve">A #GCredentials.</doc>
  9695. <type name="Credentials" c:type="GCredentials*"/>
  9696. </instance-parameter>
  9697. <parameter name="native_type" transfer-ownership="none">
  9698. <doc xml:space="preserve">The type of native credentials to get.</doc>
  9699. <type name="CredentialsType" c:type="GCredentialsType"/>
  9700. </parameter>
  9701. </parameters>
  9702. </method>
  9703. <method name="get_unix_pid"
  9704. c:identifier="g_credentials_get_unix_pid"
  9705. version="2.36"
  9706. throws="1">
  9707. <doc xml:space="preserve">Tries to get the UNIX process identifier from @credentials. This
  9708. method is only available on UNIX platforms.
  9709. This operation can fail if #GCredentials is not supported on the
  9710. OS or if the native credentials type does not contain information
  9711. about the UNIX process ID.</doc>
  9712. <return-value transfer-ownership="none">
  9713. <doc xml:space="preserve">The UNIX process ID, or -1 if @error is set.</doc>
  9714. <type name="gint" c:type="pid_t"/>
  9715. </return-value>
  9716. <parameters>
  9717. <instance-parameter name="credentials" transfer-ownership="none">
  9718. <doc xml:space="preserve">A #GCredentials</doc>
  9719. <type name="Credentials" c:type="GCredentials*"/>
  9720. </instance-parameter>
  9721. </parameters>
  9722. </method>
  9723. <method name="get_unix_user"
  9724. c:identifier="g_credentials_get_unix_user"
  9725. version="2.26"
  9726. throws="1">
  9727. <doc xml:space="preserve">Tries to get the UNIX user identifier from @credentials. This
  9728. method is only available on UNIX platforms.
  9729. This operation can fail if #GCredentials is not supported on the
  9730. OS or if the native credentials type does not contain information
  9731. about the UNIX user.</doc>
  9732. <return-value transfer-ownership="none">
  9733. <doc xml:space="preserve">The UNIX user identifier or -1 if @error is set.</doc>
  9734. <type name="guint" c:type="uid_t"/>
  9735. </return-value>
  9736. <parameters>
  9737. <instance-parameter name="credentials" transfer-ownership="none">
  9738. <doc xml:space="preserve">A #GCredentials</doc>
  9739. <type name="Credentials" c:type="GCredentials*"/>
  9740. </instance-parameter>
  9741. </parameters>
  9742. </method>
  9743. <method name="is_same_user"
  9744. c:identifier="g_credentials_is_same_user"
  9745. version="2.26"
  9746. throws="1">
  9747. <doc xml:space="preserve">Checks if @credentials and @other_credentials is the same user.
  9748. This operation can fail if #GCredentials is not supported on the
  9749. the OS.</doc>
  9750. <return-value transfer-ownership="none">
  9751. <doc xml:space="preserve">%TRUE if @credentials and @other_credentials has the same
  9752. user, %FALSE otherwise or if @error is set.</doc>
  9753. <type name="gboolean" c:type="gboolean"/>
  9754. </return-value>
  9755. <parameters>
  9756. <instance-parameter name="credentials" transfer-ownership="none">
  9757. <doc xml:space="preserve">A #GCredentials.</doc>
  9758. <type name="Credentials" c:type="GCredentials*"/>
  9759. </instance-parameter>
  9760. <parameter name="other_credentials" transfer-ownership="none">
  9761. <doc xml:space="preserve">A #GCredentials.</doc>
  9762. <type name="Credentials" c:type="GCredentials*"/>
  9763. </parameter>
  9764. </parameters>
  9765. </method>
  9766. <method name="set_native"
  9767. c:identifier="g_credentials_set_native"
  9768. version="2.26">
  9769. <doc xml:space="preserve">Copies the native credentials of type @native_type from @native
  9770. into @credentials.
  9771. It is a programming error (which will cause an warning to be
  9772. logged) to use this method if there is no #GCredentials support for
  9773. the OS or if @native_type isn't supported by the OS.</doc>
  9774. <return-value transfer-ownership="none">
  9775. <type name="none" c:type="void"/>
  9776. </return-value>
  9777. <parameters>
  9778. <instance-parameter name="credentials" transfer-ownership="none">
  9779. <doc xml:space="preserve">A #GCredentials.</doc>
  9780. <type name="Credentials" c:type="GCredentials*"/>
  9781. </instance-parameter>
  9782. <parameter name="native_type" transfer-ownership="none">
  9783. <doc xml:space="preserve">The type of native credentials to set.</doc>
  9784. <type name="CredentialsType" c:type="GCredentialsType"/>
  9785. </parameter>
  9786. <parameter name="native" transfer-ownership="none">
  9787. <doc xml:space="preserve">A pointer to native credentials.</doc>
  9788. <type name="gpointer" c:type="gpointer"/>
  9789. </parameter>
  9790. </parameters>
  9791. </method>
  9792. <method name="set_unix_user"
  9793. c:identifier="g_credentials_set_unix_user"
  9794. version="2.26"
  9795. throws="1">
  9796. <doc xml:space="preserve">Tries to set the UNIX user identifier on @credentials. This method
  9797. is only available on UNIX platforms.
  9798. This operation can fail if #GCredentials is not supported on the
  9799. OS or if the native credentials type does not contain information
  9800. about the UNIX user. It can also fail if the OS does not allow the
  9801. use of "spoofed" credentials.</doc>
  9802. <return-value transfer-ownership="none">
  9803. <doc xml:space="preserve">%TRUE if @uid was set, %FALSE if error is set.</doc>
  9804. <type name="gboolean" c:type="gboolean"/>
  9805. </return-value>
  9806. <parameters>
  9807. <instance-parameter name="credentials" transfer-ownership="none">
  9808. <doc xml:space="preserve">A #GCredentials.</doc>
  9809. <type name="Credentials" c:type="GCredentials*"/>
  9810. </instance-parameter>
  9811. <parameter name="uid" transfer-ownership="none">
  9812. <doc xml:space="preserve">The UNIX user identifier to set.</doc>
  9813. <type name="guint" c:type="uid_t"/>
  9814. </parameter>
  9815. </parameters>
  9816. </method>
  9817. <method name="to_string"
  9818. c:identifier="g_credentials_to_string"
  9819. version="2.26">
  9820. <doc xml:space="preserve">Creates a human-readable textual representation of @credentials
  9821. that can be used in logging and debug messages. The format of the
  9822. returned string may change in future GLib release.</doc>
  9823. <return-value transfer-ownership="full">
  9824. <doc xml:space="preserve">A string that should be freed with g_free().</doc>
  9825. <type name="utf8" c:type="gchar*"/>
  9826. </return-value>
  9827. <parameters>
  9828. <instance-parameter name="credentials" transfer-ownership="none">
  9829. <doc xml:space="preserve">A #GCredentials object.</doc>
  9830. <type name="Credentials" c:type="GCredentials*"/>
  9831. </instance-parameter>
  9832. </parameters>
  9833. </method>
  9834. </class>
  9835. <record name="CredentialsClass"
  9836. c:type="GCredentialsClass"
  9837. disguised="1"
  9838. glib:is-gtype-struct-for="Credentials"
  9839. version="2.26">
  9840. <doc xml:space="preserve">Class structure for #GCredentials.</doc>
  9841. </record>
  9842. <enumeration name="CredentialsType"
  9843. version="2.26"
  9844. glib:type-name="GCredentialsType"
  9845. glib:get-type="g_credentials_type_get_type"
  9846. c:type="GCredentialsType">
  9847. <doc xml:space="preserve">Enumeration describing different kinds of native credential types.</doc>
  9848. <member name="invalid"
  9849. value="0"
  9850. c:identifier="G_CREDENTIALS_TYPE_INVALID"
  9851. glib:nick="invalid">
  9852. <doc xml:space="preserve">Indicates an invalid native credential type.</doc>
  9853. </member>
  9854. <member name="linux_ucred"
  9855. value="1"
  9856. c:identifier="G_CREDENTIALS_TYPE_LINUX_UCRED"
  9857. glib:nick="linux-ucred">
  9858. <doc xml:space="preserve">The native credentials type is a struct ucred.</doc>
  9859. </member>
  9860. <member name="freebsd_cmsgcred"
  9861. value="2"
  9862. c:identifier="G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED"
  9863. glib:nick="freebsd-cmsgcred">
  9864. <doc xml:space="preserve">The native credentials type is a struct cmsgcred.</doc>
  9865. </member>
  9866. <member name="openbsd_sockpeercred"
  9867. value="3"
  9868. c:identifier="G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED"
  9869. glib:nick="openbsd-sockpeercred">
  9870. <doc xml:space="preserve">The native credentials type is a struct sockpeercred. Added in 2.30.</doc>
  9871. </member>
  9872. <member name="solaris_ucred"
  9873. value="4"
  9874. c:identifier="G_CREDENTIALS_TYPE_SOLARIS_UCRED"
  9875. glib:nick="solaris-ucred">
  9876. <doc xml:space="preserve">The native credentials type is a ucred_t. Added in 2.40.</doc>
  9877. </member>
  9878. <member name="netbsd_unpcbid"
  9879. value="5"
  9880. c:identifier="G_CREDENTIALS_TYPE_NETBSD_UNPCBID"
  9881. glib:nick="netbsd-unpcbid">
  9882. <doc xml:space="preserve">The native credentials type is a struct unpcbid.</doc>
  9883. </member>
  9884. </enumeration>
  9885. <class name="DBusActionGroup"
  9886. c:symbol-prefix="dbus_action_group"
  9887. c:type="GDBusActionGroup"
  9888. parent="GObject.Object"
  9889. glib:type-name="GDBusActionGroup"
  9890. glib:get-type="g_dbus_action_group_get_type">
  9891. <doc xml:space="preserve">#GDBusActionGroup is an implementation of the #GActionGroup
  9892. interface that can be used as a proxy for an action group
  9893. that is exported over D-Bus with g_dbus_connection_export_action_group().</doc>
  9894. <implements name="ActionGroup"/>
  9895. <implements name="RemoteActionGroup"/>
  9896. <function name="get"
  9897. c:identifier="g_dbus_action_group_get"
  9898. version="2.32">
  9899. <doc xml:space="preserve">Obtains a #GDBusActionGroup for the action group which is exported at
  9900. the given @bus_name and @object_path.
  9901. The thread default main context is taken at the time of this call.
  9902. All signals on the menu model (and any linked models) are reported
  9903. with respect to this context. All calls on the returned menu model
  9904. (and linked models) must also originate from this same context, with
  9905. the thread default main context unchanged.
  9906. This call is non-blocking. The returned action group may or may not
  9907. already be filled in. The correct thing to do is connect the signals
  9908. for the action group to monitor for changes and then to call
  9909. g_action_group_list_actions() to get the initial list.</doc>
  9910. <return-value transfer-ownership="full">
  9911. <doc xml:space="preserve">a #GDBusActionGroup</doc>
  9912. <type name="DBusActionGroup" c:type="GDBusActionGroup*"/>
  9913. </return-value>
  9914. <parameters>
  9915. <parameter name="connection" transfer-ownership="none">
  9916. <doc xml:space="preserve">A #GDBusConnection</doc>
  9917. <type name="DBusConnection" c:type="GDBusConnection*"/>
  9918. </parameter>
  9919. <parameter name="bus_name" transfer-ownership="none">
  9920. <doc xml:space="preserve">the bus name which exports the action group</doc>
  9921. <type name="utf8" c:type="const gchar*"/>
  9922. </parameter>
  9923. <parameter name="object_path" transfer-ownership="none">
  9924. <doc xml:space="preserve">the object path at which the action group is exported</doc>
  9925. <type name="utf8" c:type="const gchar*"/>
  9926. </parameter>
  9927. </parameters>
  9928. </function>
  9929. </class>
  9930. <record name="DBusAnnotationInfo"
  9931. c:type="GDBusAnnotationInfo"
  9932. version="2.26"
  9933. glib:type-name="GDBusAnnotationInfo"
  9934. glib:get-type="g_dbus_annotation_info_get_type"
  9935. c:symbol-prefix="dbus_annotation_info">
  9936. <doc xml:space="preserve">Information about an annotation.</doc>
  9937. <field name="ref_count" writable="1">
  9938. <doc xml:space="preserve">The reference count or -1 if statically allocated.</doc>
  9939. <type name="gint" c:type="volatile gint"/>
  9940. </field>
  9941. <field name="key" writable="1">
  9942. <doc xml:space="preserve">The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".</doc>
  9943. <type name="utf8" c:type="gchar*"/>
  9944. </field>
  9945. <field name="value" writable="1">
  9946. <doc xml:space="preserve">The value of the annotation.</doc>
  9947. <type name="utf8" c:type="gchar*"/>
  9948. </field>
  9949. <field name="annotations" writable="1">
  9950. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
  9951. <array c:type="GDBusAnnotationInfo**">
  9952. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  9953. </array>
  9954. </field>
  9955. <method name="ref"
  9956. c:identifier="g_dbus_annotation_info_ref"
  9957. version="2.26">
  9958. <doc xml:space="preserve">If @info is statically allocated does nothing. Otherwise increases
  9959. the reference count.</doc>
  9960. <return-value transfer-ownership="full">
  9961. <doc xml:space="preserve">The same @info.</doc>
  9962. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  9963. </return-value>
  9964. <parameters>
  9965. <instance-parameter name="info" transfer-ownership="none">
  9966. <doc xml:space="preserve">A #GDBusNodeInfo</doc>
  9967. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  9968. </instance-parameter>
  9969. </parameters>
  9970. </method>
  9971. <method name="unref"
  9972. c:identifier="g_dbus_annotation_info_unref"
  9973. version="2.26">
  9974. <doc xml:space="preserve">If @info is statically allocated, does nothing. Otherwise decreases
  9975. the reference count of @info. When its reference count drops to 0,
  9976. the memory used is freed.</doc>
  9977. <return-value transfer-ownership="none">
  9978. <type name="none" c:type="void"/>
  9979. </return-value>
  9980. <parameters>
  9981. <instance-parameter name="info" transfer-ownership="none">
  9982. <doc xml:space="preserve">A #GDBusAnnotationInfo.</doc>
  9983. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  9984. </instance-parameter>
  9985. </parameters>
  9986. </method>
  9987. <function name="lookup"
  9988. c:identifier="g_dbus_annotation_info_lookup"
  9989. version="2.26">
  9990. <doc xml:space="preserve">Looks up the value of an annotation.
  9991. The cost of this function is O(n) in number of annotations.</doc>
  9992. <return-value transfer-ownership="none">
  9993. <doc xml:space="preserve">The value or %NULL if not found. Do not free, it is owned by @annotations.</doc>
  9994. <type name="utf8" c:type="const gchar*"/>
  9995. </return-value>
  9996. <parameters>
  9997. <parameter name="annotations"
  9998. transfer-ownership="none"
  9999. nullable="1"
  10000. allow-none="1">
  10001. <doc xml:space="preserve">A %NULL-terminated array of annotations or %NULL.</doc>
  10002. <array c:type="GDBusAnnotationInfo**">
  10003. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  10004. </array>
  10005. </parameter>
  10006. <parameter name="name" transfer-ownership="none">
  10007. <doc xml:space="preserve">The name of the annotation to look up.</doc>
  10008. <type name="utf8" c:type="const gchar*"/>
  10009. </parameter>
  10010. </parameters>
  10011. </function>
  10012. </record>
  10013. <record name="DBusArgInfo"
  10014. c:type="GDBusArgInfo"
  10015. version="2.26"
  10016. glib:type-name="GDBusArgInfo"
  10017. glib:get-type="g_dbus_arg_info_get_type"
  10018. c:symbol-prefix="dbus_arg_info">
  10019. <doc xml:space="preserve">Information about an argument for a method or a signal.</doc>
  10020. <field name="ref_count" writable="1">
  10021. <doc xml:space="preserve">The reference count or -1 if statically allocated.</doc>
  10022. <type name="gint" c:type="volatile gint"/>
  10023. </field>
  10024. <field name="name" writable="1">
  10025. <doc xml:space="preserve">Name of the argument, e.g. @unix_user_id.</doc>
  10026. <type name="utf8" c:type="gchar*"/>
  10027. </field>
  10028. <field name="signature" writable="1">
  10029. <doc xml:space="preserve">D-Bus signature of the argument (a single complete type).</doc>
  10030. <type name="utf8" c:type="gchar*"/>
  10031. </field>
  10032. <field name="annotations" writable="1">
  10033. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
  10034. <array c:type="GDBusAnnotationInfo**">
  10035. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  10036. </array>
  10037. </field>
  10038. <method name="ref" c:identifier="g_dbus_arg_info_ref" version="2.26">
  10039. <doc xml:space="preserve">If @info is statically allocated does nothing. Otherwise increases
  10040. the reference count.</doc>
  10041. <return-value transfer-ownership="full">
  10042. <doc xml:space="preserve">The same @info.</doc>
  10043. <type name="DBusArgInfo" c:type="GDBusArgInfo*"/>
  10044. </return-value>
  10045. <parameters>
  10046. <instance-parameter name="info" transfer-ownership="none">
  10047. <doc xml:space="preserve">A #GDBusArgInfo</doc>
  10048. <type name="DBusArgInfo" c:type="GDBusArgInfo*"/>
  10049. </instance-parameter>
  10050. </parameters>
  10051. </method>
  10052. <method name="unref" c:identifier="g_dbus_arg_info_unref" version="2.26">
  10053. <doc xml:space="preserve">If @info is statically allocated, does nothing. Otherwise decreases
  10054. the reference count of @info. When its reference count drops to 0,
  10055. the memory used is freed.</doc>
  10056. <return-value transfer-ownership="none">
  10057. <type name="none" c:type="void"/>
  10058. </return-value>
  10059. <parameters>
  10060. <instance-parameter name="info" transfer-ownership="none">
  10061. <doc xml:space="preserve">A #GDBusArgInfo.</doc>
  10062. <type name="DBusArgInfo" c:type="GDBusArgInfo*"/>
  10063. </instance-parameter>
  10064. </parameters>
  10065. </method>
  10066. </record>
  10067. <class name="DBusAuthObserver"
  10068. c:symbol-prefix="dbus_auth_observer"
  10069. c:type="GDBusAuthObserver"
  10070. version="2.26"
  10071. parent="GObject.Object"
  10072. glib:type-name="GDBusAuthObserver"
  10073. glib:get-type="g_dbus_auth_observer_get_type">
  10074. <doc xml:space="preserve">The #GDBusAuthObserver type provides a mechanism for participating
  10075. in how a #GDBusServer (or a #GDBusConnection) authenticates remote
  10076. peers. Simply instantiate a #GDBusAuthObserver and connect to the
  10077. signals you are interested in. Note that new signals may be added
  10078. in the future
  10079. ## Controlling Authentication # {#auth-observer}
  10080. For example, if you only want to allow D-Bus connections from
  10081. processes owned by the same uid as the server, you would use a
  10082. signal handler like the following:
  10083. |[&lt;!-- language="C" --&gt;
  10084. static gboolean
  10085. on_authorize_authenticated_peer (GDBusAuthObserver *observer,
  10086. GIOStream *stream,
  10087. GCredentials *credentials,
  10088. gpointer user_data)
  10089. {
  10090. gboolean authorized;
  10091. authorized = FALSE;
  10092. if (credentials != NULL)
  10093. {
  10094. GCredentials *own_credentials;
  10095. own_credentials = g_credentials_new ();
  10096. if (g_credentials_is_same_user (credentials, own_credentials, NULL))
  10097. authorized = TRUE;
  10098. g_object_unref (own_credentials);
  10099. }
  10100. return authorized;
  10101. }
  10102. ]|</doc>
  10103. <constructor name="new"
  10104. c:identifier="g_dbus_auth_observer_new"
  10105. version="2.26">
  10106. <doc xml:space="preserve">Creates a new #GDBusAuthObserver object.</doc>
  10107. <return-value transfer-ownership="full">
  10108. <doc xml:space="preserve">A #GDBusAuthObserver. Free with g_object_unref().</doc>
  10109. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  10110. </return-value>
  10111. </constructor>
  10112. <method name="allow_mechanism"
  10113. c:identifier="g_dbus_auth_observer_allow_mechanism"
  10114. version="2.34">
  10115. <doc xml:space="preserve">Emits the #GDBusAuthObserver::allow-mechanism signal on @observer.</doc>
  10116. <return-value transfer-ownership="none">
  10117. <doc xml:space="preserve">%TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not.</doc>
  10118. <type name="gboolean" c:type="gboolean"/>
  10119. </return-value>
  10120. <parameters>
  10121. <instance-parameter name="observer" transfer-ownership="none">
  10122. <doc xml:space="preserve">A #GDBusAuthObserver.</doc>
  10123. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  10124. </instance-parameter>
  10125. <parameter name="mechanism" transfer-ownership="none">
  10126. <doc xml:space="preserve">The name of the mechanism, e.g. `DBUS_COOKIE_SHA1`.</doc>
  10127. <type name="utf8" c:type="const gchar*"/>
  10128. </parameter>
  10129. </parameters>
  10130. </method>
  10131. <method name="authorize_authenticated_peer"
  10132. c:identifier="g_dbus_auth_observer_authorize_authenticated_peer"
  10133. version="2.26">
  10134. <doc xml:space="preserve">Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.</doc>
  10135. <return-value transfer-ownership="none">
  10136. <doc xml:space="preserve">%TRUE if the peer is authorized, %FALSE if not.</doc>
  10137. <type name="gboolean" c:type="gboolean"/>
  10138. </return-value>
  10139. <parameters>
  10140. <instance-parameter name="observer" transfer-ownership="none">
  10141. <doc xml:space="preserve">A #GDBusAuthObserver.</doc>
  10142. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  10143. </instance-parameter>
  10144. <parameter name="stream" transfer-ownership="none">
  10145. <doc xml:space="preserve">A #GIOStream for the #GDBusConnection.</doc>
  10146. <type name="IOStream" c:type="GIOStream*"/>
  10147. </parameter>
  10148. <parameter name="credentials"
  10149. transfer-ownership="none"
  10150. nullable="1"
  10151. allow-none="1">
  10152. <doc xml:space="preserve">Credentials received from the peer or %NULL.</doc>
  10153. <type name="Credentials" c:type="GCredentials*"/>
  10154. </parameter>
  10155. </parameters>
  10156. </method>
  10157. <glib:signal name="allow-mechanism" when="last" version="2.34">
  10158. <doc xml:space="preserve">Emitted to check if @mechanism is allowed to be used.</doc>
  10159. <return-value transfer-ownership="none">
  10160. <doc xml:space="preserve">%TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not.</doc>
  10161. <type name="gboolean" c:type="gboolean"/>
  10162. </return-value>
  10163. <parameters>
  10164. <parameter name="mechanism" transfer-ownership="none">
  10165. <doc xml:space="preserve">The name of the mechanism, e.g. `DBUS_COOKIE_SHA1`.</doc>
  10166. <type name="utf8" c:type="gchar*"/>
  10167. </parameter>
  10168. </parameters>
  10169. </glib:signal>
  10170. <glib:signal name="authorize-authenticated-peer"
  10171. when="last"
  10172. version="2.26">
  10173. <doc xml:space="preserve">Emitted to check if a peer that is successfully authenticated
  10174. is authorized.</doc>
  10175. <return-value transfer-ownership="none">
  10176. <doc xml:space="preserve">%TRUE if the peer is authorized, %FALSE if not.</doc>
  10177. <type name="gboolean" c:type="gboolean"/>
  10178. </return-value>
  10179. <parameters>
  10180. <parameter name="stream" transfer-ownership="none">
  10181. <doc xml:space="preserve">A #GIOStream for the #GDBusConnection.</doc>
  10182. <type name="IOStream"/>
  10183. </parameter>
  10184. <parameter name="credentials"
  10185. transfer-ownership="none"
  10186. nullable="1"
  10187. allow-none="1">
  10188. <doc xml:space="preserve">Credentials received from the peer or %NULL.</doc>
  10189. <type name="Credentials"/>
  10190. </parameter>
  10191. </parameters>
  10192. </glib:signal>
  10193. </class>
  10194. <bitfield name="DBusCallFlags"
  10195. version="2.26"
  10196. glib:type-name="GDBusCallFlags"
  10197. glib:get-type="g_dbus_call_flags_get_type"
  10198. c:type="GDBusCallFlags">
  10199. <doc xml:space="preserve">Flags used in g_dbus_connection_call() and similar APIs.</doc>
  10200. <member name="none"
  10201. value="0"
  10202. c:identifier="G_DBUS_CALL_FLAGS_NONE"
  10203. glib:nick="none">
  10204. <doc xml:space="preserve">No flags set.</doc>
  10205. </member>
  10206. <member name="no_auto_start"
  10207. value="1"
  10208. c:identifier="G_DBUS_CALL_FLAGS_NO_AUTO_START"
  10209. glib:nick="no-auto-start">
  10210. <doc xml:space="preserve">The bus must not launch
  10211. an owner for the destination name in response to this method
  10212. invocation.</doc>
  10213. </member>
  10214. <member name="allow_interactive_authorization"
  10215. value="2"
  10216. c:identifier="G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION"
  10217. glib:nick="allow-interactive-authorization">
  10218. <doc xml:space="preserve">the caller is prepared to
  10219. wait for interactive authorization. Since 2.46.</doc>
  10220. </member>
  10221. </bitfield>
  10222. <bitfield name="DBusCapabilityFlags"
  10223. version="2.26"
  10224. glib:type-name="GDBusCapabilityFlags"
  10225. glib:get-type="g_dbus_capability_flags_get_type"
  10226. c:type="GDBusCapabilityFlags">
  10227. <doc xml:space="preserve">Capabilities negotiated with the remote peer.</doc>
  10228. <member name="none"
  10229. value="0"
  10230. c:identifier="G_DBUS_CAPABILITY_FLAGS_NONE"
  10231. glib:nick="none">
  10232. <doc xml:space="preserve">No flags set.</doc>
  10233. </member>
  10234. <member name="unix_fd_passing"
  10235. value="1"
  10236. c:identifier="G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING"
  10237. glib:nick="unix-fd-passing">
  10238. <doc xml:space="preserve">The connection
  10239. supports exchanging UNIX file descriptors with the remote peer.</doc>
  10240. </member>
  10241. </bitfield>
  10242. <class name="DBusConnection"
  10243. c:symbol-prefix="dbus_connection"
  10244. c:type="GDBusConnection"
  10245. version="2.26"
  10246. parent="GObject.Object"
  10247. glib:type-name="GDBusConnection"
  10248. glib:get-type="g_dbus_connection_get_type">
  10249. <doc xml:space="preserve">The #GDBusConnection type is used for D-Bus connections to remote
  10250. peers such as a message buses. It is a low-level API that offers a
  10251. lot of flexibility. For instance, it lets you establish a connection
  10252. over any transport that can by represented as an #GIOStream.
  10253. This class is rarely used directly in D-Bus clients. If you are writing
  10254. a D-Bus client, it is often easier to use the g_bus_own_name(),
  10255. g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
  10256. As an exception to the usual GLib rule that a particular object must not
  10257. be used by two threads at the same time, #GDBusConnection's methods may be
  10258. called from any thread. This is so that g_bus_get() and g_bus_get_sync()
  10259. can safely return the same #GDBusConnection when called from any thread.
  10260. Most of the ways to obtain a #GDBusConnection automatically initialize it
  10261. (i.e. connect to D-Bus): for instance, g_dbus_connection_new() and
  10262. g_bus_get(), and the synchronous versions of those methods, give you an
  10263. initialized connection. Language bindings for GIO should use
  10264. g_initable_new() or g_async_initable_new_async(), which also initialize the
  10265. connection.
  10266. If you construct an uninitialized #GDBusConnection, such as via
  10267. g_object_new(), you must initialize it via g_initable_init() or
  10268. g_async_initable_init_async() before using its methods or properties.
  10269. Calling methods or accessing properties on a #GDBusConnection that has not
  10270. completed initialization successfully is considered to be invalid, and leads
  10271. to undefined behaviour. In particular, if initialization fails with a
  10272. #GError, the only valid thing you can do with that #GDBusConnection is to
  10273. free it with g_object_unref().
  10274. ## An example D-Bus server # {#gdbus-server}
  10275. Here is an example for a D-Bus server:
  10276. [gdbus-example-server.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-server.c)
  10277. ## An example for exporting a subtree # {#gdbus-subtree-server}
  10278. Here is an example for exporting a subtree:
  10279. [gdbus-example-subtree.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-subtree.c)
  10280. ## An example for file descriptor passing # {#gdbus-unix-fd-client}
  10281. Here is an example for passing UNIX file descriptors:
  10282. [gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-unix-fd-client.c)
  10283. ## An example for exporting a GObject # {#gdbus-export}
  10284. Here is an example for exporting a #GObject:
  10285. [gdbus-example-export.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-export.c)</doc>
  10286. <implements name="AsyncInitable"/>
  10287. <implements name="Initable"/>
  10288. <constructor name="new_finish"
  10289. c:identifier="g_dbus_connection_new_finish"
  10290. version="2.26"
  10291. throws="1">
  10292. <doc xml:space="preserve">Finishes an operation started with g_dbus_connection_new().</doc>
  10293. <return-value transfer-ownership="full">
  10294. <doc xml:space="preserve">a #GDBusConnection or %NULL if @error is set. Free
  10295. with g_object_unref().</doc>
  10296. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10297. </return-value>
  10298. <parameters>
  10299. <parameter name="res" transfer-ownership="none">
  10300. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback
  10301. passed to g_dbus_connection_new().</doc>
  10302. <type name="AsyncResult" c:type="GAsyncResult*"/>
  10303. </parameter>
  10304. </parameters>
  10305. </constructor>
  10306. <constructor name="new_for_address_finish"
  10307. c:identifier="g_dbus_connection_new_for_address_finish"
  10308. version="2.26"
  10309. throws="1">
  10310. <doc xml:space="preserve">Finishes an operation started with g_dbus_connection_new_for_address().</doc>
  10311. <return-value transfer-ownership="full">
  10312. <doc xml:space="preserve">a #GDBusConnection or %NULL if @error is set. Free with
  10313. g_object_unref().</doc>
  10314. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10315. </return-value>
  10316. <parameters>
  10317. <parameter name="res" transfer-ownership="none">
  10318. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback passed
  10319. to g_dbus_connection_new()</doc>
  10320. <type name="AsyncResult" c:type="GAsyncResult*"/>
  10321. </parameter>
  10322. </parameters>
  10323. </constructor>
  10324. <constructor name="new_for_address_sync"
  10325. c:identifier="g_dbus_connection_new_for_address_sync"
  10326. version="2.26"
  10327. throws="1">
  10328. <doc xml:space="preserve">Synchronously connects and sets up a D-Bus client connection for
  10329. exchanging D-Bus messages with an endpoint specified by @address
  10330. which must be in the D-Bus address format.
  10331. This constructor can only be used to initiate client-side
  10332. connections - use g_dbus_connection_new_sync() if you need to act
  10333. as the server. In particular, @flags cannot contain the
  10334. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
  10335. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
  10336. This is a synchronous failable constructor. See
  10337. g_dbus_connection_new_for_address() for the asynchronous version.
  10338. If @observer is not %NULL it may be used to control the
  10339. authentication process.</doc>
  10340. <return-value transfer-ownership="full">
  10341. <doc xml:space="preserve">a #GDBusConnection or %NULL if @error is set. Free with
  10342. g_object_unref().</doc>
  10343. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10344. </return-value>
  10345. <parameters>
  10346. <parameter name="address" transfer-ownership="none">
  10347. <doc xml:space="preserve">a D-Bus address</doc>
  10348. <type name="utf8" c:type="const gchar*"/>
  10349. </parameter>
  10350. <parameter name="flags" transfer-ownership="none">
  10351. <doc xml:space="preserve">flags describing how to make the connection</doc>
  10352. <type name="DBusConnectionFlags" c:type="GDBusConnectionFlags"/>
  10353. </parameter>
  10354. <parameter name="observer"
  10355. transfer-ownership="none"
  10356. nullable="1"
  10357. allow-none="1">
  10358. <doc xml:space="preserve">a #GDBusAuthObserver or %NULL</doc>
  10359. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  10360. </parameter>
  10361. <parameter name="cancellable"
  10362. transfer-ownership="none"
  10363. nullable="1"
  10364. allow-none="1">
  10365. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  10366. <type name="Cancellable" c:type="GCancellable*"/>
  10367. </parameter>
  10368. </parameters>
  10369. </constructor>
  10370. <constructor name="new_sync"
  10371. c:identifier="g_dbus_connection_new_sync"
  10372. version="2.26"
  10373. throws="1">
  10374. <doc xml:space="preserve">Synchronously sets up a D-Bus connection for exchanging D-Bus messages
  10375. with the end represented by @stream.
  10376. If @stream is a #GSocketConnection, then the corresponding #GSocket
  10377. will be put into non-blocking mode.
  10378. The D-Bus connection will interact with @stream from a worker thread.
  10379. As a result, the caller should not interact with @stream after this
  10380. method has been called, except by calling g_object_unref() on it.
  10381. If @observer is not %NULL it may be used to control the
  10382. authentication process.
  10383. This is a synchronous failable constructor. See
  10384. g_dbus_connection_new() for the asynchronous version.</doc>
  10385. <return-value transfer-ownership="full">
  10386. <doc xml:space="preserve">a #GDBusConnection or %NULL if @error is set. Free with g_object_unref().</doc>
  10387. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10388. </return-value>
  10389. <parameters>
  10390. <parameter name="stream" transfer-ownership="none">
  10391. <doc xml:space="preserve">a #GIOStream</doc>
  10392. <type name="IOStream" c:type="GIOStream*"/>
  10393. </parameter>
  10394. <parameter name="guid"
  10395. transfer-ownership="none"
  10396. nullable="1"
  10397. allow-none="1">
  10398. <doc xml:space="preserve">the GUID to use if a authenticating as a server or %NULL</doc>
  10399. <type name="utf8" c:type="const gchar*"/>
  10400. </parameter>
  10401. <parameter name="flags" transfer-ownership="none">
  10402. <doc xml:space="preserve">flags describing how to make the connection</doc>
  10403. <type name="DBusConnectionFlags" c:type="GDBusConnectionFlags"/>
  10404. </parameter>
  10405. <parameter name="observer"
  10406. transfer-ownership="none"
  10407. nullable="1"
  10408. allow-none="1">
  10409. <doc xml:space="preserve">a #GDBusAuthObserver or %NULL</doc>
  10410. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  10411. </parameter>
  10412. <parameter name="cancellable"
  10413. transfer-ownership="none"
  10414. nullable="1"
  10415. allow-none="1">
  10416. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  10417. <type name="Cancellable" c:type="GCancellable*"/>
  10418. </parameter>
  10419. </parameters>
  10420. </constructor>
  10421. <function name="new" c:identifier="g_dbus_connection_new" version="2.26">
  10422. <doc xml:space="preserve">Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
  10423. with the end represented by @stream.
  10424. If @stream is a #GSocketConnection, then the corresponding #GSocket
  10425. will be put into non-blocking mode.
  10426. The D-Bus connection will interact with @stream from a worker thread.
  10427. As a result, the caller should not interact with @stream after this
  10428. method has been called, except by calling g_object_unref() on it.
  10429. If @observer is not %NULL it may be used to control the
  10430. authentication process.
  10431. When the operation is finished, @callback will be invoked. You can
  10432. then call g_dbus_connection_new_finish() to get the result of the
  10433. operation.
  10434. This is a asynchronous failable constructor. See
  10435. g_dbus_connection_new_sync() for the synchronous
  10436. version.</doc>
  10437. <return-value transfer-ownership="none">
  10438. <type name="none" c:type="void"/>
  10439. </return-value>
  10440. <parameters>
  10441. <parameter name="stream" transfer-ownership="none">
  10442. <doc xml:space="preserve">a #GIOStream</doc>
  10443. <type name="IOStream" c:type="GIOStream*"/>
  10444. </parameter>
  10445. <parameter name="guid"
  10446. transfer-ownership="none"
  10447. nullable="1"
  10448. allow-none="1">
  10449. <doc xml:space="preserve">the GUID to use if a authenticating as a server or %NULL</doc>
  10450. <type name="utf8" c:type="const gchar*"/>
  10451. </parameter>
  10452. <parameter name="flags" transfer-ownership="none">
  10453. <doc xml:space="preserve">flags describing how to make the connection</doc>
  10454. <type name="DBusConnectionFlags" c:type="GDBusConnectionFlags"/>
  10455. </parameter>
  10456. <parameter name="observer"
  10457. transfer-ownership="none"
  10458. nullable="1"
  10459. allow-none="1">
  10460. <doc xml:space="preserve">a #GDBusAuthObserver or %NULL</doc>
  10461. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  10462. </parameter>
  10463. <parameter name="cancellable"
  10464. transfer-ownership="none"
  10465. nullable="1"
  10466. allow-none="1">
  10467. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  10468. <type name="Cancellable" c:type="GCancellable*"/>
  10469. </parameter>
  10470. <parameter name="callback"
  10471. transfer-ownership="none"
  10472. nullable="1"
  10473. allow-none="1"
  10474. scope="async"
  10475. closure="6">
  10476. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  10477. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  10478. </parameter>
  10479. <parameter name="user_data"
  10480. transfer-ownership="none"
  10481. nullable="1"
  10482. allow-none="1">
  10483. <doc xml:space="preserve">the data to pass to @callback</doc>
  10484. <type name="gpointer" c:type="gpointer"/>
  10485. </parameter>
  10486. </parameters>
  10487. </function>
  10488. <function name="new_for_address"
  10489. c:identifier="g_dbus_connection_new_for_address"
  10490. version="2.26">
  10491. <doc xml:space="preserve">Asynchronously connects and sets up a D-Bus client connection for
  10492. exchanging D-Bus messages with an endpoint specified by @address
  10493. which must be in the D-Bus address format.
  10494. This constructor can only be used to initiate client-side
  10495. connections - use g_dbus_connection_new() if you need to act as the
  10496. server. In particular, @flags cannot contain the
  10497. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
  10498. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
  10499. When the operation is finished, @callback will be invoked. You can
  10500. then call g_dbus_connection_new_finish() to get the result of the
  10501. operation.
  10502. If @observer is not %NULL it may be used to control the
  10503. authentication process.
  10504. This is a asynchronous failable constructor. See
  10505. g_dbus_connection_new_for_address_sync() for the synchronous
  10506. version.</doc>
  10507. <return-value transfer-ownership="none">
  10508. <type name="none" c:type="void"/>
  10509. </return-value>
  10510. <parameters>
  10511. <parameter name="address" transfer-ownership="none">
  10512. <doc xml:space="preserve">a D-Bus address</doc>
  10513. <type name="utf8" c:type="const gchar*"/>
  10514. </parameter>
  10515. <parameter name="flags" transfer-ownership="none">
  10516. <doc xml:space="preserve">flags describing how to make the connection</doc>
  10517. <type name="DBusConnectionFlags" c:type="GDBusConnectionFlags"/>
  10518. </parameter>
  10519. <parameter name="observer"
  10520. transfer-ownership="none"
  10521. nullable="1"
  10522. allow-none="1">
  10523. <doc xml:space="preserve">a #GDBusAuthObserver or %NULL</doc>
  10524. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  10525. </parameter>
  10526. <parameter name="cancellable"
  10527. transfer-ownership="none"
  10528. nullable="1"
  10529. allow-none="1">
  10530. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  10531. <type name="Cancellable" c:type="GCancellable*"/>
  10532. </parameter>
  10533. <parameter name="callback"
  10534. transfer-ownership="none"
  10535. nullable="1"
  10536. allow-none="1"
  10537. scope="async"
  10538. closure="5">
  10539. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  10540. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  10541. </parameter>
  10542. <parameter name="user_data"
  10543. transfer-ownership="none"
  10544. nullable="1"
  10545. allow-none="1">
  10546. <doc xml:space="preserve">the data to pass to @callback</doc>
  10547. <type name="gpointer" c:type="gpointer"/>
  10548. </parameter>
  10549. </parameters>
  10550. </function>
  10551. <method name="add_filter"
  10552. c:identifier="g_dbus_connection_add_filter"
  10553. version="2.26">
  10554. <doc xml:space="preserve">Adds a message filter. Filters are handlers that are run on all
  10555. incoming and outgoing messages, prior to standard dispatch. Filters
  10556. are run in the order that they were added. The same handler can be
  10557. added as a filter more than once, in which case it will be run more
  10558. than once. Filters added during a filter callback won't be run on
  10559. the message being processed. Filter functions are allowed to modify
  10560. and even drop messages.
  10561. Note that filters are run in a dedicated message handling thread so
  10562. they can't block and, generally, can't do anything but signal a
  10563. worker thread. Also note that filters are rarely needed - use API
  10564. such as g_dbus_connection_send_message_with_reply(),
  10565. g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.
  10566. If a filter consumes an incoming message the message is not
  10567. dispatched anywhere else - not even the standard dispatch machinery
  10568. (that API such as g_dbus_connection_signal_subscribe() and
  10569. g_dbus_connection_send_message_with_reply() relies on) will see the
  10570. message. Similary, if a filter consumes an outgoing message, the
  10571. message will not be sent to the other peer.
  10572. If @user_data_free_func is non-%NULL, it will be called (in the
  10573. thread-default main context of the thread you are calling this
  10574. method from) at some point after @user_data is no longer
  10575. needed. (It is not guaranteed to be called synchronously when the
  10576. filter is removed, and may be called after @connection has been
  10577. destroyed.)</doc>
  10578. <return-value transfer-ownership="none">
  10579. <doc xml:space="preserve">a filter identifier that can be used with
  10580. g_dbus_connection_remove_filter()</doc>
  10581. <type name="guint" c:type="guint"/>
  10582. </return-value>
  10583. <parameters>
  10584. <instance-parameter name="connection" transfer-ownership="none">
  10585. <doc xml:space="preserve">a #GDBusConnection</doc>
  10586. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10587. </instance-parameter>
  10588. <parameter name="filter_function"
  10589. transfer-ownership="none"
  10590. scope="notified"
  10591. closure="1"
  10592. destroy="2">
  10593. <doc xml:space="preserve">a filter function</doc>
  10594. <type name="DBusMessageFilterFunction"
  10595. c:type="GDBusMessageFilterFunction"/>
  10596. </parameter>
  10597. <parameter name="user_data"
  10598. transfer-ownership="none"
  10599. nullable="1"
  10600. allow-none="1">
  10601. <doc xml:space="preserve">user data to pass to @filter_function</doc>
  10602. <type name="gpointer" c:type="gpointer"/>
  10603. </parameter>
  10604. <parameter name="user_data_free_func"
  10605. transfer-ownership="none"
  10606. scope="async">
  10607. <doc xml:space="preserve">function to free @user_data with when filter
  10608. is removed or %NULL</doc>
  10609. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  10610. </parameter>
  10611. </parameters>
  10612. </method>
  10613. <method name="call" c:identifier="g_dbus_connection_call" version="2.26">
  10614. <doc xml:space="preserve">Asynchronously invokes the @method_name method on the
  10615. @interface_name D-Bus interface on the remote object at
  10616. @object_path owned by @bus_name.
  10617. If @connection is closed then the operation will fail with
  10618. %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
  10619. fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
  10620. not compatible with the D-Bus protocol, the operation fails with
  10621. %G_IO_ERROR_INVALID_ARGUMENT.
  10622. If @reply_type is non-%NULL then the reply will be checked for having this type and an
  10623. error will be raised if it does not match. Said another way, if you give a @reply_type
  10624. then any non-%NULL return value will be of this type.
  10625. If the @parameters #GVariant is floating, it is consumed. This allows
  10626. convenient 'inline' use of g_variant_new(), e.g.:
  10627. |[&lt;!-- language="C" --&gt;
  10628. g_dbus_connection_call (connection,
  10629. "org.freedesktop.StringThings",
  10630. "/org/freedesktop/StringThings",
  10631. "org.freedesktop.StringThings",
  10632. "TwoStrings",
  10633. g_variant_new ("(ss)",
  10634. "Thing One",
  10635. "Thing Two"),
  10636. NULL,
  10637. G_DBUS_CALL_FLAGS_NONE,
  10638. -1,
  10639. NULL,
  10640. (GAsyncReadyCallback) two_strings_done,
  10641. NULL);
  10642. ]|
  10643. This is an asynchronous method. When the operation is finished,
  10644. @callback will be invoked in the
  10645. [thread-default main context][g-main-context-push-thread-default]
  10646. of the thread you are calling this method from. You can then call
  10647. g_dbus_connection_call_finish() to get the result of the operation.
  10648. See g_dbus_connection_call_sync() for the synchronous version of this
  10649. function.
  10650. If @callback is %NULL then the D-Bus method call message will be sent with
  10651. the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.</doc>
  10652. <return-value transfer-ownership="none">
  10653. <type name="none" c:type="void"/>
  10654. </return-value>
  10655. <parameters>
  10656. <instance-parameter name="connection" transfer-ownership="none">
  10657. <doc xml:space="preserve">a #GDBusConnection</doc>
  10658. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10659. </instance-parameter>
  10660. <parameter name="bus_name"
  10661. transfer-ownership="none"
  10662. nullable="1"
  10663. allow-none="1">
  10664. <doc xml:space="preserve">a unique or well-known bus name or %NULL if
  10665. @connection is not a message bus connection</doc>
  10666. <type name="utf8" c:type="const gchar*"/>
  10667. </parameter>
  10668. <parameter name="object_path" transfer-ownership="none">
  10669. <doc xml:space="preserve">path of remote object</doc>
  10670. <type name="utf8" c:type="const gchar*"/>
  10671. </parameter>
  10672. <parameter name="interface_name" transfer-ownership="none">
  10673. <doc xml:space="preserve">D-Bus interface to invoke method on</doc>
  10674. <type name="utf8" c:type="const gchar*"/>
  10675. </parameter>
  10676. <parameter name="method_name" transfer-ownership="none">
  10677. <doc xml:space="preserve">the name of the method to invoke</doc>
  10678. <type name="utf8" c:type="const gchar*"/>
  10679. </parameter>
  10680. <parameter name="parameters"
  10681. transfer-ownership="none"
  10682. nullable="1"
  10683. allow-none="1">
  10684. <doc xml:space="preserve">a #GVariant tuple with parameters for the method
  10685. or %NULL if not passing parameters</doc>
  10686. <type name="GLib.Variant" c:type="GVariant*"/>
  10687. </parameter>
  10688. <parameter name="reply_type"
  10689. transfer-ownership="none"
  10690. nullable="1"
  10691. allow-none="1">
  10692. <doc xml:space="preserve">the expected type of the reply, or %NULL</doc>
  10693. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  10694. </parameter>
  10695. <parameter name="flags" transfer-ownership="none">
  10696. <doc xml:space="preserve">flags from the #GDBusCallFlags enumeration</doc>
  10697. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  10698. </parameter>
  10699. <parameter name="timeout_msec" transfer-ownership="none">
  10700. <doc xml:space="preserve">the timeout in milliseconds, -1 to use the default
  10701. timeout or %G_MAXINT for no timeout</doc>
  10702. <type name="gint" c:type="gint"/>
  10703. </parameter>
  10704. <parameter name="cancellable"
  10705. transfer-ownership="none"
  10706. nullable="1"
  10707. allow-none="1">
  10708. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  10709. <type name="Cancellable" c:type="GCancellable*"/>
  10710. </parameter>
  10711. <parameter name="callback"
  10712. transfer-ownership="none"
  10713. nullable="1"
  10714. allow-none="1"
  10715. scope="async"
  10716. closure="10">
  10717. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request
  10718. is satisfied or %NULL if you don't care about the result of the
  10719. method invocation</doc>
  10720. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  10721. </parameter>
  10722. <parameter name="user_data"
  10723. transfer-ownership="none"
  10724. nullable="1"
  10725. allow-none="1">
  10726. <doc xml:space="preserve">the data to pass to @callback</doc>
  10727. <type name="gpointer" c:type="gpointer"/>
  10728. </parameter>
  10729. </parameters>
  10730. </method>
  10731. <method name="call_finish"
  10732. c:identifier="g_dbus_connection_call_finish"
  10733. version="2.26"
  10734. throws="1">
  10735. <doc xml:space="preserve">Finishes an operation started with g_dbus_connection_call().</doc>
  10736. <return-value transfer-ownership="full">
  10737. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  10738. return values. Free with g_variant_unref().</doc>
  10739. <type name="GLib.Variant" c:type="GVariant*"/>
  10740. </return-value>
  10741. <parameters>
  10742. <instance-parameter name="connection" transfer-ownership="none">
  10743. <doc xml:space="preserve">a #GDBusConnection</doc>
  10744. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10745. </instance-parameter>
  10746. <parameter name="res" transfer-ownership="none">
  10747. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call()</doc>
  10748. <type name="AsyncResult" c:type="GAsyncResult*"/>
  10749. </parameter>
  10750. </parameters>
  10751. </method>
  10752. <method name="call_sync"
  10753. c:identifier="g_dbus_connection_call_sync"
  10754. version="2.26"
  10755. throws="1">
  10756. <doc xml:space="preserve">Synchronously invokes the @method_name method on the
  10757. @interface_name D-Bus interface on the remote object at
  10758. @object_path owned by @bus_name.
  10759. If @connection is closed then the operation will fail with
  10760. %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
  10761. operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
  10762. contains a value not compatible with the D-Bus protocol, the operation
  10763. fails with %G_IO_ERROR_INVALID_ARGUMENT.
  10764. If @reply_type is non-%NULL then the reply will be checked for having
  10765. this type and an error will be raised if it does not match. Said
  10766. another way, if you give a @reply_type then any non-%NULL return
  10767. value will be of this type.
  10768. If the @parameters #GVariant is floating, it is consumed.
  10769. This allows convenient 'inline' use of g_variant_new(), e.g.:
  10770. |[&lt;!-- language="C" --&gt;
  10771. g_dbus_connection_call_sync (connection,
  10772. "org.freedesktop.StringThings",
  10773. "/org/freedesktop/StringThings",
  10774. "org.freedesktop.StringThings",
  10775. "TwoStrings",
  10776. g_variant_new ("(ss)",
  10777. "Thing One",
  10778. "Thing Two"),
  10779. NULL,
  10780. G_DBUS_CALL_FLAGS_NONE,
  10781. -1,
  10782. NULL,
  10783. &amp;error);
  10784. ]|
  10785. The calling thread is blocked until a reply is received. See
  10786. g_dbus_connection_call() for the asynchronous version of
  10787. this method.</doc>
  10788. <return-value transfer-ownership="full">
  10789. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  10790. return values. Free with g_variant_unref().</doc>
  10791. <type name="GLib.Variant" c:type="GVariant*"/>
  10792. </return-value>
  10793. <parameters>
  10794. <instance-parameter name="connection" transfer-ownership="none">
  10795. <doc xml:space="preserve">a #GDBusConnection</doc>
  10796. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10797. </instance-parameter>
  10798. <parameter name="bus_name"
  10799. transfer-ownership="none"
  10800. nullable="1"
  10801. allow-none="1">
  10802. <doc xml:space="preserve">a unique or well-known bus name or %NULL if
  10803. @connection is not a message bus connection</doc>
  10804. <type name="utf8" c:type="const gchar*"/>
  10805. </parameter>
  10806. <parameter name="object_path" transfer-ownership="none">
  10807. <doc xml:space="preserve">path of remote object</doc>
  10808. <type name="utf8" c:type="const gchar*"/>
  10809. </parameter>
  10810. <parameter name="interface_name" transfer-ownership="none">
  10811. <doc xml:space="preserve">D-Bus interface to invoke method on</doc>
  10812. <type name="utf8" c:type="const gchar*"/>
  10813. </parameter>
  10814. <parameter name="method_name" transfer-ownership="none">
  10815. <doc xml:space="preserve">the name of the method to invoke</doc>
  10816. <type name="utf8" c:type="const gchar*"/>
  10817. </parameter>
  10818. <parameter name="parameters"
  10819. transfer-ownership="none"
  10820. nullable="1"
  10821. allow-none="1">
  10822. <doc xml:space="preserve">a #GVariant tuple with parameters for the method
  10823. or %NULL if not passing parameters</doc>
  10824. <type name="GLib.Variant" c:type="GVariant*"/>
  10825. </parameter>
  10826. <parameter name="reply_type"
  10827. transfer-ownership="none"
  10828. nullable="1"
  10829. allow-none="1">
  10830. <doc xml:space="preserve">the expected type of the reply, or %NULL</doc>
  10831. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  10832. </parameter>
  10833. <parameter name="flags" transfer-ownership="none">
  10834. <doc xml:space="preserve">flags from the #GDBusCallFlags enumeration</doc>
  10835. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  10836. </parameter>
  10837. <parameter name="timeout_msec" transfer-ownership="none">
  10838. <doc xml:space="preserve">the timeout in milliseconds, -1 to use the default
  10839. timeout or %G_MAXINT for no timeout</doc>
  10840. <type name="gint" c:type="gint"/>
  10841. </parameter>
  10842. <parameter name="cancellable"
  10843. transfer-ownership="none"
  10844. nullable="1"
  10845. allow-none="1">
  10846. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  10847. <type name="Cancellable" c:type="GCancellable*"/>
  10848. </parameter>
  10849. </parameters>
  10850. </method>
  10851. <method name="call_with_unix_fd_list"
  10852. c:identifier="g_dbus_connection_call_with_unix_fd_list"
  10853. version="2.30">
  10854. <doc xml:space="preserve">Like g_dbus_connection_call() but also takes a #GUnixFDList object.
  10855. This method is only available on UNIX.</doc>
  10856. <return-value transfer-ownership="none">
  10857. <type name="none" c:type="void"/>
  10858. </return-value>
  10859. <parameters>
  10860. <instance-parameter name="connection" transfer-ownership="none">
  10861. <doc xml:space="preserve">a #GDBusConnection</doc>
  10862. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10863. </instance-parameter>
  10864. <parameter name="bus_name"
  10865. transfer-ownership="none"
  10866. nullable="1"
  10867. allow-none="1">
  10868. <doc xml:space="preserve">a unique or well-known bus name or %NULL if
  10869. @connection is not a message bus connection</doc>
  10870. <type name="utf8" c:type="const gchar*"/>
  10871. </parameter>
  10872. <parameter name="object_path" transfer-ownership="none">
  10873. <doc xml:space="preserve">path of remote object</doc>
  10874. <type name="utf8" c:type="const gchar*"/>
  10875. </parameter>
  10876. <parameter name="interface_name" transfer-ownership="none">
  10877. <doc xml:space="preserve">D-Bus interface to invoke method on</doc>
  10878. <type name="utf8" c:type="const gchar*"/>
  10879. </parameter>
  10880. <parameter name="method_name" transfer-ownership="none">
  10881. <doc xml:space="preserve">the name of the method to invoke</doc>
  10882. <type name="utf8" c:type="const gchar*"/>
  10883. </parameter>
  10884. <parameter name="parameters"
  10885. transfer-ownership="none"
  10886. nullable="1"
  10887. allow-none="1">
  10888. <doc xml:space="preserve">a #GVariant tuple with parameters for the method
  10889. or %NULL if not passing parameters</doc>
  10890. <type name="GLib.Variant" c:type="GVariant*"/>
  10891. </parameter>
  10892. <parameter name="reply_type"
  10893. transfer-ownership="none"
  10894. nullable="1"
  10895. allow-none="1">
  10896. <doc xml:space="preserve">the expected type of the reply, or %NULL</doc>
  10897. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  10898. </parameter>
  10899. <parameter name="flags" transfer-ownership="none">
  10900. <doc xml:space="preserve">flags from the #GDBusCallFlags enumeration</doc>
  10901. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  10902. </parameter>
  10903. <parameter name="timeout_msec" transfer-ownership="none">
  10904. <doc xml:space="preserve">the timeout in milliseconds, -1 to use the default
  10905. timeout or %G_MAXINT for no timeout</doc>
  10906. <type name="gint" c:type="gint"/>
  10907. </parameter>
  10908. <parameter name="fd_list"
  10909. transfer-ownership="none"
  10910. nullable="1"
  10911. allow-none="1">
  10912. <doc xml:space="preserve">a #GUnixFDList or %NULL</doc>
  10913. <type name="UnixFDList" c:type="GUnixFDList*"/>
  10914. </parameter>
  10915. <parameter name="cancellable"
  10916. transfer-ownership="none"
  10917. nullable="1"
  10918. allow-none="1">
  10919. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  10920. <type name="Cancellable" c:type="GCancellable*"/>
  10921. </parameter>
  10922. <parameter name="callback"
  10923. transfer-ownership="none"
  10924. nullable="1"
  10925. allow-none="1"
  10926. scope="async"
  10927. closure="11">
  10928. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is
  10929. satisfied or %NULL if you don't * care about the result of the
  10930. method invocation</doc>
  10931. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  10932. </parameter>
  10933. <parameter name="user_data"
  10934. transfer-ownership="none"
  10935. nullable="1"
  10936. allow-none="1">
  10937. <doc xml:space="preserve">The data to pass to @callback.</doc>
  10938. <type name="gpointer" c:type="gpointer"/>
  10939. </parameter>
  10940. </parameters>
  10941. </method>
  10942. <method name="call_with_unix_fd_list_finish"
  10943. c:identifier="g_dbus_connection_call_with_unix_fd_list_finish"
  10944. version="2.30"
  10945. throws="1">
  10946. <doc xml:space="preserve">Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().</doc>
  10947. <return-value transfer-ownership="full">
  10948. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  10949. return values. Free with g_variant_unref().</doc>
  10950. <type name="GLib.Variant" c:type="GVariant*"/>
  10951. </return-value>
  10952. <parameters>
  10953. <instance-parameter name="connection" transfer-ownership="none">
  10954. <doc xml:space="preserve">a #GDBusConnection</doc>
  10955. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10956. </instance-parameter>
  10957. <parameter name="out_fd_list"
  10958. direction="out"
  10959. caller-allocates="0"
  10960. transfer-ownership="full"
  10961. optional="1"
  10962. allow-none="1">
  10963. <doc xml:space="preserve">return location for a #GUnixFDList or %NULL</doc>
  10964. <type name="UnixFDList" c:type="GUnixFDList**"/>
  10965. </parameter>
  10966. <parameter name="res" transfer-ownership="none">
  10967. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback passed to
  10968. g_dbus_connection_call_with_unix_fd_list()</doc>
  10969. <type name="AsyncResult" c:type="GAsyncResult*"/>
  10970. </parameter>
  10971. </parameters>
  10972. </method>
  10973. <method name="call_with_unix_fd_list_sync"
  10974. c:identifier="g_dbus_connection_call_with_unix_fd_list_sync"
  10975. version="2.30"
  10976. throws="1">
  10977. <doc xml:space="preserve">Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.
  10978. This method is only available on UNIX.</doc>
  10979. <return-value transfer-ownership="full">
  10980. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  10981. return values. Free with g_variant_unref().</doc>
  10982. <type name="GLib.Variant" c:type="GVariant*"/>
  10983. </return-value>
  10984. <parameters>
  10985. <instance-parameter name="connection" transfer-ownership="none">
  10986. <doc xml:space="preserve">a #GDBusConnection</doc>
  10987. <type name="DBusConnection" c:type="GDBusConnection*"/>
  10988. </instance-parameter>
  10989. <parameter name="bus_name"
  10990. transfer-ownership="none"
  10991. nullable="1"
  10992. allow-none="1">
  10993. <doc xml:space="preserve">a unique or well-known bus name or %NULL
  10994. if @connection is not a message bus connection</doc>
  10995. <type name="utf8" c:type="const gchar*"/>
  10996. </parameter>
  10997. <parameter name="object_path" transfer-ownership="none">
  10998. <doc xml:space="preserve">path of remote object</doc>
  10999. <type name="utf8" c:type="const gchar*"/>
  11000. </parameter>
  11001. <parameter name="interface_name" transfer-ownership="none">
  11002. <doc xml:space="preserve">D-Bus interface to invoke method on</doc>
  11003. <type name="utf8" c:type="const gchar*"/>
  11004. </parameter>
  11005. <parameter name="method_name" transfer-ownership="none">
  11006. <doc xml:space="preserve">the name of the method to invoke</doc>
  11007. <type name="utf8" c:type="const gchar*"/>
  11008. </parameter>
  11009. <parameter name="parameters"
  11010. transfer-ownership="none"
  11011. nullable="1"
  11012. allow-none="1">
  11013. <doc xml:space="preserve">a #GVariant tuple with parameters for
  11014. the method or %NULL if not passing parameters</doc>
  11015. <type name="GLib.Variant" c:type="GVariant*"/>
  11016. </parameter>
  11017. <parameter name="reply_type"
  11018. transfer-ownership="none"
  11019. nullable="1"
  11020. allow-none="1">
  11021. <doc xml:space="preserve">the expected type of the reply, or %NULL</doc>
  11022. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  11023. </parameter>
  11024. <parameter name="flags" transfer-ownership="none">
  11025. <doc xml:space="preserve">flags from the #GDBusCallFlags enumeration</doc>
  11026. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  11027. </parameter>
  11028. <parameter name="timeout_msec" transfer-ownership="none">
  11029. <doc xml:space="preserve">the timeout in milliseconds, -1 to use the default
  11030. timeout or %G_MAXINT for no timeout</doc>
  11031. <type name="gint" c:type="gint"/>
  11032. </parameter>
  11033. <parameter name="fd_list"
  11034. transfer-ownership="none"
  11035. nullable="1"
  11036. allow-none="1">
  11037. <doc xml:space="preserve">a #GUnixFDList or %NULL</doc>
  11038. <type name="UnixFDList" c:type="GUnixFDList*"/>
  11039. </parameter>
  11040. <parameter name="out_fd_list"
  11041. direction="out"
  11042. caller-allocates="0"
  11043. transfer-ownership="full"
  11044. optional="1"
  11045. allow-none="1">
  11046. <doc xml:space="preserve">return location for a #GUnixFDList or %NULL</doc>
  11047. <type name="UnixFDList" c:type="GUnixFDList**"/>
  11048. </parameter>
  11049. <parameter name="cancellable"
  11050. transfer-ownership="none"
  11051. nullable="1"
  11052. allow-none="1">
  11053. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  11054. <type name="Cancellable" c:type="GCancellable*"/>
  11055. </parameter>
  11056. </parameters>
  11057. </method>
  11058. <method name="close"
  11059. c:identifier="g_dbus_connection_close"
  11060. version="2.26">
  11061. <doc xml:space="preserve">Closes @connection. Note that this never causes the process to
  11062. exit (this might only happen if the other end of a shared message
  11063. bus connection disconnects, see #GDBusConnection:exit-on-close).
  11064. Once the connection is closed, operations such as sending a message
  11065. will return with the error %G_IO_ERROR_CLOSED. Closing a connection
  11066. will not automatically flush the connection so queued messages may
  11067. be lost. Use g_dbus_connection_flush() if you need such guarantees.
  11068. If @connection is already closed, this method fails with
  11069. %G_IO_ERROR_CLOSED.
  11070. When @connection has been closed, the #GDBusConnection::closed
  11071. signal is emitted in the
  11072. [thread-default main context][g-main-context-push-thread-default]
  11073. of the thread that @connection was constructed in.
  11074. This is an asynchronous method. When the operation is finished,
  11075. @callback will be invoked in the
  11076. [thread-default main context][g-main-context-push-thread-default]
  11077. of the thread you are calling this method from. You can
  11078. then call g_dbus_connection_close_finish() to get the result of the
  11079. operation. See g_dbus_connection_close_sync() for the synchronous
  11080. version.</doc>
  11081. <return-value transfer-ownership="none">
  11082. <type name="none" c:type="void"/>
  11083. </return-value>
  11084. <parameters>
  11085. <instance-parameter name="connection" transfer-ownership="none">
  11086. <doc xml:space="preserve">a #GDBusConnection</doc>
  11087. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11088. </instance-parameter>
  11089. <parameter name="cancellable"
  11090. transfer-ownership="none"
  11091. nullable="1"
  11092. allow-none="1">
  11093. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  11094. <type name="Cancellable" c:type="GCancellable*"/>
  11095. </parameter>
  11096. <parameter name="callback"
  11097. transfer-ownership="none"
  11098. nullable="1"
  11099. allow-none="1"
  11100. scope="async"
  11101. closure="2">
  11102. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is
  11103. satisfied or %NULL if you don't care about the result</doc>
  11104. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  11105. </parameter>
  11106. <parameter name="user_data"
  11107. transfer-ownership="none"
  11108. nullable="1"
  11109. allow-none="1">
  11110. <doc xml:space="preserve">The data to pass to @callback</doc>
  11111. <type name="gpointer" c:type="gpointer"/>
  11112. </parameter>
  11113. </parameters>
  11114. </method>
  11115. <method name="close_finish"
  11116. c:identifier="g_dbus_connection_close_finish"
  11117. version="2.26"
  11118. throws="1">
  11119. <doc xml:space="preserve">Finishes an operation started with g_dbus_connection_close().</doc>
  11120. <return-value transfer-ownership="none">
  11121. <doc xml:space="preserve">%TRUE if the operation succeeded, %FALSE if @error is set</doc>
  11122. <type name="gboolean" c:type="gboolean"/>
  11123. </return-value>
  11124. <parameters>
  11125. <instance-parameter name="connection" transfer-ownership="none">
  11126. <doc xml:space="preserve">a #GDBusConnection</doc>
  11127. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11128. </instance-parameter>
  11129. <parameter name="res" transfer-ownership="none">
  11130. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback passed
  11131. to g_dbus_connection_close()</doc>
  11132. <type name="AsyncResult" c:type="GAsyncResult*"/>
  11133. </parameter>
  11134. </parameters>
  11135. </method>
  11136. <method name="close_sync"
  11137. c:identifier="g_dbus_connection_close_sync"
  11138. version="2.26"
  11139. throws="1">
  11140. <doc xml:space="preserve">Synchronously closees @connection. The calling thread is blocked
  11141. until this is done. See g_dbus_connection_close() for the
  11142. asynchronous version of this method and more details about what it
  11143. does.</doc>
  11144. <return-value transfer-ownership="none">
  11145. <doc xml:space="preserve">%TRUE if the operation succeeded, %FALSE if @error is set</doc>
  11146. <type name="gboolean" c:type="gboolean"/>
  11147. </return-value>
  11148. <parameters>
  11149. <instance-parameter name="connection" transfer-ownership="none">
  11150. <doc xml:space="preserve">a #GDBusConnection</doc>
  11151. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11152. </instance-parameter>
  11153. <parameter name="cancellable"
  11154. transfer-ownership="none"
  11155. nullable="1"
  11156. allow-none="1">
  11157. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  11158. <type name="Cancellable" c:type="GCancellable*"/>
  11159. </parameter>
  11160. </parameters>
  11161. </method>
  11162. <method name="emit_signal"
  11163. c:identifier="g_dbus_connection_emit_signal"
  11164. version="2.26"
  11165. throws="1">
  11166. <doc xml:space="preserve">Emits a signal.
  11167. If the parameters GVariant is floating, it is consumed.
  11168. This can only fail if @parameters is not compatible with the D-Bus protocol.</doc>
  11169. <return-value transfer-ownership="none">
  11170. <doc xml:space="preserve">%TRUE unless @error is set</doc>
  11171. <type name="gboolean" c:type="gboolean"/>
  11172. </return-value>
  11173. <parameters>
  11174. <instance-parameter name="connection" transfer-ownership="none">
  11175. <doc xml:space="preserve">a #GDBusConnection</doc>
  11176. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11177. </instance-parameter>
  11178. <parameter name="destination_bus_name"
  11179. transfer-ownership="none"
  11180. nullable="1"
  11181. allow-none="1">
  11182. <doc xml:space="preserve">the unique bus name for the destination
  11183. for the signal or %NULL to emit to all listeners</doc>
  11184. <type name="utf8" c:type="const gchar*"/>
  11185. </parameter>
  11186. <parameter name="object_path" transfer-ownership="none">
  11187. <doc xml:space="preserve">path of remote object</doc>
  11188. <type name="utf8" c:type="const gchar*"/>
  11189. </parameter>
  11190. <parameter name="interface_name" transfer-ownership="none">
  11191. <doc xml:space="preserve">D-Bus interface to emit a signal on</doc>
  11192. <type name="utf8" c:type="const gchar*"/>
  11193. </parameter>
  11194. <parameter name="signal_name" transfer-ownership="none">
  11195. <doc xml:space="preserve">the name of the signal to emit</doc>
  11196. <type name="utf8" c:type="const gchar*"/>
  11197. </parameter>
  11198. <parameter name="parameters"
  11199. transfer-ownership="none"
  11200. nullable="1"
  11201. allow-none="1">
  11202. <doc xml:space="preserve">a #GVariant tuple with parameters for the signal
  11203. or %NULL if not passing parameters</doc>
  11204. <type name="GLib.Variant" c:type="GVariant*"/>
  11205. </parameter>
  11206. </parameters>
  11207. </method>
  11208. <method name="export_action_group"
  11209. c:identifier="g_dbus_connection_export_action_group"
  11210. version="2.32"
  11211. throws="1">
  11212. <doc xml:space="preserve">Exports @action_group on @connection at @object_path.
  11213. The implemented D-Bus API should be considered private. It is
  11214. subject to change in the future.
  11215. A given object path can only have one action group exported on it.
  11216. If this constraint is violated, the export will fail and 0 will be
  11217. returned (with @error set accordingly).
  11218. You can unexport the action group using
  11219. g_dbus_connection_unexport_action_group() with the return value of
  11220. this function.
  11221. The thread default main context is taken at the time of this call.
  11222. All incoming action activations and state change requests are
  11223. reported from this context. Any changes on the action group that
  11224. cause it to emit signals must also come from this same context.
  11225. Since incoming action activations and state change requests are
  11226. rather likely to cause changes on the action group, this effectively
  11227. limits a given action group to being exported from only one main
  11228. context.</doc>
  11229. <return-value transfer-ownership="none">
  11230. <doc xml:space="preserve">the ID of the export (never zero), or 0 in case of failure</doc>
  11231. <type name="guint" c:type="guint"/>
  11232. </return-value>
  11233. <parameters>
  11234. <instance-parameter name="connection" transfer-ownership="none">
  11235. <doc xml:space="preserve">a #GDBusConnection</doc>
  11236. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11237. </instance-parameter>
  11238. <parameter name="object_path" transfer-ownership="none">
  11239. <doc xml:space="preserve">a D-Bus object path</doc>
  11240. <type name="utf8" c:type="const gchar*"/>
  11241. </parameter>
  11242. <parameter name="action_group" transfer-ownership="none">
  11243. <doc xml:space="preserve">a #GActionGroup</doc>
  11244. <type name="ActionGroup" c:type="GActionGroup*"/>
  11245. </parameter>
  11246. </parameters>
  11247. </method>
  11248. <method name="export_menu_model"
  11249. c:identifier="g_dbus_connection_export_menu_model"
  11250. version="2.32"
  11251. throws="1">
  11252. <doc xml:space="preserve">Exports @menu on @connection at @object_path.
  11253. The implemented D-Bus API should be considered private.
  11254. It is subject to change in the future.
  11255. An object path can only have one menu model exported on it. If this
  11256. constraint is violated, the export will fail and 0 will be
  11257. returned (with @error set accordingly).
  11258. You can unexport the menu model using
  11259. g_dbus_connection_unexport_menu_model() with the return value of
  11260. this function.</doc>
  11261. <return-value transfer-ownership="none">
  11262. <doc xml:space="preserve">the ID of the export (never zero), or 0 in case of failure</doc>
  11263. <type name="guint" c:type="guint"/>
  11264. </return-value>
  11265. <parameters>
  11266. <instance-parameter name="connection" transfer-ownership="none">
  11267. <doc xml:space="preserve">a #GDBusConnection</doc>
  11268. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11269. </instance-parameter>
  11270. <parameter name="object_path" transfer-ownership="none">
  11271. <doc xml:space="preserve">a D-Bus object path</doc>
  11272. <type name="utf8" c:type="const gchar*"/>
  11273. </parameter>
  11274. <parameter name="menu" transfer-ownership="none">
  11275. <doc xml:space="preserve">a #GMenuModel</doc>
  11276. <type name="MenuModel" c:type="GMenuModel*"/>
  11277. </parameter>
  11278. </parameters>
  11279. </method>
  11280. <method name="flush"
  11281. c:identifier="g_dbus_connection_flush"
  11282. version="2.26">
  11283. <doc xml:space="preserve">Asynchronously flushes @connection, that is, writes all queued
  11284. outgoing message to the transport and then flushes the transport
  11285. (using g_output_stream_flush_async()). This is useful in programs
  11286. that wants to emit a D-Bus signal and then exit immediately. Without
  11287. flushing the connection, there is no guaranteed that the message has
  11288. been sent to the networking buffers in the OS kernel.
  11289. This is an asynchronous method. When the operation is finished,
  11290. @callback will be invoked in the
  11291. [thread-default main context][g-main-context-push-thread-default]
  11292. of the thread you are calling this method from. You can
  11293. then call g_dbus_connection_flush_finish() to get the result of the
  11294. operation. See g_dbus_connection_flush_sync() for the synchronous
  11295. version.</doc>
  11296. <return-value transfer-ownership="none">
  11297. <type name="none" c:type="void"/>
  11298. </return-value>
  11299. <parameters>
  11300. <instance-parameter name="connection" transfer-ownership="none">
  11301. <doc xml:space="preserve">a #GDBusConnection</doc>
  11302. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11303. </instance-parameter>
  11304. <parameter name="cancellable"
  11305. transfer-ownership="none"
  11306. nullable="1"
  11307. allow-none="1">
  11308. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  11309. <type name="Cancellable" c:type="GCancellable*"/>
  11310. </parameter>
  11311. <parameter name="callback"
  11312. transfer-ownership="none"
  11313. nullable="1"
  11314. allow-none="1"
  11315. scope="async"
  11316. closure="2">
  11317. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  11318. request is satisfied or %NULL if you don't care about the result</doc>
  11319. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  11320. </parameter>
  11321. <parameter name="user_data"
  11322. transfer-ownership="none"
  11323. nullable="1"
  11324. allow-none="1">
  11325. <doc xml:space="preserve">The data to pass to @callback</doc>
  11326. <type name="gpointer" c:type="gpointer"/>
  11327. </parameter>
  11328. </parameters>
  11329. </method>
  11330. <method name="flush_finish"
  11331. c:identifier="g_dbus_connection_flush_finish"
  11332. version="2.26"
  11333. throws="1">
  11334. <doc xml:space="preserve">Finishes an operation started with g_dbus_connection_flush().</doc>
  11335. <return-value transfer-ownership="none">
  11336. <doc xml:space="preserve">%TRUE if the operation succeeded, %FALSE if @error is set</doc>
  11337. <type name="gboolean" c:type="gboolean"/>
  11338. </return-value>
  11339. <parameters>
  11340. <instance-parameter name="connection" transfer-ownership="none">
  11341. <doc xml:space="preserve">a #GDBusConnection</doc>
  11342. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11343. </instance-parameter>
  11344. <parameter name="res" transfer-ownership="none">
  11345. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback passed
  11346. to g_dbus_connection_flush()</doc>
  11347. <type name="AsyncResult" c:type="GAsyncResult*"/>
  11348. </parameter>
  11349. </parameters>
  11350. </method>
  11351. <method name="flush_sync"
  11352. c:identifier="g_dbus_connection_flush_sync"
  11353. version="2.26"
  11354. throws="1">
  11355. <doc xml:space="preserve">Synchronously flushes @connection. The calling thread is blocked
  11356. until this is done. See g_dbus_connection_flush() for the
  11357. asynchronous version of this method and more details about what it
  11358. does.</doc>
  11359. <return-value transfer-ownership="none">
  11360. <doc xml:space="preserve">%TRUE if the operation succeeded, %FALSE if @error is set</doc>
  11361. <type name="gboolean" c:type="gboolean"/>
  11362. </return-value>
  11363. <parameters>
  11364. <instance-parameter name="connection" transfer-ownership="none">
  11365. <doc xml:space="preserve">a #GDBusConnection</doc>
  11366. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11367. </instance-parameter>
  11368. <parameter name="cancellable"
  11369. transfer-ownership="none"
  11370. nullable="1"
  11371. allow-none="1">
  11372. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  11373. <type name="Cancellable" c:type="GCancellable*"/>
  11374. </parameter>
  11375. </parameters>
  11376. </method>
  11377. <method name="get_capabilities"
  11378. c:identifier="g_dbus_connection_get_capabilities"
  11379. version="2.26">
  11380. <doc xml:space="preserve">Gets the capabilities negotiated with the remote peer</doc>
  11381. <return-value transfer-ownership="none">
  11382. <doc xml:space="preserve">zero or more flags from the #GDBusCapabilityFlags enumeration</doc>
  11383. <type name="DBusCapabilityFlags" c:type="GDBusCapabilityFlags"/>
  11384. </return-value>
  11385. <parameters>
  11386. <instance-parameter name="connection" transfer-ownership="none">
  11387. <doc xml:space="preserve">a #GDBusConnection</doc>
  11388. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11389. </instance-parameter>
  11390. </parameters>
  11391. </method>
  11392. <method name="get_exit_on_close"
  11393. c:identifier="g_dbus_connection_get_exit_on_close"
  11394. version="2.26">
  11395. <doc xml:space="preserve">Gets whether the process is terminated when @connection is
  11396. closed by the remote peer. See
  11397. #GDBusConnection:exit-on-close for more details.</doc>
  11398. <return-value transfer-ownership="none">
  11399. <doc xml:space="preserve">whether the process is terminated when @connection is
  11400. closed by the remote peer</doc>
  11401. <type name="gboolean" c:type="gboolean"/>
  11402. </return-value>
  11403. <parameters>
  11404. <instance-parameter name="connection" transfer-ownership="none">
  11405. <doc xml:space="preserve">a #GDBusConnection</doc>
  11406. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11407. </instance-parameter>
  11408. </parameters>
  11409. </method>
  11410. <method name="get_guid"
  11411. c:identifier="g_dbus_connection_get_guid"
  11412. version="2.26">
  11413. <doc xml:space="preserve">The GUID of the peer performing the role of server when
  11414. authenticating. See #GDBusConnection:guid for more details.</doc>
  11415. <return-value transfer-ownership="none">
  11416. <doc xml:space="preserve">The GUID. Do not free this string, it is owned by
  11417. @connection.</doc>
  11418. <type name="utf8" c:type="const gchar*"/>
  11419. </return-value>
  11420. <parameters>
  11421. <instance-parameter name="connection" transfer-ownership="none">
  11422. <doc xml:space="preserve">a #GDBusConnection</doc>
  11423. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11424. </instance-parameter>
  11425. </parameters>
  11426. </method>
  11427. <method name="get_last_serial"
  11428. c:identifier="g_dbus_connection_get_last_serial"
  11429. version="2.34">
  11430. <doc xml:space="preserve">Retrieves the last serial number assigned to a #GDBusMessage on
  11431. the current thread. This includes messages sent via both low-level
  11432. API such as g_dbus_connection_send_message() as well as
  11433. high-level API such as g_dbus_connection_emit_signal(),
  11434. g_dbus_connection_call() or g_dbus_proxy_call().</doc>
  11435. <return-value transfer-ownership="none">
  11436. <doc xml:space="preserve">the last used serial or zero when no message has been sent
  11437. within the current thread</doc>
  11438. <type name="guint32" c:type="guint32"/>
  11439. </return-value>
  11440. <parameters>
  11441. <instance-parameter name="connection" transfer-ownership="none">
  11442. <doc xml:space="preserve">a #GDBusConnection</doc>
  11443. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11444. </instance-parameter>
  11445. </parameters>
  11446. </method>
  11447. <method name="get_peer_credentials"
  11448. c:identifier="g_dbus_connection_get_peer_credentials"
  11449. version="2.26">
  11450. <doc xml:space="preserve">Gets the credentials of the authenticated peer. This will always
  11451. return %NULL unless @connection acted as a server
  11452. (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
  11453. when set up and the client passed credentials as part of the
  11454. authentication process.
  11455. In a message bus setup, the message bus is always the server and
  11456. each application is a client. So this method will always return
  11457. %NULL for message bus clients.</doc>
  11458. <return-value transfer-ownership="none" nullable="1">
  11459. <doc xml:space="preserve">a #GCredentials or %NULL if not
  11460. available. Do not free this object, it is owned by @connection.</doc>
  11461. <type name="Credentials" c:type="GCredentials*"/>
  11462. </return-value>
  11463. <parameters>
  11464. <instance-parameter name="connection" transfer-ownership="none">
  11465. <doc xml:space="preserve">a #GDBusConnection</doc>
  11466. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11467. </instance-parameter>
  11468. </parameters>
  11469. </method>
  11470. <method name="get_stream"
  11471. c:identifier="g_dbus_connection_get_stream"
  11472. version="2.26">
  11473. <doc xml:space="preserve">Gets the underlying stream used for IO.
  11474. While the #GDBusConnection is active, it will interact with this
  11475. stream from a worker thread, so it is not safe to interact with
  11476. the stream directly.</doc>
  11477. <return-value transfer-ownership="none">
  11478. <doc xml:space="preserve">the stream used for IO</doc>
  11479. <type name="IOStream" c:type="GIOStream*"/>
  11480. </return-value>
  11481. <parameters>
  11482. <instance-parameter name="connection" transfer-ownership="none">
  11483. <doc xml:space="preserve">a #GDBusConnection</doc>
  11484. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11485. </instance-parameter>
  11486. </parameters>
  11487. </method>
  11488. <method name="get_unique_name"
  11489. c:identifier="g_dbus_connection_get_unique_name"
  11490. version="2.26">
  11491. <doc xml:space="preserve">Gets the unique name of @connection as assigned by the message
  11492. bus. This can also be used to figure out if @connection is a
  11493. message bus connection.</doc>
  11494. <return-value transfer-ownership="none">
  11495. <doc xml:space="preserve">the unique name or %NULL if @connection is not a message
  11496. bus connection. Do not free this string, it is owned by
  11497. @connection.</doc>
  11498. <type name="utf8" c:type="const gchar*"/>
  11499. </return-value>
  11500. <parameters>
  11501. <instance-parameter name="connection" transfer-ownership="none">
  11502. <doc xml:space="preserve">a #GDBusConnection</doc>
  11503. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11504. </instance-parameter>
  11505. </parameters>
  11506. </method>
  11507. <method name="is_closed"
  11508. c:identifier="g_dbus_connection_is_closed"
  11509. version="2.26">
  11510. <doc xml:space="preserve">Gets whether @connection is closed.</doc>
  11511. <return-value transfer-ownership="none">
  11512. <doc xml:space="preserve">%TRUE if the connection is closed, %FALSE otherwise</doc>
  11513. <type name="gboolean" c:type="gboolean"/>
  11514. </return-value>
  11515. <parameters>
  11516. <instance-parameter name="connection" transfer-ownership="none">
  11517. <doc xml:space="preserve">a #GDBusConnection</doc>
  11518. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11519. </instance-parameter>
  11520. </parameters>
  11521. </method>
  11522. <method name="register_object"
  11523. c:identifier="g_dbus_connection_register_object"
  11524. shadowed-by="register_object_with_closures"
  11525. version="2.26"
  11526. throws="1">
  11527. <doc xml:space="preserve">Registers callbacks for exported objects at @object_path with the
  11528. D-Bus interface that is described in @interface_info.
  11529. Calls to functions in @vtable (and @user_data_free_func) will happen
  11530. in the
  11531. [thread-default main context][g-main-context-push-thread-default]
  11532. of the thread you are calling this method from.
  11533. Note that all #GVariant values passed to functions in @vtable will match
  11534. the signature given in @interface_info - if a remote caller passes
  11535. incorrect values, the `org.freedesktop.DBus.Error.InvalidArgs`
  11536. is returned to the remote caller.
  11537. Additionally, if the remote caller attempts to invoke methods or
  11538. access properties not mentioned in @interface_info the
  11539. `org.freedesktop.DBus.Error.UnknownMethod` resp.
  11540. `org.freedesktop.DBus.Error.InvalidArgs` errors
  11541. are returned to the caller.
  11542. It is considered a programming error if the
  11543. #GDBusInterfaceGetPropertyFunc function in @vtable returns a
  11544. #GVariant of incorrect type.
  11545. If an existing callback is already registered at @object_path and
  11546. @interface_name, then @error is set to #G_IO_ERROR_EXISTS.
  11547. GDBus automatically implements the standard D-Bus interfaces
  11548. org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
  11549. and org.freedesktop.Peer, so you don't have to implement those for the
  11550. objects you export. You can implement org.freedesktop.DBus.Properties
  11551. yourself, e.g. to handle getting and setting of properties asynchronously.
  11552. Note that the reference count on @interface_info will be
  11553. incremented by 1 (unless allocated statically, e.g. if the
  11554. reference count is -1, see g_dbus_interface_info_ref()) for as long
  11555. as the object is exported. Also note that @vtable will be copied.
  11556. See this [server][gdbus-server] for an example of how to use this method.</doc>
  11557. <return-value transfer-ownership="none">
  11558. <doc xml:space="preserve">0 if @error is set, otherwise a registration id (never 0)
  11559. that can be used with g_dbus_connection_unregister_object()</doc>
  11560. <type name="guint" c:type="guint"/>
  11561. </return-value>
  11562. <parameters>
  11563. <instance-parameter name="connection" transfer-ownership="none">
  11564. <doc xml:space="preserve">a #GDBusConnection</doc>
  11565. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11566. </instance-parameter>
  11567. <parameter name="object_path" transfer-ownership="none">
  11568. <doc xml:space="preserve">the object path to register at</doc>
  11569. <type name="utf8" c:type="const gchar*"/>
  11570. </parameter>
  11571. <parameter name="interface_info" transfer-ownership="none">
  11572. <doc xml:space="preserve">introspection data for the interface</doc>
  11573. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  11574. </parameter>
  11575. <parameter name="vtable"
  11576. transfer-ownership="none"
  11577. nullable="1"
  11578. allow-none="1">
  11579. <doc xml:space="preserve">a #GDBusInterfaceVTable to call into or %NULL</doc>
  11580. <type name="DBusInterfaceVTable"
  11581. c:type="const GDBusInterfaceVTable*"/>
  11582. </parameter>
  11583. <parameter name="user_data"
  11584. transfer-ownership="none"
  11585. nullable="1"
  11586. allow-none="1">
  11587. <doc xml:space="preserve">data to pass to functions in @vtable</doc>
  11588. <type name="gpointer" c:type="gpointer"/>
  11589. </parameter>
  11590. <parameter name="user_data_free_func"
  11591. transfer-ownership="none"
  11592. scope="async">
  11593. <doc xml:space="preserve">function to call when the object path is unregistered</doc>
  11594. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  11595. </parameter>
  11596. </parameters>
  11597. </method>
  11598. <method name="register_object_with_closures"
  11599. c:identifier="g_dbus_connection_register_object_with_closures"
  11600. shadows="register_object"
  11601. version="2.46"
  11602. throws="1">
  11603. <doc xml:space="preserve">Version of g_dbus_connection_register_object() using closures instead of a
  11604. #GDBusInterfaceVTable for easier binding in other languages.</doc>
  11605. <return-value transfer-ownership="none">
  11606. <doc xml:space="preserve">0 if @error is set, otherwise a registration id (never 0)
  11607. that can be used with g_dbus_connection_unregister_object() .</doc>
  11608. <type name="guint" c:type="guint"/>
  11609. </return-value>
  11610. <parameters>
  11611. <instance-parameter name="connection" transfer-ownership="none">
  11612. <doc xml:space="preserve">A #GDBusConnection.</doc>
  11613. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11614. </instance-parameter>
  11615. <parameter name="object_path" transfer-ownership="none">
  11616. <doc xml:space="preserve">The object path to register at.</doc>
  11617. <type name="utf8" c:type="const gchar*"/>
  11618. </parameter>
  11619. <parameter name="interface_info" transfer-ownership="none">
  11620. <doc xml:space="preserve">Introspection data for the interface.</doc>
  11621. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  11622. </parameter>
  11623. <parameter name="method_call_closure"
  11624. transfer-ownership="none"
  11625. nullable="1"
  11626. allow-none="1">
  11627. <doc xml:space="preserve">#GClosure for handling incoming method calls.</doc>
  11628. <type name="GObject.Closure" c:type="GClosure*"/>
  11629. </parameter>
  11630. <parameter name="get_property_closure"
  11631. transfer-ownership="none"
  11632. nullable="1"
  11633. allow-none="1">
  11634. <doc xml:space="preserve">#GClosure for getting a property.</doc>
  11635. <type name="GObject.Closure" c:type="GClosure*"/>
  11636. </parameter>
  11637. <parameter name="set_property_closure"
  11638. transfer-ownership="none"
  11639. nullable="1"
  11640. allow-none="1">
  11641. <doc xml:space="preserve">#GClosure for setting a property.</doc>
  11642. <type name="GObject.Closure" c:type="GClosure*"/>
  11643. </parameter>
  11644. </parameters>
  11645. </method>
  11646. <method name="register_subtree"
  11647. c:identifier="g_dbus_connection_register_subtree"
  11648. version="2.26"
  11649. throws="1">
  11650. <doc xml:space="preserve">Registers a whole subtree of dynamic objects.
  11651. The @enumerate and @introspection functions in @vtable are used to
  11652. convey, to remote callers, what nodes exist in the subtree rooted
  11653. by @object_path.
  11654. When handling remote calls into any node in the subtree, first the
  11655. @enumerate function is used to check if the node exists. If the node exists
  11656. or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
  11657. the @introspection function is used to check if the node supports the
  11658. requested method. If so, the @dispatch function is used to determine
  11659. where to dispatch the call. The collected #GDBusInterfaceVTable and
  11660. #gpointer will be used to call into the interface vtable for processing
  11661. the request.
  11662. All calls into user-provided code will be invoked in the
  11663. [thread-default main context][g-main-context-push-thread-default]
  11664. of the thread you are calling this method from.
  11665. If an existing subtree is already registered at @object_path or
  11666. then @error is set to #G_IO_ERROR_EXISTS.
  11667. Note that it is valid to register regular objects (using
  11668. g_dbus_connection_register_object()) in a subtree registered with
  11669. g_dbus_connection_register_subtree() - if so, the subtree handler
  11670. is tried as the last resort. One way to think about a subtree
  11671. handler is to consider it a fallback handler for object paths not
  11672. registered via g_dbus_connection_register_object() or other bindings.
  11673. Note that @vtable will be copied so you cannot change it after
  11674. registration.
  11675. See this [server][gdbus-subtree-server] for an example of how to use
  11676. this method.</doc>
  11677. <return-value transfer-ownership="none">
  11678. <doc xml:space="preserve">0 if @error is set, otherwise a subtree registration id (never 0)
  11679. that can be used with g_dbus_connection_unregister_subtree() .</doc>
  11680. <type name="guint" c:type="guint"/>
  11681. </return-value>
  11682. <parameters>
  11683. <instance-parameter name="connection" transfer-ownership="none">
  11684. <doc xml:space="preserve">a #GDBusConnection</doc>
  11685. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11686. </instance-parameter>
  11687. <parameter name="object_path" transfer-ownership="none">
  11688. <doc xml:space="preserve">the object path to register the subtree at</doc>
  11689. <type name="utf8" c:type="const gchar*"/>
  11690. </parameter>
  11691. <parameter name="vtable" transfer-ownership="none">
  11692. <doc xml:space="preserve">a #GDBusSubtreeVTable to enumerate, introspect and
  11693. dispatch nodes in the subtree</doc>
  11694. <type name="DBusSubtreeVTable" c:type="const GDBusSubtreeVTable*"/>
  11695. </parameter>
  11696. <parameter name="flags" transfer-ownership="none">
  11697. <doc xml:space="preserve">flags used to fine tune the behavior of the subtree</doc>
  11698. <type name="DBusSubtreeFlags" c:type="GDBusSubtreeFlags"/>
  11699. </parameter>
  11700. <parameter name="user_data"
  11701. transfer-ownership="none"
  11702. nullable="1"
  11703. allow-none="1">
  11704. <doc xml:space="preserve">data to pass to functions in @vtable</doc>
  11705. <type name="gpointer" c:type="gpointer"/>
  11706. </parameter>
  11707. <parameter name="user_data_free_func"
  11708. transfer-ownership="none"
  11709. scope="async">
  11710. <doc xml:space="preserve">function to call when the subtree is unregistered</doc>
  11711. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  11712. </parameter>
  11713. </parameters>
  11714. </method>
  11715. <method name="remove_filter"
  11716. c:identifier="g_dbus_connection_remove_filter"
  11717. version="2.26">
  11718. <doc xml:space="preserve">Removes a filter.
  11719. Note that since filters run in a different thread, there is a race
  11720. condition where it is possible that the filter will be running even
  11721. after calling g_dbus_connection_remove_filter(), so you cannot just
  11722. free data that the filter might be using. Instead, you should pass
  11723. a #GDestroyNotify to g_dbus_connection_add_filter(), which will be
  11724. called when it is guaranteed that the data is no longer needed.</doc>
  11725. <return-value transfer-ownership="none">
  11726. <type name="none" c:type="void"/>
  11727. </return-value>
  11728. <parameters>
  11729. <instance-parameter name="connection" transfer-ownership="none">
  11730. <doc xml:space="preserve">a #GDBusConnection</doc>
  11731. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11732. </instance-parameter>
  11733. <parameter name="filter_id" transfer-ownership="none">
  11734. <doc xml:space="preserve">an identifier obtained from g_dbus_connection_add_filter()</doc>
  11735. <type name="guint" c:type="guint"/>
  11736. </parameter>
  11737. </parameters>
  11738. </method>
  11739. <method name="send_message"
  11740. c:identifier="g_dbus_connection_send_message"
  11741. version="2.26"
  11742. throws="1">
  11743. <doc xml:space="preserve">Asynchronously sends @message to the peer represented by @connection.
  11744. Unless @flags contain the
  11745. %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
  11746. will be assigned by @connection and set on @message via
  11747. g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
  11748. serial number used will be written to this location prior to
  11749. submitting the message to the underlying transport.
  11750. If @connection is closed then the operation will fail with
  11751. %G_IO_ERROR_CLOSED. If @message is not well-formed,
  11752. the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
  11753. See this [server][gdbus-server] and [client][gdbus-unix-fd-client]
  11754. for an example of how to use this low-level API to send and receive
  11755. UNIX file descriptors.
  11756. Note that @message must be unlocked, unless @flags contain the
  11757. %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.</doc>
  11758. <return-value transfer-ownership="none">
  11759. <doc xml:space="preserve">%TRUE if the message was well-formed and queued for
  11760. transmission, %FALSE if @error is set</doc>
  11761. <type name="gboolean" c:type="gboolean"/>
  11762. </return-value>
  11763. <parameters>
  11764. <instance-parameter name="connection" transfer-ownership="none">
  11765. <doc xml:space="preserve">a #GDBusConnection</doc>
  11766. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11767. </instance-parameter>
  11768. <parameter name="message" transfer-ownership="none">
  11769. <doc xml:space="preserve">a #GDBusMessage</doc>
  11770. <type name="DBusMessage" c:type="GDBusMessage*"/>
  11771. </parameter>
  11772. <parameter name="flags" transfer-ownership="none">
  11773. <doc xml:space="preserve">flags affecting how the message is sent</doc>
  11774. <type name="DBusSendMessageFlags" c:type="GDBusSendMessageFlags"/>
  11775. </parameter>
  11776. <parameter name="out_serial"
  11777. direction="out"
  11778. caller-allocates="0"
  11779. transfer-ownership="full"
  11780. optional="1"
  11781. allow-none="1">
  11782. <doc xml:space="preserve">return location for serial number assigned
  11783. to @message when sending it or %NULL</doc>
  11784. <type name="guint32" c:type="volatile guint32*"/>
  11785. </parameter>
  11786. </parameters>
  11787. </method>
  11788. <method name="send_message_with_reply"
  11789. c:identifier="g_dbus_connection_send_message_with_reply"
  11790. version="2.26">
  11791. <doc xml:space="preserve">Asynchronously sends @message to the peer represented by @connection.
  11792. Unless @flags contain the
  11793. %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
  11794. will be assigned by @connection and set on @message via
  11795. g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
  11796. serial number used will be written to this location prior to
  11797. submitting the message to the underlying transport.
  11798. If @connection is closed then the operation will fail with
  11799. %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
  11800. fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
  11801. the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
  11802. This is an asynchronous method. When the operation is finished, @callback
  11803. will be invoked in the
  11804. [thread-default main context][g-main-context-push-thread-default]
  11805. of the thread you are calling this method from. You can then call
  11806. g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
  11807. See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
  11808. Note that @message must be unlocked, unless @flags contain the
  11809. %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
  11810. See this [server][gdbus-server] and [client][gdbus-unix-fd-client]
  11811. for an example of how to use this low-level API to send and receive
  11812. UNIX file descriptors.</doc>
  11813. <return-value transfer-ownership="none">
  11814. <type name="none" c:type="void"/>
  11815. </return-value>
  11816. <parameters>
  11817. <instance-parameter name="connection" transfer-ownership="none">
  11818. <doc xml:space="preserve">a #GDBusConnection</doc>
  11819. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11820. </instance-parameter>
  11821. <parameter name="message" transfer-ownership="none">
  11822. <doc xml:space="preserve">a #GDBusMessage</doc>
  11823. <type name="DBusMessage" c:type="GDBusMessage*"/>
  11824. </parameter>
  11825. <parameter name="flags" transfer-ownership="none">
  11826. <doc xml:space="preserve">flags affecting how the message is sent</doc>
  11827. <type name="DBusSendMessageFlags" c:type="GDBusSendMessageFlags"/>
  11828. </parameter>
  11829. <parameter name="timeout_msec" transfer-ownership="none">
  11830. <doc xml:space="preserve">the timeout in milliseconds, -1 to use the default
  11831. timeout or %G_MAXINT for no timeout</doc>
  11832. <type name="gint" c:type="gint"/>
  11833. </parameter>
  11834. <parameter name="out_serial"
  11835. direction="out"
  11836. caller-allocates="0"
  11837. transfer-ownership="full"
  11838. optional="1"
  11839. allow-none="1">
  11840. <doc xml:space="preserve">return location for serial number assigned
  11841. to @message when sending it or %NULL</doc>
  11842. <type name="guint32" c:type="volatile guint32*"/>
  11843. </parameter>
  11844. <parameter name="cancellable"
  11845. transfer-ownership="none"
  11846. nullable="1"
  11847. allow-none="1">
  11848. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  11849. <type name="Cancellable" c:type="GCancellable*"/>
  11850. </parameter>
  11851. <parameter name="callback"
  11852. transfer-ownership="none"
  11853. nullable="1"
  11854. allow-none="1"
  11855. scope="async"
  11856. closure="6">
  11857. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request
  11858. is satisfied or %NULL if you don't care about the result</doc>
  11859. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  11860. </parameter>
  11861. <parameter name="user_data"
  11862. transfer-ownership="none"
  11863. nullable="1"
  11864. allow-none="1">
  11865. <doc xml:space="preserve">The data to pass to @callback</doc>
  11866. <type name="gpointer" c:type="gpointer"/>
  11867. </parameter>
  11868. </parameters>
  11869. </method>
  11870. <method name="send_message_with_reply_finish"
  11871. c:identifier="g_dbus_connection_send_message_with_reply_finish"
  11872. version="2.26"
  11873. throws="1">
  11874. <doc xml:space="preserve">Finishes an operation started with g_dbus_connection_send_message_with_reply().
  11875. Note that @error is only set if a local in-process error
  11876. occurred. That is to say that the returned #GDBusMessage object may
  11877. be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
  11878. g_dbus_message_to_gerror() to transcode this to a #GError.
  11879. See this [server][gdbus-server] and [client][gdbus-unix-fd-client]
  11880. for an example of how to use this low-level API to send and receive
  11881. UNIX file descriptors.</doc>
  11882. <return-value transfer-ownership="full">
  11883. <doc xml:space="preserve">a locked #GDBusMessage or %NULL if @error is set</doc>
  11884. <type name="DBusMessage" c:type="GDBusMessage*"/>
  11885. </return-value>
  11886. <parameters>
  11887. <instance-parameter name="connection" transfer-ownership="none">
  11888. <doc xml:space="preserve">a #GDBusConnection</doc>
  11889. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11890. </instance-parameter>
  11891. <parameter name="res" transfer-ownership="none">
  11892. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback passed to
  11893. g_dbus_connection_send_message_with_reply()</doc>
  11894. <type name="AsyncResult" c:type="GAsyncResult*"/>
  11895. </parameter>
  11896. </parameters>
  11897. </method>
  11898. <method name="send_message_with_reply_sync"
  11899. c:identifier="g_dbus_connection_send_message_with_reply_sync"
  11900. version="2.26"
  11901. throws="1">
  11902. <doc xml:space="preserve">Synchronously sends @message to the peer represented by @connection
  11903. and blocks the calling thread until a reply is received or the
  11904. timeout is reached. See g_dbus_connection_send_message_with_reply()
  11905. for the asynchronous version of this method.
  11906. Unless @flags contain the
  11907. %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
  11908. will be assigned by @connection and set on @message via
  11909. g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
  11910. serial number used will be written to this location prior to
  11911. submitting the message to the underlying transport.
  11912. If @connection is closed then the operation will fail with
  11913. %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
  11914. fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
  11915. the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
  11916. Note that @error is only set if a local in-process error
  11917. occurred. That is to say that the returned #GDBusMessage object may
  11918. be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
  11919. g_dbus_message_to_gerror() to transcode this to a #GError.
  11920. See this [server][gdbus-server] and [client][gdbus-unix-fd-client]
  11921. for an example of how to use this low-level API to send and receive
  11922. UNIX file descriptors.
  11923. Note that @message must be unlocked, unless @flags contain the
  11924. %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.</doc>
  11925. <return-value transfer-ownership="full">
  11926. <doc xml:space="preserve">a locked #GDBusMessage that is the reply
  11927. to @message or %NULL if @error is set</doc>
  11928. <type name="DBusMessage" c:type="GDBusMessage*"/>
  11929. </return-value>
  11930. <parameters>
  11931. <instance-parameter name="connection" transfer-ownership="none">
  11932. <doc xml:space="preserve">a #GDBusConnection</doc>
  11933. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11934. </instance-parameter>
  11935. <parameter name="message" transfer-ownership="none">
  11936. <doc xml:space="preserve">a #GDBusMessage</doc>
  11937. <type name="DBusMessage" c:type="GDBusMessage*"/>
  11938. </parameter>
  11939. <parameter name="flags" transfer-ownership="none">
  11940. <doc xml:space="preserve">flags affecting how the message is sent.</doc>
  11941. <type name="DBusSendMessageFlags" c:type="GDBusSendMessageFlags"/>
  11942. </parameter>
  11943. <parameter name="timeout_msec" transfer-ownership="none">
  11944. <doc xml:space="preserve">the timeout in milliseconds, -1 to use the default
  11945. timeout or %G_MAXINT for no timeout</doc>
  11946. <type name="gint" c:type="gint"/>
  11947. </parameter>
  11948. <parameter name="out_serial"
  11949. direction="out"
  11950. caller-allocates="0"
  11951. transfer-ownership="full"
  11952. optional="1"
  11953. allow-none="1">
  11954. <doc xml:space="preserve">return location for serial number
  11955. assigned to @message when sending it or %NULL</doc>
  11956. <type name="guint32" c:type="volatile guint32*"/>
  11957. </parameter>
  11958. <parameter name="cancellable"
  11959. transfer-ownership="none"
  11960. nullable="1"
  11961. allow-none="1">
  11962. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  11963. <type name="Cancellable" c:type="GCancellable*"/>
  11964. </parameter>
  11965. </parameters>
  11966. </method>
  11967. <method name="set_exit_on_close"
  11968. c:identifier="g_dbus_connection_set_exit_on_close"
  11969. version="2.26">
  11970. <doc xml:space="preserve">Sets whether the process should be terminated when @connection is
  11971. closed by the remote peer. See #GDBusConnection:exit-on-close for
  11972. more details.
  11973. Note that this function should be used with care. Most modern UNIX
  11974. desktops tie the notion of a user session the session bus, and expect
  11975. all of a users applications to quit when their bus connection goes away.
  11976. If you are setting @exit_on_close to %FALSE for the shared session
  11977. bus connection, you should make sure that your application exits
  11978. when the user session ends.</doc>
  11979. <return-value transfer-ownership="none">
  11980. <type name="none" c:type="void"/>
  11981. </return-value>
  11982. <parameters>
  11983. <instance-parameter name="connection" transfer-ownership="none">
  11984. <doc xml:space="preserve">a #GDBusConnection</doc>
  11985. <type name="DBusConnection" c:type="GDBusConnection*"/>
  11986. </instance-parameter>
  11987. <parameter name="exit_on_close" transfer-ownership="none">
  11988. <doc xml:space="preserve">whether the process should be terminated
  11989. when @connection is closed by the remote peer</doc>
  11990. <type name="gboolean" c:type="gboolean"/>
  11991. </parameter>
  11992. </parameters>
  11993. </method>
  11994. <method name="signal_subscribe"
  11995. c:identifier="g_dbus_connection_signal_subscribe"
  11996. version="2.26">
  11997. <doc xml:space="preserve">Subscribes to signals on @connection and invokes @callback with a whenever
  11998. the signal is received. Note that @callback will be invoked in the
  11999. [thread-default main context][g-main-context-push-thread-default]
  12000. of the thread you are calling this method from.
  12001. If @connection is not a message bus connection, @sender must be
  12002. %NULL.
  12003. If @sender is a well-known name note that @callback is invoked with
  12004. the unique name for the owner of @sender, not the well-known name
  12005. as one would expect. This is because the message bus rewrites the
  12006. name. As such, to avoid certain race conditions, users should be
  12007. tracking the name owner of the well-known name and use that when
  12008. processing the received signal.
  12009. If one of %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE or
  12010. %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH are given, @arg0 is
  12011. interpreted as part of a namespace or path. The first argument
  12012. of a signal is matched against that part as specified by D-Bus.
  12013. If @user_data_free_func is non-%NULL, it will be called (in the
  12014. thread-default main context of the thread you are calling this
  12015. method from) at some point after @user_data is no longer
  12016. needed. (It is not guaranteed to be called synchronously when the
  12017. signal is unsubscribed from, and may be called after @connection
  12018. has been destroyed.)</doc>
  12019. <return-value transfer-ownership="none">
  12020. <doc xml:space="preserve">a subscription identifier that can be used with g_dbus_connection_signal_unsubscribe()</doc>
  12021. <type name="guint" c:type="guint"/>
  12022. </return-value>
  12023. <parameters>
  12024. <instance-parameter name="connection" transfer-ownership="none">
  12025. <doc xml:space="preserve">a #GDBusConnection</doc>
  12026. <type name="DBusConnection" c:type="GDBusConnection*"/>
  12027. </instance-parameter>
  12028. <parameter name="sender"
  12029. transfer-ownership="none"
  12030. nullable="1"
  12031. allow-none="1">
  12032. <doc xml:space="preserve">sender name to match on (unique or well-known name)
  12033. or %NULL to listen from all senders</doc>
  12034. <type name="utf8" c:type="const gchar*"/>
  12035. </parameter>
  12036. <parameter name="interface_name"
  12037. transfer-ownership="none"
  12038. nullable="1"
  12039. allow-none="1">
  12040. <doc xml:space="preserve">D-Bus interface name to match on or %NULL to
  12041. match on all interfaces</doc>
  12042. <type name="utf8" c:type="const gchar*"/>
  12043. </parameter>
  12044. <parameter name="member"
  12045. transfer-ownership="none"
  12046. nullable="1"
  12047. allow-none="1">
  12048. <doc xml:space="preserve">D-Bus signal name to match on or %NULL to match on
  12049. all signals</doc>
  12050. <type name="utf8" c:type="const gchar*"/>
  12051. </parameter>
  12052. <parameter name="object_path"
  12053. transfer-ownership="none"
  12054. nullable="1"
  12055. allow-none="1">
  12056. <doc xml:space="preserve">object path to match on or %NULL to match on
  12057. all object paths</doc>
  12058. <type name="utf8" c:type="const gchar*"/>
  12059. </parameter>
  12060. <parameter name="arg0"
  12061. transfer-ownership="none"
  12062. nullable="1"
  12063. allow-none="1">
  12064. <doc xml:space="preserve">contents of first string argument to match on or %NULL
  12065. to match on all kinds of arguments</doc>
  12066. <type name="utf8" c:type="const gchar*"/>
  12067. </parameter>
  12068. <parameter name="flags" transfer-ownership="none">
  12069. <doc xml:space="preserve">#GDBusSignalFlags describing how arg0 is used in subscribing to the
  12070. signal</doc>
  12071. <type name="DBusSignalFlags" c:type="GDBusSignalFlags"/>
  12072. </parameter>
  12073. <parameter name="callback"
  12074. transfer-ownership="none"
  12075. scope="notified"
  12076. closure="7"
  12077. destroy="8">
  12078. <doc xml:space="preserve">callback to invoke when there is a signal matching the requested data</doc>
  12079. <type name="DBusSignalCallback" c:type="GDBusSignalCallback"/>
  12080. </parameter>
  12081. <parameter name="user_data"
  12082. transfer-ownership="none"
  12083. nullable="1"
  12084. allow-none="1">
  12085. <doc xml:space="preserve">user data to pass to @callback</doc>
  12086. <type name="gpointer" c:type="gpointer"/>
  12087. </parameter>
  12088. <parameter name="user_data_free_func"
  12089. transfer-ownership="none"
  12090. nullable="1"
  12091. allow-none="1"
  12092. scope="async">
  12093. <doc xml:space="preserve">function to free @user_data with when
  12094. subscription is removed or %NULL</doc>
  12095. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  12096. </parameter>
  12097. </parameters>
  12098. </method>
  12099. <method name="signal_unsubscribe"
  12100. c:identifier="g_dbus_connection_signal_unsubscribe"
  12101. version="2.26">
  12102. <doc xml:space="preserve">Unsubscribes from signals.</doc>
  12103. <return-value transfer-ownership="none">
  12104. <type name="none" c:type="void"/>
  12105. </return-value>
  12106. <parameters>
  12107. <instance-parameter name="connection" transfer-ownership="none">
  12108. <doc xml:space="preserve">a #GDBusConnection</doc>
  12109. <type name="DBusConnection" c:type="GDBusConnection*"/>
  12110. </instance-parameter>
  12111. <parameter name="subscription_id" transfer-ownership="none">
  12112. <doc xml:space="preserve">a subscription id obtained from
  12113. g_dbus_connection_signal_subscribe()</doc>
  12114. <type name="guint" c:type="guint"/>
  12115. </parameter>
  12116. </parameters>
  12117. </method>
  12118. <method name="start_message_processing"
  12119. c:identifier="g_dbus_connection_start_message_processing"
  12120. version="2.26">
  12121. <doc xml:space="preserve">If @connection was created with
  12122. %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
  12123. starts processing messages. Does nothing on if @connection wasn't
  12124. created with this flag or if the method has already been called.</doc>
  12125. <return-value transfer-ownership="none">
  12126. <type name="none" c:type="void"/>
  12127. </return-value>
  12128. <parameters>
  12129. <instance-parameter name="connection" transfer-ownership="none">
  12130. <doc xml:space="preserve">a #GDBusConnection</doc>
  12131. <type name="DBusConnection" c:type="GDBusConnection*"/>
  12132. </instance-parameter>
  12133. </parameters>
  12134. </method>
  12135. <method name="unexport_action_group"
  12136. c:identifier="g_dbus_connection_unexport_action_group"
  12137. version="2.32">
  12138. <doc xml:space="preserve">Reverses the effect of a previous call to
  12139. g_dbus_connection_export_action_group().
  12140. It is an error to call this function with an ID that wasn't returned
  12141. from g_dbus_connection_export_action_group() or to call it with the
  12142. same ID more than once.</doc>
  12143. <return-value transfer-ownership="none">
  12144. <type name="none" c:type="void"/>
  12145. </return-value>
  12146. <parameters>
  12147. <instance-parameter name="connection" transfer-ownership="none">
  12148. <doc xml:space="preserve">a #GDBusConnection</doc>
  12149. <type name="DBusConnection" c:type="GDBusConnection*"/>
  12150. </instance-parameter>
  12151. <parameter name="export_id" transfer-ownership="none">
  12152. <doc xml:space="preserve">the ID from g_dbus_connection_export_action_group()</doc>
  12153. <type name="guint" c:type="guint"/>
  12154. </parameter>
  12155. </parameters>
  12156. </method>
  12157. <method name="unexport_menu_model"
  12158. c:identifier="g_dbus_connection_unexport_menu_model"
  12159. version="2.32">
  12160. <doc xml:space="preserve">Reverses the effect of a previous call to
  12161. g_dbus_connection_export_menu_model().
  12162. It is an error to call this function with an ID that wasn't returned
  12163. from g_dbus_connection_export_menu_model() or to call it with the
  12164. same ID more than once.</doc>
  12165. <return-value transfer-ownership="none">
  12166. <type name="none" c:type="void"/>
  12167. </return-value>
  12168. <parameters>
  12169. <instance-parameter name="connection" transfer-ownership="none">
  12170. <doc xml:space="preserve">a #GDBusConnection</doc>
  12171. <type name="DBusConnection" c:type="GDBusConnection*"/>
  12172. </instance-parameter>
  12173. <parameter name="export_id" transfer-ownership="none">
  12174. <doc xml:space="preserve">the ID from g_dbus_connection_export_menu_model()</doc>
  12175. <type name="guint" c:type="guint"/>
  12176. </parameter>
  12177. </parameters>
  12178. </method>
  12179. <method name="unregister_object"
  12180. c:identifier="g_dbus_connection_unregister_object"
  12181. version="2.26">
  12182. <doc xml:space="preserve">Unregisters an object.</doc>
  12183. <return-value transfer-ownership="none">
  12184. <doc xml:space="preserve">%TRUE if the object was unregistered, %FALSE otherwise</doc>
  12185. <type name="gboolean" c:type="gboolean"/>
  12186. </return-value>
  12187. <parameters>
  12188. <instance-parameter name="connection" transfer-ownership="none">
  12189. <doc xml:space="preserve">a #GDBusConnection</doc>
  12190. <type name="DBusConnection" c:type="GDBusConnection*"/>
  12191. </instance-parameter>
  12192. <parameter name="registration_id" transfer-ownership="none">
  12193. <doc xml:space="preserve">a registration id obtained from
  12194. g_dbus_connection_register_object()</doc>
  12195. <type name="guint" c:type="guint"/>
  12196. </parameter>
  12197. </parameters>
  12198. </method>
  12199. <method name="unregister_subtree"
  12200. c:identifier="g_dbus_connection_unregister_subtree"
  12201. version="2.26">
  12202. <doc xml:space="preserve">Unregisters a subtree.</doc>
  12203. <return-value transfer-ownership="none">
  12204. <doc xml:space="preserve">%TRUE if the subtree was unregistered, %FALSE otherwise</doc>
  12205. <type name="gboolean" c:type="gboolean"/>
  12206. </return-value>
  12207. <parameters>
  12208. <instance-parameter name="connection" transfer-ownership="none">
  12209. <doc xml:space="preserve">a #GDBusConnection</doc>
  12210. <type name="DBusConnection" c:type="GDBusConnection*"/>
  12211. </instance-parameter>
  12212. <parameter name="registration_id" transfer-ownership="none">
  12213. <doc xml:space="preserve">a subtree registration id obtained from
  12214. g_dbus_connection_register_subtree()</doc>
  12215. <type name="guint" c:type="guint"/>
  12216. </parameter>
  12217. </parameters>
  12218. </method>
  12219. <property name="address"
  12220. version="2.26"
  12221. readable="0"
  12222. writable="1"
  12223. construct-only="1"
  12224. transfer-ownership="none">
  12225. <doc xml:space="preserve">A D-Bus address specifying potential endpoints that can be used
  12226. when establishing the connection.</doc>
  12227. <type name="utf8" c:type="gchar*"/>
  12228. </property>
  12229. <property name="authentication-observer"
  12230. version="2.26"
  12231. readable="0"
  12232. writable="1"
  12233. construct-only="1"
  12234. transfer-ownership="none">
  12235. <doc xml:space="preserve">A #GDBusAuthObserver object to assist in the authentication process or %NULL.</doc>
  12236. <type name="DBusAuthObserver"/>
  12237. </property>
  12238. <property name="capabilities" version="2.26" transfer-ownership="none">
  12239. <doc xml:space="preserve">Flags from the #GDBusCapabilityFlags enumeration
  12240. representing connection features negotiated with the other peer.</doc>
  12241. <type name="DBusCapabilityFlags"/>
  12242. </property>
  12243. <property name="closed" version="2.26" transfer-ownership="none">
  12244. <doc xml:space="preserve">A boolean specifying whether the connection has been closed.</doc>
  12245. <type name="gboolean" c:type="gboolean"/>
  12246. </property>
  12247. <property name="exit-on-close"
  12248. version="2.26"
  12249. writable="1"
  12250. transfer-ownership="none">
  12251. <doc xml:space="preserve">A boolean specifying whether the process will be terminated (by
  12252. calling `raise(SIGTERM)`) if the connection is closed by the
  12253. remote peer.
  12254. Note that #GDBusConnection objects returned by g_bus_get_finish()
  12255. and g_bus_get_sync() will (usually) have this property set to %TRUE.</doc>
  12256. <type name="gboolean" c:type="gboolean"/>
  12257. </property>
  12258. <property name="flags"
  12259. version="2.26"
  12260. readable="0"
  12261. writable="1"
  12262. construct-only="1"
  12263. transfer-ownership="none">
  12264. <doc xml:space="preserve">Flags from the #GDBusConnectionFlags enumeration.</doc>
  12265. <type name="DBusConnectionFlags"/>
  12266. </property>
  12267. <property name="guid"
  12268. version="2.26"
  12269. writable="1"
  12270. construct-only="1"
  12271. transfer-ownership="none">
  12272. <doc xml:space="preserve">The GUID of the peer performing the role of server when
  12273. authenticating.
  12274. If you are constructing a #GDBusConnection and pass
  12275. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
  12276. #GDBusConnection:flags property then you MUST also set this
  12277. property to a valid guid.
  12278. If you are constructing a #GDBusConnection and pass
  12279. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
  12280. #GDBusConnection:flags property you will be able to read the GUID
  12281. of the other peer here after the connection has been successfully
  12282. initialized.</doc>
  12283. <type name="utf8" c:type="gchar*"/>
  12284. </property>
  12285. <property name="stream"
  12286. version="2.26"
  12287. writable="1"
  12288. construct-only="1"
  12289. transfer-ownership="none">
  12290. <doc xml:space="preserve">The underlying #GIOStream used for I/O.
  12291. If this is passed on construction and is a #GSocketConnection,
  12292. then the corresponding #GSocket will be put into non-blocking mode.
  12293. While the #GDBusConnection is active, it will interact with this
  12294. stream from a worker thread, so it is not safe to interact with
  12295. the stream directly.</doc>
  12296. <type name="IOStream"/>
  12297. </property>
  12298. <property name="unique-name" version="2.26" transfer-ownership="none">
  12299. <doc xml:space="preserve">The unique name as assigned by the message bus or %NULL if the
  12300. connection is not open or not a message bus connection.</doc>
  12301. <type name="utf8" c:type="gchar*"/>
  12302. </property>
  12303. <glib:signal name="closed" when="last" version="2.26">
  12304. <doc xml:space="preserve">Emitted when the connection is closed.
  12305. The cause of this event can be
  12306. - If g_dbus_connection_close() is called. In this case
  12307. @remote_peer_vanished is set to %FALSE and @error is %NULL.
  12308. - If the remote peer closes the connection. In this case
  12309. @remote_peer_vanished is set to %TRUE and @error is set.
  12310. - If the remote peer sends invalid or malformed data. In this
  12311. case @remote_peer_vanished is set to %FALSE and @error is set.
  12312. Upon receiving this signal, you should give up your reference to
  12313. @connection. You are guaranteed that this signal is emitted only
  12314. once.</doc>
  12315. <return-value transfer-ownership="none">
  12316. <type name="none" c:type="void"/>
  12317. </return-value>
  12318. <parameters>
  12319. <parameter name="remote_peer_vanished" transfer-ownership="none">
  12320. <doc xml:space="preserve">%TRUE if @connection is closed because the
  12321. remote peer closed its end of the connection</doc>
  12322. <type name="gboolean" c:type="gboolean"/>
  12323. </parameter>
  12324. <parameter name="error"
  12325. transfer-ownership="none"
  12326. nullable="1"
  12327. allow-none="1">
  12328. <doc xml:space="preserve">a #GError with more details about the event or %NULL</doc>
  12329. <type name="GLib.Error"/>
  12330. </parameter>
  12331. </parameters>
  12332. </glib:signal>
  12333. </class>
  12334. <bitfield name="DBusConnectionFlags"
  12335. version="2.26"
  12336. glib:type-name="GDBusConnectionFlags"
  12337. glib:get-type="g_dbus_connection_flags_get_type"
  12338. c:type="GDBusConnectionFlags">
  12339. <doc xml:space="preserve">Flags used when creating a new #GDBusConnection.</doc>
  12340. <member name="none"
  12341. value="0"
  12342. c:identifier="G_DBUS_CONNECTION_FLAGS_NONE"
  12343. glib:nick="none">
  12344. <doc xml:space="preserve">No flags set.</doc>
  12345. </member>
  12346. <member name="authentication_client"
  12347. value="1"
  12348. c:identifier="G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT"
  12349. glib:nick="authentication-client">
  12350. <doc xml:space="preserve">Perform authentication against server.</doc>
  12351. </member>
  12352. <member name="authentication_server"
  12353. value="2"
  12354. c:identifier="G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER"
  12355. glib:nick="authentication-server">
  12356. <doc xml:space="preserve">Perform authentication against client.</doc>
  12357. </member>
  12358. <member name="authentication_allow_anonymous"
  12359. value="4"
  12360. c:identifier="G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS"
  12361. glib:nick="authentication-allow-anonymous">
  12362. <doc xml:space="preserve">When
  12363. authenticating as a server, allow the anonymous authentication
  12364. method.</doc>
  12365. </member>
  12366. <member name="message_bus_connection"
  12367. value="8"
  12368. c:identifier="G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION"
  12369. glib:nick="message-bus-connection">
  12370. <doc xml:space="preserve">Pass this flag if connecting to a peer that is a
  12371. message bus. This means that the Hello() method will be invoked as part of the connection setup.</doc>
  12372. </member>
  12373. <member name="delay_message_processing"
  12374. value="16"
  12375. c:identifier="G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING"
  12376. glib:nick="delay-message-processing">
  12377. <doc xml:space="preserve">If set, processing of D-Bus messages is
  12378. delayed until g_dbus_connection_start_message_processing() is called.</doc>
  12379. </member>
  12380. </bitfield>
  12381. <enumeration name="DBusError"
  12382. version="2.26"
  12383. glib:type-name="GDBusError"
  12384. glib:get-type="g_dbus_error_get_type"
  12385. c:type="GDBusError"
  12386. glib:error-domain="g-dbus-error-quark">
  12387. <doc xml:space="preserve">Error codes for the %G_DBUS_ERROR error domain.</doc>
  12388. <member name="failed"
  12389. value="0"
  12390. c:identifier="G_DBUS_ERROR_FAILED"
  12391. glib:nick="failed">
  12392. <doc xml:space="preserve">A generic error; "something went wrong" - see the error message for
  12393. more.</doc>
  12394. </member>
  12395. <member name="no_memory"
  12396. value="1"
  12397. c:identifier="G_DBUS_ERROR_NO_MEMORY"
  12398. glib:nick="no-memory">
  12399. <doc xml:space="preserve">There was not enough memory to complete an operation.</doc>
  12400. </member>
  12401. <member name="service_unknown"
  12402. value="2"
  12403. c:identifier="G_DBUS_ERROR_SERVICE_UNKNOWN"
  12404. glib:nick="service-unknown">
  12405. <doc xml:space="preserve">The bus doesn't know how to launch a service to supply the bus name
  12406. you wanted.</doc>
  12407. </member>
  12408. <member name="name_has_no_owner"
  12409. value="3"
  12410. c:identifier="G_DBUS_ERROR_NAME_HAS_NO_OWNER"
  12411. glib:nick="name-has-no-owner">
  12412. <doc xml:space="preserve">The bus name you referenced doesn't exist (i.e. no application owns
  12413. it).</doc>
  12414. </member>
  12415. <member name="no_reply"
  12416. value="4"
  12417. c:identifier="G_DBUS_ERROR_NO_REPLY"
  12418. glib:nick="no-reply">
  12419. <doc xml:space="preserve">No reply to a message expecting one, usually means a timeout occurred.</doc>
  12420. </member>
  12421. <member name="io_error"
  12422. value="5"
  12423. c:identifier="G_DBUS_ERROR_IO_ERROR"
  12424. glib:nick="io-error">
  12425. <doc xml:space="preserve">Something went wrong reading or writing to a socket, for example.</doc>
  12426. </member>
  12427. <member name="bad_address"
  12428. value="6"
  12429. c:identifier="G_DBUS_ERROR_BAD_ADDRESS"
  12430. glib:nick="bad-address">
  12431. <doc xml:space="preserve">A D-Bus bus address was malformed.</doc>
  12432. </member>
  12433. <member name="not_supported"
  12434. value="7"
  12435. c:identifier="G_DBUS_ERROR_NOT_SUPPORTED"
  12436. glib:nick="not-supported">
  12437. <doc xml:space="preserve">Requested operation isn't supported (like ENOSYS on UNIX).</doc>
  12438. </member>
  12439. <member name="limits_exceeded"
  12440. value="8"
  12441. c:identifier="G_DBUS_ERROR_LIMITS_EXCEEDED"
  12442. glib:nick="limits-exceeded">
  12443. <doc xml:space="preserve">Some limited resource is exhausted.</doc>
  12444. </member>
  12445. <member name="access_denied"
  12446. value="9"
  12447. c:identifier="G_DBUS_ERROR_ACCESS_DENIED"
  12448. glib:nick="access-denied">
  12449. <doc xml:space="preserve">Security restrictions don't allow doing what you're trying to do.</doc>
  12450. </member>
  12451. <member name="auth_failed"
  12452. value="10"
  12453. c:identifier="G_DBUS_ERROR_AUTH_FAILED"
  12454. glib:nick="auth-failed">
  12455. <doc xml:space="preserve">Authentication didn't work.</doc>
  12456. </member>
  12457. <member name="no_server"
  12458. value="11"
  12459. c:identifier="G_DBUS_ERROR_NO_SERVER"
  12460. glib:nick="no-server">
  12461. <doc xml:space="preserve">Unable to connect to server (probably caused by ECONNREFUSED on a
  12462. socket).</doc>
  12463. </member>
  12464. <member name="timeout"
  12465. value="12"
  12466. c:identifier="G_DBUS_ERROR_TIMEOUT"
  12467. glib:nick="timeout">
  12468. <doc xml:space="preserve">Certain timeout errors, possibly ETIMEDOUT on a socket. Note that
  12469. %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
  12470. this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
  12471. exists. We can't fix it for compatibility reasons so just be
  12472. careful.</doc>
  12473. </member>
  12474. <member name="no_network"
  12475. value="13"
  12476. c:identifier="G_DBUS_ERROR_NO_NETWORK"
  12477. glib:nick="no-network">
  12478. <doc xml:space="preserve">No network access (probably ENETUNREACH on a socket).</doc>
  12479. </member>
  12480. <member name="address_in_use"
  12481. value="14"
  12482. c:identifier="G_DBUS_ERROR_ADDRESS_IN_USE"
  12483. glib:nick="address-in-use">
  12484. <doc xml:space="preserve">Can't bind a socket since its address is in use (i.e. EADDRINUSE).</doc>
  12485. </member>
  12486. <member name="disconnected"
  12487. value="15"
  12488. c:identifier="G_DBUS_ERROR_DISCONNECTED"
  12489. glib:nick="disconnected">
  12490. <doc xml:space="preserve">The connection is disconnected and you're trying to use it.</doc>
  12491. </member>
  12492. <member name="invalid_args"
  12493. value="16"
  12494. c:identifier="G_DBUS_ERROR_INVALID_ARGS"
  12495. glib:nick="invalid-args">
  12496. <doc xml:space="preserve">Invalid arguments passed to a method call.</doc>
  12497. </member>
  12498. <member name="file_not_found"
  12499. value="17"
  12500. c:identifier="G_DBUS_ERROR_FILE_NOT_FOUND"
  12501. glib:nick="file-not-found">
  12502. <doc xml:space="preserve">Missing file.</doc>
  12503. </member>
  12504. <member name="file_exists"
  12505. value="18"
  12506. c:identifier="G_DBUS_ERROR_FILE_EXISTS"
  12507. glib:nick="file-exists">
  12508. <doc xml:space="preserve">Existing file and the operation you're using does not silently overwrite.</doc>
  12509. </member>
  12510. <member name="unknown_method"
  12511. value="19"
  12512. c:identifier="G_DBUS_ERROR_UNKNOWN_METHOD"
  12513. glib:nick="unknown-method">
  12514. <doc xml:space="preserve">Method name you invoked isn't known by the object you invoked it on.</doc>
  12515. </member>
  12516. <member name="timed_out"
  12517. value="20"
  12518. c:identifier="G_DBUS_ERROR_TIMED_OUT"
  12519. glib:nick="timed-out">
  12520. <doc xml:space="preserve">Certain timeout errors, e.g. while starting a service. Warning: this is
  12521. confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
  12522. can't fix it for compatibility reasons so just be careful.</doc>
  12523. </member>
  12524. <member name="match_rule_not_found"
  12525. value="21"
  12526. c:identifier="G_DBUS_ERROR_MATCH_RULE_NOT_FOUND"
  12527. glib:nick="match-rule-not-found">
  12528. <doc xml:space="preserve">Tried to remove or modify a match rule that didn't exist.</doc>
  12529. </member>
  12530. <member name="match_rule_invalid"
  12531. value="22"
  12532. c:identifier="G_DBUS_ERROR_MATCH_RULE_INVALID"
  12533. glib:nick="match-rule-invalid">
  12534. <doc xml:space="preserve">The match rule isn't syntactically valid.</doc>
  12535. </member>
  12536. <member name="spawn_exec_failed"
  12537. value="23"
  12538. c:identifier="G_DBUS_ERROR_SPAWN_EXEC_FAILED"
  12539. glib:nick="spawn-exec-failed">
  12540. <doc xml:space="preserve">While starting a new process, the exec() call failed.</doc>
  12541. </member>
  12542. <member name="spawn_fork_failed"
  12543. value="24"
  12544. c:identifier="G_DBUS_ERROR_SPAWN_FORK_FAILED"
  12545. glib:nick="spawn-fork-failed">
  12546. <doc xml:space="preserve">While starting a new process, the fork() call failed.</doc>
  12547. </member>
  12548. <member name="spawn_child_exited"
  12549. value="25"
  12550. c:identifier="G_DBUS_ERROR_SPAWN_CHILD_EXITED"
  12551. glib:nick="spawn-child-exited">
  12552. <doc xml:space="preserve">While starting a new process, the child exited with a status code.</doc>
  12553. </member>
  12554. <member name="spawn_child_signaled"
  12555. value="26"
  12556. c:identifier="G_DBUS_ERROR_SPAWN_CHILD_SIGNALED"
  12557. glib:nick="spawn-child-signaled">
  12558. <doc xml:space="preserve">While starting a new process, the child exited on a signal.</doc>
  12559. </member>
  12560. <member name="spawn_failed"
  12561. value="27"
  12562. c:identifier="G_DBUS_ERROR_SPAWN_FAILED"
  12563. glib:nick="spawn-failed">
  12564. <doc xml:space="preserve">While starting a new process, something went wrong.</doc>
  12565. </member>
  12566. <member name="spawn_setup_failed"
  12567. value="28"
  12568. c:identifier="G_DBUS_ERROR_SPAWN_SETUP_FAILED"
  12569. glib:nick="spawn-setup-failed">
  12570. <doc xml:space="preserve">We failed to setup the environment correctly.</doc>
  12571. </member>
  12572. <member name="spawn_config_invalid"
  12573. value="29"
  12574. c:identifier="G_DBUS_ERROR_SPAWN_CONFIG_INVALID"
  12575. glib:nick="spawn-config-invalid">
  12576. <doc xml:space="preserve">We failed to setup the config parser correctly.</doc>
  12577. </member>
  12578. <member name="spawn_service_invalid"
  12579. value="30"
  12580. c:identifier="G_DBUS_ERROR_SPAWN_SERVICE_INVALID"
  12581. glib:nick="spawn-service-invalid">
  12582. <doc xml:space="preserve">Bus name was not valid.</doc>
  12583. </member>
  12584. <member name="spawn_service_not_found"
  12585. value="31"
  12586. c:identifier="G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND"
  12587. glib:nick="spawn-service-not-found">
  12588. <doc xml:space="preserve">Service file not found in system-services directory.</doc>
  12589. </member>
  12590. <member name="spawn_permissions_invalid"
  12591. value="32"
  12592. c:identifier="G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID"
  12593. glib:nick="spawn-permissions-invalid">
  12594. <doc xml:space="preserve">Permissions are incorrect on the setuid helper.</doc>
  12595. </member>
  12596. <member name="spawn_file_invalid"
  12597. value="33"
  12598. c:identifier="G_DBUS_ERROR_SPAWN_FILE_INVALID"
  12599. glib:nick="spawn-file-invalid">
  12600. <doc xml:space="preserve">Service file invalid (Name, User or Exec missing).</doc>
  12601. </member>
  12602. <member name="spawn_no_memory"
  12603. value="34"
  12604. c:identifier="G_DBUS_ERROR_SPAWN_NO_MEMORY"
  12605. glib:nick="spawn-no-memory">
  12606. <doc xml:space="preserve">Tried to get a UNIX process ID and it wasn't available.</doc>
  12607. </member>
  12608. <member name="unix_process_id_unknown"
  12609. value="35"
  12610. c:identifier="G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN"
  12611. glib:nick="unix-process-id-unknown">
  12612. <doc xml:space="preserve">Tried to get a UNIX process ID and it wasn't available.</doc>
  12613. </member>
  12614. <member name="invalid_signature"
  12615. value="36"
  12616. c:identifier="G_DBUS_ERROR_INVALID_SIGNATURE"
  12617. glib:nick="invalid-signature">
  12618. <doc xml:space="preserve">A type signature is not valid.</doc>
  12619. </member>
  12620. <member name="invalid_file_content"
  12621. value="37"
  12622. c:identifier="G_DBUS_ERROR_INVALID_FILE_CONTENT"
  12623. glib:nick="invalid-file-content">
  12624. <doc xml:space="preserve">A file contains invalid syntax or is otherwise broken.</doc>
  12625. </member>
  12626. <member name="selinux_security_context_unknown"
  12627. value="38"
  12628. c:identifier="G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN"
  12629. glib:nick="selinux-security-context-unknown">
  12630. <doc xml:space="preserve">Asked for SELinux security context and it wasn't available.</doc>
  12631. </member>
  12632. <member name="adt_audit_data_unknown"
  12633. value="39"
  12634. c:identifier="G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN"
  12635. glib:nick="adt-audit-data-unknown">
  12636. <doc xml:space="preserve">Asked for ADT audit data and it wasn't available.</doc>
  12637. </member>
  12638. <member name="object_path_in_use"
  12639. value="40"
  12640. c:identifier="G_DBUS_ERROR_OBJECT_PATH_IN_USE"
  12641. glib:nick="object-path-in-use">
  12642. <doc xml:space="preserve">There's already an object with the requested object path.</doc>
  12643. </member>
  12644. <member name="unknown_object"
  12645. value="41"
  12646. c:identifier="G_DBUS_ERROR_UNKNOWN_OBJECT"
  12647. glib:nick="unknown-object">
  12648. <doc xml:space="preserve">Object you invoked a method on isn't known. Since 2.42</doc>
  12649. </member>
  12650. <member name="unknown_interface"
  12651. value="42"
  12652. c:identifier="G_DBUS_ERROR_UNKNOWN_INTERFACE"
  12653. glib:nick="unknown-interface">
  12654. <doc xml:space="preserve">Interface you invoked a method on isn't known by the object. Since 2.42</doc>
  12655. </member>
  12656. <member name="unknown_property"
  12657. value="43"
  12658. c:identifier="G_DBUS_ERROR_UNKNOWN_PROPERTY"
  12659. glib:nick="unknown-property">
  12660. <doc xml:space="preserve">Property you tried to access isn't known by the object. Since 2.42</doc>
  12661. </member>
  12662. <member name="property_read_only"
  12663. value="44"
  12664. c:identifier="G_DBUS_ERROR_PROPERTY_READ_ONLY"
  12665. glib:nick="property-read-only">
  12666. <doc xml:space="preserve">Property you tried to set is read-only. Since 2.42</doc>
  12667. </member>
  12668. <function name="encode_gerror"
  12669. c:identifier="g_dbus_error_encode_gerror"
  12670. version="2.26">
  12671. <doc xml:space="preserve">Creates a D-Bus error name to use for @error. If @error matches
  12672. a registered error (cf. g_dbus_error_register_error()), the corresponding
  12673. D-Bus error name will be returned.
  12674. Otherwise the a name of the form
  12675. `org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE`
  12676. will be used. This allows other GDBus applications to map the error
  12677. on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
  12678. This function is typically only used in object mappings to put a
  12679. #GError on the wire. Regular applications should not use it.</doc>
  12680. <return-value transfer-ownership="full">
  12681. <doc xml:space="preserve">A D-Bus error name (never %NULL). Free with g_free().</doc>
  12682. <type name="utf8" c:type="gchar*"/>
  12683. </return-value>
  12684. <parameters>
  12685. <parameter name="error" transfer-ownership="none">
  12686. <doc xml:space="preserve">A #GError.</doc>
  12687. <type name="GLib.Error" c:type="const GError*"/>
  12688. </parameter>
  12689. </parameters>
  12690. </function>
  12691. <function name="get_remote_error"
  12692. c:identifier="g_dbus_error_get_remote_error"
  12693. version="2.26">
  12694. <doc xml:space="preserve">Gets the D-Bus error name used for @error, if any.
  12695. This function is guaranteed to return a D-Bus error name for all
  12696. #GErrors returned from functions handling remote method calls
  12697. (e.g. g_dbus_connection_call_finish()) unless
  12698. g_dbus_error_strip_remote_error() has been used on @error.</doc>
  12699. <return-value transfer-ownership="full">
  12700. <doc xml:space="preserve">an allocated string or %NULL if the D-Bus error name
  12701. could not be found. Free with g_free().</doc>
  12702. <type name="utf8" c:type="gchar*"/>
  12703. </return-value>
  12704. <parameters>
  12705. <parameter name="error" transfer-ownership="none">
  12706. <doc xml:space="preserve">a #GError</doc>
  12707. <type name="GLib.Error" c:type="const GError*"/>
  12708. </parameter>
  12709. </parameters>
  12710. </function>
  12711. <function name="is_remote_error"
  12712. c:identifier="g_dbus_error_is_remote_error"
  12713. version="2.26">
  12714. <doc xml:space="preserve">Checks if @error represents an error received via D-Bus from a remote peer. If so,
  12715. use g_dbus_error_get_remote_error() to get the name of the error.</doc>
  12716. <return-value transfer-ownership="none">
  12717. <doc xml:space="preserve">%TRUE if @error represents an error from a remote peer,
  12718. %FALSE otherwise.</doc>
  12719. <type name="gboolean" c:type="gboolean"/>
  12720. </return-value>
  12721. <parameters>
  12722. <parameter name="error" transfer-ownership="none">
  12723. <doc xml:space="preserve">A #GError.</doc>
  12724. <type name="GLib.Error" c:type="const GError*"/>
  12725. </parameter>
  12726. </parameters>
  12727. </function>
  12728. <function name="new_for_dbus_error"
  12729. c:identifier="g_dbus_error_new_for_dbus_error"
  12730. version="2.26">
  12731. <doc xml:space="preserve">Creates a #GError based on the contents of @dbus_error_name and
  12732. @dbus_error_message.
  12733. Errors registered with g_dbus_error_register_error() will be looked
  12734. up using @dbus_error_name and if a match is found, the error domain
  12735. and code is used. Applications can use g_dbus_error_get_remote_error()
  12736. to recover @dbus_error_name.
  12737. If a match against a registered error is not found and the D-Bus
  12738. error name is in a form as returned by g_dbus_error_encode_gerror()
  12739. the error domain and code encoded in the name is used to
  12740. create the #GError. Also, @dbus_error_name is added to the error message
  12741. such that it can be recovered with g_dbus_error_get_remote_error().
  12742. Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
  12743. in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
  12744. added to the error message such that it can be recovered with
  12745. g_dbus_error_get_remote_error().
  12746. In all three cases, @dbus_error_name can always be recovered from the
  12747. returned #GError using the g_dbus_error_get_remote_error() function
  12748. (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
  12749. This function is typically only used in object mappings to prepare
  12750. #GError instances for applications. Regular applications should not use
  12751. it.</doc>
  12752. <return-value transfer-ownership="full">
  12753. <doc xml:space="preserve">An allocated #GError. Free with g_error_free().</doc>
  12754. <type name="GLib.Error" c:type="GError*"/>
  12755. </return-value>
  12756. <parameters>
  12757. <parameter name="dbus_error_name" transfer-ownership="none">
  12758. <doc xml:space="preserve">D-Bus error name.</doc>
  12759. <type name="utf8" c:type="const gchar*"/>
  12760. </parameter>
  12761. <parameter name="dbus_error_message" transfer-ownership="none">
  12762. <doc xml:space="preserve">D-Bus error message.</doc>
  12763. <type name="utf8" c:type="const gchar*"/>
  12764. </parameter>
  12765. </parameters>
  12766. </function>
  12767. <function name="quark" c:identifier="g_dbus_error_quark">
  12768. <return-value transfer-ownership="none">
  12769. <type name="GLib.Quark" c:type="GQuark"/>
  12770. </return-value>
  12771. </function>
  12772. <function name="register_error"
  12773. c:identifier="g_dbus_error_register_error"
  12774. version="2.26">
  12775. <doc xml:space="preserve">Creates an association to map between @dbus_error_name and
  12776. #GErrors specified by @error_domain and @error_code.
  12777. This is typically done in the routine that returns the #GQuark for
  12778. an error domain.</doc>
  12779. <return-value transfer-ownership="none">
  12780. <doc xml:space="preserve">%TRUE if the association was created, %FALSE if it already
  12781. exists.</doc>
  12782. <type name="gboolean" c:type="gboolean"/>
  12783. </return-value>
  12784. <parameters>
  12785. <parameter name="error_domain" transfer-ownership="none">
  12786. <doc xml:space="preserve">A #GQuark for a error domain.</doc>
  12787. <type name="GLib.Quark" c:type="GQuark"/>
  12788. </parameter>
  12789. <parameter name="error_code" transfer-ownership="none">
  12790. <doc xml:space="preserve">An error code.</doc>
  12791. <type name="gint" c:type="gint"/>
  12792. </parameter>
  12793. <parameter name="dbus_error_name" transfer-ownership="none">
  12794. <doc xml:space="preserve">A D-Bus error name.</doc>
  12795. <type name="utf8" c:type="const gchar*"/>
  12796. </parameter>
  12797. </parameters>
  12798. </function>
  12799. <function name="register_error_domain"
  12800. c:identifier="g_dbus_error_register_error_domain"
  12801. version="2.26">
  12802. <doc xml:space="preserve">Helper function for associating a #GError error domain with D-Bus error names.</doc>
  12803. <return-value transfer-ownership="none">
  12804. <type name="none" c:type="void"/>
  12805. </return-value>
  12806. <parameters>
  12807. <parameter name="error_domain_quark_name" transfer-ownership="none">
  12808. <doc xml:space="preserve">The error domain name.</doc>
  12809. <type name="utf8" c:type="const gchar*"/>
  12810. </parameter>
  12811. <parameter name="quark_volatile" transfer-ownership="none">
  12812. <doc xml:space="preserve">A pointer where to store the #GQuark.</doc>
  12813. <type name="gsize" c:type="volatile gsize*"/>
  12814. </parameter>
  12815. <parameter name="entries" transfer-ownership="none">
  12816. <doc xml:space="preserve">A pointer to @num_entries #GDBusErrorEntry struct items.</doc>
  12817. <type name="DBusErrorEntry" c:type="const GDBusErrorEntry*"/>
  12818. </parameter>
  12819. <parameter name="num_entries" transfer-ownership="none">
  12820. <doc xml:space="preserve">Number of items to register.</doc>
  12821. <type name="guint" c:type="guint"/>
  12822. </parameter>
  12823. </parameters>
  12824. </function>
  12825. <function name="set_dbus_error"
  12826. c:identifier="g_dbus_error_set_dbus_error"
  12827. version="2.26"
  12828. introspectable="0">
  12829. <doc xml:space="preserve">Does nothing if @error is %NULL. Otherwise sets *@error to
  12830. a new #GError created with g_dbus_error_new_for_dbus_error()
  12831. with @dbus_error_message prepend with @format (unless %NULL).</doc>
  12832. <return-value transfer-ownership="none">
  12833. <type name="none" c:type="void"/>
  12834. </return-value>
  12835. <parameters>
  12836. <parameter name="error" transfer-ownership="none">
  12837. <doc xml:space="preserve">A pointer to a #GError or %NULL.</doc>
  12838. <type name="GLib.Error" c:type="GError**"/>
  12839. </parameter>
  12840. <parameter name="dbus_error_name" transfer-ownership="none">
  12841. <doc xml:space="preserve">D-Bus error name.</doc>
  12842. <type name="utf8" c:type="const gchar*"/>
  12843. </parameter>
  12844. <parameter name="dbus_error_message" transfer-ownership="none">
  12845. <doc xml:space="preserve">D-Bus error message.</doc>
  12846. <type name="utf8" c:type="const gchar*"/>
  12847. </parameter>
  12848. <parameter name="format"
  12849. transfer-ownership="none"
  12850. nullable="1"
  12851. allow-none="1">
  12852. <doc xml:space="preserve">printf()-style format to prepend to @dbus_error_message or %NULL.</doc>
  12853. <type name="utf8" c:type="const gchar*"/>
  12854. </parameter>
  12855. <parameter name="..." transfer-ownership="none">
  12856. <doc xml:space="preserve">Arguments for @format.</doc>
  12857. <varargs/>
  12858. </parameter>
  12859. </parameters>
  12860. </function>
  12861. <function name="set_dbus_error_valist"
  12862. c:identifier="g_dbus_error_set_dbus_error_valist"
  12863. version="2.26"
  12864. introspectable="0">
  12865. <doc xml:space="preserve">Like g_dbus_error_set_dbus_error() but intended for language bindings.</doc>
  12866. <return-value transfer-ownership="none">
  12867. <type name="none" c:type="void"/>
  12868. </return-value>
  12869. <parameters>
  12870. <parameter name="error" transfer-ownership="none">
  12871. <doc xml:space="preserve">A pointer to a #GError or %NULL.</doc>
  12872. <type name="GLib.Error" c:type="GError**"/>
  12873. </parameter>
  12874. <parameter name="dbus_error_name" transfer-ownership="none">
  12875. <doc xml:space="preserve">D-Bus error name.</doc>
  12876. <type name="utf8" c:type="const gchar*"/>
  12877. </parameter>
  12878. <parameter name="dbus_error_message" transfer-ownership="none">
  12879. <doc xml:space="preserve">D-Bus error message.</doc>
  12880. <type name="utf8" c:type="const gchar*"/>
  12881. </parameter>
  12882. <parameter name="format"
  12883. transfer-ownership="none"
  12884. nullable="1"
  12885. allow-none="1">
  12886. <doc xml:space="preserve">printf()-style format to prepend to @dbus_error_message or %NULL.</doc>
  12887. <type name="utf8" c:type="const gchar*"/>
  12888. </parameter>
  12889. <parameter name="var_args" transfer-ownership="none">
  12890. <doc xml:space="preserve">Arguments for @format.</doc>
  12891. <type name="va_list" c:type="va_list"/>
  12892. </parameter>
  12893. </parameters>
  12894. </function>
  12895. <function name="strip_remote_error"
  12896. c:identifier="g_dbus_error_strip_remote_error"
  12897. version="2.26">
  12898. <doc xml:space="preserve">Looks for extra information in the error message used to recover
  12899. the D-Bus error name and strips it if found. If stripped, the
  12900. message field in @error will correspond exactly to what was
  12901. received on the wire.
  12902. This is typically used when presenting errors to the end user.</doc>
  12903. <return-value transfer-ownership="none">
  12904. <doc xml:space="preserve">%TRUE if information was stripped, %FALSE otherwise.</doc>
  12905. <type name="gboolean" c:type="gboolean"/>
  12906. </return-value>
  12907. <parameters>
  12908. <parameter name="error" transfer-ownership="none">
  12909. <doc xml:space="preserve">A #GError.</doc>
  12910. <type name="GLib.Error" c:type="GError*"/>
  12911. </parameter>
  12912. </parameters>
  12913. </function>
  12914. <function name="unregister_error"
  12915. c:identifier="g_dbus_error_unregister_error"
  12916. version="2.26">
  12917. <doc xml:space="preserve">Destroys an association previously set up with g_dbus_error_register_error().</doc>
  12918. <return-value transfer-ownership="none">
  12919. <doc xml:space="preserve">%TRUE if the association was destroyed, %FALSE if it wasn't found.</doc>
  12920. <type name="gboolean" c:type="gboolean"/>
  12921. </return-value>
  12922. <parameters>
  12923. <parameter name="error_domain" transfer-ownership="none">
  12924. <doc xml:space="preserve">A #GQuark for a error domain.</doc>
  12925. <type name="GLib.Quark" c:type="GQuark"/>
  12926. </parameter>
  12927. <parameter name="error_code" transfer-ownership="none">
  12928. <doc xml:space="preserve">An error code.</doc>
  12929. <type name="gint" c:type="gint"/>
  12930. </parameter>
  12931. <parameter name="dbus_error_name" transfer-ownership="none">
  12932. <doc xml:space="preserve">A D-Bus error name.</doc>
  12933. <type name="utf8" c:type="const gchar*"/>
  12934. </parameter>
  12935. </parameters>
  12936. </function>
  12937. </enumeration>
  12938. <record name="DBusErrorEntry" c:type="GDBusErrorEntry" version="2.26">
  12939. <doc xml:space="preserve">Struct used in g_dbus_error_register_error_domain().</doc>
  12940. <field name="error_code" writable="1">
  12941. <doc xml:space="preserve">An error code.</doc>
  12942. <type name="gint" c:type="gint"/>
  12943. </field>
  12944. <field name="dbus_error_name" writable="1">
  12945. <doc xml:space="preserve">The D-Bus error name to associate with @error_code.</doc>
  12946. <type name="utf8" c:type="const gchar*"/>
  12947. </field>
  12948. </record>
  12949. <interface name="DBusInterface"
  12950. c:symbol-prefix="dbus_interface"
  12951. c:type="GDBusInterface"
  12952. version="2.30"
  12953. glib:type-name="GDBusInterface"
  12954. glib:get-type="g_dbus_interface_get_type"
  12955. glib:type-struct="DBusInterfaceIface">
  12956. <doc xml:space="preserve">The #GDBusInterface type is the base type for D-Bus interfaces both
  12957. on the service side (see #GDBusInterfaceSkeleton) and client side
  12958. (see #GDBusProxy).</doc>
  12959. <virtual-method name="dup_object" invoker="dup_object" version="2.32">
  12960. <doc xml:space="preserve">Gets the #GDBusObject that @interface_ belongs to, if any.</doc>
  12961. <return-value transfer-ownership="full">
  12962. <doc xml:space="preserve">A #GDBusObject or %NULL. The returned
  12963. reference should be freed with g_object_unref().</doc>
  12964. <type name="DBusObject" c:type="GDBusObject*"/>
  12965. </return-value>
  12966. <parameters>
  12967. <instance-parameter name="interface_" transfer-ownership="none">
  12968. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  12969. <type name="DBusInterface" c:type="GDBusInterface*"/>
  12970. </instance-parameter>
  12971. </parameters>
  12972. </virtual-method>
  12973. <virtual-method name="get_info" invoker="get_info" version="2.30">
  12974. <doc xml:space="preserve">Gets D-Bus introspection information for the D-Bus interface
  12975. implemented by @interface_.</doc>
  12976. <return-value transfer-ownership="none">
  12977. <doc xml:space="preserve">A #GDBusInterfaceInfo. Do not free.</doc>
  12978. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  12979. </return-value>
  12980. <parameters>
  12981. <instance-parameter name="interface_" transfer-ownership="none">
  12982. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  12983. <type name="DBusInterface" c:type="GDBusInterface*"/>
  12984. </instance-parameter>
  12985. </parameters>
  12986. </virtual-method>
  12987. <virtual-method name="get_object"
  12988. invoker="get_object"
  12989. version="2.30"
  12990. introspectable="0">
  12991. <doc xml:space="preserve">Gets the #GDBusObject that @interface_ belongs to, if any.
  12992. It is not safe to use the returned object if @interface_ or
  12993. the returned object is being used from other threads. See
  12994. g_dbus_interface_dup_object() for a thread-safe alternative.</doc>
  12995. <return-value transfer-ownership="none">
  12996. <doc xml:space="preserve">A #GDBusObject or %NULL. The returned
  12997. reference belongs to @interface_ and should not be freed.</doc>
  12998. <type name="DBusObject" c:type="GDBusObject*"/>
  12999. </return-value>
  13000. <parameters>
  13001. <instance-parameter name="interface_" transfer-ownership="none">
  13002. <doc xml:space="preserve">An exported D-Bus interface</doc>
  13003. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13004. </instance-parameter>
  13005. </parameters>
  13006. </virtual-method>
  13007. <virtual-method name="set_object" invoker="set_object" version="2.30">
  13008. <doc xml:space="preserve">Sets the #GDBusObject for @interface_ to @object.
  13009. Note that @interface_ will hold a weak reference to @object.</doc>
  13010. <return-value transfer-ownership="none">
  13011. <type name="none" c:type="void"/>
  13012. </return-value>
  13013. <parameters>
  13014. <instance-parameter name="interface_" transfer-ownership="none">
  13015. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  13016. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13017. </instance-parameter>
  13018. <parameter name="object"
  13019. transfer-ownership="none"
  13020. nullable="1"
  13021. allow-none="1">
  13022. <doc xml:space="preserve">A #GDBusObject or %NULL.</doc>
  13023. <type name="DBusObject" c:type="GDBusObject*"/>
  13024. </parameter>
  13025. </parameters>
  13026. </virtual-method>
  13027. <method name="dup_object"
  13028. c:identifier="g_dbus_interface_dup_object"
  13029. shadows="get_object"
  13030. version="2.32">
  13031. <doc xml:space="preserve">Gets the #GDBusObject that @interface_ belongs to, if any.</doc>
  13032. <return-value transfer-ownership="full">
  13033. <doc xml:space="preserve">A #GDBusObject or %NULL. The returned
  13034. reference should be freed with g_object_unref().</doc>
  13035. <type name="DBusObject" c:type="GDBusObject*"/>
  13036. </return-value>
  13037. <parameters>
  13038. <instance-parameter name="interface_" transfer-ownership="none">
  13039. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  13040. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13041. </instance-parameter>
  13042. </parameters>
  13043. </method>
  13044. <method name="get_info"
  13045. c:identifier="g_dbus_interface_get_info"
  13046. version="2.30">
  13047. <doc xml:space="preserve">Gets D-Bus introspection information for the D-Bus interface
  13048. implemented by @interface_.</doc>
  13049. <return-value transfer-ownership="none">
  13050. <doc xml:space="preserve">A #GDBusInterfaceInfo. Do not free.</doc>
  13051. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13052. </return-value>
  13053. <parameters>
  13054. <instance-parameter name="interface_" transfer-ownership="none">
  13055. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  13056. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13057. </instance-parameter>
  13058. </parameters>
  13059. </method>
  13060. <method name="get_object"
  13061. c:identifier="g_dbus_interface_get_object"
  13062. shadowed-by="dup_object"
  13063. version="2.30"
  13064. introspectable="0">
  13065. <doc xml:space="preserve">Gets the #GDBusObject that @interface_ belongs to, if any.
  13066. It is not safe to use the returned object if @interface_ or
  13067. the returned object is being used from other threads. See
  13068. g_dbus_interface_dup_object() for a thread-safe alternative.</doc>
  13069. <return-value transfer-ownership="none">
  13070. <doc xml:space="preserve">A #GDBusObject or %NULL. The returned
  13071. reference belongs to @interface_ and should not be freed.</doc>
  13072. <type name="DBusObject" c:type="GDBusObject*"/>
  13073. </return-value>
  13074. <parameters>
  13075. <instance-parameter name="interface_" transfer-ownership="none">
  13076. <doc xml:space="preserve">An exported D-Bus interface</doc>
  13077. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13078. </instance-parameter>
  13079. </parameters>
  13080. </method>
  13081. <method name="set_object"
  13082. c:identifier="g_dbus_interface_set_object"
  13083. version="2.30">
  13084. <doc xml:space="preserve">Sets the #GDBusObject for @interface_ to @object.
  13085. Note that @interface_ will hold a weak reference to @object.</doc>
  13086. <return-value transfer-ownership="none">
  13087. <type name="none" c:type="void"/>
  13088. </return-value>
  13089. <parameters>
  13090. <instance-parameter name="interface_" transfer-ownership="none">
  13091. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  13092. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13093. </instance-parameter>
  13094. <parameter name="object"
  13095. transfer-ownership="none"
  13096. nullable="1"
  13097. allow-none="1">
  13098. <doc xml:space="preserve">A #GDBusObject or %NULL.</doc>
  13099. <type name="DBusObject" c:type="GDBusObject*"/>
  13100. </parameter>
  13101. </parameters>
  13102. </method>
  13103. </interface>
  13104. <callback name="DBusInterfaceGetPropertyFunc"
  13105. c:type="GDBusInterfaceGetPropertyFunc"
  13106. version="2.26">
  13107. <doc xml:space="preserve">The type of the @get_property function in #GDBusInterfaceVTable.</doc>
  13108. <return-value transfer-ownership="full">
  13109. <doc xml:space="preserve">A #GVariant with the value for @property_name or %NULL if
  13110. @error is set. If the returned #GVariant is floating, it is
  13111. consumed - otherwise its reference count is decreased by one.</doc>
  13112. <type name="GLib.Variant" c:type="GVariant*"/>
  13113. </return-value>
  13114. <parameters>
  13115. <parameter name="connection" transfer-ownership="none">
  13116. <doc xml:space="preserve">A #GDBusConnection.</doc>
  13117. <type name="DBusConnection" c:type="GDBusConnection*"/>
  13118. </parameter>
  13119. <parameter name="sender" transfer-ownership="none">
  13120. <doc xml:space="preserve">The unique bus name of the remote caller.</doc>
  13121. <type name="utf8" c:type="const gchar*"/>
  13122. </parameter>
  13123. <parameter name="object_path" transfer-ownership="none">
  13124. <doc xml:space="preserve">The object path that the method was invoked on.</doc>
  13125. <type name="utf8" c:type="const gchar*"/>
  13126. </parameter>
  13127. <parameter name="interface_name" transfer-ownership="none">
  13128. <doc xml:space="preserve">The D-Bus interface name for the property.</doc>
  13129. <type name="utf8" c:type="const gchar*"/>
  13130. </parameter>
  13131. <parameter name="property_name" transfer-ownership="none">
  13132. <doc xml:space="preserve">The name of the property to get the value of.</doc>
  13133. <type name="utf8" c:type="const gchar*"/>
  13134. </parameter>
  13135. <parameter name="error" transfer-ownership="none">
  13136. <doc xml:space="preserve">Return location for error.</doc>
  13137. <type name="GLib.Error" c:type="GError**"/>
  13138. </parameter>
  13139. <parameter name="user_data"
  13140. transfer-ownership="none"
  13141. nullable="1"
  13142. allow-none="1"
  13143. closure="6">
  13144. <doc xml:space="preserve">The @user_data #gpointer passed to g_dbus_connection_register_object().</doc>
  13145. <type name="gpointer" c:type="gpointer"/>
  13146. </parameter>
  13147. </parameters>
  13148. </callback>
  13149. <record name="DBusInterfaceIface"
  13150. c:type="GDBusInterfaceIface"
  13151. glib:is-gtype-struct-for="DBusInterface"
  13152. version="2.30">
  13153. <doc xml:space="preserve">Base type for D-Bus interfaces.</doc>
  13154. <field name="parent_iface">
  13155. <doc xml:space="preserve">The parent interface.</doc>
  13156. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  13157. </field>
  13158. <field name="get_info">
  13159. <callback name="get_info">
  13160. <return-value transfer-ownership="none">
  13161. <doc xml:space="preserve">A #GDBusInterfaceInfo. Do not free.</doc>
  13162. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13163. </return-value>
  13164. <parameters>
  13165. <parameter name="interface_" transfer-ownership="none">
  13166. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  13167. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13168. </parameter>
  13169. </parameters>
  13170. </callback>
  13171. </field>
  13172. <field name="get_object">
  13173. <callback name="get_object">
  13174. <return-value transfer-ownership="none">
  13175. <doc xml:space="preserve">A #GDBusObject or %NULL. The returned
  13176. reference belongs to @interface_ and should not be freed.</doc>
  13177. <type name="DBusObject" c:type="GDBusObject*"/>
  13178. </return-value>
  13179. <parameters>
  13180. <parameter name="interface_" transfer-ownership="none">
  13181. <doc xml:space="preserve">An exported D-Bus interface</doc>
  13182. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13183. </parameter>
  13184. </parameters>
  13185. </callback>
  13186. </field>
  13187. <field name="set_object">
  13188. <callback name="set_object">
  13189. <return-value transfer-ownership="none">
  13190. <type name="none" c:type="void"/>
  13191. </return-value>
  13192. <parameters>
  13193. <parameter name="interface_" transfer-ownership="none">
  13194. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  13195. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13196. </parameter>
  13197. <parameter name="object"
  13198. transfer-ownership="none"
  13199. nullable="1"
  13200. allow-none="1">
  13201. <doc xml:space="preserve">A #GDBusObject or %NULL.</doc>
  13202. <type name="DBusObject" c:type="GDBusObject*"/>
  13203. </parameter>
  13204. </parameters>
  13205. </callback>
  13206. </field>
  13207. <field name="dup_object">
  13208. <callback name="dup_object">
  13209. <return-value transfer-ownership="full">
  13210. <doc xml:space="preserve">A #GDBusObject or %NULL. The returned
  13211. reference should be freed with g_object_unref().</doc>
  13212. <type name="DBusObject" c:type="GDBusObject*"/>
  13213. </return-value>
  13214. <parameters>
  13215. <parameter name="interface_" transfer-ownership="none">
  13216. <doc xml:space="preserve">An exported D-Bus interface.</doc>
  13217. <type name="DBusInterface" c:type="GDBusInterface*"/>
  13218. </parameter>
  13219. </parameters>
  13220. </callback>
  13221. </field>
  13222. </record>
  13223. <record name="DBusInterfaceInfo"
  13224. c:type="GDBusInterfaceInfo"
  13225. version="2.26"
  13226. glib:type-name="GDBusInterfaceInfo"
  13227. glib:get-type="g_dbus_interface_info_get_type"
  13228. c:symbol-prefix="dbus_interface_info">
  13229. <doc xml:space="preserve">Information about a D-Bus interface.</doc>
  13230. <field name="ref_count" writable="1">
  13231. <doc xml:space="preserve">The reference count or -1 if statically allocated.</doc>
  13232. <type name="gint" c:type="volatile gint"/>
  13233. </field>
  13234. <field name="name" writable="1">
  13235. <doc xml:space="preserve">The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".</doc>
  13236. <type name="utf8" c:type="gchar*"/>
  13237. </field>
  13238. <field name="methods" writable="1">
  13239. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.</doc>
  13240. <array c:type="GDBusMethodInfo**">
  13241. <type name="DBusMethodInfo" c:type="GDBusMethodInfo*"/>
  13242. </array>
  13243. </field>
  13244. <field name="signals" writable="1">
  13245. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.</doc>
  13246. <array c:type="GDBusSignalInfo**">
  13247. <type name="DBusSignalInfo" c:type="GDBusSignalInfo*"/>
  13248. </array>
  13249. </field>
  13250. <field name="properties" writable="1">
  13251. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.</doc>
  13252. <array c:type="GDBusPropertyInfo**">
  13253. <type name="DBusPropertyInfo" c:type="GDBusPropertyInfo*"/>
  13254. </array>
  13255. </field>
  13256. <field name="annotations" writable="1">
  13257. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
  13258. <array c:type="GDBusAnnotationInfo**">
  13259. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  13260. </array>
  13261. </field>
  13262. <method name="cache_build"
  13263. c:identifier="g_dbus_interface_info_cache_build"
  13264. version="2.30">
  13265. <doc xml:space="preserve">Builds a lookup-cache to speed up
  13266. g_dbus_interface_info_lookup_method(),
  13267. g_dbus_interface_info_lookup_signal() and
  13268. g_dbus_interface_info_lookup_property().
  13269. If this has already been called with @info, the existing cache is
  13270. used and its use count is increased.
  13271. Note that @info cannot be modified until
  13272. g_dbus_interface_info_cache_release() is called.</doc>
  13273. <return-value transfer-ownership="none">
  13274. <type name="none" c:type="void"/>
  13275. </return-value>
  13276. <parameters>
  13277. <instance-parameter name="info" transfer-ownership="none">
  13278. <doc xml:space="preserve">A #GDBusInterfaceInfo.</doc>
  13279. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13280. </instance-parameter>
  13281. </parameters>
  13282. </method>
  13283. <method name="cache_release"
  13284. c:identifier="g_dbus_interface_info_cache_release"
  13285. version="2.30">
  13286. <doc xml:space="preserve">Decrements the usage count for the cache for @info built by
  13287. g_dbus_interface_info_cache_build() (if any) and frees the
  13288. resources used by the cache if the usage count drops to zero.</doc>
  13289. <return-value transfer-ownership="none">
  13290. <type name="none" c:type="void"/>
  13291. </return-value>
  13292. <parameters>
  13293. <instance-parameter name="info" transfer-ownership="none">
  13294. <doc xml:space="preserve">A GDBusInterfaceInfo</doc>
  13295. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13296. </instance-parameter>
  13297. </parameters>
  13298. </method>
  13299. <method name="generate_xml"
  13300. c:identifier="g_dbus_interface_info_generate_xml"
  13301. version="2.26">
  13302. <doc xml:space="preserve">Appends an XML representation of @info (and its children) to @string_builder.
  13303. This function is typically used for generating introspection XML
  13304. documents at run-time for handling the
  13305. `org.freedesktop.DBus.Introspectable.Introspect`
  13306. method.</doc>
  13307. <return-value transfer-ownership="none">
  13308. <type name="none" c:type="void"/>
  13309. </return-value>
  13310. <parameters>
  13311. <instance-parameter name="info" transfer-ownership="none">
  13312. <doc xml:space="preserve">A #GDBusNodeInfo</doc>
  13313. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13314. </instance-parameter>
  13315. <parameter name="indent" transfer-ownership="none">
  13316. <doc xml:space="preserve">Indentation level.</doc>
  13317. <type name="guint" c:type="guint"/>
  13318. </parameter>
  13319. <parameter name="string_builder"
  13320. direction="out"
  13321. caller-allocates="1"
  13322. transfer-ownership="none">
  13323. <doc xml:space="preserve">A #GString to to append XML data to.</doc>
  13324. <type name="GLib.String" c:type="GString*"/>
  13325. </parameter>
  13326. </parameters>
  13327. </method>
  13328. <method name="lookup_method"
  13329. c:identifier="g_dbus_interface_info_lookup_method"
  13330. version="2.26">
  13331. <doc xml:space="preserve">Looks up information about a method.
  13332. The cost of this function is O(n) in number of methods unless
  13333. g_dbus_interface_info_cache_build() has been used on @info.</doc>
  13334. <return-value transfer-ownership="none">
  13335. <doc xml:space="preserve">A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.</doc>
  13336. <type name="DBusMethodInfo" c:type="GDBusMethodInfo*"/>
  13337. </return-value>
  13338. <parameters>
  13339. <instance-parameter name="info" transfer-ownership="none">
  13340. <doc xml:space="preserve">A #GDBusInterfaceInfo.</doc>
  13341. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13342. </instance-parameter>
  13343. <parameter name="name" transfer-ownership="none">
  13344. <doc xml:space="preserve">A D-Bus method name (typically in CamelCase)</doc>
  13345. <type name="utf8" c:type="const gchar*"/>
  13346. </parameter>
  13347. </parameters>
  13348. </method>
  13349. <method name="lookup_property"
  13350. c:identifier="g_dbus_interface_info_lookup_property"
  13351. version="2.26">
  13352. <doc xml:space="preserve">Looks up information about a property.
  13353. The cost of this function is O(n) in number of properties unless
  13354. g_dbus_interface_info_cache_build() has been used on @info.</doc>
  13355. <return-value transfer-ownership="none">
  13356. <doc xml:space="preserve">A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.</doc>
  13357. <type name="DBusPropertyInfo" c:type="GDBusPropertyInfo*"/>
  13358. </return-value>
  13359. <parameters>
  13360. <instance-parameter name="info" transfer-ownership="none">
  13361. <doc xml:space="preserve">A #GDBusInterfaceInfo.</doc>
  13362. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13363. </instance-parameter>
  13364. <parameter name="name" transfer-ownership="none">
  13365. <doc xml:space="preserve">A D-Bus property name (typically in CamelCase).</doc>
  13366. <type name="utf8" c:type="const gchar*"/>
  13367. </parameter>
  13368. </parameters>
  13369. </method>
  13370. <method name="lookup_signal"
  13371. c:identifier="g_dbus_interface_info_lookup_signal"
  13372. version="2.26">
  13373. <doc xml:space="preserve">Looks up information about a signal.
  13374. The cost of this function is O(n) in number of signals unless
  13375. g_dbus_interface_info_cache_build() has been used on @info.</doc>
  13376. <return-value transfer-ownership="none">
  13377. <doc xml:space="preserve">A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.</doc>
  13378. <type name="DBusSignalInfo" c:type="GDBusSignalInfo*"/>
  13379. </return-value>
  13380. <parameters>
  13381. <instance-parameter name="info" transfer-ownership="none">
  13382. <doc xml:space="preserve">A #GDBusInterfaceInfo.</doc>
  13383. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13384. </instance-parameter>
  13385. <parameter name="name" transfer-ownership="none">
  13386. <doc xml:space="preserve">A D-Bus signal name (typically in CamelCase)</doc>
  13387. <type name="utf8" c:type="const gchar*"/>
  13388. </parameter>
  13389. </parameters>
  13390. </method>
  13391. <method name="ref"
  13392. c:identifier="g_dbus_interface_info_ref"
  13393. version="2.26">
  13394. <doc xml:space="preserve">If @info is statically allocated does nothing. Otherwise increases
  13395. the reference count.</doc>
  13396. <return-value transfer-ownership="full">
  13397. <doc xml:space="preserve">The same @info.</doc>
  13398. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13399. </return-value>
  13400. <parameters>
  13401. <instance-parameter name="info" transfer-ownership="none">
  13402. <doc xml:space="preserve">A #GDBusInterfaceInfo</doc>
  13403. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13404. </instance-parameter>
  13405. </parameters>
  13406. </method>
  13407. <method name="unref"
  13408. c:identifier="g_dbus_interface_info_unref"
  13409. version="2.26">
  13410. <doc xml:space="preserve">If @info is statically allocated, does nothing. Otherwise decreases
  13411. the reference count of @info. When its reference count drops to 0,
  13412. the memory used is freed.</doc>
  13413. <return-value transfer-ownership="none">
  13414. <type name="none" c:type="void"/>
  13415. </return-value>
  13416. <parameters>
  13417. <instance-parameter name="info" transfer-ownership="none">
  13418. <doc xml:space="preserve">A #GDBusInterfaceInfo.</doc>
  13419. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13420. </instance-parameter>
  13421. </parameters>
  13422. </method>
  13423. </record>
  13424. <callback name="DBusInterfaceMethodCallFunc"
  13425. c:type="GDBusInterfaceMethodCallFunc"
  13426. version="2.26">
  13427. <doc xml:space="preserve">The type of the @method_call function in #GDBusInterfaceVTable.</doc>
  13428. <return-value transfer-ownership="none">
  13429. <type name="none" c:type="void"/>
  13430. </return-value>
  13431. <parameters>
  13432. <parameter name="connection" transfer-ownership="none">
  13433. <doc xml:space="preserve">A #GDBusConnection.</doc>
  13434. <type name="DBusConnection" c:type="GDBusConnection*"/>
  13435. </parameter>
  13436. <parameter name="sender" transfer-ownership="none">
  13437. <doc xml:space="preserve">The unique bus name of the remote caller.</doc>
  13438. <type name="utf8" c:type="const gchar*"/>
  13439. </parameter>
  13440. <parameter name="object_path" transfer-ownership="none">
  13441. <doc xml:space="preserve">The object path that the method was invoked on.</doc>
  13442. <type name="utf8" c:type="const gchar*"/>
  13443. </parameter>
  13444. <parameter name="interface_name" transfer-ownership="none">
  13445. <doc xml:space="preserve">The D-Bus interface name the method was invoked on.</doc>
  13446. <type name="utf8" c:type="const gchar*"/>
  13447. </parameter>
  13448. <parameter name="method_name" transfer-ownership="none">
  13449. <doc xml:space="preserve">The name of the method that was invoked.</doc>
  13450. <type name="utf8" c:type="const gchar*"/>
  13451. </parameter>
  13452. <parameter name="parameters" transfer-ownership="none">
  13453. <doc xml:space="preserve">A #GVariant tuple with parameters.</doc>
  13454. <type name="GLib.Variant" c:type="GVariant*"/>
  13455. </parameter>
  13456. <parameter name="invocation" transfer-ownership="full">
  13457. <doc xml:space="preserve">A #GDBusMethodInvocation object that must be used to return a value or error.</doc>
  13458. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  13459. </parameter>
  13460. <parameter name="user_data"
  13461. transfer-ownership="none"
  13462. nullable="1"
  13463. allow-none="1"
  13464. closure="7">
  13465. <doc xml:space="preserve">The @user_data #gpointer passed to g_dbus_connection_register_object().</doc>
  13466. <type name="gpointer" c:type="gpointer"/>
  13467. </parameter>
  13468. </parameters>
  13469. </callback>
  13470. <callback name="DBusInterfaceSetPropertyFunc"
  13471. c:type="GDBusInterfaceSetPropertyFunc"
  13472. version="2.26">
  13473. <doc xml:space="preserve">The type of the @set_property function in #GDBusInterfaceVTable.</doc>
  13474. <return-value transfer-ownership="none">
  13475. <doc xml:space="preserve">%TRUE if the property was set to @value, %FALSE if @error is set.</doc>
  13476. <type name="gboolean" c:type="gboolean"/>
  13477. </return-value>
  13478. <parameters>
  13479. <parameter name="connection" transfer-ownership="none">
  13480. <doc xml:space="preserve">A #GDBusConnection.</doc>
  13481. <type name="DBusConnection" c:type="GDBusConnection*"/>
  13482. </parameter>
  13483. <parameter name="sender" transfer-ownership="none">
  13484. <doc xml:space="preserve">The unique bus name of the remote caller.</doc>
  13485. <type name="utf8" c:type="const gchar*"/>
  13486. </parameter>
  13487. <parameter name="object_path" transfer-ownership="none">
  13488. <doc xml:space="preserve">The object path that the method was invoked on.</doc>
  13489. <type name="utf8" c:type="const gchar*"/>
  13490. </parameter>
  13491. <parameter name="interface_name" transfer-ownership="none">
  13492. <doc xml:space="preserve">The D-Bus interface name for the property.</doc>
  13493. <type name="utf8" c:type="const gchar*"/>
  13494. </parameter>
  13495. <parameter name="property_name" transfer-ownership="none">
  13496. <doc xml:space="preserve">The name of the property to get the value of.</doc>
  13497. <type name="utf8" c:type="const gchar*"/>
  13498. </parameter>
  13499. <parameter name="value" transfer-ownership="none">
  13500. <doc xml:space="preserve">The value to set the property to.</doc>
  13501. <type name="GLib.Variant" c:type="GVariant*"/>
  13502. </parameter>
  13503. <parameter name="error" transfer-ownership="none">
  13504. <doc xml:space="preserve">Return location for error.</doc>
  13505. <type name="GLib.Error" c:type="GError**"/>
  13506. </parameter>
  13507. <parameter name="user_data"
  13508. transfer-ownership="none"
  13509. nullable="1"
  13510. allow-none="1"
  13511. closure="7">
  13512. <doc xml:space="preserve">The @user_data #gpointer passed to g_dbus_connection_register_object().</doc>
  13513. <type name="gpointer" c:type="gpointer"/>
  13514. </parameter>
  13515. </parameters>
  13516. </callback>
  13517. <class name="DBusInterfaceSkeleton"
  13518. c:symbol-prefix="dbus_interface_skeleton"
  13519. c:type="GDBusInterfaceSkeleton"
  13520. version="2.30"
  13521. parent="GObject.Object"
  13522. abstract="1"
  13523. glib:type-name="GDBusInterfaceSkeleton"
  13524. glib:get-type="g_dbus_interface_skeleton_get_type"
  13525. glib:type-struct="DBusInterfaceSkeletonClass">
  13526. <doc xml:space="preserve">Abstract base class for D-Bus interfaces on the service side.</doc>
  13527. <implements name="DBusInterface"/>
  13528. <virtual-method name="flush" invoker="flush" version="2.30">
  13529. <doc xml:space="preserve">If @interface_ has outstanding changes, request for these changes to be
  13530. emitted immediately.
  13531. For example, an exported D-Bus interface may queue up property
  13532. changes and emit the
  13533. `org.freedesktop.DBus.Properties::Propert``
  13534. signal later (e.g. in an idle handler). This technique is useful
  13535. for collapsing multiple property changes into one.</doc>
  13536. <return-value transfer-ownership="none">
  13537. <type name="none" c:type="void"/>
  13538. </return-value>
  13539. <parameters>
  13540. <instance-parameter name="interface_" transfer-ownership="none">
  13541. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13542. <type name="DBusInterfaceSkeleton"
  13543. c:type="GDBusInterfaceSkeleton*"/>
  13544. </instance-parameter>
  13545. </parameters>
  13546. </virtual-method>
  13547. <virtual-method name="g_authorize_method">
  13548. <return-value transfer-ownership="none">
  13549. <type name="gboolean" c:type="gboolean"/>
  13550. </return-value>
  13551. <parameters>
  13552. <instance-parameter name="interface_" transfer-ownership="none">
  13553. <type name="DBusInterfaceSkeleton"
  13554. c:type="GDBusInterfaceSkeleton*"/>
  13555. </instance-parameter>
  13556. <parameter name="invocation" transfer-ownership="none">
  13557. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  13558. </parameter>
  13559. </parameters>
  13560. </virtual-method>
  13561. <virtual-method name="get_info" invoker="get_info" version="2.30">
  13562. <doc xml:space="preserve">Gets D-Bus introspection information for the D-Bus interface
  13563. implemented by @interface_.</doc>
  13564. <return-value transfer-ownership="none">
  13565. <doc xml:space="preserve">A #GDBusInterfaceInfo (never %NULL). Do not free.</doc>
  13566. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13567. </return-value>
  13568. <parameters>
  13569. <instance-parameter name="interface_" transfer-ownership="none">
  13570. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13571. <type name="DBusInterfaceSkeleton"
  13572. c:type="GDBusInterfaceSkeleton*"/>
  13573. </instance-parameter>
  13574. </parameters>
  13575. </virtual-method>
  13576. <virtual-method name="get_properties"
  13577. invoker="get_properties"
  13578. version="2.30">
  13579. <doc xml:space="preserve">Gets all D-Bus properties for @interface_.</doc>
  13580. <return-value transfer-ownership="full">
  13581. <doc xml:space="preserve">A #GVariant of type
  13582. ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS].
  13583. Free with g_variant_unref().</doc>
  13584. <type name="GLib.Variant" c:type="GVariant*"/>
  13585. </return-value>
  13586. <parameters>
  13587. <instance-parameter name="interface_" transfer-ownership="none">
  13588. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13589. <type name="DBusInterfaceSkeleton"
  13590. c:type="GDBusInterfaceSkeleton*"/>
  13591. </instance-parameter>
  13592. </parameters>
  13593. </virtual-method>
  13594. <virtual-method name="get_vtable"
  13595. invoker="get_vtable"
  13596. version="2.30"
  13597. introspectable="0">
  13598. <doc xml:space="preserve">Gets the interface vtable for the D-Bus interface implemented by
  13599. @interface_. The returned function pointers should expect @interface_
  13600. itself to be passed as @user_data.</doc>
  13601. <return-value>
  13602. <doc xml:space="preserve">A #GDBusInterfaceVTable (never %NULL).</doc>
  13603. <type name="DBusInterfaceVTable" c:type="GDBusInterfaceVTable*"/>
  13604. </return-value>
  13605. <parameters>
  13606. <instance-parameter name="interface_" transfer-ownership="none">
  13607. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13608. <type name="DBusInterfaceSkeleton"
  13609. c:type="GDBusInterfaceSkeleton*"/>
  13610. </instance-parameter>
  13611. </parameters>
  13612. </virtual-method>
  13613. <method name="export"
  13614. c:identifier="g_dbus_interface_skeleton_export"
  13615. version="2.30"
  13616. throws="1">
  13617. <doc xml:space="preserve">Exports @interface_ at @object_path on @connection.
  13618. This can be called multiple times to export the same @interface_
  13619. onto multiple connections however the @object_path provided must be
  13620. the same for all connections.
  13621. Use g_dbus_interface_skeleton_unexport() to unexport the object.</doc>
  13622. <return-value transfer-ownership="none">
  13623. <doc xml:space="preserve">%TRUE if the interface was exported on @connection, otherwise %FALSE with
  13624. @error set.</doc>
  13625. <type name="gboolean" c:type="gboolean"/>
  13626. </return-value>
  13627. <parameters>
  13628. <instance-parameter name="interface_" transfer-ownership="none">
  13629. <doc xml:space="preserve">The D-Bus interface to export.</doc>
  13630. <type name="DBusInterfaceSkeleton"
  13631. c:type="GDBusInterfaceSkeleton*"/>
  13632. </instance-parameter>
  13633. <parameter name="connection" transfer-ownership="none">
  13634. <doc xml:space="preserve">A #GDBusConnection to export @interface_ on.</doc>
  13635. <type name="DBusConnection" c:type="GDBusConnection*"/>
  13636. </parameter>
  13637. <parameter name="object_path" transfer-ownership="none">
  13638. <doc xml:space="preserve">The path to export the interface at.</doc>
  13639. <type name="utf8" c:type="const gchar*"/>
  13640. </parameter>
  13641. </parameters>
  13642. </method>
  13643. <method name="flush"
  13644. c:identifier="g_dbus_interface_skeleton_flush"
  13645. version="2.30">
  13646. <doc xml:space="preserve">If @interface_ has outstanding changes, request for these changes to be
  13647. emitted immediately.
  13648. For example, an exported D-Bus interface may queue up property
  13649. changes and emit the
  13650. `org.freedesktop.DBus.Properties::Propert``
  13651. signal later (e.g. in an idle handler). This technique is useful
  13652. for collapsing multiple property changes into one.</doc>
  13653. <return-value transfer-ownership="none">
  13654. <type name="none" c:type="void"/>
  13655. </return-value>
  13656. <parameters>
  13657. <instance-parameter name="interface_" transfer-ownership="none">
  13658. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13659. <type name="DBusInterfaceSkeleton"
  13660. c:type="GDBusInterfaceSkeleton*"/>
  13661. </instance-parameter>
  13662. </parameters>
  13663. </method>
  13664. <method name="get_connection"
  13665. c:identifier="g_dbus_interface_skeleton_get_connection"
  13666. version="2.30">
  13667. <doc xml:space="preserve">Gets the first connection that @interface_ is exported on, if any.</doc>
  13668. <return-value transfer-ownership="none">
  13669. <doc xml:space="preserve">A #GDBusConnection or %NULL if @interface_ is
  13670. not exported anywhere. Do not free, the object belongs to @interface_.</doc>
  13671. <type name="DBusConnection" c:type="GDBusConnection*"/>
  13672. </return-value>
  13673. <parameters>
  13674. <instance-parameter name="interface_" transfer-ownership="none">
  13675. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13676. <type name="DBusInterfaceSkeleton"
  13677. c:type="GDBusInterfaceSkeleton*"/>
  13678. </instance-parameter>
  13679. </parameters>
  13680. </method>
  13681. <method name="get_connections"
  13682. c:identifier="g_dbus_interface_skeleton_get_connections"
  13683. version="2.32">
  13684. <doc xml:space="preserve">Gets a list of the connections that @interface_ is exported on.</doc>
  13685. <return-value transfer-ownership="full">
  13686. <doc xml:space="preserve">A list of
  13687. all the connections that @interface_ is exported on. The returned
  13688. list should be freed with g_list_free() after each element has
  13689. been freed with g_object_unref().</doc>
  13690. <type name="GLib.List" c:type="GList*">
  13691. <type name="DBusConnection"/>
  13692. </type>
  13693. </return-value>
  13694. <parameters>
  13695. <instance-parameter name="interface_" transfer-ownership="none">
  13696. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13697. <type name="DBusInterfaceSkeleton"
  13698. c:type="GDBusInterfaceSkeleton*"/>
  13699. </instance-parameter>
  13700. </parameters>
  13701. </method>
  13702. <method name="get_flags"
  13703. c:identifier="g_dbus_interface_skeleton_get_flags"
  13704. version="2.30">
  13705. <doc xml:space="preserve">Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
  13706. of @interface_</doc>
  13707. <return-value transfer-ownership="none">
  13708. <doc xml:space="preserve">One or more flags from the #GDBusInterfaceSkeletonFlags enumeration.</doc>
  13709. <type name="DBusInterfaceSkeletonFlags"
  13710. c:type="GDBusInterfaceSkeletonFlags"/>
  13711. </return-value>
  13712. <parameters>
  13713. <instance-parameter name="interface_" transfer-ownership="none">
  13714. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13715. <type name="DBusInterfaceSkeleton"
  13716. c:type="GDBusInterfaceSkeleton*"/>
  13717. </instance-parameter>
  13718. </parameters>
  13719. </method>
  13720. <method name="get_info"
  13721. c:identifier="g_dbus_interface_skeleton_get_info"
  13722. version="2.30">
  13723. <doc xml:space="preserve">Gets D-Bus introspection information for the D-Bus interface
  13724. implemented by @interface_.</doc>
  13725. <return-value transfer-ownership="none">
  13726. <doc xml:space="preserve">A #GDBusInterfaceInfo (never %NULL). Do not free.</doc>
  13727. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13728. </return-value>
  13729. <parameters>
  13730. <instance-parameter name="interface_" transfer-ownership="none">
  13731. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13732. <type name="DBusInterfaceSkeleton"
  13733. c:type="GDBusInterfaceSkeleton*"/>
  13734. </instance-parameter>
  13735. </parameters>
  13736. </method>
  13737. <method name="get_object_path"
  13738. c:identifier="g_dbus_interface_skeleton_get_object_path"
  13739. version="2.30">
  13740. <doc xml:space="preserve">Gets the object path that @interface_ is exported on, if any.</doc>
  13741. <return-value transfer-ownership="none">
  13742. <doc xml:space="preserve">A string owned by @interface_ or %NULL if @interface_ is not exported
  13743. anywhere. Do not free, the string belongs to @interface_.</doc>
  13744. <type name="utf8" c:type="const gchar*"/>
  13745. </return-value>
  13746. <parameters>
  13747. <instance-parameter name="interface_" transfer-ownership="none">
  13748. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13749. <type name="DBusInterfaceSkeleton"
  13750. c:type="GDBusInterfaceSkeleton*"/>
  13751. </instance-parameter>
  13752. </parameters>
  13753. </method>
  13754. <method name="get_properties"
  13755. c:identifier="g_dbus_interface_skeleton_get_properties"
  13756. version="2.30">
  13757. <doc xml:space="preserve">Gets all D-Bus properties for @interface_.</doc>
  13758. <return-value transfer-ownership="full">
  13759. <doc xml:space="preserve">A #GVariant of type
  13760. ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS].
  13761. Free with g_variant_unref().</doc>
  13762. <type name="GLib.Variant" c:type="GVariant*"/>
  13763. </return-value>
  13764. <parameters>
  13765. <instance-parameter name="interface_" transfer-ownership="none">
  13766. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13767. <type name="DBusInterfaceSkeleton"
  13768. c:type="GDBusInterfaceSkeleton*"/>
  13769. </instance-parameter>
  13770. </parameters>
  13771. </method>
  13772. <method name="get_vtable"
  13773. c:identifier="g_dbus_interface_skeleton_get_vtable"
  13774. version="2.30"
  13775. introspectable="0">
  13776. <doc xml:space="preserve">Gets the interface vtable for the D-Bus interface implemented by
  13777. @interface_. The returned function pointers should expect @interface_
  13778. itself to be passed as @user_data.</doc>
  13779. <return-value>
  13780. <doc xml:space="preserve">A #GDBusInterfaceVTable (never %NULL).</doc>
  13781. <type name="DBusInterfaceVTable" c:type="GDBusInterfaceVTable*"/>
  13782. </return-value>
  13783. <parameters>
  13784. <instance-parameter name="interface_" transfer-ownership="none">
  13785. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13786. <type name="DBusInterfaceSkeleton"
  13787. c:type="GDBusInterfaceSkeleton*"/>
  13788. </instance-parameter>
  13789. </parameters>
  13790. </method>
  13791. <method name="has_connection"
  13792. c:identifier="g_dbus_interface_skeleton_has_connection"
  13793. version="2.32">
  13794. <doc xml:space="preserve">Checks if @interface_ is exported on @connection.</doc>
  13795. <return-value transfer-ownership="none">
  13796. <doc xml:space="preserve">%TRUE if @interface_ is exported on @connection, %FALSE otherwise.</doc>
  13797. <type name="gboolean" c:type="gboolean"/>
  13798. </return-value>
  13799. <parameters>
  13800. <instance-parameter name="interface_" transfer-ownership="none">
  13801. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13802. <type name="DBusInterfaceSkeleton"
  13803. c:type="GDBusInterfaceSkeleton*"/>
  13804. </instance-parameter>
  13805. <parameter name="connection" transfer-ownership="none">
  13806. <doc xml:space="preserve">A #GDBusConnection.</doc>
  13807. <type name="DBusConnection" c:type="GDBusConnection*"/>
  13808. </parameter>
  13809. </parameters>
  13810. </method>
  13811. <method name="set_flags"
  13812. c:identifier="g_dbus_interface_skeleton_set_flags"
  13813. version="2.30">
  13814. <doc xml:space="preserve">Sets flags describing what the behavior of @skeleton should be.</doc>
  13815. <return-value transfer-ownership="none">
  13816. <type name="none" c:type="void"/>
  13817. </return-value>
  13818. <parameters>
  13819. <instance-parameter name="interface_" transfer-ownership="none">
  13820. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13821. <type name="DBusInterfaceSkeleton"
  13822. c:type="GDBusInterfaceSkeleton*"/>
  13823. </instance-parameter>
  13824. <parameter name="flags" transfer-ownership="none">
  13825. <doc xml:space="preserve">Flags from the #GDBusInterfaceSkeletonFlags enumeration.</doc>
  13826. <type name="DBusInterfaceSkeletonFlags"
  13827. c:type="GDBusInterfaceSkeletonFlags"/>
  13828. </parameter>
  13829. </parameters>
  13830. </method>
  13831. <method name="unexport"
  13832. c:identifier="g_dbus_interface_skeleton_unexport"
  13833. version="2.30">
  13834. <doc xml:space="preserve">Stops exporting @interface_ on all connections it is exported on.
  13835. To unexport @interface_ from only a single connection, use
  13836. g_dbus_interface_skeleton_unexport_from_connection()</doc>
  13837. <return-value transfer-ownership="none">
  13838. <type name="none" c:type="void"/>
  13839. </return-value>
  13840. <parameters>
  13841. <instance-parameter name="interface_" transfer-ownership="none">
  13842. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13843. <type name="DBusInterfaceSkeleton"
  13844. c:type="GDBusInterfaceSkeleton*"/>
  13845. </instance-parameter>
  13846. </parameters>
  13847. </method>
  13848. <method name="unexport_from_connection"
  13849. c:identifier="g_dbus_interface_skeleton_unexport_from_connection"
  13850. version="2.32">
  13851. <doc xml:space="preserve">Stops exporting @interface_ on @connection.
  13852. To stop exporting on all connections the interface is exported on,
  13853. use g_dbus_interface_skeleton_unexport().</doc>
  13854. <return-value transfer-ownership="none">
  13855. <type name="none" c:type="void"/>
  13856. </return-value>
  13857. <parameters>
  13858. <instance-parameter name="interface_" transfer-ownership="none">
  13859. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13860. <type name="DBusInterfaceSkeleton"
  13861. c:type="GDBusInterfaceSkeleton*"/>
  13862. </instance-parameter>
  13863. <parameter name="connection" transfer-ownership="none">
  13864. <doc xml:space="preserve">A #GDBusConnection.</doc>
  13865. <type name="DBusConnection" c:type="GDBusConnection*"/>
  13866. </parameter>
  13867. </parameters>
  13868. </method>
  13869. <property name="g-flags"
  13870. version="2.30"
  13871. writable="1"
  13872. transfer-ownership="none">
  13873. <doc xml:space="preserve">Flags from the #GDBusInterfaceSkeletonFlags enumeration.</doc>
  13874. <type name="DBusInterfaceSkeletonFlags"/>
  13875. </property>
  13876. <field name="parent_instance" readable="0" private="1">
  13877. <type name="GObject.Object" c:type="GObject"/>
  13878. </field>
  13879. <field name="priv" readable="0" private="1">
  13880. <type name="DBusInterfaceSkeletonPrivate"
  13881. c:type="GDBusInterfaceSkeletonPrivate*"/>
  13882. </field>
  13883. <glib:signal name="g-authorize-method" when="last" version="2.30">
  13884. <doc xml:space="preserve">Emitted when a method is invoked by a remote caller and used to
  13885. determine if the method call is authorized.
  13886. Note that this signal is emitted in a thread dedicated to
  13887. handling the method call so handlers are allowed to perform
  13888. blocking IO. This means that it is appropriate to call e.g.
  13889. [polkit_authority_check_authorization_sync()](http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#polkit-authority-check-authorization-sync)
  13890. with the
  13891. [POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION](http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#POLKIT-CHECK-AUTHORIZATION-FLAGS-ALLOW-USER-INTERACTION:CAPS)
  13892. flag set.
  13893. If %FALSE is returned then no further handlers are run and the
  13894. signal handler must take a reference to @invocation and finish
  13895. handling the call (e.g. return an error via
  13896. g_dbus_method_invocation_return_error()).
  13897. Otherwise, if %TRUE is returned, signal emission continues. If no
  13898. handlers return %FALSE, then the method is dispatched. If
  13899. @interface has an enclosing #GDBusObjectSkeleton, then the
  13900. #GDBusObjectSkeleton::authorize-method signal handlers run before
  13901. the handlers for this signal.
  13902. The default class handler just returns %TRUE.
  13903. Please note that the common case is optimized: if no signals
  13904. handlers are connected and the default class handler isn't
  13905. overridden (for both @interface and the enclosing
  13906. #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does
  13907. not have the
  13908. %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
  13909. flags set, no dedicated thread is ever used and the call will be
  13910. handled in the same thread as the object that @interface belongs
  13911. to was exported in.</doc>
  13912. <return-value transfer-ownership="none">
  13913. <doc xml:space="preserve">%TRUE if the call is authorized, %FALSE otherwise.</doc>
  13914. <type name="gboolean" c:type="gboolean"/>
  13915. </return-value>
  13916. <parameters>
  13917. <parameter name="invocation" transfer-ownership="none">
  13918. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  13919. <type name="DBusMethodInvocation"/>
  13920. </parameter>
  13921. </parameters>
  13922. </glib:signal>
  13923. </class>
  13924. <record name="DBusInterfaceSkeletonClass"
  13925. c:type="GDBusInterfaceSkeletonClass"
  13926. glib:is-gtype-struct-for="DBusInterfaceSkeleton"
  13927. version="2.30">
  13928. <doc xml:space="preserve">Class structure for #GDBusInterfaceSkeleton.</doc>
  13929. <field name="parent_class">
  13930. <doc xml:space="preserve">The parent class.</doc>
  13931. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  13932. </field>
  13933. <field name="get_info">
  13934. <callback name="get_info">
  13935. <return-value transfer-ownership="none">
  13936. <doc xml:space="preserve">A #GDBusInterfaceInfo (never %NULL). Do not free.</doc>
  13937. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  13938. </return-value>
  13939. <parameters>
  13940. <parameter name="interface_" transfer-ownership="none">
  13941. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13942. <type name="DBusInterfaceSkeleton"
  13943. c:type="GDBusInterfaceSkeleton*"/>
  13944. </parameter>
  13945. </parameters>
  13946. </callback>
  13947. </field>
  13948. <field name="get_vtable" introspectable="0">
  13949. <callback name="get_vtable" introspectable="0">
  13950. <return-value>
  13951. <doc xml:space="preserve">A #GDBusInterfaceVTable (never %NULL).</doc>
  13952. <type name="DBusInterfaceVTable" c:type="GDBusInterfaceVTable*"/>
  13953. </return-value>
  13954. <parameters>
  13955. <parameter name="interface_" transfer-ownership="none">
  13956. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13957. <type name="DBusInterfaceSkeleton"
  13958. c:type="GDBusInterfaceSkeleton*"/>
  13959. </parameter>
  13960. </parameters>
  13961. </callback>
  13962. </field>
  13963. <field name="get_properties">
  13964. <callback name="get_properties">
  13965. <return-value transfer-ownership="full">
  13966. <doc xml:space="preserve">A #GVariant of type
  13967. ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS].
  13968. Free with g_variant_unref().</doc>
  13969. <type name="GLib.Variant" c:type="GVariant*"/>
  13970. </return-value>
  13971. <parameters>
  13972. <parameter name="interface_" transfer-ownership="none">
  13973. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13974. <type name="DBusInterfaceSkeleton"
  13975. c:type="GDBusInterfaceSkeleton*"/>
  13976. </parameter>
  13977. </parameters>
  13978. </callback>
  13979. </field>
  13980. <field name="flush">
  13981. <callback name="flush">
  13982. <return-value transfer-ownership="none">
  13983. <type name="none" c:type="void"/>
  13984. </return-value>
  13985. <parameters>
  13986. <parameter name="interface_" transfer-ownership="none">
  13987. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  13988. <type name="DBusInterfaceSkeleton"
  13989. c:type="GDBusInterfaceSkeleton*"/>
  13990. </parameter>
  13991. </parameters>
  13992. </callback>
  13993. </field>
  13994. <field name="vfunc_padding" readable="0" private="1">
  13995. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  13996. <type name="gpointer" c:type="gpointer"/>
  13997. </array>
  13998. </field>
  13999. <field name="g_authorize_method">
  14000. <callback name="g_authorize_method">
  14001. <return-value transfer-ownership="none">
  14002. <type name="gboolean" c:type="gboolean"/>
  14003. </return-value>
  14004. <parameters>
  14005. <parameter name="interface_" transfer-ownership="none">
  14006. <type name="DBusInterfaceSkeleton"
  14007. c:type="GDBusInterfaceSkeleton*"/>
  14008. </parameter>
  14009. <parameter name="invocation" transfer-ownership="none">
  14010. <type name="DBusMethodInvocation"
  14011. c:type="GDBusMethodInvocation*"/>
  14012. </parameter>
  14013. </parameters>
  14014. </callback>
  14015. </field>
  14016. <field name="signal_padding" readable="0" private="1">
  14017. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  14018. <type name="gpointer" c:type="gpointer"/>
  14019. </array>
  14020. </field>
  14021. </record>
  14022. <bitfield name="DBusInterfaceSkeletonFlags"
  14023. version="2.30"
  14024. glib:type-name="GDBusInterfaceSkeletonFlags"
  14025. glib:get-type="g_dbus_interface_skeleton_flags_get_type"
  14026. c:type="GDBusInterfaceSkeletonFlags">
  14027. <doc xml:space="preserve">Flags describing the behavior of a #GDBusInterfaceSkeleton instance.</doc>
  14028. <member name="none"
  14029. value="0"
  14030. c:identifier="G_DBUS_INTERFACE_SKELETON_FLAGS_NONE"
  14031. glib:nick="none">
  14032. <doc xml:space="preserve">No flags set.</doc>
  14033. </member>
  14034. <member name="handle_method_invocations_in_thread"
  14035. value="1"
  14036. c:identifier="G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD"
  14037. glib:nick="handle-method-invocations-in-thread">
  14038. <doc xml:space="preserve">Each method invocation is handled in
  14039. a thread dedicated to the invocation. This means that the method implementation can use blocking IO
  14040. without blocking any other part of the process. It also means that the method implementation must
  14041. use locking to access data structures used by other threads.</doc>
  14042. </member>
  14043. </bitfield>
  14044. <record name="DBusInterfaceSkeletonPrivate"
  14045. c:type="GDBusInterfaceSkeletonPrivate"
  14046. disguised="1">
  14047. </record>
  14048. <record name="DBusInterfaceVTable"
  14049. c:type="GDBusInterfaceVTable"
  14050. version="2.26">
  14051. <doc xml:space="preserve">Virtual table for handling properties and method calls for a D-Bus
  14052. interface.
  14053. Since 2.38, if you want to handle getting/setting D-Bus properties
  14054. asynchronously, give %NULL as your get_property() or set_property()
  14055. function. The D-Bus call will be directed to your @method_call function,
  14056. with the provided @interface_name set to "org.freedesktop.DBus.Properties".
  14057. Ownership of the #GDBusMethodInvocation object passed to the
  14058. method_call() function is transferred to your handler; you must
  14059. call one of the methods of #GDBusMethodInvocation to return a reply
  14060. (possibly empty), or an error. These functions also take ownership
  14061. of the passed-in invocation object, so unless the invocation
  14062. object has otherwise been referenced, it will be then be freed.
  14063. Calling one of these functions may be done within your
  14064. method_call() implementation but it also can be done at a later
  14065. point to handle the method asynchronously.
  14066. The usual checks on the validity of the calls is performed. For
  14067. `Get` calls, an error is automatically returned if the property does
  14068. not exist or the permissions do not allow access. The same checks are
  14069. performed for `Set` calls, and the provided value is also checked for
  14070. being the correct type.
  14071. For both `Get` and `Set` calls, the #GDBusMethodInvocation
  14072. passed to the @method_call handler can be queried with
  14073. g_dbus_method_invocation_get_property_info() to get a pointer
  14074. to the #GDBusPropertyInfo of the property.
  14075. If you have readable properties specified in your interface info,
  14076. you must ensure that you either provide a non-%NULL @get_property()
  14077. function or provide implementations of both the `Get` and `GetAll`
  14078. methods on org.freedesktop.DBus.Properties interface in your @method_call
  14079. function. Note that the required return type of the `Get` call is
  14080. `(v)`, not the type of the property. `GetAll` expects a return value
  14081. of type `a{sv}`.
  14082. If you have writable properties specified in your interface info,
  14083. you must ensure that you either provide a non-%NULL @set_property()
  14084. function or provide an implementation of the `Set` call. If implementing
  14085. the call, you must return the value of type %G_VARIANT_TYPE_UNIT.</doc>
  14086. <field name="method_call" writable="1">
  14087. <doc xml:space="preserve">Function for handling incoming method calls.</doc>
  14088. <type name="DBusInterfaceMethodCallFunc"
  14089. c:type="GDBusInterfaceMethodCallFunc"/>
  14090. </field>
  14091. <field name="get_property" writable="1">
  14092. <doc xml:space="preserve">Function for getting a property.</doc>
  14093. <type name="DBusInterfaceGetPropertyFunc"
  14094. c:type="GDBusInterfaceGetPropertyFunc"/>
  14095. </field>
  14096. <field name="set_property" writable="1">
  14097. <doc xml:space="preserve">Function for setting a property.</doc>
  14098. <type name="DBusInterfaceSetPropertyFunc"
  14099. c:type="GDBusInterfaceSetPropertyFunc"/>
  14100. </field>
  14101. <field name="padding" readable="0" private="1">
  14102. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  14103. <type name="gpointer" c:type="gpointer"/>
  14104. </array>
  14105. </field>
  14106. </record>
  14107. <class name="DBusMenuModel"
  14108. c:symbol-prefix="dbus_menu_model"
  14109. c:type="GDBusMenuModel"
  14110. parent="MenuModel"
  14111. glib:type-name="GDBusMenuModel"
  14112. glib:get-type="g_dbus_menu_model_get_type">
  14113. <doc xml:space="preserve">#GDBusMenuModel is an implementation of #GMenuModel that can be used
  14114. as a proxy for a menu model that is exported over D-Bus with
  14115. g_dbus_connection_export_menu_model().</doc>
  14116. <function name="get" c:identifier="g_dbus_menu_model_get" version="2.32">
  14117. <doc xml:space="preserve">Obtains a #GDBusMenuModel for the menu model which is exported
  14118. at the given @bus_name and @object_path.
  14119. The thread default main context is taken at the time of this call.
  14120. All signals on the menu model (and any linked models) are reported
  14121. with respect to this context. All calls on the returned menu model
  14122. (and linked models) must also originate from this same context, with
  14123. the thread default main context unchanged.</doc>
  14124. <return-value transfer-ownership="full">
  14125. <doc xml:space="preserve">a #GDBusMenuModel object. Free with
  14126. g_object_unref().</doc>
  14127. <type name="DBusMenuModel" c:type="GDBusMenuModel*"/>
  14128. </return-value>
  14129. <parameters>
  14130. <parameter name="connection" transfer-ownership="none">
  14131. <doc xml:space="preserve">a #GDBusConnection</doc>
  14132. <type name="DBusConnection" c:type="GDBusConnection*"/>
  14133. </parameter>
  14134. <parameter name="bus_name" transfer-ownership="none">
  14135. <doc xml:space="preserve">the bus name which exports the menu model</doc>
  14136. <type name="utf8" c:type="const gchar*"/>
  14137. </parameter>
  14138. <parameter name="object_path" transfer-ownership="none">
  14139. <doc xml:space="preserve">the object path at which the menu model is exported</doc>
  14140. <type name="utf8" c:type="const gchar*"/>
  14141. </parameter>
  14142. </parameters>
  14143. </function>
  14144. </class>
  14145. <class name="DBusMessage"
  14146. c:symbol-prefix="dbus_message"
  14147. c:type="GDBusMessage"
  14148. version="2.26"
  14149. parent="GObject.Object"
  14150. glib:type-name="GDBusMessage"
  14151. glib:get-type="g_dbus_message_get_type">
  14152. <doc xml:space="preserve">A type for representing D-Bus messages that can be sent or received
  14153. on a #GDBusConnection.</doc>
  14154. <constructor name="new" c:identifier="g_dbus_message_new" version="2.26">
  14155. <doc xml:space="preserve">Creates a new empty #GDBusMessage.</doc>
  14156. <return-value transfer-ownership="full">
  14157. <doc xml:space="preserve">A #GDBusMessage. Free with g_object_unref().</doc>
  14158. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14159. </return-value>
  14160. </constructor>
  14161. <constructor name="new_from_blob"
  14162. c:identifier="g_dbus_message_new_from_blob"
  14163. version="2.26"
  14164. throws="1">
  14165. <doc xml:space="preserve">Creates a new #GDBusMessage from the data stored at @blob. The byte
  14166. order that the message was in can be retrieved using
  14167. g_dbus_message_get_byte_order().</doc>
  14168. <return-value transfer-ownership="full">
  14169. <doc xml:space="preserve">A new #GDBusMessage or %NULL if @error is set. Free with
  14170. g_object_unref().</doc>
  14171. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14172. </return-value>
  14173. <parameters>
  14174. <parameter name="blob" transfer-ownership="none">
  14175. <doc xml:space="preserve">A blob represent a binary D-Bus message.</doc>
  14176. <array length="1" zero-terminated="0" c:type="guchar*">
  14177. <type name="guint8"/>
  14178. </array>
  14179. </parameter>
  14180. <parameter name="blob_len" transfer-ownership="none">
  14181. <doc xml:space="preserve">The length of @blob.</doc>
  14182. <type name="gsize" c:type="gsize"/>
  14183. </parameter>
  14184. <parameter name="capabilities" transfer-ownership="none">
  14185. <doc xml:space="preserve">A #GDBusCapabilityFlags describing what protocol features are supported.</doc>
  14186. <type name="DBusCapabilityFlags" c:type="GDBusCapabilityFlags"/>
  14187. </parameter>
  14188. </parameters>
  14189. </constructor>
  14190. <constructor name="new_method_call"
  14191. c:identifier="g_dbus_message_new_method_call"
  14192. version="2.26">
  14193. <doc xml:space="preserve">Creates a new #GDBusMessage for a method call.</doc>
  14194. <return-value transfer-ownership="full">
  14195. <doc xml:space="preserve">A #GDBusMessage. Free with g_object_unref().</doc>
  14196. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14197. </return-value>
  14198. <parameters>
  14199. <parameter name="name"
  14200. transfer-ownership="none"
  14201. nullable="1"
  14202. allow-none="1">
  14203. <doc xml:space="preserve">A valid D-Bus name or %NULL.</doc>
  14204. <type name="utf8" c:type="const gchar*"/>
  14205. </parameter>
  14206. <parameter name="path" transfer-ownership="none">
  14207. <doc xml:space="preserve">A valid object path.</doc>
  14208. <type name="utf8" c:type="const gchar*"/>
  14209. </parameter>
  14210. <parameter name="interface_"
  14211. transfer-ownership="none"
  14212. nullable="1"
  14213. allow-none="1">
  14214. <doc xml:space="preserve">A valid D-Bus interface name or %NULL.</doc>
  14215. <type name="utf8" c:type="const gchar*"/>
  14216. </parameter>
  14217. <parameter name="method" transfer-ownership="none">
  14218. <doc xml:space="preserve">A valid method name.</doc>
  14219. <type name="utf8" c:type="const gchar*"/>
  14220. </parameter>
  14221. </parameters>
  14222. </constructor>
  14223. <constructor name="new_signal"
  14224. c:identifier="g_dbus_message_new_signal"
  14225. version="2.26">
  14226. <doc xml:space="preserve">Creates a new #GDBusMessage for a signal emission.</doc>
  14227. <return-value transfer-ownership="full">
  14228. <doc xml:space="preserve">A #GDBusMessage. Free with g_object_unref().</doc>
  14229. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14230. </return-value>
  14231. <parameters>
  14232. <parameter name="path" transfer-ownership="none">
  14233. <doc xml:space="preserve">A valid object path.</doc>
  14234. <type name="utf8" c:type="const gchar*"/>
  14235. </parameter>
  14236. <parameter name="interface_" transfer-ownership="none">
  14237. <doc xml:space="preserve">A valid D-Bus interface name.</doc>
  14238. <type name="utf8" c:type="const gchar*"/>
  14239. </parameter>
  14240. <parameter name="signal" transfer-ownership="none">
  14241. <doc xml:space="preserve">A valid signal name.</doc>
  14242. <type name="utf8" c:type="const gchar*"/>
  14243. </parameter>
  14244. </parameters>
  14245. </constructor>
  14246. <function name="bytes_needed"
  14247. c:identifier="g_dbus_message_bytes_needed"
  14248. version="2.26"
  14249. throws="1">
  14250. <doc xml:space="preserve">Utility function to calculate how many bytes are needed to
  14251. completely deserialize the D-Bus message stored at @blob.</doc>
  14252. <return-value transfer-ownership="none">
  14253. <doc xml:space="preserve">Number of bytes needed or -1 if @error is set (e.g. if
  14254. @blob contains invalid data or not enough data is available to
  14255. determine the size).</doc>
  14256. <type name="gssize" c:type="gssize"/>
  14257. </return-value>
  14258. <parameters>
  14259. <parameter name="blob" transfer-ownership="none">
  14260. <doc xml:space="preserve">A blob represent a binary D-Bus message.</doc>
  14261. <array length="1" zero-terminated="0" c:type="guchar*">
  14262. <type name="guint8"/>
  14263. </array>
  14264. </parameter>
  14265. <parameter name="blob_len" transfer-ownership="none">
  14266. <doc xml:space="preserve">The length of @blob (must be at least 16).</doc>
  14267. <type name="gsize" c:type="gsize"/>
  14268. </parameter>
  14269. </parameters>
  14270. </function>
  14271. <method name="copy"
  14272. c:identifier="g_dbus_message_copy"
  14273. version="2.26"
  14274. throws="1">
  14275. <doc xml:space="preserve">Copies @message. The copy is a deep copy and the returned
  14276. #GDBusMessage is completely identical except that it is guaranteed
  14277. to not be locked.
  14278. This operation can fail if e.g. @message contains file descriptors
  14279. and the per-process or system-wide open files limit is reached.</doc>
  14280. <return-value transfer-ownership="full">
  14281. <doc xml:space="preserve">A new #GDBusMessage or %NULL if @error is set.
  14282. Free with g_object_unref().</doc>
  14283. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14284. </return-value>
  14285. <parameters>
  14286. <instance-parameter name="message" transfer-ownership="none">
  14287. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14288. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14289. </instance-parameter>
  14290. </parameters>
  14291. </method>
  14292. <method name="get_arg0"
  14293. c:identifier="g_dbus_message_get_arg0"
  14294. version="2.26">
  14295. <doc xml:space="preserve">Convenience to get the first item in the body of @message.</doc>
  14296. <return-value transfer-ownership="none">
  14297. <doc xml:space="preserve">The string item or %NULL if the first item in the body of
  14298. @message is not a string.</doc>
  14299. <type name="utf8" c:type="const gchar*"/>
  14300. </return-value>
  14301. <parameters>
  14302. <instance-parameter name="message" transfer-ownership="none">
  14303. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14304. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14305. </instance-parameter>
  14306. </parameters>
  14307. </method>
  14308. <method name="get_body"
  14309. c:identifier="g_dbus_message_get_body"
  14310. version="2.26">
  14311. <doc xml:space="preserve">Gets the body of a message.</doc>
  14312. <return-value transfer-ownership="none">
  14313. <doc xml:space="preserve">A #GVariant or %NULL if the body is
  14314. empty. Do not free, it is owned by @message.</doc>
  14315. <type name="GLib.Variant" c:type="GVariant*"/>
  14316. </return-value>
  14317. <parameters>
  14318. <instance-parameter name="message" transfer-ownership="none">
  14319. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14320. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14321. </instance-parameter>
  14322. </parameters>
  14323. </method>
  14324. <method name="get_byte_order"
  14325. c:identifier="g_dbus_message_get_byte_order">
  14326. <doc xml:space="preserve">Gets the byte order of @message.</doc>
  14327. <return-value transfer-ownership="none">
  14328. <doc xml:space="preserve">The byte order.</doc>
  14329. <type name="DBusMessageByteOrder" c:type="GDBusMessageByteOrder"/>
  14330. </return-value>
  14331. <parameters>
  14332. <instance-parameter name="message" transfer-ownership="none">
  14333. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14334. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14335. </instance-parameter>
  14336. </parameters>
  14337. </method>
  14338. <method name="get_destination"
  14339. c:identifier="g_dbus_message_get_destination"
  14340. version="2.26">
  14341. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.</doc>
  14342. <return-value transfer-ownership="none">
  14343. <doc xml:space="preserve">The value.</doc>
  14344. <type name="utf8" c:type="const gchar*"/>
  14345. </return-value>
  14346. <parameters>
  14347. <instance-parameter name="message" transfer-ownership="none">
  14348. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14349. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14350. </instance-parameter>
  14351. </parameters>
  14352. </method>
  14353. <method name="get_error_name"
  14354. c:identifier="g_dbus_message_get_error_name"
  14355. version="2.26">
  14356. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.</doc>
  14357. <return-value transfer-ownership="none">
  14358. <doc xml:space="preserve">The value.</doc>
  14359. <type name="utf8" c:type="const gchar*"/>
  14360. </return-value>
  14361. <parameters>
  14362. <instance-parameter name="message" transfer-ownership="none">
  14363. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14364. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14365. </instance-parameter>
  14366. </parameters>
  14367. </method>
  14368. <method name="get_flags"
  14369. c:identifier="g_dbus_message_get_flags"
  14370. version="2.26">
  14371. <doc xml:space="preserve">Gets the flags for @message.</doc>
  14372. <return-value transfer-ownership="none">
  14373. <doc xml:space="preserve">Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).</doc>
  14374. <type name="DBusMessageFlags" c:type="GDBusMessageFlags"/>
  14375. </return-value>
  14376. <parameters>
  14377. <instance-parameter name="message" transfer-ownership="none">
  14378. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14379. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14380. </instance-parameter>
  14381. </parameters>
  14382. </method>
  14383. <method name="get_header"
  14384. c:identifier="g_dbus_message_get_header"
  14385. version="2.26">
  14386. <doc xml:space="preserve">Gets a header field on @message.</doc>
  14387. <return-value transfer-ownership="full">
  14388. <doc xml:space="preserve">A #GVariant with the value if the header was found, %NULL
  14389. otherwise. Do not free, it is owned by @message.</doc>
  14390. <type name="GLib.Variant" c:type="GVariant*"/>
  14391. </return-value>
  14392. <parameters>
  14393. <instance-parameter name="message" transfer-ownership="none">
  14394. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14395. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14396. </instance-parameter>
  14397. <parameter name="header_field" transfer-ownership="none">
  14398. <doc xml:space="preserve">A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)</doc>
  14399. <type name="DBusMessageHeaderField"
  14400. c:type="GDBusMessageHeaderField"/>
  14401. </parameter>
  14402. </parameters>
  14403. </method>
  14404. <method name="get_header_fields"
  14405. c:identifier="g_dbus_message_get_header_fields"
  14406. version="2.26">
  14407. <doc xml:space="preserve">Gets an array of all header fields on @message that are set.</doc>
  14408. <return-value transfer-ownership="none">
  14409. <doc xml:space="preserve">An array of header fields
  14410. terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element
  14411. is a #guchar. Free with g_free().</doc>
  14412. <array c:type="guchar*">
  14413. <type name="guint8" c:type="guchar"/>
  14414. </array>
  14415. </return-value>
  14416. <parameters>
  14417. <instance-parameter name="message" transfer-ownership="none">
  14418. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14419. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14420. </instance-parameter>
  14421. </parameters>
  14422. </method>
  14423. <method name="get_interface"
  14424. c:identifier="g_dbus_message_get_interface"
  14425. version="2.26">
  14426. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.</doc>
  14427. <return-value transfer-ownership="none">
  14428. <doc xml:space="preserve">The value.</doc>
  14429. <type name="utf8" c:type="const gchar*"/>
  14430. </return-value>
  14431. <parameters>
  14432. <instance-parameter name="message" transfer-ownership="none">
  14433. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14434. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14435. </instance-parameter>
  14436. </parameters>
  14437. </method>
  14438. <method name="get_locked"
  14439. c:identifier="g_dbus_message_get_locked"
  14440. version="2.26">
  14441. <doc xml:space="preserve">Checks whether @message is locked. To monitor changes to this
  14442. value, conncet to the #GObject::notify signal to listen for changes
  14443. on the #GDBusMessage:locked property.</doc>
  14444. <return-value transfer-ownership="none">
  14445. <doc xml:space="preserve">%TRUE if @message is locked, %FALSE otherwise.</doc>
  14446. <type name="gboolean" c:type="gboolean"/>
  14447. </return-value>
  14448. <parameters>
  14449. <instance-parameter name="message" transfer-ownership="none">
  14450. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14451. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14452. </instance-parameter>
  14453. </parameters>
  14454. </method>
  14455. <method name="get_member"
  14456. c:identifier="g_dbus_message_get_member"
  14457. version="2.26">
  14458. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.</doc>
  14459. <return-value transfer-ownership="none">
  14460. <doc xml:space="preserve">The value.</doc>
  14461. <type name="utf8" c:type="const gchar*"/>
  14462. </return-value>
  14463. <parameters>
  14464. <instance-parameter name="message" transfer-ownership="none">
  14465. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14466. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14467. </instance-parameter>
  14468. </parameters>
  14469. </method>
  14470. <method name="get_message_type"
  14471. c:identifier="g_dbus_message_get_message_type"
  14472. version="2.26">
  14473. <doc xml:space="preserve">Gets the type of @message.</doc>
  14474. <return-value transfer-ownership="none">
  14475. <doc xml:space="preserve">A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).</doc>
  14476. <type name="DBusMessageType" c:type="GDBusMessageType"/>
  14477. </return-value>
  14478. <parameters>
  14479. <instance-parameter name="message" transfer-ownership="none">
  14480. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14481. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14482. </instance-parameter>
  14483. </parameters>
  14484. </method>
  14485. <method name="get_num_unix_fds"
  14486. c:identifier="g_dbus_message_get_num_unix_fds"
  14487. version="2.26">
  14488. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.</doc>
  14489. <return-value transfer-ownership="none">
  14490. <doc xml:space="preserve">The value.</doc>
  14491. <type name="guint32" c:type="guint32"/>
  14492. </return-value>
  14493. <parameters>
  14494. <instance-parameter name="message" transfer-ownership="none">
  14495. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14496. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14497. </instance-parameter>
  14498. </parameters>
  14499. </method>
  14500. <method name="get_path"
  14501. c:identifier="g_dbus_message_get_path"
  14502. version="2.26">
  14503. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.</doc>
  14504. <return-value transfer-ownership="none">
  14505. <doc xml:space="preserve">The value.</doc>
  14506. <type name="utf8" c:type="const gchar*"/>
  14507. </return-value>
  14508. <parameters>
  14509. <instance-parameter name="message" transfer-ownership="none">
  14510. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14511. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14512. </instance-parameter>
  14513. </parameters>
  14514. </method>
  14515. <method name="get_reply_serial"
  14516. c:identifier="g_dbus_message_get_reply_serial"
  14517. version="2.26">
  14518. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.</doc>
  14519. <return-value transfer-ownership="none">
  14520. <doc xml:space="preserve">The value.</doc>
  14521. <type name="guint32" c:type="guint32"/>
  14522. </return-value>
  14523. <parameters>
  14524. <instance-parameter name="message" transfer-ownership="none">
  14525. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14526. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14527. </instance-parameter>
  14528. </parameters>
  14529. </method>
  14530. <method name="get_sender"
  14531. c:identifier="g_dbus_message_get_sender"
  14532. version="2.26">
  14533. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.</doc>
  14534. <return-value transfer-ownership="none">
  14535. <doc xml:space="preserve">The value.</doc>
  14536. <type name="utf8" c:type="const gchar*"/>
  14537. </return-value>
  14538. <parameters>
  14539. <instance-parameter name="message" transfer-ownership="none">
  14540. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14541. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14542. </instance-parameter>
  14543. </parameters>
  14544. </method>
  14545. <method name="get_serial"
  14546. c:identifier="g_dbus_message_get_serial"
  14547. version="2.26">
  14548. <doc xml:space="preserve">Gets the serial for @message.</doc>
  14549. <return-value transfer-ownership="none">
  14550. <doc xml:space="preserve">A #guint32.</doc>
  14551. <type name="guint32" c:type="guint32"/>
  14552. </return-value>
  14553. <parameters>
  14554. <instance-parameter name="message" transfer-ownership="none">
  14555. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14556. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14557. </instance-parameter>
  14558. </parameters>
  14559. </method>
  14560. <method name="get_signature"
  14561. c:identifier="g_dbus_message_get_signature"
  14562. version="2.26">
  14563. <doc xml:space="preserve">Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.</doc>
  14564. <return-value transfer-ownership="none">
  14565. <doc xml:space="preserve">The value.</doc>
  14566. <type name="utf8" c:type="const gchar*"/>
  14567. </return-value>
  14568. <parameters>
  14569. <instance-parameter name="message" transfer-ownership="none">
  14570. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14571. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14572. </instance-parameter>
  14573. </parameters>
  14574. </method>
  14575. <method name="get_unix_fd_list"
  14576. c:identifier="g_dbus_message_get_unix_fd_list"
  14577. version="2.26">
  14578. <doc xml:space="preserve">Gets the UNIX file descriptors associated with @message, if any.
  14579. This method is only available on UNIX.</doc>
  14580. <return-value transfer-ownership="none">
  14581. <doc xml:space="preserve">A #GUnixFDList or %NULL if no file descriptors are
  14582. associated. Do not free, this object is owned by @message.</doc>
  14583. <type name="UnixFDList" c:type="GUnixFDList*"/>
  14584. </return-value>
  14585. <parameters>
  14586. <instance-parameter name="message" transfer-ownership="none">
  14587. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14588. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14589. </instance-parameter>
  14590. </parameters>
  14591. </method>
  14592. <method name="lock" c:identifier="g_dbus_message_lock" version="2.26">
  14593. <doc xml:space="preserve">If @message is locked, does nothing. Otherwise locks the message.</doc>
  14594. <return-value transfer-ownership="none">
  14595. <type name="none" c:type="void"/>
  14596. </return-value>
  14597. <parameters>
  14598. <instance-parameter name="message" transfer-ownership="none">
  14599. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14600. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14601. </instance-parameter>
  14602. </parameters>
  14603. </method>
  14604. <method name="new_method_error"
  14605. c:identifier="g_dbus_message_new_method_error"
  14606. version="2.26"
  14607. introspectable="0">
  14608. <doc xml:space="preserve">Creates a new #GDBusMessage that is an error reply to @method_call_message.</doc>
  14609. <return-value transfer-ownership="full">
  14610. <doc xml:space="preserve">A #GDBusMessage. Free with g_object_unref().</doc>
  14611. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14612. </return-value>
  14613. <parameters>
  14614. <instance-parameter name="method_call_message"
  14615. transfer-ownership="none">
  14616. <doc xml:space="preserve">A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to
  14617. create a reply message to.</doc>
  14618. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14619. </instance-parameter>
  14620. <parameter name="error_name" transfer-ownership="none">
  14621. <doc xml:space="preserve">A valid D-Bus error name.</doc>
  14622. <type name="utf8" c:type="const gchar*"/>
  14623. </parameter>
  14624. <parameter name="error_message_format" transfer-ownership="none">
  14625. <doc xml:space="preserve">The D-Bus error message in a printf() format.</doc>
  14626. <type name="utf8" c:type="const gchar*"/>
  14627. </parameter>
  14628. <parameter name="..." transfer-ownership="none">
  14629. <doc xml:space="preserve">Arguments for @error_message_format.</doc>
  14630. <varargs/>
  14631. </parameter>
  14632. </parameters>
  14633. </method>
  14634. <method name="new_method_error_literal"
  14635. c:identifier="g_dbus_message_new_method_error_literal"
  14636. version="2.26">
  14637. <doc xml:space="preserve">Creates a new #GDBusMessage that is an error reply to @method_call_message.</doc>
  14638. <return-value transfer-ownership="full">
  14639. <doc xml:space="preserve">A #GDBusMessage. Free with g_object_unref().</doc>
  14640. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14641. </return-value>
  14642. <parameters>
  14643. <instance-parameter name="method_call_message"
  14644. transfer-ownership="none">
  14645. <doc xml:space="preserve">A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to
  14646. create a reply message to.</doc>
  14647. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14648. </instance-parameter>
  14649. <parameter name="error_name" transfer-ownership="none">
  14650. <doc xml:space="preserve">A valid D-Bus error name.</doc>
  14651. <type name="utf8" c:type="const gchar*"/>
  14652. </parameter>
  14653. <parameter name="error_message" transfer-ownership="none">
  14654. <doc xml:space="preserve">The D-Bus error message.</doc>
  14655. <type name="utf8" c:type="const gchar*"/>
  14656. </parameter>
  14657. </parameters>
  14658. </method>
  14659. <method name="new_method_error_valist"
  14660. c:identifier="g_dbus_message_new_method_error_valist"
  14661. version="2.26"
  14662. introspectable="0">
  14663. <doc xml:space="preserve">Like g_dbus_message_new_method_error() but intended for language bindings.</doc>
  14664. <return-value transfer-ownership="full">
  14665. <doc xml:space="preserve">A #GDBusMessage. Free with g_object_unref().</doc>
  14666. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14667. </return-value>
  14668. <parameters>
  14669. <instance-parameter name="method_call_message"
  14670. transfer-ownership="none">
  14671. <doc xml:space="preserve">A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to
  14672. create a reply message to.</doc>
  14673. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14674. </instance-parameter>
  14675. <parameter name="error_name" transfer-ownership="none">
  14676. <doc xml:space="preserve">A valid D-Bus error name.</doc>
  14677. <type name="utf8" c:type="const gchar*"/>
  14678. </parameter>
  14679. <parameter name="error_message_format" transfer-ownership="none">
  14680. <doc xml:space="preserve">The D-Bus error message in a printf() format.</doc>
  14681. <type name="utf8" c:type="const gchar*"/>
  14682. </parameter>
  14683. <parameter name="var_args" transfer-ownership="none">
  14684. <doc xml:space="preserve">Arguments for @error_message_format.</doc>
  14685. <type name="va_list" c:type="va_list"/>
  14686. </parameter>
  14687. </parameters>
  14688. </method>
  14689. <method name="new_method_reply"
  14690. c:identifier="g_dbus_message_new_method_reply"
  14691. version="2.26">
  14692. <doc xml:space="preserve">Creates a new #GDBusMessage that is a reply to @method_call_message.</doc>
  14693. <return-value transfer-ownership="full">
  14694. <doc xml:space="preserve">#GDBusMessage. Free with g_object_unref().</doc>
  14695. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14696. </return-value>
  14697. <parameters>
  14698. <instance-parameter name="method_call_message"
  14699. transfer-ownership="none">
  14700. <doc xml:space="preserve">A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to
  14701. create a reply message to.</doc>
  14702. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14703. </instance-parameter>
  14704. </parameters>
  14705. </method>
  14706. <method name="print" c:identifier="g_dbus_message_print" version="2.26">
  14707. <doc xml:space="preserve">Produces a human-readable multi-line description of @message.
  14708. The contents of the description has no ABI guarantees, the contents
  14709. and formatting is subject to change at any time. Typical output
  14710. looks something like this:
  14711. |[
  14712. Flags: none
  14713. Version: 0
  14714. Serial: 4
  14715. Headers:
  14716. path -&gt; objectpath '/org/gtk/GDBus/TestObject'
  14717. interface -&gt; 'org.gtk.GDBus.TestInterface'
  14718. member -&gt; 'GimmeStdout'
  14719. destination -&gt; ':1.146'
  14720. Body: ()
  14721. UNIX File Descriptors:
  14722. (none)
  14723. ]|
  14724. or
  14725. |[
  14726. Flags: no-reply-expected
  14727. Version: 0
  14728. Serial: 477
  14729. Headers:
  14730. reply-serial -&gt; uint32 4
  14731. destination -&gt; ':1.159'
  14732. sender -&gt; ':1.146'
  14733. num-unix-fds -&gt; uint32 1
  14734. Body: ()
  14735. UNIX File Descriptors:
  14736. fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
  14737. ]|</doc>
  14738. <return-value transfer-ownership="full">
  14739. <doc xml:space="preserve">A string that should be freed with g_free().</doc>
  14740. <type name="utf8" c:type="gchar*"/>
  14741. </return-value>
  14742. <parameters>
  14743. <instance-parameter name="message" transfer-ownership="none">
  14744. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14745. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14746. </instance-parameter>
  14747. <parameter name="indent" transfer-ownership="none">
  14748. <doc xml:space="preserve">Indentation level.</doc>
  14749. <type name="guint" c:type="guint"/>
  14750. </parameter>
  14751. </parameters>
  14752. </method>
  14753. <method name="set_body"
  14754. c:identifier="g_dbus_message_set_body"
  14755. version="2.26">
  14756. <doc xml:space="preserve">Sets the body @message. As a side-effect the
  14757. %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
  14758. type string of @body (or cleared if @body is %NULL).
  14759. If @body is floating, @message assumes ownership of @body.</doc>
  14760. <return-value transfer-ownership="none">
  14761. <type name="none" c:type="void"/>
  14762. </return-value>
  14763. <parameters>
  14764. <instance-parameter name="message" transfer-ownership="none">
  14765. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14766. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14767. </instance-parameter>
  14768. <parameter name="body" transfer-ownership="none">
  14769. <doc xml:space="preserve">Either %NULL or a #GVariant that is a tuple.</doc>
  14770. <type name="GLib.Variant" c:type="GVariant*"/>
  14771. </parameter>
  14772. </parameters>
  14773. </method>
  14774. <method name="set_byte_order"
  14775. c:identifier="g_dbus_message_set_byte_order">
  14776. <doc xml:space="preserve">Sets the byte order of @message.</doc>
  14777. <return-value transfer-ownership="none">
  14778. <type name="none" c:type="void"/>
  14779. </return-value>
  14780. <parameters>
  14781. <instance-parameter name="message" transfer-ownership="none">
  14782. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14783. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14784. </instance-parameter>
  14785. <parameter name="byte_order" transfer-ownership="none">
  14786. <doc xml:space="preserve">The byte order.</doc>
  14787. <type name="DBusMessageByteOrder" c:type="GDBusMessageByteOrder"/>
  14788. </parameter>
  14789. </parameters>
  14790. </method>
  14791. <method name="set_destination"
  14792. c:identifier="g_dbus_message_set_destination"
  14793. version="2.26">
  14794. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.</doc>
  14795. <return-value transfer-ownership="none">
  14796. <type name="none" c:type="void"/>
  14797. </return-value>
  14798. <parameters>
  14799. <instance-parameter name="message" transfer-ownership="none">
  14800. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14801. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14802. </instance-parameter>
  14803. <parameter name="value" transfer-ownership="none">
  14804. <doc xml:space="preserve">The value to set.</doc>
  14805. <type name="utf8" c:type="const gchar*"/>
  14806. </parameter>
  14807. </parameters>
  14808. </method>
  14809. <method name="set_error_name"
  14810. c:identifier="g_dbus_message_set_error_name"
  14811. version="2.26">
  14812. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.</doc>
  14813. <return-value transfer-ownership="none">
  14814. <type name="none" c:type="void"/>
  14815. </return-value>
  14816. <parameters>
  14817. <instance-parameter name="message" transfer-ownership="none">
  14818. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14819. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14820. </instance-parameter>
  14821. <parameter name="value" transfer-ownership="none">
  14822. <doc xml:space="preserve">The value to set.</doc>
  14823. <type name="utf8" c:type="const gchar*"/>
  14824. </parameter>
  14825. </parameters>
  14826. </method>
  14827. <method name="set_flags"
  14828. c:identifier="g_dbus_message_set_flags"
  14829. version="2.26">
  14830. <doc xml:space="preserve">Sets the flags to set on @message.</doc>
  14831. <return-value transfer-ownership="none">
  14832. <type name="none" c:type="void"/>
  14833. </return-value>
  14834. <parameters>
  14835. <instance-parameter name="message" transfer-ownership="none">
  14836. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14837. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14838. </instance-parameter>
  14839. <parameter name="flags" transfer-ownership="none">
  14840. <doc xml:space="preserve">Flags for @message that are set (typically values from the #GDBusMessageFlags
  14841. enumeration bitwise ORed together).</doc>
  14842. <type name="DBusMessageFlags" c:type="GDBusMessageFlags"/>
  14843. </parameter>
  14844. </parameters>
  14845. </method>
  14846. <method name="set_header"
  14847. c:identifier="g_dbus_message_set_header"
  14848. version="2.26">
  14849. <doc xml:space="preserve">Sets a header field on @message.
  14850. If @value is floating, @message assumes ownership of @value.</doc>
  14851. <return-value transfer-ownership="none">
  14852. <type name="none" c:type="void"/>
  14853. </return-value>
  14854. <parameters>
  14855. <instance-parameter name="message" transfer-ownership="none">
  14856. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14857. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14858. </instance-parameter>
  14859. <parameter name="header_field" transfer-ownership="none">
  14860. <doc xml:space="preserve">A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)</doc>
  14861. <type name="DBusMessageHeaderField"
  14862. c:type="GDBusMessageHeaderField"/>
  14863. </parameter>
  14864. <parameter name="value"
  14865. transfer-ownership="none"
  14866. nullable="1"
  14867. allow-none="1">
  14868. <doc xml:space="preserve">A #GVariant to set the header field or %NULL to clear the header field.</doc>
  14869. <type name="GLib.Variant" c:type="GVariant*"/>
  14870. </parameter>
  14871. </parameters>
  14872. </method>
  14873. <method name="set_interface"
  14874. c:identifier="g_dbus_message_set_interface"
  14875. version="2.26">
  14876. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.</doc>
  14877. <return-value transfer-ownership="none">
  14878. <type name="none" c:type="void"/>
  14879. </return-value>
  14880. <parameters>
  14881. <instance-parameter name="message" transfer-ownership="none">
  14882. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14883. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14884. </instance-parameter>
  14885. <parameter name="value" transfer-ownership="none">
  14886. <doc xml:space="preserve">The value to set.</doc>
  14887. <type name="utf8" c:type="const gchar*"/>
  14888. </parameter>
  14889. </parameters>
  14890. </method>
  14891. <method name="set_member"
  14892. c:identifier="g_dbus_message_set_member"
  14893. version="2.26">
  14894. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.</doc>
  14895. <return-value transfer-ownership="none">
  14896. <type name="none" c:type="void"/>
  14897. </return-value>
  14898. <parameters>
  14899. <instance-parameter name="message" transfer-ownership="none">
  14900. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14901. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14902. </instance-parameter>
  14903. <parameter name="value" transfer-ownership="none">
  14904. <doc xml:space="preserve">The value to set.</doc>
  14905. <type name="utf8" c:type="const gchar*"/>
  14906. </parameter>
  14907. </parameters>
  14908. </method>
  14909. <method name="set_message_type"
  14910. c:identifier="g_dbus_message_set_message_type"
  14911. version="2.26">
  14912. <doc xml:space="preserve">Sets @message to be of @type.</doc>
  14913. <return-value transfer-ownership="none">
  14914. <type name="none" c:type="void"/>
  14915. </return-value>
  14916. <parameters>
  14917. <instance-parameter name="message" transfer-ownership="none">
  14918. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14919. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14920. </instance-parameter>
  14921. <parameter name="type" transfer-ownership="none">
  14922. <doc xml:space="preserve">A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).</doc>
  14923. <type name="DBusMessageType" c:type="GDBusMessageType"/>
  14924. </parameter>
  14925. </parameters>
  14926. </method>
  14927. <method name="set_num_unix_fds"
  14928. c:identifier="g_dbus_message_set_num_unix_fds"
  14929. version="2.26">
  14930. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.</doc>
  14931. <return-value transfer-ownership="none">
  14932. <type name="none" c:type="void"/>
  14933. </return-value>
  14934. <parameters>
  14935. <instance-parameter name="message" transfer-ownership="none">
  14936. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14937. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14938. </instance-parameter>
  14939. <parameter name="value" transfer-ownership="none">
  14940. <doc xml:space="preserve">The value to set.</doc>
  14941. <type name="guint32" c:type="guint32"/>
  14942. </parameter>
  14943. </parameters>
  14944. </method>
  14945. <method name="set_path"
  14946. c:identifier="g_dbus_message_set_path"
  14947. version="2.26">
  14948. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.</doc>
  14949. <return-value transfer-ownership="none">
  14950. <type name="none" c:type="void"/>
  14951. </return-value>
  14952. <parameters>
  14953. <instance-parameter name="message" transfer-ownership="none">
  14954. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14955. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14956. </instance-parameter>
  14957. <parameter name="value" transfer-ownership="none">
  14958. <doc xml:space="preserve">The value to set.</doc>
  14959. <type name="utf8" c:type="const gchar*"/>
  14960. </parameter>
  14961. </parameters>
  14962. </method>
  14963. <method name="set_reply_serial"
  14964. c:identifier="g_dbus_message_set_reply_serial"
  14965. version="2.26">
  14966. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.</doc>
  14967. <return-value transfer-ownership="none">
  14968. <type name="none" c:type="void"/>
  14969. </return-value>
  14970. <parameters>
  14971. <instance-parameter name="message" transfer-ownership="none">
  14972. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14973. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14974. </instance-parameter>
  14975. <parameter name="value" transfer-ownership="none">
  14976. <doc xml:space="preserve">The value to set.</doc>
  14977. <type name="guint32" c:type="guint32"/>
  14978. </parameter>
  14979. </parameters>
  14980. </method>
  14981. <method name="set_sender"
  14982. c:identifier="g_dbus_message_set_sender"
  14983. version="2.26">
  14984. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.</doc>
  14985. <return-value transfer-ownership="none">
  14986. <type name="none" c:type="void"/>
  14987. </return-value>
  14988. <parameters>
  14989. <instance-parameter name="message" transfer-ownership="none">
  14990. <doc xml:space="preserve">A #GDBusMessage.</doc>
  14991. <type name="DBusMessage" c:type="GDBusMessage*"/>
  14992. </instance-parameter>
  14993. <parameter name="value" transfer-ownership="none">
  14994. <doc xml:space="preserve">The value to set.</doc>
  14995. <type name="utf8" c:type="const gchar*"/>
  14996. </parameter>
  14997. </parameters>
  14998. </method>
  14999. <method name="set_serial"
  15000. c:identifier="g_dbus_message_set_serial"
  15001. version="2.26">
  15002. <doc xml:space="preserve">Sets the serial for @message.</doc>
  15003. <return-value transfer-ownership="none">
  15004. <type name="none" c:type="void"/>
  15005. </return-value>
  15006. <parameters>
  15007. <instance-parameter name="message" transfer-ownership="none">
  15008. <doc xml:space="preserve">A #GDBusMessage.</doc>
  15009. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15010. </instance-parameter>
  15011. <parameter name="serial" transfer-ownership="none">
  15012. <doc xml:space="preserve">A #guint32.</doc>
  15013. <type name="guint32" c:type="guint32"/>
  15014. </parameter>
  15015. </parameters>
  15016. </method>
  15017. <method name="set_signature"
  15018. c:identifier="g_dbus_message_set_signature"
  15019. version="2.26">
  15020. <doc xml:space="preserve">Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.</doc>
  15021. <return-value transfer-ownership="none">
  15022. <type name="none" c:type="void"/>
  15023. </return-value>
  15024. <parameters>
  15025. <instance-parameter name="message" transfer-ownership="none">
  15026. <doc xml:space="preserve">A #GDBusMessage.</doc>
  15027. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15028. </instance-parameter>
  15029. <parameter name="value" transfer-ownership="none">
  15030. <doc xml:space="preserve">The value to set.</doc>
  15031. <type name="utf8" c:type="const gchar*"/>
  15032. </parameter>
  15033. </parameters>
  15034. </method>
  15035. <method name="set_unix_fd_list"
  15036. c:identifier="g_dbus_message_set_unix_fd_list"
  15037. version="2.26">
  15038. <doc xml:space="preserve">Sets the UNIX file descriptors associated with @message. As a
  15039. side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
  15040. field is set to the number of fds in @fd_list (or cleared if
  15041. @fd_list is %NULL).
  15042. This method is only available on UNIX.</doc>
  15043. <return-value transfer-ownership="none">
  15044. <type name="none" c:type="void"/>
  15045. </return-value>
  15046. <parameters>
  15047. <instance-parameter name="message" transfer-ownership="none">
  15048. <doc xml:space="preserve">A #GDBusMessage.</doc>
  15049. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15050. </instance-parameter>
  15051. <parameter name="fd_list"
  15052. transfer-ownership="none"
  15053. nullable="1"
  15054. allow-none="1">
  15055. <doc xml:space="preserve">A #GUnixFDList or %NULL.</doc>
  15056. <type name="UnixFDList" c:type="GUnixFDList*"/>
  15057. </parameter>
  15058. </parameters>
  15059. </method>
  15060. <method name="to_blob"
  15061. c:identifier="g_dbus_message_to_blob"
  15062. version="2.26"
  15063. throws="1">
  15064. <doc xml:space="preserve">Serializes @message to a blob. The byte order returned by
  15065. g_dbus_message_get_byte_order() will be used.</doc>
  15066. <return-value transfer-ownership="full">
  15067. <doc xml:space="preserve">A pointer to a
  15068. valid binary D-Bus message of @out_size bytes generated by @message
  15069. or %NULL if @error is set. Free with g_free().</doc>
  15070. <array length="0" zero-terminated="0" c:type="guchar*">
  15071. <type name="guint8" c:type="guchar"/>
  15072. </array>
  15073. </return-value>
  15074. <parameters>
  15075. <instance-parameter name="message" transfer-ownership="none">
  15076. <doc xml:space="preserve">A #GDBusMessage.</doc>
  15077. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15078. </instance-parameter>
  15079. <parameter name="out_size"
  15080. direction="out"
  15081. caller-allocates="0"
  15082. transfer-ownership="full">
  15083. <doc xml:space="preserve">Return location for size of generated blob.</doc>
  15084. <type name="gsize" c:type="gsize*"/>
  15085. </parameter>
  15086. <parameter name="capabilities" transfer-ownership="none">
  15087. <doc xml:space="preserve">A #GDBusCapabilityFlags describing what protocol features are supported.</doc>
  15088. <type name="DBusCapabilityFlags" c:type="GDBusCapabilityFlags"/>
  15089. </parameter>
  15090. </parameters>
  15091. </method>
  15092. <method name="to_gerror"
  15093. c:identifier="g_dbus_message_to_gerror"
  15094. version="2.26"
  15095. throws="1">
  15096. <doc xml:space="preserve">If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
  15097. nothing and returns %FALSE.
  15098. Otherwise this method encodes the error in @message as a #GError
  15099. using g_dbus_error_set_dbus_error() using the information in the
  15100. %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
  15101. well as the first string item in @message's body.</doc>
  15102. <return-value transfer-ownership="none">
  15103. <doc xml:space="preserve">%TRUE if @error was set, %FALSE otherwise.</doc>
  15104. <type name="gboolean" c:type="gboolean"/>
  15105. </return-value>
  15106. <parameters>
  15107. <instance-parameter name="message" transfer-ownership="none">
  15108. <doc xml:space="preserve">A #GDBusMessage.</doc>
  15109. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15110. </instance-parameter>
  15111. </parameters>
  15112. </method>
  15113. <property name="locked" transfer-ownership="none">
  15114. <type name="gboolean" c:type="gboolean"/>
  15115. </property>
  15116. </class>
  15117. <enumeration name="DBusMessageByteOrder"
  15118. version="2.26"
  15119. glib:type-name="GDBusMessageByteOrder"
  15120. glib:get-type="g_dbus_message_byte_order_get_type"
  15121. c:type="GDBusMessageByteOrder">
  15122. <doc xml:space="preserve">Enumeration used to describe the byte order of a D-Bus message.</doc>
  15123. <member name="big_endian"
  15124. value="66"
  15125. c:identifier="G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN"
  15126. glib:nick="big-endian">
  15127. <doc xml:space="preserve">The byte order is big endian.</doc>
  15128. </member>
  15129. <member name="little_endian"
  15130. value="108"
  15131. c:identifier="G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN"
  15132. glib:nick="little-endian">
  15133. <doc xml:space="preserve">The byte order is little endian.</doc>
  15134. </member>
  15135. </enumeration>
  15136. <callback name="DBusMessageFilterFunction"
  15137. c:type="GDBusMessageFilterFunction"
  15138. version="2.26">
  15139. <doc xml:space="preserve">Signature for function used in g_dbus_connection_add_filter().
  15140. A filter function is passed a #GDBusMessage and expected to return
  15141. a #GDBusMessage too. Passive filter functions that don't modify the
  15142. message can simply return the @message object:
  15143. |[
  15144. static GDBusMessage *
  15145. passive_filter (GDBusConnection *connection
  15146. GDBusMessage *message,
  15147. gboolean incoming,
  15148. gpointer user_data)
  15149. {
  15150. /&lt;!-- --&gt;* inspect @message *&lt;!-- --&gt;/
  15151. return message;
  15152. }
  15153. ]|
  15154. Filter functions that wants to drop a message can simply return %NULL:
  15155. |[
  15156. static GDBusMessage *
  15157. drop_filter (GDBusConnection *connection
  15158. GDBusMessage *message,
  15159. gboolean incoming,
  15160. gpointer user_data)
  15161. {
  15162. if (should_drop_message)
  15163. {
  15164. g_object_unref (message);
  15165. message = NULL;
  15166. }
  15167. return message;
  15168. }
  15169. ]|
  15170. Finally, a filter function may modify a message by copying it:
  15171. |[
  15172. static GDBusMessage *
  15173. modifying_filter (GDBusConnection *connection
  15174. GDBusMessage *message,
  15175. gboolean incoming,
  15176. gpointer user_data)
  15177. {
  15178. GDBusMessage *copy;
  15179. GError *error;
  15180. error = NULL;
  15181. copy = g_dbus_message_copy (message, &amp;error);
  15182. /&lt;!-- --&gt;* handle @error being is set *&lt;!-- --&gt;/
  15183. g_object_unref (message);
  15184. /&lt;!-- --&gt;* modify @copy *&lt;!-- --&gt;/
  15185. return copy;
  15186. }
  15187. ]|
  15188. If the returned #GDBusMessage is different from @message and cannot
  15189. be sent on @connection (it could use features, such as file
  15190. descriptors, not compatible with @connection), then a warning is
  15191. logged to &lt;emphasis&gt;standard error&lt;/emphasis&gt;. Applications can
  15192. check this ahead of time using g_dbus_message_to_blob() passing a
  15193. #GDBusCapabilityFlags value obtained from @connection.</doc>
  15194. <return-value transfer-ownership="full" nullable="1">
  15195. <doc xml:space="preserve">A #GDBusMessage that will be freed with
  15196. g_object_unref() or %NULL to drop the message. Passive filter
  15197. functions can simply return the passed @message object.</doc>
  15198. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15199. </return-value>
  15200. <parameters>
  15201. <parameter name="connection" transfer-ownership="none">
  15202. <doc xml:space="preserve">A #GDBusConnection.</doc>
  15203. <type name="DBusConnection" c:type="GDBusConnection*"/>
  15204. </parameter>
  15205. <parameter name="message" transfer-ownership="full">
  15206. <doc xml:space="preserve">A locked #GDBusMessage that the filter function takes ownership of.</doc>
  15207. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15208. </parameter>
  15209. <parameter name="incoming" transfer-ownership="none">
  15210. <doc xml:space="preserve">%TRUE if it is a message received from the other peer, %FALSE if it is
  15211. a message to be sent to the other peer.</doc>
  15212. <type name="gboolean" c:type="gboolean"/>
  15213. </parameter>
  15214. <parameter name="user_data"
  15215. transfer-ownership="none"
  15216. nullable="1"
  15217. allow-none="1"
  15218. closure="3">
  15219. <doc xml:space="preserve">User data passed when adding the filter.</doc>
  15220. <type name="gpointer" c:type="gpointer"/>
  15221. </parameter>
  15222. </parameters>
  15223. </callback>
  15224. <bitfield name="DBusMessageFlags"
  15225. version="2.26"
  15226. glib:type-name="GDBusMessageFlags"
  15227. glib:get-type="g_dbus_message_flags_get_type"
  15228. c:type="GDBusMessageFlags">
  15229. <doc xml:space="preserve">Message flags used in #GDBusMessage.</doc>
  15230. <member name="none"
  15231. value="0"
  15232. c:identifier="G_DBUS_MESSAGE_FLAGS_NONE"
  15233. glib:nick="none">
  15234. <doc xml:space="preserve">No flags set.</doc>
  15235. </member>
  15236. <member name="no_reply_expected"
  15237. value="1"
  15238. c:identifier="G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED"
  15239. glib:nick="no-reply-expected">
  15240. <doc xml:space="preserve">A reply is not expected.</doc>
  15241. </member>
  15242. <member name="no_auto_start"
  15243. value="2"
  15244. c:identifier="G_DBUS_MESSAGE_FLAGS_NO_AUTO_START"
  15245. glib:nick="no-auto-start">
  15246. <doc xml:space="preserve">The bus must not launch an
  15247. owner for the destination name in response to this message.</doc>
  15248. </member>
  15249. <member name="allow_interactive_authorization"
  15250. value="4"
  15251. c:identifier="G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION"
  15252. glib:nick="allow-interactive-authorization">
  15253. <doc xml:space="preserve">If set on a method
  15254. call, this flag means that the caller is prepared to wait for interactive
  15255. authorization. Since 2.46.</doc>
  15256. </member>
  15257. </bitfield>
  15258. <enumeration name="DBusMessageHeaderField"
  15259. version="2.26"
  15260. glib:type-name="GDBusMessageHeaderField"
  15261. glib:get-type="g_dbus_message_header_field_get_type"
  15262. c:type="GDBusMessageHeaderField">
  15263. <doc xml:space="preserve">Header fields used in #GDBusMessage.</doc>
  15264. <member name="invalid"
  15265. value="0"
  15266. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_INVALID"
  15267. glib:nick="invalid">
  15268. <doc xml:space="preserve">Not a valid header field.</doc>
  15269. </member>
  15270. <member name="path"
  15271. value="1"
  15272. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_PATH"
  15273. glib:nick="path">
  15274. <doc xml:space="preserve">The object path.</doc>
  15275. </member>
  15276. <member name="interface"
  15277. value="2"
  15278. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE"
  15279. glib:nick="interface">
  15280. <doc xml:space="preserve">The interface name.</doc>
  15281. </member>
  15282. <member name="member"
  15283. value="3"
  15284. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_MEMBER"
  15285. glib:nick="member">
  15286. <doc xml:space="preserve">The method or signal name.</doc>
  15287. </member>
  15288. <member name="error_name"
  15289. value="4"
  15290. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME"
  15291. glib:nick="error-name">
  15292. <doc xml:space="preserve">The name of the error that occurred.</doc>
  15293. </member>
  15294. <member name="reply_serial"
  15295. value="5"
  15296. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL"
  15297. glib:nick="reply-serial">
  15298. <doc xml:space="preserve">The serial number the message is a reply to.</doc>
  15299. </member>
  15300. <member name="destination"
  15301. value="6"
  15302. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION"
  15303. glib:nick="destination">
  15304. <doc xml:space="preserve">The name the message is intended for.</doc>
  15305. </member>
  15306. <member name="sender"
  15307. value="7"
  15308. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_SENDER"
  15309. glib:nick="sender">
  15310. <doc xml:space="preserve">Unique name of the sender of the message (filled in by the bus).</doc>
  15311. </member>
  15312. <member name="signature"
  15313. value="8"
  15314. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE"
  15315. glib:nick="signature">
  15316. <doc xml:space="preserve">The signature of the message body.</doc>
  15317. </member>
  15318. <member name="num_unix_fds"
  15319. value="9"
  15320. c:identifier="G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS"
  15321. glib:nick="num-unix-fds">
  15322. <doc xml:space="preserve">The number of UNIX file descriptors that accompany the message.</doc>
  15323. </member>
  15324. </enumeration>
  15325. <enumeration name="DBusMessageType"
  15326. version="2.26"
  15327. glib:type-name="GDBusMessageType"
  15328. glib:get-type="g_dbus_message_type_get_type"
  15329. c:type="GDBusMessageType">
  15330. <doc xml:space="preserve">Message types used in #GDBusMessage.</doc>
  15331. <member name="invalid"
  15332. value="0"
  15333. c:identifier="G_DBUS_MESSAGE_TYPE_INVALID"
  15334. glib:nick="invalid">
  15335. <doc xml:space="preserve">Message is of invalid type.</doc>
  15336. </member>
  15337. <member name="method_call"
  15338. value="1"
  15339. c:identifier="G_DBUS_MESSAGE_TYPE_METHOD_CALL"
  15340. glib:nick="method-call">
  15341. <doc xml:space="preserve">Method call.</doc>
  15342. </member>
  15343. <member name="method_return"
  15344. value="2"
  15345. c:identifier="G_DBUS_MESSAGE_TYPE_METHOD_RETURN"
  15346. glib:nick="method-return">
  15347. <doc xml:space="preserve">Method reply.</doc>
  15348. </member>
  15349. <member name="error"
  15350. value="3"
  15351. c:identifier="G_DBUS_MESSAGE_TYPE_ERROR"
  15352. glib:nick="error">
  15353. <doc xml:space="preserve">Error reply.</doc>
  15354. </member>
  15355. <member name="signal"
  15356. value="4"
  15357. c:identifier="G_DBUS_MESSAGE_TYPE_SIGNAL"
  15358. glib:nick="signal">
  15359. <doc xml:space="preserve">Signal emission.</doc>
  15360. </member>
  15361. </enumeration>
  15362. <record name="DBusMethodInfo"
  15363. c:type="GDBusMethodInfo"
  15364. version="2.26"
  15365. glib:type-name="GDBusMethodInfo"
  15366. glib:get-type="g_dbus_method_info_get_type"
  15367. c:symbol-prefix="dbus_method_info">
  15368. <doc xml:space="preserve">Information about a method on an D-Bus interface.</doc>
  15369. <field name="ref_count" writable="1">
  15370. <doc xml:space="preserve">The reference count or -1 if statically allocated.</doc>
  15371. <type name="gint" c:type="volatile gint"/>
  15372. </field>
  15373. <field name="name" writable="1">
  15374. <doc xml:space="preserve">The name of the D-Bus method, e.g. @RequestName.</doc>
  15375. <type name="utf8" c:type="gchar*"/>
  15376. </field>
  15377. <field name="in_args" writable="1">
  15378. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.</doc>
  15379. <array c:type="GDBusArgInfo**">
  15380. <type name="DBusArgInfo" c:type="GDBusArgInfo*"/>
  15381. </array>
  15382. </field>
  15383. <field name="out_args" writable="1">
  15384. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.</doc>
  15385. <array c:type="GDBusArgInfo**">
  15386. <type name="DBusArgInfo" c:type="GDBusArgInfo*"/>
  15387. </array>
  15388. </field>
  15389. <field name="annotations" writable="1">
  15390. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
  15391. <array c:type="GDBusAnnotationInfo**">
  15392. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  15393. </array>
  15394. </field>
  15395. <method name="ref" c:identifier="g_dbus_method_info_ref" version="2.26">
  15396. <doc xml:space="preserve">If @info is statically allocated does nothing. Otherwise increases
  15397. the reference count.</doc>
  15398. <return-value transfer-ownership="full">
  15399. <doc xml:space="preserve">The same @info.</doc>
  15400. <type name="DBusMethodInfo" c:type="GDBusMethodInfo*"/>
  15401. </return-value>
  15402. <parameters>
  15403. <instance-parameter name="info" transfer-ownership="none">
  15404. <doc xml:space="preserve">A #GDBusMethodInfo</doc>
  15405. <type name="DBusMethodInfo" c:type="GDBusMethodInfo*"/>
  15406. </instance-parameter>
  15407. </parameters>
  15408. </method>
  15409. <method name="unref"
  15410. c:identifier="g_dbus_method_info_unref"
  15411. version="2.26">
  15412. <doc xml:space="preserve">If @info is statically allocated, does nothing. Otherwise decreases
  15413. the reference count of @info. When its reference count drops to 0,
  15414. the memory used is freed.</doc>
  15415. <return-value transfer-ownership="none">
  15416. <type name="none" c:type="void"/>
  15417. </return-value>
  15418. <parameters>
  15419. <instance-parameter name="info" transfer-ownership="none">
  15420. <doc xml:space="preserve">A #GDBusMethodInfo.</doc>
  15421. <type name="DBusMethodInfo" c:type="GDBusMethodInfo*"/>
  15422. </instance-parameter>
  15423. </parameters>
  15424. </method>
  15425. </record>
  15426. <class name="DBusMethodInvocation"
  15427. c:symbol-prefix="dbus_method_invocation"
  15428. c:type="GDBusMethodInvocation"
  15429. version="2.26"
  15430. parent="GObject.Object"
  15431. glib:type-name="GDBusMethodInvocation"
  15432. glib:get-type="g_dbus_method_invocation_get_type">
  15433. <doc xml:space="preserve">Instances of the #GDBusMethodInvocation class are used when
  15434. handling D-Bus method calls. It provides a way to asynchronously
  15435. return results and errors.
  15436. The normal way to obtain a #GDBusMethodInvocation object is to receive
  15437. it as an argument to the handle_method_call() function in a
  15438. #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().</doc>
  15439. <method name="get_connection"
  15440. c:identifier="g_dbus_method_invocation_get_connection"
  15441. version="2.26">
  15442. <doc xml:space="preserve">Gets the #GDBusConnection the method was invoked on.</doc>
  15443. <return-value transfer-ownership="none">
  15444. <doc xml:space="preserve">A #GDBusConnection. Do not free, it is owned by @invocation.</doc>
  15445. <type name="DBusConnection" c:type="GDBusConnection*"/>
  15446. </return-value>
  15447. <parameters>
  15448. <instance-parameter name="invocation" transfer-ownership="none">
  15449. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15450. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15451. </instance-parameter>
  15452. </parameters>
  15453. </method>
  15454. <method name="get_interface_name"
  15455. c:identifier="g_dbus_method_invocation_get_interface_name"
  15456. version="2.26">
  15457. <doc xml:space="preserve">Gets the name of the D-Bus interface the method was invoked on.
  15458. If this method call is a property Get, Set or GetAll call that has
  15459. been redirected to the method call handler then
  15460. "org.freedesktop.DBus.Properties" will be returned. See
  15461. #GDBusInterfaceVTable for more information.</doc>
  15462. <return-value transfer-ownership="none">
  15463. <doc xml:space="preserve">A string. Do not free, it is owned by @invocation.</doc>
  15464. <type name="utf8" c:type="const gchar*"/>
  15465. </return-value>
  15466. <parameters>
  15467. <instance-parameter name="invocation" transfer-ownership="none">
  15468. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15469. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15470. </instance-parameter>
  15471. </parameters>
  15472. </method>
  15473. <method name="get_message"
  15474. c:identifier="g_dbus_method_invocation_get_message"
  15475. version="2.26">
  15476. <doc xml:space="preserve">Gets the #GDBusMessage for the method invocation. This is useful if
  15477. you need to use low-level protocol features, such as UNIX file
  15478. descriptor passing, that cannot be properly expressed in the
  15479. #GVariant API.
  15480. See this [server][gdbus-server] and [client][gdbus-unix-fd-client]
  15481. for an example of how to use this low-level API to send and receive
  15482. UNIX file descriptors.</doc>
  15483. <return-value transfer-ownership="none">
  15484. <doc xml:space="preserve">#GDBusMessage. Do not free, it is owned by @invocation.</doc>
  15485. <type name="DBusMessage" c:type="GDBusMessage*"/>
  15486. </return-value>
  15487. <parameters>
  15488. <instance-parameter name="invocation" transfer-ownership="none">
  15489. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15490. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15491. </instance-parameter>
  15492. </parameters>
  15493. </method>
  15494. <method name="get_method_info"
  15495. c:identifier="g_dbus_method_invocation_get_method_info"
  15496. version="2.26">
  15497. <doc xml:space="preserve">Gets information about the method call, if any.
  15498. If this method invocation is a property Get, Set or GetAll call that
  15499. has been redirected to the method call handler then %NULL will be
  15500. returned. See g_dbus_method_invocation_get_property_info() and
  15501. #GDBusInterfaceVTable for more information.</doc>
  15502. <return-value transfer-ownership="none">
  15503. <doc xml:space="preserve">A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.</doc>
  15504. <type name="DBusMethodInfo" c:type="const GDBusMethodInfo*"/>
  15505. </return-value>
  15506. <parameters>
  15507. <instance-parameter name="invocation" transfer-ownership="none">
  15508. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15509. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15510. </instance-parameter>
  15511. </parameters>
  15512. </method>
  15513. <method name="get_method_name"
  15514. c:identifier="g_dbus_method_invocation_get_method_name"
  15515. version="2.26">
  15516. <doc xml:space="preserve">Gets the name of the method that was invoked.</doc>
  15517. <return-value transfer-ownership="none">
  15518. <doc xml:space="preserve">A string. Do not free, it is owned by @invocation.</doc>
  15519. <type name="utf8" c:type="const gchar*"/>
  15520. </return-value>
  15521. <parameters>
  15522. <instance-parameter name="invocation" transfer-ownership="none">
  15523. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15524. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15525. </instance-parameter>
  15526. </parameters>
  15527. </method>
  15528. <method name="get_object_path"
  15529. c:identifier="g_dbus_method_invocation_get_object_path"
  15530. version="2.26">
  15531. <doc xml:space="preserve">Gets the object path the method was invoked on.</doc>
  15532. <return-value transfer-ownership="none">
  15533. <doc xml:space="preserve">A string. Do not free, it is owned by @invocation.</doc>
  15534. <type name="utf8" c:type="const gchar*"/>
  15535. </return-value>
  15536. <parameters>
  15537. <instance-parameter name="invocation" transfer-ownership="none">
  15538. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15539. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15540. </instance-parameter>
  15541. </parameters>
  15542. </method>
  15543. <method name="get_parameters"
  15544. c:identifier="g_dbus_method_invocation_get_parameters"
  15545. version="2.26">
  15546. <doc xml:space="preserve">Gets the parameters of the method invocation. If there are no input
  15547. parameters then this will return a GVariant with 0 children rather than NULL.</doc>
  15548. <return-value transfer-ownership="none">
  15549. <doc xml:space="preserve">A #GVariant tuple. Do not unref this because it is owned by @invocation.</doc>
  15550. <type name="GLib.Variant" c:type="GVariant*"/>
  15551. </return-value>
  15552. <parameters>
  15553. <instance-parameter name="invocation" transfer-ownership="none">
  15554. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15555. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15556. </instance-parameter>
  15557. </parameters>
  15558. </method>
  15559. <method name="get_property_info"
  15560. c:identifier="g_dbus_method_invocation_get_property_info"
  15561. version="2.38">
  15562. <doc xml:space="preserve">Gets information about the property that this method call is for, if
  15563. any.
  15564. This will only be set in the case of an invocation in response to a
  15565. property Get or Set call that has been directed to the method call
  15566. handler for an object on account of its property_get() or
  15567. property_set() vtable pointers being unset.
  15568. See #GDBusInterfaceVTable for more information.
  15569. If the call was GetAll, %NULL will be returned.</doc>
  15570. <return-value transfer-ownership="none">
  15571. <doc xml:space="preserve">a #GDBusPropertyInfo or %NULL</doc>
  15572. <type name="DBusPropertyInfo" c:type="const GDBusPropertyInfo*"/>
  15573. </return-value>
  15574. <parameters>
  15575. <instance-parameter name="invocation" transfer-ownership="none">
  15576. <doc xml:space="preserve">A #GDBusMethodInvocation</doc>
  15577. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15578. </instance-parameter>
  15579. </parameters>
  15580. </method>
  15581. <method name="get_sender"
  15582. c:identifier="g_dbus_method_invocation_get_sender"
  15583. version="2.26">
  15584. <doc xml:space="preserve">Gets the bus name that invoked the method.</doc>
  15585. <return-value transfer-ownership="none">
  15586. <doc xml:space="preserve">A string. Do not free, it is owned by @invocation.</doc>
  15587. <type name="utf8" c:type="const gchar*"/>
  15588. </return-value>
  15589. <parameters>
  15590. <instance-parameter name="invocation" transfer-ownership="none">
  15591. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15592. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15593. </instance-parameter>
  15594. </parameters>
  15595. </method>
  15596. <method name="get_user_data"
  15597. c:identifier="g_dbus_method_invocation_get_user_data"
  15598. version="2.26"
  15599. introspectable="0">
  15600. <doc xml:space="preserve">Gets the @user_data #gpointer passed to g_dbus_connection_register_object().</doc>
  15601. <return-value transfer-ownership="none" nullable="1">
  15602. <doc xml:space="preserve">A #gpointer.</doc>
  15603. <type name="gpointer" c:type="gpointer"/>
  15604. </return-value>
  15605. <parameters>
  15606. <instance-parameter name="invocation" transfer-ownership="none">
  15607. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15608. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15609. </instance-parameter>
  15610. </parameters>
  15611. </method>
  15612. <method name="return_dbus_error"
  15613. c:identifier="g_dbus_method_invocation_return_dbus_error"
  15614. version="2.26">
  15615. <doc xml:space="preserve">Finishes handling a D-Bus method call by returning an error.
  15616. This method will free @invocation, you cannot use it afterwards.</doc>
  15617. <return-value transfer-ownership="none">
  15618. <type name="none" c:type="void"/>
  15619. </return-value>
  15620. <parameters>
  15621. <instance-parameter name="invocation" transfer-ownership="full">
  15622. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15623. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15624. </instance-parameter>
  15625. <parameter name="error_name" transfer-ownership="none">
  15626. <doc xml:space="preserve">A valid D-Bus error name.</doc>
  15627. <type name="utf8" c:type="const gchar*"/>
  15628. </parameter>
  15629. <parameter name="error_message" transfer-ownership="none">
  15630. <doc xml:space="preserve">A valid D-Bus error message.</doc>
  15631. <type name="utf8" c:type="const gchar*"/>
  15632. </parameter>
  15633. </parameters>
  15634. </method>
  15635. <method name="return_error"
  15636. c:identifier="g_dbus_method_invocation_return_error"
  15637. version="2.26"
  15638. introspectable="0">
  15639. <doc xml:space="preserve">Finishes handling a D-Bus method call by returning an error.
  15640. See g_dbus_error_encode_gerror() for details about what error name
  15641. will be returned on the wire. In a nutshell, if the given error is
  15642. registered using g_dbus_error_register_error() the name given
  15643. during registration is used. Otherwise, a name of the form
  15644. `org.gtk.GDBus.UnmappedGError.Quark...` is used. This provides
  15645. transparent mapping of #GError between applications using GDBus.
  15646. If you are writing an application intended to be portable,
  15647. always register errors with g_dbus_error_register_error()
  15648. or use g_dbus_method_invocation_return_dbus_error().
  15649. This method will free @invocation, you cannot use it afterwards.
  15650. Since 2.48, if the method call requested for a reply not to be sent
  15651. then this call will free @invocation but otherwise do nothing (as per
  15652. the recommendations of the D-Bus specification).</doc>
  15653. <return-value transfer-ownership="none">
  15654. <type name="none" c:type="void"/>
  15655. </return-value>
  15656. <parameters>
  15657. <instance-parameter name="invocation" transfer-ownership="full">
  15658. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15659. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15660. </instance-parameter>
  15661. <parameter name="domain" transfer-ownership="none">
  15662. <doc xml:space="preserve">A #GQuark for the #GError error domain.</doc>
  15663. <type name="GLib.Quark" c:type="GQuark"/>
  15664. </parameter>
  15665. <parameter name="code" transfer-ownership="none">
  15666. <doc xml:space="preserve">The error code.</doc>
  15667. <type name="gint" c:type="gint"/>
  15668. </parameter>
  15669. <parameter name="format" transfer-ownership="none">
  15670. <doc xml:space="preserve">printf()-style format.</doc>
  15671. <type name="utf8" c:type="const gchar*"/>
  15672. </parameter>
  15673. <parameter name="..." transfer-ownership="none">
  15674. <doc xml:space="preserve">Parameters for @format.</doc>
  15675. <varargs/>
  15676. </parameter>
  15677. </parameters>
  15678. </method>
  15679. <method name="return_error_literal"
  15680. c:identifier="g_dbus_method_invocation_return_error_literal"
  15681. version="2.26">
  15682. <doc xml:space="preserve">Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
  15683. This method will free @invocation, you cannot use it afterwards.</doc>
  15684. <return-value transfer-ownership="none">
  15685. <type name="none" c:type="void"/>
  15686. </return-value>
  15687. <parameters>
  15688. <instance-parameter name="invocation" transfer-ownership="full">
  15689. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15690. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15691. </instance-parameter>
  15692. <parameter name="domain" transfer-ownership="none">
  15693. <doc xml:space="preserve">A #GQuark for the #GError error domain.</doc>
  15694. <type name="GLib.Quark" c:type="GQuark"/>
  15695. </parameter>
  15696. <parameter name="code" transfer-ownership="none">
  15697. <doc xml:space="preserve">The error code.</doc>
  15698. <type name="gint" c:type="gint"/>
  15699. </parameter>
  15700. <parameter name="message" transfer-ownership="none">
  15701. <doc xml:space="preserve">The error message.</doc>
  15702. <type name="utf8" c:type="const gchar*"/>
  15703. </parameter>
  15704. </parameters>
  15705. </method>
  15706. <method name="return_error_valist"
  15707. c:identifier="g_dbus_method_invocation_return_error_valist"
  15708. version="2.26"
  15709. introspectable="0">
  15710. <doc xml:space="preserve">Like g_dbus_method_invocation_return_error() but intended for
  15711. language bindings.
  15712. This method will free @invocation, you cannot use it afterwards.</doc>
  15713. <return-value transfer-ownership="none">
  15714. <type name="none" c:type="void"/>
  15715. </return-value>
  15716. <parameters>
  15717. <instance-parameter name="invocation" transfer-ownership="full">
  15718. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15719. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15720. </instance-parameter>
  15721. <parameter name="domain" transfer-ownership="none">
  15722. <doc xml:space="preserve">A #GQuark for the #GError error domain.</doc>
  15723. <type name="GLib.Quark" c:type="GQuark"/>
  15724. </parameter>
  15725. <parameter name="code" transfer-ownership="none">
  15726. <doc xml:space="preserve">The error code.</doc>
  15727. <type name="gint" c:type="gint"/>
  15728. </parameter>
  15729. <parameter name="format" transfer-ownership="none">
  15730. <doc xml:space="preserve">printf()-style format.</doc>
  15731. <type name="utf8" c:type="const gchar*"/>
  15732. </parameter>
  15733. <parameter name="var_args" transfer-ownership="none">
  15734. <doc xml:space="preserve">#va_list of parameters for @format.</doc>
  15735. <type name="va_list" c:type="va_list"/>
  15736. </parameter>
  15737. </parameters>
  15738. </method>
  15739. <method name="return_gerror"
  15740. c:identifier="g_dbus_method_invocation_return_gerror"
  15741. version="2.26">
  15742. <doc xml:space="preserve">Like g_dbus_method_invocation_return_error() but takes a #GError
  15743. instead of the error domain, error code and message.
  15744. This method will free @invocation, you cannot use it afterwards.</doc>
  15745. <return-value transfer-ownership="none">
  15746. <type name="none" c:type="void"/>
  15747. </return-value>
  15748. <parameters>
  15749. <instance-parameter name="invocation" transfer-ownership="full">
  15750. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15751. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15752. </instance-parameter>
  15753. <parameter name="error" transfer-ownership="none">
  15754. <doc xml:space="preserve">A #GError.</doc>
  15755. <type name="GLib.Error" c:type="const GError*"/>
  15756. </parameter>
  15757. </parameters>
  15758. </method>
  15759. <method name="return_value"
  15760. c:identifier="g_dbus_method_invocation_return_value"
  15761. version="2.26">
  15762. <doc xml:space="preserve">Finishes handling a D-Bus method call by returning @parameters.
  15763. If the @parameters GVariant is floating, it is consumed.
  15764. It is an error if @parameters is not of the right format.
  15765. This method will free @invocation, you cannot use it afterwards.
  15766. Since 2.48, if the method call requested for a reply not to be sent
  15767. then this call will sink @parameters and free @invocation, but
  15768. otherwise do nothing (as per the recommendations of the D-Bus
  15769. specification).</doc>
  15770. <return-value transfer-ownership="none">
  15771. <type name="none" c:type="void"/>
  15772. </return-value>
  15773. <parameters>
  15774. <instance-parameter name="invocation" transfer-ownership="full">
  15775. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15776. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15777. </instance-parameter>
  15778. <parameter name="parameters"
  15779. transfer-ownership="none"
  15780. nullable="1"
  15781. allow-none="1">
  15782. <doc xml:space="preserve">A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.</doc>
  15783. <type name="GLib.Variant" c:type="GVariant*"/>
  15784. </parameter>
  15785. </parameters>
  15786. </method>
  15787. <method name="return_value_with_unix_fd_list"
  15788. c:identifier="g_dbus_method_invocation_return_value_with_unix_fd_list"
  15789. version="2.30">
  15790. <doc xml:space="preserve">Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList.
  15791. This method is only available on UNIX.
  15792. This method will free @invocation, you cannot use it afterwards.</doc>
  15793. <return-value transfer-ownership="none">
  15794. <type name="none" c:type="void"/>
  15795. </return-value>
  15796. <parameters>
  15797. <instance-parameter name="invocation" transfer-ownership="full">
  15798. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15799. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15800. </instance-parameter>
  15801. <parameter name="parameters"
  15802. transfer-ownership="none"
  15803. nullable="1"
  15804. allow-none="1">
  15805. <doc xml:space="preserve">A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.</doc>
  15806. <type name="GLib.Variant" c:type="GVariant*"/>
  15807. </parameter>
  15808. <parameter name="fd_list"
  15809. transfer-ownership="none"
  15810. nullable="1"
  15811. allow-none="1">
  15812. <doc xml:space="preserve">A #GUnixFDList or %NULL.</doc>
  15813. <type name="UnixFDList" c:type="GUnixFDList*"/>
  15814. </parameter>
  15815. </parameters>
  15816. </method>
  15817. <method name="take_error"
  15818. c:identifier="g_dbus_method_invocation_take_error"
  15819. version="2.30"
  15820. introspectable="0">
  15821. <doc xml:space="preserve">Like g_dbus_method_invocation_return_gerror() but takes ownership
  15822. of @error so the caller does not need to free it.
  15823. This method will free @invocation, you cannot use it afterwards.</doc>
  15824. <return-value transfer-ownership="none">
  15825. <type name="none" c:type="void"/>
  15826. </return-value>
  15827. <parameters>
  15828. <instance-parameter name="invocation" transfer-ownership="full">
  15829. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  15830. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  15831. </instance-parameter>
  15832. <parameter name="error" transfer-ownership="full">
  15833. <doc xml:space="preserve">A #GError.</doc>
  15834. <type name="GLib.Error" c:type="GError*"/>
  15835. </parameter>
  15836. </parameters>
  15837. </method>
  15838. </class>
  15839. <record name="DBusNodeInfo"
  15840. c:type="GDBusNodeInfo"
  15841. version="2.26"
  15842. glib:type-name="GDBusNodeInfo"
  15843. glib:get-type="g_dbus_node_info_get_type"
  15844. c:symbol-prefix="dbus_node_info">
  15845. <doc xml:space="preserve">Information about nodes in a remote object hierarchy.</doc>
  15846. <field name="ref_count" writable="1">
  15847. <doc xml:space="preserve">The reference count or -1 if statically allocated.</doc>
  15848. <type name="gint" c:type="volatile gint"/>
  15849. </field>
  15850. <field name="path" writable="1">
  15851. <doc xml:space="preserve">The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.</doc>
  15852. <type name="utf8" c:type="gchar*"/>
  15853. </field>
  15854. <field name="interfaces" writable="1">
  15855. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.</doc>
  15856. <array c:type="GDBusInterfaceInfo**">
  15857. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  15858. </array>
  15859. </field>
  15860. <field name="nodes" writable="1">
  15861. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.</doc>
  15862. <array c:type="GDBusNodeInfo**">
  15863. <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
  15864. </array>
  15865. </field>
  15866. <field name="annotations" writable="1">
  15867. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
  15868. <array c:type="GDBusAnnotationInfo**">
  15869. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  15870. </array>
  15871. </field>
  15872. <constructor name="new_for_xml"
  15873. c:identifier="g_dbus_node_info_new_for_xml"
  15874. version="2.26"
  15875. throws="1">
  15876. <doc xml:space="preserve">Parses @xml_data and returns a #GDBusNodeInfo representing the data.
  15877. The introspection XML must contain exactly one top-level
  15878. &lt;node&gt; element.
  15879. Note that this routine is using a
  15880. [GMarkup][glib-Simple-XML-Subset-Parser.description]-based
  15881. parser that only accepts a subset of valid XML documents.</doc>
  15882. <return-value transfer-ownership="full">
  15883. <doc xml:space="preserve">A #GDBusNodeInfo structure or %NULL if @error is set. Free
  15884. with g_dbus_node_info_unref().</doc>
  15885. <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
  15886. </return-value>
  15887. <parameters>
  15888. <parameter name="xml_data" transfer-ownership="none">
  15889. <doc xml:space="preserve">Valid D-Bus introspection XML.</doc>
  15890. <type name="utf8" c:type="const gchar*"/>
  15891. </parameter>
  15892. </parameters>
  15893. </constructor>
  15894. <method name="generate_xml"
  15895. c:identifier="g_dbus_node_info_generate_xml"
  15896. version="2.26">
  15897. <doc xml:space="preserve">Appends an XML representation of @info (and its children) to @string_builder.
  15898. This function is typically used for generating introspection XML documents at run-time for
  15899. handling the `org.freedesktop.DBus.Introspectable.Introspect` method.</doc>
  15900. <return-value transfer-ownership="none">
  15901. <type name="none" c:type="void"/>
  15902. </return-value>
  15903. <parameters>
  15904. <instance-parameter name="info" transfer-ownership="none">
  15905. <doc xml:space="preserve">A #GDBusNodeInfo.</doc>
  15906. <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
  15907. </instance-parameter>
  15908. <parameter name="indent" transfer-ownership="none">
  15909. <doc xml:space="preserve">Indentation level.</doc>
  15910. <type name="guint" c:type="guint"/>
  15911. </parameter>
  15912. <parameter name="string_builder"
  15913. direction="out"
  15914. caller-allocates="1"
  15915. transfer-ownership="none">
  15916. <doc xml:space="preserve">A #GString to to append XML data to.</doc>
  15917. <type name="GLib.String" c:type="GString*"/>
  15918. </parameter>
  15919. </parameters>
  15920. </method>
  15921. <method name="lookup_interface"
  15922. c:identifier="g_dbus_node_info_lookup_interface"
  15923. version="2.26">
  15924. <doc xml:space="preserve">Looks up information about an interface.
  15925. The cost of this function is O(n) in number of interfaces.</doc>
  15926. <return-value transfer-ownership="none">
  15927. <doc xml:space="preserve">A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.</doc>
  15928. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  15929. </return-value>
  15930. <parameters>
  15931. <instance-parameter name="info" transfer-ownership="none">
  15932. <doc xml:space="preserve">A #GDBusNodeInfo.</doc>
  15933. <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
  15934. </instance-parameter>
  15935. <parameter name="name" transfer-ownership="none">
  15936. <doc xml:space="preserve">A D-Bus interface name.</doc>
  15937. <type name="utf8" c:type="const gchar*"/>
  15938. </parameter>
  15939. </parameters>
  15940. </method>
  15941. <method name="ref" c:identifier="g_dbus_node_info_ref" version="2.26">
  15942. <doc xml:space="preserve">If @info is statically allocated does nothing. Otherwise increases
  15943. the reference count.</doc>
  15944. <return-value transfer-ownership="full">
  15945. <doc xml:space="preserve">The same @info.</doc>
  15946. <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
  15947. </return-value>
  15948. <parameters>
  15949. <instance-parameter name="info" transfer-ownership="none">
  15950. <doc xml:space="preserve">A #GDBusNodeInfo</doc>
  15951. <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
  15952. </instance-parameter>
  15953. </parameters>
  15954. </method>
  15955. <method name="unref"
  15956. c:identifier="g_dbus_node_info_unref"
  15957. version="2.26">
  15958. <doc xml:space="preserve">If @info is statically allocated, does nothing. Otherwise decreases
  15959. the reference count of @info. When its reference count drops to 0,
  15960. the memory used is freed.</doc>
  15961. <return-value transfer-ownership="none">
  15962. <type name="none" c:type="void"/>
  15963. </return-value>
  15964. <parameters>
  15965. <instance-parameter name="info" transfer-ownership="none">
  15966. <doc xml:space="preserve">A #GDBusNodeInfo.</doc>
  15967. <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
  15968. </instance-parameter>
  15969. </parameters>
  15970. </method>
  15971. </record>
  15972. <interface name="DBusObject"
  15973. c:symbol-prefix="dbus_object"
  15974. c:type="GDBusObject"
  15975. glib:type-name="GDBusObject"
  15976. glib:get-type="g_dbus_object_get_type"
  15977. glib:type-struct="DBusObjectIface">
  15978. <doc xml:space="preserve">The #GDBusObject type is the base type for D-Bus objects on both
  15979. the service side (see #GDBusObjectSkeleton) and the client side
  15980. (see #GDBusObjectProxy). It is essentially just a container of
  15981. interfaces.</doc>
  15982. <virtual-method name="get_interface"
  15983. invoker="get_interface"
  15984. version="2.30">
  15985. <doc xml:space="preserve">Gets the D-Bus interface with name @interface_name associated with
  15986. @object, if any.</doc>
  15987. <return-value transfer-ownership="full">
  15988. <doc xml:space="preserve">%NULL if not found, otherwise a
  15989. #GDBusInterface that must be freed with g_object_unref().</doc>
  15990. <type name="DBusInterface" c:type="GDBusInterface*"/>
  15991. </return-value>
  15992. <parameters>
  15993. <instance-parameter name="object" transfer-ownership="none">
  15994. <doc xml:space="preserve">A #GDBusObject.</doc>
  15995. <type name="DBusObject" c:type="GDBusObject*"/>
  15996. </instance-parameter>
  15997. <parameter name="interface_name" transfer-ownership="none">
  15998. <doc xml:space="preserve">A D-Bus interface name.</doc>
  15999. <type name="utf8" c:type="const gchar*"/>
  16000. </parameter>
  16001. </parameters>
  16002. </virtual-method>
  16003. <virtual-method name="get_interfaces"
  16004. invoker="get_interfaces"
  16005. version="2.30">
  16006. <doc xml:space="preserve">Gets the D-Bus interfaces associated with @object.</doc>
  16007. <return-value transfer-ownership="full">
  16008. <doc xml:space="preserve">A list of #GDBusInterface instances.
  16009. The returned list must be freed by g_list_free() after each element has been freed
  16010. with g_object_unref().</doc>
  16011. <type name="GLib.List" c:type="GList*">
  16012. <type name="DBusInterface"/>
  16013. </type>
  16014. </return-value>
  16015. <parameters>
  16016. <instance-parameter name="object" transfer-ownership="none">
  16017. <doc xml:space="preserve">A #GDBusObject.</doc>
  16018. <type name="DBusObject" c:type="GDBusObject*"/>
  16019. </instance-parameter>
  16020. </parameters>
  16021. </virtual-method>
  16022. <virtual-method name="get_object_path"
  16023. invoker="get_object_path"
  16024. version="2.30">
  16025. <doc xml:space="preserve">Gets the object path for @object.</doc>
  16026. <return-value transfer-ownership="none">
  16027. <doc xml:space="preserve">A string owned by @object. Do not free.</doc>
  16028. <type name="utf8" c:type="const gchar*"/>
  16029. </return-value>
  16030. <parameters>
  16031. <instance-parameter name="object" transfer-ownership="none">
  16032. <doc xml:space="preserve">A #GDBusObject.</doc>
  16033. <type name="DBusObject" c:type="GDBusObject*"/>
  16034. </instance-parameter>
  16035. </parameters>
  16036. </virtual-method>
  16037. <virtual-method name="interface_added">
  16038. <return-value transfer-ownership="none">
  16039. <type name="none" c:type="void"/>
  16040. </return-value>
  16041. <parameters>
  16042. <instance-parameter name="object" transfer-ownership="none">
  16043. <type name="DBusObject" c:type="GDBusObject*"/>
  16044. </instance-parameter>
  16045. <parameter name="interface_" transfer-ownership="none">
  16046. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16047. </parameter>
  16048. </parameters>
  16049. </virtual-method>
  16050. <virtual-method name="interface_removed">
  16051. <return-value transfer-ownership="none">
  16052. <type name="none" c:type="void"/>
  16053. </return-value>
  16054. <parameters>
  16055. <instance-parameter name="object" transfer-ownership="none">
  16056. <type name="DBusObject" c:type="GDBusObject*"/>
  16057. </instance-parameter>
  16058. <parameter name="interface_" transfer-ownership="none">
  16059. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16060. </parameter>
  16061. </parameters>
  16062. </virtual-method>
  16063. <method name="get_interface"
  16064. c:identifier="g_dbus_object_get_interface"
  16065. version="2.30">
  16066. <doc xml:space="preserve">Gets the D-Bus interface with name @interface_name associated with
  16067. @object, if any.</doc>
  16068. <return-value transfer-ownership="full">
  16069. <doc xml:space="preserve">%NULL if not found, otherwise a
  16070. #GDBusInterface that must be freed with g_object_unref().</doc>
  16071. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16072. </return-value>
  16073. <parameters>
  16074. <instance-parameter name="object" transfer-ownership="none">
  16075. <doc xml:space="preserve">A #GDBusObject.</doc>
  16076. <type name="DBusObject" c:type="GDBusObject*"/>
  16077. </instance-parameter>
  16078. <parameter name="interface_name" transfer-ownership="none">
  16079. <doc xml:space="preserve">A D-Bus interface name.</doc>
  16080. <type name="utf8" c:type="const gchar*"/>
  16081. </parameter>
  16082. </parameters>
  16083. </method>
  16084. <method name="get_interfaces"
  16085. c:identifier="g_dbus_object_get_interfaces"
  16086. version="2.30">
  16087. <doc xml:space="preserve">Gets the D-Bus interfaces associated with @object.</doc>
  16088. <return-value transfer-ownership="full">
  16089. <doc xml:space="preserve">A list of #GDBusInterface instances.
  16090. The returned list must be freed by g_list_free() after each element has been freed
  16091. with g_object_unref().</doc>
  16092. <type name="GLib.List" c:type="GList*">
  16093. <type name="DBusInterface"/>
  16094. </type>
  16095. </return-value>
  16096. <parameters>
  16097. <instance-parameter name="object" transfer-ownership="none">
  16098. <doc xml:space="preserve">A #GDBusObject.</doc>
  16099. <type name="DBusObject" c:type="GDBusObject*"/>
  16100. </instance-parameter>
  16101. </parameters>
  16102. </method>
  16103. <method name="get_object_path"
  16104. c:identifier="g_dbus_object_get_object_path"
  16105. version="2.30">
  16106. <doc xml:space="preserve">Gets the object path for @object.</doc>
  16107. <return-value transfer-ownership="none">
  16108. <doc xml:space="preserve">A string owned by @object. Do not free.</doc>
  16109. <type name="utf8" c:type="const gchar*"/>
  16110. </return-value>
  16111. <parameters>
  16112. <instance-parameter name="object" transfer-ownership="none">
  16113. <doc xml:space="preserve">A #GDBusObject.</doc>
  16114. <type name="DBusObject" c:type="GDBusObject*"/>
  16115. </instance-parameter>
  16116. </parameters>
  16117. </method>
  16118. <glib:signal name="interface-added" when="last" version="2.30">
  16119. <doc xml:space="preserve">Emitted when @interface is added to @object.</doc>
  16120. <return-value transfer-ownership="none">
  16121. <type name="none" c:type="void"/>
  16122. </return-value>
  16123. <parameters>
  16124. <parameter name="interface" transfer-ownership="none">
  16125. <doc xml:space="preserve">The #GDBusInterface that was added.</doc>
  16126. <type name="DBusInterface"/>
  16127. </parameter>
  16128. </parameters>
  16129. </glib:signal>
  16130. <glib:signal name="interface-removed" when="last" version="2.30">
  16131. <doc xml:space="preserve">Emitted when @interface is removed from @object.</doc>
  16132. <return-value transfer-ownership="none">
  16133. <type name="none" c:type="void"/>
  16134. </return-value>
  16135. <parameters>
  16136. <parameter name="interface" transfer-ownership="none">
  16137. <doc xml:space="preserve">The #GDBusInterface that was removed.</doc>
  16138. <type name="DBusInterface"/>
  16139. </parameter>
  16140. </parameters>
  16141. </glib:signal>
  16142. </interface>
  16143. <record name="DBusObjectIface"
  16144. c:type="GDBusObjectIface"
  16145. glib:is-gtype-struct-for="DBusObject"
  16146. version="2.30">
  16147. <doc xml:space="preserve">Base object type for D-Bus objects.</doc>
  16148. <field name="parent_iface">
  16149. <doc xml:space="preserve">The parent interface.</doc>
  16150. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  16151. </field>
  16152. <field name="get_object_path">
  16153. <callback name="get_object_path">
  16154. <return-value transfer-ownership="none">
  16155. <doc xml:space="preserve">A string owned by @object. Do not free.</doc>
  16156. <type name="utf8" c:type="const gchar*"/>
  16157. </return-value>
  16158. <parameters>
  16159. <parameter name="object" transfer-ownership="none">
  16160. <doc xml:space="preserve">A #GDBusObject.</doc>
  16161. <type name="DBusObject" c:type="GDBusObject*"/>
  16162. </parameter>
  16163. </parameters>
  16164. </callback>
  16165. </field>
  16166. <field name="get_interfaces">
  16167. <callback name="get_interfaces">
  16168. <return-value transfer-ownership="full">
  16169. <doc xml:space="preserve">A list of #GDBusInterface instances.
  16170. The returned list must be freed by g_list_free() after each element has been freed
  16171. with g_object_unref().</doc>
  16172. <type name="GLib.List" c:type="GList*">
  16173. <type name="DBusInterface"/>
  16174. </type>
  16175. </return-value>
  16176. <parameters>
  16177. <parameter name="object" transfer-ownership="none">
  16178. <doc xml:space="preserve">A #GDBusObject.</doc>
  16179. <type name="DBusObject" c:type="GDBusObject*"/>
  16180. </parameter>
  16181. </parameters>
  16182. </callback>
  16183. </field>
  16184. <field name="get_interface">
  16185. <callback name="get_interface">
  16186. <return-value transfer-ownership="full">
  16187. <doc xml:space="preserve">%NULL if not found, otherwise a
  16188. #GDBusInterface that must be freed with g_object_unref().</doc>
  16189. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16190. </return-value>
  16191. <parameters>
  16192. <parameter name="object" transfer-ownership="none">
  16193. <doc xml:space="preserve">A #GDBusObject.</doc>
  16194. <type name="DBusObject" c:type="GDBusObject*"/>
  16195. </parameter>
  16196. <parameter name="interface_name" transfer-ownership="none">
  16197. <doc xml:space="preserve">A D-Bus interface name.</doc>
  16198. <type name="utf8" c:type="const gchar*"/>
  16199. </parameter>
  16200. </parameters>
  16201. </callback>
  16202. </field>
  16203. <field name="interface_added">
  16204. <callback name="interface_added">
  16205. <return-value transfer-ownership="none">
  16206. <type name="none" c:type="void"/>
  16207. </return-value>
  16208. <parameters>
  16209. <parameter name="object" transfer-ownership="none">
  16210. <type name="DBusObject" c:type="GDBusObject*"/>
  16211. </parameter>
  16212. <parameter name="interface_" transfer-ownership="none">
  16213. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16214. </parameter>
  16215. </parameters>
  16216. </callback>
  16217. </field>
  16218. <field name="interface_removed">
  16219. <callback name="interface_removed">
  16220. <return-value transfer-ownership="none">
  16221. <type name="none" c:type="void"/>
  16222. </return-value>
  16223. <parameters>
  16224. <parameter name="object" transfer-ownership="none">
  16225. <type name="DBusObject" c:type="GDBusObject*"/>
  16226. </parameter>
  16227. <parameter name="interface_" transfer-ownership="none">
  16228. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16229. </parameter>
  16230. </parameters>
  16231. </callback>
  16232. </field>
  16233. </record>
  16234. <interface name="DBusObjectManager"
  16235. c:symbol-prefix="dbus_object_manager"
  16236. c:type="GDBusObjectManager"
  16237. glib:type-name="GDBusObjectManager"
  16238. glib:get-type="g_dbus_object_manager_get_type"
  16239. glib:type-struct="DBusObjectManagerIface">
  16240. <doc xml:space="preserve">The #GDBusObjectManager type is the base type for service- and
  16241. client-side implementations of the standardized
  16242. [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
  16243. interface.
  16244. See #GDBusObjectManagerClient for the client-side implementation
  16245. and #GDBusObjectManagerServer for the service-side implementation.</doc>
  16246. <virtual-method name="get_interface"
  16247. invoker="get_interface"
  16248. version="2.30">
  16249. <doc xml:space="preserve">Gets the interface proxy for @interface_name at @object_path, if
  16250. any.</doc>
  16251. <return-value transfer-ownership="full">
  16252. <doc xml:space="preserve">A #GDBusInterface instance or %NULL. Free
  16253. with g_object_unref().</doc>
  16254. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16255. </return-value>
  16256. <parameters>
  16257. <instance-parameter name="manager" transfer-ownership="none">
  16258. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16259. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16260. </instance-parameter>
  16261. <parameter name="object_path" transfer-ownership="none">
  16262. <doc xml:space="preserve">Object path to lookup.</doc>
  16263. <type name="utf8" c:type="const gchar*"/>
  16264. </parameter>
  16265. <parameter name="interface_name" transfer-ownership="none">
  16266. <doc xml:space="preserve">D-Bus interface name to lookup.</doc>
  16267. <type name="utf8" c:type="const gchar*"/>
  16268. </parameter>
  16269. </parameters>
  16270. </virtual-method>
  16271. <virtual-method name="get_object" invoker="get_object" version="2.30">
  16272. <doc xml:space="preserve">Gets the #GDBusObjectProxy at @object_path, if any.</doc>
  16273. <return-value transfer-ownership="full">
  16274. <doc xml:space="preserve">A #GDBusObject or %NULL. Free with
  16275. g_object_unref().</doc>
  16276. <type name="DBusObject" c:type="GDBusObject*"/>
  16277. </return-value>
  16278. <parameters>
  16279. <instance-parameter name="manager" transfer-ownership="none">
  16280. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16281. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16282. </instance-parameter>
  16283. <parameter name="object_path" transfer-ownership="none">
  16284. <doc xml:space="preserve">Object path to lookup.</doc>
  16285. <type name="utf8" c:type="const gchar*"/>
  16286. </parameter>
  16287. </parameters>
  16288. </virtual-method>
  16289. <virtual-method name="get_object_path"
  16290. invoker="get_object_path"
  16291. version="2.30">
  16292. <doc xml:space="preserve">Gets the object path that @manager is for.</doc>
  16293. <return-value transfer-ownership="none">
  16294. <doc xml:space="preserve">A string owned by @manager. Do not free.</doc>
  16295. <type name="utf8" c:type="const gchar*"/>
  16296. </return-value>
  16297. <parameters>
  16298. <instance-parameter name="manager" transfer-ownership="none">
  16299. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16300. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16301. </instance-parameter>
  16302. </parameters>
  16303. </virtual-method>
  16304. <virtual-method name="get_objects" invoker="get_objects" version="2.30">
  16305. <doc xml:space="preserve">Gets all #GDBusObject objects known to @manager.</doc>
  16306. <return-value transfer-ownership="full">
  16307. <doc xml:space="preserve">A list of
  16308. #GDBusObject objects. The returned list should be freed with
  16309. g_list_free() after each element has been freed with
  16310. g_object_unref().</doc>
  16311. <type name="GLib.List" c:type="GList*">
  16312. <type name="DBusObject"/>
  16313. </type>
  16314. </return-value>
  16315. <parameters>
  16316. <instance-parameter name="manager" transfer-ownership="none">
  16317. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16318. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16319. </instance-parameter>
  16320. </parameters>
  16321. </virtual-method>
  16322. <virtual-method name="interface_added">
  16323. <return-value transfer-ownership="none">
  16324. <type name="none" c:type="void"/>
  16325. </return-value>
  16326. <parameters>
  16327. <instance-parameter name="manager" transfer-ownership="none">
  16328. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16329. </instance-parameter>
  16330. <parameter name="object" transfer-ownership="none">
  16331. <type name="DBusObject" c:type="GDBusObject*"/>
  16332. </parameter>
  16333. <parameter name="interface_" transfer-ownership="none">
  16334. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16335. </parameter>
  16336. </parameters>
  16337. </virtual-method>
  16338. <virtual-method name="interface_removed">
  16339. <return-value transfer-ownership="none">
  16340. <type name="none" c:type="void"/>
  16341. </return-value>
  16342. <parameters>
  16343. <instance-parameter name="manager" transfer-ownership="none">
  16344. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16345. </instance-parameter>
  16346. <parameter name="object" transfer-ownership="none">
  16347. <type name="DBusObject" c:type="GDBusObject*"/>
  16348. </parameter>
  16349. <parameter name="interface_" transfer-ownership="none">
  16350. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16351. </parameter>
  16352. </parameters>
  16353. </virtual-method>
  16354. <virtual-method name="object_added">
  16355. <return-value transfer-ownership="none">
  16356. <type name="none" c:type="void"/>
  16357. </return-value>
  16358. <parameters>
  16359. <instance-parameter name="manager" transfer-ownership="none">
  16360. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16361. </instance-parameter>
  16362. <parameter name="object" transfer-ownership="none">
  16363. <type name="DBusObject" c:type="GDBusObject*"/>
  16364. </parameter>
  16365. </parameters>
  16366. </virtual-method>
  16367. <virtual-method name="object_removed">
  16368. <return-value transfer-ownership="none">
  16369. <type name="none" c:type="void"/>
  16370. </return-value>
  16371. <parameters>
  16372. <instance-parameter name="manager" transfer-ownership="none">
  16373. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16374. </instance-parameter>
  16375. <parameter name="object" transfer-ownership="none">
  16376. <type name="DBusObject" c:type="GDBusObject*"/>
  16377. </parameter>
  16378. </parameters>
  16379. </virtual-method>
  16380. <method name="get_interface"
  16381. c:identifier="g_dbus_object_manager_get_interface"
  16382. version="2.30">
  16383. <doc xml:space="preserve">Gets the interface proxy for @interface_name at @object_path, if
  16384. any.</doc>
  16385. <return-value transfer-ownership="full">
  16386. <doc xml:space="preserve">A #GDBusInterface instance or %NULL. Free
  16387. with g_object_unref().</doc>
  16388. <type name="DBusInterface" c:type="GDBusInterface*"/>
  16389. </return-value>
  16390. <parameters>
  16391. <instance-parameter name="manager" transfer-ownership="none">
  16392. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16393. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16394. </instance-parameter>
  16395. <parameter name="object_path" transfer-ownership="none">
  16396. <doc xml:space="preserve">Object path to lookup.</doc>
  16397. <type name="utf8" c:type="const gchar*"/>
  16398. </parameter>
  16399. <parameter name="interface_name" transfer-ownership="none">
  16400. <doc xml:space="preserve">D-Bus interface name to lookup.</doc>
  16401. <type name="utf8" c:type="const gchar*"/>
  16402. </parameter>
  16403. </parameters>
  16404. </method>
  16405. <method name="get_object"
  16406. c:identifier="g_dbus_object_manager_get_object"
  16407. version="2.30">
  16408. <doc xml:space="preserve">Gets the #GDBusObjectProxy at @object_path, if any.</doc>
  16409. <return-value transfer-ownership="full">
  16410. <doc xml:space="preserve">A #GDBusObject or %NULL. Free with
  16411. g_object_unref().</doc>
  16412. <type name="DBusObject" c:type="GDBusObject*"/>
  16413. </return-value>
  16414. <parameters>
  16415. <instance-parameter name="manager" transfer-ownership="none">
  16416. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16417. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16418. </instance-parameter>
  16419. <parameter name="object_path" transfer-ownership="none">
  16420. <doc xml:space="preserve">Object path to lookup.</doc>
  16421. <type name="utf8" c:type="const gchar*"/>
  16422. </parameter>
  16423. </parameters>
  16424. </method>
  16425. <method name="get_object_path"
  16426. c:identifier="g_dbus_object_manager_get_object_path"
  16427. version="2.30">
  16428. <doc xml:space="preserve">Gets the object path that @manager is for.</doc>
  16429. <return-value transfer-ownership="none">
  16430. <doc xml:space="preserve">A string owned by @manager. Do not free.</doc>
  16431. <type name="utf8" c:type="const gchar*"/>
  16432. </return-value>
  16433. <parameters>
  16434. <instance-parameter name="manager" transfer-ownership="none">
  16435. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16436. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16437. </instance-parameter>
  16438. </parameters>
  16439. </method>
  16440. <method name="get_objects"
  16441. c:identifier="g_dbus_object_manager_get_objects"
  16442. version="2.30">
  16443. <doc xml:space="preserve">Gets all #GDBusObject objects known to @manager.</doc>
  16444. <return-value transfer-ownership="full">
  16445. <doc xml:space="preserve">A list of
  16446. #GDBusObject objects. The returned list should be freed with
  16447. g_list_free() after each element has been freed with
  16448. g_object_unref().</doc>
  16449. <type name="GLib.List" c:type="GList*">
  16450. <type name="DBusObject"/>
  16451. </type>
  16452. </return-value>
  16453. <parameters>
  16454. <instance-parameter name="manager" transfer-ownership="none">
  16455. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  16456. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  16457. </instance-parameter>
  16458. </parameters>
  16459. </method>
  16460. <glib:signal name="interface-added" when="last" version="2.30">
  16461. <doc xml:space="preserve">Emitted when @interface is added to @object.
  16462. This signal exists purely as a convenience to avoid having to
  16463. connect signals to all objects managed by @manager.</doc>
  16464. <return-value transfer-ownership="none">
  16465. <type name="none" c:type="void"/>
  16466. </return-value>
  16467. <parameters>
  16468. <parameter name="object" transfer-ownership="none">
  16469. <doc xml:space="preserve">The #GDBusObject on which an interface was added.</doc>
  16470. <type name="DBusObject"/>
  16471. </parameter>
  16472. <parameter name="interface" transfer-ownership="none">
  16473. <doc xml:space="preserve">The #GDBusInterface that was added.</doc>
  16474. <type name="DBusInterface"/>
  16475. </parameter>
  16476. </parameters>
  16477. </glib:signal>
  16478. <glib:signal name="interface-removed" when="last" version="2.30">
  16479. <doc xml:space="preserve">Emitted when @interface has been removed from @object.
  16480. This signal exists purely as a convenience to avoid having to
  16481. connect signals to all objects managed by @manager.</doc>
  16482. <return-value transfer-ownership="none">
  16483. <type name="none" c:type="void"/>
  16484. </return-value>
  16485. <parameters>
  16486. <parameter name="object" transfer-ownership="none">
  16487. <doc xml:space="preserve">The #GDBusObject on which an interface was removed.</doc>
  16488. <type name="DBusObject"/>
  16489. </parameter>
  16490. <parameter name="interface" transfer-ownership="none">
  16491. <doc xml:space="preserve">The #GDBusInterface that was removed.</doc>
  16492. <type name="DBusInterface"/>
  16493. </parameter>
  16494. </parameters>
  16495. </glib:signal>
  16496. <glib:signal name="object-added" when="last" version="2.30">
  16497. <doc xml:space="preserve">Emitted when @object is added to @manager.</doc>
  16498. <return-value transfer-ownership="none">
  16499. <type name="none" c:type="void"/>
  16500. </return-value>
  16501. <parameters>
  16502. <parameter name="object" transfer-ownership="none">
  16503. <doc xml:space="preserve">The #GDBusObject that was added.</doc>
  16504. <type name="DBusObject"/>
  16505. </parameter>
  16506. </parameters>
  16507. </glib:signal>
  16508. <glib:signal name="object-removed" when="last" version="2.30">
  16509. <doc xml:space="preserve">Emitted when @object is removed from @manager.</doc>
  16510. <return-value transfer-ownership="none">
  16511. <type name="none" c:type="void"/>
  16512. </return-value>
  16513. <parameters>
  16514. <parameter name="object" transfer-ownership="none">
  16515. <doc xml:space="preserve">The #GDBusObject that was removed.</doc>
  16516. <type name="DBusObject"/>
  16517. </parameter>
  16518. </parameters>
  16519. </glib:signal>
  16520. </interface>
  16521. <class name="DBusObjectManagerClient"
  16522. c:symbol-prefix="dbus_object_manager_client"
  16523. c:type="GDBusObjectManagerClient"
  16524. version="2.30"
  16525. parent="GObject.Object"
  16526. glib:type-name="GDBusObjectManagerClient"
  16527. glib:get-type="g_dbus_object_manager_client_get_type"
  16528. glib:type-struct="DBusObjectManagerClientClass">
  16529. <doc xml:space="preserve">#GDBusObjectManagerClient is used to create, monitor and delete object
  16530. proxies for remote objects exported by a #GDBusObjectManagerServer (or any
  16531. code implementing the
  16532. [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
  16533. interface).
  16534. Once an instance of this type has been created, you can connect to
  16535. the #GDBusObjectManager::object-added and
  16536. #GDBusObjectManager::object-removed signals and inspect the
  16537. #GDBusObjectProxy objects returned by
  16538. g_dbus_object_manager_get_objects().
  16539. If the name for a #GDBusObjectManagerClient is not owned by anyone at
  16540. object construction time, the default behavior is to request the
  16541. message bus to launch an owner for the name. This behavior can be
  16542. disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
  16543. flag. It's also worth noting that this only works if the name of
  16544. interest is activatable in the first place. E.g. in some cases it
  16545. is not possible to launch an owner for the requested name. In this
  16546. case, #GDBusObjectManagerClient object construction still succeeds but
  16547. there will be no object proxies
  16548. (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
  16549. the #GDBusObjectManagerClient:name-owner property is %NULL.
  16550. The owner of the requested name can come and go (for example
  16551. consider a system service being restarted) – #GDBusObjectManagerClient
  16552. handles this case too; simply connect to the #GObject::notify
  16553. signal to watch for changes on the #GDBusObjectManagerClient:name-owner
  16554. property. When the name owner vanishes, the behavior is that
  16555. #GDBusObjectManagerClient:name-owner is set to %NULL (this includes
  16556. emission of the #GObject::notify signal) and then
  16557. #GDBusObjectManager::object-removed signals are synthesized
  16558. for all currently existing object proxies. Since
  16559. #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can
  16560. use this information to disambiguate a synthesized signal from a
  16561. genuine signal caused by object removal on the remote
  16562. #GDBusObjectManager. Similarly, when a new name owner appears,
  16563. #GDBusObjectManager::object-added signals are synthesized
  16564. while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all
  16565. object proxies have been added, the #GDBusObjectManagerClient:name-owner
  16566. is set to the new name owner (this includes emission of the
  16567. #GObject::notify signal). Furthermore, you are guaranteed that
  16568. #GDBusObjectManagerClient:name-owner will alternate between a name owner
  16569. (e.g. `:1.42`) and %NULL even in the case where
  16570. the name of interest is atomically replaced
  16571. Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy
  16572. instances. All signals (including the
  16573. org.freedesktop.DBus.Properties::PropertiesChanged signal)
  16574. delivered to #GDBusProxy instances are guaranteed to originate
  16575. from the name owner. This guarantee along with the behavior
  16576. described above, means that certain race conditions including the
  16577. "half the proxy is from the old owner and the other half is from
  16578. the new owner" problem cannot happen.
  16579. To avoid having the application connect to signals on the returned
  16580. #GDBusObjectProxy and #GDBusProxy objects, the
  16581. #GDBusObject::interface-added,
  16582. #GDBusObject::interface-removed,
  16583. #GDBusProxy::g-properties-changed and
  16584. #GDBusProxy::g-signal signals
  16585. are also emitted on the #GDBusObjectManagerClient instance managing these
  16586. objects. The signals emitted are
  16587. #GDBusObjectManager::interface-added,
  16588. #GDBusObjectManager::interface-removed,
  16589. #GDBusObjectManagerClient::interface-proxy-properties-changed and
  16590. #GDBusObjectManagerClient::interface-proxy-signal.
  16591. Note that all callbacks and signals are emitted in the
  16592. [thread-default main context][g-main-context-push-thread-default]
  16593. that the #GDBusObjectManagerClient object was constructed
  16594. in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects
  16595. originating from the #GDBusObjectManagerClient object will be created in
  16596. the same context and, consequently, will deliver signals in the
  16597. same main loop.</doc>
  16598. <implements name="AsyncInitable"/>
  16599. <implements name="DBusObjectManager"/>
  16600. <implements name="Initable"/>
  16601. <constructor name="new_finish"
  16602. c:identifier="g_dbus_object_manager_client_new_finish"
  16603. version="2.30"
  16604. throws="1">
  16605. <doc xml:space="preserve">Finishes an operation started with g_dbus_object_manager_client_new().</doc>
  16606. <return-value transfer-ownership="full">
  16607. <doc xml:space="preserve">A
  16608. #GDBusObjectManagerClient object or %NULL if @error is set. Free
  16609. with g_object_unref().</doc>
  16610. <type name="DBusObjectManagerClient" c:type="GDBusObjectManager*"/>
  16611. </return-value>
  16612. <parameters>
  16613. <parameter name="res" transfer-ownership="none">
  16614. <doc xml:space="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new().</doc>
  16615. <type name="AsyncResult" c:type="GAsyncResult*"/>
  16616. </parameter>
  16617. </parameters>
  16618. </constructor>
  16619. <constructor name="new_for_bus_finish"
  16620. c:identifier="g_dbus_object_manager_client_new_for_bus_finish"
  16621. version="2.30"
  16622. throws="1">
  16623. <doc xml:space="preserve">Finishes an operation started with g_dbus_object_manager_client_new_for_bus().</doc>
  16624. <return-value transfer-ownership="full">
  16625. <doc xml:space="preserve">A
  16626. #GDBusObjectManagerClient object or %NULL if @error is set. Free
  16627. with g_object_unref().</doc>
  16628. <type name="DBusObjectManagerClient" c:type="GDBusObjectManager*"/>
  16629. </return-value>
  16630. <parameters>
  16631. <parameter name="res" transfer-ownership="none">
  16632. <doc xml:space="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus().</doc>
  16633. <type name="AsyncResult" c:type="GAsyncResult*"/>
  16634. </parameter>
  16635. </parameters>
  16636. </constructor>
  16637. <constructor name="new_for_bus_sync"
  16638. c:identifier="g_dbus_object_manager_client_new_for_bus_sync"
  16639. version="2.30"
  16640. throws="1">
  16641. <doc xml:space="preserve">Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
  16642. of a #GDBusConnection.
  16643. This is a synchronous failable constructor - the calling thread is
  16644. blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
  16645. for the asynchronous version.</doc>
  16646. <return-value transfer-ownership="full">
  16647. <doc xml:space="preserve">A
  16648. #GDBusObjectManagerClient object or %NULL if @error is set. Free
  16649. with g_object_unref().</doc>
  16650. <type name="DBusObjectManagerClient" c:type="GDBusObjectManager*"/>
  16651. </return-value>
  16652. <parameters>
  16653. <parameter name="bus_type" transfer-ownership="none">
  16654. <doc xml:space="preserve">A #GBusType.</doc>
  16655. <type name="BusType" c:type="GBusType"/>
  16656. </parameter>
  16657. <parameter name="flags" transfer-ownership="none">
  16658. <doc xml:space="preserve">Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.</doc>
  16659. <type name="DBusObjectManagerClientFlags"
  16660. c:type="GDBusObjectManagerClientFlags"/>
  16661. </parameter>
  16662. <parameter name="name" transfer-ownership="none">
  16663. <doc xml:space="preserve">The owner of the control object (unique or well-known name).</doc>
  16664. <type name="utf8" c:type="const gchar*"/>
  16665. </parameter>
  16666. <parameter name="object_path" transfer-ownership="none">
  16667. <doc xml:space="preserve">The object path of the control object.</doc>
  16668. <type name="utf8" c:type="const gchar*"/>
  16669. </parameter>
  16670. <parameter name="get_proxy_type_func"
  16671. transfer-ownership="none"
  16672. nullable="1"
  16673. allow-none="1"
  16674. scope="notified"
  16675. closure="5"
  16676. destroy="6">
  16677. <doc xml:space="preserve">A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.</doc>
  16678. <type name="DBusProxyTypeFunc" c:type="GDBusProxyTypeFunc"/>
  16679. </parameter>
  16680. <parameter name="get_proxy_type_user_data"
  16681. transfer-ownership="none"
  16682. nullable="1"
  16683. allow-none="1">
  16684. <doc xml:space="preserve">User data to pass to @get_proxy_type_func.</doc>
  16685. <type name="gpointer" c:type="gpointer"/>
  16686. </parameter>
  16687. <parameter name="get_proxy_type_destroy_notify"
  16688. transfer-ownership="none"
  16689. nullable="1"
  16690. allow-none="1"
  16691. scope="async">
  16692. <doc xml:space="preserve">Free function for @get_proxy_type_user_data or %NULL.</doc>
  16693. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  16694. </parameter>
  16695. <parameter name="cancellable"
  16696. transfer-ownership="none"
  16697. nullable="1"
  16698. allow-none="1">
  16699. <doc xml:space="preserve">A #GCancellable or %NULL</doc>
  16700. <type name="Cancellable" c:type="GCancellable*"/>
  16701. </parameter>
  16702. </parameters>
  16703. </constructor>
  16704. <constructor name="new_sync"
  16705. c:identifier="g_dbus_object_manager_client_new_sync"
  16706. version="2.30"
  16707. throws="1">
  16708. <doc xml:space="preserve">Creates a new #GDBusObjectManagerClient object.
  16709. This is a synchronous failable constructor - the calling thread is
  16710. blocked until a reply is received. See g_dbus_object_manager_client_new()
  16711. for the asynchronous version.</doc>
  16712. <return-value transfer-ownership="full">
  16713. <doc xml:space="preserve">A
  16714. #GDBusObjectManagerClient object or %NULL if @error is set. Free
  16715. with g_object_unref().</doc>
  16716. <type name="DBusObjectManagerClient" c:type="GDBusObjectManager*"/>
  16717. </return-value>
  16718. <parameters>
  16719. <parameter name="connection" transfer-ownership="none">
  16720. <doc xml:space="preserve">A #GDBusConnection.</doc>
  16721. <type name="DBusConnection" c:type="GDBusConnection*"/>
  16722. </parameter>
  16723. <parameter name="flags" transfer-ownership="none">
  16724. <doc xml:space="preserve">Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.</doc>
  16725. <type name="DBusObjectManagerClientFlags"
  16726. c:type="GDBusObjectManagerClientFlags"/>
  16727. </parameter>
  16728. <parameter name="name"
  16729. transfer-ownership="none"
  16730. nullable="1"
  16731. allow-none="1">
  16732. <doc xml:space="preserve">The owner of the control object (unique or well-known name), or %NULL when not using a message bus connection.</doc>
  16733. <type name="utf8" c:type="const gchar*"/>
  16734. </parameter>
  16735. <parameter name="object_path" transfer-ownership="none">
  16736. <doc xml:space="preserve">The object path of the control object.</doc>
  16737. <type name="utf8" c:type="const gchar*"/>
  16738. </parameter>
  16739. <parameter name="get_proxy_type_func"
  16740. transfer-ownership="none"
  16741. nullable="1"
  16742. allow-none="1"
  16743. scope="notified"
  16744. closure="5"
  16745. destroy="6">
  16746. <doc xml:space="preserve">A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.</doc>
  16747. <type name="DBusProxyTypeFunc" c:type="GDBusProxyTypeFunc"/>
  16748. </parameter>
  16749. <parameter name="get_proxy_type_user_data"
  16750. transfer-ownership="none"
  16751. nullable="1"
  16752. allow-none="1">
  16753. <doc xml:space="preserve">User data to pass to @get_proxy_type_func.</doc>
  16754. <type name="gpointer" c:type="gpointer"/>
  16755. </parameter>
  16756. <parameter name="get_proxy_type_destroy_notify"
  16757. transfer-ownership="none"
  16758. nullable="1"
  16759. allow-none="1"
  16760. scope="async">
  16761. <doc xml:space="preserve">Free function for @get_proxy_type_user_data or %NULL.</doc>
  16762. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  16763. </parameter>
  16764. <parameter name="cancellable"
  16765. transfer-ownership="none"
  16766. nullable="1"
  16767. allow-none="1">
  16768. <doc xml:space="preserve">A #GCancellable or %NULL</doc>
  16769. <type name="Cancellable" c:type="GCancellable*"/>
  16770. </parameter>
  16771. </parameters>
  16772. </constructor>
  16773. <function name="new"
  16774. c:identifier="g_dbus_object_manager_client_new"
  16775. version="2.30">
  16776. <doc xml:space="preserve">Asynchronously creates a new #GDBusObjectManagerClient object.
  16777. This is an asynchronous failable constructor. When the result is
  16778. ready, @callback will be invoked in the
  16779. [thread-default main context][g-main-context-push-thread-default]
  16780. of the thread you are calling this method from. You can
  16781. then call g_dbus_object_manager_client_new_finish() to get the result. See
  16782. g_dbus_object_manager_client_new_sync() for the synchronous version.</doc>
  16783. <return-value transfer-ownership="none">
  16784. <type name="none" c:type="void"/>
  16785. </return-value>
  16786. <parameters>
  16787. <parameter name="connection" transfer-ownership="none">
  16788. <doc xml:space="preserve">A #GDBusConnection.</doc>
  16789. <type name="DBusConnection" c:type="GDBusConnection*"/>
  16790. </parameter>
  16791. <parameter name="flags" transfer-ownership="none">
  16792. <doc xml:space="preserve">Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.</doc>
  16793. <type name="DBusObjectManagerClientFlags"
  16794. c:type="GDBusObjectManagerClientFlags"/>
  16795. </parameter>
  16796. <parameter name="name" transfer-ownership="none">
  16797. <doc xml:space="preserve">The owner of the control object (unique or well-known name).</doc>
  16798. <type name="utf8" c:type="const gchar*"/>
  16799. </parameter>
  16800. <parameter name="object_path" transfer-ownership="none">
  16801. <doc xml:space="preserve">The object path of the control object.</doc>
  16802. <type name="utf8" c:type="const gchar*"/>
  16803. </parameter>
  16804. <parameter name="get_proxy_type_func"
  16805. transfer-ownership="none"
  16806. nullable="1"
  16807. allow-none="1"
  16808. scope="notified"
  16809. closure="5"
  16810. destroy="6">
  16811. <doc xml:space="preserve">A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.</doc>
  16812. <type name="DBusProxyTypeFunc" c:type="GDBusProxyTypeFunc"/>
  16813. </parameter>
  16814. <parameter name="get_proxy_type_user_data"
  16815. transfer-ownership="none"
  16816. nullable="1"
  16817. allow-none="1">
  16818. <doc xml:space="preserve">User data to pass to @get_proxy_type_func.</doc>
  16819. <type name="gpointer" c:type="gpointer"/>
  16820. </parameter>
  16821. <parameter name="get_proxy_type_destroy_notify"
  16822. transfer-ownership="none"
  16823. nullable="1"
  16824. allow-none="1"
  16825. scope="async">
  16826. <doc xml:space="preserve">Free function for @get_proxy_type_user_data or %NULL.</doc>
  16827. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  16828. </parameter>
  16829. <parameter name="cancellable"
  16830. transfer-ownership="none"
  16831. nullable="1"
  16832. allow-none="1">
  16833. <doc xml:space="preserve">A #GCancellable or %NULL</doc>
  16834. <type name="Cancellable" c:type="GCancellable*"/>
  16835. </parameter>
  16836. <parameter name="callback"
  16837. transfer-ownership="none"
  16838. nullable="1"
  16839. allow-none="1"
  16840. scope="async"
  16841. closure="9">
  16842. <doc xml:space="preserve">A #GAsyncReadyCallback to call when the request is satisfied.</doc>
  16843. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  16844. </parameter>
  16845. <parameter name="user_data"
  16846. transfer-ownership="none"
  16847. nullable="1"
  16848. allow-none="1">
  16849. <doc xml:space="preserve">The data to pass to @callback.</doc>
  16850. <type name="gpointer" c:type="gpointer"/>
  16851. </parameter>
  16852. </parameters>
  16853. </function>
  16854. <function name="new_for_bus"
  16855. c:identifier="g_dbus_object_manager_client_new_for_bus"
  16856. version="2.30">
  16857. <doc xml:space="preserve">Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
  16858. #GDBusConnection.
  16859. This is an asynchronous failable constructor. When the result is
  16860. ready, @callback will be invoked in the
  16861. [thread-default main loop][g-main-context-push-thread-default]
  16862. of the thread you are calling this method from. You can
  16863. then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
  16864. g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.</doc>
  16865. <return-value transfer-ownership="none">
  16866. <type name="none" c:type="void"/>
  16867. </return-value>
  16868. <parameters>
  16869. <parameter name="bus_type" transfer-ownership="none">
  16870. <doc xml:space="preserve">A #GBusType.</doc>
  16871. <type name="BusType" c:type="GBusType"/>
  16872. </parameter>
  16873. <parameter name="flags" transfer-ownership="none">
  16874. <doc xml:space="preserve">Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.</doc>
  16875. <type name="DBusObjectManagerClientFlags"
  16876. c:type="GDBusObjectManagerClientFlags"/>
  16877. </parameter>
  16878. <parameter name="name" transfer-ownership="none">
  16879. <doc xml:space="preserve">The owner of the control object (unique or well-known name).</doc>
  16880. <type name="utf8" c:type="const gchar*"/>
  16881. </parameter>
  16882. <parameter name="object_path" transfer-ownership="none">
  16883. <doc xml:space="preserve">The object path of the control object.</doc>
  16884. <type name="utf8" c:type="const gchar*"/>
  16885. </parameter>
  16886. <parameter name="get_proxy_type_func"
  16887. transfer-ownership="none"
  16888. nullable="1"
  16889. allow-none="1"
  16890. scope="notified"
  16891. closure="5"
  16892. destroy="6">
  16893. <doc xml:space="preserve">A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.</doc>
  16894. <type name="DBusProxyTypeFunc" c:type="GDBusProxyTypeFunc"/>
  16895. </parameter>
  16896. <parameter name="get_proxy_type_user_data"
  16897. transfer-ownership="none"
  16898. nullable="1"
  16899. allow-none="1">
  16900. <doc xml:space="preserve">User data to pass to @get_proxy_type_func.</doc>
  16901. <type name="gpointer" c:type="gpointer"/>
  16902. </parameter>
  16903. <parameter name="get_proxy_type_destroy_notify"
  16904. transfer-ownership="none"
  16905. nullable="1"
  16906. allow-none="1"
  16907. scope="async">
  16908. <doc xml:space="preserve">Free function for @get_proxy_type_user_data or %NULL.</doc>
  16909. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  16910. </parameter>
  16911. <parameter name="cancellable"
  16912. transfer-ownership="none"
  16913. nullable="1"
  16914. allow-none="1">
  16915. <doc xml:space="preserve">A #GCancellable or %NULL</doc>
  16916. <type name="Cancellable" c:type="GCancellable*"/>
  16917. </parameter>
  16918. <parameter name="callback"
  16919. transfer-ownership="none"
  16920. nullable="1"
  16921. allow-none="1"
  16922. scope="async"
  16923. closure="9">
  16924. <doc xml:space="preserve">A #GAsyncReadyCallback to call when the request is satisfied.</doc>
  16925. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  16926. </parameter>
  16927. <parameter name="user_data"
  16928. transfer-ownership="none"
  16929. nullable="1"
  16930. allow-none="1">
  16931. <doc xml:space="preserve">The data to pass to @callback.</doc>
  16932. <type name="gpointer" c:type="gpointer"/>
  16933. </parameter>
  16934. </parameters>
  16935. </function>
  16936. <virtual-method name="interface_proxy_properties_changed">
  16937. <return-value transfer-ownership="none">
  16938. <type name="none" c:type="void"/>
  16939. </return-value>
  16940. <parameters>
  16941. <instance-parameter name="manager" transfer-ownership="none">
  16942. <type name="DBusObjectManagerClient"
  16943. c:type="GDBusObjectManagerClient*"/>
  16944. </instance-parameter>
  16945. <parameter name="object_proxy" transfer-ownership="none">
  16946. <type name="DBusObjectProxy" c:type="GDBusObjectProxy*"/>
  16947. </parameter>
  16948. <parameter name="interface_proxy" transfer-ownership="none">
  16949. <type name="DBusProxy" c:type="GDBusProxy*"/>
  16950. </parameter>
  16951. <parameter name="changed_properties" transfer-ownership="none">
  16952. <type name="GLib.Variant" c:type="GVariant*"/>
  16953. </parameter>
  16954. <parameter name="invalidated_properties" transfer-ownership="none">
  16955. <type name="utf8" c:type="const gchar* const*"/>
  16956. </parameter>
  16957. </parameters>
  16958. </virtual-method>
  16959. <virtual-method name="interface_proxy_signal">
  16960. <return-value transfer-ownership="none">
  16961. <type name="none" c:type="void"/>
  16962. </return-value>
  16963. <parameters>
  16964. <instance-parameter name="manager" transfer-ownership="none">
  16965. <type name="DBusObjectManagerClient"
  16966. c:type="GDBusObjectManagerClient*"/>
  16967. </instance-parameter>
  16968. <parameter name="object_proxy" transfer-ownership="none">
  16969. <type name="DBusObjectProxy" c:type="GDBusObjectProxy*"/>
  16970. </parameter>
  16971. <parameter name="interface_proxy" transfer-ownership="none">
  16972. <type name="DBusProxy" c:type="GDBusProxy*"/>
  16973. </parameter>
  16974. <parameter name="sender_name" transfer-ownership="none">
  16975. <type name="utf8" c:type="const gchar*"/>
  16976. </parameter>
  16977. <parameter name="signal_name" transfer-ownership="none">
  16978. <type name="utf8" c:type="const gchar*"/>
  16979. </parameter>
  16980. <parameter name="parameters" transfer-ownership="none">
  16981. <type name="GLib.Variant" c:type="GVariant*"/>
  16982. </parameter>
  16983. </parameters>
  16984. </virtual-method>
  16985. <method name="get_connection"
  16986. c:identifier="g_dbus_object_manager_client_get_connection"
  16987. version="2.30">
  16988. <doc xml:space="preserve">Gets the #GDBusConnection used by @manager.</doc>
  16989. <return-value transfer-ownership="none">
  16990. <doc xml:space="preserve">A #GDBusConnection object. Do not free,
  16991. the object belongs to @manager.</doc>
  16992. <type name="DBusConnection" c:type="GDBusConnection*"/>
  16993. </return-value>
  16994. <parameters>
  16995. <instance-parameter name="manager" transfer-ownership="none">
  16996. <doc xml:space="preserve">A #GDBusObjectManagerClient</doc>
  16997. <type name="DBusObjectManagerClient"
  16998. c:type="GDBusObjectManagerClient*"/>
  16999. </instance-parameter>
  17000. </parameters>
  17001. </method>
  17002. <method name="get_flags"
  17003. c:identifier="g_dbus_object_manager_client_get_flags"
  17004. version="2.30">
  17005. <doc xml:space="preserve">Gets the flags that @manager was constructed with.</doc>
  17006. <return-value transfer-ownership="none">
  17007. <doc xml:space="preserve">Zero of more flags from the #GDBusObjectManagerClientFlags
  17008. enumeration.</doc>
  17009. <type name="DBusObjectManagerClientFlags"
  17010. c:type="GDBusObjectManagerClientFlags"/>
  17011. </return-value>
  17012. <parameters>
  17013. <instance-parameter name="manager" transfer-ownership="none">
  17014. <doc xml:space="preserve">A #GDBusObjectManagerClient</doc>
  17015. <type name="DBusObjectManagerClient"
  17016. c:type="GDBusObjectManagerClient*"/>
  17017. </instance-parameter>
  17018. </parameters>
  17019. </method>
  17020. <method name="get_name"
  17021. c:identifier="g_dbus_object_manager_client_get_name"
  17022. version="2.30">
  17023. <doc xml:space="preserve">Gets the name that @manager is for, or %NULL if not a message bus
  17024. connection.</doc>
  17025. <return-value transfer-ownership="none">
  17026. <doc xml:space="preserve">A unique or well-known name. Do not free, the string
  17027. belongs to @manager.</doc>
  17028. <type name="utf8" c:type="const gchar*"/>
  17029. </return-value>
  17030. <parameters>
  17031. <instance-parameter name="manager" transfer-ownership="none">
  17032. <doc xml:space="preserve">A #GDBusObjectManagerClient</doc>
  17033. <type name="DBusObjectManagerClient"
  17034. c:type="GDBusObjectManagerClient*"/>
  17035. </instance-parameter>
  17036. </parameters>
  17037. </method>
  17038. <method name="get_name_owner"
  17039. c:identifier="g_dbus_object_manager_client_get_name_owner"
  17040. version="2.30">
  17041. <doc xml:space="preserve">The unique name that owns the name that @manager is for or %NULL if
  17042. no-one currently owns that name. You can connect to the
  17043. #GObject::notify signal to track changes to the
  17044. #GDBusObjectManagerClient:name-owner property.</doc>
  17045. <return-value transfer-ownership="full" nullable="1">
  17046. <doc xml:space="preserve">The name owner or %NULL if no name owner
  17047. exists. Free with g_free().</doc>
  17048. <type name="utf8" c:type="gchar*"/>
  17049. </return-value>
  17050. <parameters>
  17051. <instance-parameter name="manager" transfer-ownership="none">
  17052. <doc xml:space="preserve">A #GDBusObjectManagerClient.</doc>
  17053. <type name="DBusObjectManagerClient"
  17054. c:type="GDBusObjectManagerClient*"/>
  17055. </instance-parameter>
  17056. </parameters>
  17057. </method>
  17058. <property name="bus-type"
  17059. version="2.30"
  17060. readable="0"
  17061. writable="1"
  17062. construct-only="1"
  17063. transfer-ownership="none">
  17064. <doc xml:space="preserve">If this property is not %G_BUS_TYPE_NONE, then
  17065. #GDBusObjectManagerClient:connection must be %NULL and will be set to the
  17066. #GDBusConnection obtained by calling g_bus_get() with the value
  17067. of this property.</doc>
  17068. <type name="BusType"/>
  17069. </property>
  17070. <property name="connection"
  17071. version="2.30"
  17072. writable="1"
  17073. construct-only="1"
  17074. transfer-ownership="none">
  17075. <doc xml:space="preserve">The #GDBusConnection to use.</doc>
  17076. <type name="DBusConnection"/>
  17077. </property>
  17078. <property name="flags"
  17079. version="2.30"
  17080. writable="1"
  17081. construct-only="1"
  17082. transfer-ownership="none">
  17083. <doc xml:space="preserve">Flags from the #GDBusObjectManagerClientFlags enumeration.</doc>
  17084. <type name="DBusObjectManagerClientFlags"/>
  17085. </property>
  17086. <property name="get-proxy-type-destroy-notify"
  17087. version="2.30"
  17088. writable="1"
  17089. construct-only="1"
  17090. transfer-ownership="none">
  17091. <doc xml:space="preserve">A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.</doc>
  17092. <type name="gpointer" c:type="gpointer"/>
  17093. </property>
  17094. <property name="get-proxy-type-func"
  17095. version="2.30"
  17096. writable="1"
  17097. construct-only="1"
  17098. transfer-ownership="none">
  17099. <doc xml:space="preserve">The #GDBusProxyTypeFunc to use when determining what #GType to
  17100. use for interface proxies or %NULL.</doc>
  17101. <type name="gpointer" c:type="gpointer"/>
  17102. </property>
  17103. <property name="get-proxy-type-user-data"
  17104. version="2.30"
  17105. writable="1"
  17106. construct-only="1"
  17107. transfer-ownership="none">
  17108. <doc xml:space="preserve">The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.</doc>
  17109. <type name="gpointer" c:type="gpointer"/>
  17110. </property>
  17111. <property name="name"
  17112. version="2.30"
  17113. writable="1"
  17114. construct-only="1"
  17115. transfer-ownership="none">
  17116. <doc xml:space="preserve">The well-known name or unique name that the manager is for.</doc>
  17117. <type name="utf8" c:type="gchar*"/>
  17118. </property>
  17119. <property name="name-owner" version="2.30" transfer-ownership="none">
  17120. <doc xml:space="preserve">The unique name that owns #GDBusObjectManagerClient:name or %NULL if
  17121. no-one is currently owning the name. Connect to the
  17122. #GObject::notify signal to track changes to this property.</doc>
  17123. <type name="utf8" c:type="gchar*"/>
  17124. </property>
  17125. <property name="object-path"
  17126. version="2.30"
  17127. writable="1"
  17128. construct-only="1"
  17129. transfer-ownership="none">
  17130. <doc xml:space="preserve">The object path the manager is for.</doc>
  17131. <type name="utf8" c:type="gchar*"/>
  17132. </property>
  17133. <field name="parent_instance" readable="0" private="1">
  17134. <type name="GObject.Object" c:type="GObject"/>
  17135. </field>
  17136. <field name="priv" readable="0" private="1">
  17137. <type name="DBusObjectManagerClientPrivate"
  17138. c:type="GDBusObjectManagerClientPrivate*"/>
  17139. </field>
  17140. <glib:signal name="interface-proxy-properties-changed"
  17141. when="last"
  17142. version="2.30">
  17143. <doc xml:space="preserve">Emitted when one or more D-Bus properties on proxy changes. The
  17144. local cache has already been updated when this signal fires. Note
  17145. that both @changed_properties and @invalidated_properties are
  17146. guaranteed to never be %NULL (either may be empty though).
  17147. This signal exists purely as a convenience to avoid having to
  17148. connect signals to all interface proxies managed by @manager.
  17149. This signal is emitted in the
  17150. [thread-default main context][g-main-context-push-thread-default]
  17151. that @manager was constructed in.</doc>
  17152. <return-value transfer-ownership="none">
  17153. <type name="none" c:type="void"/>
  17154. </return-value>
  17155. <parameters>
  17156. <parameter name="object_proxy" transfer-ownership="none">
  17157. <doc xml:space="preserve">The #GDBusObjectProxy on which an interface has properties that are changing.</doc>
  17158. <type name="DBusObjectProxy"/>
  17159. </parameter>
  17160. <parameter name="interface_proxy" transfer-ownership="none">
  17161. <doc xml:space="preserve">The #GDBusProxy that has properties that are changing.</doc>
  17162. <type name="DBusProxy"/>
  17163. </parameter>
  17164. <parameter name="changed_properties" transfer-ownership="none">
  17165. <doc xml:space="preserve">A #GVariant containing the properties that changed.</doc>
  17166. <type name="GLib.Variant"/>
  17167. </parameter>
  17168. <parameter name="invalidated_properties" transfer-ownership="none">
  17169. <doc xml:space="preserve">A %NULL terminated array of properties that was invalidated.</doc>
  17170. <array>
  17171. <type name="utf8"/>
  17172. </array>
  17173. </parameter>
  17174. </parameters>
  17175. </glib:signal>
  17176. <glib:signal name="interface-proxy-signal" when="last" version="2.30">
  17177. <doc xml:space="preserve">Emitted when a D-Bus signal is received on @interface_proxy.
  17178. This signal exists purely as a convenience to avoid having to
  17179. connect signals to all interface proxies managed by @manager.
  17180. This signal is emitted in the
  17181. [thread-default main context][g-main-context-push-thread-default]
  17182. that @manager was constructed in.</doc>
  17183. <return-value transfer-ownership="none">
  17184. <type name="none" c:type="void"/>
  17185. </return-value>
  17186. <parameters>
  17187. <parameter name="object_proxy" transfer-ownership="none">
  17188. <doc xml:space="preserve">The #GDBusObjectProxy on which an interface is emitting a D-Bus signal.</doc>
  17189. <type name="DBusObjectProxy"/>
  17190. </parameter>
  17191. <parameter name="interface_proxy" transfer-ownership="none">
  17192. <doc xml:space="preserve">The #GDBusProxy that is emitting a D-Bus signal.</doc>
  17193. <type name="DBusProxy"/>
  17194. </parameter>
  17195. <parameter name="sender_name" transfer-ownership="none">
  17196. <doc xml:space="preserve">The sender of the signal or NULL if the connection is not a bus connection.</doc>
  17197. <type name="utf8" c:type="gchar*"/>
  17198. </parameter>
  17199. <parameter name="signal_name" transfer-ownership="none">
  17200. <doc xml:space="preserve">The signal name.</doc>
  17201. <type name="utf8" c:type="gchar*"/>
  17202. </parameter>
  17203. <parameter name="parameters" transfer-ownership="none">
  17204. <doc xml:space="preserve">A #GVariant tuple with parameters for the signal.</doc>
  17205. <type name="GLib.Variant"/>
  17206. </parameter>
  17207. </parameters>
  17208. </glib:signal>
  17209. </class>
  17210. <record name="DBusObjectManagerClientClass"
  17211. c:type="GDBusObjectManagerClientClass"
  17212. glib:is-gtype-struct-for="DBusObjectManagerClient"
  17213. version="2.30">
  17214. <doc xml:space="preserve">Class structure for #GDBusObjectManagerClient.</doc>
  17215. <field name="parent_class">
  17216. <doc xml:space="preserve">The parent class.</doc>
  17217. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  17218. </field>
  17219. <field name="interface_proxy_signal">
  17220. <callback name="interface_proxy_signal">
  17221. <return-value transfer-ownership="none">
  17222. <type name="none" c:type="void"/>
  17223. </return-value>
  17224. <parameters>
  17225. <parameter name="manager" transfer-ownership="none">
  17226. <type name="DBusObjectManagerClient"
  17227. c:type="GDBusObjectManagerClient*"/>
  17228. </parameter>
  17229. <parameter name="object_proxy" transfer-ownership="none">
  17230. <type name="DBusObjectProxy" c:type="GDBusObjectProxy*"/>
  17231. </parameter>
  17232. <parameter name="interface_proxy" transfer-ownership="none">
  17233. <type name="DBusProxy" c:type="GDBusProxy*"/>
  17234. </parameter>
  17235. <parameter name="sender_name" transfer-ownership="none">
  17236. <type name="utf8" c:type="const gchar*"/>
  17237. </parameter>
  17238. <parameter name="signal_name" transfer-ownership="none">
  17239. <type name="utf8" c:type="const gchar*"/>
  17240. </parameter>
  17241. <parameter name="parameters" transfer-ownership="none">
  17242. <type name="GLib.Variant" c:type="GVariant*"/>
  17243. </parameter>
  17244. </parameters>
  17245. </callback>
  17246. </field>
  17247. <field name="interface_proxy_properties_changed">
  17248. <callback name="interface_proxy_properties_changed">
  17249. <return-value transfer-ownership="none">
  17250. <type name="none" c:type="void"/>
  17251. </return-value>
  17252. <parameters>
  17253. <parameter name="manager" transfer-ownership="none">
  17254. <type name="DBusObjectManagerClient"
  17255. c:type="GDBusObjectManagerClient*"/>
  17256. </parameter>
  17257. <parameter name="object_proxy" transfer-ownership="none">
  17258. <type name="DBusObjectProxy" c:type="GDBusObjectProxy*"/>
  17259. </parameter>
  17260. <parameter name="interface_proxy" transfer-ownership="none">
  17261. <type name="DBusProxy" c:type="GDBusProxy*"/>
  17262. </parameter>
  17263. <parameter name="changed_properties" transfer-ownership="none">
  17264. <type name="GLib.Variant" c:type="GVariant*"/>
  17265. </parameter>
  17266. <parameter name="invalidated_properties" transfer-ownership="none">
  17267. <type name="utf8" c:type="const gchar* const*"/>
  17268. </parameter>
  17269. </parameters>
  17270. </callback>
  17271. </field>
  17272. <field name="padding" readable="0" private="1">
  17273. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  17274. <type name="gpointer" c:type="gpointer"/>
  17275. </array>
  17276. </field>
  17277. </record>
  17278. <bitfield name="DBusObjectManagerClientFlags"
  17279. version="2.30"
  17280. glib:type-name="GDBusObjectManagerClientFlags"
  17281. glib:get-type="g_dbus_object_manager_client_flags_get_type"
  17282. c:type="GDBusObjectManagerClientFlags">
  17283. <doc xml:space="preserve">Flags used when constructing a #GDBusObjectManagerClient.</doc>
  17284. <member name="none"
  17285. value="0"
  17286. c:identifier="G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE"
  17287. glib:nick="none">
  17288. <doc xml:space="preserve">No flags set.</doc>
  17289. </member>
  17290. <member name="do_not_auto_start"
  17291. value="1"
  17292. c:identifier="G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START"
  17293. glib:nick="do-not-auto-start">
  17294. <doc xml:space="preserve">If not set and the
  17295. manager is for a well-known name, then request the bus to launch
  17296. an owner for the name if no-one owns the name. This flag can only
  17297. be used in managers for well-known names.</doc>
  17298. </member>
  17299. </bitfield>
  17300. <record name="DBusObjectManagerClientPrivate"
  17301. c:type="GDBusObjectManagerClientPrivate"
  17302. disguised="1">
  17303. </record>
  17304. <record name="DBusObjectManagerIface"
  17305. c:type="GDBusObjectManagerIface"
  17306. glib:is-gtype-struct-for="DBusObjectManager"
  17307. version="2.30">
  17308. <doc xml:space="preserve">Base type for D-Bus object managers.</doc>
  17309. <field name="parent_iface">
  17310. <doc xml:space="preserve">The parent interface.</doc>
  17311. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  17312. </field>
  17313. <field name="get_object_path">
  17314. <callback name="get_object_path">
  17315. <return-value transfer-ownership="none">
  17316. <doc xml:space="preserve">A string owned by @manager. Do not free.</doc>
  17317. <type name="utf8" c:type="const gchar*"/>
  17318. </return-value>
  17319. <parameters>
  17320. <parameter name="manager" transfer-ownership="none">
  17321. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  17322. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17323. </parameter>
  17324. </parameters>
  17325. </callback>
  17326. </field>
  17327. <field name="get_objects">
  17328. <callback name="get_objects">
  17329. <return-value transfer-ownership="full">
  17330. <doc xml:space="preserve">A list of
  17331. #GDBusObject objects. The returned list should be freed with
  17332. g_list_free() after each element has been freed with
  17333. g_object_unref().</doc>
  17334. <type name="GLib.List" c:type="GList*">
  17335. <type name="DBusObject"/>
  17336. </type>
  17337. </return-value>
  17338. <parameters>
  17339. <parameter name="manager" transfer-ownership="none">
  17340. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  17341. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17342. </parameter>
  17343. </parameters>
  17344. </callback>
  17345. </field>
  17346. <field name="get_object">
  17347. <callback name="get_object">
  17348. <return-value transfer-ownership="full">
  17349. <doc xml:space="preserve">A #GDBusObject or %NULL. Free with
  17350. g_object_unref().</doc>
  17351. <type name="DBusObject" c:type="GDBusObject*"/>
  17352. </return-value>
  17353. <parameters>
  17354. <parameter name="manager" transfer-ownership="none">
  17355. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  17356. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17357. </parameter>
  17358. <parameter name="object_path" transfer-ownership="none">
  17359. <doc xml:space="preserve">Object path to lookup.</doc>
  17360. <type name="utf8" c:type="const gchar*"/>
  17361. </parameter>
  17362. </parameters>
  17363. </callback>
  17364. </field>
  17365. <field name="get_interface">
  17366. <callback name="get_interface">
  17367. <return-value transfer-ownership="full">
  17368. <doc xml:space="preserve">A #GDBusInterface instance or %NULL. Free
  17369. with g_object_unref().</doc>
  17370. <type name="DBusInterface" c:type="GDBusInterface*"/>
  17371. </return-value>
  17372. <parameters>
  17373. <parameter name="manager" transfer-ownership="none">
  17374. <doc xml:space="preserve">A #GDBusObjectManager.</doc>
  17375. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17376. </parameter>
  17377. <parameter name="object_path" transfer-ownership="none">
  17378. <doc xml:space="preserve">Object path to lookup.</doc>
  17379. <type name="utf8" c:type="const gchar*"/>
  17380. </parameter>
  17381. <parameter name="interface_name" transfer-ownership="none">
  17382. <doc xml:space="preserve">D-Bus interface name to lookup.</doc>
  17383. <type name="utf8" c:type="const gchar*"/>
  17384. </parameter>
  17385. </parameters>
  17386. </callback>
  17387. </field>
  17388. <field name="object_added">
  17389. <callback name="object_added">
  17390. <return-value transfer-ownership="none">
  17391. <type name="none" c:type="void"/>
  17392. </return-value>
  17393. <parameters>
  17394. <parameter name="manager" transfer-ownership="none">
  17395. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17396. </parameter>
  17397. <parameter name="object" transfer-ownership="none">
  17398. <type name="DBusObject" c:type="GDBusObject*"/>
  17399. </parameter>
  17400. </parameters>
  17401. </callback>
  17402. </field>
  17403. <field name="object_removed">
  17404. <callback name="object_removed">
  17405. <return-value transfer-ownership="none">
  17406. <type name="none" c:type="void"/>
  17407. </return-value>
  17408. <parameters>
  17409. <parameter name="manager" transfer-ownership="none">
  17410. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17411. </parameter>
  17412. <parameter name="object" transfer-ownership="none">
  17413. <type name="DBusObject" c:type="GDBusObject*"/>
  17414. </parameter>
  17415. </parameters>
  17416. </callback>
  17417. </field>
  17418. <field name="interface_added">
  17419. <callback name="interface_added">
  17420. <return-value transfer-ownership="none">
  17421. <type name="none" c:type="void"/>
  17422. </return-value>
  17423. <parameters>
  17424. <parameter name="manager" transfer-ownership="none">
  17425. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17426. </parameter>
  17427. <parameter name="object" transfer-ownership="none">
  17428. <type name="DBusObject" c:type="GDBusObject*"/>
  17429. </parameter>
  17430. <parameter name="interface_" transfer-ownership="none">
  17431. <type name="DBusInterface" c:type="GDBusInterface*"/>
  17432. </parameter>
  17433. </parameters>
  17434. </callback>
  17435. </field>
  17436. <field name="interface_removed">
  17437. <callback name="interface_removed">
  17438. <return-value transfer-ownership="none">
  17439. <type name="none" c:type="void"/>
  17440. </return-value>
  17441. <parameters>
  17442. <parameter name="manager" transfer-ownership="none">
  17443. <type name="DBusObjectManager" c:type="GDBusObjectManager*"/>
  17444. </parameter>
  17445. <parameter name="object" transfer-ownership="none">
  17446. <type name="DBusObject" c:type="GDBusObject*"/>
  17447. </parameter>
  17448. <parameter name="interface_" transfer-ownership="none">
  17449. <type name="DBusInterface" c:type="GDBusInterface*"/>
  17450. </parameter>
  17451. </parameters>
  17452. </callback>
  17453. </field>
  17454. </record>
  17455. <class name="DBusObjectManagerServer"
  17456. c:symbol-prefix="dbus_object_manager_server"
  17457. c:type="GDBusObjectManagerServer"
  17458. version="2.30"
  17459. parent="GObject.Object"
  17460. glib:type-name="GDBusObjectManagerServer"
  17461. glib:get-type="g_dbus_object_manager_server_get_type"
  17462. glib:type-struct="DBusObjectManagerServerClass">
  17463. <doc xml:space="preserve">#GDBusObjectManagerServer is used to export #GDBusObject instances using
  17464. the standardized
  17465. [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
  17466. interface. For example, remote D-Bus clients can get all objects
  17467. and properties in a single call. Additionally, any change in the
  17468. object hierarchy is broadcast using signals. This means that D-Bus
  17469. clients can keep caches up to date by only listening to D-Bus
  17470. signals.
  17471. The recommended path to export an object manager at is the path form of the
  17472. well-known name of a D-Bus service, or below. For example, if a D-Bus service
  17473. is available at the well-known name `net.example.ExampleService1`, the object
  17474. manager should typically be exported at `/net/example/ExampleService1`, or
  17475. below (to allow for multiple object managers in a service).
  17476. It is not supported to export an object manager at the root path, `/`.
  17477. See #GDBusObjectManagerClient for the client-side code that is
  17478. intended to be used with #GDBusObjectManagerServer or any D-Bus
  17479. object implementing the org.freedesktop.DBus.ObjectManager
  17480. interface.</doc>
  17481. <implements name="DBusObjectManager"/>
  17482. <constructor name="new"
  17483. c:identifier="g_dbus_object_manager_server_new"
  17484. version="2.30">
  17485. <doc xml:space="preserve">Creates a new #GDBusObjectManagerServer object.
  17486. The returned server isn't yet exported on any connection. To do so,
  17487. use g_dbus_object_manager_server_set_connection(). Normally you
  17488. want to export all of your objects before doing so to avoid
  17489. [InterfacesAdded](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
  17490. signals being emitted.</doc>
  17491. <return-value transfer-ownership="full">
  17492. <doc xml:space="preserve">A #GDBusObjectManagerServer object. Free with g_object_unref().</doc>
  17493. <type name="DBusObjectManagerServer"
  17494. c:type="GDBusObjectManagerServer*"/>
  17495. </return-value>
  17496. <parameters>
  17497. <parameter name="object_path" transfer-ownership="none">
  17498. <doc xml:space="preserve">The object path to export the manager object at, which should
  17499. not be `/`.</doc>
  17500. <type name="utf8" c:type="const gchar*"/>
  17501. </parameter>
  17502. </parameters>
  17503. </constructor>
  17504. <method name="export"
  17505. c:identifier="g_dbus_object_manager_server_export"
  17506. version="2.30">
  17507. <doc xml:space="preserve">Exports @object on @manager.
  17508. If there is already a #GDBusObject exported at the object path,
  17509. then the old object is removed.
  17510. The object path for @object must be in the hierarchy rooted by the
  17511. object path for @manager.
  17512. Note that @manager will take a reference on @object for as long as
  17513. it is exported.</doc>
  17514. <return-value transfer-ownership="none">
  17515. <type name="none" c:type="void"/>
  17516. </return-value>
  17517. <parameters>
  17518. <instance-parameter name="manager" transfer-ownership="none">
  17519. <doc xml:space="preserve">A #GDBusObjectManagerServer.</doc>
  17520. <type name="DBusObjectManagerServer"
  17521. c:type="GDBusObjectManagerServer*"/>
  17522. </instance-parameter>
  17523. <parameter name="object" transfer-ownership="none">
  17524. <doc xml:space="preserve">A #GDBusObjectSkeleton.</doc>
  17525. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17526. </parameter>
  17527. </parameters>
  17528. </method>
  17529. <method name="export_uniquely"
  17530. c:identifier="g_dbus_object_manager_server_export_uniquely"
  17531. version="2.30">
  17532. <doc xml:space="preserve">Like g_dbus_object_manager_server_export() but appends a string of
  17533. the form _N (with N being a natural number) to @object's object path
  17534. if an object with the given path already exists. As such, the
  17535. #GDBusObjectProxy:g-object-path property of @object may be modified.</doc>
  17536. <return-value transfer-ownership="none">
  17537. <type name="none" c:type="void"/>
  17538. </return-value>
  17539. <parameters>
  17540. <instance-parameter name="manager" transfer-ownership="none">
  17541. <doc xml:space="preserve">A #GDBusObjectManagerServer.</doc>
  17542. <type name="DBusObjectManagerServer"
  17543. c:type="GDBusObjectManagerServer*"/>
  17544. </instance-parameter>
  17545. <parameter name="object" transfer-ownership="none">
  17546. <doc xml:space="preserve">An object.</doc>
  17547. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17548. </parameter>
  17549. </parameters>
  17550. </method>
  17551. <method name="get_connection"
  17552. c:identifier="g_dbus_object_manager_server_get_connection"
  17553. version="2.30">
  17554. <doc xml:space="preserve">Gets the #GDBusConnection used by @manager.</doc>
  17555. <return-value transfer-ownership="full">
  17556. <doc xml:space="preserve">A #GDBusConnection object or %NULL if
  17557. @manager isn't exported on a connection. The returned object should
  17558. be freed with g_object_unref().</doc>
  17559. <type name="DBusConnection" c:type="GDBusConnection*"/>
  17560. </return-value>
  17561. <parameters>
  17562. <instance-parameter name="manager" transfer-ownership="none">
  17563. <doc xml:space="preserve">A #GDBusObjectManagerServer</doc>
  17564. <type name="DBusObjectManagerServer"
  17565. c:type="GDBusObjectManagerServer*"/>
  17566. </instance-parameter>
  17567. </parameters>
  17568. </method>
  17569. <method name="is_exported"
  17570. c:identifier="g_dbus_object_manager_server_is_exported"
  17571. version="2.34">
  17572. <doc xml:space="preserve">Returns whether @object is currently exported on @manager.</doc>
  17573. <return-value transfer-ownership="none">
  17574. <doc xml:space="preserve">%TRUE if @object is exported</doc>
  17575. <type name="gboolean" c:type="gboolean"/>
  17576. </return-value>
  17577. <parameters>
  17578. <instance-parameter name="manager" transfer-ownership="none">
  17579. <doc xml:space="preserve">A #GDBusObjectManagerServer.</doc>
  17580. <type name="DBusObjectManagerServer"
  17581. c:type="GDBusObjectManagerServer*"/>
  17582. </instance-parameter>
  17583. <parameter name="object" transfer-ownership="none">
  17584. <doc xml:space="preserve">An object.</doc>
  17585. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17586. </parameter>
  17587. </parameters>
  17588. </method>
  17589. <method name="set_connection"
  17590. c:identifier="g_dbus_object_manager_server_set_connection">
  17591. <doc xml:space="preserve">Exports all objects managed by @manager on @connection. If
  17592. @connection is %NULL, stops exporting objects.</doc>
  17593. <return-value transfer-ownership="none">
  17594. <type name="none" c:type="void"/>
  17595. </return-value>
  17596. <parameters>
  17597. <instance-parameter name="manager" transfer-ownership="none">
  17598. <doc xml:space="preserve">A #GDBusObjectManagerServer.</doc>
  17599. <type name="DBusObjectManagerServer"
  17600. c:type="GDBusObjectManagerServer*"/>
  17601. </instance-parameter>
  17602. <parameter name="connection"
  17603. transfer-ownership="none"
  17604. nullable="1"
  17605. allow-none="1">
  17606. <doc xml:space="preserve">A #GDBusConnection or %NULL.</doc>
  17607. <type name="DBusConnection" c:type="GDBusConnection*"/>
  17608. </parameter>
  17609. </parameters>
  17610. </method>
  17611. <method name="unexport"
  17612. c:identifier="g_dbus_object_manager_server_unexport"
  17613. version="2.30">
  17614. <doc xml:space="preserve">If @manager has an object at @path, removes the object. Otherwise
  17615. does nothing.
  17616. Note that @object_path must be in the hierarchy rooted by the
  17617. object path for @manager.</doc>
  17618. <return-value transfer-ownership="none">
  17619. <doc xml:space="preserve">%TRUE if object at @object_path was removed, %FALSE otherwise.</doc>
  17620. <type name="gboolean" c:type="gboolean"/>
  17621. </return-value>
  17622. <parameters>
  17623. <instance-parameter name="manager" transfer-ownership="none">
  17624. <doc xml:space="preserve">A #GDBusObjectManagerServer.</doc>
  17625. <type name="DBusObjectManagerServer"
  17626. c:type="GDBusObjectManagerServer*"/>
  17627. </instance-parameter>
  17628. <parameter name="object_path" transfer-ownership="none">
  17629. <doc xml:space="preserve">An object path.</doc>
  17630. <type name="utf8" c:type="const gchar*"/>
  17631. </parameter>
  17632. </parameters>
  17633. </method>
  17634. <property name="connection"
  17635. version="2.30"
  17636. writable="1"
  17637. transfer-ownership="none">
  17638. <doc xml:space="preserve">The #GDBusConnection to export objects on.</doc>
  17639. <type name="DBusConnection"/>
  17640. </property>
  17641. <property name="object-path"
  17642. version="2.30"
  17643. writable="1"
  17644. construct-only="1"
  17645. transfer-ownership="none">
  17646. <doc xml:space="preserve">The object path to register the manager object at.</doc>
  17647. <type name="utf8" c:type="gchar*"/>
  17648. </property>
  17649. <field name="parent_instance" readable="0" private="1">
  17650. <type name="GObject.Object" c:type="GObject"/>
  17651. </field>
  17652. <field name="priv" readable="0" private="1">
  17653. <type name="DBusObjectManagerServerPrivate"
  17654. c:type="GDBusObjectManagerServerPrivate*"/>
  17655. </field>
  17656. </class>
  17657. <record name="DBusObjectManagerServerClass"
  17658. c:type="GDBusObjectManagerServerClass"
  17659. glib:is-gtype-struct-for="DBusObjectManagerServer"
  17660. version="2.30">
  17661. <doc xml:space="preserve">Class structure for #GDBusObjectManagerServer.</doc>
  17662. <field name="parent_class">
  17663. <doc xml:space="preserve">The parent class.</doc>
  17664. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  17665. </field>
  17666. <field name="padding" readable="0" private="1">
  17667. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  17668. <type name="gpointer" c:type="gpointer"/>
  17669. </array>
  17670. </field>
  17671. </record>
  17672. <record name="DBusObjectManagerServerPrivate"
  17673. c:type="GDBusObjectManagerServerPrivate"
  17674. disguised="1">
  17675. </record>
  17676. <class name="DBusObjectProxy"
  17677. c:symbol-prefix="dbus_object_proxy"
  17678. c:type="GDBusObjectProxy"
  17679. version="2.30"
  17680. parent="GObject.Object"
  17681. glib:type-name="GDBusObjectProxy"
  17682. glib:get-type="g_dbus_object_proxy_get_type"
  17683. glib:type-struct="DBusObjectProxyClass">
  17684. <doc xml:space="preserve">A #GDBusObjectProxy is an object used to represent a remote object
  17685. with one or more D-Bus interfaces. Normally, you don't instantiate
  17686. a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient
  17687. is used to obtain it.</doc>
  17688. <implements name="DBusObject"/>
  17689. <constructor name="new"
  17690. c:identifier="g_dbus_object_proxy_new"
  17691. version="2.30">
  17692. <doc xml:space="preserve">Creates a new #GDBusObjectProxy for the given connection and
  17693. object path.</doc>
  17694. <return-value transfer-ownership="full">
  17695. <doc xml:space="preserve">a new #GDBusObjectProxy</doc>
  17696. <type name="DBusObjectProxy" c:type="GDBusObjectProxy*"/>
  17697. </return-value>
  17698. <parameters>
  17699. <parameter name="connection" transfer-ownership="none">
  17700. <doc xml:space="preserve">a #GDBusConnection</doc>
  17701. <type name="DBusConnection" c:type="GDBusConnection*"/>
  17702. </parameter>
  17703. <parameter name="object_path" transfer-ownership="none">
  17704. <doc xml:space="preserve">the object path</doc>
  17705. <type name="utf8" c:type="const gchar*"/>
  17706. </parameter>
  17707. </parameters>
  17708. </constructor>
  17709. <method name="get_connection"
  17710. c:identifier="g_dbus_object_proxy_get_connection"
  17711. version="2.30">
  17712. <doc xml:space="preserve">Gets the connection that @proxy is for.</doc>
  17713. <return-value transfer-ownership="none">
  17714. <doc xml:space="preserve">A #GDBusConnection. Do not free, the
  17715. object is owned by @proxy.</doc>
  17716. <type name="DBusConnection" c:type="GDBusConnection*"/>
  17717. </return-value>
  17718. <parameters>
  17719. <instance-parameter name="proxy" transfer-ownership="none">
  17720. <doc xml:space="preserve">a #GDBusObjectProxy</doc>
  17721. <type name="DBusObjectProxy" c:type="GDBusObjectProxy*"/>
  17722. </instance-parameter>
  17723. </parameters>
  17724. </method>
  17725. <property name="g-connection"
  17726. version="2.30"
  17727. writable="1"
  17728. construct-only="1"
  17729. transfer-ownership="none">
  17730. <doc xml:space="preserve">The connection of the proxy.</doc>
  17731. <type name="DBusConnection"/>
  17732. </property>
  17733. <property name="g-object-path"
  17734. version="2.30"
  17735. writable="1"
  17736. construct-only="1"
  17737. transfer-ownership="none">
  17738. <doc xml:space="preserve">The object path of the proxy.</doc>
  17739. <type name="utf8" c:type="gchar*"/>
  17740. </property>
  17741. <field name="parent_instance" readable="0" private="1">
  17742. <type name="GObject.Object" c:type="GObject"/>
  17743. </field>
  17744. <field name="priv" readable="0" private="1">
  17745. <type name="DBusObjectProxyPrivate" c:type="GDBusObjectProxyPrivate*"/>
  17746. </field>
  17747. </class>
  17748. <record name="DBusObjectProxyClass"
  17749. c:type="GDBusObjectProxyClass"
  17750. glib:is-gtype-struct-for="DBusObjectProxy"
  17751. version="2.30">
  17752. <doc xml:space="preserve">Class structure for #GDBusObjectProxy.</doc>
  17753. <field name="parent_class">
  17754. <doc xml:space="preserve">The parent class.</doc>
  17755. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  17756. </field>
  17757. <field name="padding" readable="0" private="1">
  17758. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  17759. <type name="gpointer" c:type="gpointer"/>
  17760. </array>
  17761. </field>
  17762. </record>
  17763. <record name="DBusObjectProxyPrivate"
  17764. c:type="GDBusObjectProxyPrivate"
  17765. disguised="1">
  17766. </record>
  17767. <class name="DBusObjectSkeleton"
  17768. c:symbol-prefix="dbus_object_skeleton"
  17769. c:type="GDBusObjectSkeleton"
  17770. version="2.30"
  17771. parent="GObject.Object"
  17772. glib:type-name="GDBusObjectSkeleton"
  17773. glib:get-type="g_dbus_object_skeleton_get_type"
  17774. glib:type-struct="DBusObjectSkeletonClass">
  17775. <doc xml:space="preserve">A #GDBusObjectSkeleton instance is essentially a group of D-Bus
  17776. interfaces. The set of exported interfaces on the object may be
  17777. dynamic and change at runtime.
  17778. This type is intended to be used with #GDBusObjectManager.</doc>
  17779. <implements name="DBusObject"/>
  17780. <constructor name="new"
  17781. c:identifier="g_dbus_object_skeleton_new"
  17782. version="2.30">
  17783. <doc xml:space="preserve">Creates a new #GDBusObjectSkeleton.</doc>
  17784. <return-value transfer-ownership="full">
  17785. <doc xml:space="preserve">A #GDBusObjectSkeleton. Free with g_object_unref().</doc>
  17786. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17787. </return-value>
  17788. <parameters>
  17789. <parameter name="object_path" transfer-ownership="none">
  17790. <doc xml:space="preserve">An object path.</doc>
  17791. <type name="utf8" c:type="const gchar*"/>
  17792. </parameter>
  17793. </parameters>
  17794. </constructor>
  17795. <virtual-method name="authorize_method">
  17796. <return-value transfer-ownership="none">
  17797. <type name="gboolean" c:type="gboolean"/>
  17798. </return-value>
  17799. <parameters>
  17800. <instance-parameter name="object" transfer-ownership="none">
  17801. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17802. </instance-parameter>
  17803. <parameter name="interface_" transfer-ownership="none">
  17804. <type name="DBusInterfaceSkeleton"
  17805. c:type="GDBusInterfaceSkeleton*"/>
  17806. </parameter>
  17807. <parameter name="invocation" transfer-ownership="none">
  17808. <type name="DBusMethodInvocation" c:type="GDBusMethodInvocation*"/>
  17809. </parameter>
  17810. </parameters>
  17811. </virtual-method>
  17812. <method name="add_interface"
  17813. c:identifier="g_dbus_object_skeleton_add_interface"
  17814. version="2.30">
  17815. <doc xml:space="preserve">Adds @interface_ to @object.
  17816. If @object already contains a #GDBusInterfaceSkeleton with the same
  17817. interface name, it is removed before @interface_ is added.
  17818. Note that @object takes its own reference on @interface_ and holds
  17819. it until removed.</doc>
  17820. <return-value transfer-ownership="none">
  17821. <type name="none" c:type="void"/>
  17822. </return-value>
  17823. <parameters>
  17824. <instance-parameter name="object" transfer-ownership="none">
  17825. <doc xml:space="preserve">A #GDBusObjectSkeleton.</doc>
  17826. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17827. </instance-parameter>
  17828. <parameter name="interface_" transfer-ownership="none">
  17829. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  17830. <type name="DBusInterfaceSkeleton"
  17831. c:type="GDBusInterfaceSkeleton*"/>
  17832. </parameter>
  17833. </parameters>
  17834. </method>
  17835. <method name="flush"
  17836. c:identifier="g_dbus_object_skeleton_flush"
  17837. version="2.30">
  17838. <doc xml:space="preserve">This method simply calls g_dbus_interface_skeleton_flush() on all
  17839. interfaces belonging to @object. See that method for when flushing
  17840. is useful.</doc>
  17841. <return-value transfer-ownership="none">
  17842. <type name="none" c:type="void"/>
  17843. </return-value>
  17844. <parameters>
  17845. <instance-parameter name="object" transfer-ownership="none">
  17846. <doc xml:space="preserve">A #GDBusObjectSkeleton.</doc>
  17847. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17848. </instance-parameter>
  17849. </parameters>
  17850. </method>
  17851. <method name="remove_interface"
  17852. c:identifier="g_dbus_object_skeleton_remove_interface"
  17853. version="2.30">
  17854. <doc xml:space="preserve">Removes @interface_ from @object.</doc>
  17855. <return-value transfer-ownership="none">
  17856. <type name="none" c:type="void"/>
  17857. </return-value>
  17858. <parameters>
  17859. <instance-parameter name="object" transfer-ownership="none">
  17860. <doc xml:space="preserve">A #GDBusObjectSkeleton.</doc>
  17861. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17862. </instance-parameter>
  17863. <parameter name="interface_" transfer-ownership="none">
  17864. <doc xml:space="preserve">A #GDBusInterfaceSkeleton.</doc>
  17865. <type name="DBusInterfaceSkeleton"
  17866. c:type="GDBusInterfaceSkeleton*"/>
  17867. </parameter>
  17868. </parameters>
  17869. </method>
  17870. <method name="remove_interface_by_name"
  17871. c:identifier="g_dbus_object_skeleton_remove_interface_by_name"
  17872. version="2.30">
  17873. <doc xml:space="preserve">Removes the #GDBusInterface with @interface_name from @object.
  17874. If no D-Bus interface of the given interface exists, this function
  17875. does nothing.</doc>
  17876. <return-value transfer-ownership="none">
  17877. <type name="none" c:type="void"/>
  17878. </return-value>
  17879. <parameters>
  17880. <instance-parameter name="object" transfer-ownership="none">
  17881. <doc xml:space="preserve">A #GDBusObjectSkeleton.</doc>
  17882. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17883. </instance-parameter>
  17884. <parameter name="interface_name" transfer-ownership="none">
  17885. <doc xml:space="preserve">A D-Bus interface name.</doc>
  17886. <type name="utf8" c:type="const gchar*"/>
  17887. </parameter>
  17888. </parameters>
  17889. </method>
  17890. <method name="set_object_path"
  17891. c:identifier="g_dbus_object_skeleton_set_object_path"
  17892. version="2.30">
  17893. <doc xml:space="preserve">Sets the object path for @object.</doc>
  17894. <return-value transfer-ownership="none">
  17895. <type name="none" c:type="void"/>
  17896. </return-value>
  17897. <parameters>
  17898. <instance-parameter name="object" transfer-ownership="none">
  17899. <doc xml:space="preserve">A #GDBusObjectSkeleton.</doc>
  17900. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17901. </instance-parameter>
  17902. <parameter name="object_path" transfer-ownership="none">
  17903. <doc xml:space="preserve">A valid D-Bus object path.</doc>
  17904. <type name="utf8" c:type="const gchar*"/>
  17905. </parameter>
  17906. </parameters>
  17907. </method>
  17908. <property name="g-object-path"
  17909. version="2.30"
  17910. writable="1"
  17911. construct="1"
  17912. transfer-ownership="none">
  17913. <doc xml:space="preserve">The object path where the object is exported.</doc>
  17914. <type name="utf8" c:type="gchar*"/>
  17915. </property>
  17916. <field name="parent_instance" readable="0" private="1">
  17917. <type name="GObject.Object" c:type="GObject"/>
  17918. </field>
  17919. <field name="priv" readable="0" private="1">
  17920. <type name="DBusObjectSkeletonPrivate"
  17921. c:type="GDBusObjectSkeletonPrivate*"/>
  17922. </field>
  17923. <glib:signal name="authorize-method" when="last" version="2.30">
  17924. <doc xml:space="preserve">Emitted when a method is invoked by a remote caller and used to
  17925. determine if the method call is authorized.
  17926. This signal is like #GDBusInterfaceSkeleton's
  17927. #GDBusInterfaceSkeleton::g-authorize-method signal,
  17928. except that it is for the enclosing object.
  17929. The default class handler just returns %TRUE.</doc>
  17930. <return-value transfer-ownership="none">
  17931. <doc xml:space="preserve">%TRUE if the call is authorized, %FALSE otherwise.</doc>
  17932. <type name="gboolean" c:type="gboolean"/>
  17933. </return-value>
  17934. <parameters>
  17935. <parameter name="interface" transfer-ownership="none">
  17936. <doc xml:space="preserve">The #GDBusInterfaceSkeleton that @invocation is for.</doc>
  17937. <type name="DBusInterfaceSkeleton"/>
  17938. </parameter>
  17939. <parameter name="invocation" transfer-ownership="none">
  17940. <doc xml:space="preserve">A #GDBusMethodInvocation.</doc>
  17941. <type name="DBusMethodInvocation"/>
  17942. </parameter>
  17943. </parameters>
  17944. </glib:signal>
  17945. </class>
  17946. <record name="DBusObjectSkeletonClass"
  17947. c:type="GDBusObjectSkeletonClass"
  17948. glib:is-gtype-struct-for="DBusObjectSkeleton"
  17949. version="2.30">
  17950. <doc xml:space="preserve">Class structure for #GDBusObjectSkeleton.</doc>
  17951. <field name="parent_class">
  17952. <doc xml:space="preserve">The parent class.</doc>
  17953. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  17954. </field>
  17955. <field name="authorize_method">
  17956. <callback name="authorize_method">
  17957. <return-value transfer-ownership="none">
  17958. <type name="gboolean" c:type="gboolean"/>
  17959. </return-value>
  17960. <parameters>
  17961. <parameter name="object" transfer-ownership="none">
  17962. <type name="DBusObjectSkeleton" c:type="GDBusObjectSkeleton*"/>
  17963. </parameter>
  17964. <parameter name="interface_" transfer-ownership="none">
  17965. <type name="DBusInterfaceSkeleton"
  17966. c:type="GDBusInterfaceSkeleton*"/>
  17967. </parameter>
  17968. <parameter name="invocation" transfer-ownership="none">
  17969. <type name="DBusMethodInvocation"
  17970. c:type="GDBusMethodInvocation*"/>
  17971. </parameter>
  17972. </parameters>
  17973. </callback>
  17974. </field>
  17975. <field name="padding" readable="0" private="1">
  17976. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  17977. <type name="gpointer" c:type="gpointer"/>
  17978. </array>
  17979. </field>
  17980. </record>
  17981. <record name="DBusObjectSkeletonPrivate"
  17982. c:type="GDBusObjectSkeletonPrivate"
  17983. disguised="1">
  17984. </record>
  17985. <record name="DBusPropertyInfo"
  17986. c:type="GDBusPropertyInfo"
  17987. version="2.26"
  17988. glib:type-name="GDBusPropertyInfo"
  17989. glib:get-type="g_dbus_property_info_get_type"
  17990. c:symbol-prefix="dbus_property_info">
  17991. <doc xml:space="preserve">Information about a D-Bus property on a D-Bus interface.</doc>
  17992. <field name="ref_count" writable="1">
  17993. <doc xml:space="preserve">The reference count or -1 if statically allocated.</doc>
  17994. <type name="gint" c:type="volatile gint"/>
  17995. </field>
  17996. <field name="name" writable="1">
  17997. <doc xml:space="preserve">The name of the D-Bus property, e.g. "SupportedFilesystems".</doc>
  17998. <type name="utf8" c:type="gchar*"/>
  17999. </field>
  18000. <field name="signature" writable="1">
  18001. <doc xml:space="preserve">The D-Bus signature of the property (a single complete type).</doc>
  18002. <type name="utf8" c:type="gchar*"/>
  18003. </field>
  18004. <field name="flags" writable="1">
  18005. <doc xml:space="preserve">Access control flags for the property.</doc>
  18006. <type name="DBusPropertyInfoFlags" c:type="GDBusPropertyInfoFlags"/>
  18007. </field>
  18008. <field name="annotations" writable="1">
  18009. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
  18010. <array c:type="GDBusAnnotationInfo**">
  18011. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  18012. </array>
  18013. </field>
  18014. <method name="ref"
  18015. c:identifier="g_dbus_property_info_ref"
  18016. version="2.26">
  18017. <doc xml:space="preserve">If @info is statically allocated does nothing. Otherwise increases
  18018. the reference count.</doc>
  18019. <return-value transfer-ownership="full">
  18020. <doc xml:space="preserve">The same @info.</doc>
  18021. <type name="DBusPropertyInfo" c:type="GDBusPropertyInfo*"/>
  18022. </return-value>
  18023. <parameters>
  18024. <instance-parameter name="info" transfer-ownership="none">
  18025. <doc xml:space="preserve">A #GDBusPropertyInfo</doc>
  18026. <type name="DBusPropertyInfo" c:type="GDBusPropertyInfo*"/>
  18027. </instance-parameter>
  18028. </parameters>
  18029. </method>
  18030. <method name="unref"
  18031. c:identifier="g_dbus_property_info_unref"
  18032. version="2.26">
  18033. <doc xml:space="preserve">If @info is statically allocated, does nothing. Otherwise decreases
  18034. the reference count of @info. When its reference count drops to 0,
  18035. the memory used is freed.</doc>
  18036. <return-value transfer-ownership="none">
  18037. <type name="none" c:type="void"/>
  18038. </return-value>
  18039. <parameters>
  18040. <instance-parameter name="info" transfer-ownership="none">
  18041. <doc xml:space="preserve">A #GDBusPropertyInfo.</doc>
  18042. <type name="DBusPropertyInfo" c:type="GDBusPropertyInfo*"/>
  18043. </instance-parameter>
  18044. </parameters>
  18045. </method>
  18046. </record>
  18047. <bitfield name="DBusPropertyInfoFlags"
  18048. version="2.26"
  18049. glib:type-name="GDBusPropertyInfoFlags"
  18050. glib:get-type="g_dbus_property_info_flags_get_type"
  18051. c:type="GDBusPropertyInfoFlags">
  18052. <doc xml:space="preserve">Flags describing the access control of a D-Bus property.</doc>
  18053. <member name="none"
  18054. value="0"
  18055. c:identifier="G_DBUS_PROPERTY_INFO_FLAGS_NONE"
  18056. glib:nick="none">
  18057. <doc xml:space="preserve">No flags set.</doc>
  18058. </member>
  18059. <member name="readable"
  18060. value="1"
  18061. c:identifier="G_DBUS_PROPERTY_INFO_FLAGS_READABLE"
  18062. glib:nick="readable">
  18063. <doc xml:space="preserve">Property is readable.</doc>
  18064. </member>
  18065. <member name="writable"
  18066. value="2"
  18067. c:identifier="G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE"
  18068. glib:nick="writable">
  18069. <doc xml:space="preserve">Property is writable.</doc>
  18070. </member>
  18071. </bitfield>
  18072. <class name="DBusProxy"
  18073. c:symbol-prefix="dbus_proxy"
  18074. c:type="GDBusProxy"
  18075. version="2.26"
  18076. parent="GObject.Object"
  18077. glib:type-name="GDBusProxy"
  18078. glib:get-type="g_dbus_proxy_get_type"
  18079. glib:type-struct="DBusProxyClass">
  18080. <doc xml:space="preserve">#GDBusProxy is a base class used for proxies to access a D-Bus
  18081. interface on a remote object. A #GDBusProxy can be constructed for
  18082. both well-known and unique names.
  18083. By default, #GDBusProxy will cache all properties (and listen to
  18084. changes) of the remote object, and proxy all signals that gets
  18085. emitted. This behaviour can be changed by passing suitable
  18086. #GDBusProxyFlags when the proxy is created. If the proxy is for a
  18087. well-known name, the property cache is flushed when the name owner
  18088. vanishes and reloaded when a name owner appears.
  18089. If a #GDBusProxy is used for a well-known name, the owner of the
  18090. name is tracked and can be read from
  18091. #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
  18092. get notified of changes. Additionally, only signals and property
  18093. changes emitted from the current name owner are considered and
  18094. calls are always sent to the current name owner. This avoids a
  18095. number of race conditions when the name is lost by one owner and
  18096. claimed by another. However, if no name owner currently exists,
  18097. then calls will be sent to the well-known name which may result in
  18098. the message bus launching an owner (unless
  18099. %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
  18100. The generic #GDBusProxy::g-properties-changed and
  18101. #GDBusProxy::g-signal signals are not very convenient to work with.
  18102. Therefore, the recommended way of working with proxies is to subclass
  18103. #GDBusProxy, and have more natural properties and signals in your derived
  18104. class. This [example][gdbus-example-gdbus-codegen] shows how this can
  18105. easily be done using the [gdbus-codegen][gdbus-codegen] tool.
  18106. A #GDBusProxy instance can be used from multiple threads but note
  18107. that all signals (e.g. #GDBusProxy::g-signal, #GDBusProxy::g-properties-changed
  18108. and #GObject::notify) are emitted in the
  18109. [thread-default main context][g-main-context-push-thread-default]
  18110. of the thread where the instance was constructed.
  18111. An example using a proxy for a well-known name can be found in
  18112. [gdbus-example-watch-proxy.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-watch-proxy.c)</doc>
  18113. <implements name="AsyncInitable"/>
  18114. <implements name="DBusInterface"/>
  18115. <implements name="Initable"/>
  18116. <constructor name="new_finish"
  18117. c:identifier="g_dbus_proxy_new_finish"
  18118. version="2.26"
  18119. throws="1">
  18120. <doc xml:space="preserve">Finishes creating a #GDBusProxy.</doc>
  18121. <return-value transfer-ownership="full">
  18122. <doc xml:space="preserve">A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().</doc>
  18123. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18124. </return-value>
  18125. <parameters>
  18126. <parameter name="res" transfer-ownership="none">
  18127. <doc xml:space="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().</doc>
  18128. <type name="AsyncResult" c:type="GAsyncResult*"/>
  18129. </parameter>
  18130. </parameters>
  18131. </constructor>
  18132. <constructor name="new_for_bus_finish"
  18133. c:identifier="g_dbus_proxy_new_for_bus_finish"
  18134. version="2.26"
  18135. throws="1">
  18136. <doc xml:space="preserve">Finishes creating a #GDBusProxy.</doc>
  18137. <return-value transfer-ownership="full">
  18138. <doc xml:space="preserve">A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().</doc>
  18139. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18140. </return-value>
  18141. <parameters>
  18142. <parameter name="res" transfer-ownership="none">
  18143. <doc xml:space="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().</doc>
  18144. <type name="AsyncResult" c:type="GAsyncResult*"/>
  18145. </parameter>
  18146. </parameters>
  18147. </constructor>
  18148. <constructor name="new_for_bus_sync"
  18149. c:identifier="g_dbus_proxy_new_for_bus_sync"
  18150. version="2.26"
  18151. throws="1">
  18152. <doc xml:space="preserve">Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
  18153. #GDBusProxy is used in this [example][gdbus-wellknown-proxy].</doc>
  18154. <return-value transfer-ownership="full">
  18155. <doc xml:space="preserve">A #GDBusProxy or %NULL if error is set. Free with g_object_unref().</doc>
  18156. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18157. </return-value>
  18158. <parameters>
  18159. <parameter name="bus_type" transfer-ownership="none">
  18160. <doc xml:space="preserve">A #GBusType.</doc>
  18161. <type name="BusType" c:type="GBusType"/>
  18162. </parameter>
  18163. <parameter name="flags" transfer-ownership="none">
  18164. <doc xml:space="preserve">Flags used when constructing the proxy.</doc>
  18165. <type name="DBusProxyFlags" c:type="GDBusProxyFlags"/>
  18166. </parameter>
  18167. <parameter name="info"
  18168. transfer-ownership="none"
  18169. nullable="1"
  18170. allow-none="1">
  18171. <doc xml:space="preserve">A #GDBusInterfaceInfo specifying the minimal interface
  18172. that @proxy conforms to or %NULL.</doc>
  18173. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  18174. </parameter>
  18175. <parameter name="name" transfer-ownership="none">
  18176. <doc xml:space="preserve">A bus name (well-known or unique).</doc>
  18177. <type name="utf8" c:type="const gchar*"/>
  18178. </parameter>
  18179. <parameter name="object_path" transfer-ownership="none">
  18180. <doc xml:space="preserve">An object path.</doc>
  18181. <type name="utf8" c:type="const gchar*"/>
  18182. </parameter>
  18183. <parameter name="interface_name" transfer-ownership="none">
  18184. <doc xml:space="preserve">A D-Bus interface name.</doc>
  18185. <type name="utf8" c:type="const gchar*"/>
  18186. </parameter>
  18187. <parameter name="cancellable"
  18188. transfer-ownership="none"
  18189. nullable="1"
  18190. allow-none="1">
  18191. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18192. <type name="Cancellable" c:type="GCancellable*"/>
  18193. </parameter>
  18194. </parameters>
  18195. </constructor>
  18196. <constructor name="new_sync"
  18197. c:identifier="g_dbus_proxy_new_sync"
  18198. version="2.26"
  18199. throws="1">
  18200. <doc xml:space="preserve">Creates a proxy for accessing @interface_name on the remote object
  18201. at @object_path owned by @name at @connection and synchronously
  18202. loads D-Bus properties unless the
  18203. %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
  18204. If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
  18205. match rules for signals. Connect to the #GDBusProxy::g-signal signal
  18206. to handle signals from the remote object.
  18207. If @name is a well-known name and the
  18208. %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION
  18209. flags aren't set and no name owner currently exists, the message bus
  18210. will be requested to launch a name owner for the name.
  18211. This is a synchronous failable constructor. See g_dbus_proxy_new()
  18212. and g_dbus_proxy_new_finish() for the asynchronous version.
  18213. #GDBusProxy is used in this [example][gdbus-wellknown-proxy].</doc>
  18214. <return-value transfer-ownership="full">
  18215. <doc xml:space="preserve">A #GDBusProxy or %NULL if error is set. Free with g_object_unref().</doc>
  18216. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18217. </return-value>
  18218. <parameters>
  18219. <parameter name="connection" transfer-ownership="none">
  18220. <doc xml:space="preserve">A #GDBusConnection.</doc>
  18221. <type name="DBusConnection" c:type="GDBusConnection*"/>
  18222. </parameter>
  18223. <parameter name="flags" transfer-ownership="none">
  18224. <doc xml:space="preserve">Flags used when constructing the proxy.</doc>
  18225. <type name="DBusProxyFlags" c:type="GDBusProxyFlags"/>
  18226. </parameter>
  18227. <parameter name="info"
  18228. transfer-ownership="none"
  18229. nullable="1"
  18230. allow-none="1">
  18231. <doc xml:space="preserve">A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.</doc>
  18232. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  18233. </parameter>
  18234. <parameter name="name"
  18235. transfer-ownership="none"
  18236. nullable="1"
  18237. allow-none="1">
  18238. <doc xml:space="preserve">A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.</doc>
  18239. <type name="utf8" c:type="const gchar*"/>
  18240. </parameter>
  18241. <parameter name="object_path" transfer-ownership="none">
  18242. <doc xml:space="preserve">An object path.</doc>
  18243. <type name="utf8" c:type="const gchar*"/>
  18244. </parameter>
  18245. <parameter name="interface_name" transfer-ownership="none">
  18246. <doc xml:space="preserve">A D-Bus interface name.</doc>
  18247. <type name="utf8" c:type="const gchar*"/>
  18248. </parameter>
  18249. <parameter name="cancellable"
  18250. transfer-ownership="none"
  18251. nullable="1"
  18252. allow-none="1">
  18253. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18254. <type name="Cancellable" c:type="GCancellable*"/>
  18255. </parameter>
  18256. </parameters>
  18257. </constructor>
  18258. <function name="new" c:identifier="g_dbus_proxy_new" version="2.26">
  18259. <doc xml:space="preserve">Creates a proxy for accessing @interface_name on the remote object
  18260. at @object_path owned by @name at @connection and asynchronously
  18261. loads D-Bus properties unless the
  18262. %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
  18263. the #GDBusProxy::g-properties-changed signal to get notified about
  18264. property changes.
  18265. If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
  18266. match rules for signals. Connect to the #GDBusProxy::g-signal signal
  18267. to handle signals from the remote object.
  18268. If @name is a well-known name and the
  18269. %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION
  18270. flags aren't set and no name owner currently exists, the message bus
  18271. will be requested to launch a name owner for the name.
  18272. This is a failable asynchronous constructor - when the proxy is
  18273. ready, @callback will be invoked and you can use
  18274. g_dbus_proxy_new_finish() to get the result.
  18275. See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
  18276. #GDBusProxy is used in this [example][gdbus-wellknown-proxy].</doc>
  18277. <return-value transfer-ownership="none">
  18278. <type name="none" c:type="void"/>
  18279. </return-value>
  18280. <parameters>
  18281. <parameter name="connection" transfer-ownership="none">
  18282. <doc xml:space="preserve">A #GDBusConnection.</doc>
  18283. <type name="DBusConnection" c:type="GDBusConnection*"/>
  18284. </parameter>
  18285. <parameter name="flags" transfer-ownership="none">
  18286. <doc xml:space="preserve">Flags used when constructing the proxy.</doc>
  18287. <type name="DBusProxyFlags" c:type="GDBusProxyFlags"/>
  18288. </parameter>
  18289. <parameter name="info"
  18290. transfer-ownership="none"
  18291. nullable="1"
  18292. allow-none="1">
  18293. <doc xml:space="preserve">A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.</doc>
  18294. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  18295. </parameter>
  18296. <parameter name="name"
  18297. transfer-ownership="none"
  18298. nullable="1"
  18299. allow-none="1">
  18300. <doc xml:space="preserve">A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.</doc>
  18301. <type name="utf8" c:type="const gchar*"/>
  18302. </parameter>
  18303. <parameter name="object_path" transfer-ownership="none">
  18304. <doc xml:space="preserve">An object path.</doc>
  18305. <type name="utf8" c:type="const gchar*"/>
  18306. </parameter>
  18307. <parameter name="interface_name" transfer-ownership="none">
  18308. <doc xml:space="preserve">A D-Bus interface name.</doc>
  18309. <type name="utf8" c:type="const gchar*"/>
  18310. </parameter>
  18311. <parameter name="cancellable"
  18312. transfer-ownership="none"
  18313. nullable="1"
  18314. allow-none="1">
  18315. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18316. <type name="Cancellable" c:type="GCancellable*"/>
  18317. </parameter>
  18318. <parameter name="callback"
  18319. transfer-ownership="none"
  18320. nullable="1"
  18321. allow-none="1"
  18322. scope="async"
  18323. closure="8">
  18324. <doc xml:space="preserve">Callback function to invoke when the proxy is ready.</doc>
  18325. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  18326. </parameter>
  18327. <parameter name="user_data"
  18328. transfer-ownership="none"
  18329. nullable="1"
  18330. allow-none="1">
  18331. <doc xml:space="preserve">User data to pass to @callback.</doc>
  18332. <type name="gpointer" c:type="gpointer"/>
  18333. </parameter>
  18334. </parameters>
  18335. </function>
  18336. <function name="new_for_bus"
  18337. c:identifier="g_dbus_proxy_new_for_bus"
  18338. version="2.26">
  18339. <doc xml:space="preserve">Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  18340. #GDBusProxy is used in this [example][gdbus-wellknown-proxy].</doc>
  18341. <return-value transfer-ownership="none">
  18342. <type name="none" c:type="void"/>
  18343. </return-value>
  18344. <parameters>
  18345. <parameter name="bus_type" transfer-ownership="none">
  18346. <doc xml:space="preserve">A #GBusType.</doc>
  18347. <type name="BusType" c:type="GBusType"/>
  18348. </parameter>
  18349. <parameter name="flags" transfer-ownership="none">
  18350. <doc xml:space="preserve">Flags used when constructing the proxy.</doc>
  18351. <type name="DBusProxyFlags" c:type="GDBusProxyFlags"/>
  18352. </parameter>
  18353. <parameter name="info"
  18354. transfer-ownership="none"
  18355. nullable="1"
  18356. allow-none="1">
  18357. <doc xml:space="preserve">A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.</doc>
  18358. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  18359. </parameter>
  18360. <parameter name="name" transfer-ownership="none">
  18361. <doc xml:space="preserve">A bus name (well-known or unique).</doc>
  18362. <type name="utf8" c:type="const gchar*"/>
  18363. </parameter>
  18364. <parameter name="object_path" transfer-ownership="none">
  18365. <doc xml:space="preserve">An object path.</doc>
  18366. <type name="utf8" c:type="const gchar*"/>
  18367. </parameter>
  18368. <parameter name="interface_name" transfer-ownership="none">
  18369. <doc xml:space="preserve">A D-Bus interface name.</doc>
  18370. <type name="utf8" c:type="const gchar*"/>
  18371. </parameter>
  18372. <parameter name="cancellable"
  18373. transfer-ownership="none"
  18374. nullable="1"
  18375. allow-none="1">
  18376. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18377. <type name="Cancellable" c:type="GCancellable*"/>
  18378. </parameter>
  18379. <parameter name="callback"
  18380. transfer-ownership="none"
  18381. nullable="1"
  18382. allow-none="1"
  18383. scope="async"
  18384. closure="8">
  18385. <doc xml:space="preserve">Callback function to invoke when the proxy is ready.</doc>
  18386. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  18387. </parameter>
  18388. <parameter name="user_data"
  18389. transfer-ownership="none"
  18390. nullable="1"
  18391. allow-none="1">
  18392. <doc xml:space="preserve">User data to pass to @callback.</doc>
  18393. <type name="gpointer" c:type="gpointer"/>
  18394. </parameter>
  18395. </parameters>
  18396. </function>
  18397. <virtual-method name="g_properties_changed">
  18398. <return-value transfer-ownership="none">
  18399. <type name="none" c:type="void"/>
  18400. </return-value>
  18401. <parameters>
  18402. <instance-parameter name="proxy" transfer-ownership="none">
  18403. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18404. </instance-parameter>
  18405. <parameter name="changed_properties" transfer-ownership="none">
  18406. <type name="GLib.Variant" c:type="GVariant*"/>
  18407. </parameter>
  18408. <parameter name="invalidated_properties" transfer-ownership="none">
  18409. <type name="utf8" c:type="const gchar* const*"/>
  18410. </parameter>
  18411. </parameters>
  18412. </virtual-method>
  18413. <virtual-method name="g_signal">
  18414. <return-value transfer-ownership="none">
  18415. <type name="none" c:type="void"/>
  18416. </return-value>
  18417. <parameters>
  18418. <instance-parameter name="proxy" transfer-ownership="none">
  18419. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18420. </instance-parameter>
  18421. <parameter name="sender_name" transfer-ownership="none">
  18422. <type name="utf8" c:type="const gchar*"/>
  18423. </parameter>
  18424. <parameter name="signal_name" transfer-ownership="none">
  18425. <type name="utf8" c:type="const gchar*"/>
  18426. </parameter>
  18427. <parameter name="parameters" transfer-ownership="none">
  18428. <type name="GLib.Variant" c:type="GVariant*"/>
  18429. </parameter>
  18430. </parameters>
  18431. </virtual-method>
  18432. <method name="call" c:identifier="g_dbus_proxy_call" version="2.26">
  18433. <doc xml:space="preserve">Asynchronously invokes the @method_name method on @proxy.
  18434. If @method_name contains any dots, then @name is split into interface and
  18435. method name parts. This allows using @proxy for invoking methods on
  18436. other interfaces.
  18437. If the #GDBusConnection associated with @proxy is closed then
  18438. the operation will fail with %G_IO_ERROR_CLOSED. If
  18439. @cancellable is canceled, the operation will fail with
  18440. %G_IO_ERROR_CANCELLED. If @parameters contains a value not
  18441. compatible with the D-Bus protocol, the operation fails with
  18442. %G_IO_ERROR_INVALID_ARGUMENT.
  18443. If the @parameters #GVariant is floating, it is consumed. This allows
  18444. convenient 'inline' use of g_variant_new(), e.g.:
  18445. |[&lt;!-- language="C" --&gt;
  18446. g_dbus_proxy_call (proxy,
  18447. "TwoStrings",
  18448. g_variant_new ("(ss)",
  18449. "Thing One",
  18450. "Thing Two"),
  18451. G_DBUS_CALL_FLAGS_NONE,
  18452. -1,
  18453. NULL,
  18454. (GAsyncReadyCallback) two_strings_done,
  18455. &amp;data);
  18456. ]|
  18457. If @proxy has an expected interface (see
  18458. #GDBusProxy:g-interface-info) and @method_name is referenced by it,
  18459. then the return value is checked against the return type.
  18460. This is an asynchronous method. When the operation is finished,
  18461. @callback will be invoked in the
  18462. [thread-default main context][g-main-context-push-thread-default]
  18463. of the thread you are calling this method from.
  18464. You can then call g_dbus_proxy_call_finish() to get the result of
  18465. the operation. See g_dbus_proxy_call_sync() for the synchronous
  18466. version of this method.
  18467. If @callback is %NULL then the D-Bus method call message will be sent with
  18468. the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.</doc>
  18469. <return-value transfer-ownership="none">
  18470. <type name="none" c:type="void"/>
  18471. </return-value>
  18472. <parameters>
  18473. <instance-parameter name="proxy" transfer-ownership="none">
  18474. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18475. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18476. </instance-parameter>
  18477. <parameter name="method_name" transfer-ownership="none">
  18478. <doc xml:space="preserve">Name of method to invoke.</doc>
  18479. <type name="utf8" c:type="const gchar*"/>
  18480. </parameter>
  18481. <parameter name="parameters"
  18482. transfer-ownership="none"
  18483. nullable="1"
  18484. allow-none="1">
  18485. <doc xml:space="preserve">A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.</doc>
  18486. <type name="GLib.Variant" c:type="GVariant*"/>
  18487. </parameter>
  18488. <parameter name="flags" transfer-ownership="none">
  18489. <doc xml:space="preserve">Flags from the #GDBusCallFlags enumeration.</doc>
  18490. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  18491. </parameter>
  18492. <parameter name="timeout_msec" transfer-ownership="none">
  18493. <doc xml:space="preserve">The timeout in milliseconds (with %G_MAXINT meaning
  18494. "infinite") or -1 to use the proxy default timeout.</doc>
  18495. <type name="gint" c:type="gint"/>
  18496. </parameter>
  18497. <parameter name="cancellable"
  18498. transfer-ownership="none"
  18499. nullable="1"
  18500. allow-none="1">
  18501. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18502. <type name="Cancellable" c:type="GCancellable*"/>
  18503. </parameter>
  18504. <parameter name="callback"
  18505. transfer-ownership="none"
  18506. nullable="1"
  18507. allow-none="1"
  18508. scope="async"
  18509. closure="6">
  18510. <doc xml:space="preserve">A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't
  18511. care about the result of the method invocation.</doc>
  18512. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  18513. </parameter>
  18514. <parameter name="user_data"
  18515. transfer-ownership="none"
  18516. nullable="1"
  18517. allow-none="1">
  18518. <doc xml:space="preserve">The data to pass to @callback.</doc>
  18519. <type name="gpointer" c:type="gpointer"/>
  18520. </parameter>
  18521. </parameters>
  18522. </method>
  18523. <method name="call_finish"
  18524. c:identifier="g_dbus_proxy_call_finish"
  18525. version="2.26"
  18526. throws="1">
  18527. <doc xml:space="preserve">Finishes an operation started with g_dbus_proxy_call().</doc>
  18528. <return-value transfer-ownership="full">
  18529. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  18530. return values. Free with g_variant_unref().</doc>
  18531. <type name="GLib.Variant" c:type="GVariant*"/>
  18532. </return-value>
  18533. <parameters>
  18534. <instance-parameter name="proxy" transfer-ownership="none">
  18535. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18536. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18537. </instance-parameter>
  18538. <parameter name="res" transfer-ownership="none">
  18539. <doc xml:space="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().</doc>
  18540. <type name="AsyncResult" c:type="GAsyncResult*"/>
  18541. </parameter>
  18542. </parameters>
  18543. </method>
  18544. <method name="call_sync"
  18545. c:identifier="g_dbus_proxy_call_sync"
  18546. version="2.26"
  18547. throws="1">
  18548. <doc xml:space="preserve">Synchronously invokes the @method_name method on @proxy.
  18549. If @method_name contains any dots, then @name is split into interface and
  18550. method name parts. This allows using @proxy for invoking methods on
  18551. other interfaces.
  18552. If the #GDBusConnection associated with @proxy is disconnected then
  18553. the operation will fail with %G_IO_ERROR_CLOSED. If
  18554. @cancellable is canceled, the operation will fail with
  18555. %G_IO_ERROR_CANCELLED. If @parameters contains a value not
  18556. compatible with the D-Bus protocol, the operation fails with
  18557. %G_IO_ERROR_INVALID_ARGUMENT.
  18558. If the @parameters #GVariant is floating, it is consumed. This allows
  18559. convenient 'inline' use of g_variant_new(), e.g.:
  18560. |[&lt;!-- language="C" --&gt;
  18561. g_dbus_proxy_call_sync (proxy,
  18562. "TwoStrings",
  18563. g_variant_new ("(ss)",
  18564. "Thing One",
  18565. "Thing Two"),
  18566. G_DBUS_CALL_FLAGS_NONE,
  18567. -1,
  18568. NULL,
  18569. &amp;error);
  18570. ]|
  18571. The calling thread is blocked until a reply is received. See
  18572. g_dbus_proxy_call() for the asynchronous version of this
  18573. method.
  18574. If @proxy has an expected interface (see
  18575. #GDBusProxy:g-interface-info) and @method_name is referenced by it,
  18576. then the return value is checked against the return type.</doc>
  18577. <return-value transfer-ownership="full">
  18578. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  18579. return values. Free with g_variant_unref().</doc>
  18580. <type name="GLib.Variant" c:type="GVariant*"/>
  18581. </return-value>
  18582. <parameters>
  18583. <instance-parameter name="proxy" transfer-ownership="none">
  18584. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18585. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18586. </instance-parameter>
  18587. <parameter name="method_name" transfer-ownership="none">
  18588. <doc xml:space="preserve">Name of method to invoke.</doc>
  18589. <type name="utf8" c:type="const gchar*"/>
  18590. </parameter>
  18591. <parameter name="parameters"
  18592. transfer-ownership="none"
  18593. nullable="1"
  18594. allow-none="1">
  18595. <doc xml:space="preserve">A #GVariant tuple with parameters for the signal
  18596. or %NULL if not passing parameters.</doc>
  18597. <type name="GLib.Variant" c:type="GVariant*"/>
  18598. </parameter>
  18599. <parameter name="flags" transfer-ownership="none">
  18600. <doc xml:space="preserve">Flags from the #GDBusCallFlags enumeration.</doc>
  18601. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  18602. </parameter>
  18603. <parameter name="timeout_msec" transfer-ownership="none">
  18604. <doc xml:space="preserve">The timeout in milliseconds (with %G_MAXINT meaning
  18605. "infinite") or -1 to use the proxy default timeout.</doc>
  18606. <type name="gint" c:type="gint"/>
  18607. </parameter>
  18608. <parameter name="cancellable"
  18609. transfer-ownership="none"
  18610. nullable="1"
  18611. allow-none="1">
  18612. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18613. <type name="Cancellable" c:type="GCancellable*"/>
  18614. </parameter>
  18615. </parameters>
  18616. </method>
  18617. <method name="call_with_unix_fd_list"
  18618. c:identifier="g_dbus_proxy_call_with_unix_fd_list"
  18619. version="2.30">
  18620. <doc xml:space="preserve">Like g_dbus_proxy_call() but also takes a #GUnixFDList object.
  18621. This method is only available on UNIX.</doc>
  18622. <return-value transfer-ownership="none">
  18623. <type name="none" c:type="void"/>
  18624. </return-value>
  18625. <parameters>
  18626. <instance-parameter name="proxy" transfer-ownership="none">
  18627. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18628. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18629. </instance-parameter>
  18630. <parameter name="method_name" transfer-ownership="none">
  18631. <doc xml:space="preserve">Name of method to invoke.</doc>
  18632. <type name="utf8" c:type="const gchar*"/>
  18633. </parameter>
  18634. <parameter name="parameters"
  18635. transfer-ownership="none"
  18636. nullable="1"
  18637. allow-none="1">
  18638. <doc xml:space="preserve">A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.</doc>
  18639. <type name="GLib.Variant" c:type="GVariant*"/>
  18640. </parameter>
  18641. <parameter name="flags" transfer-ownership="none">
  18642. <doc xml:space="preserve">Flags from the #GDBusCallFlags enumeration.</doc>
  18643. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  18644. </parameter>
  18645. <parameter name="timeout_msec" transfer-ownership="none">
  18646. <doc xml:space="preserve">The timeout in milliseconds (with %G_MAXINT meaning
  18647. "infinite") or -1 to use the proxy default timeout.</doc>
  18648. <type name="gint" c:type="gint"/>
  18649. </parameter>
  18650. <parameter name="fd_list"
  18651. transfer-ownership="none"
  18652. nullable="1"
  18653. allow-none="1">
  18654. <doc xml:space="preserve">A #GUnixFDList or %NULL.</doc>
  18655. <type name="UnixFDList" c:type="GUnixFDList*"/>
  18656. </parameter>
  18657. <parameter name="cancellable"
  18658. transfer-ownership="none"
  18659. nullable="1"
  18660. allow-none="1">
  18661. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18662. <type name="Cancellable" c:type="GCancellable*"/>
  18663. </parameter>
  18664. <parameter name="callback"
  18665. transfer-ownership="none"
  18666. nullable="1"
  18667. allow-none="1"
  18668. scope="async"
  18669. closure="7">
  18670. <doc xml:space="preserve">A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't
  18671. care about the result of the method invocation.</doc>
  18672. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  18673. </parameter>
  18674. <parameter name="user_data"
  18675. transfer-ownership="none"
  18676. nullable="1"
  18677. allow-none="1">
  18678. <doc xml:space="preserve">The data to pass to @callback.</doc>
  18679. <type name="gpointer" c:type="gpointer"/>
  18680. </parameter>
  18681. </parameters>
  18682. </method>
  18683. <method name="call_with_unix_fd_list_finish"
  18684. c:identifier="g_dbus_proxy_call_with_unix_fd_list_finish"
  18685. version="2.30"
  18686. throws="1">
  18687. <doc xml:space="preserve">Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().</doc>
  18688. <return-value transfer-ownership="full">
  18689. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  18690. return values. Free with g_variant_unref().</doc>
  18691. <type name="GLib.Variant" c:type="GVariant*"/>
  18692. </return-value>
  18693. <parameters>
  18694. <instance-parameter name="proxy" transfer-ownership="none">
  18695. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18696. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18697. </instance-parameter>
  18698. <parameter name="out_fd_list"
  18699. direction="out"
  18700. caller-allocates="0"
  18701. transfer-ownership="full"
  18702. optional="1"
  18703. allow-none="1">
  18704. <doc xml:space="preserve">Return location for a #GUnixFDList or %NULL.</doc>
  18705. <type name="UnixFDList" c:type="GUnixFDList**"/>
  18706. </parameter>
  18707. <parameter name="res" transfer-ownership="none">
  18708. <doc xml:space="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list().</doc>
  18709. <type name="AsyncResult" c:type="GAsyncResult*"/>
  18710. </parameter>
  18711. </parameters>
  18712. </method>
  18713. <method name="call_with_unix_fd_list_sync"
  18714. c:identifier="g_dbus_proxy_call_with_unix_fd_list_sync"
  18715. version="2.30"
  18716. throws="1">
  18717. <doc xml:space="preserve">Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects.
  18718. This method is only available on UNIX.</doc>
  18719. <return-value transfer-ownership="full">
  18720. <doc xml:space="preserve">%NULL if @error is set. Otherwise a #GVariant tuple with
  18721. return values. Free with g_variant_unref().</doc>
  18722. <type name="GLib.Variant" c:type="GVariant*"/>
  18723. </return-value>
  18724. <parameters>
  18725. <instance-parameter name="proxy" transfer-ownership="none">
  18726. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18727. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18728. </instance-parameter>
  18729. <parameter name="method_name" transfer-ownership="none">
  18730. <doc xml:space="preserve">Name of method to invoke.</doc>
  18731. <type name="utf8" c:type="const gchar*"/>
  18732. </parameter>
  18733. <parameter name="parameters"
  18734. transfer-ownership="none"
  18735. nullable="1"
  18736. allow-none="1">
  18737. <doc xml:space="preserve">A #GVariant tuple with parameters for the signal
  18738. or %NULL if not passing parameters.</doc>
  18739. <type name="GLib.Variant" c:type="GVariant*"/>
  18740. </parameter>
  18741. <parameter name="flags" transfer-ownership="none">
  18742. <doc xml:space="preserve">Flags from the #GDBusCallFlags enumeration.</doc>
  18743. <type name="DBusCallFlags" c:type="GDBusCallFlags"/>
  18744. </parameter>
  18745. <parameter name="timeout_msec" transfer-ownership="none">
  18746. <doc xml:space="preserve">The timeout in milliseconds (with %G_MAXINT meaning
  18747. "infinite") or -1 to use the proxy default timeout.</doc>
  18748. <type name="gint" c:type="gint"/>
  18749. </parameter>
  18750. <parameter name="fd_list"
  18751. transfer-ownership="none"
  18752. nullable="1"
  18753. allow-none="1">
  18754. <doc xml:space="preserve">A #GUnixFDList or %NULL.</doc>
  18755. <type name="UnixFDList" c:type="GUnixFDList*"/>
  18756. </parameter>
  18757. <parameter name="out_fd_list"
  18758. direction="out"
  18759. caller-allocates="0"
  18760. transfer-ownership="full"
  18761. optional="1"
  18762. allow-none="1">
  18763. <doc xml:space="preserve">Return location for a #GUnixFDList or %NULL.</doc>
  18764. <type name="UnixFDList" c:type="GUnixFDList**"/>
  18765. </parameter>
  18766. <parameter name="cancellable"
  18767. transfer-ownership="none"
  18768. nullable="1"
  18769. allow-none="1">
  18770. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  18771. <type name="Cancellable" c:type="GCancellable*"/>
  18772. </parameter>
  18773. </parameters>
  18774. </method>
  18775. <method name="get_cached_property"
  18776. c:identifier="g_dbus_proxy_get_cached_property"
  18777. version="2.26">
  18778. <doc xml:space="preserve">Looks up the value for a property from the cache. This call does no
  18779. blocking IO.
  18780. If @proxy has an expected interface (see
  18781. #GDBusProxy:g-interface-info) and @property_name is referenced by
  18782. it, then @value is checked against the type of the property.</doc>
  18783. <return-value transfer-ownership="full">
  18784. <doc xml:space="preserve">A reference to the #GVariant instance that holds the value
  18785. for @property_name or %NULL if the value is not in the cache. The
  18786. returned reference must be freed with g_variant_unref().</doc>
  18787. <type name="GLib.Variant" c:type="GVariant*"/>
  18788. </return-value>
  18789. <parameters>
  18790. <instance-parameter name="proxy" transfer-ownership="none">
  18791. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18792. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18793. </instance-parameter>
  18794. <parameter name="property_name" transfer-ownership="none">
  18795. <doc xml:space="preserve">Property name.</doc>
  18796. <type name="utf8" c:type="const gchar*"/>
  18797. </parameter>
  18798. </parameters>
  18799. </method>
  18800. <method name="get_cached_property_names"
  18801. c:identifier="g_dbus_proxy_get_cached_property_names"
  18802. version="2.26">
  18803. <doc xml:space="preserve">Gets the names of all cached properties on @proxy.</doc>
  18804. <return-value transfer-ownership="full">
  18805. <doc xml:space="preserve">A %NULL-terminated array of strings or %NULL if
  18806. @proxy has no cached properties. Free the returned array with
  18807. g_strfreev().</doc>
  18808. <array c:type="gchar**">
  18809. <type name="utf8"/>
  18810. </array>
  18811. </return-value>
  18812. <parameters>
  18813. <instance-parameter name="proxy" transfer-ownership="none">
  18814. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18815. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18816. </instance-parameter>
  18817. </parameters>
  18818. </method>
  18819. <method name="get_connection"
  18820. c:identifier="g_dbus_proxy_get_connection"
  18821. version="2.26">
  18822. <doc xml:space="preserve">Gets the connection @proxy is for.</doc>
  18823. <return-value transfer-ownership="none">
  18824. <doc xml:space="preserve">A #GDBusConnection owned by @proxy. Do not free.</doc>
  18825. <type name="DBusConnection" c:type="GDBusConnection*"/>
  18826. </return-value>
  18827. <parameters>
  18828. <instance-parameter name="proxy" transfer-ownership="none">
  18829. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18830. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18831. </instance-parameter>
  18832. </parameters>
  18833. </method>
  18834. <method name="get_default_timeout"
  18835. c:identifier="g_dbus_proxy_get_default_timeout"
  18836. version="2.26">
  18837. <doc xml:space="preserve">Gets the timeout to use if -1 (specifying default timeout) is
  18838. passed as @timeout_msec in the g_dbus_proxy_call() and
  18839. g_dbus_proxy_call_sync() functions.
  18840. See the #GDBusProxy:g-default-timeout property for more details.</doc>
  18841. <return-value transfer-ownership="none">
  18842. <doc xml:space="preserve">Timeout to use for @proxy.</doc>
  18843. <type name="gint" c:type="gint"/>
  18844. </return-value>
  18845. <parameters>
  18846. <instance-parameter name="proxy" transfer-ownership="none">
  18847. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18848. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18849. </instance-parameter>
  18850. </parameters>
  18851. </method>
  18852. <method name="get_flags"
  18853. c:identifier="g_dbus_proxy_get_flags"
  18854. version="2.26">
  18855. <doc xml:space="preserve">Gets the flags that @proxy was constructed with.</doc>
  18856. <return-value transfer-ownership="none">
  18857. <doc xml:space="preserve">Flags from the #GDBusProxyFlags enumeration.</doc>
  18858. <type name="DBusProxyFlags" c:type="GDBusProxyFlags"/>
  18859. </return-value>
  18860. <parameters>
  18861. <instance-parameter name="proxy" transfer-ownership="none">
  18862. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18863. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18864. </instance-parameter>
  18865. </parameters>
  18866. </method>
  18867. <method name="get_interface_info"
  18868. c:identifier="g_dbus_proxy_get_interface_info"
  18869. version="2.26">
  18870. <doc xml:space="preserve">Returns the #GDBusInterfaceInfo, if any, specifying the interface
  18871. that @proxy conforms to. See the #GDBusProxy:g-interface-info
  18872. property for more details.</doc>
  18873. <return-value transfer-ownership="full">
  18874. <doc xml:space="preserve">A #GDBusInterfaceInfo or %NULL. Do not unref the returned
  18875. object, it is owned by @proxy.</doc>
  18876. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  18877. </return-value>
  18878. <parameters>
  18879. <instance-parameter name="proxy" transfer-ownership="none">
  18880. <doc xml:space="preserve">A #GDBusProxy</doc>
  18881. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18882. </instance-parameter>
  18883. </parameters>
  18884. </method>
  18885. <method name="get_interface_name"
  18886. c:identifier="g_dbus_proxy_get_interface_name"
  18887. version="2.26">
  18888. <doc xml:space="preserve">Gets the D-Bus interface name @proxy is for.</doc>
  18889. <return-value transfer-ownership="none">
  18890. <doc xml:space="preserve">A string owned by @proxy. Do not free.</doc>
  18891. <type name="utf8" c:type="const gchar*"/>
  18892. </return-value>
  18893. <parameters>
  18894. <instance-parameter name="proxy" transfer-ownership="none">
  18895. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18896. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18897. </instance-parameter>
  18898. </parameters>
  18899. </method>
  18900. <method name="get_name"
  18901. c:identifier="g_dbus_proxy_get_name"
  18902. version="2.26">
  18903. <doc xml:space="preserve">Gets the name that @proxy was constructed for.</doc>
  18904. <return-value transfer-ownership="none">
  18905. <doc xml:space="preserve">A string owned by @proxy. Do not free.</doc>
  18906. <type name="utf8" c:type="const gchar*"/>
  18907. </return-value>
  18908. <parameters>
  18909. <instance-parameter name="proxy" transfer-ownership="none">
  18910. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18911. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18912. </instance-parameter>
  18913. </parameters>
  18914. </method>
  18915. <method name="get_name_owner"
  18916. c:identifier="g_dbus_proxy_get_name_owner"
  18917. version="2.26">
  18918. <doc xml:space="preserve">The unique name that owns the name that @proxy is for or %NULL if
  18919. no-one currently owns that name. You may connect to the
  18920. #GObject::notify signal to track changes to the
  18921. #GDBusProxy:g-name-owner property.</doc>
  18922. <return-value transfer-ownership="full">
  18923. <doc xml:space="preserve">The name owner or %NULL if no name owner exists. Free with g_free().</doc>
  18924. <type name="utf8" c:type="gchar*"/>
  18925. </return-value>
  18926. <parameters>
  18927. <instance-parameter name="proxy" transfer-ownership="none">
  18928. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18929. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18930. </instance-parameter>
  18931. </parameters>
  18932. </method>
  18933. <method name="get_object_path"
  18934. c:identifier="g_dbus_proxy_get_object_path"
  18935. version="2.26">
  18936. <doc xml:space="preserve">Gets the object path @proxy is for.</doc>
  18937. <return-value transfer-ownership="none">
  18938. <doc xml:space="preserve">A string owned by @proxy. Do not free.</doc>
  18939. <type name="utf8" c:type="const gchar*"/>
  18940. </return-value>
  18941. <parameters>
  18942. <instance-parameter name="proxy" transfer-ownership="none">
  18943. <doc xml:space="preserve">A #GDBusProxy.</doc>
  18944. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18945. </instance-parameter>
  18946. </parameters>
  18947. </method>
  18948. <method name="set_cached_property"
  18949. c:identifier="g_dbus_proxy_set_cached_property"
  18950. version="2.26">
  18951. <doc xml:space="preserve">If @value is not %NULL, sets the cached value for the property with
  18952. name @property_name to the value in @value.
  18953. If @value is %NULL, then the cached value is removed from the
  18954. property cache.
  18955. If @proxy has an expected interface (see
  18956. #GDBusProxy:g-interface-info) and @property_name is referenced by
  18957. it, then @value is checked against the type of the property.
  18958. If the @value #GVariant is floating, it is consumed. This allows
  18959. convenient 'inline' use of g_variant_new(), e.g.
  18960. |[&lt;!-- language="C" --&gt;
  18961. g_dbus_proxy_set_cached_property (proxy,
  18962. "SomeProperty",
  18963. g_variant_new ("(si)",
  18964. "A String",
  18965. 42));
  18966. ]|
  18967. Normally you will not need to use this method since @proxy
  18968. is tracking changes using the
  18969. `org.freedesktop.DBus.Properties.PropertiesChanged`
  18970. D-Bus signal. However, for performance reasons an object may
  18971. decide to not use this signal for some properties and instead
  18972. use a proprietary out-of-band mechanism to transmit changes.
  18973. As a concrete example, consider an object with a property
  18974. `ChatroomParticipants` which is an array of strings. Instead of
  18975. transmitting the same (long) array every time the property changes,
  18976. it is more efficient to only transmit the delta using e.g. signals
  18977. `ChatroomParticipantJoined(String name)` and
  18978. `ChatroomParticipantParted(String name)`.</doc>
  18979. <return-value transfer-ownership="none">
  18980. <type name="none" c:type="void"/>
  18981. </return-value>
  18982. <parameters>
  18983. <instance-parameter name="proxy" transfer-ownership="none">
  18984. <doc xml:space="preserve">A #GDBusProxy</doc>
  18985. <type name="DBusProxy" c:type="GDBusProxy*"/>
  18986. </instance-parameter>
  18987. <parameter name="property_name" transfer-ownership="none">
  18988. <doc xml:space="preserve">Property name.</doc>
  18989. <type name="utf8" c:type="const gchar*"/>
  18990. </parameter>
  18991. <parameter name="value"
  18992. transfer-ownership="none"
  18993. nullable="1"
  18994. allow-none="1">
  18995. <doc xml:space="preserve">Value for the property or %NULL to remove it from the cache.</doc>
  18996. <type name="GLib.Variant" c:type="GVariant*"/>
  18997. </parameter>
  18998. </parameters>
  18999. </method>
  19000. <method name="set_default_timeout"
  19001. c:identifier="g_dbus_proxy_set_default_timeout"
  19002. version="2.26">
  19003. <doc xml:space="preserve">Sets the timeout to use if -1 (specifying default timeout) is
  19004. passed as @timeout_msec in the g_dbus_proxy_call() and
  19005. g_dbus_proxy_call_sync() functions.
  19006. See the #GDBusProxy:g-default-timeout property for more details.</doc>
  19007. <return-value transfer-ownership="none">
  19008. <type name="none" c:type="void"/>
  19009. </return-value>
  19010. <parameters>
  19011. <instance-parameter name="proxy" transfer-ownership="none">
  19012. <doc xml:space="preserve">A #GDBusProxy.</doc>
  19013. <type name="DBusProxy" c:type="GDBusProxy*"/>
  19014. </instance-parameter>
  19015. <parameter name="timeout_msec" transfer-ownership="none">
  19016. <doc xml:space="preserve">Timeout in milliseconds.</doc>
  19017. <type name="gint" c:type="gint"/>
  19018. </parameter>
  19019. </parameters>
  19020. </method>
  19021. <method name="set_interface_info"
  19022. c:identifier="g_dbus_proxy_set_interface_info"
  19023. version="2.26">
  19024. <doc xml:space="preserve">Ensure that interactions with @proxy conform to the given
  19025. interface. See the #GDBusProxy:g-interface-info property for more
  19026. details.</doc>
  19027. <return-value transfer-ownership="none">
  19028. <type name="none" c:type="void"/>
  19029. </return-value>
  19030. <parameters>
  19031. <instance-parameter name="proxy" transfer-ownership="none">
  19032. <doc xml:space="preserve">A #GDBusProxy</doc>
  19033. <type name="DBusProxy" c:type="GDBusProxy*"/>
  19034. </instance-parameter>
  19035. <parameter name="info"
  19036. transfer-ownership="none"
  19037. nullable="1"
  19038. allow-none="1">
  19039. <doc xml:space="preserve">Minimum interface this proxy conforms to or %NULL to unset.</doc>
  19040. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
  19041. </parameter>
  19042. </parameters>
  19043. </method>
  19044. <property name="g-bus-type"
  19045. version="2.26"
  19046. readable="0"
  19047. writable="1"
  19048. construct-only="1"
  19049. transfer-ownership="none">
  19050. <doc xml:space="preserve">If this property is not %G_BUS_TYPE_NONE, then
  19051. #GDBusProxy:g-connection must be %NULL and will be set to the
  19052. #GDBusConnection obtained by calling g_bus_get() with the value
  19053. of this property.</doc>
  19054. <type name="BusType"/>
  19055. </property>
  19056. <property name="g-connection"
  19057. version="2.26"
  19058. writable="1"
  19059. construct-only="1"
  19060. transfer-ownership="none">
  19061. <doc xml:space="preserve">The #GDBusConnection the proxy is for.</doc>
  19062. <type name="DBusConnection"/>
  19063. </property>
  19064. <property name="g-default-timeout"
  19065. version="2.26"
  19066. writable="1"
  19067. construct="1"
  19068. transfer-ownership="none">
  19069. <doc xml:space="preserve">The timeout to use if -1 (specifying default timeout) is passed
  19070. as @timeout_msec in the g_dbus_proxy_call() and
  19071. g_dbus_proxy_call_sync() functions.
  19072. This allows applications to set a proxy-wide timeout for all
  19073. remote method invocations on the proxy. If this property is -1,
  19074. the default timeout (typically 25 seconds) is used. If set to
  19075. %G_MAXINT, then no timeout is used.</doc>
  19076. <type name="gint" c:type="gint"/>
  19077. </property>
  19078. <property name="g-flags"
  19079. version="2.26"
  19080. writable="1"
  19081. construct-only="1"
  19082. transfer-ownership="none">
  19083. <doc xml:space="preserve">Flags from the #GDBusProxyFlags enumeration.</doc>
  19084. <type name="DBusProxyFlags"/>
  19085. </property>
  19086. <property name="g-interface-info"
  19087. version="2.26"
  19088. writable="1"
  19089. transfer-ownership="none">
  19090. <doc xml:space="preserve">Ensure that interactions with this proxy conform to the given
  19091. interface. This is mainly to ensure that malformed data received
  19092. from the other peer is ignored. The given #GDBusInterfaceInfo is
  19093. said to be the "expected interface".
  19094. The checks performed are:
  19095. - When completing a method call, if the type signature of
  19096. the reply message isn't what's expected, the reply is
  19097. discarded and the #GError is set to %G_IO_ERROR_INVALID_ARGUMENT.
  19098. - Received signals that have a type signature mismatch are dropped and
  19099. a warning is logged via g_warning().
  19100. - Properties received via the initial `GetAll()` call or via the
  19101. `::PropertiesChanged` signal (on the
  19102. [org.freedesktop.DBus.Properties](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties)
  19103. interface) or set using g_dbus_proxy_set_cached_property()
  19104. with a type signature mismatch are ignored and a warning is
  19105. logged via g_warning().
  19106. Note that these checks are never done on methods, signals and
  19107. properties that are not referenced in the given
  19108. #GDBusInterfaceInfo, since extending a D-Bus interface on the
  19109. service-side is not considered an ABI break.</doc>
  19110. <type name="DBusInterfaceInfo"/>
  19111. </property>
  19112. <property name="g-interface-name"
  19113. version="2.26"
  19114. writable="1"
  19115. construct-only="1"
  19116. transfer-ownership="none">
  19117. <doc xml:space="preserve">The D-Bus interface name the proxy is for.</doc>
  19118. <type name="utf8" c:type="gchar*"/>
  19119. </property>
  19120. <property name="g-name"
  19121. version="2.26"
  19122. writable="1"
  19123. construct-only="1"
  19124. transfer-ownership="none">
  19125. <doc xml:space="preserve">The well-known or unique name that the proxy is for.</doc>
  19126. <type name="utf8" c:type="gchar*"/>
  19127. </property>
  19128. <property name="g-name-owner" version="2.26" transfer-ownership="none">
  19129. <doc xml:space="preserve">The unique name that owns #GDBusProxy:g-name or %NULL if no-one
  19130. currently owns that name. You may connect to #GObject::notify signal to
  19131. track changes to this property.</doc>
  19132. <type name="utf8" c:type="gchar*"/>
  19133. </property>
  19134. <property name="g-object-path"
  19135. version="2.26"
  19136. writable="1"
  19137. construct-only="1"
  19138. transfer-ownership="none">
  19139. <doc xml:space="preserve">The object path the proxy is for.</doc>
  19140. <type name="utf8" c:type="gchar*"/>
  19141. </property>
  19142. <field name="parent_instance" readable="0" private="1">
  19143. <type name="GObject.Object" c:type="GObject"/>
  19144. </field>
  19145. <field name="priv" readable="0" private="1">
  19146. <type name="DBusProxyPrivate" c:type="GDBusProxyPrivate*"/>
  19147. </field>
  19148. <glib:signal name="g-properties-changed" when="last" version="2.26">
  19149. <doc xml:space="preserve">Emitted when one or more D-Bus properties on @proxy changes. The
  19150. local cache has already been updated when this signal fires. Note
  19151. that both @changed_properties and @invalidated_properties are
  19152. guaranteed to never be %NULL (either may be empty though).
  19153. If the proxy has the flag
  19154. %G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES set, then
  19155. @invalidated_properties will always be empty.
  19156. This signal corresponds to the
  19157. `PropertiesChanged` D-Bus signal on the
  19158. `org.freedesktop.DBus.Properties` interface.</doc>
  19159. <return-value transfer-ownership="none">
  19160. <type name="none" c:type="void"/>
  19161. </return-value>
  19162. <parameters>
  19163. <parameter name="changed_properties" transfer-ownership="none">
  19164. <doc xml:space="preserve">A #GVariant containing the properties that changed</doc>
  19165. <type name="GLib.Variant"/>
  19166. </parameter>
  19167. <parameter name="invalidated_properties" transfer-ownership="none">
  19168. <doc xml:space="preserve">A %NULL terminated array of properties that was invalidated</doc>
  19169. <array>
  19170. <type name="utf8"/>
  19171. </array>
  19172. </parameter>
  19173. </parameters>
  19174. </glib:signal>
  19175. <glib:signal name="g-signal" when="last" version="2.26">
  19176. <doc xml:space="preserve">Emitted when a signal from the remote object and interface that @proxy is for, has been received.</doc>
  19177. <return-value transfer-ownership="none">
  19178. <type name="none" c:type="void"/>
  19179. </return-value>
  19180. <parameters>
  19181. <parameter name="sender_name"
  19182. transfer-ownership="none"
  19183. nullable="1"
  19184. allow-none="1">
  19185. <doc xml:space="preserve">The sender of the signal or %NULL if the connection is not a bus connection.</doc>
  19186. <type name="utf8" c:type="gchar*"/>
  19187. </parameter>
  19188. <parameter name="signal_name" transfer-ownership="none">
  19189. <doc xml:space="preserve">The name of the signal.</doc>
  19190. <type name="utf8" c:type="gchar*"/>
  19191. </parameter>
  19192. <parameter name="parameters" transfer-ownership="none">
  19193. <doc xml:space="preserve">A #GVariant tuple with parameters for the signal.</doc>
  19194. <type name="GLib.Variant"/>
  19195. </parameter>
  19196. </parameters>
  19197. </glib:signal>
  19198. </class>
  19199. <record name="DBusProxyClass"
  19200. c:type="GDBusProxyClass"
  19201. glib:is-gtype-struct-for="DBusProxy"
  19202. version="2.26">
  19203. <doc xml:space="preserve">Class structure for #GDBusProxy.</doc>
  19204. <field name="parent_class" readable="0" private="1">
  19205. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  19206. </field>
  19207. <field name="g_properties_changed">
  19208. <callback name="g_properties_changed">
  19209. <return-value transfer-ownership="none">
  19210. <type name="none" c:type="void"/>
  19211. </return-value>
  19212. <parameters>
  19213. <parameter name="proxy" transfer-ownership="none">
  19214. <type name="DBusProxy" c:type="GDBusProxy*"/>
  19215. </parameter>
  19216. <parameter name="changed_properties" transfer-ownership="none">
  19217. <type name="GLib.Variant" c:type="GVariant*"/>
  19218. </parameter>
  19219. <parameter name="invalidated_properties" transfer-ownership="none">
  19220. <type name="utf8" c:type="const gchar* const*"/>
  19221. </parameter>
  19222. </parameters>
  19223. </callback>
  19224. </field>
  19225. <field name="g_signal">
  19226. <callback name="g_signal">
  19227. <return-value transfer-ownership="none">
  19228. <type name="none" c:type="void"/>
  19229. </return-value>
  19230. <parameters>
  19231. <parameter name="proxy" transfer-ownership="none">
  19232. <type name="DBusProxy" c:type="GDBusProxy*"/>
  19233. </parameter>
  19234. <parameter name="sender_name" transfer-ownership="none">
  19235. <type name="utf8" c:type="const gchar*"/>
  19236. </parameter>
  19237. <parameter name="signal_name" transfer-ownership="none">
  19238. <type name="utf8" c:type="const gchar*"/>
  19239. </parameter>
  19240. <parameter name="parameters" transfer-ownership="none">
  19241. <type name="GLib.Variant" c:type="GVariant*"/>
  19242. </parameter>
  19243. </parameters>
  19244. </callback>
  19245. </field>
  19246. <field name="padding" readable="0" private="1">
  19247. <array zero-terminated="0" c:type="gpointer" fixed-size="32">
  19248. <type name="gpointer" c:type="gpointer"/>
  19249. </array>
  19250. </field>
  19251. </record>
  19252. <bitfield name="DBusProxyFlags"
  19253. version="2.26"
  19254. glib:type-name="GDBusProxyFlags"
  19255. glib:get-type="g_dbus_proxy_flags_get_type"
  19256. c:type="GDBusProxyFlags">
  19257. <doc xml:space="preserve">Flags used when constructing an instance of a #GDBusProxy derived class.</doc>
  19258. <member name="none"
  19259. value="0"
  19260. c:identifier="G_DBUS_PROXY_FLAGS_NONE"
  19261. glib:nick="none">
  19262. <doc xml:space="preserve">No flags set.</doc>
  19263. </member>
  19264. <member name="do_not_load_properties"
  19265. value="1"
  19266. c:identifier="G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES"
  19267. glib:nick="do-not-load-properties">
  19268. <doc xml:space="preserve">Don't load properties.</doc>
  19269. </member>
  19270. <member name="do_not_connect_signals"
  19271. value="2"
  19272. c:identifier="G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS"
  19273. glib:nick="do-not-connect-signals">
  19274. <doc xml:space="preserve">Don't connect to signals on the remote object.</doc>
  19275. </member>
  19276. <member name="do_not_auto_start"
  19277. value="4"
  19278. c:identifier="G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START"
  19279. glib:nick="do-not-auto-start">
  19280. <doc xml:space="preserve">If the proxy is for a well-known name,
  19281. do not ask the bus to launch an owner during proxy initialization or a method call.
  19282. This flag is only meaningful in proxies for well-known names.</doc>
  19283. </member>
  19284. <member name="get_invalidated_properties"
  19285. value="8"
  19286. c:identifier="G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES"
  19287. glib:nick="get-invalidated-properties">
  19288. <doc xml:space="preserve">If set, the property value for any &lt;emphasis&gt;invalidated property&lt;/emphasis&gt; will be (asynchronously) retrieved upon receiving the &lt;ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties"&gt;PropertiesChanged&lt;/ulink&gt; D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32.</doc>
  19289. </member>
  19290. <member name="do_not_auto_start_at_construction"
  19291. value="16"
  19292. c:identifier="G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION"
  19293. glib:nick="do-not-auto-start-at-construction">
  19294. <doc xml:space="preserve">If the proxy is for a well-known name,
  19295. do not ask the bus to launch an owner during proxy initialization, but allow it to be
  19296. autostarted by a method call. This flag is only meaningful in proxies for well-known names,
  19297. and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified.</doc>
  19298. </member>
  19299. </bitfield>
  19300. <record name="DBusProxyPrivate" c:type="GDBusProxyPrivate" disguised="1">
  19301. </record>
  19302. <callback name="DBusProxyTypeFunc"
  19303. c:type="GDBusProxyTypeFunc"
  19304. version="2.30">
  19305. <doc xml:space="preserve">Function signature for a function used to determine the #GType to
  19306. use for an interface proxy (if @interface_name is not %NULL) or
  19307. object proxy (if @interface_name is %NULL).
  19308. This function is called in the
  19309. [thread-default main loop][g-main-context-push-thread-default]
  19310. that @manager was constructed in.</doc>
  19311. <return-value transfer-ownership="none">
  19312. <doc xml:space="preserve">A #GType to use for the remote object. The returned type
  19313. must be a #GDBusProxy or #GDBusObjectProxy -derived
  19314. type.</doc>
  19315. <type name="GType" c:type="GType"/>
  19316. </return-value>
  19317. <parameters>
  19318. <parameter name="manager" transfer-ownership="none">
  19319. <doc xml:space="preserve">A #GDBusObjectManagerClient.</doc>
  19320. <type name="DBusObjectManagerClient"
  19321. c:type="GDBusObjectManagerClient*"/>
  19322. </parameter>
  19323. <parameter name="object_path" transfer-ownership="none">
  19324. <doc xml:space="preserve">The object path of the remote object.</doc>
  19325. <type name="utf8" c:type="const gchar*"/>
  19326. </parameter>
  19327. <parameter name="interface_name"
  19328. transfer-ownership="none"
  19329. nullable="1"
  19330. allow-none="1">
  19331. <doc xml:space="preserve">The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.</doc>
  19332. <type name="utf8" c:type="const gchar*"/>
  19333. </parameter>
  19334. <parameter name="user_data"
  19335. transfer-ownership="none"
  19336. nullable="1"
  19337. allow-none="1"
  19338. closure="3">
  19339. <doc xml:space="preserve">User data.</doc>
  19340. <type name="gpointer" c:type="gpointer"/>
  19341. </parameter>
  19342. </parameters>
  19343. </callback>
  19344. <bitfield name="DBusSendMessageFlags"
  19345. version="2.26"
  19346. glib:type-name="GDBusSendMessageFlags"
  19347. glib:get-type="g_dbus_send_message_flags_get_type"
  19348. c:type="GDBusSendMessageFlags">
  19349. <doc xml:space="preserve">Flags used when sending #GDBusMessages on a #GDBusConnection.</doc>
  19350. <member name="none"
  19351. value="0"
  19352. c:identifier="G_DBUS_SEND_MESSAGE_FLAGS_NONE"
  19353. glib:nick="none">
  19354. <doc xml:space="preserve">No flags set.</doc>
  19355. </member>
  19356. <member name="preserve_serial"
  19357. value="1"
  19358. c:identifier="G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL"
  19359. glib:nick="preserve-serial">
  19360. <doc xml:space="preserve">Do not automatically
  19361. assign a serial number from the #GDBusConnection object when
  19362. sending a message.</doc>
  19363. </member>
  19364. </bitfield>
  19365. <class name="DBusServer"
  19366. c:symbol-prefix="dbus_server"
  19367. c:type="GDBusServer"
  19368. version="2.26"
  19369. parent="GObject.Object"
  19370. glib:type-name="GDBusServer"
  19371. glib:get-type="g_dbus_server_get_type">
  19372. <doc xml:space="preserve">#GDBusServer is a helper for listening to and accepting D-Bus
  19373. connections. This can be used to create a new D-Bus server, allowing two
  19374. peers to use the D-Bus protocol for their own specialized communication.
  19375. A server instance provided in this way will not perform message routing or
  19376. implement the org.freedesktop.DBus interface.
  19377. To just export an object on a well-known name on a message bus, such as the
  19378. session or system bus, you should instead use g_bus_own_name().
  19379. An example of peer-to-peer communication with G-DBus can be found
  19380. in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c).</doc>
  19381. <implements name="Initable"/>
  19382. <constructor name="new_sync"
  19383. c:identifier="g_dbus_server_new_sync"
  19384. version="2.26"
  19385. throws="1">
  19386. <doc xml:space="preserve">Creates a new D-Bus server that listens on the first address in
  19387. @address that works.
  19388. Once constructed, you can use g_dbus_server_get_client_address() to
  19389. get a D-Bus address string that clients can use to connect.
  19390. Connect to the #GDBusServer::new-connection signal to handle
  19391. incoming connections.
  19392. The returned #GDBusServer isn't active - you have to start it with
  19393. g_dbus_server_start().
  19394. #GDBusServer is used in this [example][gdbus-peer-to-peer].
  19395. This is a synchronous failable constructor. See
  19396. g_dbus_server_new() for the asynchronous version.</doc>
  19397. <return-value transfer-ownership="full">
  19398. <doc xml:space="preserve">A #GDBusServer or %NULL if @error is set. Free with
  19399. g_object_unref().</doc>
  19400. <type name="DBusServer" c:type="GDBusServer*"/>
  19401. </return-value>
  19402. <parameters>
  19403. <parameter name="address" transfer-ownership="none">
  19404. <doc xml:space="preserve">A D-Bus address.</doc>
  19405. <type name="utf8" c:type="const gchar*"/>
  19406. </parameter>
  19407. <parameter name="flags" transfer-ownership="none">
  19408. <doc xml:space="preserve">Flags from the #GDBusServerFlags enumeration.</doc>
  19409. <type name="DBusServerFlags" c:type="GDBusServerFlags"/>
  19410. </parameter>
  19411. <parameter name="guid" transfer-ownership="none">
  19412. <doc xml:space="preserve">A D-Bus GUID.</doc>
  19413. <type name="utf8" c:type="const gchar*"/>
  19414. </parameter>
  19415. <parameter name="observer"
  19416. transfer-ownership="none"
  19417. nullable="1"
  19418. allow-none="1">
  19419. <doc xml:space="preserve">A #GDBusAuthObserver or %NULL.</doc>
  19420. <type name="DBusAuthObserver" c:type="GDBusAuthObserver*"/>
  19421. </parameter>
  19422. <parameter name="cancellable"
  19423. transfer-ownership="none"
  19424. nullable="1"
  19425. allow-none="1">
  19426. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  19427. <type name="Cancellable" c:type="GCancellable*"/>
  19428. </parameter>
  19429. </parameters>
  19430. </constructor>
  19431. <method name="get_client_address"
  19432. c:identifier="g_dbus_server_get_client_address"
  19433. version="2.26">
  19434. <doc xml:space="preserve">Gets a D-Bus address string that can be used by clients to connect
  19435. to @server.</doc>
  19436. <return-value transfer-ownership="none">
  19437. <doc xml:space="preserve">A D-Bus address string. Do not free, the string is owned
  19438. by @server.</doc>
  19439. <type name="utf8" c:type="const gchar*"/>
  19440. </return-value>
  19441. <parameters>
  19442. <instance-parameter name="server" transfer-ownership="none">
  19443. <doc xml:space="preserve">A #GDBusServer.</doc>
  19444. <type name="DBusServer" c:type="GDBusServer*"/>
  19445. </instance-parameter>
  19446. </parameters>
  19447. </method>
  19448. <method name="get_flags"
  19449. c:identifier="g_dbus_server_get_flags"
  19450. version="2.26">
  19451. <doc xml:space="preserve">Gets the flags for @server.</doc>
  19452. <return-value transfer-ownership="none">
  19453. <doc xml:space="preserve">A set of flags from the #GDBusServerFlags enumeration.</doc>
  19454. <type name="DBusServerFlags" c:type="GDBusServerFlags"/>
  19455. </return-value>
  19456. <parameters>
  19457. <instance-parameter name="server" transfer-ownership="none">
  19458. <doc xml:space="preserve">A #GDBusServer.</doc>
  19459. <type name="DBusServer" c:type="GDBusServer*"/>
  19460. </instance-parameter>
  19461. </parameters>
  19462. </method>
  19463. <method name="get_guid"
  19464. c:identifier="g_dbus_server_get_guid"
  19465. version="2.26">
  19466. <doc xml:space="preserve">Gets the GUID for @server.</doc>
  19467. <return-value transfer-ownership="none">
  19468. <doc xml:space="preserve">A D-Bus GUID. Do not free this string, it is owned by @server.</doc>
  19469. <type name="utf8" c:type="const gchar*"/>
  19470. </return-value>
  19471. <parameters>
  19472. <instance-parameter name="server" transfer-ownership="none">
  19473. <doc xml:space="preserve">A #GDBusServer.</doc>
  19474. <type name="DBusServer" c:type="GDBusServer*"/>
  19475. </instance-parameter>
  19476. </parameters>
  19477. </method>
  19478. <method name="is_active"
  19479. c:identifier="g_dbus_server_is_active"
  19480. version="2.26">
  19481. <doc xml:space="preserve">Gets whether @server is active.</doc>
  19482. <return-value transfer-ownership="none">
  19483. <doc xml:space="preserve">%TRUE if server is active, %FALSE otherwise.</doc>
  19484. <type name="gboolean" c:type="gboolean"/>
  19485. </return-value>
  19486. <parameters>
  19487. <instance-parameter name="server" transfer-ownership="none">
  19488. <doc xml:space="preserve">A #GDBusServer.</doc>
  19489. <type name="DBusServer" c:type="GDBusServer*"/>
  19490. </instance-parameter>
  19491. </parameters>
  19492. </method>
  19493. <method name="start" c:identifier="g_dbus_server_start" version="2.26">
  19494. <doc xml:space="preserve">Starts @server.</doc>
  19495. <return-value transfer-ownership="none">
  19496. <type name="none" c:type="void"/>
  19497. </return-value>
  19498. <parameters>
  19499. <instance-parameter name="server" transfer-ownership="none">
  19500. <doc xml:space="preserve">A #GDBusServer.</doc>
  19501. <type name="DBusServer" c:type="GDBusServer*"/>
  19502. </instance-parameter>
  19503. </parameters>
  19504. </method>
  19505. <method name="stop" c:identifier="g_dbus_server_stop" version="2.26">
  19506. <doc xml:space="preserve">Stops @server.</doc>
  19507. <return-value transfer-ownership="none">
  19508. <type name="none" c:type="void"/>
  19509. </return-value>
  19510. <parameters>
  19511. <instance-parameter name="server" transfer-ownership="none">
  19512. <doc xml:space="preserve">A #GDBusServer.</doc>
  19513. <type name="DBusServer" c:type="GDBusServer*"/>
  19514. </instance-parameter>
  19515. </parameters>
  19516. </method>
  19517. <property name="active" version="2.26" transfer-ownership="none">
  19518. <doc xml:space="preserve">Whether the server is currently active.</doc>
  19519. <type name="gboolean" c:type="gboolean"/>
  19520. </property>
  19521. <property name="address"
  19522. version="2.26"
  19523. writable="1"
  19524. construct-only="1"
  19525. transfer-ownership="none">
  19526. <doc xml:space="preserve">The D-Bus address to listen on.</doc>
  19527. <type name="utf8" c:type="gchar*"/>
  19528. </property>
  19529. <property name="authentication-observer"
  19530. version="2.26"
  19531. writable="1"
  19532. construct-only="1"
  19533. transfer-ownership="none">
  19534. <doc xml:space="preserve">A #GDBusAuthObserver object to assist in the authentication process or %NULL.</doc>
  19535. <type name="DBusAuthObserver"/>
  19536. </property>
  19537. <property name="client-address" version="2.26" transfer-ownership="none">
  19538. <doc xml:space="preserve">The D-Bus address that clients can use.</doc>
  19539. <type name="utf8" c:type="gchar*"/>
  19540. </property>
  19541. <property name="flags"
  19542. version="2.26"
  19543. writable="1"
  19544. construct-only="1"
  19545. transfer-ownership="none">
  19546. <doc xml:space="preserve">Flags from the #GDBusServerFlags enumeration.</doc>
  19547. <type name="DBusServerFlags"/>
  19548. </property>
  19549. <property name="guid"
  19550. version="2.26"
  19551. writable="1"
  19552. construct-only="1"
  19553. transfer-ownership="none">
  19554. <doc xml:space="preserve">The guid of the server.</doc>
  19555. <type name="utf8" c:type="gchar*"/>
  19556. </property>
  19557. <glib:signal name="new-connection" when="last" version="2.26">
  19558. <doc xml:space="preserve">Emitted when a new authenticated connection has been made. Use
  19559. g_dbus_connection_get_peer_credentials() to figure out what
  19560. identity (if any), was authenticated.
  19561. If you want to accept the connection, take a reference to the
  19562. @connection object and return %TRUE. When you are done with the
  19563. connection call g_dbus_connection_close() and give up your
  19564. reference. Note that the other peer may disconnect at any time -
  19565. a typical thing to do when accepting a connection is to listen to
  19566. the #GDBusConnection::closed signal.
  19567. If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
  19568. then the signal is emitted in a new thread dedicated to the
  19569. connection. Otherwise the signal is emitted in the
  19570. [thread-default main context][g-main-context-push-thread-default]
  19571. of the thread that @server was constructed in.
  19572. You are guaranteed that signal handlers for this signal runs
  19573. before incoming messages on @connection are processed. This means
  19574. that it's suitable to call g_dbus_connection_register_object() or
  19575. similar from the signal handler.</doc>
  19576. <return-value transfer-ownership="none">
  19577. <doc xml:space="preserve">%TRUE to claim @connection, %FALSE to let other handlers
  19578. run.</doc>
  19579. <type name="gboolean" c:type="gboolean"/>
  19580. </return-value>
  19581. <parameters>
  19582. <parameter name="connection" transfer-ownership="none">
  19583. <doc xml:space="preserve">A #GDBusConnection for the new connection.</doc>
  19584. <type name="DBusConnection"/>
  19585. </parameter>
  19586. </parameters>
  19587. </glib:signal>
  19588. </class>
  19589. <bitfield name="DBusServerFlags"
  19590. version="2.26"
  19591. glib:type-name="GDBusServerFlags"
  19592. glib:get-type="g_dbus_server_flags_get_type"
  19593. c:type="GDBusServerFlags">
  19594. <doc xml:space="preserve">Flags used when creating a #GDBusServer.</doc>
  19595. <member name="none"
  19596. value="0"
  19597. c:identifier="G_DBUS_SERVER_FLAGS_NONE"
  19598. glib:nick="none">
  19599. <doc xml:space="preserve">No flags set.</doc>
  19600. </member>
  19601. <member name="run_in_thread"
  19602. value="1"
  19603. c:identifier="G_DBUS_SERVER_FLAGS_RUN_IN_THREAD"
  19604. glib:nick="run-in-thread">
  19605. <doc xml:space="preserve">All #GDBusServer::new-connection
  19606. signals will run in separated dedicated threads (see signal for
  19607. details).</doc>
  19608. </member>
  19609. <member name="authentication_allow_anonymous"
  19610. value="2"
  19611. c:identifier="G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS"
  19612. glib:nick="authentication-allow-anonymous">
  19613. <doc xml:space="preserve">Allow the anonymous
  19614. authentication method.</doc>
  19615. </member>
  19616. </bitfield>
  19617. <callback name="DBusSignalCallback"
  19618. c:type="GDBusSignalCallback"
  19619. version="2.26">
  19620. <doc xml:space="preserve">Signature for callback function used in g_dbus_connection_signal_subscribe().</doc>
  19621. <return-value transfer-ownership="none">
  19622. <type name="none" c:type="void"/>
  19623. </return-value>
  19624. <parameters>
  19625. <parameter name="connection" transfer-ownership="none">
  19626. <doc xml:space="preserve">A #GDBusConnection.</doc>
  19627. <type name="DBusConnection" c:type="GDBusConnection*"/>
  19628. </parameter>
  19629. <parameter name="sender_name" transfer-ownership="none">
  19630. <doc xml:space="preserve">The unique bus name of the sender of the signal.</doc>
  19631. <type name="utf8" c:type="const gchar*"/>
  19632. </parameter>
  19633. <parameter name="object_path" transfer-ownership="none">
  19634. <doc xml:space="preserve">The object path that the signal was emitted on.</doc>
  19635. <type name="utf8" c:type="const gchar*"/>
  19636. </parameter>
  19637. <parameter name="interface_name" transfer-ownership="none">
  19638. <doc xml:space="preserve">The name of the interface.</doc>
  19639. <type name="utf8" c:type="const gchar*"/>
  19640. </parameter>
  19641. <parameter name="signal_name" transfer-ownership="none">
  19642. <doc xml:space="preserve">The name of the signal.</doc>
  19643. <type name="utf8" c:type="const gchar*"/>
  19644. </parameter>
  19645. <parameter name="parameters" transfer-ownership="none">
  19646. <doc xml:space="preserve">A #GVariant tuple with parameters for the signal.</doc>
  19647. <type name="GLib.Variant" c:type="GVariant*"/>
  19648. </parameter>
  19649. <parameter name="user_data"
  19650. transfer-ownership="none"
  19651. nullable="1"
  19652. allow-none="1"
  19653. closure="6">
  19654. <doc xml:space="preserve">User data passed when subscribing to the signal.</doc>
  19655. <type name="gpointer" c:type="gpointer"/>
  19656. </parameter>
  19657. </parameters>
  19658. </callback>
  19659. <bitfield name="DBusSignalFlags"
  19660. version="2.26"
  19661. glib:type-name="GDBusSignalFlags"
  19662. glib:get-type="g_dbus_signal_flags_get_type"
  19663. c:type="GDBusSignalFlags">
  19664. <doc xml:space="preserve">Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().</doc>
  19665. <member name="none"
  19666. value="0"
  19667. c:identifier="G_DBUS_SIGNAL_FLAGS_NONE"
  19668. glib:nick="none">
  19669. <doc xml:space="preserve">No flags set.</doc>
  19670. </member>
  19671. <member name="no_match_rule"
  19672. value="1"
  19673. c:identifier="G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE"
  19674. glib:nick="no-match-rule">
  19675. <doc xml:space="preserve">Don't actually send the AddMatch
  19676. D-Bus call for this signal subscription. This gives you more control
  19677. over which match rules you add (but you must add them manually).</doc>
  19678. </member>
  19679. <member name="match_arg0_namespace"
  19680. value="2"
  19681. c:identifier="G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE"
  19682. glib:nick="match-arg0-namespace">
  19683. <doc xml:space="preserve">Match first arguments that
  19684. contain a bus or interface name with the given namespace.</doc>
  19685. </member>
  19686. <member name="match_arg0_path"
  19687. value="4"
  19688. c:identifier="G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH"
  19689. glib:nick="match-arg0-path">
  19690. <doc xml:space="preserve">Match first arguments that
  19691. contain an object path that is either equivalent to the given path,
  19692. or one of the paths is a subpath of the other.</doc>
  19693. </member>
  19694. </bitfield>
  19695. <record name="DBusSignalInfo"
  19696. c:type="GDBusSignalInfo"
  19697. version="2.26"
  19698. glib:type-name="GDBusSignalInfo"
  19699. glib:get-type="g_dbus_signal_info_get_type"
  19700. c:symbol-prefix="dbus_signal_info">
  19701. <doc xml:space="preserve">Information about a signal on a D-Bus interface.</doc>
  19702. <field name="ref_count" writable="1">
  19703. <doc xml:space="preserve">The reference count or -1 if statically allocated.</doc>
  19704. <type name="gint" c:type="volatile gint"/>
  19705. </field>
  19706. <field name="name" writable="1">
  19707. <doc xml:space="preserve">The name of the D-Bus signal, e.g. "NameOwnerChanged".</doc>
  19708. <type name="utf8" c:type="gchar*"/>
  19709. </field>
  19710. <field name="args" writable="1">
  19711. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.</doc>
  19712. <array c:type="GDBusArgInfo**">
  19713. <type name="DBusArgInfo" c:type="GDBusArgInfo*"/>
  19714. </array>
  19715. </field>
  19716. <field name="annotations" writable="1">
  19717. <doc xml:space="preserve">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
  19718. <array c:type="GDBusAnnotationInfo**">
  19719. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  19720. </array>
  19721. </field>
  19722. <method name="ref" c:identifier="g_dbus_signal_info_ref" version="2.26">
  19723. <doc xml:space="preserve">If @info is statically allocated does nothing. Otherwise increases
  19724. the reference count.</doc>
  19725. <return-value transfer-ownership="full">
  19726. <doc xml:space="preserve">The same @info.</doc>
  19727. <type name="DBusSignalInfo" c:type="GDBusSignalInfo*"/>
  19728. </return-value>
  19729. <parameters>
  19730. <instance-parameter name="info" transfer-ownership="none">
  19731. <doc xml:space="preserve">A #GDBusSignalInfo</doc>
  19732. <type name="DBusSignalInfo" c:type="GDBusSignalInfo*"/>
  19733. </instance-parameter>
  19734. </parameters>
  19735. </method>
  19736. <method name="unref"
  19737. c:identifier="g_dbus_signal_info_unref"
  19738. version="2.26">
  19739. <doc xml:space="preserve">If @info is statically allocated, does nothing. Otherwise decreases
  19740. the reference count of @info. When its reference count drops to 0,
  19741. the memory used is freed.</doc>
  19742. <return-value transfer-ownership="none">
  19743. <type name="none" c:type="void"/>
  19744. </return-value>
  19745. <parameters>
  19746. <instance-parameter name="info" transfer-ownership="none">
  19747. <doc xml:space="preserve">A #GDBusSignalInfo.</doc>
  19748. <type name="DBusSignalInfo" c:type="GDBusSignalInfo*"/>
  19749. </instance-parameter>
  19750. </parameters>
  19751. </method>
  19752. </record>
  19753. <callback name="DBusSubtreeDispatchFunc"
  19754. c:type="GDBusSubtreeDispatchFunc"
  19755. version="2.26">
  19756. <doc xml:space="preserve">The type of the @dispatch function in #GDBusSubtreeVTable.
  19757. Subtrees are flat. @node, if non-%NULL, is always exactly one
  19758. segment of the object path (ie: it never contains a slash).</doc>
  19759. <return-value transfer-ownership="none">
  19760. <doc xml:space="preserve">A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.</doc>
  19761. <type name="DBusInterfaceVTable" c:type="const GDBusInterfaceVTable*"/>
  19762. </return-value>
  19763. <parameters>
  19764. <parameter name="connection" transfer-ownership="none">
  19765. <doc xml:space="preserve">A #GDBusConnection.</doc>
  19766. <type name="DBusConnection" c:type="GDBusConnection*"/>
  19767. </parameter>
  19768. <parameter name="sender" transfer-ownership="none">
  19769. <doc xml:space="preserve">The unique bus name of the remote caller.</doc>
  19770. <type name="utf8" c:type="const gchar*"/>
  19771. </parameter>
  19772. <parameter name="object_path" transfer-ownership="none">
  19773. <doc xml:space="preserve">The object path that was registered with g_dbus_connection_register_subtree().</doc>
  19774. <type name="utf8" c:type="const gchar*"/>
  19775. </parameter>
  19776. <parameter name="interface_name" transfer-ownership="none">
  19777. <doc xml:space="preserve">The D-Bus interface name that the method call or property access is for.</doc>
  19778. <type name="utf8" c:type="const gchar*"/>
  19779. </parameter>
  19780. <parameter name="node" transfer-ownership="none">
  19781. <doc xml:space="preserve">A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.</doc>
  19782. <type name="utf8" c:type="const gchar*"/>
  19783. </parameter>
  19784. <parameter name="out_user_data" transfer-ownership="none">
  19785. <doc xml:space="preserve">Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).</doc>
  19786. <type name="gpointer" c:type="gpointer*"/>
  19787. </parameter>
  19788. <parameter name="user_data"
  19789. transfer-ownership="none"
  19790. nullable="1"
  19791. allow-none="1"
  19792. closure="6">
  19793. <doc xml:space="preserve">The @user_data #gpointer passed to g_dbus_connection_register_subtree().</doc>
  19794. <type name="gpointer" c:type="gpointer"/>
  19795. </parameter>
  19796. </parameters>
  19797. </callback>
  19798. <callback name="DBusSubtreeEnumerateFunc"
  19799. c:type="GDBusSubtreeEnumerateFunc"
  19800. version="2.26"
  19801. introspectable="0">
  19802. <doc xml:space="preserve">The type of the @enumerate function in #GDBusSubtreeVTable.
  19803. This function is called when generating introspection data and also
  19804. when preparing to dispatch incoming messages in the event that the
  19805. %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
  19806. specified (ie: to verify that the object path is valid).
  19807. Hierarchies are not supported; the items that you return should not
  19808. contain the '/' character.
  19809. The return value will be freed with g_strfreev().</doc>
  19810. <return-value>
  19811. <doc xml:space="preserve">A newly allocated array of strings for node names that are children of @object_path.</doc>
  19812. <array c:type="gchar**">
  19813. <type name="utf8"/>
  19814. </array>
  19815. </return-value>
  19816. <parameters>
  19817. <parameter name="connection" transfer-ownership="none">
  19818. <doc xml:space="preserve">A #GDBusConnection.</doc>
  19819. <type name="DBusConnection" c:type="GDBusConnection*"/>
  19820. </parameter>
  19821. <parameter name="sender" transfer-ownership="none">
  19822. <doc xml:space="preserve">The unique bus name of the remote caller.</doc>
  19823. <type name="utf8" c:type="const gchar*"/>
  19824. </parameter>
  19825. <parameter name="object_path" transfer-ownership="none">
  19826. <doc xml:space="preserve">The object path that was registered with g_dbus_connection_register_subtree().</doc>
  19827. <type name="utf8" c:type="const gchar*"/>
  19828. </parameter>
  19829. <parameter name="user_data"
  19830. transfer-ownership="none"
  19831. nullable="1"
  19832. allow-none="1"
  19833. closure="3">
  19834. <doc xml:space="preserve">The @user_data #gpointer passed to g_dbus_connection_register_subtree().</doc>
  19835. <type name="gpointer" c:type="gpointer"/>
  19836. </parameter>
  19837. </parameters>
  19838. </callback>
  19839. <bitfield name="DBusSubtreeFlags"
  19840. version="2.26"
  19841. glib:type-name="GDBusSubtreeFlags"
  19842. glib:get-type="g_dbus_subtree_flags_get_type"
  19843. c:type="GDBusSubtreeFlags">
  19844. <doc xml:space="preserve">Flags passed to g_dbus_connection_register_subtree().</doc>
  19845. <member name="none"
  19846. value="0"
  19847. c:identifier="G_DBUS_SUBTREE_FLAGS_NONE"
  19848. glib:nick="none">
  19849. <doc xml:space="preserve">No flags set.</doc>
  19850. </member>
  19851. <member name="dispatch_to_unenumerated_nodes"
  19852. value="1"
  19853. c:identifier="G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES"
  19854. glib:nick="dispatch-to-unenumerated-nodes">
  19855. <doc xml:space="preserve">Method calls to objects not in the enumerated range
  19856. will still be dispatched. This is useful if you want
  19857. to dynamically spawn objects in the subtree.</doc>
  19858. </member>
  19859. </bitfield>
  19860. <callback name="DBusSubtreeIntrospectFunc"
  19861. c:type="GDBusSubtreeIntrospectFunc"
  19862. version="2.26">
  19863. <doc xml:space="preserve">The type of the @introspect function in #GDBusSubtreeVTable.
  19864. Subtrees are flat. @node, if non-%NULL, is always exactly one
  19865. segment of the object path (ie: it never contains a slash).
  19866. This function should return %NULL to indicate that there is no object
  19867. at this node.
  19868. If this function returns non-%NULL, the return value is expected to
  19869. be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
  19870. structures describing the interfaces implemented by @node. This
  19871. array will have g_dbus_interface_info_unref() called on each item
  19872. before being freed with g_free().
  19873. The difference between returning %NULL and an array containing zero
  19874. items is that the standard DBus interfaces will returned to the
  19875. remote introspector in the empty array case, but not in the %NULL
  19876. case.</doc>
  19877. <return-value transfer-ownership="full">
  19878. <doc xml:space="preserve">A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.</doc>
  19879. <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo**"/>
  19880. </return-value>
  19881. <parameters>
  19882. <parameter name="connection" transfer-ownership="none">
  19883. <doc xml:space="preserve">A #GDBusConnection.</doc>
  19884. <type name="DBusConnection" c:type="GDBusConnection*"/>
  19885. </parameter>
  19886. <parameter name="sender" transfer-ownership="none">
  19887. <doc xml:space="preserve">The unique bus name of the remote caller.</doc>
  19888. <type name="utf8" c:type="const gchar*"/>
  19889. </parameter>
  19890. <parameter name="object_path" transfer-ownership="none">
  19891. <doc xml:space="preserve">The object path that was registered with g_dbus_connection_register_subtree().</doc>
  19892. <type name="utf8" c:type="const gchar*"/>
  19893. </parameter>
  19894. <parameter name="node" transfer-ownership="none">
  19895. <doc xml:space="preserve">A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.</doc>
  19896. <type name="utf8" c:type="const gchar*"/>
  19897. </parameter>
  19898. <parameter name="user_data"
  19899. transfer-ownership="none"
  19900. nullable="1"
  19901. allow-none="1"
  19902. closure="4">
  19903. <doc xml:space="preserve">The @user_data #gpointer passed to g_dbus_connection_register_subtree().</doc>
  19904. <type name="gpointer" c:type="gpointer"/>
  19905. </parameter>
  19906. </parameters>
  19907. </callback>
  19908. <record name="DBusSubtreeVTable"
  19909. c:type="GDBusSubtreeVTable"
  19910. version="2.26">
  19911. <doc xml:space="preserve">Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().</doc>
  19912. <field name="enumerate" introspectable="0" writable="1">
  19913. <doc xml:space="preserve">Function for enumerating child nodes.</doc>
  19914. <type name="DBusSubtreeEnumerateFunc"
  19915. c:type="GDBusSubtreeEnumerateFunc"/>
  19916. </field>
  19917. <field name="introspect" writable="1">
  19918. <doc xml:space="preserve">Function for introspecting a child node.</doc>
  19919. <type name="DBusSubtreeIntrospectFunc"
  19920. c:type="GDBusSubtreeIntrospectFunc"/>
  19921. </field>
  19922. <field name="dispatch" writable="1">
  19923. <doc xml:space="preserve">Function for dispatching a remote call on a child node.</doc>
  19924. <type name="DBusSubtreeDispatchFunc"
  19925. c:type="GDBusSubtreeDispatchFunc"/>
  19926. </field>
  19927. <field name="padding" readable="0" private="1">
  19928. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  19929. <type name="gpointer" c:type="gpointer"/>
  19930. </array>
  19931. </field>
  19932. </record>
  19933. <constant name="DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME"
  19934. value="gio-desktop-app-info-lookup"
  19935. c:type="G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME">
  19936. <doc xml:space="preserve">Extension point for default handler to URI association. See
  19937. [Extending GIO][extending-gio].</doc>
  19938. <type name="utf8" c:type="gchar*"/>
  19939. </constant>
  19940. <class name="DataInputStream"
  19941. c:symbol-prefix="data_input_stream"
  19942. c:type="GDataInputStream"
  19943. parent="BufferedInputStream"
  19944. glib:type-name="GDataInputStream"
  19945. glib:get-type="g_data_input_stream_get_type"
  19946. glib:type-struct="DataInputStreamClass">
  19947. <doc xml:space="preserve">Data input stream implements #GInputStream and includes functions for
  19948. reading structured data directly from a binary input stream.</doc>
  19949. <implements name="Seekable"/>
  19950. <constructor name="new" c:identifier="g_data_input_stream_new">
  19951. <doc xml:space="preserve">Creates a new data input stream for the @base_stream.</doc>
  19952. <return-value transfer-ownership="full">
  19953. <doc xml:space="preserve">a new #GDataInputStream.</doc>
  19954. <type name="DataInputStream" c:type="GDataInputStream*"/>
  19955. </return-value>
  19956. <parameters>
  19957. <parameter name="base_stream" transfer-ownership="none">
  19958. <doc xml:space="preserve">a #GInputStream.</doc>
  19959. <type name="InputStream" c:type="GInputStream*"/>
  19960. </parameter>
  19961. </parameters>
  19962. </constructor>
  19963. <method name="get_byte_order"
  19964. c:identifier="g_data_input_stream_get_byte_order">
  19965. <doc xml:space="preserve">Gets the byte order for the data input stream.</doc>
  19966. <return-value transfer-ownership="none">
  19967. <doc xml:space="preserve">the @stream's current #GDataStreamByteOrder.</doc>
  19968. <type name="DataStreamByteOrder" c:type="GDataStreamByteOrder"/>
  19969. </return-value>
  19970. <parameters>
  19971. <instance-parameter name="stream" transfer-ownership="none">
  19972. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  19973. <type name="DataInputStream" c:type="GDataInputStream*"/>
  19974. </instance-parameter>
  19975. </parameters>
  19976. </method>
  19977. <method name="get_newline_type"
  19978. c:identifier="g_data_input_stream_get_newline_type">
  19979. <doc xml:space="preserve">Gets the current newline type for the @stream.</doc>
  19980. <return-value transfer-ownership="none">
  19981. <doc xml:space="preserve">#GDataStreamNewlineType for the given @stream.</doc>
  19982. <type name="DataStreamNewlineType" c:type="GDataStreamNewlineType"/>
  19983. </return-value>
  19984. <parameters>
  19985. <instance-parameter name="stream" transfer-ownership="none">
  19986. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  19987. <type name="DataInputStream" c:type="GDataInputStream*"/>
  19988. </instance-parameter>
  19989. </parameters>
  19990. </method>
  19991. <method name="read_byte"
  19992. c:identifier="g_data_input_stream_read_byte"
  19993. throws="1">
  19994. <doc xml:space="preserve">Reads an unsigned 8-bit/1-byte value from @stream.</doc>
  19995. <return-value transfer-ownership="none">
  19996. <doc xml:space="preserve">an unsigned 8-bit/1-byte value read from the @stream or %0
  19997. if an error occurred.</doc>
  19998. <type name="guint8" c:type="guchar"/>
  19999. </return-value>
  20000. <parameters>
  20001. <instance-parameter name="stream" transfer-ownership="none">
  20002. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20003. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20004. </instance-parameter>
  20005. <parameter name="cancellable"
  20006. transfer-ownership="none"
  20007. nullable="1"
  20008. allow-none="1">
  20009. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20010. <type name="Cancellable" c:type="GCancellable*"/>
  20011. </parameter>
  20012. </parameters>
  20013. </method>
  20014. <method name="read_int16"
  20015. c:identifier="g_data_input_stream_read_int16"
  20016. throws="1">
  20017. <doc xml:space="preserve">Reads a 16-bit/2-byte value from @stream.
  20018. In order to get the correct byte order for this read operation,
  20019. see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().</doc>
  20020. <return-value transfer-ownership="none">
  20021. <doc xml:space="preserve">a signed 16-bit/2-byte value read from @stream or %0 if
  20022. an error occurred.</doc>
  20023. <type name="gint16" c:type="gint16"/>
  20024. </return-value>
  20025. <parameters>
  20026. <instance-parameter name="stream" transfer-ownership="none">
  20027. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20028. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20029. </instance-parameter>
  20030. <parameter name="cancellable"
  20031. transfer-ownership="none"
  20032. nullable="1"
  20033. allow-none="1">
  20034. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20035. <type name="Cancellable" c:type="GCancellable*"/>
  20036. </parameter>
  20037. </parameters>
  20038. </method>
  20039. <method name="read_int32"
  20040. c:identifier="g_data_input_stream_read_int32"
  20041. throws="1">
  20042. <doc xml:space="preserve">Reads a signed 32-bit/4-byte value from @stream.
  20043. In order to get the correct byte order for this read operation,
  20044. see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
  20045. If @cancellable is not %NULL, then the operation can be cancelled by
  20046. triggering the cancellable object from another thread. If the operation
  20047. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  20048. <return-value transfer-ownership="none">
  20049. <doc xml:space="preserve">a signed 32-bit/4-byte value read from the @stream or %0 if
  20050. an error occurred.</doc>
  20051. <type name="gint32" c:type="gint32"/>
  20052. </return-value>
  20053. <parameters>
  20054. <instance-parameter name="stream" transfer-ownership="none">
  20055. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20056. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20057. </instance-parameter>
  20058. <parameter name="cancellable"
  20059. transfer-ownership="none"
  20060. nullable="1"
  20061. allow-none="1">
  20062. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20063. <type name="Cancellable" c:type="GCancellable*"/>
  20064. </parameter>
  20065. </parameters>
  20066. </method>
  20067. <method name="read_int64"
  20068. c:identifier="g_data_input_stream_read_int64"
  20069. throws="1">
  20070. <doc xml:space="preserve">Reads a 64-bit/8-byte value from @stream.
  20071. In order to get the correct byte order for this read operation,
  20072. see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
  20073. If @cancellable is not %NULL, then the operation can be cancelled by
  20074. triggering the cancellable object from another thread. If the operation
  20075. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  20076. <return-value transfer-ownership="none">
  20077. <doc xml:space="preserve">a signed 64-bit/8-byte value read from @stream or %0 if
  20078. an error occurred.</doc>
  20079. <type name="gint64" c:type="gint64"/>
  20080. </return-value>
  20081. <parameters>
  20082. <instance-parameter name="stream" transfer-ownership="none">
  20083. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20084. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20085. </instance-parameter>
  20086. <parameter name="cancellable"
  20087. transfer-ownership="none"
  20088. nullable="1"
  20089. allow-none="1">
  20090. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20091. <type name="Cancellable" c:type="GCancellable*"/>
  20092. </parameter>
  20093. </parameters>
  20094. </method>
  20095. <method name="read_line"
  20096. c:identifier="g_data_input_stream_read_line"
  20097. throws="1">
  20098. <doc xml:space="preserve">Reads a line from the data input stream. Note that no encoding
  20099. checks or conversion is performed; the input is not guaranteed to
  20100. be UTF-8, and may in fact have embedded NUL characters.
  20101. If @cancellable is not %NULL, then the operation can be cancelled by
  20102. triggering the cancellable object from another thread. If the operation
  20103. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  20104. <return-value transfer-ownership="full" nullable="1">
  20105. <doc xml:space="preserve">
  20106. a NUL terminated byte array with the line that was read in
  20107. (without the newlines). Set @length to a #gsize to get the length
  20108. of the read line. On an error, it will return %NULL and @error
  20109. will be set. If there's no content to read, it will still return
  20110. %NULL, but @error won't be set.</doc>
  20111. <array c:type="char*">
  20112. <type name="guint8"/>
  20113. </array>
  20114. </return-value>
  20115. <parameters>
  20116. <instance-parameter name="stream" transfer-ownership="none">
  20117. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20118. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20119. </instance-parameter>
  20120. <parameter name="length"
  20121. direction="out"
  20122. caller-allocates="0"
  20123. transfer-ownership="full">
  20124. <doc xml:space="preserve">a #gsize to get the length of the data read in.</doc>
  20125. <type name="gsize" c:type="gsize*"/>
  20126. </parameter>
  20127. <parameter name="cancellable"
  20128. transfer-ownership="none"
  20129. nullable="1"
  20130. allow-none="1">
  20131. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20132. <type name="Cancellable" c:type="GCancellable*"/>
  20133. </parameter>
  20134. </parameters>
  20135. </method>
  20136. <method name="read_line_async"
  20137. c:identifier="g_data_input_stream_read_line_async"
  20138. version="2.20">
  20139. <doc xml:space="preserve">The asynchronous version of g_data_input_stream_read_line(). It is
  20140. an error to have two outstanding calls to this function.
  20141. When the operation is finished, @callback will be called. You
  20142. can then call g_data_input_stream_read_line_finish() to get
  20143. the result of the operation.</doc>
  20144. <return-value transfer-ownership="none">
  20145. <type name="none" c:type="void"/>
  20146. </return-value>
  20147. <parameters>
  20148. <instance-parameter name="stream" transfer-ownership="none">
  20149. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20150. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20151. </instance-parameter>
  20152. <parameter name="io_priority" transfer-ownership="none">
  20153. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  20154. <type name="gint" c:type="gint"/>
  20155. </parameter>
  20156. <parameter name="cancellable"
  20157. transfer-ownership="none"
  20158. nullable="1"
  20159. allow-none="1">
  20160. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20161. <type name="Cancellable" c:type="GCancellable*"/>
  20162. </parameter>
  20163. <parameter name="callback"
  20164. transfer-ownership="none"
  20165. nullable="1"
  20166. allow-none="1"
  20167. scope="async"
  20168. closure="3">
  20169. <doc xml:space="preserve">callback to call when the request is satisfied.</doc>
  20170. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  20171. </parameter>
  20172. <parameter name="user_data"
  20173. transfer-ownership="none"
  20174. nullable="1"
  20175. allow-none="1">
  20176. <doc xml:space="preserve">the data to pass to callback function.</doc>
  20177. <type name="gpointer" c:type="gpointer"/>
  20178. </parameter>
  20179. </parameters>
  20180. </method>
  20181. <method name="read_line_finish"
  20182. c:identifier="g_data_input_stream_read_line_finish"
  20183. version="2.20"
  20184. throws="1">
  20185. <doc xml:space="preserve">Finish an asynchronous call started by
  20186. g_data_input_stream_read_line_async(). Note the warning about
  20187. string encoding in g_data_input_stream_read_line() applies here as
  20188. well.</doc>
  20189. <return-value transfer-ownership="full" nullable="1">
  20190. <doc xml:space="preserve">
  20191. a NUL-terminated byte array with the line that was read in
  20192. (without the newlines). Set @length to a #gsize to get the length
  20193. of the read line. On an error, it will return %NULL and @error
  20194. will be set. If there's no content to read, it will still return
  20195. %NULL, but @error won't be set.</doc>
  20196. <array c:type="char*">
  20197. <type name="guint8"/>
  20198. </array>
  20199. </return-value>
  20200. <parameters>
  20201. <instance-parameter name="stream" transfer-ownership="none">
  20202. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20203. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20204. </instance-parameter>
  20205. <parameter name="result" transfer-ownership="none">
  20206. <doc xml:space="preserve">the #GAsyncResult that was provided to the callback.</doc>
  20207. <type name="AsyncResult" c:type="GAsyncResult*"/>
  20208. </parameter>
  20209. <parameter name="length"
  20210. direction="out"
  20211. caller-allocates="0"
  20212. transfer-ownership="full">
  20213. <doc xml:space="preserve">a #gsize to get the length of the data read in.</doc>
  20214. <type name="gsize" c:type="gsize*"/>
  20215. </parameter>
  20216. </parameters>
  20217. </method>
  20218. <method name="read_line_finish_utf8"
  20219. c:identifier="g_data_input_stream_read_line_finish_utf8"
  20220. version="2.30"
  20221. throws="1">
  20222. <doc xml:space="preserve">Finish an asynchronous call started by
  20223. g_data_input_stream_read_line_async().</doc>
  20224. <return-value transfer-ownership="full" nullable="1">
  20225. <doc xml:space="preserve">a string with the line that
  20226. was read in (without the newlines). Set @length to a #gsize to
  20227. get the length of the read line. On an error, it will return
  20228. %NULL and @error will be set. For UTF-8 conversion errors, the set
  20229. error domain is %G_CONVERT_ERROR. If there's no content to read,
  20230. it will still return %NULL, but @error won't be set.</doc>
  20231. <type name="utf8" c:type="char*"/>
  20232. </return-value>
  20233. <parameters>
  20234. <instance-parameter name="stream" transfer-ownership="none">
  20235. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20236. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20237. </instance-parameter>
  20238. <parameter name="result" transfer-ownership="none">
  20239. <doc xml:space="preserve">the #GAsyncResult that was provided to the callback.</doc>
  20240. <type name="AsyncResult" c:type="GAsyncResult*"/>
  20241. </parameter>
  20242. <parameter name="length"
  20243. direction="out"
  20244. caller-allocates="0"
  20245. transfer-ownership="full">
  20246. <doc xml:space="preserve">a #gsize to get the length of the data read in.</doc>
  20247. <type name="gsize" c:type="gsize*"/>
  20248. </parameter>
  20249. </parameters>
  20250. </method>
  20251. <method name="read_line_utf8"
  20252. c:identifier="g_data_input_stream_read_line_utf8"
  20253. version="2.30"
  20254. throws="1">
  20255. <doc xml:space="preserve">Reads a UTF-8 encoded line from the data input stream.
  20256. If @cancellable is not %NULL, then the operation can be cancelled by
  20257. triggering the cancellable object from another thread. If the operation
  20258. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  20259. <return-value transfer-ownership="full" nullable="1">
  20260. <doc xml:space="preserve">a NUL terminated UTF-8 string
  20261. with the line that was read in (without the newlines). Set
  20262. @length to a #gsize to get the length of the read line. On an
  20263. error, it will return %NULL and @error will be set. For UTF-8
  20264. conversion errors, the set error domain is %G_CONVERT_ERROR. If
  20265. there's no content to read, it will still return %NULL, but @error
  20266. won't be set.</doc>
  20267. <type name="utf8" c:type="char*"/>
  20268. </return-value>
  20269. <parameters>
  20270. <instance-parameter name="stream" transfer-ownership="none">
  20271. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20272. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20273. </instance-parameter>
  20274. <parameter name="length"
  20275. direction="out"
  20276. caller-allocates="0"
  20277. transfer-ownership="full">
  20278. <doc xml:space="preserve">a #gsize to get the length of the data read in.</doc>
  20279. <type name="gsize" c:type="gsize*"/>
  20280. </parameter>
  20281. <parameter name="cancellable"
  20282. transfer-ownership="none"
  20283. nullable="1"
  20284. allow-none="1">
  20285. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20286. <type name="Cancellable" c:type="GCancellable*"/>
  20287. </parameter>
  20288. </parameters>
  20289. </method>
  20290. <method name="read_uint16"
  20291. c:identifier="g_data_input_stream_read_uint16"
  20292. throws="1">
  20293. <doc xml:space="preserve">Reads an unsigned 16-bit/2-byte value from @stream.
  20294. In order to get the correct byte order for this read operation,
  20295. see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().</doc>
  20296. <return-value transfer-ownership="none">
  20297. <doc xml:space="preserve">an unsigned 16-bit/2-byte value read from the @stream or %0 if
  20298. an error occurred.</doc>
  20299. <type name="guint16" c:type="guint16"/>
  20300. </return-value>
  20301. <parameters>
  20302. <instance-parameter name="stream" transfer-ownership="none">
  20303. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20304. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20305. </instance-parameter>
  20306. <parameter name="cancellable"
  20307. transfer-ownership="none"
  20308. nullable="1"
  20309. allow-none="1">
  20310. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20311. <type name="Cancellable" c:type="GCancellable*"/>
  20312. </parameter>
  20313. </parameters>
  20314. </method>
  20315. <method name="read_uint32"
  20316. c:identifier="g_data_input_stream_read_uint32"
  20317. throws="1">
  20318. <doc xml:space="preserve">Reads an unsigned 32-bit/4-byte value from @stream.
  20319. In order to get the correct byte order for this read operation,
  20320. see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
  20321. If @cancellable is not %NULL, then the operation can be cancelled by
  20322. triggering the cancellable object from another thread. If the operation
  20323. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  20324. <return-value transfer-ownership="none">
  20325. <doc xml:space="preserve">an unsigned 32-bit/4-byte value read from the @stream or %0 if
  20326. an error occurred.</doc>
  20327. <type name="guint32" c:type="guint32"/>
  20328. </return-value>
  20329. <parameters>
  20330. <instance-parameter name="stream" transfer-ownership="none">
  20331. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20332. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20333. </instance-parameter>
  20334. <parameter name="cancellable"
  20335. transfer-ownership="none"
  20336. nullable="1"
  20337. allow-none="1">
  20338. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20339. <type name="Cancellable" c:type="GCancellable*"/>
  20340. </parameter>
  20341. </parameters>
  20342. </method>
  20343. <method name="read_uint64"
  20344. c:identifier="g_data_input_stream_read_uint64"
  20345. throws="1">
  20346. <doc xml:space="preserve">Reads an unsigned 64-bit/8-byte value from @stream.
  20347. In order to get the correct byte order for this read operation,
  20348. see g_data_input_stream_get_byte_order().
  20349. If @cancellable is not %NULL, then the operation can be cancelled by
  20350. triggering the cancellable object from another thread. If the operation
  20351. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  20352. <return-value transfer-ownership="none">
  20353. <doc xml:space="preserve">an unsigned 64-bit/8-byte read from @stream or %0 if
  20354. an error occurred.</doc>
  20355. <type name="guint64" c:type="guint64"/>
  20356. </return-value>
  20357. <parameters>
  20358. <instance-parameter name="stream" transfer-ownership="none">
  20359. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20360. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20361. </instance-parameter>
  20362. <parameter name="cancellable"
  20363. transfer-ownership="none"
  20364. nullable="1"
  20365. allow-none="1">
  20366. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20367. <type name="Cancellable" c:type="GCancellable*"/>
  20368. </parameter>
  20369. </parameters>
  20370. </method>
  20371. <method name="read_until"
  20372. c:identifier="g_data_input_stream_read_until"
  20373. throws="1">
  20374. <doc xml:space="preserve">Reads a string from the data input stream, up to the first
  20375. occurrence of any of the stop characters.
  20376. Note that, in contrast to g_data_input_stream_read_until_async(),
  20377. this function consumes the stop character that it finds.
  20378. Don't use this function in new code. Its functionality is
  20379. inconsistent with g_data_input_stream_read_until_async(). Both
  20380. functions will be marked as deprecated in a future release. Use
  20381. g_data_input_stream_read_upto() instead, but note that that function
  20382. does not consume the stop character.</doc>
  20383. <return-value transfer-ownership="full">
  20384. <doc xml:space="preserve">a string with the data that was read
  20385. before encountering any of the stop characters. Set @length to
  20386. a #gsize to get the length of the string. This function will
  20387. return %NULL on an error.</doc>
  20388. <type name="utf8" c:type="char*"/>
  20389. </return-value>
  20390. <parameters>
  20391. <instance-parameter name="stream" transfer-ownership="none">
  20392. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20393. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20394. </instance-parameter>
  20395. <parameter name="stop_chars" transfer-ownership="none">
  20396. <doc xml:space="preserve">characters to terminate the read.</doc>
  20397. <type name="utf8" c:type="const gchar*"/>
  20398. </parameter>
  20399. <parameter name="length"
  20400. direction="out"
  20401. caller-allocates="0"
  20402. transfer-ownership="full">
  20403. <doc xml:space="preserve">a #gsize to get the length of the data read in.</doc>
  20404. <type name="gsize" c:type="gsize*"/>
  20405. </parameter>
  20406. <parameter name="cancellable"
  20407. transfer-ownership="none"
  20408. nullable="1"
  20409. allow-none="1">
  20410. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20411. <type name="Cancellable" c:type="GCancellable*"/>
  20412. </parameter>
  20413. </parameters>
  20414. </method>
  20415. <method name="read_until_async"
  20416. c:identifier="g_data_input_stream_read_until_async"
  20417. version="2.20">
  20418. <doc xml:space="preserve">The asynchronous version of g_data_input_stream_read_until().
  20419. It is an error to have two outstanding calls to this function.
  20420. Note that, in contrast to g_data_input_stream_read_until(),
  20421. this function does not consume the stop character that it finds. You
  20422. must read it for yourself.
  20423. When the operation is finished, @callback will be called. You
  20424. can then call g_data_input_stream_read_until_finish() to get
  20425. the result of the operation.
  20426. Don't use this function in new code. Its functionality is
  20427. inconsistent with g_data_input_stream_read_until(). Both functions
  20428. will be marked as deprecated in a future release. Use
  20429. g_data_input_stream_read_upto_async() instead.</doc>
  20430. <return-value transfer-ownership="none">
  20431. <type name="none" c:type="void"/>
  20432. </return-value>
  20433. <parameters>
  20434. <instance-parameter name="stream" transfer-ownership="none">
  20435. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20436. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20437. </instance-parameter>
  20438. <parameter name="stop_chars" transfer-ownership="none">
  20439. <doc xml:space="preserve">characters to terminate the read.</doc>
  20440. <type name="utf8" c:type="const gchar*"/>
  20441. </parameter>
  20442. <parameter name="io_priority" transfer-ownership="none">
  20443. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  20444. <type name="gint" c:type="gint"/>
  20445. </parameter>
  20446. <parameter name="cancellable"
  20447. transfer-ownership="none"
  20448. nullable="1"
  20449. allow-none="1">
  20450. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20451. <type name="Cancellable" c:type="GCancellable*"/>
  20452. </parameter>
  20453. <parameter name="callback"
  20454. transfer-ownership="none"
  20455. nullable="1"
  20456. allow-none="1"
  20457. scope="async"
  20458. closure="4">
  20459. <doc xml:space="preserve">callback to call when the request is satisfied.</doc>
  20460. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  20461. </parameter>
  20462. <parameter name="user_data"
  20463. transfer-ownership="none"
  20464. nullable="1"
  20465. allow-none="1">
  20466. <doc xml:space="preserve">the data to pass to callback function.</doc>
  20467. <type name="gpointer" c:type="gpointer"/>
  20468. </parameter>
  20469. </parameters>
  20470. </method>
  20471. <method name="read_until_finish"
  20472. c:identifier="g_data_input_stream_read_until_finish"
  20473. version="2.20"
  20474. throws="1">
  20475. <doc xml:space="preserve">Finish an asynchronous call started by
  20476. g_data_input_stream_read_until_async().</doc>
  20477. <return-value transfer-ownership="full">
  20478. <doc xml:space="preserve">a string with the data that was read
  20479. before encountering any of the stop characters. Set @length to
  20480. a #gsize to get the length of the string. This function will
  20481. return %NULL on an error.</doc>
  20482. <type name="utf8" c:type="char*"/>
  20483. </return-value>
  20484. <parameters>
  20485. <instance-parameter name="stream" transfer-ownership="none">
  20486. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20487. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20488. </instance-parameter>
  20489. <parameter name="result" transfer-ownership="none">
  20490. <doc xml:space="preserve">the #GAsyncResult that was provided to the callback.</doc>
  20491. <type name="AsyncResult" c:type="GAsyncResult*"/>
  20492. </parameter>
  20493. <parameter name="length"
  20494. direction="out"
  20495. caller-allocates="0"
  20496. transfer-ownership="full">
  20497. <doc xml:space="preserve">a #gsize to get the length of the data read in.</doc>
  20498. <type name="gsize" c:type="gsize*"/>
  20499. </parameter>
  20500. </parameters>
  20501. </method>
  20502. <method name="read_upto"
  20503. c:identifier="g_data_input_stream_read_upto"
  20504. version="2.26"
  20505. throws="1">
  20506. <doc xml:space="preserve">Reads a string from the data input stream, up to the first
  20507. occurrence of any of the stop characters.
  20508. In contrast to g_data_input_stream_read_until(), this function
  20509. does not consume the stop character. You have to use
  20510. g_data_input_stream_read_byte() to get it before calling
  20511. g_data_input_stream_read_upto() again.
  20512. Note that @stop_chars may contain '\0' if @stop_chars_len is
  20513. specified.</doc>
  20514. <return-value transfer-ownership="full">
  20515. <doc xml:space="preserve">a string with the data that was read
  20516. before encountering any of the stop characters. Set @length to
  20517. a #gsize to get the length of the string. This function will
  20518. return %NULL on an error</doc>
  20519. <type name="utf8" c:type="char*"/>
  20520. </return-value>
  20521. <parameters>
  20522. <instance-parameter name="stream" transfer-ownership="none">
  20523. <doc xml:space="preserve">a #GDataInputStream</doc>
  20524. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20525. </instance-parameter>
  20526. <parameter name="stop_chars" transfer-ownership="none">
  20527. <doc xml:space="preserve">characters to terminate the read</doc>
  20528. <type name="utf8" c:type="const gchar*"/>
  20529. </parameter>
  20530. <parameter name="stop_chars_len" transfer-ownership="none">
  20531. <doc xml:space="preserve">length of @stop_chars. May be -1 if @stop_chars is
  20532. nul-terminated</doc>
  20533. <type name="gssize" c:type="gssize"/>
  20534. </parameter>
  20535. <parameter name="length"
  20536. direction="out"
  20537. caller-allocates="0"
  20538. transfer-ownership="full">
  20539. <doc xml:space="preserve">a #gsize to get the length of the data read in</doc>
  20540. <type name="gsize" c:type="gsize*"/>
  20541. </parameter>
  20542. <parameter name="cancellable"
  20543. transfer-ownership="none"
  20544. nullable="1"
  20545. allow-none="1">
  20546. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  20547. <type name="Cancellable" c:type="GCancellable*"/>
  20548. </parameter>
  20549. </parameters>
  20550. </method>
  20551. <method name="read_upto_async"
  20552. c:identifier="g_data_input_stream_read_upto_async"
  20553. version="2.26">
  20554. <doc xml:space="preserve">The asynchronous version of g_data_input_stream_read_upto().
  20555. It is an error to have two outstanding calls to this function.
  20556. In contrast to g_data_input_stream_read_until(), this function
  20557. does not consume the stop character. You have to use
  20558. g_data_input_stream_read_byte() to get it before calling
  20559. g_data_input_stream_read_upto() again.
  20560. Note that @stop_chars may contain '\0' if @stop_chars_len is
  20561. specified.
  20562. When the operation is finished, @callback will be called. You
  20563. can then call g_data_input_stream_read_upto_finish() to get
  20564. the result of the operation.</doc>
  20565. <return-value transfer-ownership="none">
  20566. <type name="none" c:type="void"/>
  20567. </return-value>
  20568. <parameters>
  20569. <instance-parameter name="stream" transfer-ownership="none">
  20570. <doc xml:space="preserve">a #GDataInputStream</doc>
  20571. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20572. </instance-parameter>
  20573. <parameter name="stop_chars" transfer-ownership="none">
  20574. <doc xml:space="preserve">characters to terminate the read</doc>
  20575. <type name="utf8" c:type="const gchar*"/>
  20576. </parameter>
  20577. <parameter name="stop_chars_len" transfer-ownership="none">
  20578. <doc xml:space="preserve">length of @stop_chars. May be -1 if @stop_chars is
  20579. nul-terminated</doc>
  20580. <type name="gssize" c:type="gssize"/>
  20581. </parameter>
  20582. <parameter name="io_priority" transfer-ownership="none">
  20583. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  20584. <type name="gint" c:type="gint"/>
  20585. </parameter>
  20586. <parameter name="cancellable"
  20587. transfer-ownership="none"
  20588. nullable="1"
  20589. allow-none="1">
  20590. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  20591. <type name="Cancellable" c:type="GCancellable*"/>
  20592. </parameter>
  20593. <parameter name="callback"
  20594. transfer-ownership="none"
  20595. nullable="1"
  20596. allow-none="1"
  20597. scope="async"
  20598. closure="5">
  20599. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  20600. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  20601. </parameter>
  20602. <parameter name="user_data"
  20603. transfer-ownership="none"
  20604. nullable="1"
  20605. allow-none="1">
  20606. <doc xml:space="preserve">the data to pass to callback function</doc>
  20607. <type name="gpointer" c:type="gpointer"/>
  20608. </parameter>
  20609. </parameters>
  20610. </method>
  20611. <method name="read_upto_finish"
  20612. c:identifier="g_data_input_stream_read_upto_finish"
  20613. version="2.24"
  20614. throws="1">
  20615. <doc xml:space="preserve">Finish an asynchronous call started by
  20616. g_data_input_stream_read_upto_async().
  20617. Note that this function does not consume the stop character. You
  20618. have to use g_data_input_stream_read_byte() to get it before calling
  20619. g_data_input_stream_read_upto_async() again.</doc>
  20620. <return-value transfer-ownership="full">
  20621. <doc xml:space="preserve">a string with the data that was read
  20622. before encountering any of the stop characters. Set @length to
  20623. a #gsize to get the length of the string. This function will
  20624. return %NULL on an error.</doc>
  20625. <type name="utf8" c:type="char*"/>
  20626. </return-value>
  20627. <parameters>
  20628. <instance-parameter name="stream" transfer-ownership="none">
  20629. <doc xml:space="preserve">a #GDataInputStream</doc>
  20630. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20631. </instance-parameter>
  20632. <parameter name="result" transfer-ownership="none">
  20633. <doc xml:space="preserve">the #GAsyncResult that was provided to the callback</doc>
  20634. <type name="AsyncResult" c:type="GAsyncResult*"/>
  20635. </parameter>
  20636. <parameter name="length"
  20637. direction="out"
  20638. caller-allocates="0"
  20639. transfer-ownership="full">
  20640. <doc xml:space="preserve">a #gsize to get the length of the data read in</doc>
  20641. <type name="gsize" c:type="gsize*"/>
  20642. </parameter>
  20643. </parameters>
  20644. </method>
  20645. <method name="set_byte_order"
  20646. c:identifier="g_data_input_stream_set_byte_order">
  20647. <doc xml:space="preserve">This function sets the byte order for the given @stream. All subsequent
  20648. reads from the @stream will be read in the given @order.</doc>
  20649. <return-value transfer-ownership="none">
  20650. <type name="none" c:type="void"/>
  20651. </return-value>
  20652. <parameters>
  20653. <instance-parameter name="stream" transfer-ownership="none">
  20654. <doc xml:space="preserve">a given #GDataInputStream.</doc>
  20655. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20656. </instance-parameter>
  20657. <parameter name="order" transfer-ownership="none">
  20658. <doc xml:space="preserve">a #GDataStreamByteOrder to set.</doc>
  20659. <type name="DataStreamByteOrder" c:type="GDataStreamByteOrder"/>
  20660. </parameter>
  20661. </parameters>
  20662. </method>
  20663. <method name="set_newline_type"
  20664. c:identifier="g_data_input_stream_set_newline_type">
  20665. <doc xml:space="preserve">Sets the newline type for the @stream.
  20666. Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
  20667. chunk ends in "CR" we must read an additional byte to know if this is "CR" or
  20668. "CR LF", and this might block if there is no more data available.</doc>
  20669. <return-value transfer-ownership="none">
  20670. <type name="none" c:type="void"/>
  20671. </return-value>
  20672. <parameters>
  20673. <instance-parameter name="stream" transfer-ownership="none">
  20674. <doc xml:space="preserve">a #GDataInputStream.</doc>
  20675. <type name="DataInputStream" c:type="GDataInputStream*"/>
  20676. </instance-parameter>
  20677. <parameter name="type" transfer-ownership="none">
  20678. <doc xml:space="preserve">the type of new line return as #GDataStreamNewlineType.</doc>
  20679. <type name="DataStreamNewlineType"
  20680. c:type="GDataStreamNewlineType"/>
  20681. </parameter>
  20682. </parameters>
  20683. </method>
  20684. <property name="byte-order" writable="1" transfer-ownership="none">
  20685. <type name="DataStreamByteOrder"/>
  20686. </property>
  20687. <property name="newline-type" writable="1" transfer-ownership="none">
  20688. <type name="DataStreamNewlineType"/>
  20689. </property>
  20690. <field name="parent_instance">
  20691. <type name="BufferedInputStream" c:type="GBufferedInputStream"/>
  20692. </field>
  20693. <field name="priv" readable="0" private="1">
  20694. <type name="DataInputStreamPrivate" c:type="GDataInputStreamPrivate*"/>
  20695. </field>
  20696. </class>
  20697. <record name="DataInputStreamClass"
  20698. c:type="GDataInputStreamClass"
  20699. glib:is-gtype-struct-for="DataInputStream">
  20700. <field name="parent_class">
  20701. <type name="BufferedInputStreamClass"
  20702. c:type="GBufferedInputStreamClass"/>
  20703. </field>
  20704. <field name="_g_reserved1" introspectable="0">
  20705. <callback name="_g_reserved1">
  20706. <return-value transfer-ownership="none">
  20707. <type name="none" c:type="void"/>
  20708. </return-value>
  20709. </callback>
  20710. </field>
  20711. <field name="_g_reserved2" introspectable="0">
  20712. <callback name="_g_reserved2">
  20713. <return-value transfer-ownership="none">
  20714. <type name="none" c:type="void"/>
  20715. </return-value>
  20716. </callback>
  20717. </field>
  20718. <field name="_g_reserved3" introspectable="0">
  20719. <callback name="_g_reserved3">
  20720. <return-value transfer-ownership="none">
  20721. <type name="none" c:type="void"/>
  20722. </return-value>
  20723. </callback>
  20724. </field>
  20725. <field name="_g_reserved4" introspectable="0">
  20726. <callback name="_g_reserved4">
  20727. <return-value transfer-ownership="none">
  20728. <type name="none" c:type="void"/>
  20729. </return-value>
  20730. </callback>
  20731. </field>
  20732. <field name="_g_reserved5" introspectable="0">
  20733. <callback name="_g_reserved5">
  20734. <return-value transfer-ownership="none">
  20735. <type name="none" c:type="void"/>
  20736. </return-value>
  20737. </callback>
  20738. </field>
  20739. </record>
  20740. <record name="DataInputStreamPrivate"
  20741. c:type="GDataInputStreamPrivate"
  20742. disguised="1">
  20743. </record>
  20744. <class name="DataOutputStream"
  20745. c:symbol-prefix="data_output_stream"
  20746. c:type="GDataOutputStream"
  20747. parent="FilterOutputStream"
  20748. glib:type-name="GDataOutputStream"
  20749. glib:get-type="g_data_output_stream_get_type"
  20750. glib:type-struct="DataOutputStreamClass">
  20751. <doc xml:space="preserve">Data output stream implements #GOutputStream and includes functions for
  20752. writing data directly to an output stream.</doc>
  20753. <implements name="Seekable"/>
  20754. <constructor name="new" c:identifier="g_data_output_stream_new">
  20755. <doc xml:space="preserve">Creates a new data output stream for @base_stream.</doc>
  20756. <return-value transfer-ownership="full">
  20757. <doc xml:space="preserve">#GDataOutputStream.</doc>
  20758. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20759. </return-value>
  20760. <parameters>
  20761. <parameter name="base_stream" transfer-ownership="none">
  20762. <doc xml:space="preserve">a #GOutputStream.</doc>
  20763. <type name="OutputStream" c:type="GOutputStream*"/>
  20764. </parameter>
  20765. </parameters>
  20766. </constructor>
  20767. <method name="get_byte_order"
  20768. c:identifier="g_data_output_stream_get_byte_order">
  20769. <doc xml:space="preserve">Gets the byte order for the stream.</doc>
  20770. <return-value transfer-ownership="none">
  20771. <doc xml:space="preserve">the #GDataStreamByteOrder for the @stream.</doc>
  20772. <type name="DataStreamByteOrder" c:type="GDataStreamByteOrder"/>
  20773. </return-value>
  20774. <parameters>
  20775. <instance-parameter name="stream" transfer-ownership="none">
  20776. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20777. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20778. </instance-parameter>
  20779. </parameters>
  20780. </method>
  20781. <method name="put_byte"
  20782. c:identifier="g_data_output_stream_put_byte"
  20783. throws="1">
  20784. <doc xml:space="preserve">Puts a byte into the output stream.</doc>
  20785. <return-value transfer-ownership="none">
  20786. <doc xml:space="preserve">%TRUE if @data was successfully added to the @stream.</doc>
  20787. <type name="gboolean" c:type="gboolean"/>
  20788. </return-value>
  20789. <parameters>
  20790. <instance-parameter name="stream" transfer-ownership="none">
  20791. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20792. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20793. </instance-parameter>
  20794. <parameter name="data" transfer-ownership="none">
  20795. <doc xml:space="preserve">a #guchar.</doc>
  20796. <type name="guint8" c:type="guchar"/>
  20797. </parameter>
  20798. <parameter name="cancellable"
  20799. transfer-ownership="none"
  20800. nullable="1"
  20801. allow-none="1">
  20802. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20803. <type name="Cancellable" c:type="GCancellable*"/>
  20804. </parameter>
  20805. </parameters>
  20806. </method>
  20807. <method name="put_int16"
  20808. c:identifier="g_data_output_stream_put_int16"
  20809. throws="1">
  20810. <doc xml:space="preserve">Puts a signed 16-bit integer into the output stream.</doc>
  20811. <return-value transfer-ownership="none">
  20812. <doc xml:space="preserve">%TRUE if @data was successfully added to the @stream.</doc>
  20813. <type name="gboolean" c:type="gboolean"/>
  20814. </return-value>
  20815. <parameters>
  20816. <instance-parameter name="stream" transfer-ownership="none">
  20817. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20818. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20819. </instance-parameter>
  20820. <parameter name="data" transfer-ownership="none">
  20821. <doc xml:space="preserve">a #gint16.</doc>
  20822. <type name="gint16" c:type="gint16"/>
  20823. </parameter>
  20824. <parameter name="cancellable"
  20825. transfer-ownership="none"
  20826. nullable="1"
  20827. allow-none="1">
  20828. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20829. <type name="Cancellable" c:type="GCancellable*"/>
  20830. </parameter>
  20831. </parameters>
  20832. </method>
  20833. <method name="put_int32"
  20834. c:identifier="g_data_output_stream_put_int32"
  20835. throws="1">
  20836. <doc xml:space="preserve">Puts a signed 32-bit integer into the output stream.</doc>
  20837. <return-value transfer-ownership="none">
  20838. <doc xml:space="preserve">%TRUE if @data was successfully added to the @stream.</doc>
  20839. <type name="gboolean" c:type="gboolean"/>
  20840. </return-value>
  20841. <parameters>
  20842. <instance-parameter name="stream" transfer-ownership="none">
  20843. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20844. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20845. </instance-parameter>
  20846. <parameter name="data" transfer-ownership="none">
  20847. <doc xml:space="preserve">a #gint32.</doc>
  20848. <type name="gint32" c:type="gint32"/>
  20849. </parameter>
  20850. <parameter name="cancellable"
  20851. transfer-ownership="none"
  20852. nullable="1"
  20853. allow-none="1">
  20854. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20855. <type name="Cancellable" c:type="GCancellable*"/>
  20856. </parameter>
  20857. </parameters>
  20858. </method>
  20859. <method name="put_int64"
  20860. c:identifier="g_data_output_stream_put_int64"
  20861. throws="1">
  20862. <doc xml:space="preserve">Puts a signed 64-bit integer into the stream.</doc>
  20863. <return-value transfer-ownership="none">
  20864. <doc xml:space="preserve">%TRUE if @data was successfully added to the @stream.</doc>
  20865. <type name="gboolean" c:type="gboolean"/>
  20866. </return-value>
  20867. <parameters>
  20868. <instance-parameter name="stream" transfer-ownership="none">
  20869. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20870. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20871. </instance-parameter>
  20872. <parameter name="data" transfer-ownership="none">
  20873. <doc xml:space="preserve">a #gint64.</doc>
  20874. <type name="gint64" c:type="gint64"/>
  20875. </parameter>
  20876. <parameter name="cancellable"
  20877. transfer-ownership="none"
  20878. nullable="1"
  20879. allow-none="1">
  20880. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20881. <type name="Cancellable" c:type="GCancellable*"/>
  20882. </parameter>
  20883. </parameters>
  20884. </method>
  20885. <method name="put_string"
  20886. c:identifier="g_data_output_stream_put_string"
  20887. throws="1">
  20888. <doc xml:space="preserve">Puts a string into the output stream.</doc>
  20889. <return-value transfer-ownership="none">
  20890. <doc xml:space="preserve">%TRUE if @string was successfully added to the @stream.</doc>
  20891. <type name="gboolean" c:type="gboolean"/>
  20892. </return-value>
  20893. <parameters>
  20894. <instance-parameter name="stream" transfer-ownership="none">
  20895. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20896. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20897. </instance-parameter>
  20898. <parameter name="str" transfer-ownership="none">
  20899. <doc xml:space="preserve">a string.</doc>
  20900. <type name="utf8" c:type="const char*"/>
  20901. </parameter>
  20902. <parameter name="cancellable"
  20903. transfer-ownership="none"
  20904. nullable="1"
  20905. allow-none="1">
  20906. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20907. <type name="Cancellable" c:type="GCancellable*"/>
  20908. </parameter>
  20909. </parameters>
  20910. </method>
  20911. <method name="put_uint16"
  20912. c:identifier="g_data_output_stream_put_uint16"
  20913. throws="1">
  20914. <doc xml:space="preserve">Puts an unsigned 16-bit integer into the output stream.</doc>
  20915. <return-value transfer-ownership="none">
  20916. <doc xml:space="preserve">%TRUE if @data was successfully added to the @stream.</doc>
  20917. <type name="gboolean" c:type="gboolean"/>
  20918. </return-value>
  20919. <parameters>
  20920. <instance-parameter name="stream" transfer-ownership="none">
  20921. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20922. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20923. </instance-parameter>
  20924. <parameter name="data" transfer-ownership="none">
  20925. <doc xml:space="preserve">a #guint16.</doc>
  20926. <type name="guint16" c:type="guint16"/>
  20927. </parameter>
  20928. <parameter name="cancellable"
  20929. transfer-ownership="none"
  20930. nullable="1"
  20931. allow-none="1">
  20932. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20933. <type name="Cancellable" c:type="GCancellable*"/>
  20934. </parameter>
  20935. </parameters>
  20936. </method>
  20937. <method name="put_uint32"
  20938. c:identifier="g_data_output_stream_put_uint32"
  20939. throws="1">
  20940. <doc xml:space="preserve">Puts an unsigned 32-bit integer into the stream.</doc>
  20941. <return-value transfer-ownership="none">
  20942. <doc xml:space="preserve">%TRUE if @data was successfully added to the @stream.</doc>
  20943. <type name="gboolean" c:type="gboolean"/>
  20944. </return-value>
  20945. <parameters>
  20946. <instance-parameter name="stream" transfer-ownership="none">
  20947. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20948. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20949. </instance-parameter>
  20950. <parameter name="data" transfer-ownership="none">
  20951. <doc xml:space="preserve">a #guint32.</doc>
  20952. <type name="guint32" c:type="guint32"/>
  20953. </parameter>
  20954. <parameter name="cancellable"
  20955. transfer-ownership="none"
  20956. nullable="1"
  20957. allow-none="1">
  20958. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20959. <type name="Cancellable" c:type="GCancellable*"/>
  20960. </parameter>
  20961. </parameters>
  20962. </method>
  20963. <method name="put_uint64"
  20964. c:identifier="g_data_output_stream_put_uint64"
  20965. throws="1">
  20966. <doc xml:space="preserve">Puts an unsigned 64-bit integer into the stream.</doc>
  20967. <return-value transfer-ownership="none">
  20968. <doc xml:space="preserve">%TRUE if @data was successfully added to the @stream.</doc>
  20969. <type name="gboolean" c:type="gboolean"/>
  20970. </return-value>
  20971. <parameters>
  20972. <instance-parameter name="stream" transfer-ownership="none">
  20973. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20974. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20975. </instance-parameter>
  20976. <parameter name="data" transfer-ownership="none">
  20977. <doc xml:space="preserve">a #guint64.</doc>
  20978. <type name="guint64" c:type="guint64"/>
  20979. </parameter>
  20980. <parameter name="cancellable"
  20981. transfer-ownership="none"
  20982. nullable="1"
  20983. allow-none="1">
  20984. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  20985. <type name="Cancellable" c:type="GCancellable*"/>
  20986. </parameter>
  20987. </parameters>
  20988. </method>
  20989. <method name="set_byte_order"
  20990. c:identifier="g_data_output_stream_set_byte_order">
  20991. <doc xml:space="preserve">Sets the byte order of the data output stream to @order.</doc>
  20992. <return-value transfer-ownership="none">
  20993. <type name="none" c:type="void"/>
  20994. </return-value>
  20995. <parameters>
  20996. <instance-parameter name="stream" transfer-ownership="none">
  20997. <doc xml:space="preserve">a #GDataOutputStream.</doc>
  20998. <type name="DataOutputStream" c:type="GDataOutputStream*"/>
  20999. </instance-parameter>
  21000. <parameter name="order" transfer-ownership="none">
  21001. <doc xml:space="preserve">a %GDataStreamByteOrder.</doc>
  21002. <type name="DataStreamByteOrder" c:type="GDataStreamByteOrder"/>
  21003. </parameter>
  21004. </parameters>
  21005. </method>
  21006. <property name="byte-order" writable="1" transfer-ownership="none">
  21007. <doc xml:space="preserve">Determines the byte ordering that is used when writing
  21008. multi-byte entities (such as integers) to the stream.</doc>
  21009. <type name="DataStreamByteOrder"/>
  21010. </property>
  21011. <field name="parent_instance">
  21012. <type name="FilterOutputStream" c:type="GFilterOutputStream"/>
  21013. </field>
  21014. <field name="priv" readable="0" private="1">
  21015. <type name="DataOutputStreamPrivate"
  21016. c:type="GDataOutputStreamPrivate*"/>
  21017. </field>
  21018. </class>
  21019. <record name="DataOutputStreamClass"
  21020. c:type="GDataOutputStreamClass"
  21021. glib:is-gtype-struct-for="DataOutputStream">
  21022. <field name="parent_class">
  21023. <type name="FilterOutputStreamClass"
  21024. c:type="GFilterOutputStreamClass"/>
  21025. </field>
  21026. <field name="_g_reserved1" introspectable="0">
  21027. <callback name="_g_reserved1">
  21028. <return-value transfer-ownership="none">
  21029. <type name="none" c:type="void"/>
  21030. </return-value>
  21031. </callback>
  21032. </field>
  21033. <field name="_g_reserved2" introspectable="0">
  21034. <callback name="_g_reserved2">
  21035. <return-value transfer-ownership="none">
  21036. <type name="none" c:type="void"/>
  21037. </return-value>
  21038. </callback>
  21039. </field>
  21040. <field name="_g_reserved3" introspectable="0">
  21041. <callback name="_g_reserved3">
  21042. <return-value transfer-ownership="none">
  21043. <type name="none" c:type="void"/>
  21044. </return-value>
  21045. </callback>
  21046. </field>
  21047. <field name="_g_reserved4" introspectable="0">
  21048. <callback name="_g_reserved4">
  21049. <return-value transfer-ownership="none">
  21050. <type name="none" c:type="void"/>
  21051. </return-value>
  21052. </callback>
  21053. </field>
  21054. <field name="_g_reserved5" introspectable="0">
  21055. <callback name="_g_reserved5">
  21056. <return-value transfer-ownership="none">
  21057. <type name="none" c:type="void"/>
  21058. </return-value>
  21059. </callback>
  21060. </field>
  21061. </record>
  21062. <record name="DataOutputStreamPrivate"
  21063. c:type="GDataOutputStreamPrivate"
  21064. disguised="1">
  21065. </record>
  21066. <enumeration name="DataStreamByteOrder"
  21067. glib:type-name="GDataStreamByteOrder"
  21068. glib:get-type="g_data_stream_byte_order_get_type"
  21069. c:type="GDataStreamByteOrder">
  21070. <doc xml:space="preserve">#GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
  21071. across various machine architectures.</doc>
  21072. <member name="big_endian"
  21073. value="0"
  21074. c:identifier="G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN"
  21075. glib:nick="big-endian">
  21076. <doc xml:space="preserve">Selects Big Endian byte order.</doc>
  21077. </member>
  21078. <member name="little_endian"
  21079. value="1"
  21080. c:identifier="G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN"
  21081. glib:nick="little-endian">
  21082. <doc xml:space="preserve">Selects Little Endian byte order.</doc>
  21083. </member>
  21084. <member name="host_endian"
  21085. value="2"
  21086. c:identifier="G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN"
  21087. glib:nick="host-endian">
  21088. <doc xml:space="preserve">Selects endianness based on host machine's architecture.</doc>
  21089. </member>
  21090. </enumeration>
  21091. <enumeration name="DataStreamNewlineType"
  21092. glib:type-name="GDataStreamNewlineType"
  21093. glib:get-type="g_data_stream_newline_type_get_type"
  21094. c:type="GDataStreamNewlineType">
  21095. <doc xml:space="preserve">#GDataStreamNewlineType is used when checking for or setting the line endings for a given file.</doc>
  21096. <member name="lf"
  21097. value="0"
  21098. c:identifier="G_DATA_STREAM_NEWLINE_TYPE_LF"
  21099. glib:nick="lf">
  21100. <doc xml:space="preserve">Selects "LF" line endings, common on most modern UNIX platforms.</doc>
  21101. </member>
  21102. <member name="cr"
  21103. value="1"
  21104. c:identifier="G_DATA_STREAM_NEWLINE_TYPE_CR"
  21105. glib:nick="cr">
  21106. <doc xml:space="preserve">Selects "CR" line endings.</doc>
  21107. </member>
  21108. <member name="cr_lf"
  21109. value="2"
  21110. c:identifier="G_DATA_STREAM_NEWLINE_TYPE_CR_LF"
  21111. glib:nick="cr-lf">
  21112. <doc xml:space="preserve">Selects "CR, LF" line ending, common on Microsoft Windows.</doc>
  21113. </member>
  21114. <member name="any"
  21115. value="3"
  21116. c:identifier="G_DATA_STREAM_NEWLINE_TYPE_ANY"
  21117. glib:nick="any">
  21118. <doc xml:space="preserve">Automatically try to handle any line ending type.</doc>
  21119. </member>
  21120. </enumeration>
  21121. <interface name="DatagramBased"
  21122. c:symbol-prefix="datagram_based"
  21123. c:type="GDatagramBased"
  21124. version="2.48"
  21125. glib:type-name="GDatagramBased"
  21126. glib:get-type="g_datagram_based_get_type"
  21127. glib:type-struct="DatagramBasedInterface">
  21128. <doc xml:space="preserve">A #GDatagramBased is a networking interface for representing datagram-based
  21129. communications. It is a more or less direct mapping of the core parts of the
  21130. BSD socket API in a portable GObject interface. It is implemented by
  21131. #GSocket, which wraps the UNIX socket API on UNIX and winsock2 on Windows.
  21132. #GDatagramBased is entirely platform independent, and is intended to be used
  21133. alongside higher-level networking APIs such as #GIOStream.
  21134. It uses vectored scatter/gather I/O by default, allowing for many messages
  21135. to be sent or received in a single call. Where possible, implementations of
  21136. the interface should take advantage of vectored I/O to minimise processing
  21137. or system calls. For example, #GSocket uses recvmmsg() and sendmmsg() where
  21138. possible. Callers should take advantage of scatter/gather I/O (the use of
  21139. multiple buffers per message) to avoid unnecessary copying of data to
  21140. assemble or disassemble a message.
  21141. Each #GDatagramBased operation has a timeout parameter which may be negative
  21142. for blocking behaviour, zero for non-blocking behaviour, or positive for
  21143. timeout behaviour. A blocking operation blocks until finished or there is an
  21144. error. A non-blocking operation will return immediately with a
  21145. %G_IO_ERROR_WOULD_BLOCK error if it cannot make progress. A timeout operation
  21146. will block until the operation is complete or the timeout expires; if the
  21147. timeout expires it will return what progress it made, or
  21148. %G_IO_ERROR_TIMED_OUT if no progress was made. To know when a call would
  21149. successfully run you can call g_datagram_based_condition_check() or
  21150. g_datagram_based_condition_wait(). You can also use
  21151. g_datagram_based_create_source() and attach it to a #GMainContext to get
  21152. callbacks when I/O is possible.
  21153. When running a non-blocking operation applications should always be able to
  21154. handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other function
  21155. said that I/O was possible. This can easily happen in case of a race
  21156. condition in the application, but it can also happen for other reasons. For
  21157. instance, on Windows a socket is always seen as writable until a write
  21158. returns %G_IO_ERROR_WOULD_BLOCK.
  21159. As with #GSocket, #GDatagramBaseds can be either connection oriented or
  21160. connectionless. The interface does not cover connection establishment — use
  21161. methods on the underlying type to establish a connection before sending and
  21162. receiving data through the #GDatagramBased API. For connectionless socket
  21163. types the target/source address is specified or received in each I/O
  21164. operation.
  21165. Like most other APIs in GLib, #GDatagramBased is not inherently thread safe.
  21166. To use a #GDatagramBased concurrently from multiple threads, you must
  21167. implement your own locking.</doc>
  21168. <virtual-method name="condition_check"
  21169. invoker="condition_check"
  21170. version="2.48">
  21171. <doc xml:space="preserve">Checks on the readiness of @datagram_based to perform operations. The
  21172. operations specified in @condition are checked for and masked against the
  21173. currently-satisfied conditions on @datagram_based. The result is returned.
  21174. %G_IO_IN will be set in the return value if data is available to read with
  21175. g_datagram_based_receive_messages(), or if the connection is closed remotely
  21176. (EOS); and if the datagram_based has not been closed locally using some
  21177. implementation-specific method (such as g_socket_close() or
  21178. g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket).
  21179. If the connection is shut down or closed (by calling g_socket_close() or
  21180. g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for
  21181. example), all calls to this function will return %G_IO_ERROR_CLOSED.
  21182. %G_IO_OUT will be set if it is expected that at least one byte can be sent
  21183. using g_datagram_based_send_messages() without blocking. It will not be set
  21184. if the datagram_based has been closed locally.
  21185. %G_IO_HUP will be set if the connection has been closed locally.
  21186. %G_IO_ERR will be set if there was an asynchronous error in transmitting data
  21187. previously enqueued using g_datagram_based_send_messages().
  21188. Note that on Windows, it is possible for an operation to return
  21189. %G_IO_ERROR_WOULD_BLOCK even immediately after
  21190. g_datagram_based_condition_check() has claimed that the #GDatagramBased is
  21191. ready for writing. Rather than calling g_datagram_based_condition_check() and
  21192. then writing to the #GDatagramBased if it succeeds, it is generally better to
  21193. simply try writing right away, and try again later if the initial attempt
  21194. returns %G_IO_ERROR_WOULD_BLOCK.
  21195. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these
  21196. conditions will always be set in the output if they are true. Apart from
  21197. these flags, the output is guaranteed to be masked by @condition.
  21198. This call never blocks.</doc>
  21199. <return-value transfer-ownership="none">
  21200. <doc xml:space="preserve">the #GIOCondition mask of the current state</doc>
  21201. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21202. </return-value>
  21203. <parameters>
  21204. <instance-parameter name="datagram_based" transfer-ownership="none">
  21205. <doc xml:space="preserve">a #GDatagramBased</doc>
  21206. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21207. </instance-parameter>
  21208. <parameter name="condition" transfer-ownership="none">
  21209. <doc xml:space="preserve">a #GIOCondition mask to check</doc>
  21210. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21211. </parameter>
  21212. </parameters>
  21213. </virtual-method>
  21214. <virtual-method name="condition_wait"
  21215. invoker="condition_wait"
  21216. version="2.48"
  21217. throws="1">
  21218. <doc xml:space="preserve">Waits for up to @timeout microseconds for condition to become true on
  21219. @datagram_based. If the condition is met, %TRUE is returned.
  21220. If @cancellable is cancelled before the condition is met, or if @timeout is
  21221. reached before the condition is met, then %FALSE is returned and @error is
  21222. set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT).</doc>
  21223. <return-value transfer-ownership="none">
  21224. <doc xml:space="preserve">%TRUE if the condition was met, %FALSE otherwise</doc>
  21225. <type name="gboolean" c:type="gboolean"/>
  21226. </return-value>
  21227. <parameters>
  21228. <instance-parameter name="datagram_based" transfer-ownership="none">
  21229. <doc xml:space="preserve">a #GDatagramBased</doc>
  21230. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21231. </instance-parameter>
  21232. <parameter name="condition" transfer-ownership="none">
  21233. <doc xml:space="preserve">a #GIOCondition mask to wait for</doc>
  21234. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21235. </parameter>
  21236. <parameter name="timeout" transfer-ownership="none">
  21237. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21238. to block indefinitely</doc>
  21239. <type name="gint64" c:type="gint64"/>
  21240. </parameter>
  21241. <parameter name="cancellable"
  21242. transfer-ownership="none"
  21243. nullable="1"
  21244. allow-none="1">
  21245. <doc xml:space="preserve">a #GCancellable</doc>
  21246. <type name="Cancellable" c:type="GCancellable*"/>
  21247. </parameter>
  21248. </parameters>
  21249. </virtual-method>
  21250. <virtual-method name="create_source"
  21251. invoker="create_source"
  21252. version="2.48">
  21253. <doc xml:space="preserve">Creates a #GSource that can be attached to a #GMainContext to monitor for
  21254. the availability of the specified @condition on the #GDatagramBased. The
  21255. #GSource keeps a reference to the @datagram_based.
  21256. The callback on the source is of the #GDatagramBasedSourceFunc type.
  21257. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these
  21258. conditions will always be reported in the callback if they are true.
  21259. If non-%NULL, @cancellable can be used to cancel the source, which will
  21260. cause the source to trigger, reporting the current condition (which is
  21261. likely 0 unless cancellation happened at the same time as a condition
  21262. change). You can check for this in the callback using
  21263. g_cancellable_is_cancelled().</doc>
  21264. <return-value transfer-ownership="full">
  21265. <doc xml:space="preserve">a newly allocated #GSource</doc>
  21266. <type name="GLib.Source" c:type="GSource*"/>
  21267. </return-value>
  21268. <parameters>
  21269. <instance-parameter name="datagram_based" transfer-ownership="none">
  21270. <doc xml:space="preserve">a #GDatagramBased</doc>
  21271. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21272. </instance-parameter>
  21273. <parameter name="condition" transfer-ownership="none">
  21274. <doc xml:space="preserve">a #GIOCondition mask to monitor</doc>
  21275. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21276. </parameter>
  21277. <parameter name="cancellable"
  21278. transfer-ownership="none"
  21279. nullable="1"
  21280. allow-none="1">
  21281. <doc xml:space="preserve">a #GCancellable</doc>
  21282. <type name="Cancellable" c:type="GCancellable*"/>
  21283. </parameter>
  21284. </parameters>
  21285. </virtual-method>
  21286. <virtual-method name="receive_messages"
  21287. invoker="receive_messages"
  21288. version="2.48"
  21289. throws="1">
  21290. <doc xml:space="preserve">Receive one or more data messages from @datagram_based in one go.
  21291. @messages must point to an array of #GInputMessage structs and
  21292. @num_messages must be the length of this array. Each #GInputMessage
  21293. contains a pointer to an array of #GInputVector structs describing the
  21294. buffers that the data received in each message will be written to.
  21295. @flags modify how all messages are received. The commonly available
  21296. arguments for this are available in the #GSocketMsgFlags enum, but the
  21297. values there are the same as the system values, and the flags
  21298. are passed in as-is, so you can pass in system-specific flags too. These
  21299. flags affect the overall receive operation. Flags affecting individual
  21300. messages are returned in #GInputMessage.flags.
  21301. The other members of #GInputMessage are treated as described in its
  21302. documentation.
  21303. If @timeout is negative the call will block until @num_messages have been
  21304. received, the connection is closed remotely (EOS), @cancellable is cancelled,
  21305. or an error occurs.
  21306. If @timeout is 0 the call will return up to @num_messages without blocking,
  21307. or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system
  21308. to be received.
  21309. If @timeout is positive the call will block on the same conditions as if
  21310. @timeout were negative. If the timeout is reached
  21311. before any messages are received, %G_IO_ERROR_TIMED_OUT is returned,
  21312. otherwise it will return the number of messages received before timing out.
  21313. (Note: This is effectively the behaviour of `MSG_WAITFORONE` with
  21314. recvmmsg().)
  21315. To be notified when messages are available, wait for the %G_IO_IN condition.
  21316. Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from
  21317. g_datagram_based_receive_messages() even if you were previously notified of a
  21318. %G_IO_IN condition.
  21319. If the remote peer closes the connection, any messages queued in the
  21320. underlying receive buffer will be returned, and subsequent calls to
  21321. g_datagram_based_receive_messages() will return 0 (with no error set).
  21322. If the connection is shut down or closed (by calling g_socket_close() or
  21323. g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for
  21324. example), all calls to this function will return %G_IO_ERROR_CLOSED.
  21325. On error -1 is returned and @error is set accordingly. An error will only
  21326. be returned if zero messages could be received; otherwise the number of
  21327. messages successfully received before the error will be returned. If
  21328. @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any
  21329. other error.</doc>
  21330. <return-value transfer-ownership="none">
  21331. <doc xml:space="preserve">number of messages received, or -1 on error. Note that the number
  21332. of messages received may be smaller than @num_messages if @timeout is
  21333. zero or positive, if the peer closed the connection, or if @num_messages
  21334. was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try
  21335. to receive the remaining messages.</doc>
  21336. <type name="gint" c:type="gint"/>
  21337. </return-value>
  21338. <parameters>
  21339. <instance-parameter name="datagram_based" transfer-ownership="none">
  21340. <doc xml:space="preserve">a #GDatagramBased</doc>
  21341. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21342. </instance-parameter>
  21343. <parameter name="messages" transfer-ownership="none">
  21344. <doc xml:space="preserve">an array of #GInputMessage structs</doc>
  21345. <array length="1" zero-terminated="0" c:type="GInputMessage*">
  21346. <type name="InputMessage" c:type="GInputMessage"/>
  21347. </array>
  21348. </parameter>
  21349. <parameter name="num_messages" transfer-ownership="none">
  21350. <doc xml:space="preserve">the number of elements in @messages</doc>
  21351. <type name="guint" c:type="guint"/>
  21352. </parameter>
  21353. <parameter name="flags" transfer-ownership="none">
  21354. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags for the overall operation</doc>
  21355. <type name="gint" c:type="gint"/>
  21356. </parameter>
  21357. <parameter name="timeout" transfer-ownership="none">
  21358. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21359. to block indefinitely</doc>
  21360. <type name="gint64" c:type="gint64"/>
  21361. </parameter>
  21362. <parameter name="cancellable"
  21363. transfer-ownership="none"
  21364. nullable="1"
  21365. allow-none="1">
  21366. <doc xml:space="preserve">a %GCancellable</doc>
  21367. <type name="Cancellable" c:type="GCancellable*"/>
  21368. </parameter>
  21369. </parameters>
  21370. </virtual-method>
  21371. <virtual-method name="send_messages"
  21372. invoker="send_messages"
  21373. version="2.48"
  21374. throws="1">
  21375. <doc xml:space="preserve">Send one or more data messages from @datagram_based in one go.
  21376. @messages must point to an array of #GOutputMessage structs and
  21377. @num_messages must be the length of this array. Each #GOutputMessage
  21378. contains an address to send the data to, and a pointer to an array of
  21379. #GOutputVector structs to describe the buffers that the data to be sent
  21380. for each message will be gathered from.
  21381. @flags modify how the message is sent. The commonly available arguments
  21382. for this are available in the #GSocketMsgFlags enum, but the
  21383. values there are the same as the system values, and the flags
  21384. are passed in as-is, so you can pass in system-specific flags too.
  21385. The other members of #GOutputMessage are treated as described in its
  21386. documentation.
  21387. If @timeout is negative the call will block until @num_messages have been
  21388. sent, @cancellable is cancelled, or an error occurs.
  21389. If @timeout is 0 the call will send up to @num_messages without blocking,
  21390. or will return %G_IO_ERROR_WOULD_BLOCK if there is no space to send messages.
  21391. If @timeout is positive the call will block on the same conditions as if
  21392. @timeout were negative. If the timeout is reached before any messages are
  21393. sent, %G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number
  21394. of messages sent before timing out.
  21395. To be notified when messages can be sent, wait for the %G_IO_OUT condition.
  21396. Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from
  21397. g_datagram_based_send_messages() even if you were previously notified of a
  21398. %G_IO_OUT condition. (On Windows in particular, this is very common due to
  21399. the way the underlying APIs work.)
  21400. If the connection is shut down or closed (by calling g_socket_close() or
  21401. g_socket_shutdown() with @shutdown_write set, if it’s a #GSocket, for
  21402. example), all calls to this function will return %G_IO_ERROR_CLOSED.
  21403. On error -1 is returned and @error is set accordingly. An error will only
  21404. be returned if zero messages could be sent; otherwise the number of messages
  21405. successfully sent before the error will be returned. If @cancellable is
  21406. cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error.</doc>
  21407. <return-value transfer-ownership="none">
  21408. <doc xml:space="preserve">number of messages sent, or -1 on error. Note that the number of
  21409. messages sent may be smaller than @num_messages if @timeout is zero
  21410. or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in
  21411. which case the caller may re-try to send the remaining messages.</doc>
  21412. <type name="gint" c:type="gint"/>
  21413. </return-value>
  21414. <parameters>
  21415. <instance-parameter name="datagram_based" transfer-ownership="none">
  21416. <doc xml:space="preserve">a #GDatagramBased</doc>
  21417. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21418. </instance-parameter>
  21419. <parameter name="messages" transfer-ownership="none">
  21420. <doc xml:space="preserve">an array of #GOutputMessage structs</doc>
  21421. <array length="1" zero-terminated="0" c:type="GOutputMessage*">
  21422. <type name="OutputMessage" c:type="GOutputMessage"/>
  21423. </array>
  21424. </parameter>
  21425. <parameter name="num_messages" transfer-ownership="none">
  21426. <doc xml:space="preserve">the number of elements in @messages</doc>
  21427. <type name="guint" c:type="guint"/>
  21428. </parameter>
  21429. <parameter name="flags" transfer-ownership="none">
  21430. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags</doc>
  21431. <type name="gint" c:type="gint"/>
  21432. </parameter>
  21433. <parameter name="timeout" transfer-ownership="none">
  21434. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21435. to block indefinitely</doc>
  21436. <type name="gint64" c:type="gint64"/>
  21437. </parameter>
  21438. <parameter name="cancellable"
  21439. transfer-ownership="none"
  21440. nullable="1"
  21441. allow-none="1">
  21442. <doc xml:space="preserve">a %GCancellable</doc>
  21443. <type name="Cancellable" c:type="GCancellable*"/>
  21444. </parameter>
  21445. </parameters>
  21446. </virtual-method>
  21447. <method name="condition_check"
  21448. c:identifier="g_datagram_based_condition_check"
  21449. version="2.48">
  21450. <doc xml:space="preserve">Checks on the readiness of @datagram_based to perform operations. The
  21451. operations specified in @condition are checked for and masked against the
  21452. currently-satisfied conditions on @datagram_based. The result is returned.
  21453. %G_IO_IN will be set in the return value if data is available to read with
  21454. g_datagram_based_receive_messages(), or if the connection is closed remotely
  21455. (EOS); and if the datagram_based has not been closed locally using some
  21456. implementation-specific method (such as g_socket_close() or
  21457. g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket).
  21458. If the connection is shut down or closed (by calling g_socket_close() or
  21459. g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for
  21460. example), all calls to this function will return %G_IO_ERROR_CLOSED.
  21461. %G_IO_OUT will be set if it is expected that at least one byte can be sent
  21462. using g_datagram_based_send_messages() without blocking. It will not be set
  21463. if the datagram_based has been closed locally.
  21464. %G_IO_HUP will be set if the connection has been closed locally.
  21465. %G_IO_ERR will be set if there was an asynchronous error in transmitting data
  21466. previously enqueued using g_datagram_based_send_messages().
  21467. Note that on Windows, it is possible for an operation to return
  21468. %G_IO_ERROR_WOULD_BLOCK even immediately after
  21469. g_datagram_based_condition_check() has claimed that the #GDatagramBased is
  21470. ready for writing. Rather than calling g_datagram_based_condition_check() and
  21471. then writing to the #GDatagramBased if it succeeds, it is generally better to
  21472. simply try writing right away, and try again later if the initial attempt
  21473. returns %G_IO_ERROR_WOULD_BLOCK.
  21474. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these
  21475. conditions will always be set in the output if they are true. Apart from
  21476. these flags, the output is guaranteed to be masked by @condition.
  21477. This call never blocks.</doc>
  21478. <return-value transfer-ownership="none">
  21479. <doc xml:space="preserve">the #GIOCondition mask of the current state</doc>
  21480. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21481. </return-value>
  21482. <parameters>
  21483. <instance-parameter name="datagram_based" transfer-ownership="none">
  21484. <doc xml:space="preserve">a #GDatagramBased</doc>
  21485. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21486. </instance-parameter>
  21487. <parameter name="condition" transfer-ownership="none">
  21488. <doc xml:space="preserve">a #GIOCondition mask to check</doc>
  21489. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21490. </parameter>
  21491. </parameters>
  21492. </method>
  21493. <method name="condition_wait"
  21494. c:identifier="g_datagram_based_condition_wait"
  21495. version="2.48"
  21496. throws="1">
  21497. <doc xml:space="preserve">Waits for up to @timeout microseconds for condition to become true on
  21498. @datagram_based. If the condition is met, %TRUE is returned.
  21499. If @cancellable is cancelled before the condition is met, or if @timeout is
  21500. reached before the condition is met, then %FALSE is returned and @error is
  21501. set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT).</doc>
  21502. <return-value transfer-ownership="none">
  21503. <doc xml:space="preserve">%TRUE if the condition was met, %FALSE otherwise</doc>
  21504. <type name="gboolean" c:type="gboolean"/>
  21505. </return-value>
  21506. <parameters>
  21507. <instance-parameter name="datagram_based" transfer-ownership="none">
  21508. <doc xml:space="preserve">a #GDatagramBased</doc>
  21509. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21510. </instance-parameter>
  21511. <parameter name="condition" transfer-ownership="none">
  21512. <doc xml:space="preserve">a #GIOCondition mask to wait for</doc>
  21513. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21514. </parameter>
  21515. <parameter name="timeout" transfer-ownership="none">
  21516. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21517. to block indefinitely</doc>
  21518. <type name="gint64" c:type="gint64"/>
  21519. </parameter>
  21520. <parameter name="cancellable"
  21521. transfer-ownership="none"
  21522. nullable="1"
  21523. allow-none="1">
  21524. <doc xml:space="preserve">a #GCancellable</doc>
  21525. <type name="Cancellable" c:type="GCancellable*"/>
  21526. </parameter>
  21527. </parameters>
  21528. </method>
  21529. <method name="create_source"
  21530. c:identifier="g_datagram_based_create_source"
  21531. version="2.48">
  21532. <doc xml:space="preserve">Creates a #GSource that can be attached to a #GMainContext to monitor for
  21533. the availability of the specified @condition on the #GDatagramBased. The
  21534. #GSource keeps a reference to the @datagram_based.
  21535. The callback on the source is of the #GDatagramBasedSourceFunc type.
  21536. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these
  21537. conditions will always be reported in the callback if they are true.
  21538. If non-%NULL, @cancellable can be used to cancel the source, which will
  21539. cause the source to trigger, reporting the current condition (which is
  21540. likely 0 unless cancellation happened at the same time as a condition
  21541. change). You can check for this in the callback using
  21542. g_cancellable_is_cancelled().</doc>
  21543. <return-value transfer-ownership="full">
  21544. <doc xml:space="preserve">a newly allocated #GSource</doc>
  21545. <type name="GLib.Source" c:type="GSource*"/>
  21546. </return-value>
  21547. <parameters>
  21548. <instance-parameter name="datagram_based" transfer-ownership="none">
  21549. <doc xml:space="preserve">a #GDatagramBased</doc>
  21550. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21551. </instance-parameter>
  21552. <parameter name="condition" transfer-ownership="none">
  21553. <doc xml:space="preserve">a #GIOCondition mask to monitor</doc>
  21554. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21555. </parameter>
  21556. <parameter name="cancellable"
  21557. transfer-ownership="none"
  21558. nullable="1"
  21559. allow-none="1">
  21560. <doc xml:space="preserve">a #GCancellable</doc>
  21561. <type name="Cancellable" c:type="GCancellable*"/>
  21562. </parameter>
  21563. </parameters>
  21564. </method>
  21565. <method name="receive_messages"
  21566. c:identifier="g_datagram_based_receive_messages"
  21567. version="2.48"
  21568. throws="1">
  21569. <doc xml:space="preserve">Receive one or more data messages from @datagram_based in one go.
  21570. @messages must point to an array of #GInputMessage structs and
  21571. @num_messages must be the length of this array. Each #GInputMessage
  21572. contains a pointer to an array of #GInputVector structs describing the
  21573. buffers that the data received in each message will be written to.
  21574. @flags modify how all messages are received. The commonly available
  21575. arguments for this are available in the #GSocketMsgFlags enum, but the
  21576. values there are the same as the system values, and the flags
  21577. are passed in as-is, so you can pass in system-specific flags too. These
  21578. flags affect the overall receive operation. Flags affecting individual
  21579. messages are returned in #GInputMessage.flags.
  21580. The other members of #GInputMessage are treated as described in its
  21581. documentation.
  21582. If @timeout is negative the call will block until @num_messages have been
  21583. received, the connection is closed remotely (EOS), @cancellable is cancelled,
  21584. or an error occurs.
  21585. If @timeout is 0 the call will return up to @num_messages without blocking,
  21586. or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system
  21587. to be received.
  21588. If @timeout is positive the call will block on the same conditions as if
  21589. @timeout were negative. If the timeout is reached
  21590. before any messages are received, %G_IO_ERROR_TIMED_OUT is returned,
  21591. otherwise it will return the number of messages received before timing out.
  21592. (Note: This is effectively the behaviour of `MSG_WAITFORONE` with
  21593. recvmmsg().)
  21594. To be notified when messages are available, wait for the %G_IO_IN condition.
  21595. Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from
  21596. g_datagram_based_receive_messages() even if you were previously notified of a
  21597. %G_IO_IN condition.
  21598. If the remote peer closes the connection, any messages queued in the
  21599. underlying receive buffer will be returned, and subsequent calls to
  21600. g_datagram_based_receive_messages() will return 0 (with no error set).
  21601. If the connection is shut down or closed (by calling g_socket_close() or
  21602. g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for
  21603. example), all calls to this function will return %G_IO_ERROR_CLOSED.
  21604. On error -1 is returned and @error is set accordingly. An error will only
  21605. be returned if zero messages could be received; otherwise the number of
  21606. messages successfully received before the error will be returned. If
  21607. @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any
  21608. other error.</doc>
  21609. <return-value transfer-ownership="none">
  21610. <doc xml:space="preserve">number of messages received, or -1 on error. Note that the number
  21611. of messages received may be smaller than @num_messages if @timeout is
  21612. zero or positive, if the peer closed the connection, or if @num_messages
  21613. was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try
  21614. to receive the remaining messages.</doc>
  21615. <type name="gint" c:type="gint"/>
  21616. </return-value>
  21617. <parameters>
  21618. <instance-parameter name="datagram_based" transfer-ownership="none">
  21619. <doc xml:space="preserve">a #GDatagramBased</doc>
  21620. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21621. </instance-parameter>
  21622. <parameter name="messages" transfer-ownership="none">
  21623. <doc xml:space="preserve">an array of #GInputMessage structs</doc>
  21624. <array length="1" zero-terminated="0" c:type="GInputMessage*">
  21625. <type name="InputMessage" c:type="GInputMessage"/>
  21626. </array>
  21627. </parameter>
  21628. <parameter name="num_messages" transfer-ownership="none">
  21629. <doc xml:space="preserve">the number of elements in @messages</doc>
  21630. <type name="guint" c:type="guint"/>
  21631. </parameter>
  21632. <parameter name="flags" transfer-ownership="none">
  21633. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags for the overall operation</doc>
  21634. <type name="gint" c:type="gint"/>
  21635. </parameter>
  21636. <parameter name="timeout" transfer-ownership="none">
  21637. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21638. to block indefinitely</doc>
  21639. <type name="gint64" c:type="gint64"/>
  21640. </parameter>
  21641. <parameter name="cancellable"
  21642. transfer-ownership="none"
  21643. nullable="1"
  21644. allow-none="1">
  21645. <doc xml:space="preserve">a %GCancellable</doc>
  21646. <type name="Cancellable" c:type="GCancellable*"/>
  21647. </parameter>
  21648. </parameters>
  21649. </method>
  21650. <method name="send_messages"
  21651. c:identifier="g_datagram_based_send_messages"
  21652. version="2.48"
  21653. throws="1">
  21654. <doc xml:space="preserve">Send one or more data messages from @datagram_based in one go.
  21655. @messages must point to an array of #GOutputMessage structs and
  21656. @num_messages must be the length of this array. Each #GOutputMessage
  21657. contains an address to send the data to, and a pointer to an array of
  21658. #GOutputVector structs to describe the buffers that the data to be sent
  21659. for each message will be gathered from.
  21660. @flags modify how the message is sent. The commonly available arguments
  21661. for this are available in the #GSocketMsgFlags enum, but the
  21662. values there are the same as the system values, and the flags
  21663. are passed in as-is, so you can pass in system-specific flags too.
  21664. The other members of #GOutputMessage are treated as described in its
  21665. documentation.
  21666. If @timeout is negative the call will block until @num_messages have been
  21667. sent, @cancellable is cancelled, or an error occurs.
  21668. If @timeout is 0 the call will send up to @num_messages without blocking,
  21669. or will return %G_IO_ERROR_WOULD_BLOCK if there is no space to send messages.
  21670. If @timeout is positive the call will block on the same conditions as if
  21671. @timeout were negative. If the timeout is reached before any messages are
  21672. sent, %G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number
  21673. of messages sent before timing out.
  21674. To be notified when messages can be sent, wait for the %G_IO_OUT condition.
  21675. Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from
  21676. g_datagram_based_send_messages() even if you were previously notified of a
  21677. %G_IO_OUT condition. (On Windows in particular, this is very common due to
  21678. the way the underlying APIs work.)
  21679. If the connection is shut down or closed (by calling g_socket_close() or
  21680. g_socket_shutdown() with @shutdown_write set, if it’s a #GSocket, for
  21681. example), all calls to this function will return %G_IO_ERROR_CLOSED.
  21682. On error -1 is returned and @error is set accordingly. An error will only
  21683. be returned if zero messages could be sent; otherwise the number of messages
  21684. successfully sent before the error will be returned. If @cancellable is
  21685. cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error.</doc>
  21686. <return-value transfer-ownership="none">
  21687. <doc xml:space="preserve">number of messages sent, or -1 on error. Note that the number of
  21688. messages sent may be smaller than @num_messages if @timeout is zero
  21689. or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in
  21690. which case the caller may re-try to send the remaining messages.</doc>
  21691. <type name="gint" c:type="gint"/>
  21692. </return-value>
  21693. <parameters>
  21694. <instance-parameter name="datagram_based" transfer-ownership="none">
  21695. <doc xml:space="preserve">a #GDatagramBased</doc>
  21696. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21697. </instance-parameter>
  21698. <parameter name="messages" transfer-ownership="none">
  21699. <doc xml:space="preserve">an array of #GOutputMessage structs</doc>
  21700. <array length="1" zero-terminated="0" c:type="GOutputMessage*">
  21701. <type name="OutputMessage" c:type="GOutputMessage"/>
  21702. </array>
  21703. </parameter>
  21704. <parameter name="num_messages" transfer-ownership="none">
  21705. <doc xml:space="preserve">the number of elements in @messages</doc>
  21706. <type name="guint" c:type="guint"/>
  21707. </parameter>
  21708. <parameter name="flags" transfer-ownership="none">
  21709. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags</doc>
  21710. <type name="gint" c:type="gint"/>
  21711. </parameter>
  21712. <parameter name="timeout" transfer-ownership="none">
  21713. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21714. to block indefinitely</doc>
  21715. <type name="gint64" c:type="gint64"/>
  21716. </parameter>
  21717. <parameter name="cancellable"
  21718. transfer-ownership="none"
  21719. nullable="1"
  21720. allow-none="1">
  21721. <doc xml:space="preserve">a %GCancellable</doc>
  21722. <type name="Cancellable" c:type="GCancellable*"/>
  21723. </parameter>
  21724. </parameters>
  21725. </method>
  21726. </interface>
  21727. <record name="DatagramBasedInterface"
  21728. c:type="GDatagramBasedInterface"
  21729. glib:is-gtype-struct-for="DatagramBased"
  21730. version="2.48">
  21731. <doc xml:space="preserve">Provides an interface for socket-like objects which have datagram semantics,
  21732. following the Berkeley sockets API. The interface methods are thin wrappers
  21733. around the corresponding virtual methods, and no pre-processing of inputs is
  21734. implemented — so implementations of this API must handle all functionality
  21735. documented in the interface methods.</doc>
  21736. <field name="g_iface">
  21737. <doc xml:space="preserve">The parent interface.</doc>
  21738. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  21739. </field>
  21740. <field name="receive_messages">
  21741. <callback name="receive_messages" throws="1">
  21742. <return-value transfer-ownership="none">
  21743. <doc xml:space="preserve">number of messages received, or -1 on error. Note that the number
  21744. of messages received may be smaller than @num_messages if @timeout is
  21745. zero or positive, if the peer closed the connection, or if @num_messages
  21746. was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try
  21747. to receive the remaining messages.</doc>
  21748. <type name="gint" c:type="gint"/>
  21749. </return-value>
  21750. <parameters>
  21751. <parameter name="datagram_based" transfer-ownership="none">
  21752. <doc xml:space="preserve">a #GDatagramBased</doc>
  21753. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21754. </parameter>
  21755. <parameter name="messages" transfer-ownership="none">
  21756. <doc xml:space="preserve">an array of #GInputMessage structs</doc>
  21757. <array length="2" zero-terminated="0" c:type="GInputMessage*">
  21758. <type name="InputMessage" c:type="GInputMessage"/>
  21759. </array>
  21760. </parameter>
  21761. <parameter name="num_messages" transfer-ownership="none">
  21762. <doc xml:space="preserve">the number of elements in @messages</doc>
  21763. <type name="guint" c:type="guint"/>
  21764. </parameter>
  21765. <parameter name="flags" transfer-ownership="none">
  21766. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags for the overall operation</doc>
  21767. <type name="gint" c:type="gint"/>
  21768. </parameter>
  21769. <parameter name="timeout" transfer-ownership="none">
  21770. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21771. to block indefinitely</doc>
  21772. <type name="gint64" c:type="gint64"/>
  21773. </parameter>
  21774. <parameter name="cancellable"
  21775. transfer-ownership="none"
  21776. nullable="1"
  21777. allow-none="1">
  21778. <doc xml:space="preserve">a %GCancellable</doc>
  21779. <type name="Cancellable" c:type="GCancellable*"/>
  21780. </parameter>
  21781. </parameters>
  21782. </callback>
  21783. </field>
  21784. <field name="send_messages">
  21785. <callback name="send_messages" throws="1">
  21786. <return-value transfer-ownership="none">
  21787. <doc xml:space="preserve">number of messages sent, or -1 on error. Note that the number of
  21788. messages sent may be smaller than @num_messages if @timeout is zero
  21789. or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in
  21790. which case the caller may re-try to send the remaining messages.</doc>
  21791. <type name="gint" c:type="gint"/>
  21792. </return-value>
  21793. <parameters>
  21794. <parameter name="datagram_based" transfer-ownership="none">
  21795. <doc xml:space="preserve">a #GDatagramBased</doc>
  21796. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21797. </parameter>
  21798. <parameter name="messages" transfer-ownership="none">
  21799. <doc xml:space="preserve">an array of #GOutputMessage structs</doc>
  21800. <array length="2" zero-terminated="0" c:type="GOutputMessage*">
  21801. <type name="OutputMessage" c:type="GOutputMessage"/>
  21802. </array>
  21803. </parameter>
  21804. <parameter name="num_messages" transfer-ownership="none">
  21805. <doc xml:space="preserve">the number of elements in @messages</doc>
  21806. <type name="guint" c:type="guint"/>
  21807. </parameter>
  21808. <parameter name="flags" transfer-ownership="none">
  21809. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags</doc>
  21810. <type name="gint" c:type="gint"/>
  21811. </parameter>
  21812. <parameter name="timeout" transfer-ownership="none">
  21813. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21814. to block indefinitely</doc>
  21815. <type name="gint64" c:type="gint64"/>
  21816. </parameter>
  21817. <parameter name="cancellable"
  21818. transfer-ownership="none"
  21819. nullable="1"
  21820. allow-none="1">
  21821. <doc xml:space="preserve">a %GCancellable</doc>
  21822. <type name="Cancellable" c:type="GCancellable*"/>
  21823. </parameter>
  21824. </parameters>
  21825. </callback>
  21826. </field>
  21827. <field name="create_source">
  21828. <callback name="create_source">
  21829. <return-value transfer-ownership="full">
  21830. <doc xml:space="preserve">a newly allocated #GSource</doc>
  21831. <type name="GLib.Source" c:type="GSource*"/>
  21832. </return-value>
  21833. <parameters>
  21834. <parameter name="datagram_based" transfer-ownership="none">
  21835. <doc xml:space="preserve">a #GDatagramBased</doc>
  21836. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21837. </parameter>
  21838. <parameter name="condition" transfer-ownership="none">
  21839. <doc xml:space="preserve">a #GIOCondition mask to monitor</doc>
  21840. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21841. </parameter>
  21842. <parameter name="cancellable"
  21843. transfer-ownership="none"
  21844. nullable="1"
  21845. allow-none="1">
  21846. <doc xml:space="preserve">a #GCancellable</doc>
  21847. <type name="Cancellable" c:type="GCancellable*"/>
  21848. </parameter>
  21849. </parameters>
  21850. </callback>
  21851. </field>
  21852. <field name="condition_check">
  21853. <callback name="condition_check">
  21854. <return-value transfer-ownership="none">
  21855. <doc xml:space="preserve">the #GIOCondition mask of the current state</doc>
  21856. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21857. </return-value>
  21858. <parameters>
  21859. <parameter name="datagram_based" transfer-ownership="none">
  21860. <doc xml:space="preserve">a #GDatagramBased</doc>
  21861. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21862. </parameter>
  21863. <parameter name="condition" transfer-ownership="none">
  21864. <doc xml:space="preserve">a #GIOCondition mask to check</doc>
  21865. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21866. </parameter>
  21867. </parameters>
  21868. </callback>
  21869. </field>
  21870. <field name="condition_wait">
  21871. <callback name="condition_wait" throws="1">
  21872. <return-value transfer-ownership="none">
  21873. <doc xml:space="preserve">%TRUE if the condition was met, %FALSE otherwise</doc>
  21874. <type name="gboolean" c:type="gboolean"/>
  21875. </return-value>
  21876. <parameters>
  21877. <parameter name="datagram_based" transfer-ownership="none">
  21878. <doc xml:space="preserve">a #GDatagramBased</doc>
  21879. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21880. </parameter>
  21881. <parameter name="condition" transfer-ownership="none">
  21882. <doc xml:space="preserve">a #GIOCondition mask to wait for</doc>
  21883. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21884. </parameter>
  21885. <parameter name="timeout" transfer-ownership="none">
  21886. <doc xml:space="preserve">the maximum time (in microseconds) to wait, 0 to not block, or -1
  21887. to block indefinitely</doc>
  21888. <type name="gint64" c:type="gint64"/>
  21889. </parameter>
  21890. <parameter name="cancellable"
  21891. transfer-ownership="none"
  21892. nullable="1"
  21893. allow-none="1">
  21894. <doc xml:space="preserve">a #GCancellable</doc>
  21895. <type name="Cancellable" c:type="GCancellable*"/>
  21896. </parameter>
  21897. </parameters>
  21898. </callback>
  21899. </field>
  21900. </record>
  21901. <callback name="DatagramBasedSourceFunc"
  21902. c:type="GDatagramBasedSourceFunc"
  21903. version="2.48">
  21904. <doc xml:space="preserve">This is the function type of the callback used for the #GSource
  21905. returned by g_datagram_based_create_source().</doc>
  21906. <return-value transfer-ownership="none">
  21907. <doc xml:space="preserve">%G_SOURCE_REMOVE if the source should be removed,
  21908. %G_SOURCE_CONTINUE otherwise</doc>
  21909. <type name="gboolean" c:type="gboolean"/>
  21910. </return-value>
  21911. <parameters>
  21912. <parameter name="datagram_based" transfer-ownership="none">
  21913. <doc xml:space="preserve">the #GDatagramBased</doc>
  21914. <type name="DatagramBased" c:type="GDatagramBased*"/>
  21915. </parameter>
  21916. <parameter name="condition" transfer-ownership="none">
  21917. <doc xml:space="preserve">the current condition at the source fired</doc>
  21918. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  21919. </parameter>
  21920. <parameter name="user_data"
  21921. transfer-ownership="none"
  21922. nullable="1"
  21923. allow-none="1"
  21924. closure="2">
  21925. <doc xml:space="preserve">data passed in by the user</doc>
  21926. <type name="gpointer" c:type="gpointer"/>
  21927. </parameter>
  21928. </parameters>
  21929. </callback>
  21930. <class name="DesktopAppInfo"
  21931. c:symbol-prefix="desktop_app_info"
  21932. c:type="GDesktopAppInfo"
  21933. parent="GObject.Object"
  21934. glib:type-name="GDesktopAppInfo"
  21935. glib:get-type="g_desktop_app_info_get_type"
  21936. glib:type-struct="DesktopAppInfoClass">
  21937. <doc xml:space="preserve">#GDesktopAppInfo is an implementation of #GAppInfo based on
  21938. desktop files.
  21939. Note that `&lt;gio/gdesktopappinfo.h&gt;` belongs to the UNIX-specific
  21940. GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
  21941. file when using it.</doc>
  21942. <implements name="AppInfo"/>
  21943. <constructor name="new" c:identifier="g_desktop_app_info_new">
  21944. <doc xml:space="preserve">Creates a new #GDesktopAppInfo based on a desktop file id.
  21945. A desktop file id is the basename of the desktop file, including the
  21946. .desktop extension. GIO is looking for a desktop file with this name
  21947. in the `applications` subdirectories of the XDG
  21948. data directories (i.e. the directories specified in the `XDG_DATA_HOME`
  21949. and `XDG_DATA_DIRS` environment variables). GIO also supports the
  21950. prefix-to-subdirectory mapping that is described in the
  21951. [Menu Spec](http://standards.freedesktop.org/menu-spec/latest/)
  21952. (i.e. a desktop id of kde-foo.desktop will match
  21953. `/usr/share/applications/kde/foo.desktop`).</doc>
  21954. <return-value transfer-ownership="full">
  21955. <doc xml:space="preserve">a new #GDesktopAppInfo, or %NULL if no desktop file with that id</doc>
  21956. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  21957. </return-value>
  21958. <parameters>
  21959. <parameter name="desktop_id" transfer-ownership="none">
  21960. <doc xml:space="preserve">the desktop file id</doc>
  21961. <type name="utf8" c:type="const char*"/>
  21962. </parameter>
  21963. </parameters>
  21964. </constructor>
  21965. <constructor name="new_from_filename"
  21966. c:identifier="g_desktop_app_info_new_from_filename">
  21967. <doc xml:space="preserve">Creates a new #GDesktopAppInfo.</doc>
  21968. <return-value transfer-ownership="full">
  21969. <doc xml:space="preserve">a new #GDesktopAppInfo or %NULL on error.</doc>
  21970. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  21971. </return-value>
  21972. <parameters>
  21973. <parameter name="filename" transfer-ownership="none">
  21974. <doc xml:space="preserve">the path of a desktop file, in the GLib filename encoding</doc>
  21975. <type name="utf8" c:type="const char*"/>
  21976. </parameter>
  21977. </parameters>
  21978. </constructor>
  21979. <constructor name="new_from_keyfile"
  21980. c:identifier="g_desktop_app_info_new_from_keyfile"
  21981. version="2.18">
  21982. <doc xml:space="preserve">Creates a new #GDesktopAppInfo.</doc>
  21983. <return-value transfer-ownership="full">
  21984. <doc xml:space="preserve">a new #GDesktopAppInfo or %NULL on error.</doc>
  21985. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  21986. </return-value>
  21987. <parameters>
  21988. <parameter name="key_file" transfer-ownership="none">
  21989. <doc xml:space="preserve">an opened #GKeyFile</doc>
  21990. <type name="GLib.KeyFile" c:type="GKeyFile*"/>
  21991. </parameter>
  21992. </parameters>
  21993. </constructor>
  21994. <function name="get_implementations"
  21995. c:identifier="g_desktop_app_info_get_implementations"
  21996. version="2.42">
  21997. <doc xml:space="preserve">Gets all applications that implement @interface.
  21998. An application implements an interface if that interface is listed in
  21999. the Implements= line of the desktop file of the application.</doc>
  22000. <return-value transfer-ownership="full">
  22001. <doc xml:space="preserve">a list of #GDesktopAppInfo
  22002. objects.</doc>
  22003. <type name="GLib.List" c:type="GList*">
  22004. <type name="DesktopAppInfo"/>
  22005. </type>
  22006. </return-value>
  22007. <parameters>
  22008. <parameter name="interface" transfer-ownership="none">
  22009. <doc xml:space="preserve">the name of the interface</doc>
  22010. <type name="utf8" c:type="const gchar*"/>
  22011. </parameter>
  22012. </parameters>
  22013. </function>
  22014. <function name="search" c:identifier="g_desktop_app_info_search">
  22015. <doc xml:space="preserve">Searches desktop files for ones that match @search_string.
  22016. The return value is an array of strvs. Each strv contains a list of
  22017. applications that matched @search_string with an equal score. The
  22018. outer list is sorted by score so that the first strv contains the
  22019. best-matching applications, and so on.
  22020. The algorithm for determining matches is undefined and may change at
  22021. any time.</doc>
  22022. <return-value transfer-ownership="full">
  22023. <doc xml:space="preserve">a
  22024. list of strvs. Free each item with g_strfreev() and free the outer
  22025. list with g_free().</doc>
  22026. <array c:type="gchar***">
  22027. <array>
  22028. <type name="utf8"/>
  22029. </array>
  22030. </array>
  22031. </return-value>
  22032. <parameters>
  22033. <parameter name="search_string" transfer-ownership="none">
  22034. <doc xml:space="preserve">the search string to use</doc>
  22035. <type name="utf8" c:type="const gchar*"/>
  22036. </parameter>
  22037. </parameters>
  22038. </function>
  22039. <function name="set_desktop_env"
  22040. c:identifier="g_desktop_app_info_set_desktop_env"
  22041. deprecated="1"
  22042. deprecated-version="2.42">
  22043. <doc xml:space="preserve">Sets the name of the desktop that the application is running in.
  22044. This is used by g_app_info_should_show() and
  22045. g_desktop_app_info_get_show_in() to evaluate the
  22046. `OnlyShowIn` and `NotShowIn`
  22047. desktop entry fields.
  22048. Should be called only once; subsequent calls are ignored.</doc>
  22049. <doc-deprecated xml:space="preserve">do not use this API. Since 2.42 the value of the
  22050. `XDG_CURRENT_DESKTOP` environment variable will be used.</doc-deprecated>
  22051. <return-value transfer-ownership="none">
  22052. <type name="none" c:type="void"/>
  22053. </return-value>
  22054. <parameters>
  22055. <parameter name="desktop_env" transfer-ownership="none">
  22056. <doc xml:space="preserve">a string specifying what desktop this is</doc>
  22057. <type name="utf8" c:type="const char*"/>
  22058. </parameter>
  22059. </parameters>
  22060. </function>
  22061. <method name="get_action_name"
  22062. c:identifier="g_desktop_app_info_get_action_name"
  22063. version="2.38">
  22064. <doc xml:space="preserve">Gets the user-visible display name of the "additional application
  22065. action" specified by @action_name.
  22066. This corresponds to the "Name" key within the keyfile group for the
  22067. action.</doc>
  22068. <return-value transfer-ownership="full">
  22069. <doc xml:space="preserve">the locale-specific action name</doc>
  22070. <type name="utf8" c:type="gchar*"/>
  22071. </return-value>
  22072. <parameters>
  22073. <instance-parameter name="info" transfer-ownership="none">
  22074. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22075. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22076. </instance-parameter>
  22077. <parameter name="action_name" transfer-ownership="none">
  22078. <doc xml:space="preserve">the name of the action as from
  22079. g_desktop_app_info_list_actions()</doc>
  22080. <type name="utf8" c:type="const gchar*"/>
  22081. </parameter>
  22082. </parameters>
  22083. </method>
  22084. <method name="get_boolean"
  22085. c:identifier="g_desktop_app_info_get_boolean"
  22086. version="2.36">
  22087. <doc xml:space="preserve">Looks up a boolean value in the keyfile backing @info.
  22088. The @key is looked up in the "Desktop Entry" group.</doc>
  22089. <return-value transfer-ownership="none">
  22090. <doc xml:space="preserve">the boolean value, or %FALSE if the key
  22091. is not found</doc>
  22092. <type name="gboolean" c:type="gboolean"/>
  22093. </return-value>
  22094. <parameters>
  22095. <instance-parameter name="info" transfer-ownership="none">
  22096. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22097. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22098. </instance-parameter>
  22099. <parameter name="key" transfer-ownership="none">
  22100. <doc xml:space="preserve">the key to look up</doc>
  22101. <type name="utf8" c:type="const char*"/>
  22102. </parameter>
  22103. </parameters>
  22104. </method>
  22105. <method name="get_categories"
  22106. c:identifier="g_desktop_app_info_get_categories">
  22107. <doc xml:space="preserve">Gets the categories from the desktop file.</doc>
  22108. <return-value transfer-ownership="none">
  22109. <doc xml:space="preserve">The unparsed Categories key from the desktop file;
  22110. i.e. no attempt is made to split it by ';' or validate it.</doc>
  22111. <type name="utf8" c:type="const char*"/>
  22112. </return-value>
  22113. <parameters>
  22114. <instance-parameter name="info" transfer-ownership="none">
  22115. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22116. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22117. </instance-parameter>
  22118. </parameters>
  22119. </method>
  22120. <method name="get_filename"
  22121. c:identifier="g_desktop_app_info_get_filename"
  22122. version="2.24">
  22123. <doc xml:space="preserve">When @info was created from a known filename, return it. In some
  22124. situations such as the #GDesktopAppInfo returned from
  22125. g_desktop_app_info_new_from_keyfile(), this function will return %NULL.</doc>
  22126. <return-value transfer-ownership="none">
  22127. <doc xml:space="preserve">The full path to the file for @info, or %NULL if not known.</doc>
  22128. <type name="utf8" c:type="const char*"/>
  22129. </return-value>
  22130. <parameters>
  22131. <instance-parameter name="info" transfer-ownership="none">
  22132. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22133. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22134. </instance-parameter>
  22135. </parameters>
  22136. </method>
  22137. <method name="get_generic_name"
  22138. c:identifier="g_desktop_app_info_get_generic_name">
  22139. <doc xml:space="preserve">Gets the generic name from the destkop file.</doc>
  22140. <return-value transfer-ownership="none">
  22141. <doc xml:space="preserve">The value of the GenericName key</doc>
  22142. <type name="utf8" c:type="const char*"/>
  22143. </return-value>
  22144. <parameters>
  22145. <instance-parameter name="info" transfer-ownership="none">
  22146. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22147. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22148. </instance-parameter>
  22149. </parameters>
  22150. </method>
  22151. <method name="get_is_hidden"
  22152. c:identifier="g_desktop_app_info_get_is_hidden">
  22153. <doc xml:space="preserve">A desktop file is hidden if the Hidden key in it is
  22154. set to True.</doc>
  22155. <return-value transfer-ownership="none">
  22156. <doc xml:space="preserve">%TRUE if hidden, %FALSE otherwise.</doc>
  22157. <type name="gboolean" c:type="gboolean"/>
  22158. </return-value>
  22159. <parameters>
  22160. <instance-parameter name="info" transfer-ownership="none">
  22161. <doc xml:space="preserve">a #GDesktopAppInfo.</doc>
  22162. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22163. </instance-parameter>
  22164. </parameters>
  22165. </method>
  22166. <method name="get_keywords"
  22167. c:identifier="g_desktop_app_info_get_keywords"
  22168. version="2.32">
  22169. <doc xml:space="preserve">Gets the keywords from the desktop file.</doc>
  22170. <return-value transfer-ownership="none">
  22171. <doc xml:space="preserve">The value of the Keywords key</doc>
  22172. <array c:type="const char* const*">
  22173. <type name="utf8"/>
  22174. </array>
  22175. </return-value>
  22176. <parameters>
  22177. <instance-parameter name="info" transfer-ownership="none">
  22178. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22179. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22180. </instance-parameter>
  22181. </parameters>
  22182. </method>
  22183. <method name="get_nodisplay"
  22184. c:identifier="g_desktop_app_info_get_nodisplay"
  22185. version="2.30">
  22186. <doc xml:space="preserve">Gets the value of the NoDisplay key, which helps determine if the
  22187. application info should be shown in menus. See
  22188. #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().</doc>
  22189. <return-value transfer-ownership="none">
  22190. <doc xml:space="preserve">The value of the NoDisplay key</doc>
  22191. <type name="gboolean" c:type="gboolean"/>
  22192. </return-value>
  22193. <parameters>
  22194. <instance-parameter name="info" transfer-ownership="none">
  22195. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22196. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22197. </instance-parameter>
  22198. </parameters>
  22199. </method>
  22200. <method name="get_show_in"
  22201. c:identifier="g_desktop_app_info_get_show_in"
  22202. version="2.30">
  22203. <doc xml:space="preserve">Checks if the application info should be shown in menus that list available
  22204. applications for a specific name of the desktop, based on the
  22205. `OnlyShowIn` and `NotShowIn` keys.
  22206. @desktop_env should typically be given as %NULL, in which case the
  22207. `XDG_CURRENT_DESKTOP` environment variable is consulted. If you want
  22208. to override the default mechanism then you may specify @desktop_env,
  22209. but this is not recommended.
  22210. Note that g_app_info_should_show() for @info will include this check (with
  22211. %NULL for @desktop_env) as well as additional checks.</doc>
  22212. <return-value transfer-ownership="none">
  22213. <doc xml:space="preserve">%TRUE if the @info should be shown in @desktop_env according to the
  22214. `OnlyShowIn` and `NotShowIn` keys, %FALSE
  22215. otherwise.</doc>
  22216. <type name="gboolean" c:type="gboolean"/>
  22217. </return-value>
  22218. <parameters>
  22219. <instance-parameter name="info" transfer-ownership="none">
  22220. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22221. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22222. </instance-parameter>
  22223. <parameter name="desktop_env"
  22224. transfer-ownership="none"
  22225. nullable="1"
  22226. allow-none="1">
  22227. <doc xml:space="preserve">a string specifying a desktop name</doc>
  22228. <type name="utf8" c:type="const gchar*"/>
  22229. </parameter>
  22230. </parameters>
  22231. </method>
  22232. <method name="get_startup_wm_class"
  22233. c:identifier="g_desktop_app_info_get_startup_wm_class"
  22234. version="2.34">
  22235. <doc xml:space="preserve">Retrieves the StartupWMClass field from @info. This represents the
  22236. WM_CLASS property of the main window of the application, if launched
  22237. through @info.</doc>
  22238. <return-value transfer-ownership="none">
  22239. <doc xml:space="preserve">the startup WM class, or %NULL if none is set
  22240. in the desktop file.</doc>
  22241. <type name="utf8" c:type="const char*"/>
  22242. </return-value>
  22243. <parameters>
  22244. <instance-parameter name="info" transfer-ownership="none">
  22245. <doc xml:space="preserve">a #GDesktopAppInfo that supports startup notify</doc>
  22246. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22247. </instance-parameter>
  22248. </parameters>
  22249. </method>
  22250. <method name="get_string"
  22251. c:identifier="g_desktop_app_info_get_string"
  22252. version="2.36">
  22253. <doc xml:space="preserve">Looks up a string value in the keyfile backing @info.
  22254. The @key is looked up in the "Desktop Entry" group.</doc>
  22255. <return-value transfer-ownership="full">
  22256. <doc xml:space="preserve">a newly allocated string, or %NULL if the key
  22257. is not found</doc>
  22258. <type name="utf8" c:type="char*"/>
  22259. </return-value>
  22260. <parameters>
  22261. <instance-parameter name="info" transfer-ownership="none">
  22262. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22263. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22264. </instance-parameter>
  22265. <parameter name="key" transfer-ownership="none">
  22266. <doc xml:space="preserve">the key to look up</doc>
  22267. <type name="utf8" c:type="const char*"/>
  22268. </parameter>
  22269. </parameters>
  22270. </method>
  22271. <method name="has_key"
  22272. c:identifier="g_desktop_app_info_has_key"
  22273. version="2.36">
  22274. <doc xml:space="preserve">Returns whether @key exists in the "Desktop Entry" group
  22275. of the keyfile backing @info.</doc>
  22276. <return-value transfer-ownership="none">
  22277. <doc xml:space="preserve">%TRUE if the @key exists</doc>
  22278. <type name="gboolean" c:type="gboolean"/>
  22279. </return-value>
  22280. <parameters>
  22281. <instance-parameter name="info" transfer-ownership="none">
  22282. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22283. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22284. </instance-parameter>
  22285. <parameter name="key" transfer-ownership="none">
  22286. <doc xml:space="preserve">the key to look up</doc>
  22287. <type name="utf8" c:type="const char*"/>
  22288. </parameter>
  22289. </parameters>
  22290. </method>
  22291. <method name="launch_action"
  22292. c:identifier="g_desktop_app_info_launch_action"
  22293. version="2.38">
  22294. <doc xml:space="preserve">Activates the named application action.
  22295. You may only call this function on action names that were
  22296. returned from g_desktop_app_info_list_actions().
  22297. Note that if the main entry of the desktop file indicates that the
  22298. application supports startup notification, and @launch_context is
  22299. non-%NULL, then startup notification will be used when activating the
  22300. action (and as such, invocation of the action on the receiving side
  22301. must signal the end of startup notification when it is completed).
  22302. This is the expected behaviour of applications declaring additional
  22303. actions, as per the desktop file specification.
  22304. As with g_app_info_launch() there is no way to detect failures that
  22305. occur while using this function.</doc>
  22306. <return-value transfer-ownership="none">
  22307. <type name="none" c:type="void"/>
  22308. </return-value>
  22309. <parameters>
  22310. <instance-parameter name="info" transfer-ownership="none">
  22311. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22312. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22313. </instance-parameter>
  22314. <parameter name="action_name" transfer-ownership="none">
  22315. <doc xml:space="preserve">the name of the action as from
  22316. g_desktop_app_info_list_actions()</doc>
  22317. <type name="utf8" c:type="const gchar*"/>
  22318. </parameter>
  22319. <parameter name="launch_context"
  22320. transfer-ownership="none"
  22321. nullable="1"
  22322. allow-none="1">
  22323. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  22324. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  22325. </parameter>
  22326. </parameters>
  22327. </method>
  22328. <method name="launch_uris_as_manager"
  22329. c:identifier="g_desktop_app_info_launch_uris_as_manager"
  22330. throws="1">
  22331. <doc xml:space="preserve">This function performs the equivalent of g_app_info_launch_uris(),
  22332. but is intended primarily for operating system components that
  22333. launch applications. Ordinary applications should use
  22334. g_app_info_launch_uris().
  22335. If the application is launched via traditional UNIX fork()/exec()
  22336. then @spawn_flags, @user_setup and @user_setup_data are used for the
  22337. call to g_spawn_async(). Additionally, @pid_callback (with
  22338. @pid_callback_data) will be called to inform about the PID of the
  22339. created process.
  22340. If application launching occurs via some other mechanism (eg: D-Bus
  22341. activation) then @spawn_flags, @user_setup, @user_setup_data,
  22342. @pid_callback and @pid_callback_data are ignored.</doc>
  22343. <return-value transfer-ownership="none">
  22344. <doc xml:space="preserve">%TRUE on successful launch, %FALSE otherwise.</doc>
  22345. <type name="gboolean" c:type="gboolean"/>
  22346. </return-value>
  22347. <parameters>
  22348. <instance-parameter name="appinfo" transfer-ownership="none">
  22349. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22350. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22351. </instance-parameter>
  22352. <parameter name="uris" transfer-ownership="none">
  22353. <doc xml:space="preserve">List of URIs</doc>
  22354. <type name="GLib.List" c:type="GList*">
  22355. <type name="utf8"/>
  22356. </type>
  22357. </parameter>
  22358. <parameter name="launch_context"
  22359. transfer-ownership="none"
  22360. nullable="1"
  22361. allow-none="1">
  22362. <doc xml:space="preserve">a #GAppLaunchContext</doc>
  22363. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  22364. </parameter>
  22365. <parameter name="spawn_flags" transfer-ownership="none">
  22366. <doc xml:space="preserve">#GSpawnFlags, used for each process</doc>
  22367. <type name="GLib.SpawnFlags" c:type="GSpawnFlags"/>
  22368. </parameter>
  22369. <parameter name="user_setup"
  22370. transfer-ownership="none"
  22371. nullable="1"
  22372. allow-none="1"
  22373. scope="call"
  22374. closure="4">
  22375. <doc xml:space="preserve">a #GSpawnChildSetupFunc, used once
  22376. for each process.</doc>
  22377. <type name="GLib.SpawnChildSetupFunc"
  22378. c:type="GSpawnChildSetupFunc"/>
  22379. </parameter>
  22380. <parameter name="user_setup_data"
  22381. transfer-ownership="none"
  22382. nullable="1"
  22383. allow-none="1"
  22384. closure="3">
  22385. <doc xml:space="preserve">User data for @user_setup</doc>
  22386. <type name="gpointer" c:type="gpointer"/>
  22387. </parameter>
  22388. <parameter name="pid_callback"
  22389. transfer-ownership="none"
  22390. nullable="1"
  22391. allow-none="1"
  22392. scope="call"
  22393. closure="6">
  22394. <doc xml:space="preserve">Callback for child processes</doc>
  22395. <type name="DesktopAppLaunchCallback"
  22396. c:type="GDesktopAppLaunchCallback"/>
  22397. </parameter>
  22398. <parameter name="pid_callback_data"
  22399. transfer-ownership="none"
  22400. nullable="1"
  22401. allow-none="1"
  22402. closure="5">
  22403. <doc xml:space="preserve">User data for @callback</doc>
  22404. <type name="gpointer" c:type="gpointer"/>
  22405. </parameter>
  22406. </parameters>
  22407. </method>
  22408. <method name="list_actions"
  22409. c:identifier="g_desktop_app_info_list_actions"
  22410. version="2.38">
  22411. <doc xml:space="preserve">Returns the list of "additional application actions" supported on the
  22412. desktop file, as per the desktop file specification.
  22413. As per the specification, this is the list of actions that are
  22414. explicitly listed in the "Actions" key of the [Desktop Entry] group.</doc>
  22415. <return-value transfer-ownership="none">
  22416. <doc xml:space="preserve">a list of strings, always non-%NULL</doc>
  22417. <array c:type="gchar**">
  22418. <type name="utf8"/>
  22419. </array>
  22420. </return-value>
  22421. <parameters>
  22422. <instance-parameter name="info" transfer-ownership="none">
  22423. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22424. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22425. </instance-parameter>
  22426. </parameters>
  22427. </method>
  22428. <property name="filename"
  22429. writable="1"
  22430. construct-only="1"
  22431. transfer-ownership="none">
  22432. <doc xml:space="preserve">The origin filename of this #GDesktopAppInfo</doc>
  22433. <type name="utf8" c:type="gchar*"/>
  22434. </property>
  22435. </class>
  22436. <record name="DesktopAppInfoClass"
  22437. c:type="GDesktopAppInfoClass"
  22438. glib:is-gtype-struct-for="DesktopAppInfo">
  22439. <field name="parent_class">
  22440. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  22441. </field>
  22442. </record>
  22443. <interface name="DesktopAppInfoLookup"
  22444. c:symbol-prefix="desktop_app_info_lookup"
  22445. c:type="GDesktopAppInfoLookup"
  22446. glib:type-name="GDesktopAppInfoLookup"
  22447. glib:get-type="g_desktop_app_info_lookup_get_type"
  22448. glib:type-struct="DesktopAppInfoLookupIface">
  22449. <doc xml:space="preserve">#GDesktopAppInfoLookup is an opaque data structure and can only be accessed
  22450. using the following functions.</doc>
  22451. <virtual-method name="get_default_for_uri_scheme"
  22452. invoker="get_default_for_uri_scheme"
  22453. deprecated="1">
  22454. <doc xml:space="preserve">Gets the default application for launching applications
  22455. using this URI scheme for a particular GDesktopAppInfoLookup
  22456. implementation.
  22457. The GDesktopAppInfoLookup interface and this function is used
  22458. to implement g_app_info_get_default_for_uri_scheme() backends
  22459. in a GIO module. There is no reason for applications to use it
  22460. directly. Applications should use g_app_info_get_default_for_uri_scheme().</doc>
  22461. <doc-deprecated xml:space="preserve">The #GDesktopAppInfoLookup interface is deprecated and unused by gio.</doc-deprecated>
  22462. <return-value transfer-ownership="full">
  22463. <doc xml:space="preserve">#GAppInfo for given @uri_scheme or %NULL on error.</doc>
  22464. <type name="AppInfo" c:type="GAppInfo*"/>
  22465. </return-value>
  22466. <parameters>
  22467. <instance-parameter name="lookup" transfer-ownership="none">
  22468. <doc xml:space="preserve">a #GDesktopAppInfoLookup</doc>
  22469. <type name="DesktopAppInfoLookup" c:type="GDesktopAppInfoLookup*"/>
  22470. </instance-parameter>
  22471. <parameter name="uri_scheme" transfer-ownership="none">
  22472. <doc xml:space="preserve">a string containing a URI scheme.</doc>
  22473. <type name="utf8" c:type="const char*"/>
  22474. </parameter>
  22475. </parameters>
  22476. </virtual-method>
  22477. <method name="get_default_for_uri_scheme"
  22478. c:identifier="g_desktop_app_info_lookup_get_default_for_uri_scheme"
  22479. deprecated="1">
  22480. <doc xml:space="preserve">Gets the default application for launching applications
  22481. using this URI scheme for a particular GDesktopAppInfoLookup
  22482. implementation.
  22483. The GDesktopAppInfoLookup interface and this function is used
  22484. to implement g_app_info_get_default_for_uri_scheme() backends
  22485. in a GIO module. There is no reason for applications to use it
  22486. directly. Applications should use g_app_info_get_default_for_uri_scheme().</doc>
  22487. <doc-deprecated xml:space="preserve">The #GDesktopAppInfoLookup interface is deprecated and unused by gio.</doc-deprecated>
  22488. <return-value transfer-ownership="full">
  22489. <doc xml:space="preserve">#GAppInfo for given @uri_scheme or %NULL on error.</doc>
  22490. <type name="AppInfo" c:type="GAppInfo*"/>
  22491. </return-value>
  22492. <parameters>
  22493. <instance-parameter name="lookup" transfer-ownership="none">
  22494. <doc xml:space="preserve">a #GDesktopAppInfoLookup</doc>
  22495. <type name="DesktopAppInfoLookup" c:type="GDesktopAppInfoLookup*"/>
  22496. </instance-parameter>
  22497. <parameter name="uri_scheme" transfer-ownership="none">
  22498. <doc xml:space="preserve">a string containing a URI scheme.</doc>
  22499. <type name="utf8" c:type="const char*"/>
  22500. </parameter>
  22501. </parameters>
  22502. </method>
  22503. </interface>
  22504. <record name="DesktopAppInfoLookupIface"
  22505. c:type="GDesktopAppInfoLookupIface"
  22506. glib:is-gtype-struct-for="DesktopAppInfoLookup">
  22507. <doc xml:space="preserve">Interface that is used by backends to associate default
  22508. handlers with URI schemes.</doc>
  22509. <field name="g_iface">
  22510. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  22511. </field>
  22512. <field name="get_default_for_uri_scheme">
  22513. <callback name="get_default_for_uri_scheme">
  22514. <return-value transfer-ownership="full">
  22515. <doc xml:space="preserve">#GAppInfo for given @uri_scheme or %NULL on error.</doc>
  22516. <type name="AppInfo" c:type="GAppInfo*"/>
  22517. </return-value>
  22518. <parameters>
  22519. <parameter name="lookup" transfer-ownership="none">
  22520. <doc xml:space="preserve">a #GDesktopAppInfoLookup</doc>
  22521. <type name="DesktopAppInfoLookup"
  22522. c:type="GDesktopAppInfoLookup*"/>
  22523. </parameter>
  22524. <parameter name="uri_scheme" transfer-ownership="none">
  22525. <doc xml:space="preserve">a string containing a URI scheme.</doc>
  22526. <type name="utf8" c:type="const char*"/>
  22527. </parameter>
  22528. </parameters>
  22529. </callback>
  22530. </field>
  22531. </record>
  22532. <callback name="DesktopAppLaunchCallback"
  22533. c:type="GDesktopAppLaunchCallback">
  22534. <doc xml:space="preserve">During invocation, g_desktop_app_info_launch_uris_as_manager() may
  22535. create one or more child processes. This callback is invoked once
  22536. for each, providing the process ID.</doc>
  22537. <return-value transfer-ownership="none">
  22538. <type name="none" c:type="void"/>
  22539. </return-value>
  22540. <parameters>
  22541. <parameter name="appinfo" transfer-ownership="none">
  22542. <doc xml:space="preserve">a #GDesktopAppInfo</doc>
  22543. <type name="DesktopAppInfo" c:type="GDesktopAppInfo*"/>
  22544. </parameter>
  22545. <parameter name="pid" transfer-ownership="none">
  22546. <doc xml:space="preserve">Process identifier</doc>
  22547. <type name="GLib.Pid" c:type="GPid"/>
  22548. </parameter>
  22549. <parameter name="user_data"
  22550. transfer-ownership="none"
  22551. nullable="1"
  22552. allow-none="1"
  22553. closure="2">
  22554. <doc xml:space="preserve">User data</doc>
  22555. <type name="gpointer" c:type="gpointer"/>
  22556. </parameter>
  22557. </parameters>
  22558. </callback>
  22559. <interface name="Drive"
  22560. c:symbol-prefix="drive"
  22561. c:type="GDrive"
  22562. glib:type-name="GDrive"
  22563. glib:get-type="g_drive_get_type"
  22564. glib:type-struct="DriveIface">
  22565. <doc xml:space="preserve">#GDrive - this represent a piece of hardware connected to the machine.
  22566. It's generally only created for removable hardware or hardware with
  22567. removable media.
  22568. #GDrive is a container class for #GVolume objects that stem from
  22569. the same piece of media. As such, #GDrive abstracts a drive with
  22570. (or without) removable media and provides operations for querying
  22571. whether media is available, determining whether media change is
  22572. automatically detected and ejecting the media.
  22573. If the #GDrive reports that media isn't automatically detected, one
  22574. can poll for media; typically one should not do this periodically
  22575. as a poll for media operation is potententially expensive and may
  22576. spin up the drive creating noise.
  22577. #GDrive supports starting and stopping drives with authentication
  22578. support for the former. This can be used to support a diverse set
  22579. of use cases including connecting/disconnecting iSCSI devices,
  22580. powering down external disk enclosures and starting/stopping
  22581. multi-disk devices such as RAID devices. Note that the actual
  22582. semantics and side-effects of starting/stopping a #GDrive may vary
  22583. according to implementation. To choose the correct verbs in e.g. a
  22584. file manager, use g_drive_get_start_stop_type().
  22585. For porting from GnomeVFS note that there is no equivalent of
  22586. #GDrive in that API.</doc>
  22587. <virtual-method name="can_eject" invoker="can_eject">
  22588. <doc xml:space="preserve">Checks if a drive can be ejected.</doc>
  22589. <return-value transfer-ownership="none">
  22590. <doc xml:space="preserve">%TRUE if the @drive can be ejected, %FALSE otherwise.</doc>
  22591. <type name="gboolean" c:type="gboolean"/>
  22592. </return-value>
  22593. <parameters>
  22594. <instance-parameter name="drive" transfer-ownership="none">
  22595. <doc xml:space="preserve">a #GDrive.</doc>
  22596. <type name="Drive" c:type="GDrive*"/>
  22597. </instance-parameter>
  22598. </parameters>
  22599. </virtual-method>
  22600. <virtual-method name="can_poll_for_media" invoker="can_poll_for_media">
  22601. <doc xml:space="preserve">Checks if a drive can be polled for media changes.</doc>
  22602. <return-value transfer-ownership="none">
  22603. <doc xml:space="preserve">%TRUE if the @drive can be polled for media changes,
  22604. %FALSE otherwise.</doc>
  22605. <type name="gboolean" c:type="gboolean"/>
  22606. </return-value>
  22607. <parameters>
  22608. <instance-parameter name="drive" transfer-ownership="none">
  22609. <doc xml:space="preserve">a #GDrive.</doc>
  22610. <type name="Drive" c:type="GDrive*"/>
  22611. </instance-parameter>
  22612. </parameters>
  22613. </virtual-method>
  22614. <virtual-method name="can_start" invoker="can_start" version="2.22">
  22615. <doc xml:space="preserve">Checks if a drive can be started.</doc>
  22616. <return-value transfer-ownership="none">
  22617. <doc xml:space="preserve">%TRUE if the @drive can be started, %FALSE otherwise.</doc>
  22618. <type name="gboolean" c:type="gboolean"/>
  22619. </return-value>
  22620. <parameters>
  22621. <instance-parameter name="drive" transfer-ownership="none">
  22622. <doc xml:space="preserve">a #GDrive.</doc>
  22623. <type name="Drive" c:type="GDrive*"/>
  22624. </instance-parameter>
  22625. </parameters>
  22626. </virtual-method>
  22627. <virtual-method name="can_start_degraded"
  22628. invoker="can_start_degraded"
  22629. version="2.22">
  22630. <doc xml:space="preserve">Checks if a drive can be started degraded.</doc>
  22631. <return-value transfer-ownership="none">
  22632. <doc xml:space="preserve">%TRUE if the @drive can be started degraded, %FALSE otherwise.</doc>
  22633. <type name="gboolean" c:type="gboolean"/>
  22634. </return-value>
  22635. <parameters>
  22636. <instance-parameter name="drive" transfer-ownership="none">
  22637. <doc xml:space="preserve">a #GDrive.</doc>
  22638. <type name="Drive" c:type="GDrive*"/>
  22639. </instance-parameter>
  22640. </parameters>
  22641. </virtual-method>
  22642. <virtual-method name="can_stop" invoker="can_stop" version="2.22">
  22643. <doc xml:space="preserve">Checks if a drive can be stopped.</doc>
  22644. <return-value transfer-ownership="none">
  22645. <doc xml:space="preserve">%TRUE if the @drive can be stopped, %FALSE otherwise.</doc>
  22646. <type name="gboolean" c:type="gboolean"/>
  22647. </return-value>
  22648. <parameters>
  22649. <instance-parameter name="drive" transfer-ownership="none">
  22650. <doc xml:space="preserve">a #GDrive.</doc>
  22651. <type name="Drive" c:type="GDrive*"/>
  22652. </instance-parameter>
  22653. </parameters>
  22654. </virtual-method>
  22655. <virtual-method name="changed">
  22656. <return-value transfer-ownership="none">
  22657. <type name="none" c:type="void"/>
  22658. </return-value>
  22659. <parameters>
  22660. <instance-parameter name="drive" transfer-ownership="none">
  22661. <type name="Drive" c:type="GDrive*"/>
  22662. </instance-parameter>
  22663. </parameters>
  22664. </virtual-method>
  22665. <virtual-method name="disconnected">
  22666. <return-value transfer-ownership="none">
  22667. <type name="none" c:type="void"/>
  22668. </return-value>
  22669. <parameters>
  22670. <instance-parameter name="drive" transfer-ownership="none">
  22671. <type name="Drive" c:type="GDrive*"/>
  22672. </instance-parameter>
  22673. </parameters>
  22674. </virtual-method>
  22675. <virtual-method name="eject"
  22676. invoker="eject"
  22677. deprecated="1"
  22678. deprecated-version="2.22">
  22679. <doc xml:space="preserve">Asynchronously ejects a drive.
  22680. When the operation is finished, @callback will be called.
  22681. You can then call g_drive_eject_finish() to obtain the
  22682. result of the operation.</doc>
  22683. <doc-deprecated xml:space="preserve">Use g_drive_eject_with_operation() instead.</doc-deprecated>
  22684. <return-value transfer-ownership="none">
  22685. <type name="none" c:type="void"/>
  22686. </return-value>
  22687. <parameters>
  22688. <instance-parameter name="drive" transfer-ownership="none">
  22689. <doc xml:space="preserve">a #GDrive.</doc>
  22690. <type name="Drive" c:type="GDrive*"/>
  22691. </instance-parameter>
  22692. <parameter name="flags" transfer-ownership="none">
  22693. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  22694. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  22695. </parameter>
  22696. <parameter name="cancellable"
  22697. transfer-ownership="none"
  22698. nullable="1"
  22699. allow-none="1">
  22700. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  22701. <type name="Cancellable" c:type="GCancellable*"/>
  22702. </parameter>
  22703. <parameter name="callback"
  22704. transfer-ownership="none"
  22705. nullable="1"
  22706. allow-none="1"
  22707. scope="async"
  22708. closure="3">
  22709. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  22710. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  22711. </parameter>
  22712. <parameter name="user_data"
  22713. transfer-ownership="none"
  22714. nullable="1"
  22715. allow-none="1"
  22716. closure="3">
  22717. <doc xml:space="preserve">user data to pass to @callback</doc>
  22718. <type name="gpointer" c:type="gpointer"/>
  22719. </parameter>
  22720. </parameters>
  22721. </virtual-method>
  22722. <virtual-method name="eject_button">
  22723. <return-value transfer-ownership="none">
  22724. <type name="none" c:type="void"/>
  22725. </return-value>
  22726. <parameters>
  22727. <instance-parameter name="drive" transfer-ownership="none">
  22728. <type name="Drive" c:type="GDrive*"/>
  22729. </instance-parameter>
  22730. </parameters>
  22731. </virtual-method>
  22732. <virtual-method name="eject_finish"
  22733. invoker="eject_finish"
  22734. deprecated="1"
  22735. deprecated-version="2.22"
  22736. throws="1">
  22737. <doc xml:space="preserve">Finishes ejecting a drive.</doc>
  22738. <doc-deprecated xml:space="preserve">Use g_drive_eject_with_operation_finish() instead.</doc-deprecated>
  22739. <return-value transfer-ownership="none">
  22740. <doc xml:space="preserve">%TRUE if the drive has been ejected successfully,
  22741. %FALSE otherwise.</doc>
  22742. <type name="gboolean" c:type="gboolean"/>
  22743. </return-value>
  22744. <parameters>
  22745. <instance-parameter name="drive" transfer-ownership="none">
  22746. <doc xml:space="preserve">a #GDrive.</doc>
  22747. <type name="Drive" c:type="GDrive*"/>
  22748. </instance-parameter>
  22749. <parameter name="result" transfer-ownership="none">
  22750. <doc xml:space="preserve">a #GAsyncResult.</doc>
  22751. <type name="AsyncResult" c:type="GAsyncResult*"/>
  22752. </parameter>
  22753. </parameters>
  22754. </virtual-method>
  22755. <virtual-method name="eject_with_operation"
  22756. invoker="eject_with_operation"
  22757. version="2.22">
  22758. <doc xml:space="preserve">Ejects a drive. This is an asynchronous operation, and is
  22759. finished by calling g_drive_eject_with_operation_finish() with the @drive
  22760. and #GAsyncResult data returned in the @callback.</doc>
  22761. <return-value transfer-ownership="none">
  22762. <type name="none" c:type="void"/>
  22763. </return-value>
  22764. <parameters>
  22765. <instance-parameter name="drive" transfer-ownership="none">
  22766. <doc xml:space="preserve">a #GDrive.</doc>
  22767. <type name="Drive" c:type="GDrive*"/>
  22768. </instance-parameter>
  22769. <parameter name="flags" transfer-ownership="none">
  22770. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  22771. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  22772. </parameter>
  22773. <parameter name="mount_operation"
  22774. transfer-ownership="none"
  22775. nullable="1"
  22776. allow-none="1">
  22777. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  22778. user interaction.</doc>
  22779. <type name="MountOperation" c:type="GMountOperation*"/>
  22780. </parameter>
  22781. <parameter name="cancellable"
  22782. transfer-ownership="none"
  22783. nullable="1"
  22784. allow-none="1">
  22785. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  22786. <type name="Cancellable" c:type="GCancellable*"/>
  22787. </parameter>
  22788. <parameter name="callback"
  22789. transfer-ownership="none"
  22790. nullable="1"
  22791. allow-none="1"
  22792. scope="async"
  22793. closure="4">
  22794. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  22795. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  22796. </parameter>
  22797. <parameter name="user_data"
  22798. transfer-ownership="none"
  22799. nullable="1"
  22800. allow-none="1"
  22801. closure="4">
  22802. <doc xml:space="preserve">user data passed to @callback.</doc>
  22803. <type name="gpointer" c:type="gpointer"/>
  22804. </parameter>
  22805. </parameters>
  22806. </virtual-method>
  22807. <virtual-method name="eject_with_operation_finish"
  22808. invoker="eject_with_operation_finish"
  22809. version="2.22"
  22810. throws="1">
  22811. <doc xml:space="preserve">Finishes ejecting a drive. If any errors occurred during the operation,
  22812. @error will be set to contain the errors and %FALSE will be returned.</doc>
  22813. <return-value transfer-ownership="none">
  22814. <doc xml:space="preserve">%TRUE if the drive was successfully ejected. %FALSE otherwise.</doc>
  22815. <type name="gboolean" c:type="gboolean"/>
  22816. </return-value>
  22817. <parameters>
  22818. <instance-parameter name="drive" transfer-ownership="none">
  22819. <doc xml:space="preserve">a #GDrive.</doc>
  22820. <type name="Drive" c:type="GDrive*"/>
  22821. </instance-parameter>
  22822. <parameter name="result" transfer-ownership="none">
  22823. <doc xml:space="preserve">a #GAsyncResult.</doc>
  22824. <type name="AsyncResult" c:type="GAsyncResult*"/>
  22825. </parameter>
  22826. </parameters>
  22827. </virtual-method>
  22828. <virtual-method name="enumerate_identifiers"
  22829. invoker="enumerate_identifiers">
  22830. <doc xml:space="preserve">Gets the kinds of identifiers that @drive has.
  22831. Use g_drive_get_identifier() to obtain the identifiers
  22832. themselves.</doc>
  22833. <return-value transfer-ownership="full">
  22834. <doc xml:space="preserve">a %NULL-terminated
  22835. array of strings containing kinds of identifiers. Use g_strfreev()
  22836. to free.</doc>
  22837. <array c:type="char**">
  22838. <type name="utf8"/>
  22839. </array>
  22840. </return-value>
  22841. <parameters>
  22842. <instance-parameter name="drive" transfer-ownership="none">
  22843. <doc xml:space="preserve">a #GDrive</doc>
  22844. <type name="Drive" c:type="GDrive*"/>
  22845. </instance-parameter>
  22846. </parameters>
  22847. </virtual-method>
  22848. <virtual-method name="get_icon" invoker="get_icon">
  22849. <doc xml:space="preserve">Gets the icon for @drive.</doc>
  22850. <return-value transfer-ownership="full">
  22851. <doc xml:space="preserve">#GIcon for the @drive.
  22852. Free the returned object with g_object_unref().</doc>
  22853. <type name="Icon" c:type="GIcon*"/>
  22854. </return-value>
  22855. <parameters>
  22856. <instance-parameter name="drive" transfer-ownership="none">
  22857. <doc xml:space="preserve">a #GDrive.</doc>
  22858. <type name="Drive" c:type="GDrive*"/>
  22859. </instance-parameter>
  22860. </parameters>
  22861. </virtual-method>
  22862. <virtual-method name="get_identifier" invoker="get_identifier">
  22863. <doc xml:space="preserve">Gets the identifier of the given kind for @drive.</doc>
  22864. <return-value transfer-ownership="full">
  22865. <doc xml:space="preserve">a newly allocated string containing the
  22866. requested identfier, or %NULL if the #GDrive
  22867. doesn't have this kind of identifier.</doc>
  22868. <type name="utf8" c:type="char*"/>
  22869. </return-value>
  22870. <parameters>
  22871. <instance-parameter name="drive" transfer-ownership="none">
  22872. <doc xml:space="preserve">a #GDrive</doc>
  22873. <type name="Drive" c:type="GDrive*"/>
  22874. </instance-parameter>
  22875. <parameter name="kind" transfer-ownership="none">
  22876. <doc xml:space="preserve">the kind of identifier to return</doc>
  22877. <type name="utf8" c:type="const char*"/>
  22878. </parameter>
  22879. </parameters>
  22880. </virtual-method>
  22881. <virtual-method name="get_name" invoker="get_name">
  22882. <doc xml:space="preserve">Gets the name of @drive.</doc>
  22883. <return-value transfer-ownership="full">
  22884. <doc xml:space="preserve">a string containing @drive's name. The returned
  22885. string should be freed when no longer needed.</doc>
  22886. <type name="utf8" c:type="char*"/>
  22887. </return-value>
  22888. <parameters>
  22889. <instance-parameter name="drive" transfer-ownership="none">
  22890. <doc xml:space="preserve">a #GDrive.</doc>
  22891. <type name="Drive" c:type="GDrive*"/>
  22892. </instance-parameter>
  22893. </parameters>
  22894. </virtual-method>
  22895. <virtual-method name="get_sort_key"
  22896. invoker="get_sort_key"
  22897. version="2.32">
  22898. <doc xml:space="preserve">Gets the sort key for @drive, if any.</doc>
  22899. <return-value transfer-ownership="none">
  22900. <doc xml:space="preserve">Sorting key for @drive or %NULL if no such key is available.</doc>
  22901. <type name="utf8" c:type="const gchar*"/>
  22902. </return-value>
  22903. <parameters>
  22904. <instance-parameter name="drive" transfer-ownership="none">
  22905. <doc xml:space="preserve">A #GDrive.</doc>
  22906. <type name="Drive" c:type="GDrive*"/>
  22907. </instance-parameter>
  22908. </parameters>
  22909. </virtual-method>
  22910. <virtual-method name="get_start_stop_type"
  22911. invoker="get_start_stop_type"
  22912. version="2.22">
  22913. <doc xml:space="preserve">Gets a hint about how a drive can be started/stopped.</doc>
  22914. <return-value transfer-ownership="none">
  22915. <doc xml:space="preserve">A value from the #GDriveStartStopType enumeration.</doc>
  22916. <type name="DriveStartStopType" c:type="GDriveStartStopType"/>
  22917. </return-value>
  22918. <parameters>
  22919. <instance-parameter name="drive" transfer-ownership="none">
  22920. <doc xml:space="preserve">a #GDrive.</doc>
  22921. <type name="Drive" c:type="GDrive*"/>
  22922. </instance-parameter>
  22923. </parameters>
  22924. </virtual-method>
  22925. <virtual-method name="get_symbolic_icon"
  22926. invoker="get_symbolic_icon"
  22927. version="2.34">
  22928. <doc xml:space="preserve">Gets the icon for @drive.</doc>
  22929. <return-value transfer-ownership="full">
  22930. <doc xml:space="preserve">symbolic #GIcon for the @drive.
  22931. Free the returned object with g_object_unref().</doc>
  22932. <type name="Icon" c:type="GIcon*"/>
  22933. </return-value>
  22934. <parameters>
  22935. <instance-parameter name="drive" transfer-ownership="none">
  22936. <doc xml:space="preserve">a #GDrive.</doc>
  22937. <type name="Drive" c:type="GDrive*"/>
  22938. </instance-parameter>
  22939. </parameters>
  22940. </virtual-method>
  22941. <virtual-method name="get_volumes" invoker="get_volumes">
  22942. <doc xml:space="preserve">Get a list of mountable volumes for @drive.
  22943. The returned list should be freed with g_list_free(), after
  22944. its elements have been unreffed with g_object_unref().</doc>
  22945. <return-value transfer-ownership="full">
  22946. <doc xml:space="preserve">#GList containing any #GVolume objects on the given @drive.</doc>
  22947. <type name="GLib.List" c:type="GList*">
  22948. <type name="Volume"/>
  22949. </type>
  22950. </return-value>
  22951. <parameters>
  22952. <instance-parameter name="drive" transfer-ownership="none">
  22953. <doc xml:space="preserve">a #GDrive.</doc>
  22954. <type name="Drive" c:type="GDrive*"/>
  22955. </instance-parameter>
  22956. </parameters>
  22957. </virtual-method>
  22958. <virtual-method name="has_media" invoker="has_media">
  22959. <doc xml:space="preserve">Checks if the @drive has media. Note that the OS may not be polling
  22960. the drive for media changes; see g_drive_is_media_check_automatic()
  22961. for more details.</doc>
  22962. <return-value transfer-ownership="none">
  22963. <doc xml:space="preserve">%TRUE if @drive has media, %FALSE otherwise.</doc>
  22964. <type name="gboolean" c:type="gboolean"/>
  22965. </return-value>
  22966. <parameters>
  22967. <instance-parameter name="drive" transfer-ownership="none">
  22968. <doc xml:space="preserve">a #GDrive.</doc>
  22969. <type name="Drive" c:type="GDrive*"/>
  22970. </instance-parameter>
  22971. </parameters>
  22972. </virtual-method>
  22973. <virtual-method name="has_volumes" invoker="has_volumes">
  22974. <doc xml:space="preserve">Check if @drive has any mountable volumes.</doc>
  22975. <return-value transfer-ownership="none">
  22976. <doc xml:space="preserve">%TRUE if the @drive contains volumes, %FALSE otherwise.</doc>
  22977. <type name="gboolean" c:type="gboolean"/>
  22978. </return-value>
  22979. <parameters>
  22980. <instance-parameter name="drive" transfer-ownership="none">
  22981. <doc xml:space="preserve">a #GDrive.</doc>
  22982. <type name="Drive" c:type="GDrive*"/>
  22983. </instance-parameter>
  22984. </parameters>
  22985. </virtual-method>
  22986. <virtual-method name="is_media_check_automatic"
  22987. invoker="is_media_check_automatic">
  22988. <doc xml:space="preserve">Checks if @drive is capabable of automatically detecting media changes.</doc>
  22989. <return-value transfer-ownership="none">
  22990. <doc xml:space="preserve">%TRUE if the @drive is capabable of automatically detecting
  22991. media changes, %FALSE otherwise.</doc>
  22992. <type name="gboolean" c:type="gboolean"/>
  22993. </return-value>
  22994. <parameters>
  22995. <instance-parameter name="drive" transfer-ownership="none">
  22996. <doc xml:space="preserve">a #GDrive.</doc>
  22997. <type name="Drive" c:type="GDrive*"/>
  22998. </instance-parameter>
  22999. </parameters>
  23000. </virtual-method>
  23001. <virtual-method name="is_media_removable" invoker="is_media_removable">
  23002. <doc xml:space="preserve">Checks if the @drive supports removable media.</doc>
  23003. <return-value transfer-ownership="none">
  23004. <doc xml:space="preserve">%TRUE if @drive supports removable media, %FALSE otherwise.</doc>
  23005. <type name="gboolean" c:type="gboolean"/>
  23006. </return-value>
  23007. <parameters>
  23008. <instance-parameter name="drive" transfer-ownership="none">
  23009. <doc xml:space="preserve">a #GDrive.</doc>
  23010. <type name="Drive" c:type="GDrive*"/>
  23011. </instance-parameter>
  23012. </parameters>
  23013. </virtual-method>
  23014. <virtual-method name="poll_for_media" invoker="poll_for_media">
  23015. <doc xml:space="preserve">Asynchronously polls @drive to see if media has been inserted or removed.
  23016. When the operation is finished, @callback will be called.
  23017. You can then call g_drive_poll_for_media_finish() to obtain the
  23018. result of the operation.</doc>
  23019. <return-value transfer-ownership="none">
  23020. <type name="none" c:type="void"/>
  23021. </return-value>
  23022. <parameters>
  23023. <instance-parameter name="drive" transfer-ownership="none">
  23024. <doc xml:space="preserve">a #GDrive.</doc>
  23025. <type name="Drive" c:type="GDrive*"/>
  23026. </instance-parameter>
  23027. <parameter name="cancellable"
  23028. transfer-ownership="none"
  23029. nullable="1"
  23030. allow-none="1">
  23031. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23032. <type name="Cancellable" c:type="GCancellable*"/>
  23033. </parameter>
  23034. <parameter name="callback"
  23035. transfer-ownership="none"
  23036. nullable="1"
  23037. allow-none="1"
  23038. scope="async"
  23039. closure="2">
  23040. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23041. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23042. </parameter>
  23043. <parameter name="user_data"
  23044. transfer-ownership="none"
  23045. nullable="1"
  23046. allow-none="1"
  23047. closure="2">
  23048. <doc xml:space="preserve">user data to pass to @callback</doc>
  23049. <type name="gpointer" c:type="gpointer"/>
  23050. </parameter>
  23051. </parameters>
  23052. </virtual-method>
  23053. <virtual-method name="poll_for_media_finish"
  23054. invoker="poll_for_media_finish"
  23055. throws="1">
  23056. <doc xml:space="preserve">Finishes an operation started with g_drive_poll_for_media() on a drive.</doc>
  23057. <return-value transfer-ownership="none">
  23058. <doc xml:space="preserve">%TRUE if the drive has been poll_for_mediaed successfully,
  23059. %FALSE otherwise.</doc>
  23060. <type name="gboolean" c:type="gboolean"/>
  23061. </return-value>
  23062. <parameters>
  23063. <instance-parameter name="drive" transfer-ownership="none">
  23064. <doc xml:space="preserve">a #GDrive.</doc>
  23065. <type name="Drive" c:type="GDrive*"/>
  23066. </instance-parameter>
  23067. <parameter name="result" transfer-ownership="none">
  23068. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23069. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23070. </parameter>
  23071. </parameters>
  23072. </virtual-method>
  23073. <virtual-method name="start" invoker="start" version="2.22">
  23074. <doc xml:space="preserve">Asynchronously starts a drive.
  23075. When the operation is finished, @callback will be called.
  23076. You can then call g_drive_start_finish() to obtain the
  23077. result of the operation.</doc>
  23078. <return-value transfer-ownership="none">
  23079. <type name="none" c:type="void"/>
  23080. </return-value>
  23081. <parameters>
  23082. <instance-parameter name="drive" transfer-ownership="none">
  23083. <doc xml:space="preserve">a #GDrive.</doc>
  23084. <type name="Drive" c:type="GDrive*"/>
  23085. </instance-parameter>
  23086. <parameter name="flags" transfer-ownership="none">
  23087. <doc xml:space="preserve">flags affecting the start operation.</doc>
  23088. <type name="DriveStartFlags" c:type="GDriveStartFlags"/>
  23089. </parameter>
  23090. <parameter name="mount_operation"
  23091. transfer-ownership="none"
  23092. nullable="1"
  23093. allow-none="1">
  23094. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  23095. user interaction.</doc>
  23096. <type name="MountOperation" c:type="GMountOperation*"/>
  23097. </parameter>
  23098. <parameter name="cancellable"
  23099. transfer-ownership="none"
  23100. nullable="1"
  23101. allow-none="1">
  23102. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23103. <type name="Cancellable" c:type="GCancellable*"/>
  23104. </parameter>
  23105. <parameter name="callback"
  23106. transfer-ownership="none"
  23107. nullable="1"
  23108. allow-none="1"
  23109. scope="async"
  23110. closure="4">
  23111. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23112. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23113. </parameter>
  23114. <parameter name="user_data"
  23115. transfer-ownership="none"
  23116. nullable="1"
  23117. allow-none="1"
  23118. closure="4">
  23119. <doc xml:space="preserve">user data to pass to @callback</doc>
  23120. <type name="gpointer" c:type="gpointer"/>
  23121. </parameter>
  23122. </parameters>
  23123. </virtual-method>
  23124. <virtual-method name="start_finish"
  23125. invoker="start_finish"
  23126. version="2.22"
  23127. throws="1">
  23128. <doc xml:space="preserve">Finishes starting a drive.</doc>
  23129. <return-value transfer-ownership="none">
  23130. <doc xml:space="preserve">%TRUE if the drive has been started successfully,
  23131. %FALSE otherwise.</doc>
  23132. <type name="gboolean" c:type="gboolean"/>
  23133. </return-value>
  23134. <parameters>
  23135. <instance-parameter name="drive" transfer-ownership="none">
  23136. <doc xml:space="preserve">a #GDrive.</doc>
  23137. <type name="Drive" c:type="GDrive*"/>
  23138. </instance-parameter>
  23139. <parameter name="result" transfer-ownership="none">
  23140. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23141. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23142. </parameter>
  23143. </parameters>
  23144. </virtual-method>
  23145. <virtual-method name="stop" invoker="stop" version="2.22">
  23146. <doc xml:space="preserve">Asynchronously stops a drive.
  23147. When the operation is finished, @callback will be called.
  23148. You can then call g_drive_stop_finish() to obtain the
  23149. result of the operation.</doc>
  23150. <return-value transfer-ownership="none">
  23151. <type name="none" c:type="void"/>
  23152. </return-value>
  23153. <parameters>
  23154. <instance-parameter name="drive" transfer-ownership="none">
  23155. <doc xml:space="preserve">a #GDrive.</doc>
  23156. <type name="Drive" c:type="GDrive*"/>
  23157. </instance-parameter>
  23158. <parameter name="flags" transfer-ownership="none">
  23159. <doc xml:space="preserve">flags affecting the unmount if required for stopping.</doc>
  23160. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  23161. </parameter>
  23162. <parameter name="mount_operation"
  23163. transfer-ownership="none"
  23164. nullable="1"
  23165. allow-none="1">
  23166. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  23167. user interaction.</doc>
  23168. <type name="MountOperation" c:type="GMountOperation*"/>
  23169. </parameter>
  23170. <parameter name="cancellable"
  23171. transfer-ownership="none"
  23172. nullable="1"
  23173. allow-none="1">
  23174. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23175. <type name="Cancellable" c:type="GCancellable*"/>
  23176. </parameter>
  23177. <parameter name="callback"
  23178. transfer-ownership="none"
  23179. nullable="1"
  23180. allow-none="1"
  23181. scope="async"
  23182. closure="4">
  23183. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23184. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23185. </parameter>
  23186. <parameter name="user_data"
  23187. transfer-ownership="none"
  23188. nullable="1"
  23189. allow-none="1"
  23190. closure="4">
  23191. <doc xml:space="preserve">user data to pass to @callback</doc>
  23192. <type name="gpointer" c:type="gpointer"/>
  23193. </parameter>
  23194. </parameters>
  23195. </virtual-method>
  23196. <virtual-method name="stop_button">
  23197. <return-value transfer-ownership="none">
  23198. <type name="none" c:type="void"/>
  23199. </return-value>
  23200. <parameters>
  23201. <instance-parameter name="drive" transfer-ownership="none">
  23202. <type name="Drive" c:type="GDrive*"/>
  23203. </instance-parameter>
  23204. </parameters>
  23205. </virtual-method>
  23206. <virtual-method name="stop_finish"
  23207. invoker="stop_finish"
  23208. version="2.22"
  23209. throws="1">
  23210. <doc xml:space="preserve">Finishes stopping a drive.</doc>
  23211. <return-value transfer-ownership="none">
  23212. <doc xml:space="preserve">%TRUE if the drive has been stopped successfully,
  23213. %FALSE otherwise.</doc>
  23214. <type name="gboolean" c:type="gboolean"/>
  23215. </return-value>
  23216. <parameters>
  23217. <instance-parameter name="drive" transfer-ownership="none">
  23218. <doc xml:space="preserve">a #GDrive.</doc>
  23219. <type name="Drive" c:type="GDrive*"/>
  23220. </instance-parameter>
  23221. <parameter name="result" transfer-ownership="none">
  23222. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23223. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23224. </parameter>
  23225. </parameters>
  23226. </virtual-method>
  23227. <method name="can_eject" c:identifier="g_drive_can_eject">
  23228. <doc xml:space="preserve">Checks if a drive can be ejected.</doc>
  23229. <return-value transfer-ownership="none">
  23230. <doc xml:space="preserve">%TRUE if the @drive can be ejected, %FALSE otherwise.</doc>
  23231. <type name="gboolean" c:type="gboolean"/>
  23232. </return-value>
  23233. <parameters>
  23234. <instance-parameter name="drive" transfer-ownership="none">
  23235. <doc xml:space="preserve">a #GDrive.</doc>
  23236. <type name="Drive" c:type="GDrive*"/>
  23237. </instance-parameter>
  23238. </parameters>
  23239. </method>
  23240. <method name="can_poll_for_media"
  23241. c:identifier="g_drive_can_poll_for_media">
  23242. <doc xml:space="preserve">Checks if a drive can be polled for media changes.</doc>
  23243. <return-value transfer-ownership="none">
  23244. <doc xml:space="preserve">%TRUE if the @drive can be polled for media changes,
  23245. %FALSE otherwise.</doc>
  23246. <type name="gboolean" c:type="gboolean"/>
  23247. </return-value>
  23248. <parameters>
  23249. <instance-parameter name="drive" transfer-ownership="none">
  23250. <doc xml:space="preserve">a #GDrive.</doc>
  23251. <type name="Drive" c:type="GDrive*"/>
  23252. </instance-parameter>
  23253. </parameters>
  23254. </method>
  23255. <method name="can_start" c:identifier="g_drive_can_start" version="2.22">
  23256. <doc xml:space="preserve">Checks if a drive can be started.</doc>
  23257. <return-value transfer-ownership="none">
  23258. <doc xml:space="preserve">%TRUE if the @drive can be started, %FALSE otherwise.</doc>
  23259. <type name="gboolean" c:type="gboolean"/>
  23260. </return-value>
  23261. <parameters>
  23262. <instance-parameter name="drive" transfer-ownership="none">
  23263. <doc xml:space="preserve">a #GDrive.</doc>
  23264. <type name="Drive" c:type="GDrive*"/>
  23265. </instance-parameter>
  23266. </parameters>
  23267. </method>
  23268. <method name="can_start_degraded"
  23269. c:identifier="g_drive_can_start_degraded"
  23270. version="2.22">
  23271. <doc xml:space="preserve">Checks if a drive can be started degraded.</doc>
  23272. <return-value transfer-ownership="none">
  23273. <doc xml:space="preserve">%TRUE if the @drive can be started degraded, %FALSE otherwise.</doc>
  23274. <type name="gboolean" c:type="gboolean"/>
  23275. </return-value>
  23276. <parameters>
  23277. <instance-parameter name="drive" transfer-ownership="none">
  23278. <doc xml:space="preserve">a #GDrive.</doc>
  23279. <type name="Drive" c:type="GDrive*"/>
  23280. </instance-parameter>
  23281. </parameters>
  23282. </method>
  23283. <method name="can_stop" c:identifier="g_drive_can_stop" version="2.22">
  23284. <doc xml:space="preserve">Checks if a drive can be stopped.</doc>
  23285. <return-value transfer-ownership="none">
  23286. <doc xml:space="preserve">%TRUE if the @drive can be stopped, %FALSE otherwise.</doc>
  23287. <type name="gboolean" c:type="gboolean"/>
  23288. </return-value>
  23289. <parameters>
  23290. <instance-parameter name="drive" transfer-ownership="none">
  23291. <doc xml:space="preserve">a #GDrive.</doc>
  23292. <type name="Drive" c:type="GDrive*"/>
  23293. </instance-parameter>
  23294. </parameters>
  23295. </method>
  23296. <method name="eject"
  23297. c:identifier="g_drive_eject"
  23298. deprecated="1"
  23299. deprecated-version="2.22">
  23300. <doc xml:space="preserve">Asynchronously ejects a drive.
  23301. When the operation is finished, @callback will be called.
  23302. You can then call g_drive_eject_finish() to obtain the
  23303. result of the operation.</doc>
  23304. <doc-deprecated xml:space="preserve">Use g_drive_eject_with_operation() instead.</doc-deprecated>
  23305. <return-value transfer-ownership="none">
  23306. <type name="none" c:type="void"/>
  23307. </return-value>
  23308. <parameters>
  23309. <instance-parameter name="drive" transfer-ownership="none">
  23310. <doc xml:space="preserve">a #GDrive.</doc>
  23311. <type name="Drive" c:type="GDrive*"/>
  23312. </instance-parameter>
  23313. <parameter name="flags" transfer-ownership="none">
  23314. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  23315. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  23316. </parameter>
  23317. <parameter name="cancellable"
  23318. transfer-ownership="none"
  23319. nullable="1"
  23320. allow-none="1">
  23321. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23322. <type name="Cancellable" c:type="GCancellable*"/>
  23323. </parameter>
  23324. <parameter name="callback"
  23325. transfer-ownership="none"
  23326. nullable="1"
  23327. allow-none="1"
  23328. scope="async"
  23329. closure="3">
  23330. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23331. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23332. </parameter>
  23333. <parameter name="user_data"
  23334. transfer-ownership="none"
  23335. nullable="1"
  23336. allow-none="1">
  23337. <doc xml:space="preserve">user data to pass to @callback</doc>
  23338. <type name="gpointer" c:type="gpointer"/>
  23339. </parameter>
  23340. </parameters>
  23341. </method>
  23342. <method name="eject_finish"
  23343. c:identifier="g_drive_eject_finish"
  23344. deprecated="1"
  23345. deprecated-version="2.22"
  23346. throws="1">
  23347. <doc xml:space="preserve">Finishes ejecting a drive.</doc>
  23348. <doc-deprecated xml:space="preserve">Use g_drive_eject_with_operation_finish() instead.</doc-deprecated>
  23349. <return-value transfer-ownership="none">
  23350. <doc xml:space="preserve">%TRUE if the drive has been ejected successfully,
  23351. %FALSE otherwise.</doc>
  23352. <type name="gboolean" c:type="gboolean"/>
  23353. </return-value>
  23354. <parameters>
  23355. <instance-parameter name="drive" transfer-ownership="none">
  23356. <doc xml:space="preserve">a #GDrive.</doc>
  23357. <type name="Drive" c:type="GDrive*"/>
  23358. </instance-parameter>
  23359. <parameter name="result" transfer-ownership="none">
  23360. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23361. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23362. </parameter>
  23363. </parameters>
  23364. </method>
  23365. <method name="eject_with_operation"
  23366. c:identifier="g_drive_eject_with_operation"
  23367. version="2.22">
  23368. <doc xml:space="preserve">Ejects a drive. This is an asynchronous operation, and is
  23369. finished by calling g_drive_eject_with_operation_finish() with the @drive
  23370. and #GAsyncResult data returned in the @callback.</doc>
  23371. <return-value transfer-ownership="none">
  23372. <type name="none" c:type="void"/>
  23373. </return-value>
  23374. <parameters>
  23375. <instance-parameter name="drive" transfer-ownership="none">
  23376. <doc xml:space="preserve">a #GDrive.</doc>
  23377. <type name="Drive" c:type="GDrive*"/>
  23378. </instance-parameter>
  23379. <parameter name="flags" transfer-ownership="none">
  23380. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  23381. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  23382. </parameter>
  23383. <parameter name="mount_operation"
  23384. transfer-ownership="none"
  23385. nullable="1"
  23386. allow-none="1">
  23387. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  23388. user interaction.</doc>
  23389. <type name="MountOperation" c:type="GMountOperation*"/>
  23390. </parameter>
  23391. <parameter name="cancellable"
  23392. transfer-ownership="none"
  23393. nullable="1"
  23394. allow-none="1">
  23395. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23396. <type name="Cancellable" c:type="GCancellable*"/>
  23397. </parameter>
  23398. <parameter name="callback"
  23399. transfer-ownership="none"
  23400. nullable="1"
  23401. allow-none="1"
  23402. scope="async"
  23403. closure="4">
  23404. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23405. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23406. </parameter>
  23407. <parameter name="user_data"
  23408. transfer-ownership="none"
  23409. nullable="1"
  23410. allow-none="1">
  23411. <doc xml:space="preserve">user data passed to @callback.</doc>
  23412. <type name="gpointer" c:type="gpointer"/>
  23413. </parameter>
  23414. </parameters>
  23415. </method>
  23416. <method name="eject_with_operation_finish"
  23417. c:identifier="g_drive_eject_with_operation_finish"
  23418. version="2.22"
  23419. throws="1">
  23420. <doc xml:space="preserve">Finishes ejecting a drive. If any errors occurred during the operation,
  23421. @error will be set to contain the errors and %FALSE will be returned.</doc>
  23422. <return-value transfer-ownership="none">
  23423. <doc xml:space="preserve">%TRUE if the drive was successfully ejected. %FALSE otherwise.</doc>
  23424. <type name="gboolean" c:type="gboolean"/>
  23425. </return-value>
  23426. <parameters>
  23427. <instance-parameter name="drive" transfer-ownership="none">
  23428. <doc xml:space="preserve">a #GDrive.</doc>
  23429. <type name="Drive" c:type="GDrive*"/>
  23430. </instance-parameter>
  23431. <parameter name="result" transfer-ownership="none">
  23432. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23433. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23434. </parameter>
  23435. </parameters>
  23436. </method>
  23437. <method name="enumerate_identifiers"
  23438. c:identifier="g_drive_enumerate_identifiers">
  23439. <doc xml:space="preserve">Gets the kinds of identifiers that @drive has.
  23440. Use g_drive_get_identifier() to obtain the identifiers
  23441. themselves.</doc>
  23442. <return-value transfer-ownership="full">
  23443. <doc xml:space="preserve">a %NULL-terminated
  23444. array of strings containing kinds of identifiers. Use g_strfreev()
  23445. to free.</doc>
  23446. <array c:type="char**">
  23447. <type name="utf8"/>
  23448. </array>
  23449. </return-value>
  23450. <parameters>
  23451. <instance-parameter name="drive" transfer-ownership="none">
  23452. <doc xml:space="preserve">a #GDrive</doc>
  23453. <type name="Drive" c:type="GDrive*"/>
  23454. </instance-parameter>
  23455. </parameters>
  23456. </method>
  23457. <method name="get_icon" c:identifier="g_drive_get_icon">
  23458. <doc xml:space="preserve">Gets the icon for @drive.</doc>
  23459. <return-value transfer-ownership="full">
  23460. <doc xml:space="preserve">#GIcon for the @drive.
  23461. Free the returned object with g_object_unref().</doc>
  23462. <type name="Icon" c:type="GIcon*"/>
  23463. </return-value>
  23464. <parameters>
  23465. <instance-parameter name="drive" transfer-ownership="none">
  23466. <doc xml:space="preserve">a #GDrive.</doc>
  23467. <type name="Drive" c:type="GDrive*"/>
  23468. </instance-parameter>
  23469. </parameters>
  23470. </method>
  23471. <method name="get_identifier" c:identifier="g_drive_get_identifier">
  23472. <doc xml:space="preserve">Gets the identifier of the given kind for @drive.</doc>
  23473. <return-value transfer-ownership="full">
  23474. <doc xml:space="preserve">a newly allocated string containing the
  23475. requested identfier, or %NULL if the #GDrive
  23476. doesn't have this kind of identifier.</doc>
  23477. <type name="utf8" c:type="char*"/>
  23478. </return-value>
  23479. <parameters>
  23480. <instance-parameter name="drive" transfer-ownership="none">
  23481. <doc xml:space="preserve">a #GDrive</doc>
  23482. <type name="Drive" c:type="GDrive*"/>
  23483. </instance-parameter>
  23484. <parameter name="kind" transfer-ownership="none">
  23485. <doc xml:space="preserve">the kind of identifier to return</doc>
  23486. <type name="utf8" c:type="const char*"/>
  23487. </parameter>
  23488. </parameters>
  23489. </method>
  23490. <method name="get_name" c:identifier="g_drive_get_name">
  23491. <doc xml:space="preserve">Gets the name of @drive.</doc>
  23492. <return-value transfer-ownership="full">
  23493. <doc xml:space="preserve">a string containing @drive's name. The returned
  23494. string should be freed when no longer needed.</doc>
  23495. <type name="utf8" c:type="char*"/>
  23496. </return-value>
  23497. <parameters>
  23498. <instance-parameter name="drive" transfer-ownership="none">
  23499. <doc xml:space="preserve">a #GDrive.</doc>
  23500. <type name="Drive" c:type="GDrive*"/>
  23501. </instance-parameter>
  23502. </parameters>
  23503. </method>
  23504. <method name="get_sort_key"
  23505. c:identifier="g_drive_get_sort_key"
  23506. version="2.32">
  23507. <doc xml:space="preserve">Gets the sort key for @drive, if any.</doc>
  23508. <return-value transfer-ownership="none">
  23509. <doc xml:space="preserve">Sorting key for @drive or %NULL if no such key is available.</doc>
  23510. <type name="utf8" c:type="const gchar*"/>
  23511. </return-value>
  23512. <parameters>
  23513. <instance-parameter name="drive" transfer-ownership="none">
  23514. <doc xml:space="preserve">A #GDrive.</doc>
  23515. <type name="Drive" c:type="GDrive*"/>
  23516. </instance-parameter>
  23517. </parameters>
  23518. </method>
  23519. <method name="get_start_stop_type"
  23520. c:identifier="g_drive_get_start_stop_type"
  23521. version="2.22">
  23522. <doc xml:space="preserve">Gets a hint about how a drive can be started/stopped.</doc>
  23523. <return-value transfer-ownership="none">
  23524. <doc xml:space="preserve">A value from the #GDriveStartStopType enumeration.</doc>
  23525. <type name="DriveStartStopType" c:type="GDriveStartStopType"/>
  23526. </return-value>
  23527. <parameters>
  23528. <instance-parameter name="drive" transfer-ownership="none">
  23529. <doc xml:space="preserve">a #GDrive.</doc>
  23530. <type name="Drive" c:type="GDrive*"/>
  23531. </instance-parameter>
  23532. </parameters>
  23533. </method>
  23534. <method name="get_symbolic_icon"
  23535. c:identifier="g_drive_get_symbolic_icon"
  23536. version="2.34">
  23537. <doc xml:space="preserve">Gets the icon for @drive.</doc>
  23538. <return-value transfer-ownership="full">
  23539. <doc xml:space="preserve">symbolic #GIcon for the @drive.
  23540. Free the returned object with g_object_unref().</doc>
  23541. <type name="Icon" c:type="GIcon*"/>
  23542. </return-value>
  23543. <parameters>
  23544. <instance-parameter name="drive" transfer-ownership="none">
  23545. <doc xml:space="preserve">a #GDrive.</doc>
  23546. <type name="Drive" c:type="GDrive*"/>
  23547. </instance-parameter>
  23548. </parameters>
  23549. </method>
  23550. <method name="get_volumes" c:identifier="g_drive_get_volumes">
  23551. <doc xml:space="preserve">Get a list of mountable volumes for @drive.
  23552. The returned list should be freed with g_list_free(), after
  23553. its elements have been unreffed with g_object_unref().</doc>
  23554. <return-value transfer-ownership="full">
  23555. <doc xml:space="preserve">#GList containing any #GVolume objects on the given @drive.</doc>
  23556. <type name="GLib.List" c:type="GList*">
  23557. <type name="Volume"/>
  23558. </type>
  23559. </return-value>
  23560. <parameters>
  23561. <instance-parameter name="drive" transfer-ownership="none">
  23562. <doc xml:space="preserve">a #GDrive.</doc>
  23563. <type name="Drive" c:type="GDrive*"/>
  23564. </instance-parameter>
  23565. </parameters>
  23566. </method>
  23567. <method name="has_media" c:identifier="g_drive_has_media">
  23568. <doc xml:space="preserve">Checks if the @drive has media. Note that the OS may not be polling
  23569. the drive for media changes; see g_drive_is_media_check_automatic()
  23570. for more details.</doc>
  23571. <return-value transfer-ownership="none">
  23572. <doc xml:space="preserve">%TRUE if @drive has media, %FALSE otherwise.</doc>
  23573. <type name="gboolean" c:type="gboolean"/>
  23574. </return-value>
  23575. <parameters>
  23576. <instance-parameter name="drive" transfer-ownership="none">
  23577. <doc xml:space="preserve">a #GDrive.</doc>
  23578. <type name="Drive" c:type="GDrive*"/>
  23579. </instance-parameter>
  23580. </parameters>
  23581. </method>
  23582. <method name="has_volumes" c:identifier="g_drive_has_volumes">
  23583. <doc xml:space="preserve">Check if @drive has any mountable volumes.</doc>
  23584. <return-value transfer-ownership="none">
  23585. <doc xml:space="preserve">%TRUE if the @drive contains volumes, %FALSE otherwise.</doc>
  23586. <type name="gboolean" c:type="gboolean"/>
  23587. </return-value>
  23588. <parameters>
  23589. <instance-parameter name="drive" transfer-ownership="none">
  23590. <doc xml:space="preserve">a #GDrive.</doc>
  23591. <type name="Drive" c:type="GDrive*"/>
  23592. </instance-parameter>
  23593. </parameters>
  23594. </method>
  23595. <method name="is_media_check_automatic"
  23596. c:identifier="g_drive_is_media_check_automatic">
  23597. <doc xml:space="preserve">Checks if @drive is capabable of automatically detecting media changes.</doc>
  23598. <return-value transfer-ownership="none">
  23599. <doc xml:space="preserve">%TRUE if the @drive is capabable of automatically detecting
  23600. media changes, %FALSE otherwise.</doc>
  23601. <type name="gboolean" c:type="gboolean"/>
  23602. </return-value>
  23603. <parameters>
  23604. <instance-parameter name="drive" transfer-ownership="none">
  23605. <doc xml:space="preserve">a #GDrive.</doc>
  23606. <type name="Drive" c:type="GDrive*"/>
  23607. </instance-parameter>
  23608. </parameters>
  23609. </method>
  23610. <method name="is_media_removable"
  23611. c:identifier="g_drive_is_media_removable">
  23612. <doc xml:space="preserve">Checks if the @drive supports removable media.</doc>
  23613. <return-value transfer-ownership="none">
  23614. <doc xml:space="preserve">%TRUE if @drive supports removable media, %FALSE otherwise.</doc>
  23615. <type name="gboolean" c:type="gboolean"/>
  23616. </return-value>
  23617. <parameters>
  23618. <instance-parameter name="drive" transfer-ownership="none">
  23619. <doc xml:space="preserve">a #GDrive.</doc>
  23620. <type name="Drive" c:type="GDrive*"/>
  23621. </instance-parameter>
  23622. </parameters>
  23623. </method>
  23624. <method name="poll_for_media" c:identifier="g_drive_poll_for_media">
  23625. <doc xml:space="preserve">Asynchronously polls @drive to see if media has been inserted or removed.
  23626. When the operation is finished, @callback will be called.
  23627. You can then call g_drive_poll_for_media_finish() to obtain the
  23628. result of the operation.</doc>
  23629. <return-value transfer-ownership="none">
  23630. <type name="none" c:type="void"/>
  23631. </return-value>
  23632. <parameters>
  23633. <instance-parameter name="drive" transfer-ownership="none">
  23634. <doc xml:space="preserve">a #GDrive.</doc>
  23635. <type name="Drive" c:type="GDrive*"/>
  23636. </instance-parameter>
  23637. <parameter name="cancellable"
  23638. transfer-ownership="none"
  23639. nullable="1"
  23640. allow-none="1">
  23641. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23642. <type name="Cancellable" c:type="GCancellable*"/>
  23643. </parameter>
  23644. <parameter name="callback"
  23645. transfer-ownership="none"
  23646. nullable="1"
  23647. allow-none="1"
  23648. scope="async"
  23649. closure="2">
  23650. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23651. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23652. </parameter>
  23653. <parameter name="user_data"
  23654. transfer-ownership="none"
  23655. nullable="1"
  23656. allow-none="1">
  23657. <doc xml:space="preserve">user data to pass to @callback</doc>
  23658. <type name="gpointer" c:type="gpointer"/>
  23659. </parameter>
  23660. </parameters>
  23661. </method>
  23662. <method name="poll_for_media_finish"
  23663. c:identifier="g_drive_poll_for_media_finish"
  23664. throws="1">
  23665. <doc xml:space="preserve">Finishes an operation started with g_drive_poll_for_media() on a drive.</doc>
  23666. <return-value transfer-ownership="none">
  23667. <doc xml:space="preserve">%TRUE if the drive has been poll_for_mediaed successfully,
  23668. %FALSE otherwise.</doc>
  23669. <type name="gboolean" c:type="gboolean"/>
  23670. </return-value>
  23671. <parameters>
  23672. <instance-parameter name="drive" transfer-ownership="none">
  23673. <doc xml:space="preserve">a #GDrive.</doc>
  23674. <type name="Drive" c:type="GDrive*"/>
  23675. </instance-parameter>
  23676. <parameter name="result" transfer-ownership="none">
  23677. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23678. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23679. </parameter>
  23680. </parameters>
  23681. </method>
  23682. <method name="start" c:identifier="g_drive_start" version="2.22">
  23683. <doc xml:space="preserve">Asynchronously starts a drive.
  23684. When the operation is finished, @callback will be called.
  23685. You can then call g_drive_start_finish() to obtain the
  23686. result of the operation.</doc>
  23687. <return-value transfer-ownership="none">
  23688. <type name="none" c:type="void"/>
  23689. </return-value>
  23690. <parameters>
  23691. <instance-parameter name="drive" transfer-ownership="none">
  23692. <doc xml:space="preserve">a #GDrive.</doc>
  23693. <type name="Drive" c:type="GDrive*"/>
  23694. </instance-parameter>
  23695. <parameter name="flags" transfer-ownership="none">
  23696. <doc xml:space="preserve">flags affecting the start operation.</doc>
  23697. <type name="DriveStartFlags" c:type="GDriveStartFlags"/>
  23698. </parameter>
  23699. <parameter name="mount_operation"
  23700. transfer-ownership="none"
  23701. nullable="1"
  23702. allow-none="1">
  23703. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  23704. user interaction.</doc>
  23705. <type name="MountOperation" c:type="GMountOperation*"/>
  23706. </parameter>
  23707. <parameter name="cancellable"
  23708. transfer-ownership="none"
  23709. nullable="1"
  23710. allow-none="1">
  23711. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23712. <type name="Cancellable" c:type="GCancellable*"/>
  23713. </parameter>
  23714. <parameter name="callback"
  23715. transfer-ownership="none"
  23716. nullable="1"
  23717. allow-none="1"
  23718. scope="async"
  23719. closure="4">
  23720. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23721. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23722. </parameter>
  23723. <parameter name="user_data"
  23724. transfer-ownership="none"
  23725. nullable="1"
  23726. allow-none="1">
  23727. <doc xml:space="preserve">user data to pass to @callback</doc>
  23728. <type name="gpointer" c:type="gpointer"/>
  23729. </parameter>
  23730. </parameters>
  23731. </method>
  23732. <method name="start_finish"
  23733. c:identifier="g_drive_start_finish"
  23734. version="2.22"
  23735. throws="1">
  23736. <doc xml:space="preserve">Finishes starting a drive.</doc>
  23737. <return-value transfer-ownership="none">
  23738. <doc xml:space="preserve">%TRUE if the drive has been started successfully,
  23739. %FALSE otherwise.</doc>
  23740. <type name="gboolean" c:type="gboolean"/>
  23741. </return-value>
  23742. <parameters>
  23743. <instance-parameter name="drive" transfer-ownership="none">
  23744. <doc xml:space="preserve">a #GDrive.</doc>
  23745. <type name="Drive" c:type="GDrive*"/>
  23746. </instance-parameter>
  23747. <parameter name="result" transfer-ownership="none">
  23748. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23749. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23750. </parameter>
  23751. </parameters>
  23752. </method>
  23753. <method name="stop" c:identifier="g_drive_stop" version="2.22">
  23754. <doc xml:space="preserve">Asynchronously stops a drive.
  23755. When the operation is finished, @callback will be called.
  23756. You can then call g_drive_stop_finish() to obtain the
  23757. result of the operation.</doc>
  23758. <return-value transfer-ownership="none">
  23759. <type name="none" c:type="void"/>
  23760. </return-value>
  23761. <parameters>
  23762. <instance-parameter name="drive" transfer-ownership="none">
  23763. <doc xml:space="preserve">a #GDrive.</doc>
  23764. <type name="Drive" c:type="GDrive*"/>
  23765. </instance-parameter>
  23766. <parameter name="flags" transfer-ownership="none">
  23767. <doc xml:space="preserve">flags affecting the unmount if required for stopping.</doc>
  23768. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  23769. </parameter>
  23770. <parameter name="mount_operation"
  23771. transfer-ownership="none"
  23772. nullable="1"
  23773. allow-none="1">
  23774. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  23775. user interaction.</doc>
  23776. <type name="MountOperation" c:type="GMountOperation*"/>
  23777. </parameter>
  23778. <parameter name="cancellable"
  23779. transfer-ownership="none"
  23780. nullable="1"
  23781. allow-none="1">
  23782. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  23783. <type name="Cancellable" c:type="GCancellable*"/>
  23784. </parameter>
  23785. <parameter name="callback"
  23786. transfer-ownership="none"
  23787. nullable="1"
  23788. allow-none="1"
  23789. scope="async"
  23790. closure="4">
  23791. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  23792. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  23793. </parameter>
  23794. <parameter name="user_data"
  23795. transfer-ownership="none"
  23796. nullable="1"
  23797. allow-none="1">
  23798. <doc xml:space="preserve">user data to pass to @callback</doc>
  23799. <type name="gpointer" c:type="gpointer"/>
  23800. </parameter>
  23801. </parameters>
  23802. </method>
  23803. <method name="stop_finish"
  23804. c:identifier="g_drive_stop_finish"
  23805. version="2.22"
  23806. throws="1">
  23807. <doc xml:space="preserve">Finishes stopping a drive.</doc>
  23808. <return-value transfer-ownership="none">
  23809. <doc xml:space="preserve">%TRUE if the drive has been stopped successfully,
  23810. %FALSE otherwise.</doc>
  23811. <type name="gboolean" c:type="gboolean"/>
  23812. </return-value>
  23813. <parameters>
  23814. <instance-parameter name="drive" transfer-ownership="none">
  23815. <doc xml:space="preserve">a #GDrive.</doc>
  23816. <type name="Drive" c:type="GDrive*"/>
  23817. </instance-parameter>
  23818. <parameter name="result" transfer-ownership="none">
  23819. <doc xml:space="preserve">a #GAsyncResult.</doc>
  23820. <type name="AsyncResult" c:type="GAsyncResult*"/>
  23821. </parameter>
  23822. </parameters>
  23823. </method>
  23824. <glib:signal name="changed" when="last">
  23825. <doc xml:space="preserve">Emitted when the drive's state has changed.</doc>
  23826. <return-value transfer-ownership="none">
  23827. <type name="none" c:type="void"/>
  23828. </return-value>
  23829. </glib:signal>
  23830. <glib:signal name="disconnected" when="last">
  23831. <doc xml:space="preserve">This signal is emitted when the #GDrive have been
  23832. disconnected. If the recipient is holding references to the
  23833. object they should release them so the object can be
  23834. finalized.</doc>
  23835. <return-value transfer-ownership="none">
  23836. <type name="none" c:type="void"/>
  23837. </return-value>
  23838. </glib:signal>
  23839. <glib:signal name="eject-button" when="last">
  23840. <doc xml:space="preserve">Emitted when the physical eject button (if any) of a drive has
  23841. been pressed.</doc>
  23842. <return-value transfer-ownership="none">
  23843. <type name="none" c:type="void"/>
  23844. </return-value>
  23845. </glib:signal>
  23846. <glib:signal name="stop-button" when="last" version="2.22">
  23847. <doc xml:space="preserve">Emitted when the physical stop button (if any) of a drive has
  23848. been pressed.</doc>
  23849. <return-value transfer-ownership="none">
  23850. <type name="none" c:type="void"/>
  23851. </return-value>
  23852. </glib:signal>
  23853. </interface>
  23854. <record name="DriveIface"
  23855. c:type="GDriveIface"
  23856. glib:is-gtype-struct-for="Drive">
  23857. <doc xml:space="preserve">Interface for creating #GDrive implementations.</doc>
  23858. <field name="g_iface">
  23859. <doc xml:space="preserve">The parent interface.</doc>
  23860. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  23861. </field>
  23862. <field name="changed">
  23863. <callback name="changed">
  23864. <return-value transfer-ownership="none">
  23865. <type name="none" c:type="void"/>
  23866. </return-value>
  23867. <parameters>
  23868. <parameter name="drive" transfer-ownership="none">
  23869. <type name="Drive" c:type="GDrive*"/>
  23870. </parameter>
  23871. </parameters>
  23872. </callback>
  23873. </field>
  23874. <field name="disconnected">
  23875. <callback name="disconnected">
  23876. <return-value transfer-ownership="none">
  23877. <type name="none" c:type="void"/>
  23878. </return-value>
  23879. <parameters>
  23880. <parameter name="drive" transfer-ownership="none">
  23881. <type name="Drive" c:type="GDrive*"/>
  23882. </parameter>
  23883. </parameters>
  23884. </callback>
  23885. </field>
  23886. <field name="eject_button">
  23887. <callback name="eject_button">
  23888. <return-value transfer-ownership="none">
  23889. <type name="none" c:type="void"/>
  23890. </return-value>
  23891. <parameters>
  23892. <parameter name="drive" transfer-ownership="none">
  23893. <type name="Drive" c:type="GDrive*"/>
  23894. </parameter>
  23895. </parameters>
  23896. </callback>
  23897. </field>
  23898. <field name="get_name">
  23899. <callback name="get_name">
  23900. <return-value transfer-ownership="full">
  23901. <doc xml:space="preserve">a string containing @drive's name. The returned
  23902. string should be freed when no longer needed.</doc>
  23903. <type name="utf8" c:type="char*"/>
  23904. </return-value>
  23905. <parameters>
  23906. <parameter name="drive" transfer-ownership="none">
  23907. <doc xml:space="preserve">a #GDrive.</doc>
  23908. <type name="Drive" c:type="GDrive*"/>
  23909. </parameter>
  23910. </parameters>
  23911. </callback>
  23912. </field>
  23913. <field name="get_icon">
  23914. <callback name="get_icon">
  23915. <return-value transfer-ownership="full">
  23916. <doc xml:space="preserve">#GIcon for the @drive.
  23917. Free the returned object with g_object_unref().</doc>
  23918. <type name="Icon" c:type="GIcon*"/>
  23919. </return-value>
  23920. <parameters>
  23921. <parameter name="drive" transfer-ownership="none">
  23922. <doc xml:space="preserve">a #GDrive.</doc>
  23923. <type name="Drive" c:type="GDrive*"/>
  23924. </parameter>
  23925. </parameters>
  23926. </callback>
  23927. </field>
  23928. <field name="has_volumes">
  23929. <callback name="has_volumes">
  23930. <return-value transfer-ownership="none">
  23931. <doc xml:space="preserve">%TRUE if the @drive contains volumes, %FALSE otherwise.</doc>
  23932. <type name="gboolean" c:type="gboolean"/>
  23933. </return-value>
  23934. <parameters>
  23935. <parameter name="drive" transfer-ownership="none">
  23936. <doc xml:space="preserve">a #GDrive.</doc>
  23937. <type name="Drive" c:type="GDrive*"/>
  23938. </parameter>
  23939. </parameters>
  23940. </callback>
  23941. </field>
  23942. <field name="get_volumes">
  23943. <callback name="get_volumes">
  23944. <return-value transfer-ownership="full">
  23945. <doc xml:space="preserve">#GList containing any #GVolume objects on the given @drive.</doc>
  23946. <type name="GLib.List" c:type="GList*">
  23947. <type name="Volume"/>
  23948. </type>
  23949. </return-value>
  23950. <parameters>
  23951. <parameter name="drive" transfer-ownership="none">
  23952. <doc xml:space="preserve">a #GDrive.</doc>
  23953. <type name="Drive" c:type="GDrive*"/>
  23954. </parameter>
  23955. </parameters>
  23956. </callback>
  23957. </field>
  23958. <field name="is_media_removable">
  23959. <callback name="is_media_removable">
  23960. <return-value transfer-ownership="none">
  23961. <doc xml:space="preserve">%TRUE if @drive supports removable media, %FALSE otherwise.</doc>
  23962. <type name="gboolean" c:type="gboolean"/>
  23963. </return-value>
  23964. <parameters>
  23965. <parameter name="drive" transfer-ownership="none">
  23966. <doc xml:space="preserve">a #GDrive.</doc>
  23967. <type name="Drive" c:type="GDrive*"/>
  23968. </parameter>
  23969. </parameters>
  23970. </callback>
  23971. </field>
  23972. <field name="has_media">
  23973. <callback name="has_media">
  23974. <return-value transfer-ownership="none">
  23975. <doc xml:space="preserve">%TRUE if @drive has media, %FALSE otherwise.</doc>
  23976. <type name="gboolean" c:type="gboolean"/>
  23977. </return-value>
  23978. <parameters>
  23979. <parameter name="drive" transfer-ownership="none">
  23980. <doc xml:space="preserve">a #GDrive.</doc>
  23981. <type name="Drive" c:type="GDrive*"/>
  23982. </parameter>
  23983. </parameters>
  23984. </callback>
  23985. </field>
  23986. <field name="is_media_check_automatic">
  23987. <callback name="is_media_check_automatic">
  23988. <return-value transfer-ownership="none">
  23989. <doc xml:space="preserve">%TRUE if the @drive is capabable of automatically detecting
  23990. media changes, %FALSE otherwise.</doc>
  23991. <type name="gboolean" c:type="gboolean"/>
  23992. </return-value>
  23993. <parameters>
  23994. <parameter name="drive" transfer-ownership="none">
  23995. <doc xml:space="preserve">a #GDrive.</doc>
  23996. <type name="Drive" c:type="GDrive*"/>
  23997. </parameter>
  23998. </parameters>
  23999. </callback>
  24000. </field>
  24001. <field name="can_eject">
  24002. <callback name="can_eject">
  24003. <return-value transfer-ownership="none">
  24004. <doc xml:space="preserve">%TRUE if the @drive can be ejected, %FALSE otherwise.</doc>
  24005. <type name="gboolean" c:type="gboolean"/>
  24006. </return-value>
  24007. <parameters>
  24008. <parameter name="drive" transfer-ownership="none">
  24009. <doc xml:space="preserve">a #GDrive.</doc>
  24010. <type name="Drive" c:type="GDrive*"/>
  24011. </parameter>
  24012. </parameters>
  24013. </callback>
  24014. </field>
  24015. <field name="can_poll_for_media">
  24016. <callback name="can_poll_for_media">
  24017. <return-value transfer-ownership="none">
  24018. <doc xml:space="preserve">%TRUE if the @drive can be polled for media changes,
  24019. %FALSE otherwise.</doc>
  24020. <type name="gboolean" c:type="gboolean"/>
  24021. </return-value>
  24022. <parameters>
  24023. <parameter name="drive" transfer-ownership="none">
  24024. <doc xml:space="preserve">a #GDrive.</doc>
  24025. <type name="Drive" c:type="GDrive*"/>
  24026. </parameter>
  24027. </parameters>
  24028. </callback>
  24029. </field>
  24030. <field name="eject">
  24031. <callback name="eject">
  24032. <return-value transfer-ownership="none">
  24033. <type name="none" c:type="void"/>
  24034. </return-value>
  24035. <parameters>
  24036. <parameter name="drive" transfer-ownership="none">
  24037. <doc xml:space="preserve">a #GDrive.</doc>
  24038. <type name="Drive" c:type="GDrive*"/>
  24039. </parameter>
  24040. <parameter name="flags" transfer-ownership="none">
  24041. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  24042. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  24043. </parameter>
  24044. <parameter name="cancellable"
  24045. transfer-ownership="none"
  24046. nullable="1"
  24047. allow-none="1">
  24048. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  24049. <type name="Cancellable" c:type="GCancellable*"/>
  24050. </parameter>
  24051. <parameter name="callback"
  24052. transfer-ownership="none"
  24053. nullable="1"
  24054. allow-none="1"
  24055. scope="async"
  24056. closure="4">
  24057. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  24058. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  24059. </parameter>
  24060. <parameter name="user_data"
  24061. transfer-ownership="none"
  24062. nullable="1"
  24063. allow-none="1"
  24064. closure="4">
  24065. <doc xml:space="preserve">user data to pass to @callback</doc>
  24066. <type name="gpointer" c:type="gpointer"/>
  24067. </parameter>
  24068. </parameters>
  24069. </callback>
  24070. </field>
  24071. <field name="eject_finish">
  24072. <callback name="eject_finish" throws="1">
  24073. <return-value transfer-ownership="none">
  24074. <doc xml:space="preserve">%TRUE if the drive has been ejected successfully,
  24075. %FALSE otherwise.</doc>
  24076. <type name="gboolean" c:type="gboolean"/>
  24077. </return-value>
  24078. <parameters>
  24079. <parameter name="drive" transfer-ownership="none">
  24080. <doc xml:space="preserve">a #GDrive.</doc>
  24081. <type name="Drive" c:type="GDrive*"/>
  24082. </parameter>
  24083. <parameter name="result" transfer-ownership="none">
  24084. <doc xml:space="preserve">a #GAsyncResult.</doc>
  24085. <type name="AsyncResult" c:type="GAsyncResult*"/>
  24086. </parameter>
  24087. </parameters>
  24088. </callback>
  24089. </field>
  24090. <field name="poll_for_media">
  24091. <callback name="poll_for_media">
  24092. <return-value transfer-ownership="none">
  24093. <type name="none" c:type="void"/>
  24094. </return-value>
  24095. <parameters>
  24096. <parameter name="drive" transfer-ownership="none">
  24097. <doc xml:space="preserve">a #GDrive.</doc>
  24098. <type name="Drive" c:type="GDrive*"/>
  24099. </parameter>
  24100. <parameter name="cancellable"
  24101. transfer-ownership="none"
  24102. nullable="1"
  24103. allow-none="1">
  24104. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  24105. <type name="Cancellable" c:type="GCancellable*"/>
  24106. </parameter>
  24107. <parameter name="callback"
  24108. transfer-ownership="none"
  24109. nullable="1"
  24110. allow-none="1"
  24111. scope="async"
  24112. closure="3">
  24113. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  24114. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  24115. </parameter>
  24116. <parameter name="user_data"
  24117. transfer-ownership="none"
  24118. nullable="1"
  24119. allow-none="1"
  24120. closure="3">
  24121. <doc xml:space="preserve">user data to pass to @callback</doc>
  24122. <type name="gpointer" c:type="gpointer"/>
  24123. </parameter>
  24124. </parameters>
  24125. </callback>
  24126. </field>
  24127. <field name="poll_for_media_finish">
  24128. <callback name="poll_for_media_finish" throws="1">
  24129. <return-value transfer-ownership="none">
  24130. <doc xml:space="preserve">%TRUE if the drive has been poll_for_mediaed successfully,
  24131. %FALSE otherwise.</doc>
  24132. <type name="gboolean" c:type="gboolean"/>
  24133. </return-value>
  24134. <parameters>
  24135. <parameter name="drive" transfer-ownership="none">
  24136. <doc xml:space="preserve">a #GDrive.</doc>
  24137. <type name="Drive" c:type="GDrive*"/>
  24138. </parameter>
  24139. <parameter name="result" transfer-ownership="none">
  24140. <doc xml:space="preserve">a #GAsyncResult.</doc>
  24141. <type name="AsyncResult" c:type="GAsyncResult*"/>
  24142. </parameter>
  24143. </parameters>
  24144. </callback>
  24145. </field>
  24146. <field name="get_identifier">
  24147. <callback name="get_identifier">
  24148. <return-value transfer-ownership="full">
  24149. <doc xml:space="preserve">a newly allocated string containing the
  24150. requested identfier, or %NULL if the #GDrive
  24151. doesn't have this kind of identifier.</doc>
  24152. <type name="utf8" c:type="char*"/>
  24153. </return-value>
  24154. <parameters>
  24155. <parameter name="drive" transfer-ownership="none">
  24156. <doc xml:space="preserve">a #GDrive</doc>
  24157. <type name="Drive" c:type="GDrive*"/>
  24158. </parameter>
  24159. <parameter name="kind" transfer-ownership="none">
  24160. <doc xml:space="preserve">the kind of identifier to return</doc>
  24161. <type name="utf8" c:type="const char*"/>
  24162. </parameter>
  24163. </parameters>
  24164. </callback>
  24165. </field>
  24166. <field name="enumerate_identifiers">
  24167. <callback name="enumerate_identifiers">
  24168. <return-value transfer-ownership="full">
  24169. <doc xml:space="preserve">a %NULL-terminated
  24170. array of strings containing kinds of identifiers. Use g_strfreev()
  24171. to free.</doc>
  24172. <array c:type="char**">
  24173. <type name="utf8"/>
  24174. </array>
  24175. </return-value>
  24176. <parameters>
  24177. <parameter name="drive" transfer-ownership="none">
  24178. <doc xml:space="preserve">a #GDrive</doc>
  24179. <type name="Drive" c:type="GDrive*"/>
  24180. </parameter>
  24181. </parameters>
  24182. </callback>
  24183. </field>
  24184. <field name="get_start_stop_type">
  24185. <callback name="get_start_stop_type">
  24186. <return-value transfer-ownership="none">
  24187. <doc xml:space="preserve">A value from the #GDriveStartStopType enumeration.</doc>
  24188. <type name="DriveStartStopType" c:type="GDriveStartStopType"/>
  24189. </return-value>
  24190. <parameters>
  24191. <parameter name="drive" transfer-ownership="none">
  24192. <doc xml:space="preserve">a #GDrive.</doc>
  24193. <type name="Drive" c:type="GDrive*"/>
  24194. </parameter>
  24195. </parameters>
  24196. </callback>
  24197. </field>
  24198. <field name="can_start">
  24199. <callback name="can_start">
  24200. <return-value transfer-ownership="none">
  24201. <doc xml:space="preserve">%TRUE if the @drive can be started, %FALSE otherwise.</doc>
  24202. <type name="gboolean" c:type="gboolean"/>
  24203. </return-value>
  24204. <parameters>
  24205. <parameter name="drive" transfer-ownership="none">
  24206. <doc xml:space="preserve">a #GDrive.</doc>
  24207. <type name="Drive" c:type="GDrive*"/>
  24208. </parameter>
  24209. </parameters>
  24210. </callback>
  24211. </field>
  24212. <field name="can_start_degraded">
  24213. <callback name="can_start_degraded">
  24214. <return-value transfer-ownership="none">
  24215. <doc xml:space="preserve">%TRUE if the @drive can be started degraded, %FALSE otherwise.</doc>
  24216. <type name="gboolean" c:type="gboolean"/>
  24217. </return-value>
  24218. <parameters>
  24219. <parameter name="drive" transfer-ownership="none">
  24220. <doc xml:space="preserve">a #GDrive.</doc>
  24221. <type name="Drive" c:type="GDrive*"/>
  24222. </parameter>
  24223. </parameters>
  24224. </callback>
  24225. </field>
  24226. <field name="start">
  24227. <callback name="start">
  24228. <return-value transfer-ownership="none">
  24229. <type name="none" c:type="void"/>
  24230. </return-value>
  24231. <parameters>
  24232. <parameter name="drive" transfer-ownership="none">
  24233. <doc xml:space="preserve">a #GDrive.</doc>
  24234. <type name="Drive" c:type="GDrive*"/>
  24235. </parameter>
  24236. <parameter name="flags" transfer-ownership="none">
  24237. <doc xml:space="preserve">flags affecting the start operation.</doc>
  24238. <type name="DriveStartFlags" c:type="GDriveStartFlags"/>
  24239. </parameter>
  24240. <parameter name="mount_operation"
  24241. transfer-ownership="none"
  24242. nullable="1"
  24243. allow-none="1">
  24244. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  24245. user interaction.</doc>
  24246. <type name="MountOperation" c:type="GMountOperation*"/>
  24247. </parameter>
  24248. <parameter name="cancellable"
  24249. transfer-ownership="none"
  24250. nullable="1"
  24251. allow-none="1">
  24252. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  24253. <type name="Cancellable" c:type="GCancellable*"/>
  24254. </parameter>
  24255. <parameter name="callback"
  24256. transfer-ownership="none"
  24257. nullable="1"
  24258. allow-none="1"
  24259. scope="async"
  24260. closure="5">
  24261. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  24262. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  24263. </parameter>
  24264. <parameter name="user_data"
  24265. transfer-ownership="none"
  24266. nullable="1"
  24267. allow-none="1"
  24268. closure="5">
  24269. <doc xml:space="preserve">user data to pass to @callback</doc>
  24270. <type name="gpointer" c:type="gpointer"/>
  24271. </parameter>
  24272. </parameters>
  24273. </callback>
  24274. </field>
  24275. <field name="start_finish">
  24276. <callback name="start_finish" throws="1">
  24277. <return-value transfer-ownership="none">
  24278. <doc xml:space="preserve">%TRUE if the drive has been started successfully,
  24279. %FALSE otherwise.</doc>
  24280. <type name="gboolean" c:type="gboolean"/>
  24281. </return-value>
  24282. <parameters>
  24283. <parameter name="drive" transfer-ownership="none">
  24284. <doc xml:space="preserve">a #GDrive.</doc>
  24285. <type name="Drive" c:type="GDrive*"/>
  24286. </parameter>
  24287. <parameter name="result" transfer-ownership="none">
  24288. <doc xml:space="preserve">a #GAsyncResult.</doc>
  24289. <type name="AsyncResult" c:type="GAsyncResult*"/>
  24290. </parameter>
  24291. </parameters>
  24292. </callback>
  24293. </field>
  24294. <field name="can_stop">
  24295. <callback name="can_stop">
  24296. <return-value transfer-ownership="none">
  24297. <doc xml:space="preserve">%TRUE if the @drive can be stopped, %FALSE otherwise.</doc>
  24298. <type name="gboolean" c:type="gboolean"/>
  24299. </return-value>
  24300. <parameters>
  24301. <parameter name="drive" transfer-ownership="none">
  24302. <doc xml:space="preserve">a #GDrive.</doc>
  24303. <type name="Drive" c:type="GDrive*"/>
  24304. </parameter>
  24305. </parameters>
  24306. </callback>
  24307. </field>
  24308. <field name="stop">
  24309. <callback name="stop">
  24310. <return-value transfer-ownership="none">
  24311. <type name="none" c:type="void"/>
  24312. </return-value>
  24313. <parameters>
  24314. <parameter name="drive" transfer-ownership="none">
  24315. <doc xml:space="preserve">a #GDrive.</doc>
  24316. <type name="Drive" c:type="GDrive*"/>
  24317. </parameter>
  24318. <parameter name="flags" transfer-ownership="none">
  24319. <doc xml:space="preserve">flags affecting the unmount if required for stopping.</doc>
  24320. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  24321. </parameter>
  24322. <parameter name="mount_operation"
  24323. transfer-ownership="none"
  24324. nullable="1"
  24325. allow-none="1">
  24326. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  24327. user interaction.</doc>
  24328. <type name="MountOperation" c:type="GMountOperation*"/>
  24329. </parameter>
  24330. <parameter name="cancellable"
  24331. transfer-ownership="none"
  24332. nullable="1"
  24333. allow-none="1">
  24334. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  24335. <type name="Cancellable" c:type="GCancellable*"/>
  24336. </parameter>
  24337. <parameter name="callback"
  24338. transfer-ownership="none"
  24339. nullable="1"
  24340. allow-none="1"
  24341. scope="async"
  24342. closure="5">
  24343. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  24344. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  24345. </parameter>
  24346. <parameter name="user_data"
  24347. transfer-ownership="none"
  24348. nullable="1"
  24349. allow-none="1"
  24350. closure="5">
  24351. <doc xml:space="preserve">user data to pass to @callback</doc>
  24352. <type name="gpointer" c:type="gpointer"/>
  24353. </parameter>
  24354. </parameters>
  24355. </callback>
  24356. </field>
  24357. <field name="stop_finish">
  24358. <callback name="stop_finish" throws="1">
  24359. <return-value transfer-ownership="none">
  24360. <doc xml:space="preserve">%TRUE if the drive has been stopped successfully,
  24361. %FALSE otherwise.</doc>
  24362. <type name="gboolean" c:type="gboolean"/>
  24363. </return-value>
  24364. <parameters>
  24365. <parameter name="drive" transfer-ownership="none">
  24366. <doc xml:space="preserve">a #GDrive.</doc>
  24367. <type name="Drive" c:type="GDrive*"/>
  24368. </parameter>
  24369. <parameter name="result" transfer-ownership="none">
  24370. <doc xml:space="preserve">a #GAsyncResult.</doc>
  24371. <type name="AsyncResult" c:type="GAsyncResult*"/>
  24372. </parameter>
  24373. </parameters>
  24374. </callback>
  24375. </field>
  24376. <field name="stop_button">
  24377. <callback name="stop_button">
  24378. <return-value transfer-ownership="none">
  24379. <type name="none" c:type="void"/>
  24380. </return-value>
  24381. <parameters>
  24382. <parameter name="drive" transfer-ownership="none">
  24383. <type name="Drive" c:type="GDrive*"/>
  24384. </parameter>
  24385. </parameters>
  24386. </callback>
  24387. </field>
  24388. <field name="eject_with_operation">
  24389. <callback name="eject_with_operation">
  24390. <return-value transfer-ownership="none">
  24391. <type name="none" c:type="void"/>
  24392. </return-value>
  24393. <parameters>
  24394. <parameter name="drive" transfer-ownership="none">
  24395. <doc xml:space="preserve">a #GDrive.</doc>
  24396. <type name="Drive" c:type="GDrive*"/>
  24397. </parameter>
  24398. <parameter name="flags" transfer-ownership="none">
  24399. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  24400. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  24401. </parameter>
  24402. <parameter name="mount_operation"
  24403. transfer-ownership="none"
  24404. nullable="1"
  24405. allow-none="1">
  24406. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  24407. user interaction.</doc>
  24408. <type name="MountOperation" c:type="GMountOperation*"/>
  24409. </parameter>
  24410. <parameter name="cancellable"
  24411. transfer-ownership="none"
  24412. nullable="1"
  24413. allow-none="1">
  24414. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  24415. <type name="Cancellable" c:type="GCancellable*"/>
  24416. </parameter>
  24417. <parameter name="callback"
  24418. transfer-ownership="none"
  24419. nullable="1"
  24420. allow-none="1"
  24421. scope="async"
  24422. closure="5">
  24423. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  24424. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  24425. </parameter>
  24426. <parameter name="user_data"
  24427. transfer-ownership="none"
  24428. nullable="1"
  24429. allow-none="1"
  24430. closure="5">
  24431. <doc xml:space="preserve">user data passed to @callback.</doc>
  24432. <type name="gpointer" c:type="gpointer"/>
  24433. </parameter>
  24434. </parameters>
  24435. </callback>
  24436. </field>
  24437. <field name="eject_with_operation_finish">
  24438. <callback name="eject_with_operation_finish" throws="1">
  24439. <return-value transfer-ownership="none">
  24440. <doc xml:space="preserve">%TRUE if the drive was successfully ejected. %FALSE otherwise.</doc>
  24441. <type name="gboolean" c:type="gboolean"/>
  24442. </return-value>
  24443. <parameters>
  24444. <parameter name="drive" transfer-ownership="none">
  24445. <doc xml:space="preserve">a #GDrive.</doc>
  24446. <type name="Drive" c:type="GDrive*"/>
  24447. </parameter>
  24448. <parameter name="result" transfer-ownership="none">
  24449. <doc xml:space="preserve">a #GAsyncResult.</doc>
  24450. <type name="AsyncResult" c:type="GAsyncResult*"/>
  24451. </parameter>
  24452. </parameters>
  24453. </callback>
  24454. </field>
  24455. <field name="get_sort_key">
  24456. <callback name="get_sort_key">
  24457. <return-value transfer-ownership="none">
  24458. <doc xml:space="preserve">Sorting key for @drive or %NULL if no such key is available.</doc>
  24459. <type name="utf8" c:type="const gchar*"/>
  24460. </return-value>
  24461. <parameters>
  24462. <parameter name="drive" transfer-ownership="none">
  24463. <doc xml:space="preserve">A #GDrive.</doc>
  24464. <type name="Drive" c:type="GDrive*"/>
  24465. </parameter>
  24466. </parameters>
  24467. </callback>
  24468. </field>
  24469. <field name="get_symbolic_icon">
  24470. <callback name="get_symbolic_icon">
  24471. <return-value transfer-ownership="full">
  24472. <doc xml:space="preserve">symbolic #GIcon for the @drive.
  24473. Free the returned object with g_object_unref().</doc>
  24474. <type name="Icon" c:type="GIcon*"/>
  24475. </return-value>
  24476. <parameters>
  24477. <parameter name="drive" transfer-ownership="none">
  24478. <doc xml:space="preserve">a #GDrive.</doc>
  24479. <type name="Drive" c:type="GDrive*"/>
  24480. </parameter>
  24481. </parameters>
  24482. </callback>
  24483. </field>
  24484. </record>
  24485. <bitfield name="DriveStartFlags"
  24486. version="2.22"
  24487. glib:type-name="GDriveStartFlags"
  24488. glib:get-type="g_drive_start_flags_get_type"
  24489. c:type="GDriveStartFlags">
  24490. <doc xml:space="preserve">Flags used when starting a drive.</doc>
  24491. <member name="none"
  24492. value="0"
  24493. c:identifier="G_DRIVE_START_NONE"
  24494. glib:nick="none">
  24495. <doc xml:space="preserve">No flags set.</doc>
  24496. </member>
  24497. </bitfield>
  24498. <enumeration name="DriveStartStopType"
  24499. version="2.22"
  24500. glib:type-name="GDriveStartStopType"
  24501. glib:get-type="g_drive_start_stop_type_get_type"
  24502. c:type="GDriveStartStopType">
  24503. <doc xml:space="preserve">Enumeration describing how a drive can be started/stopped.</doc>
  24504. <member name="unknown"
  24505. value="0"
  24506. c:identifier="G_DRIVE_START_STOP_TYPE_UNKNOWN"
  24507. glib:nick="unknown">
  24508. <doc xml:space="preserve">Unknown or drive doesn't support
  24509. start/stop.</doc>
  24510. </member>
  24511. <member name="shutdown"
  24512. value="1"
  24513. c:identifier="G_DRIVE_START_STOP_TYPE_SHUTDOWN"
  24514. glib:nick="shutdown">
  24515. <doc xml:space="preserve">The stop method will physically
  24516. shut down the drive and e.g. power down the port the drive is
  24517. attached to.</doc>
  24518. </member>
  24519. <member name="network"
  24520. value="2"
  24521. c:identifier="G_DRIVE_START_STOP_TYPE_NETWORK"
  24522. glib:nick="network">
  24523. <doc xml:space="preserve">The start/stop methods are used
  24524. for connecting/disconnect to the drive over the network.</doc>
  24525. </member>
  24526. <member name="multidisk"
  24527. value="3"
  24528. c:identifier="G_DRIVE_START_STOP_TYPE_MULTIDISK"
  24529. glib:nick="multidisk">
  24530. <doc xml:space="preserve">The start/stop methods will
  24531. assemble/disassemble a virtual drive from several physical
  24532. drives.</doc>
  24533. </member>
  24534. <member name="password"
  24535. value="4"
  24536. c:identifier="G_DRIVE_START_STOP_TYPE_PASSWORD"
  24537. glib:nick="password">
  24538. <doc xml:space="preserve">The start/stop methods will
  24539. unlock/lock the disk (for example using the ATA &lt;quote&gt;SECURITY
  24540. UNLOCK DEVICE&lt;/quote&gt; command)</doc>
  24541. </member>
  24542. </enumeration>
  24543. <interface name="DtlsClientConnection"
  24544. c:symbol-prefix="dtls_client_connection"
  24545. c:type="GDtlsClientConnection"
  24546. version="2.48"
  24547. glib:type-name="GDtlsClientConnection"
  24548. glib:get-type="g_dtls_client_connection_get_type"
  24549. glib:type-struct="DtlsClientConnectionInterface">
  24550. <doc xml:space="preserve">#GDtlsClientConnection is the client-side subclass of
  24551. #GDtlsConnection, representing a client-side DTLS connection.</doc>
  24552. <prerequisite name="DatagramBased"/>
  24553. <prerequisite name="DtlsConnection"/>
  24554. <function name="new"
  24555. c:identifier="g_dtls_client_connection_new"
  24556. version="2.48"
  24557. throws="1">
  24558. <doc xml:space="preserve">Creates a new #GDtlsClientConnection wrapping @base_socket which is
  24559. assumed to communicate with the server identified by @server_identity.</doc>
  24560. <return-value transfer-ownership="full">
  24561. <doc xml:space="preserve">the new
  24562. #GDtlsClientConnection, or %NULL on error</doc>
  24563. <type name="DtlsClientConnection" c:type="GDatagramBased*"/>
  24564. </return-value>
  24565. <parameters>
  24566. <parameter name="base_socket" transfer-ownership="none">
  24567. <doc xml:space="preserve">the #GDatagramBased to wrap</doc>
  24568. <type name="DatagramBased" c:type="GDatagramBased*"/>
  24569. </parameter>
  24570. <parameter name="server_identity"
  24571. transfer-ownership="none"
  24572. nullable="1"
  24573. allow-none="1">
  24574. <doc xml:space="preserve">the expected identity of the server</doc>
  24575. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  24576. </parameter>
  24577. </parameters>
  24578. </function>
  24579. <method name="get_accepted_cas"
  24580. c:identifier="g_dtls_client_connection_get_accepted_cas"
  24581. version="2.48">
  24582. <doc xml:space="preserve">Gets the list of distinguished names of the Certificate Authorities
  24583. that the server will accept certificates from. This will be set
  24584. during the TLS handshake if the server requests a certificate.
  24585. Otherwise, it will be %NULL.
  24586. Each item in the list is a #GByteArray which contains the complete
  24587. subject DN of the certificate authority.</doc>
  24588. <return-value transfer-ownership="full">
  24589. <doc xml:space="preserve">the list of
  24590. CA DNs. You should unref each element with g_byte_array_unref() and then
  24591. the free the list with g_list_free().</doc>
  24592. <type name="GLib.List" c:type="GList*">
  24593. <array name="GLib.ByteArray">
  24594. <type name="gpointer" c:type="gpointer"/>
  24595. </array>
  24596. </type>
  24597. </return-value>
  24598. <parameters>
  24599. <instance-parameter name="conn" transfer-ownership="none">
  24600. <doc xml:space="preserve">the #GDtlsClientConnection</doc>
  24601. <type name="DtlsClientConnection" c:type="GDtlsClientConnection*"/>
  24602. </instance-parameter>
  24603. </parameters>
  24604. </method>
  24605. <method name="get_server_identity"
  24606. c:identifier="g_dtls_client_connection_get_server_identity"
  24607. version="2.48">
  24608. <doc xml:space="preserve">Gets @conn's expected server identity</doc>
  24609. <return-value transfer-ownership="none">
  24610. <doc xml:space="preserve">a #GSocketConnectable describing the
  24611. expected server identity, or %NULL if the expected identity is not
  24612. known.</doc>
  24613. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  24614. </return-value>
  24615. <parameters>
  24616. <instance-parameter name="conn" transfer-ownership="none">
  24617. <doc xml:space="preserve">the #GDtlsClientConnection</doc>
  24618. <type name="DtlsClientConnection" c:type="GDtlsClientConnection*"/>
  24619. </instance-parameter>
  24620. </parameters>
  24621. </method>
  24622. <method name="get_validation_flags"
  24623. c:identifier="g_dtls_client_connection_get_validation_flags"
  24624. version="2.48">
  24625. <doc xml:space="preserve">Gets @conn's validation flags</doc>
  24626. <return-value transfer-ownership="none">
  24627. <doc xml:space="preserve">the validation flags</doc>
  24628. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  24629. </return-value>
  24630. <parameters>
  24631. <instance-parameter name="conn" transfer-ownership="none">
  24632. <doc xml:space="preserve">the #GDtlsClientConnection</doc>
  24633. <type name="DtlsClientConnection" c:type="GDtlsClientConnection*"/>
  24634. </instance-parameter>
  24635. </parameters>
  24636. </method>
  24637. <method name="set_server_identity"
  24638. c:identifier="g_dtls_client_connection_set_server_identity"
  24639. version="2.48">
  24640. <doc xml:space="preserve">Sets @conn's expected server identity, which is used both to tell
  24641. servers on virtual hosts which certificate to present, and also
  24642. to let @conn know what name to look for in the certificate when
  24643. performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.</doc>
  24644. <return-value transfer-ownership="none">
  24645. <type name="none" c:type="void"/>
  24646. </return-value>
  24647. <parameters>
  24648. <instance-parameter name="conn" transfer-ownership="none">
  24649. <doc xml:space="preserve">the #GDtlsClientConnection</doc>
  24650. <type name="DtlsClientConnection" c:type="GDtlsClientConnection*"/>
  24651. </instance-parameter>
  24652. <parameter name="identity" transfer-ownership="none">
  24653. <doc xml:space="preserve">a #GSocketConnectable describing the expected server identity</doc>
  24654. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  24655. </parameter>
  24656. </parameters>
  24657. </method>
  24658. <method name="set_validation_flags"
  24659. c:identifier="g_dtls_client_connection_set_validation_flags"
  24660. version="2.48">
  24661. <doc xml:space="preserve">Sets @conn's validation flags, to override the default set of
  24662. checks performed when validating a server certificate. By default,
  24663. %G_TLS_CERTIFICATE_VALIDATE_ALL is used.</doc>
  24664. <return-value transfer-ownership="none">
  24665. <type name="none" c:type="void"/>
  24666. </return-value>
  24667. <parameters>
  24668. <instance-parameter name="conn" transfer-ownership="none">
  24669. <doc xml:space="preserve">the #GDtlsClientConnection</doc>
  24670. <type name="DtlsClientConnection" c:type="GDtlsClientConnection*"/>
  24671. </instance-parameter>
  24672. <parameter name="flags" transfer-ownership="none">
  24673. <doc xml:space="preserve">the #GTlsCertificateFlags to use</doc>
  24674. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  24675. </parameter>
  24676. </parameters>
  24677. </method>
  24678. <property name="accepted-cas" version="2.48" transfer-ownership="none">
  24679. <doc xml:space="preserve">A list of the distinguished names of the Certificate Authorities
  24680. that the server will accept client certificates signed by. If the
  24681. server requests a client certificate during the handshake, then
  24682. this property will be set after the handshake completes.
  24683. Each item in the list is a #GByteArray which contains the complete
  24684. subject DN of the certificate authority.</doc>
  24685. <type name="GLib.List" c:type="gpointer">
  24686. <type name="gpointer" c:type="gpointer"/>
  24687. </type>
  24688. </property>
  24689. <property name="server-identity"
  24690. version="2.48"
  24691. writable="1"
  24692. construct="1"
  24693. transfer-ownership="none">
  24694. <doc xml:space="preserve">A #GSocketConnectable describing the identity of the server that
  24695. is expected on the other end of the connection.
  24696. If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
  24697. #GDtlsClientConnection:validation-flags, this object will be used
  24698. to determine the expected identify of the remote end of the
  24699. connection; if #GDtlsClientConnection:server-identity is not set,
  24700. or does not match the identity presented by the server, then the
  24701. %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
  24702. In addition to its use in verifying the server certificate,
  24703. this is also used to give a hint to the server about what
  24704. certificate we expect, which is useful for servers that serve
  24705. virtual hosts.</doc>
  24706. <type name="SocketConnectable"/>
  24707. </property>
  24708. <property name="validation-flags"
  24709. version="2.48"
  24710. writable="1"
  24711. construct="1"
  24712. transfer-ownership="none">
  24713. <doc xml:space="preserve">What steps to perform when validating a certificate received from
  24714. a server. Server certificates that fail to validate in all of the
  24715. ways indicated here will be rejected unless the application
  24716. overrides the default via #GDtlsConnection::accept-certificate.</doc>
  24717. <type name="TlsCertificateFlags"/>
  24718. </property>
  24719. </interface>
  24720. <record name="DtlsClientConnectionInterface"
  24721. c:type="GDtlsClientConnectionInterface"
  24722. glib:is-gtype-struct-for="DtlsClientConnection"
  24723. version="2.48">
  24724. <doc xml:space="preserve">vtable for a #GDtlsClientConnection implementation.</doc>
  24725. <field name="g_iface">
  24726. <doc xml:space="preserve">The parent interface.</doc>
  24727. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  24728. </field>
  24729. </record>
  24730. <interface name="DtlsConnection"
  24731. c:symbol-prefix="dtls_connection"
  24732. c:type="GDtlsConnection"
  24733. version="2.48"
  24734. glib:type-name="GDtlsConnection"
  24735. glib:get-type="g_dtls_connection_get_type"
  24736. glib:type-struct="DtlsConnectionInterface">
  24737. <doc xml:space="preserve">#GDtlsConnection is the base DTLS connection class type, which wraps
  24738. a #GDatagramBased and provides DTLS encryption on top of it. Its
  24739. subclasses, #GDtlsClientConnection and #GDtlsServerConnection,
  24740. implement client-side and server-side DTLS, respectively.
  24741. For TLS support, see #GTlsConnection.
  24742. As DTLS is datagram based, #GDtlsConnection implements #GDatagramBased,
  24743. presenting a datagram-socket-like API for the encrypted connection. This
  24744. operates over a base datagram connection, which is also a #GDatagramBased
  24745. (#GDtlsConnection:base-socket).
  24746. To close a DTLS connection, use g_dtls_connection_close().
  24747. Neither #GDtlsServerConnection or #GDtlsClientConnection set the peer address
  24748. on their base #GDatagramBased if it is a #GSocket — it is up to the caller to
  24749. do that if they wish. If they do not, and g_socket_close() is called on the
  24750. base socket, the #GDtlsConnection will not raise a %G_IO_ERROR_NOT_CONNECTED
  24751. error on further I/O.</doc>
  24752. <prerequisite name="DatagramBased"/>
  24753. <virtual-method name="accept_certificate">
  24754. <return-value transfer-ownership="none">
  24755. <type name="gboolean" c:type="gboolean"/>
  24756. </return-value>
  24757. <parameters>
  24758. <instance-parameter name="connection" transfer-ownership="none">
  24759. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  24760. </instance-parameter>
  24761. <parameter name="peer_cert" transfer-ownership="none">
  24762. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  24763. </parameter>
  24764. <parameter name="errors" transfer-ownership="none">
  24765. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  24766. </parameter>
  24767. </parameters>
  24768. </virtual-method>
  24769. <virtual-method name="handshake"
  24770. invoker="handshake"
  24771. version="2.48"
  24772. throws="1">
  24773. <doc xml:space="preserve">Attempts a TLS handshake on @conn.
  24774. On the client side, it is never necessary to call this method;
  24775. although the connection needs to perform a handshake after
  24776. connecting (or after sending a "STARTTLS"-type command) and may
  24777. need to rehandshake later if the server requests it,
  24778. #GDtlsConnection will handle this for you automatically when you try
  24779. to send or receive data on the connection. However, you can call
  24780. g_dtls_connection_handshake() manually if you want to know for sure
  24781. whether the initial handshake succeeded or failed (as opposed to
  24782. just immediately trying to write to @conn, in which
  24783. case if it fails, it may not be possible to tell if it failed
  24784. before or after completing the handshake).
  24785. Likewise, on the server side, although a handshake is necessary at
  24786. the beginning of the communication, you do not need to call this
  24787. function explicitly unless you want clearer error reporting.
  24788. However, you may call g_dtls_connection_handshake() later on to
  24789. renegotiate parameters (encryption methods, etc) with the client.
  24790. #GDtlsConnection::accept_certificate may be emitted during the
  24791. handshake.</doc>
  24792. <return-value transfer-ownership="none">
  24793. <doc xml:space="preserve">success or failure</doc>
  24794. <type name="gboolean" c:type="gboolean"/>
  24795. </return-value>
  24796. <parameters>
  24797. <instance-parameter name="conn" transfer-ownership="none">
  24798. <doc xml:space="preserve">a #GDtlsConnection</doc>
  24799. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  24800. </instance-parameter>
  24801. <parameter name="cancellable"
  24802. transfer-ownership="none"
  24803. nullable="1"
  24804. allow-none="1">
  24805. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  24806. <type name="Cancellable" c:type="GCancellable*"/>
  24807. </parameter>
  24808. </parameters>
  24809. </virtual-method>
  24810. <virtual-method name="handshake_async"
  24811. invoker="handshake_async"
  24812. version="2.48">
  24813. <doc xml:space="preserve">Asynchronously performs a TLS handshake on @conn. See
  24814. g_dtls_connection_handshake() for more information.</doc>
  24815. <return-value transfer-ownership="none">
  24816. <type name="none" c:type="void"/>
  24817. </return-value>
  24818. <parameters>
  24819. <instance-parameter name="conn" transfer-ownership="none">
  24820. <doc xml:space="preserve">a #GDtlsConnection</doc>
  24821. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  24822. </instance-parameter>
  24823. <parameter name="io_priority" transfer-ownership="none">
  24824. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  24825. <type name="gint" c:type="int"/>
  24826. </parameter>
  24827. <parameter name="cancellable"
  24828. transfer-ownership="none"
  24829. nullable="1"
  24830. allow-none="1">
  24831. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  24832. <type name="Cancellable" c:type="GCancellable*"/>
  24833. </parameter>
  24834. <parameter name="callback"
  24835. transfer-ownership="none"
  24836. nullable="1"
  24837. allow-none="1"
  24838. scope="async"
  24839. closure="3">
  24840. <doc xml:space="preserve">callback to call when the handshake is complete</doc>
  24841. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  24842. </parameter>
  24843. <parameter name="user_data"
  24844. transfer-ownership="none"
  24845. nullable="1"
  24846. allow-none="1"
  24847. closure="3">
  24848. <doc xml:space="preserve">the data to pass to the callback function</doc>
  24849. <type name="gpointer" c:type="gpointer"/>
  24850. </parameter>
  24851. </parameters>
  24852. </virtual-method>
  24853. <virtual-method name="handshake_finish"
  24854. invoker="handshake_finish"
  24855. version="2.48"
  24856. throws="1">
  24857. <doc xml:space="preserve">Finish an asynchronous TLS handshake operation. See
  24858. g_dtls_connection_handshake() for more information.</doc>
  24859. <return-value transfer-ownership="none">
  24860. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  24861. case @error will be set.</doc>
  24862. <type name="gboolean" c:type="gboolean"/>
  24863. </return-value>
  24864. <parameters>
  24865. <instance-parameter name="conn" transfer-ownership="none">
  24866. <doc xml:space="preserve">a #GDtlsConnection</doc>
  24867. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  24868. </instance-parameter>
  24869. <parameter name="result" transfer-ownership="none">
  24870. <doc xml:space="preserve">a #GAsyncResult.</doc>
  24871. <type name="AsyncResult" c:type="GAsyncResult*"/>
  24872. </parameter>
  24873. </parameters>
  24874. </virtual-method>
  24875. <virtual-method name="shutdown"
  24876. invoker="shutdown"
  24877. version="2.48"
  24878. throws="1">
  24879. <doc xml:space="preserve">Shut down part or all of a DTLS connection.
  24880. If @shutdown_read is %TRUE then the receiving side of the connection is shut
  24881. down, and further reading is disallowed. Subsequent calls to
  24882. g_datagram_based_receive_messages() will return %G_IO_ERROR_CLOSED.
  24883. If @shutdown_write is %TRUE then the sending side of the connection is shut
  24884. down, and further writing is disallowed. Subsequent calls to
  24885. g_datagram_based_send_messages() will return %G_IO_ERROR_CLOSED.
  24886. It is allowed for both @shutdown_read and @shutdown_write to be TRUE — this
  24887. is equivalent to calling g_dtls_connection_close().
  24888. If @cancellable is cancelled, the #GDtlsConnection may be left
  24889. partially-closed and any pending untransmitted data may be lost. Call
  24890. g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection.</doc>
  24891. <return-value transfer-ownership="none">
  24892. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise</doc>
  24893. <type name="gboolean" c:type="gboolean"/>
  24894. </return-value>
  24895. <parameters>
  24896. <instance-parameter name="conn" transfer-ownership="none">
  24897. <doc xml:space="preserve">a #GDtlsConnection</doc>
  24898. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  24899. </instance-parameter>
  24900. <parameter name="shutdown_read" transfer-ownership="none">
  24901. <doc xml:space="preserve">%TRUE to stop reception of incoming datagrams</doc>
  24902. <type name="gboolean" c:type="gboolean"/>
  24903. </parameter>
  24904. <parameter name="shutdown_write" transfer-ownership="none">
  24905. <doc xml:space="preserve">%TRUE to stop sending outgoing datagrams</doc>
  24906. <type name="gboolean" c:type="gboolean"/>
  24907. </parameter>
  24908. <parameter name="cancellable"
  24909. transfer-ownership="none"
  24910. nullable="1"
  24911. allow-none="1">
  24912. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  24913. <type name="Cancellable" c:type="GCancellable*"/>
  24914. </parameter>
  24915. </parameters>
  24916. </virtual-method>
  24917. <virtual-method name="shutdown_async"
  24918. invoker="shutdown_async"
  24919. version="2.48">
  24920. <doc xml:space="preserve">Asynchronously shut down part or all of the DTLS connection. See
  24921. g_dtls_connection_shutdown() for more information.</doc>
  24922. <return-value transfer-ownership="none">
  24923. <type name="none" c:type="void"/>
  24924. </return-value>
  24925. <parameters>
  24926. <instance-parameter name="conn" transfer-ownership="none">
  24927. <doc xml:space="preserve">a #GDtlsConnection</doc>
  24928. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  24929. </instance-parameter>
  24930. <parameter name="shutdown_read" transfer-ownership="none">
  24931. <doc xml:space="preserve">%TRUE to stop reception of incoming datagrams</doc>
  24932. <type name="gboolean" c:type="gboolean"/>
  24933. </parameter>
  24934. <parameter name="shutdown_write" transfer-ownership="none">
  24935. <doc xml:space="preserve">%TRUE to stop sending outgoing datagrams</doc>
  24936. <type name="gboolean" c:type="gboolean"/>
  24937. </parameter>
  24938. <parameter name="io_priority" transfer-ownership="none">
  24939. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  24940. <type name="gint" c:type="int"/>
  24941. </parameter>
  24942. <parameter name="cancellable"
  24943. transfer-ownership="none"
  24944. nullable="1"
  24945. allow-none="1">
  24946. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  24947. <type name="Cancellable" c:type="GCancellable*"/>
  24948. </parameter>
  24949. <parameter name="callback"
  24950. transfer-ownership="none"
  24951. nullable="1"
  24952. allow-none="1"
  24953. scope="async"
  24954. closure="5">
  24955. <doc xml:space="preserve">callback to call when the shutdown operation is complete</doc>
  24956. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  24957. </parameter>
  24958. <parameter name="user_data"
  24959. transfer-ownership="none"
  24960. nullable="1"
  24961. allow-none="1"
  24962. closure="5">
  24963. <doc xml:space="preserve">the data to pass to the callback function</doc>
  24964. <type name="gpointer" c:type="gpointer"/>
  24965. </parameter>
  24966. </parameters>
  24967. </virtual-method>
  24968. <virtual-method name="shutdown_finish"
  24969. invoker="shutdown_finish"
  24970. version="2.48"
  24971. throws="1">
  24972. <doc xml:space="preserve">Finish an asynchronous TLS shutdown operation. See
  24973. g_dtls_connection_shutdown() for more information.</doc>
  24974. <return-value transfer-ownership="none">
  24975. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  24976. case @error will be set</doc>
  24977. <type name="gboolean" c:type="gboolean"/>
  24978. </return-value>
  24979. <parameters>
  24980. <instance-parameter name="conn" transfer-ownership="none">
  24981. <doc xml:space="preserve">a #GDtlsConnection</doc>
  24982. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  24983. </instance-parameter>
  24984. <parameter name="result" transfer-ownership="none">
  24985. <doc xml:space="preserve">a #GAsyncResult</doc>
  24986. <type name="AsyncResult" c:type="GAsyncResult*"/>
  24987. </parameter>
  24988. </parameters>
  24989. </virtual-method>
  24990. <method name="close"
  24991. c:identifier="g_dtls_connection_close"
  24992. version="2.48"
  24993. throws="1">
  24994. <doc xml:space="preserve">Close the DTLS connection. This is equivalent to calling
  24995. g_dtls_connection_shutdown() to shut down both sides of the connection.
  24996. Closing a #GDtlsConnection waits for all buffered but untransmitted data to
  24997. be sent before it completes. It then sends a `close_notify` DTLS alert to the
  24998. peer and may wait for a `close_notify` to be received from the peer. It does
  24999. not close the underlying #GDtlsConnection:base-socket; that must be closed
  25000. separately.
  25001. Once @conn is closed, all other operations will return %G_IO_ERROR_CLOSED.
  25002. Closing a #GDtlsConnection multiple times will not return an error.
  25003. #GDtlsConnections will be automatically closed when the last reference is
  25004. dropped, but you might want to call this function to make sure resources are
  25005. released as early as possible.
  25006. If @cancellable is cancelled, the #GDtlsConnection may be left
  25007. partially-closed and any pending untransmitted data may be lost. Call
  25008. g_dtls_connection_close() again to complete closing the #GDtlsConnection.</doc>
  25009. <return-value transfer-ownership="none">
  25010. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise</doc>
  25011. <type name="gboolean" c:type="gboolean"/>
  25012. </return-value>
  25013. <parameters>
  25014. <instance-parameter name="conn" transfer-ownership="none">
  25015. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25016. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25017. </instance-parameter>
  25018. <parameter name="cancellable"
  25019. transfer-ownership="none"
  25020. nullable="1"
  25021. allow-none="1">
  25022. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25023. <type name="Cancellable" c:type="GCancellable*"/>
  25024. </parameter>
  25025. </parameters>
  25026. </method>
  25027. <method name="close_async"
  25028. c:identifier="g_dtls_connection_close_async"
  25029. version="2.48">
  25030. <doc xml:space="preserve">Asynchronously close the DTLS connection. See g_dtls_connection_close() for
  25031. more information.</doc>
  25032. <return-value transfer-ownership="none">
  25033. <type name="none" c:type="void"/>
  25034. </return-value>
  25035. <parameters>
  25036. <instance-parameter name="conn" transfer-ownership="none">
  25037. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25038. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25039. </instance-parameter>
  25040. <parameter name="io_priority" transfer-ownership="none">
  25041. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  25042. <type name="gint" c:type="int"/>
  25043. </parameter>
  25044. <parameter name="cancellable"
  25045. transfer-ownership="none"
  25046. nullable="1"
  25047. allow-none="1">
  25048. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25049. <type name="Cancellable" c:type="GCancellable*"/>
  25050. </parameter>
  25051. <parameter name="callback"
  25052. transfer-ownership="none"
  25053. nullable="1"
  25054. allow-none="1"
  25055. scope="async"
  25056. closure="3">
  25057. <doc xml:space="preserve">callback to call when the close operation is complete</doc>
  25058. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  25059. </parameter>
  25060. <parameter name="user_data"
  25061. transfer-ownership="none"
  25062. nullable="1"
  25063. allow-none="1">
  25064. <doc xml:space="preserve">the data to pass to the callback function</doc>
  25065. <type name="gpointer" c:type="gpointer"/>
  25066. </parameter>
  25067. </parameters>
  25068. </method>
  25069. <method name="close_finish"
  25070. c:identifier="g_dtls_connection_close_finish"
  25071. version="2.48"
  25072. throws="1">
  25073. <doc xml:space="preserve">Finish an asynchronous TLS close operation. See g_dtls_connection_close()
  25074. for more information.</doc>
  25075. <return-value transfer-ownership="none">
  25076. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  25077. case @error will be set</doc>
  25078. <type name="gboolean" c:type="gboolean"/>
  25079. </return-value>
  25080. <parameters>
  25081. <instance-parameter name="conn" transfer-ownership="none">
  25082. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25083. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25084. </instance-parameter>
  25085. <parameter name="result" transfer-ownership="none">
  25086. <doc xml:space="preserve">a #GAsyncResult</doc>
  25087. <type name="AsyncResult" c:type="GAsyncResult*"/>
  25088. </parameter>
  25089. </parameters>
  25090. </method>
  25091. <method name="emit_accept_certificate"
  25092. c:identifier="g_dtls_connection_emit_accept_certificate"
  25093. version="2.48">
  25094. <doc xml:space="preserve">Used by #GDtlsConnection implementations to emit the
  25095. #GDtlsConnection::accept-certificate signal.</doc>
  25096. <return-value transfer-ownership="none">
  25097. <doc xml:space="preserve">%TRUE if one of the signal handlers has returned
  25098. %TRUE to accept @peer_cert</doc>
  25099. <type name="gboolean" c:type="gboolean"/>
  25100. </return-value>
  25101. <parameters>
  25102. <instance-parameter name="conn" transfer-ownership="none">
  25103. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25104. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25105. </instance-parameter>
  25106. <parameter name="peer_cert" transfer-ownership="none">
  25107. <doc xml:space="preserve">the peer's #GTlsCertificate</doc>
  25108. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  25109. </parameter>
  25110. <parameter name="errors" transfer-ownership="none">
  25111. <doc xml:space="preserve">the problems with @peer_cert</doc>
  25112. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  25113. </parameter>
  25114. </parameters>
  25115. </method>
  25116. <method name="get_certificate"
  25117. c:identifier="g_dtls_connection_get_certificate"
  25118. version="2.48">
  25119. <doc xml:space="preserve">Gets @conn's certificate, as set by
  25120. g_dtls_connection_set_certificate().</doc>
  25121. <return-value transfer-ownership="none">
  25122. <doc xml:space="preserve">@conn's certificate, or %NULL</doc>
  25123. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  25124. </return-value>
  25125. <parameters>
  25126. <instance-parameter name="conn" transfer-ownership="none">
  25127. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25128. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25129. </instance-parameter>
  25130. </parameters>
  25131. </method>
  25132. <method name="get_database"
  25133. c:identifier="g_dtls_connection_get_database"
  25134. version="2.48">
  25135. <doc xml:space="preserve">Gets the certificate database that @conn uses to verify
  25136. peer certificates. See g_dtls_connection_set_database().</doc>
  25137. <return-value transfer-ownership="none">
  25138. <doc xml:space="preserve">the certificate database that @conn uses or %NULL</doc>
  25139. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  25140. </return-value>
  25141. <parameters>
  25142. <instance-parameter name="conn" transfer-ownership="none">
  25143. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25144. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25145. </instance-parameter>
  25146. </parameters>
  25147. </method>
  25148. <method name="get_interaction"
  25149. c:identifier="g_dtls_connection_get_interaction"
  25150. version="2.48">
  25151. <doc xml:space="preserve">Get the object that will be used to interact with the user. It will be used
  25152. for things like prompting the user for passwords. If %NULL is returned, then
  25153. no user interaction will occur for this connection.</doc>
  25154. <return-value transfer-ownership="none">
  25155. <doc xml:space="preserve">The interaction object.</doc>
  25156. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  25157. </return-value>
  25158. <parameters>
  25159. <instance-parameter name="conn" transfer-ownership="none">
  25160. <doc xml:space="preserve">a connection</doc>
  25161. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25162. </instance-parameter>
  25163. </parameters>
  25164. </method>
  25165. <method name="get_peer_certificate"
  25166. c:identifier="g_dtls_connection_get_peer_certificate"
  25167. version="2.48">
  25168. <doc xml:space="preserve">Gets @conn's peer's certificate after the handshake has completed.
  25169. (It is not set during the emission of
  25170. #GDtlsConnection::accept-certificate.)</doc>
  25171. <return-value transfer-ownership="none">
  25172. <doc xml:space="preserve">@conn's peer's certificate, or %NULL</doc>
  25173. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  25174. </return-value>
  25175. <parameters>
  25176. <instance-parameter name="conn" transfer-ownership="none">
  25177. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25178. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25179. </instance-parameter>
  25180. </parameters>
  25181. </method>
  25182. <method name="get_peer_certificate_errors"
  25183. c:identifier="g_dtls_connection_get_peer_certificate_errors"
  25184. version="2.48">
  25185. <doc xml:space="preserve">Gets the errors associated with validating @conn's peer's
  25186. certificate, after the handshake has completed. (It is not set
  25187. during the emission of #GDtlsConnection::accept-certificate.)</doc>
  25188. <return-value transfer-ownership="none">
  25189. <doc xml:space="preserve">@conn's peer's certificate errors</doc>
  25190. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  25191. </return-value>
  25192. <parameters>
  25193. <instance-parameter name="conn" transfer-ownership="none">
  25194. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25195. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25196. </instance-parameter>
  25197. </parameters>
  25198. </method>
  25199. <method name="get_rehandshake_mode"
  25200. c:identifier="g_dtls_connection_get_rehandshake_mode"
  25201. version="2.48">
  25202. <doc xml:space="preserve">Gets @conn rehandshaking mode. See
  25203. g_dtls_connection_set_rehandshake_mode() for details.</doc>
  25204. <return-value transfer-ownership="none">
  25205. <doc xml:space="preserve">@conn's rehandshaking mode</doc>
  25206. <type name="TlsRehandshakeMode" c:type="GTlsRehandshakeMode"/>
  25207. </return-value>
  25208. <parameters>
  25209. <instance-parameter name="conn" transfer-ownership="none">
  25210. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25211. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25212. </instance-parameter>
  25213. </parameters>
  25214. </method>
  25215. <method name="get_require_close_notify"
  25216. c:identifier="g_dtls_connection_get_require_close_notify"
  25217. version="2.48">
  25218. <doc xml:space="preserve">Tests whether or not @conn expects a proper TLS close notification
  25219. when the connection is closed. See
  25220. g_dtls_connection_set_require_close_notify() for details.</doc>
  25221. <return-value transfer-ownership="none">
  25222. <doc xml:space="preserve">%TRUE if @conn requires a proper TLS close notification.</doc>
  25223. <type name="gboolean" c:type="gboolean"/>
  25224. </return-value>
  25225. <parameters>
  25226. <instance-parameter name="conn" transfer-ownership="none">
  25227. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25228. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25229. </instance-parameter>
  25230. </parameters>
  25231. </method>
  25232. <method name="handshake"
  25233. c:identifier="g_dtls_connection_handshake"
  25234. version="2.48"
  25235. throws="1">
  25236. <doc xml:space="preserve">Attempts a TLS handshake on @conn.
  25237. On the client side, it is never necessary to call this method;
  25238. although the connection needs to perform a handshake after
  25239. connecting (or after sending a "STARTTLS"-type command) and may
  25240. need to rehandshake later if the server requests it,
  25241. #GDtlsConnection will handle this for you automatically when you try
  25242. to send or receive data on the connection. However, you can call
  25243. g_dtls_connection_handshake() manually if you want to know for sure
  25244. whether the initial handshake succeeded or failed (as opposed to
  25245. just immediately trying to write to @conn, in which
  25246. case if it fails, it may not be possible to tell if it failed
  25247. before or after completing the handshake).
  25248. Likewise, on the server side, although a handshake is necessary at
  25249. the beginning of the communication, you do not need to call this
  25250. function explicitly unless you want clearer error reporting.
  25251. However, you may call g_dtls_connection_handshake() later on to
  25252. renegotiate parameters (encryption methods, etc) with the client.
  25253. #GDtlsConnection::accept_certificate may be emitted during the
  25254. handshake.</doc>
  25255. <return-value transfer-ownership="none">
  25256. <doc xml:space="preserve">success or failure</doc>
  25257. <type name="gboolean" c:type="gboolean"/>
  25258. </return-value>
  25259. <parameters>
  25260. <instance-parameter name="conn" transfer-ownership="none">
  25261. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25262. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25263. </instance-parameter>
  25264. <parameter name="cancellable"
  25265. transfer-ownership="none"
  25266. nullable="1"
  25267. allow-none="1">
  25268. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25269. <type name="Cancellable" c:type="GCancellable*"/>
  25270. </parameter>
  25271. </parameters>
  25272. </method>
  25273. <method name="handshake_async"
  25274. c:identifier="g_dtls_connection_handshake_async"
  25275. version="2.48">
  25276. <doc xml:space="preserve">Asynchronously performs a TLS handshake on @conn. See
  25277. g_dtls_connection_handshake() for more information.</doc>
  25278. <return-value transfer-ownership="none">
  25279. <type name="none" c:type="void"/>
  25280. </return-value>
  25281. <parameters>
  25282. <instance-parameter name="conn" transfer-ownership="none">
  25283. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25284. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25285. </instance-parameter>
  25286. <parameter name="io_priority" transfer-ownership="none">
  25287. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  25288. <type name="gint" c:type="int"/>
  25289. </parameter>
  25290. <parameter name="cancellable"
  25291. transfer-ownership="none"
  25292. nullable="1"
  25293. allow-none="1">
  25294. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25295. <type name="Cancellable" c:type="GCancellable*"/>
  25296. </parameter>
  25297. <parameter name="callback"
  25298. transfer-ownership="none"
  25299. nullable="1"
  25300. allow-none="1"
  25301. scope="async"
  25302. closure="3">
  25303. <doc xml:space="preserve">callback to call when the handshake is complete</doc>
  25304. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  25305. </parameter>
  25306. <parameter name="user_data"
  25307. transfer-ownership="none"
  25308. nullable="1"
  25309. allow-none="1">
  25310. <doc xml:space="preserve">the data to pass to the callback function</doc>
  25311. <type name="gpointer" c:type="gpointer"/>
  25312. </parameter>
  25313. </parameters>
  25314. </method>
  25315. <method name="handshake_finish"
  25316. c:identifier="g_dtls_connection_handshake_finish"
  25317. version="2.48"
  25318. throws="1">
  25319. <doc xml:space="preserve">Finish an asynchronous TLS handshake operation. See
  25320. g_dtls_connection_handshake() for more information.</doc>
  25321. <return-value transfer-ownership="none">
  25322. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  25323. case @error will be set.</doc>
  25324. <type name="gboolean" c:type="gboolean"/>
  25325. </return-value>
  25326. <parameters>
  25327. <instance-parameter name="conn" transfer-ownership="none">
  25328. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25329. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25330. </instance-parameter>
  25331. <parameter name="result" transfer-ownership="none">
  25332. <doc xml:space="preserve">a #GAsyncResult.</doc>
  25333. <type name="AsyncResult" c:type="GAsyncResult*"/>
  25334. </parameter>
  25335. </parameters>
  25336. </method>
  25337. <method name="set_certificate"
  25338. c:identifier="g_dtls_connection_set_certificate"
  25339. version="2.48">
  25340. <doc xml:space="preserve">This sets the certificate that @conn will present to its peer
  25341. during the TLS handshake. For a #GDtlsServerConnection, it is
  25342. mandatory to set this, and that will normally be done at construct
  25343. time.
  25344. For a #GDtlsClientConnection, this is optional. If a handshake fails
  25345. with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
  25346. requires a certificate, and if you try connecting again, you should
  25347. call this method first. You can call
  25348. g_dtls_client_connection_get_accepted_cas() on the failed connection
  25349. to get a list of Certificate Authorities that the server will
  25350. accept certificates from.
  25351. (It is also possible that a server will allow the connection with
  25352. or without a certificate; in that case, if you don't provide a
  25353. certificate, you can tell that the server requested one by the fact
  25354. that g_dtls_client_connection_get_accepted_cas() will return
  25355. non-%NULL.)</doc>
  25356. <return-value transfer-ownership="none">
  25357. <type name="none" c:type="void"/>
  25358. </return-value>
  25359. <parameters>
  25360. <instance-parameter name="conn" transfer-ownership="none">
  25361. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25362. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25363. </instance-parameter>
  25364. <parameter name="certificate" transfer-ownership="none">
  25365. <doc xml:space="preserve">the certificate to use for @conn</doc>
  25366. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  25367. </parameter>
  25368. </parameters>
  25369. </method>
  25370. <method name="set_database"
  25371. c:identifier="g_dtls_connection_set_database"
  25372. version="2.48">
  25373. <doc xml:space="preserve">Sets the certificate database that is used to verify peer certificates.
  25374. This is set to the default database by default. See
  25375. g_dtls_backend_get_default_database(). If set to %NULL, then
  25376. peer certificate validation will always set the
  25377. %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
  25378. #GDtlsConnection::accept-certificate will always be emitted on
  25379. client-side connections, unless that bit is not set in
  25380. #GDtlsClientConnection:validation-flags).</doc>
  25381. <return-value transfer-ownership="none">
  25382. <type name="none" c:type="void"/>
  25383. </return-value>
  25384. <parameters>
  25385. <instance-parameter name="conn" transfer-ownership="none">
  25386. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25387. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25388. </instance-parameter>
  25389. <parameter name="database" transfer-ownership="none">
  25390. <doc xml:space="preserve">a #GTlsDatabase</doc>
  25391. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  25392. </parameter>
  25393. </parameters>
  25394. </method>
  25395. <method name="set_interaction"
  25396. c:identifier="g_dtls_connection_set_interaction"
  25397. version="2.48">
  25398. <doc xml:space="preserve">Set the object that will be used to interact with the user. It will be used
  25399. for things like prompting the user for passwords.
  25400. The @interaction argument will normally be a derived subclass of
  25401. #GTlsInteraction. %NULL can also be provided if no user interaction
  25402. should occur for this connection.</doc>
  25403. <return-value transfer-ownership="none">
  25404. <type name="none" c:type="void"/>
  25405. </return-value>
  25406. <parameters>
  25407. <instance-parameter name="conn" transfer-ownership="none">
  25408. <doc xml:space="preserve">a connection</doc>
  25409. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25410. </instance-parameter>
  25411. <parameter name="interaction"
  25412. transfer-ownership="none"
  25413. nullable="1"
  25414. allow-none="1">
  25415. <doc xml:space="preserve">an interaction object, or %NULL</doc>
  25416. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  25417. </parameter>
  25418. </parameters>
  25419. </method>
  25420. <method name="set_rehandshake_mode"
  25421. c:identifier="g_dtls_connection_set_rehandshake_mode"
  25422. version="2.48">
  25423. <doc xml:space="preserve">Sets how @conn behaves with respect to rehandshaking requests.
  25424. %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
  25425. rehandshake after the initial handshake is complete. (For a client,
  25426. this means it will refuse rehandshake requests from the server, and
  25427. for a server, this means it will close the connection with an error
  25428. if the client attempts to rehandshake.)
  25429. %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
  25430. rehandshake only if the other end of the connection supports the
  25431. TLS `renegotiation_info` extension. This is the default behavior,
  25432. but means that rehandshaking will not work against older
  25433. implementations that do not support that extension.
  25434. %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
  25435. rehandshaking even without the `renegotiation_info` extension. On
  25436. the server side in particular, this is not recommended, since it
  25437. leaves the server open to certain attacks. However, this mode is
  25438. necessary if you need to allow renegotiation with older client
  25439. software.</doc>
  25440. <return-value transfer-ownership="none">
  25441. <type name="none" c:type="void"/>
  25442. </return-value>
  25443. <parameters>
  25444. <instance-parameter name="conn" transfer-ownership="none">
  25445. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25446. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25447. </instance-parameter>
  25448. <parameter name="mode" transfer-ownership="none">
  25449. <doc xml:space="preserve">the rehandshaking mode</doc>
  25450. <type name="TlsRehandshakeMode" c:type="GTlsRehandshakeMode"/>
  25451. </parameter>
  25452. </parameters>
  25453. </method>
  25454. <method name="set_require_close_notify"
  25455. c:identifier="g_dtls_connection_set_require_close_notify"
  25456. version="2.48">
  25457. <doc xml:space="preserve">Sets whether or not @conn expects a proper TLS close notification
  25458. before the connection is closed. If this is %TRUE (the default),
  25459. then @conn will expect to receive a TLS close notification from its
  25460. peer before the connection is closed, and will return a
  25461. %G_TLS_ERROR_EOF error if the connection is closed without proper
  25462. notification (since this may indicate a network error, or
  25463. man-in-the-middle attack).
  25464. In some protocols, the application will know whether or not the
  25465. connection was closed cleanly based on application-level data
  25466. (because the application-level data includes a length field, or is
  25467. somehow self-delimiting); in this case, the close notify is
  25468. redundant and may be omitted. You
  25469. can use g_dtls_connection_set_require_close_notify() to tell @conn
  25470. to allow an "unannounced" connection close, in which case the close
  25471. will show up as a 0-length read, as in a non-TLS
  25472. #GDatagramBased, and it is up to the application to check that
  25473. the data has been fully received.
  25474. Note that this only affects the behavior when the peer closes the
  25475. connection; when the application calls g_dtls_connection_close_async() on
  25476. @conn itself, this will send a close notification regardless of the
  25477. setting of this property. If you explicitly want to do an unclean
  25478. close, you can close @conn's #GDtlsConnection:base-socket rather
  25479. than closing @conn itself.</doc>
  25480. <return-value transfer-ownership="none">
  25481. <type name="none" c:type="void"/>
  25482. </return-value>
  25483. <parameters>
  25484. <instance-parameter name="conn" transfer-ownership="none">
  25485. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25486. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25487. </instance-parameter>
  25488. <parameter name="require_close_notify" transfer-ownership="none">
  25489. <doc xml:space="preserve">whether or not to require close notification</doc>
  25490. <type name="gboolean" c:type="gboolean"/>
  25491. </parameter>
  25492. </parameters>
  25493. </method>
  25494. <method name="shutdown"
  25495. c:identifier="g_dtls_connection_shutdown"
  25496. version="2.48"
  25497. throws="1">
  25498. <doc xml:space="preserve">Shut down part or all of a DTLS connection.
  25499. If @shutdown_read is %TRUE then the receiving side of the connection is shut
  25500. down, and further reading is disallowed. Subsequent calls to
  25501. g_datagram_based_receive_messages() will return %G_IO_ERROR_CLOSED.
  25502. If @shutdown_write is %TRUE then the sending side of the connection is shut
  25503. down, and further writing is disallowed. Subsequent calls to
  25504. g_datagram_based_send_messages() will return %G_IO_ERROR_CLOSED.
  25505. It is allowed for both @shutdown_read and @shutdown_write to be TRUE — this
  25506. is equivalent to calling g_dtls_connection_close().
  25507. If @cancellable is cancelled, the #GDtlsConnection may be left
  25508. partially-closed and any pending untransmitted data may be lost. Call
  25509. g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection.</doc>
  25510. <return-value transfer-ownership="none">
  25511. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise</doc>
  25512. <type name="gboolean" c:type="gboolean"/>
  25513. </return-value>
  25514. <parameters>
  25515. <instance-parameter name="conn" transfer-ownership="none">
  25516. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25517. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25518. </instance-parameter>
  25519. <parameter name="shutdown_read" transfer-ownership="none">
  25520. <doc xml:space="preserve">%TRUE to stop reception of incoming datagrams</doc>
  25521. <type name="gboolean" c:type="gboolean"/>
  25522. </parameter>
  25523. <parameter name="shutdown_write" transfer-ownership="none">
  25524. <doc xml:space="preserve">%TRUE to stop sending outgoing datagrams</doc>
  25525. <type name="gboolean" c:type="gboolean"/>
  25526. </parameter>
  25527. <parameter name="cancellable"
  25528. transfer-ownership="none"
  25529. nullable="1"
  25530. allow-none="1">
  25531. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25532. <type name="Cancellable" c:type="GCancellable*"/>
  25533. </parameter>
  25534. </parameters>
  25535. </method>
  25536. <method name="shutdown_async"
  25537. c:identifier="g_dtls_connection_shutdown_async"
  25538. version="2.48">
  25539. <doc xml:space="preserve">Asynchronously shut down part or all of the DTLS connection. See
  25540. g_dtls_connection_shutdown() for more information.</doc>
  25541. <return-value transfer-ownership="none">
  25542. <type name="none" c:type="void"/>
  25543. </return-value>
  25544. <parameters>
  25545. <instance-parameter name="conn" transfer-ownership="none">
  25546. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25547. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25548. </instance-parameter>
  25549. <parameter name="shutdown_read" transfer-ownership="none">
  25550. <doc xml:space="preserve">%TRUE to stop reception of incoming datagrams</doc>
  25551. <type name="gboolean" c:type="gboolean"/>
  25552. </parameter>
  25553. <parameter name="shutdown_write" transfer-ownership="none">
  25554. <doc xml:space="preserve">%TRUE to stop sending outgoing datagrams</doc>
  25555. <type name="gboolean" c:type="gboolean"/>
  25556. </parameter>
  25557. <parameter name="io_priority" transfer-ownership="none">
  25558. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  25559. <type name="gint" c:type="int"/>
  25560. </parameter>
  25561. <parameter name="cancellable"
  25562. transfer-ownership="none"
  25563. nullable="1"
  25564. allow-none="1">
  25565. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25566. <type name="Cancellable" c:type="GCancellable*"/>
  25567. </parameter>
  25568. <parameter name="callback"
  25569. transfer-ownership="none"
  25570. nullable="1"
  25571. allow-none="1"
  25572. scope="async"
  25573. closure="5">
  25574. <doc xml:space="preserve">callback to call when the shutdown operation is complete</doc>
  25575. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  25576. </parameter>
  25577. <parameter name="user_data"
  25578. transfer-ownership="none"
  25579. nullable="1"
  25580. allow-none="1">
  25581. <doc xml:space="preserve">the data to pass to the callback function</doc>
  25582. <type name="gpointer" c:type="gpointer"/>
  25583. </parameter>
  25584. </parameters>
  25585. </method>
  25586. <method name="shutdown_finish"
  25587. c:identifier="g_dtls_connection_shutdown_finish"
  25588. version="2.48"
  25589. throws="1">
  25590. <doc xml:space="preserve">Finish an asynchronous TLS shutdown operation. See
  25591. g_dtls_connection_shutdown() for more information.</doc>
  25592. <return-value transfer-ownership="none">
  25593. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  25594. case @error will be set</doc>
  25595. <type name="gboolean" c:type="gboolean"/>
  25596. </return-value>
  25597. <parameters>
  25598. <instance-parameter name="conn" transfer-ownership="none">
  25599. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25600. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25601. </instance-parameter>
  25602. <parameter name="result" transfer-ownership="none">
  25603. <doc xml:space="preserve">a #GAsyncResult</doc>
  25604. <type name="AsyncResult" c:type="GAsyncResult*"/>
  25605. </parameter>
  25606. </parameters>
  25607. </method>
  25608. <property name="base-socket"
  25609. version="2.48"
  25610. writable="1"
  25611. construct-only="1"
  25612. transfer-ownership="none">
  25613. <doc xml:space="preserve">The #GDatagramBased that the connection wraps. Note that this may be any
  25614. implementation of #GDatagramBased, not just a #GSocket.</doc>
  25615. <type name="DatagramBased"/>
  25616. </property>
  25617. <property name="certificate"
  25618. version="2.48"
  25619. writable="1"
  25620. transfer-ownership="none">
  25621. <doc xml:space="preserve">The connection's certificate; see
  25622. g_dtls_connection_set_certificate().</doc>
  25623. <type name="TlsCertificate"/>
  25624. </property>
  25625. <property name="database"
  25626. version="2.48"
  25627. writable="1"
  25628. transfer-ownership="none">
  25629. <doc xml:space="preserve">The certificate database to use when verifying this TLS connection.
  25630. If no certificate database is set, then the default database will be
  25631. used. See g_dtls_backend_get_default_database().</doc>
  25632. <type name="TlsDatabase"/>
  25633. </property>
  25634. <property name="interaction"
  25635. version="2.48"
  25636. writable="1"
  25637. transfer-ownership="none">
  25638. <doc xml:space="preserve">A #GTlsInteraction object to be used when the connection or certificate
  25639. database need to interact with the user. This will be used to prompt the
  25640. user for passwords where necessary.</doc>
  25641. <type name="TlsInteraction"/>
  25642. </property>
  25643. <property name="peer-certificate"
  25644. version="2.48"
  25645. transfer-ownership="none">
  25646. <doc xml:space="preserve">The connection's peer's certificate, after the TLS handshake has
  25647. completed and the certificate has been accepted. Note in
  25648. particular that this is not yet set during the emission of
  25649. #GDtlsConnection::accept-certificate.
  25650. (You can watch for a #GObject::notify signal on this property to
  25651. detect when a handshake has occurred.)</doc>
  25652. <type name="TlsCertificate"/>
  25653. </property>
  25654. <property name="peer-certificate-errors"
  25655. version="2.48"
  25656. transfer-ownership="none">
  25657. <doc xml:space="preserve">The errors noticed-and-ignored while verifying
  25658. #GDtlsConnection:peer-certificate. Normally this should be 0, but
  25659. it may not be if #GDtlsClientConnection:validation-flags is not
  25660. %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
  25661. #GDtlsConnection::accept-certificate overrode the default
  25662. behavior.</doc>
  25663. <type name="TlsCertificateFlags"/>
  25664. </property>
  25665. <property name="rehandshake-mode"
  25666. version="2.48"
  25667. writable="1"
  25668. construct="1"
  25669. transfer-ownership="none">
  25670. <doc xml:space="preserve">The rehandshaking mode. See
  25671. g_dtls_connection_set_rehandshake_mode().</doc>
  25672. <type name="TlsRehandshakeMode"/>
  25673. </property>
  25674. <property name="require-close-notify"
  25675. version="2.48"
  25676. writable="1"
  25677. construct="1"
  25678. transfer-ownership="none">
  25679. <doc xml:space="preserve">Whether or not proper TLS close notification is required.
  25680. See g_dtls_connection_set_require_close_notify().</doc>
  25681. <type name="gboolean" c:type="gboolean"/>
  25682. </property>
  25683. <glib:signal name="accept-certificate" when="last" version="2.48">
  25684. <doc xml:space="preserve">Emitted during the TLS handshake after the peer certificate has
  25685. been received. You can examine @peer_cert's certification path by
  25686. calling g_tls_certificate_get_issuer() on it.
  25687. For a client-side connection, @peer_cert is the server's
  25688. certificate, and the signal will only be emitted if the
  25689. certificate was not acceptable according to @conn's
  25690. #GDtlsClientConnection:validation_flags. If you would like the
  25691. certificate to be accepted despite @errors, return %TRUE from the
  25692. signal handler. Otherwise, if no handler accepts the certificate,
  25693. the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
  25694. For a server-side connection, @peer_cert is the certificate
  25695. presented by the client, if this was requested via the server's
  25696. #GDtlsServerConnection:authentication_mode. On the server side,
  25697. the signal is always emitted when the client presents a
  25698. certificate, and the certificate will only be accepted if a
  25699. handler returns %TRUE.
  25700. Note that if this signal is emitted as part of asynchronous I/O
  25701. in the main thread, then you should not attempt to interact with
  25702. the user before returning from the signal handler. If you want to
  25703. let the user decide whether or not to accept the certificate, you
  25704. would have to return %FALSE from the signal handler on the first
  25705. attempt, and then after the connection attempt returns a
  25706. %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
  25707. the user decides to accept the certificate, remember that fact,
  25708. create a new connection, and return %TRUE from the signal handler
  25709. the next time.
  25710. If you are doing I/O in another thread, you do not
  25711. need to worry about this, and can simply block in the signal
  25712. handler until the UI thread returns an answer.</doc>
  25713. <return-value transfer-ownership="none">
  25714. <doc xml:space="preserve">%TRUE to accept @peer_cert (which will also
  25715. immediately end the signal emission). %FALSE to allow the signal
  25716. emission to continue, which will cause the handshake to fail if
  25717. no one else overrides it.</doc>
  25718. <type name="gboolean" c:type="gboolean"/>
  25719. </return-value>
  25720. <parameters>
  25721. <parameter name="peer_cert" transfer-ownership="none">
  25722. <doc xml:space="preserve">the peer's #GTlsCertificate</doc>
  25723. <type name="TlsCertificate"/>
  25724. </parameter>
  25725. <parameter name="errors" transfer-ownership="none">
  25726. <doc xml:space="preserve">the problems with @peer_cert.</doc>
  25727. <type name="TlsCertificateFlags"/>
  25728. </parameter>
  25729. </parameters>
  25730. </glib:signal>
  25731. </interface>
  25732. <record name="DtlsConnectionInterface"
  25733. c:type="GDtlsConnectionInterface"
  25734. glib:is-gtype-struct-for="DtlsConnection"
  25735. version="2.48">
  25736. <doc xml:space="preserve">Virtual method table for a #GDtlsConnection implementation.</doc>
  25737. <field name="g_iface">
  25738. <doc xml:space="preserve">The parent interface.</doc>
  25739. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  25740. </field>
  25741. <field name="accept_certificate">
  25742. <callback name="accept_certificate">
  25743. <return-value transfer-ownership="none">
  25744. <type name="gboolean" c:type="gboolean"/>
  25745. </return-value>
  25746. <parameters>
  25747. <parameter name="connection" transfer-ownership="none">
  25748. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25749. </parameter>
  25750. <parameter name="peer_cert" transfer-ownership="none">
  25751. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  25752. </parameter>
  25753. <parameter name="errors" transfer-ownership="none">
  25754. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  25755. </parameter>
  25756. </parameters>
  25757. </callback>
  25758. </field>
  25759. <field name="handshake">
  25760. <callback name="handshake" throws="1">
  25761. <return-value transfer-ownership="none">
  25762. <doc xml:space="preserve">success or failure</doc>
  25763. <type name="gboolean" c:type="gboolean"/>
  25764. </return-value>
  25765. <parameters>
  25766. <parameter name="conn" transfer-ownership="none">
  25767. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25768. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25769. </parameter>
  25770. <parameter name="cancellable"
  25771. transfer-ownership="none"
  25772. nullable="1"
  25773. allow-none="1">
  25774. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25775. <type name="Cancellable" c:type="GCancellable*"/>
  25776. </parameter>
  25777. </parameters>
  25778. </callback>
  25779. </field>
  25780. <field name="handshake_async">
  25781. <callback name="handshake_async">
  25782. <return-value transfer-ownership="none">
  25783. <type name="none" c:type="void"/>
  25784. </return-value>
  25785. <parameters>
  25786. <parameter name="conn" transfer-ownership="none">
  25787. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25788. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25789. </parameter>
  25790. <parameter name="io_priority" transfer-ownership="none">
  25791. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  25792. <type name="gint" c:type="int"/>
  25793. </parameter>
  25794. <parameter name="cancellable"
  25795. transfer-ownership="none"
  25796. nullable="1"
  25797. allow-none="1">
  25798. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25799. <type name="Cancellable" c:type="GCancellable*"/>
  25800. </parameter>
  25801. <parameter name="callback"
  25802. transfer-ownership="none"
  25803. nullable="1"
  25804. allow-none="1"
  25805. scope="async"
  25806. closure="4">
  25807. <doc xml:space="preserve">callback to call when the handshake is complete</doc>
  25808. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  25809. </parameter>
  25810. <parameter name="user_data"
  25811. transfer-ownership="none"
  25812. nullable="1"
  25813. allow-none="1"
  25814. closure="4">
  25815. <doc xml:space="preserve">the data to pass to the callback function</doc>
  25816. <type name="gpointer" c:type="gpointer"/>
  25817. </parameter>
  25818. </parameters>
  25819. </callback>
  25820. </field>
  25821. <field name="handshake_finish">
  25822. <callback name="handshake_finish" throws="1">
  25823. <return-value transfer-ownership="none">
  25824. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  25825. case @error will be set.</doc>
  25826. <type name="gboolean" c:type="gboolean"/>
  25827. </return-value>
  25828. <parameters>
  25829. <parameter name="conn" transfer-ownership="none">
  25830. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25831. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25832. </parameter>
  25833. <parameter name="result" transfer-ownership="none">
  25834. <doc xml:space="preserve">a #GAsyncResult.</doc>
  25835. <type name="AsyncResult" c:type="GAsyncResult*"/>
  25836. </parameter>
  25837. </parameters>
  25838. </callback>
  25839. </field>
  25840. <field name="shutdown">
  25841. <callback name="shutdown" throws="1">
  25842. <return-value transfer-ownership="none">
  25843. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise</doc>
  25844. <type name="gboolean" c:type="gboolean"/>
  25845. </return-value>
  25846. <parameters>
  25847. <parameter name="conn" transfer-ownership="none">
  25848. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25849. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25850. </parameter>
  25851. <parameter name="shutdown_read" transfer-ownership="none">
  25852. <doc xml:space="preserve">%TRUE to stop reception of incoming datagrams</doc>
  25853. <type name="gboolean" c:type="gboolean"/>
  25854. </parameter>
  25855. <parameter name="shutdown_write" transfer-ownership="none">
  25856. <doc xml:space="preserve">%TRUE to stop sending outgoing datagrams</doc>
  25857. <type name="gboolean" c:type="gboolean"/>
  25858. </parameter>
  25859. <parameter name="cancellable"
  25860. transfer-ownership="none"
  25861. nullable="1"
  25862. allow-none="1">
  25863. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25864. <type name="Cancellable" c:type="GCancellable*"/>
  25865. </parameter>
  25866. </parameters>
  25867. </callback>
  25868. </field>
  25869. <field name="shutdown_async">
  25870. <callback name="shutdown_async">
  25871. <return-value transfer-ownership="none">
  25872. <type name="none" c:type="void"/>
  25873. </return-value>
  25874. <parameters>
  25875. <parameter name="conn" transfer-ownership="none">
  25876. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25877. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25878. </parameter>
  25879. <parameter name="shutdown_read" transfer-ownership="none">
  25880. <doc xml:space="preserve">%TRUE to stop reception of incoming datagrams</doc>
  25881. <type name="gboolean" c:type="gboolean"/>
  25882. </parameter>
  25883. <parameter name="shutdown_write" transfer-ownership="none">
  25884. <doc xml:space="preserve">%TRUE to stop sending outgoing datagrams</doc>
  25885. <type name="gboolean" c:type="gboolean"/>
  25886. </parameter>
  25887. <parameter name="io_priority" transfer-ownership="none">
  25888. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  25889. <type name="gint" c:type="int"/>
  25890. </parameter>
  25891. <parameter name="cancellable"
  25892. transfer-ownership="none"
  25893. nullable="1"
  25894. allow-none="1">
  25895. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  25896. <type name="Cancellable" c:type="GCancellable*"/>
  25897. </parameter>
  25898. <parameter name="callback"
  25899. transfer-ownership="none"
  25900. nullable="1"
  25901. allow-none="1"
  25902. scope="async"
  25903. closure="6">
  25904. <doc xml:space="preserve">callback to call when the shutdown operation is complete</doc>
  25905. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  25906. </parameter>
  25907. <parameter name="user_data"
  25908. transfer-ownership="none"
  25909. nullable="1"
  25910. allow-none="1"
  25911. closure="6">
  25912. <doc xml:space="preserve">the data to pass to the callback function</doc>
  25913. <type name="gpointer" c:type="gpointer"/>
  25914. </parameter>
  25915. </parameters>
  25916. </callback>
  25917. </field>
  25918. <field name="shutdown_finish">
  25919. <callback name="shutdown_finish" throws="1">
  25920. <return-value transfer-ownership="none">
  25921. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  25922. case @error will be set</doc>
  25923. <type name="gboolean" c:type="gboolean"/>
  25924. </return-value>
  25925. <parameters>
  25926. <parameter name="conn" transfer-ownership="none">
  25927. <doc xml:space="preserve">a #GDtlsConnection</doc>
  25928. <type name="DtlsConnection" c:type="GDtlsConnection*"/>
  25929. </parameter>
  25930. <parameter name="result" transfer-ownership="none">
  25931. <doc xml:space="preserve">a #GAsyncResult</doc>
  25932. <type name="AsyncResult" c:type="GAsyncResult*"/>
  25933. </parameter>
  25934. </parameters>
  25935. </callback>
  25936. </field>
  25937. </record>
  25938. <interface name="DtlsServerConnection"
  25939. c:symbol-prefix="dtls_server_connection"
  25940. c:type="GDtlsServerConnection"
  25941. version="2.48"
  25942. glib:type-name="GDtlsServerConnection"
  25943. glib:get-type="g_dtls_server_connection_get_type"
  25944. glib:type-struct="DtlsServerConnectionInterface">
  25945. <doc xml:space="preserve">#GDtlsServerConnection is the server-side subclass of #GDtlsConnection,
  25946. representing a server-side DTLS connection.</doc>
  25947. <prerequisite name="DatagramBased"/>
  25948. <prerequisite name="DtlsConnection"/>
  25949. <function name="new"
  25950. c:identifier="g_dtls_server_connection_new"
  25951. version="2.48"
  25952. throws="1">
  25953. <doc xml:space="preserve">Creates a new #GDtlsServerConnection wrapping @base_socket.</doc>
  25954. <return-value transfer-ownership="full">
  25955. <doc xml:space="preserve">the new
  25956. #GDtlsServerConnection, or %NULL on error</doc>
  25957. <type name="DtlsServerConnection" c:type="GDatagramBased*"/>
  25958. </return-value>
  25959. <parameters>
  25960. <parameter name="base_socket" transfer-ownership="none">
  25961. <doc xml:space="preserve">the #GDatagramBased to wrap</doc>
  25962. <type name="DatagramBased" c:type="GDatagramBased*"/>
  25963. </parameter>
  25964. <parameter name="certificate"
  25965. transfer-ownership="none"
  25966. nullable="1"
  25967. allow-none="1">
  25968. <doc xml:space="preserve">the default server certificate, or %NULL</doc>
  25969. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  25970. </parameter>
  25971. </parameters>
  25972. </function>
  25973. <property name="authentication-mode"
  25974. version="2.48"
  25975. writable="1"
  25976. transfer-ownership="none">
  25977. <doc xml:space="preserve">The #GTlsAuthenticationMode for the server. This can be changed
  25978. before calling g_dtls_connection_handshake() if you want to
  25979. rehandshake with a different mode from the initial handshake.</doc>
  25980. <type name="TlsAuthenticationMode"/>
  25981. </property>
  25982. </interface>
  25983. <record name="DtlsServerConnectionInterface"
  25984. c:type="GDtlsServerConnectionInterface"
  25985. glib:is-gtype-struct-for="DtlsServerConnection"
  25986. version="2.48">
  25987. <doc xml:space="preserve">vtable for a #GDtlsServerConnection implementation.</doc>
  25988. <field name="g_iface">
  25989. <doc xml:space="preserve">The parent interface.</doc>
  25990. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  25991. </field>
  25992. </record>
  25993. <class name="Emblem"
  25994. c:symbol-prefix="emblem"
  25995. c:type="GEmblem"
  25996. parent="GObject.Object"
  25997. glib:type-name="GEmblem"
  25998. glib:get-type="g_emblem_get_type"
  25999. glib:type-struct="EmblemClass">
  26000. <doc xml:space="preserve">#GEmblem is an implementation of #GIcon that supports
  26001. having an emblem, which is an icon with additional properties.
  26002. It can than be added to a #GEmblemedIcon.
  26003. Currently, only metainformation about the emblem's origin is
  26004. supported. More may be added in the future.</doc>
  26005. <implements name="Icon"/>
  26006. <constructor name="new" c:identifier="g_emblem_new" version="2.18">
  26007. <doc xml:space="preserve">Creates a new emblem for @icon.</doc>
  26008. <return-value transfer-ownership="full">
  26009. <doc xml:space="preserve">a new #GEmblem.</doc>
  26010. <type name="Emblem" c:type="GEmblem*"/>
  26011. </return-value>
  26012. <parameters>
  26013. <parameter name="icon" transfer-ownership="none">
  26014. <doc xml:space="preserve">a GIcon containing the icon.</doc>
  26015. <type name="Icon" c:type="GIcon*"/>
  26016. </parameter>
  26017. </parameters>
  26018. </constructor>
  26019. <constructor name="new_with_origin"
  26020. c:identifier="g_emblem_new_with_origin"
  26021. version="2.18">
  26022. <doc xml:space="preserve">Creates a new emblem for @icon.</doc>
  26023. <return-value transfer-ownership="full">
  26024. <doc xml:space="preserve">a new #GEmblem.</doc>
  26025. <type name="Emblem" c:type="GEmblem*"/>
  26026. </return-value>
  26027. <parameters>
  26028. <parameter name="icon" transfer-ownership="none">
  26029. <doc xml:space="preserve">a GIcon containing the icon.</doc>
  26030. <type name="Icon" c:type="GIcon*"/>
  26031. </parameter>
  26032. <parameter name="origin" transfer-ownership="none">
  26033. <doc xml:space="preserve">a GEmblemOrigin enum defining the emblem's origin</doc>
  26034. <type name="EmblemOrigin" c:type="GEmblemOrigin"/>
  26035. </parameter>
  26036. </parameters>
  26037. </constructor>
  26038. <method name="get_icon" c:identifier="g_emblem_get_icon" version="2.18">
  26039. <doc xml:space="preserve">Gives back the icon from @emblem.</doc>
  26040. <return-value transfer-ownership="none">
  26041. <doc xml:space="preserve">a #GIcon. The returned object belongs to
  26042. the emblem and should not be modified or freed.</doc>
  26043. <type name="Icon" c:type="GIcon*"/>
  26044. </return-value>
  26045. <parameters>
  26046. <instance-parameter name="emblem" transfer-ownership="none">
  26047. <doc xml:space="preserve">a #GEmblem from which the icon should be extracted.</doc>
  26048. <type name="Emblem" c:type="GEmblem*"/>
  26049. </instance-parameter>
  26050. </parameters>
  26051. </method>
  26052. <method name="get_origin"
  26053. c:identifier="g_emblem_get_origin"
  26054. version="2.18">
  26055. <doc xml:space="preserve">Gets the origin of the emblem.</doc>
  26056. <return-value transfer-ownership="none">
  26057. <doc xml:space="preserve">the origin of the emblem</doc>
  26058. <type name="EmblemOrigin" c:type="GEmblemOrigin"/>
  26059. </return-value>
  26060. <parameters>
  26061. <instance-parameter name="emblem" transfer-ownership="none">
  26062. <doc xml:space="preserve">a #GEmblem</doc>
  26063. <type name="Emblem" c:type="GEmblem*"/>
  26064. </instance-parameter>
  26065. </parameters>
  26066. </method>
  26067. <property name="icon"
  26068. writable="1"
  26069. construct-only="1"
  26070. transfer-ownership="none">
  26071. <type name="GObject.Object"/>
  26072. </property>
  26073. <property name="origin"
  26074. writable="1"
  26075. construct-only="1"
  26076. transfer-ownership="none">
  26077. <type name="EmblemOrigin"/>
  26078. </property>
  26079. </class>
  26080. <record name="EmblemClass"
  26081. c:type="GEmblemClass"
  26082. disguised="1"
  26083. glib:is-gtype-struct-for="Emblem">
  26084. </record>
  26085. <enumeration name="EmblemOrigin"
  26086. version="2.18"
  26087. glib:type-name="GEmblemOrigin"
  26088. glib:get-type="g_emblem_origin_get_type"
  26089. c:type="GEmblemOrigin">
  26090. <doc xml:space="preserve">GEmblemOrigin is used to add information about the origin of the emblem
  26091. to #GEmblem.</doc>
  26092. <member name="unknown"
  26093. value="0"
  26094. c:identifier="G_EMBLEM_ORIGIN_UNKNOWN"
  26095. glib:nick="unknown">
  26096. <doc xml:space="preserve">Emblem of unknown origin</doc>
  26097. </member>
  26098. <member name="device"
  26099. value="1"
  26100. c:identifier="G_EMBLEM_ORIGIN_DEVICE"
  26101. glib:nick="device">
  26102. <doc xml:space="preserve">Emblem adds device-specific information</doc>
  26103. </member>
  26104. <member name="livemetadata"
  26105. value="2"
  26106. c:identifier="G_EMBLEM_ORIGIN_LIVEMETADATA"
  26107. glib:nick="livemetadata">
  26108. <doc xml:space="preserve">Emblem depicts live metadata, such as "readonly"</doc>
  26109. </member>
  26110. <member name="tag"
  26111. value="3"
  26112. c:identifier="G_EMBLEM_ORIGIN_TAG"
  26113. glib:nick="tag">
  26114. <doc xml:space="preserve">Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)</doc>
  26115. </member>
  26116. </enumeration>
  26117. <class name="EmblemedIcon"
  26118. c:symbol-prefix="emblemed_icon"
  26119. c:type="GEmblemedIcon"
  26120. parent="GObject.Object"
  26121. glib:type-name="GEmblemedIcon"
  26122. glib:get-type="g_emblemed_icon_get_type"
  26123. glib:type-struct="EmblemedIconClass">
  26124. <doc xml:space="preserve">#GEmblemedIcon is an implementation of #GIcon that supports
  26125. adding an emblem to an icon. Adding multiple emblems to an
  26126. icon is ensured via g_emblemed_icon_add_emblem().
  26127. Note that #GEmblemedIcon allows no control over the position
  26128. of the emblems. See also #GEmblem for more information.</doc>
  26129. <implements name="Icon"/>
  26130. <constructor name="new"
  26131. c:identifier="g_emblemed_icon_new"
  26132. version="2.18">
  26133. <doc xml:space="preserve">Creates a new emblemed icon for @icon with the emblem @emblem.</doc>
  26134. <return-value transfer-ownership="full">
  26135. <doc xml:space="preserve">a new #GIcon</doc>
  26136. <type name="EmblemedIcon" c:type="GIcon*"/>
  26137. </return-value>
  26138. <parameters>
  26139. <parameter name="icon" transfer-ownership="none">
  26140. <doc xml:space="preserve">a #GIcon</doc>
  26141. <type name="Icon" c:type="GIcon*"/>
  26142. </parameter>
  26143. <parameter name="emblem"
  26144. transfer-ownership="none"
  26145. nullable="1"
  26146. allow-none="1">
  26147. <doc xml:space="preserve">a #GEmblem, or %NULL</doc>
  26148. <type name="Emblem" c:type="GEmblem*"/>
  26149. </parameter>
  26150. </parameters>
  26151. </constructor>
  26152. <method name="add_emblem"
  26153. c:identifier="g_emblemed_icon_add_emblem"
  26154. version="2.18">
  26155. <doc xml:space="preserve">Adds @emblem to the #GList of #GEmblems.</doc>
  26156. <return-value transfer-ownership="none">
  26157. <type name="none" c:type="void"/>
  26158. </return-value>
  26159. <parameters>
  26160. <instance-parameter name="emblemed" transfer-ownership="none">
  26161. <doc xml:space="preserve">a #GEmblemedIcon</doc>
  26162. <type name="EmblemedIcon" c:type="GEmblemedIcon*"/>
  26163. </instance-parameter>
  26164. <parameter name="emblem" transfer-ownership="none">
  26165. <doc xml:space="preserve">a #GEmblem</doc>
  26166. <type name="Emblem" c:type="GEmblem*"/>
  26167. </parameter>
  26168. </parameters>
  26169. </method>
  26170. <method name="clear_emblems"
  26171. c:identifier="g_emblemed_icon_clear_emblems"
  26172. version="2.28">
  26173. <doc xml:space="preserve">Removes all the emblems from @icon.</doc>
  26174. <return-value transfer-ownership="none">
  26175. <type name="none" c:type="void"/>
  26176. </return-value>
  26177. <parameters>
  26178. <instance-parameter name="emblemed" transfer-ownership="none">
  26179. <doc xml:space="preserve">a #GEmblemedIcon</doc>
  26180. <type name="EmblemedIcon" c:type="GEmblemedIcon*"/>
  26181. </instance-parameter>
  26182. </parameters>
  26183. </method>
  26184. <method name="get_emblems"
  26185. c:identifier="g_emblemed_icon_get_emblems"
  26186. version="2.18">
  26187. <doc xml:space="preserve">Gets the list of emblems for the @icon.</doc>
  26188. <return-value transfer-ownership="none">
  26189. <doc xml:space="preserve">a #GList of
  26190. #GEmblems that is owned by @emblemed</doc>
  26191. <type name="GLib.List" c:type="GList*">
  26192. <type name="Emblem"/>
  26193. </type>
  26194. </return-value>
  26195. <parameters>
  26196. <instance-parameter name="emblemed" transfer-ownership="none">
  26197. <doc xml:space="preserve">a #GEmblemedIcon</doc>
  26198. <type name="EmblemedIcon" c:type="GEmblemedIcon*"/>
  26199. </instance-parameter>
  26200. </parameters>
  26201. </method>
  26202. <method name="get_icon"
  26203. c:identifier="g_emblemed_icon_get_icon"
  26204. version="2.18">
  26205. <doc xml:space="preserve">Gets the main icon for @emblemed.</doc>
  26206. <return-value transfer-ownership="none">
  26207. <doc xml:space="preserve">a #GIcon that is owned by @emblemed</doc>
  26208. <type name="Icon" c:type="GIcon*"/>
  26209. </return-value>
  26210. <parameters>
  26211. <instance-parameter name="emblemed" transfer-ownership="none">
  26212. <doc xml:space="preserve">a #GEmblemedIcon</doc>
  26213. <type name="EmblemedIcon" c:type="GEmblemedIcon*"/>
  26214. </instance-parameter>
  26215. </parameters>
  26216. </method>
  26217. <property name="gicon"
  26218. writable="1"
  26219. construct-only="1"
  26220. transfer-ownership="none">
  26221. <type name="Icon"/>
  26222. </property>
  26223. <field name="parent_instance">
  26224. <type name="GObject.Object" c:type="GObject"/>
  26225. </field>
  26226. <field name="priv" readable="0" private="1">
  26227. <type name="EmblemedIconPrivate" c:type="GEmblemedIconPrivate*"/>
  26228. </field>
  26229. </class>
  26230. <record name="EmblemedIconClass"
  26231. c:type="GEmblemedIconClass"
  26232. glib:is-gtype-struct-for="EmblemedIcon">
  26233. <field name="parent_class">
  26234. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  26235. </field>
  26236. </record>
  26237. <record name="EmblemedIconPrivate"
  26238. c:type="GEmblemedIconPrivate"
  26239. disguised="1">
  26240. </record>
  26241. <constant name="FILE_ATTRIBUTE_ACCESS_CAN_DELETE"
  26242. value="access::can-delete"
  26243. c:type="G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE">
  26244. <doc xml:space="preserve">A key in the "access" namespace for checking deletion privileges.
  26245. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
  26246. This attribute will be %TRUE if the user is able to delete the file.</doc>
  26247. <type name="utf8" c:type="gchar*"/>
  26248. </constant>
  26249. <constant name="FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE"
  26250. value="access::can-execute"
  26251. c:type="G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE">
  26252. <doc xml:space="preserve">A key in the "access" namespace for getting execution privileges.
  26253. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
  26254. This attribute will be %TRUE if the user is able to execute the file.</doc>
  26255. <type name="utf8" c:type="gchar*"/>
  26256. </constant>
  26257. <constant name="FILE_ATTRIBUTE_ACCESS_CAN_READ"
  26258. value="access::can-read"
  26259. c:type="G_FILE_ATTRIBUTE_ACCESS_CAN_READ">
  26260. <doc xml:space="preserve">A key in the "access" namespace for getting read privileges.
  26261. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
  26262. This attribute will be %TRUE if the user is able to read the file.</doc>
  26263. <type name="utf8" c:type="gchar*"/>
  26264. </constant>
  26265. <constant name="FILE_ATTRIBUTE_ACCESS_CAN_RENAME"
  26266. value="access::can-rename"
  26267. c:type="G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME">
  26268. <doc xml:space="preserve">A key in the "access" namespace for checking renaming privileges.
  26269. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
  26270. This attribute will be %TRUE if the user is able to rename the file.</doc>
  26271. <type name="utf8" c:type="gchar*"/>
  26272. </constant>
  26273. <constant name="FILE_ATTRIBUTE_ACCESS_CAN_TRASH"
  26274. value="access::can-trash"
  26275. c:type="G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH">
  26276. <doc xml:space="preserve">A key in the "access" namespace for checking trashing privileges.
  26277. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
  26278. This attribute will be %TRUE if the user is able to move the file to
  26279. the trash.</doc>
  26280. <type name="utf8" c:type="gchar*"/>
  26281. </constant>
  26282. <constant name="FILE_ATTRIBUTE_ACCESS_CAN_WRITE"
  26283. value="access::can-write"
  26284. c:type="G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE">
  26285. <doc xml:space="preserve">A key in the "access" namespace for getting write privileges.
  26286. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
  26287. This attribute will be %TRUE if the user is able to write to the file.</doc>
  26288. <type name="utf8" c:type="gchar*"/>
  26289. </constant>
  26290. <constant name="FILE_ATTRIBUTE_DOS_IS_ARCHIVE"
  26291. value="dos::is-archive"
  26292. c:type="G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE">
  26293. <doc xml:space="preserve">A key in the "dos" namespace for checking if the file's archive flag
  26294. is set. This attribute is %TRUE if the archive flag is set. This attribute
  26295. is only available for DOS file systems. Corresponding #GFileAttributeType
  26296. is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26297. <type name="utf8" c:type="gchar*"/>
  26298. </constant>
  26299. <constant name="FILE_ATTRIBUTE_DOS_IS_SYSTEM"
  26300. value="dos::is-system"
  26301. c:type="G_FILE_ATTRIBUTE_DOS_IS_SYSTEM">
  26302. <doc xml:space="preserve">A key in the "dos" namespace for checking if the file's backup flag
  26303. is set. This attribute is %TRUE if the backup flag is set. This attribute
  26304. is only available for DOS file systems. Corresponding #GFileAttributeType
  26305. is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26306. <type name="utf8" c:type="gchar*"/>
  26307. </constant>
  26308. <constant name="FILE_ATTRIBUTE_ETAG_VALUE"
  26309. value="etag::value"
  26310. c:type="G_FILE_ATTRIBUTE_ETAG_VALUE">
  26311. <doc xml:space="preserve">A key in the "etag" namespace for getting the value of the file's
  26312. entity tag. Corresponding #GFileAttributeType is
  26313. %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26314. <type name="utf8" c:type="gchar*"/>
  26315. </constant>
  26316. <constant name="FILE_ATTRIBUTE_FILESYSTEM_FREE"
  26317. value="filesystem::free"
  26318. c:type="G_FILE_ATTRIBUTE_FILESYSTEM_FREE">
  26319. <doc xml:space="preserve">A key in the "filesystem" namespace for getting the number of bytes of free space left on the
  26320. file system. Corresponding #GFileAttributeType is
  26321. %G_FILE_ATTRIBUTE_TYPE_UINT64.</doc>
  26322. <type name="utf8" c:type="gchar*"/>
  26323. </constant>
  26324. <constant name="FILE_ATTRIBUTE_FILESYSTEM_READONLY"
  26325. value="filesystem::readonly"
  26326. c:type="G_FILE_ATTRIBUTE_FILESYSTEM_READONLY">
  26327. <doc xml:space="preserve">A key in the "filesystem" namespace for checking if the file system
  26328. is read only. Is set to %TRUE if the file system is read only.
  26329. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26330. <type name="utf8" c:type="gchar*"/>
  26331. </constant>
  26332. <constant name="FILE_ATTRIBUTE_FILESYSTEM_SIZE"
  26333. value="filesystem::size"
  26334. c:type="G_FILE_ATTRIBUTE_FILESYSTEM_SIZE">
  26335. <doc xml:space="preserve">A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
  26336. used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
  26337. is %G_FILE_ATTRIBUTE_TYPE_UINT64.</doc>
  26338. <type name="utf8" c:type="gchar*"/>
  26339. </constant>
  26340. <constant name="FILE_ATTRIBUTE_FILESYSTEM_TYPE"
  26341. value="filesystem::type"
  26342. c:type="G_FILE_ATTRIBUTE_FILESYSTEM_TYPE">
  26343. <doc xml:space="preserve">A key in the "filesystem" namespace for getting the file system's type.
  26344. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26345. <type name="utf8" c:type="gchar*"/>
  26346. </constant>
  26347. <constant name="FILE_ATTRIBUTE_FILESYSTEM_USED"
  26348. value="filesystem::used"
  26349. c:type="G_FILE_ATTRIBUTE_FILESYSTEM_USED"
  26350. version="2.32">
  26351. <doc xml:space="preserve">A key in the "filesystem" namespace for getting the number of bytes of used on the
  26352. file system. Corresponding #GFileAttributeType is
  26353. %G_FILE_ATTRIBUTE_TYPE_UINT64.</doc>
  26354. <type name="utf8" c:type="gchar*"/>
  26355. </constant>
  26356. <constant name="FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW"
  26357. value="filesystem::use-preview"
  26358. c:type="G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW">
  26359. <doc xml:space="preserve">A key in the "filesystem" namespace for hinting a file manager
  26360. application whether it should preview (e.g. thumbnail) files on the
  26361. file system. The value for this key contain a
  26362. #GFilesystemPreviewType.</doc>
  26363. <type name="utf8" c:type="gchar*"/>
  26364. </constant>
  26365. <constant name="FILE_ATTRIBUTE_GVFS_BACKEND"
  26366. value="gvfs::backend"
  26367. c:type="G_FILE_ATTRIBUTE_GVFS_BACKEND">
  26368. <doc xml:space="preserve">A key in the "gvfs" namespace that gets the name of the current
  26369. GVFS backend in use. Corresponding #GFileAttributeType is
  26370. %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26371. <type name="utf8" c:type="gchar*"/>
  26372. </constant>
  26373. <constant name="FILE_ATTRIBUTE_ID_FILE"
  26374. value="id::file"
  26375. c:type="G_FILE_ATTRIBUTE_ID_FILE">
  26376. <doc xml:space="preserve">A key in the "id" namespace for getting a file identifier.
  26377. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
  26378. An example use would be during listing files, to avoid recursive
  26379. directory scanning.</doc>
  26380. <type name="utf8" c:type="gchar*"/>
  26381. </constant>
  26382. <constant name="FILE_ATTRIBUTE_ID_FILESYSTEM"
  26383. value="id::filesystem"
  26384. c:type="G_FILE_ATTRIBUTE_ID_FILESYSTEM">
  26385. <doc xml:space="preserve">A key in the "id" namespace for getting the file system identifier.
  26386. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
  26387. An example use would be during drag and drop to see if the source
  26388. and target are on the same filesystem (default to move) or not (default
  26389. to copy).</doc>
  26390. <type name="utf8" c:type="gchar*"/>
  26391. </constant>
  26392. <constant name="FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT"
  26393. value="mountable::can-eject"
  26394. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT">
  26395. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
  26396. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26397. <type name="utf8" c:type="gchar*"/>
  26398. </constant>
  26399. <constant name="FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT"
  26400. value="mountable::can-mount"
  26401. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT">
  26402. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
  26403. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26404. <type name="utf8" c:type="gchar*"/>
  26405. </constant>
  26406. <constant name="FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL"
  26407. value="mountable::can-poll"
  26408. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL"
  26409. version="2.22">
  26410. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
  26411. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26412. <type name="utf8" c:type="gchar*"/>
  26413. </constant>
  26414. <constant name="FILE_ATTRIBUTE_MOUNTABLE_CAN_START"
  26415. value="mountable::can-start"
  26416. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START"
  26417. version="2.22">
  26418. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
  26419. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26420. <type name="utf8" c:type="gchar*"/>
  26421. </constant>
  26422. <constant name="FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED"
  26423. value="mountable::can-start-degraded"
  26424. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED"
  26425. version="2.22">
  26426. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
  26427. degraded.
  26428. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26429. <type name="utf8" c:type="gchar*"/>
  26430. </constant>
  26431. <constant name="FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP"
  26432. value="mountable::can-stop"
  26433. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP"
  26434. version="2.22">
  26435. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
  26436. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26437. <type name="utf8" c:type="gchar*"/>
  26438. </constant>
  26439. <constant name="FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT"
  26440. value="mountable::can-unmount"
  26441. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT">
  26442. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
  26443. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26444. <type name="utf8" c:type="gchar*"/>
  26445. </constant>
  26446. <constant name="FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI"
  26447. value="mountable::hal-udi"
  26448. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI">
  26449. <doc xml:space="preserve">A key in the "mountable" namespace for getting the HAL UDI for the mountable
  26450. file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26451. <type name="utf8" c:type="gchar*"/>
  26452. </constant>
  26453. <constant name="FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC"
  26454. value="mountable::is-media-check-automatic"
  26455. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC"
  26456. version="2.22">
  26457. <doc xml:space="preserve">A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
  26458. is automatically polled for media.
  26459. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26460. <type name="utf8" c:type="gchar*"/>
  26461. </constant>
  26462. <constant name="FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE"
  26463. value="mountable::start-stop-type"
  26464. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE"
  26465. version="2.22">
  26466. <doc xml:space="preserve">A key in the "mountable" namespace for getting the #GDriveStartStopType.
  26467. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26468. <type name="utf8" c:type="gchar*"/>
  26469. </constant>
  26470. <constant name="FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE"
  26471. value="mountable::unix-device"
  26472. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE">
  26473. <doc xml:space="preserve">A key in the "mountable" namespace for getting the unix device.
  26474. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26475. <type name="utf8" c:type="gchar*"/>
  26476. </constant>
  26477. <constant name="FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE"
  26478. value="mountable::unix-device-file"
  26479. c:type="G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE"
  26480. version="2.22">
  26481. <doc xml:space="preserve">A key in the "mountable" namespace for getting the unix device file.
  26482. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26483. <type name="utf8" c:type="gchar*"/>
  26484. </constant>
  26485. <constant name="FILE_ATTRIBUTE_OWNER_GROUP"
  26486. value="owner::group"
  26487. c:type="G_FILE_ATTRIBUTE_OWNER_GROUP">
  26488. <doc xml:space="preserve">A key in the "owner" namespace for getting the file owner's group.
  26489. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26490. <type name="utf8" c:type="gchar*"/>
  26491. </constant>
  26492. <constant name="FILE_ATTRIBUTE_OWNER_USER"
  26493. value="owner::user"
  26494. c:type="G_FILE_ATTRIBUTE_OWNER_USER">
  26495. <doc xml:space="preserve">A key in the "owner" namespace for getting the user name of the
  26496. file's owner. Corresponding #GFileAttributeType is
  26497. %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26498. <type name="utf8" c:type="gchar*"/>
  26499. </constant>
  26500. <constant name="FILE_ATTRIBUTE_OWNER_USER_REAL"
  26501. value="owner::user-real"
  26502. c:type="G_FILE_ATTRIBUTE_OWNER_USER_REAL">
  26503. <doc xml:space="preserve">A key in the "owner" namespace for getting the real name of the
  26504. user that owns the file. Corresponding #GFileAttributeType is
  26505. %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26506. <type name="utf8" c:type="gchar*"/>
  26507. </constant>
  26508. <constant name="FILE_ATTRIBUTE_PREVIEW_ICON"
  26509. value="preview::icon"
  26510. c:type="G_FILE_ATTRIBUTE_PREVIEW_ICON"
  26511. version="2.20">
  26512. <doc xml:space="preserve">A key in the "preview" namespace for getting a #GIcon that can be
  26513. used to get preview of the file. For example, it may be a low
  26514. resolution thumbnail without metadata. Corresponding
  26515. #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value
  26516. for this key should contain a #GIcon.</doc>
  26517. <type name="utf8" c:type="gchar*"/>
  26518. </constant>
  26519. <constant name="FILE_ATTRIBUTE_SELINUX_CONTEXT"
  26520. value="selinux::context"
  26521. c:type="G_FILE_ATTRIBUTE_SELINUX_CONTEXT">
  26522. <doc xml:space="preserve">A key in the "selinux" namespace for getting the file's SELinux
  26523. context. Corresponding #GFileAttributeType is
  26524. %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
  26525. available if GLib has been built with SELinux support.</doc>
  26526. <type name="utf8" c:type="gchar*"/>
  26527. </constant>
  26528. <constant name="FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE"
  26529. value="standard::allocated-size"
  26530. c:type="G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE"
  26531. version="2.20">
  26532. <doc xml:space="preserve">A key in the "standard" namespace for getting the amount of disk space
  26533. that is consumed by the file (in bytes). This will generally be larger
  26534. than the file size (due to block size overhead) but can occasionally be
  26535. smaller (for example, for sparse files).
  26536. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.</doc>
  26537. <type name="utf8" c:type="gchar*"/>
  26538. </constant>
  26539. <constant name="FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE"
  26540. value="standard::content-type"
  26541. c:type="G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE">
  26542. <doc xml:space="preserve">A key in the "standard" namespace for getting the content type of the file.
  26543. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
  26544. The value for this key should contain a valid content type.</doc>
  26545. <type name="utf8" c:type="gchar*"/>
  26546. </constant>
  26547. <constant name="FILE_ATTRIBUTE_STANDARD_COPY_NAME"
  26548. value="standard::copy-name"
  26549. c:type="G_FILE_ATTRIBUTE_STANDARD_COPY_NAME">
  26550. <doc xml:space="preserve">A key in the "standard" namespace for getting the copy name of the file.
  26551. The copy name is an optional version of the name. If available it's always
  26552. in UTF8, and corresponds directly to the original filename (only transcoded to
  26553. UTF8). This is useful if you want to copy the file to another filesystem that
  26554. might have a different encoding. If the filename is not a valid string in the
  26555. encoding selected for the filesystem it is in then the copy name will not be set.
  26556. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26557. <type name="utf8" c:type="gchar*"/>
  26558. </constant>
  26559. <constant name="FILE_ATTRIBUTE_STANDARD_DESCRIPTION"
  26560. value="standard::description"
  26561. c:type="G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION">
  26562. <doc xml:space="preserve">A key in the "standard" namespace for getting the description of the file.
  26563. The description is a utf8 string that describes the file, generally containing
  26564. the filename, but can also contain furter information. Example descriptions
  26565. could be "filename (on hostname)" for a remote file or "filename (in trash)"
  26566. for a file in the trash. This is useful for instance as the window title
  26567. when displaying a directory or for a bookmarks menu.
  26568. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26569. <type name="utf8" c:type="gchar*"/>
  26570. </constant>
  26571. <constant name="FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME"
  26572. value="standard::display-name"
  26573. c:type="G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME">
  26574. <doc xml:space="preserve">A key in the "standard" namespace for getting the display name of the file.
  26575. A display name is guaranteed to be in UTF8 and can thus be displayed in
  26576. the UI.
  26577. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26578. <type name="utf8" c:type="gchar*"/>
  26579. </constant>
  26580. <constant name="FILE_ATTRIBUTE_STANDARD_EDIT_NAME"
  26581. value="standard::edit-name"
  26582. c:type="G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME">
  26583. <doc xml:space="preserve">A key in the "standard" namespace for edit name of the file.
  26584. An edit name is similar to the display name, but it is meant to be
  26585. used when you want to rename the file in the UI. The display name
  26586. might contain information you don't want in the new filename (such as
  26587. "(invalid unicode)" if the filename was in an invalid encoding).
  26588. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26589. <type name="utf8" c:type="gchar*"/>
  26590. </constant>
  26591. <constant name="FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE"
  26592. value="standard::fast-content-type"
  26593. c:type="G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE">
  26594. <doc xml:space="preserve">A key in the "standard" namespace for getting the fast content type.
  26595. The fast content type isn't as reliable as the regular one, as it
  26596. only uses the filename to guess it, but it is faster to calculate than the
  26597. regular content type.
  26598. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26599. <type name="utf8" c:type="gchar*"/>
  26600. </constant>
  26601. <constant name="FILE_ATTRIBUTE_STANDARD_ICON"
  26602. value="standard::icon"
  26603. c:type="G_FILE_ATTRIBUTE_STANDARD_ICON">
  26604. <doc xml:space="preserve">A key in the "standard" namespace for getting the icon for the file.
  26605. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
  26606. The value for this key should contain a #GIcon.</doc>
  26607. <type name="utf8" c:type="gchar*"/>
  26608. </constant>
  26609. <constant name="FILE_ATTRIBUTE_STANDARD_IS_BACKUP"
  26610. value="standard::is-backup"
  26611. c:type="G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP">
  26612. <doc xml:space="preserve">A key in the "standard" namespace for checking if a file is a backup file.
  26613. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26614. <type name="utf8" c:type="gchar*"/>
  26615. </constant>
  26616. <constant name="FILE_ATTRIBUTE_STANDARD_IS_HIDDEN"
  26617. value="standard::is-hidden"
  26618. c:type="G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN">
  26619. <doc xml:space="preserve">A key in the "standard" namespace for checking if a file is hidden.
  26620. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26621. <type name="utf8" c:type="gchar*"/>
  26622. </constant>
  26623. <constant name="FILE_ATTRIBUTE_STANDARD_IS_SYMLINK"
  26624. value="standard::is-symlink"
  26625. c:type="G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK">
  26626. <doc xml:space="preserve">A key in the "standard" namespace for checking if the file is a symlink.
  26627. Typically the actual type is something else, if we followed the symlink
  26628. to get the type.
  26629. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26630. <type name="utf8" c:type="gchar*"/>
  26631. </constant>
  26632. <constant name="FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL"
  26633. value="standard::is-virtual"
  26634. c:type="G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL">
  26635. <doc xml:space="preserve">A key in the "standard" namespace for checking if a file is virtual.
  26636. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26637. <type name="utf8" c:type="gchar*"/>
  26638. </constant>
  26639. <constant name="FILE_ATTRIBUTE_STANDARD_IS_VOLATILE"
  26640. value="standard::is-volatile"
  26641. c:type="G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE"
  26642. version="2.46">
  26643. <doc xml:space="preserve">A key in the "standard" namespace for checking if a file is
  26644. volatile. This is meant for opaque, non-POSIX-like backends to
  26645. indicate that the URI is not persistent. Applications should look
  26646. at #G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI.
  26647. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26648. <type name="utf8" c:type="gchar*"/>
  26649. </constant>
  26650. <constant name="FILE_ATTRIBUTE_STANDARD_NAME"
  26651. value="standard::name"
  26652. c:type="G_FILE_ATTRIBUTE_STANDARD_NAME">
  26653. <doc xml:space="preserve">A key in the "standard" namespace for getting the name of the file.
  26654. The name is the on-disk filename which may not be in any known encoding,
  26655. and can thus not be generally displayed as is.
  26656. Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
  26657. name in a user interface.
  26658. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.</doc>
  26659. <type name="utf8" c:type="gchar*"/>
  26660. </constant>
  26661. <constant name="FILE_ATTRIBUTE_STANDARD_SIZE"
  26662. value="standard::size"
  26663. c:type="G_FILE_ATTRIBUTE_STANDARD_SIZE">
  26664. <doc xml:space="preserve">A key in the "standard" namespace for getting the file's size (in bytes).
  26665. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.</doc>
  26666. <type name="utf8" c:type="gchar*"/>
  26667. </constant>
  26668. <constant name="FILE_ATTRIBUTE_STANDARD_SORT_ORDER"
  26669. value="standard::sort-order"
  26670. c:type="G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER">
  26671. <doc xml:space="preserve">A key in the "standard" namespace for setting the sort order of a file.
  26672. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
  26673. An example use would be in file managers, which would use this key
  26674. to set the order files are displayed. Files with smaller sort order
  26675. should be sorted first, and files without sort order as if sort order
  26676. was zero.</doc>
  26677. <type name="utf8" c:type="gchar*"/>
  26678. </constant>
  26679. <constant name="FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON"
  26680. value="standard::symbolic-icon"
  26681. c:type="G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON"
  26682. version="2.34">
  26683. <doc xml:space="preserve">A key in the "standard" namespace for getting the symbolic icon for the file.
  26684. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
  26685. The value for this key should contain a #GIcon.</doc>
  26686. <type name="utf8" c:type="gchar*"/>
  26687. </constant>
  26688. <constant name="FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET"
  26689. value="standard::symlink-target"
  26690. c:type="G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET">
  26691. <doc xml:space="preserve">A key in the "standard" namespace for getting the symlink target, if the file
  26692. is a symlink. Corresponding #GFileAttributeType is
  26693. %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.</doc>
  26694. <type name="utf8" c:type="gchar*"/>
  26695. </constant>
  26696. <constant name="FILE_ATTRIBUTE_STANDARD_TARGET_URI"
  26697. value="standard::target-uri"
  26698. c:type="G_FILE_ATTRIBUTE_STANDARD_TARGET_URI">
  26699. <doc xml:space="preserve">A key in the "standard" namespace for getting the target URI for the file, in
  26700. the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
  26701. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26702. <type name="utf8" c:type="gchar*"/>
  26703. </constant>
  26704. <constant name="FILE_ATTRIBUTE_STANDARD_TYPE"
  26705. value="standard::type"
  26706. c:type="G_FILE_ATTRIBUTE_STANDARD_TYPE">
  26707. <doc xml:space="preserve">A key in the "standard" namespace for storing file types.
  26708. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
  26709. The value for this key should contain a #GFileType.</doc>
  26710. <type name="utf8" c:type="gchar*"/>
  26711. </constant>
  26712. <constant name="FILE_ATTRIBUTE_THUMBNAILING_FAILED"
  26713. value="thumbnail::failed"
  26714. c:type="G_FILE_ATTRIBUTE_THUMBNAILING_FAILED">
  26715. <doc xml:space="preserve">A key in the "thumbnail" namespace for checking if thumbnailing failed.
  26716. This attribute is %TRUE if thumbnailing failed. Corresponding
  26717. #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26718. <type name="utf8" c:type="gchar*"/>
  26719. </constant>
  26720. <constant name="FILE_ATTRIBUTE_THUMBNAIL_IS_VALID"
  26721. value="thumbnail::is-valid"
  26722. c:type="G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID"
  26723. version="2.40">
  26724. <doc xml:space="preserve">A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.
  26725. This attribute is %TRUE if the thumbnail is up-to-date with the file it represents,
  26726. and %FALSE if the file has been modified since the thumbnail was generated.
  26727. If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE,
  26728. it indicates that thumbnailing may be attempted again and may succeed.
  26729. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26730. <type name="utf8" c:type="gchar*"/>
  26731. </constant>
  26732. <constant name="FILE_ATTRIBUTE_THUMBNAIL_PATH"
  26733. value="thumbnail::path"
  26734. c:type="G_FILE_ATTRIBUTE_THUMBNAIL_PATH">
  26735. <doc xml:space="preserve">A key in the "thumbnail" namespace for getting the path to the thumbnail
  26736. image. Corresponding #GFileAttributeType is
  26737. %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.</doc>
  26738. <type name="utf8" c:type="gchar*"/>
  26739. </constant>
  26740. <constant name="FILE_ATTRIBUTE_TIME_ACCESS"
  26741. value="time::access"
  26742. c:type="G_FILE_ATTRIBUTE_TIME_ACCESS">
  26743. <doc xml:space="preserve">A key in the "time" namespace for getting the time the file was last
  26744. accessed. Corresponding #GFileAttributeType is
  26745. %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
  26746. file was last accessed.</doc>
  26747. <type name="utf8" c:type="gchar*"/>
  26748. </constant>
  26749. <constant name="FILE_ATTRIBUTE_TIME_ACCESS_USEC"
  26750. value="time::access-usec"
  26751. c:type="G_FILE_ATTRIBUTE_TIME_ACCESS_USEC">
  26752. <doc xml:space="preserve">A key in the "time" namespace for getting the microseconds of the time
  26753. the file was last accessed. This should be used in conjunction with
  26754. #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
  26755. %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26756. <type name="utf8" c:type="gchar*"/>
  26757. </constant>
  26758. <constant name="FILE_ATTRIBUTE_TIME_CHANGED"
  26759. value="time::changed"
  26760. c:type="G_FILE_ATTRIBUTE_TIME_CHANGED">
  26761. <doc xml:space="preserve">A key in the "time" namespace for getting the time the file was last
  26762. changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
  26763. and contains the UNIX time since the file was last changed.
  26764. This corresponds to the traditional UNIX ctime.</doc>
  26765. <type name="utf8" c:type="gchar*"/>
  26766. </constant>
  26767. <constant name="FILE_ATTRIBUTE_TIME_CHANGED_USEC"
  26768. value="time::changed-usec"
  26769. c:type="G_FILE_ATTRIBUTE_TIME_CHANGED_USEC">
  26770. <doc xml:space="preserve">A key in the "time" namespace for getting the microseconds of the time
  26771. the file was last changed. This should be used in conjunction with
  26772. #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
  26773. %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26774. <type name="utf8" c:type="gchar*"/>
  26775. </constant>
  26776. <constant name="FILE_ATTRIBUTE_TIME_CREATED"
  26777. value="time::created"
  26778. c:type="G_FILE_ATTRIBUTE_TIME_CREATED">
  26779. <doc xml:space="preserve">A key in the "time" namespace for getting the time the file was created.
  26780. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
  26781. and contains the UNIX time since the file was created.
  26782. This corresponds to the NTFS ctime.</doc>
  26783. <type name="utf8" c:type="gchar*"/>
  26784. </constant>
  26785. <constant name="FILE_ATTRIBUTE_TIME_CREATED_USEC"
  26786. value="time::created-usec"
  26787. c:type="G_FILE_ATTRIBUTE_TIME_CREATED_USEC">
  26788. <doc xml:space="preserve">A key in the "time" namespace for getting the microseconds of the time
  26789. the file was created. This should be used in conjunction with
  26790. #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
  26791. %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26792. <type name="utf8" c:type="gchar*"/>
  26793. </constant>
  26794. <constant name="FILE_ATTRIBUTE_TIME_MODIFIED"
  26795. value="time::modified"
  26796. c:type="G_FILE_ATTRIBUTE_TIME_MODIFIED">
  26797. <doc xml:space="preserve">A key in the "time" namespace for getting the time the file was last
  26798. modified. Corresponding #GFileAttributeType is
  26799. %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
  26800. file was modified.</doc>
  26801. <type name="utf8" c:type="gchar*"/>
  26802. </constant>
  26803. <constant name="FILE_ATTRIBUTE_TIME_MODIFIED_USEC"
  26804. value="time::modified-usec"
  26805. c:type="G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC">
  26806. <doc xml:space="preserve">A key in the "time" namespace for getting the miliseconds of the time
  26807. the file was last modified. This should be used in conjunction with
  26808. #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
  26809. %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26810. <type name="utf8" c:type="gchar*"/>
  26811. </constant>
  26812. <constant name="FILE_ATTRIBUTE_TRASH_DELETION_DATE"
  26813. value="trash::deletion-date"
  26814. c:type="G_FILE_ATTRIBUTE_TRASH_DELETION_DATE"
  26815. version="2.24">
  26816. <doc xml:space="preserve">A key in the "trash" namespace. When requested against
  26817. items in "trash:///", will return the date and time when the file
  26818. was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
  26819. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.</doc>
  26820. <type name="utf8" c:type="gchar*"/>
  26821. </constant>
  26822. <constant name="FILE_ATTRIBUTE_TRASH_ITEM_COUNT"
  26823. value="trash::item-count"
  26824. c:type="G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT">
  26825. <doc xml:space="preserve">A key in the "trash" namespace. When requested against
  26826. "trash:///" returns the number of (toplevel) items in the trash folder.
  26827. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26828. <type name="utf8" c:type="gchar*"/>
  26829. </constant>
  26830. <constant name="FILE_ATTRIBUTE_TRASH_ORIG_PATH"
  26831. value="trash::orig-path"
  26832. c:type="G_FILE_ATTRIBUTE_TRASH_ORIG_PATH"
  26833. version="2.24">
  26834. <doc xml:space="preserve">A key in the "trash" namespace. When requested against
  26835. items in "trash:///", will return the original path to the file before it
  26836. was trashed. Corresponding #GFileAttributeType is
  26837. %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.</doc>
  26838. <type name="utf8" c:type="gchar*"/>
  26839. </constant>
  26840. <constant name="FILE_ATTRIBUTE_UNIX_BLOCKS"
  26841. value="unix::blocks"
  26842. c:type="G_FILE_ATTRIBUTE_UNIX_BLOCKS">
  26843. <doc xml:space="preserve">A key in the "unix" namespace for getting the number of blocks allocated
  26844. for the file. This attribute is only available for UNIX file systems.
  26845. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.</doc>
  26846. <type name="utf8" c:type="gchar*"/>
  26847. </constant>
  26848. <constant name="FILE_ATTRIBUTE_UNIX_BLOCK_SIZE"
  26849. value="unix::block-size"
  26850. c:type="G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE">
  26851. <doc xml:space="preserve">A key in the "unix" namespace for getting the block size for the file
  26852. system. This attribute is only available for UNIX file systems.
  26853. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26854. <type name="utf8" c:type="gchar*"/>
  26855. </constant>
  26856. <constant name="FILE_ATTRIBUTE_UNIX_DEVICE"
  26857. value="unix::device"
  26858. c:type="G_FILE_ATTRIBUTE_UNIX_DEVICE">
  26859. <doc xml:space="preserve">A key in the "unix" namespace for getting the device id of the device the
  26860. file is located on (see stat() documentation). This attribute is only
  26861. available for UNIX file systems. Corresponding #GFileAttributeType is
  26862. %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26863. <type name="utf8" c:type="gchar*"/>
  26864. </constant>
  26865. <constant name="FILE_ATTRIBUTE_UNIX_GID"
  26866. value="unix::gid"
  26867. c:type="G_FILE_ATTRIBUTE_UNIX_GID">
  26868. <doc xml:space="preserve">A key in the "unix" namespace for getting the group ID for the file.
  26869. This attribute is only available for UNIX file systems.
  26870. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26871. <type name="utf8" c:type="gchar*"/>
  26872. </constant>
  26873. <constant name="FILE_ATTRIBUTE_UNIX_INODE"
  26874. value="unix::inode"
  26875. c:type="G_FILE_ATTRIBUTE_UNIX_INODE">
  26876. <doc xml:space="preserve">A key in the "unix" namespace for getting the inode of the file.
  26877. This attribute is only available for UNIX file systems. Corresponding
  26878. #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.</doc>
  26879. <type name="utf8" c:type="gchar*"/>
  26880. </constant>
  26881. <constant name="FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT"
  26882. value="unix::is-mountpoint"
  26883. c:type="G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT">
  26884. <doc xml:space="preserve">A key in the "unix" namespace for checking if the file represents a
  26885. UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
  26886. point. This attribute is only available for UNIX file systems.
  26887. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.</doc>
  26888. <type name="utf8" c:type="gchar*"/>
  26889. </constant>
  26890. <constant name="FILE_ATTRIBUTE_UNIX_MODE"
  26891. value="unix::mode"
  26892. c:type="G_FILE_ATTRIBUTE_UNIX_MODE">
  26893. <doc xml:space="preserve">A key in the "unix" namespace for getting the mode of the file
  26894. (e.g. whether the file is a regular file, symlink, etc). See lstat()
  26895. documentation. This attribute is only available for UNIX file systems.
  26896. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26897. <type name="utf8" c:type="gchar*"/>
  26898. </constant>
  26899. <constant name="FILE_ATTRIBUTE_UNIX_NLINK"
  26900. value="unix::nlink"
  26901. c:type="G_FILE_ATTRIBUTE_UNIX_NLINK">
  26902. <doc xml:space="preserve">A key in the "unix" namespace for getting the number of hard links
  26903. for a file. See lstat() documentation. This attribute is only available
  26904. for UNIX file systems. Corresponding #GFileAttributeType is
  26905. %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26906. <type name="utf8" c:type="gchar*"/>
  26907. </constant>
  26908. <constant name="FILE_ATTRIBUTE_UNIX_RDEV"
  26909. value="unix::rdev"
  26910. c:type="G_FILE_ATTRIBUTE_UNIX_RDEV">
  26911. <doc xml:space="preserve">A key in the "unix" namespace for getting the device ID for the file
  26912. (if it is a special file). See lstat() documentation. This attribute
  26913. is only available for UNIX file systems. Corresponding #GFileAttributeType
  26914. is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26915. <type name="utf8" c:type="gchar*"/>
  26916. </constant>
  26917. <constant name="FILE_ATTRIBUTE_UNIX_UID"
  26918. value="unix::uid"
  26919. c:type="G_FILE_ATTRIBUTE_UNIX_UID">
  26920. <doc xml:space="preserve">A key in the "unix" namespace for getting the user ID for the file.
  26921. This attribute is only available for UNIX file systems.
  26922. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.</doc>
  26923. <type name="utf8" c:type="gchar*"/>
  26924. </constant>
  26925. <interface name="File"
  26926. c:symbol-prefix="file"
  26927. c:type="GFile"
  26928. glib:type-name="GFile"
  26929. glib:get-type="g_file_get_type"
  26930. glib:type-struct="FileIface">
  26931. <doc xml:space="preserve">#GFile is a high level abstraction for manipulating files on a
  26932. virtual file system. #GFiles are lightweight, immutable objects
  26933. that do no I/O upon creation. It is necessary to understand that
  26934. #GFile objects do not represent files, merely an identifier for a
  26935. file. All file content I/O is implemented as streaming operations
  26936. (see #GInputStream and #GOutputStream).
  26937. To construct a #GFile, you can use:
  26938. - g_file_new_for_path() if you have a path.
  26939. - g_file_new_for_uri() if you have a URI.
  26940. - g_file_new_for_commandline_arg() for a command line argument.
  26941. - g_file_new_tmp() to create a temporary file from a template.
  26942. - g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name().
  26943. One way to think of a #GFile is as an abstraction of a pathname. For
  26944. normal files the system pathname is what is stored internally, but as
  26945. #GFiles are extensible it could also be something else that corresponds
  26946. to a pathname in a userspace implementation of a filesystem.
  26947. #GFiles make up hierarchies of directories and files that correspond to
  26948. the files on a filesystem. You can move through the file system with
  26949. #GFile using g_file_get_parent() to get an identifier for the parent
  26950. directory, g_file_get_child() to get a child within a directory,
  26951. g_file_resolve_relative_path() to resolve a relative path between two
  26952. #GFiles. There can be multiple hierarchies, so you may not end up at
  26953. the same root if you repeatedly call g_file_get_parent() on two different
  26954. files.
  26955. All #GFiles have a basename (get with g_file_get_basename()). These names
  26956. are byte strings that are used to identify the file on the filesystem
  26957. (relative to its parent directory) and there is no guarantees that they
  26958. have any particular charset encoding or even make any sense at all. If
  26959. you want to use filenames in a user interface you should use the display
  26960. name that you can get by requesting the
  26961. %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
  26962. This is guaranteed to be in UTF-8 and can be used in a user interface.
  26963. But always store the real basename or the #GFile to use to actually
  26964. access the file, because there is no way to go from a display name to
  26965. the actual name.
  26966. Using #GFile as an identifier has the same weaknesses as using a path
  26967. in that there may be multiple aliases for the same file. For instance,
  26968. hard or soft links may cause two different #GFiles to refer to the same
  26969. file. Other possible causes for aliases are: case insensitive filesystems,
  26970. short and long names on FAT/NTFS, or bind mounts in Linux. If you want to
  26971. check if two #GFiles point to the same file you can query for the
  26972. %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
  26973. canonicalization of pathnames passed in, so that trivial differences in
  26974. the path string used at creation (duplicated slashes, slash at end of
  26975. path, "." or ".." path segments, etc) does not create different #GFiles.
  26976. Many #GFile operations have both synchronous and asynchronous versions
  26977. to suit your application. Asynchronous versions of synchronous functions
  26978. simply have _async() appended to their function names. The asynchronous
  26979. I/O functions call a #GAsyncReadyCallback which is then used to finalize
  26980. the operation, producing a GAsyncResult which is then passed to the
  26981. function's matching _finish() operation.
  26982. It is highly recommended to use asynchronous calls when running within a
  26983. shared main loop, such as in the main thread of an application. This avoids
  26984. I/O operations blocking other sources on the main loop from being dispatched.
  26985. Synchronous I/O operations should be performed from worker threads. See the
  26986. [introduction to asynchronous programming section][async-programming] for
  26987. more.
  26988. Some #GFile operations almost always take a noticeable amount of time, and
  26989. so do not have synchronous analogs. Notable cases include:
  26990. - g_file_mount_mountable() to mount a mountable file.
  26991. - g_file_unmount_mountable_with_operation() to unmount a mountable file.
  26992. - g_file_eject_mountable_with_operation() to eject a mountable file.
  26993. ## Entity Tags # {#gfile-etag}
  26994. One notable feature of #GFiles are entity tags, or "etags" for
  26995. short. Entity tags are somewhat like a more abstract version of the
  26996. traditional mtime, and can be used to quickly determine if the file
  26997. has been modified from the version on the file system. See the
  26998. HTTP 1.1
  26999. [specification](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)
  27000. for HTTP Etag headers, which are a very similar concept.</doc>
  27001. <function name="new_for_commandline_arg"
  27002. c:identifier="g_file_new_for_commandline_arg">
  27003. <doc xml:space="preserve">Creates a #GFile with the given argument from the command line.
  27004. The value of @arg can be either a URI, an absolute path or a
  27005. relative path resolved relative to the current working directory.
  27006. This operation never fails, but the returned object might not
  27007. support any I/O operation if @arg points to a malformed path.
  27008. Note that on Windows, this function expects its argument to be in
  27009. UTF-8 -- not the system code page. This means that you
  27010. should not use this function with string from argv as it is passed
  27011. to main(). g_win32_get_command_line() will return a UTF-8 version of
  27012. the commandline. #GApplication also uses UTF-8 but
  27013. g_application_command_line_create_file_for_arg() may be more useful
  27014. for you there. It is also always possible to use this function with
  27015. #GOptionContext arguments of type %G_OPTION_ARG_FILENAME.</doc>
  27016. <return-value transfer-ownership="full">
  27017. <doc xml:space="preserve">a new #GFile.
  27018. Free the returned object with g_object_unref().</doc>
  27019. <type name="File" c:type="GFile*"/>
  27020. </return-value>
  27021. <parameters>
  27022. <parameter name="arg" transfer-ownership="none">
  27023. <doc xml:space="preserve">a command line string</doc>
  27024. <type name="utf8" c:type="const char*"/>
  27025. </parameter>
  27026. </parameters>
  27027. </function>
  27028. <function name="new_for_commandline_arg_and_cwd"
  27029. c:identifier="g_file_new_for_commandline_arg_and_cwd"
  27030. version="2.36">
  27031. <doc xml:space="preserve">Creates a #GFile with the given argument from the command line.
  27032. This function is similar to g_file_new_for_commandline_arg() except
  27033. that it allows for passing the current working directory as an
  27034. argument instead of using the current working directory of the
  27035. process.
  27036. This is useful if the commandline argument was given in a context
  27037. other than the invocation of the current process.
  27038. See also g_application_command_line_create_file_for_arg().</doc>
  27039. <return-value transfer-ownership="full">
  27040. <doc xml:space="preserve">a new #GFile</doc>
  27041. <type name="File" c:type="GFile*"/>
  27042. </return-value>
  27043. <parameters>
  27044. <parameter name="arg" transfer-ownership="none">
  27045. <doc xml:space="preserve">a command line string</doc>
  27046. <type name="utf8" c:type="const gchar*"/>
  27047. </parameter>
  27048. <parameter name="cwd" transfer-ownership="none">
  27049. <doc xml:space="preserve">the current working directory of the commandline</doc>
  27050. <type name="utf8" c:type="const gchar*"/>
  27051. </parameter>
  27052. </parameters>
  27053. </function>
  27054. <function name="new_for_path" c:identifier="g_file_new_for_path">
  27055. <doc xml:space="preserve">Constructs a #GFile for a given path. This operation never
  27056. fails, but the returned object might not support any I/O
  27057. operation if @path is malformed.</doc>
  27058. <return-value transfer-ownership="full">
  27059. <doc xml:space="preserve">a new #GFile for the given @path.
  27060. Free the returned object with g_object_unref().</doc>
  27061. <type name="File" c:type="GFile*"/>
  27062. </return-value>
  27063. <parameters>
  27064. <parameter name="path" transfer-ownership="none">
  27065. <doc xml:space="preserve">a string containing a relative or absolute path.
  27066. The string must be encoded in the glib filename encoding.</doc>
  27067. <type name="utf8" c:type="const char*"/>
  27068. </parameter>
  27069. </parameters>
  27070. </function>
  27071. <function name="new_for_uri" c:identifier="g_file_new_for_uri">
  27072. <doc xml:space="preserve">Constructs a #GFile for a given URI. This operation never
  27073. fails, but the returned object might not support any I/O
  27074. operation if @uri is malformed or if the uri type is
  27075. not supported.</doc>
  27076. <return-value transfer-ownership="full">
  27077. <doc xml:space="preserve">a new #GFile for the given @uri.
  27078. Free the returned object with g_object_unref().</doc>
  27079. <type name="File" c:type="GFile*"/>
  27080. </return-value>
  27081. <parameters>
  27082. <parameter name="uri" transfer-ownership="none">
  27083. <doc xml:space="preserve">a UTF-8 string containing a URI</doc>
  27084. <type name="utf8" c:type="const char*"/>
  27085. </parameter>
  27086. </parameters>
  27087. </function>
  27088. <function name="new_tmp"
  27089. c:identifier="g_file_new_tmp"
  27090. version="2.32"
  27091. throws="1">
  27092. <doc xml:space="preserve">Opens a file in the preferred directory for temporary files (as
  27093. returned by g_get_tmp_dir()) and returns a #GFile and
  27094. #GFileIOStream pointing to it.
  27095. @tmpl should be a string in the GLib file name encoding
  27096. containing a sequence of six 'X' characters, and containing no
  27097. directory components. If it is %NULL, a default template is used.
  27098. Unlike the other #GFile constructors, this will return %NULL if
  27099. a temporary file could not be created.</doc>
  27100. <return-value transfer-ownership="full">
  27101. <doc xml:space="preserve">a new #GFile.
  27102. Free the returned object with g_object_unref().</doc>
  27103. <type name="File" c:type="GFile*"/>
  27104. </return-value>
  27105. <parameters>
  27106. <parameter name="tmpl"
  27107. transfer-ownership="none"
  27108. nullable="1"
  27109. allow-none="1">
  27110. <doc xml:space="preserve">Template for the file
  27111. name, as in g_file_open_tmp(), or %NULL for a default template</doc>
  27112. <type name="filename" c:type="char*"/>
  27113. </parameter>
  27114. <parameter name="iostream"
  27115. direction="out"
  27116. caller-allocates="0"
  27117. transfer-ownership="full">
  27118. <doc xml:space="preserve">on return, a #GFileIOStream for the created file</doc>
  27119. <type name="FileIOStream" c:type="GFileIOStream**"/>
  27120. </parameter>
  27121. </parameters>
  27122. </function>
  27123. <function name="parse_name" c:identifier="g_file_parse_name">
  27124. <doc xml:space="preserve">Constructs a #GFile with the given @parse_name (i.e. something
  27125. given by g_file_get_parse_name()). This operation never fails,
  27126. but the returned object might not support any I/O operation if
  27127. the @parse_name cannot be parsed.</doc>
  27128. <return-value transfer-ownership="full">
  27129. <doc xml:space="preserve">a new #GFile.</doc>
  27130. <type name="File" c:type="GFile*"/>
  27131. </return-value>
  27132. <parameters>
  27133. <parameter name="parse_name" transfer-ownership="none">
  27134. <doc xml:space="preserve">a file name or path to be parsed</doc>
  27135. <type name="utf8" c:type="const char*"/>
  27136. </parameter>
  27137. </parameters>
  27138. </function>
  27139. <virtual-method name="append_to" invoker="append_to" throws="1">
  27140. <doc xml:space="preserve">Gets an output stream for appending data to the file.
  27141. If the file doesn't already exist it is created.
  27142. By default files created are generally readable by everyone,
  27143. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  27144. will be made readable only to the current user, to the level that
  27145. is supported on the target filesystem.
  27146. If @cancellable is not %NULL, then the operation can be cancelled
  27147. by triggering the cancellable object from another thread. If the
  27148. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  27149. returned.
  27150. Some file systems don't allow all file names, and may return an
  27151. %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the
  27152. %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are
  27153. possible too, and depend on what kind of filesystem the file is on.</doc>
  27154. <return-value transfer-ownership="full">
  27155. <doc xml:space="preserve">a #GFileOutputStream, or %NULL on error.
  27156. Free the returned object with g_object_unref().</doc>
  27157. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  27158. </return-value>
  27159. <parameters>
  27160. <instance-parameter name="file" transfer-ownership="none">
  27161. <doc xml:space="preserve">input #GFile</doc>
  27162. <type name="File" c:type="GFile*"/>
  27163. </instance-parameter>
  27164. <parameter name="flags" transfer-ownership="none">
  27165. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  27166. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  27167. </parameter>
  27168. <parameter name="cancellable"
  27169. transfer-ownership="none"
  27170. nullable="1"
  27171. allow-none="1">
  27172. <doc xml:space="preserve">optional #GCancellable object,
  27173. %NULL to ignore</doc>
  27174. <type name="Cancellable" c:type="GCancellable*"/>
  27175. </parameter>
  27176. </parameters>
  27177. </virtual-method>
  27178. <virtual-method name="append_to_async" invoker="append_to_async">
  27179. <doc xml:space="preserve">Asynchronously opens @file for appending.
  27180. For more details, see g_file_append_to() which is
  27181. the synchronous version of this call.
  27182. When the operation is finished, @callback will be called.
  27183. You can then call g_file_append_to_finish() to get the result
  27184. of the operation.</doc>
  27185. <return-value transfer-ownership="none">
  27186. <type name="none" c:type="void"/>
  27187. </return-value>
  27188. <parameters>
  27189. <instance-parameter name="file" transfer-ownership="none">
  27190. <doc xml:space="preserve">input #GFile</doc>
  27191. <type name="File" c:type="GFile*"/>
  27192. </instance-parameter>
  27193. <parameter name="flags" transfer-ownership="none">
  27194. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  27195. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  27196. </parameter>
  27197. <parameter name="io_priority" transfer-ownership="none">
  27198. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  27199. <type name="gint" c:type="int"/>
  27200. </parameter>
  27201. <parameter name="cancellable"
  27202. transfer-ownership="none"
  27203. nullable="1"
  27204. allow-none="1">
  27205. <doc xml:space="preserve">optional #GCancellable object,
  27206. %NULL to ignore</doc>
  27207. <type name="Cancellable" c:type="GCancellable*"/>
  27208. </parameter>
  27209. <parameter name="callback"
  27210. transfer-ownership="none"
  27211. nullable="1"
  27212. allow-none="1"
  27213. scope="async"
  27214. closure="4">
  27215. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  27216. when the request is satisfied</doc>
  27217. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  27218. </parameter>
  27219. <parameter name="user_data"
  27220. transfer-ownership="none"
  27221. nullable="1"
  27222. allow-none="1"
  27223. closure="4">
  27224. <doc xml:space="preserve">the data to pass to callback function</doc>
  27225. <type name="gpointer" c:type="gpointer"/>
  27226. </parameter>
  27227. </parameters>
  27228. </virtual-method>
  27229. <virtual-method name="append_to_finish"
  27230. invoker="append_to_finish"
  27231. throws="1">
  27232. <doc xml:space="preserve">Finishes an asynchronous file append operation started with
  27233. g_file_append_to_async().</doc>
  27234. <return-value transfer-ownership="full">
  27235. <doc xml:space="preserve">a valid #GFileOutputStream
  27236. or %NULL on error.
  27237. Free the returned object with g_object_unref().</doc>
  27238. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  27239. </return-value>
  27240. <parameters>
  27241. <instance-parameter name="file" transfer-ownership="none">
  27242. <doc xml:space="preserve">input #GFile</doc>
  27243. <type name="File" c:type="GFile*"/>
  27244. </instance-parameter>
  27245. <parameter name="res" transfer-ownership="none">
  27246. <doc xml:space="preserve">#GAsyncResult</doc>
  27247. <type name="AsyncResult" c:type="GAsyncResult*"/>
  27248. </parameter>
  27249. </parameters>
  27250. </virtual-method>
  27251. <virtual-method name="copy" invoker="copy" throws="1">
  27252. <doc xml:space="preserve">Copies the file @source to the location specified by @destination.
  27253. Can not handle recursive copies of directories.
  27254. If the flag #G_FILE_COPY_OVERWRITE is specified an already
  27255. existing @destination file is overwritten.
  27256. If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
  27257. will be copied as symlinks, otherwise the target of the
  27258. @source symlink will be copied.
  27259. If @cancellable is not %NULL, then the operation can be cancelled by
  27260. triggering the cancellable object from another thread. If the operation
  27261. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  27262. If @progress_callback is not %NULL, then the operation can be monitored
  27263. by setting this to a #GFileProgressCallback function.
  27264. @progress_callback_data will be passed to this function. It is guaranteed
  27265. that this callback will be called after all data has been transferred with
  27266. the total number of bytes copied during the operation.
  27267. If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error
  27268. is returned, independent on the status of the @destination.
  27269. If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then
  27270. the error %G_IO_ERROR_EXISTS is returned.
  27271. If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY
  27272. error is returned. If trying to overwrite a directory with a directory the
  27273. %G_IO_ERROR_WOULD_MERGE error is returned.
  27274. If the source is a directory and the target does not exist, or
  27275. #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the
  27276. %G_IO_ERROR_WOULD_RECURSE error is returned.
  27277. If you are interested in copying the #GFile object itself (not the on-disk
  27278. file), see g_file_dup().</doc>
  27279. <return-value transfer-ownership="none">
  27280. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise.</doc>
  27281. <type name="gboolean" c:type="gboolean"/>
  27282. </return-value>
  27283. <parameters>
  27284. <instance-parameter name="source" transfer-ownership="none">
  27285. <doc xml:space="preserve">input #GFile</doc>
  27286. <type name="File" c:type="GFile*"/>
  27287. </instance-parameter>
  27288. <parameter name="destination" transfer-ownership="none">
  27289. <doc xml:space="preserve">destination #GFile</doc>
  27290. <type name="File" c:type="GFile*"/>
  27291. </parameter>
  27292. <parameter name="flags" transfer-ownership="none">
  27293. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  27294. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  27295. </parameter>
  27296. <parameter name="cancellable"
  27297. transfer-ownership="none"
  27298. nullable="1"
  27299. allow-none="1">
  27300. <doc xml:space="preserve">optional #GCancellable object,
  27301. %NULL to ignore</doc>
  27302. <type name="Cancellable" c:type="GCancellable*"/>
  27303. </parameter>
  27304. <parameter name="progress_callback"
  27305. transfer-ownership="none"
  27306. nullable="1"
  27307. allow-none="1"
  27308. scope="call"
  27309. closure="4">
  27310. <doc xml:space="preserve">function to callback with
  27311. progress information, or %NULL if progress information is not needed</doc>
  27312. <type name="FileProgressCallback" c:type="GFileProgressCallback"/>
  27313. </parameter>
  27314. <parameter name="progress_callback_data"
  27315. transfer-ownership="none"
  27316. nullable="1"
  27317. allow-none="1">
  27318. <doc xml:space="preserve">user data to pass to @progress_callback</doc>
  27319. <type name="gpointer" c:type="gpointer"/>
  27320. </parameter>
  27321. </parameters>
  27322. </virtual-method>
  27323. <virtual-method name="copy_async"
  27324. invoker="copy_async"
  27325. introspectable="0">
  27326. <doc xml:space="preserve">Copies the file @source to the location specified by @destination
  27327. asynchronously. For details of the behaviour, see g_file_copy().
  27328. If @progress_callback is not %NULL, then that function that will be called
  27329. just like in g_file_copy(). The callback will run in the default main context
  27330. of the thread calling g_file_copy_async() — the same context as @callback is
  27331. run in.
  27332. When the operation is finished, @callback will be called. You can then call
  27333. g_file_copy_finish() to get the result of the operation.</doc>
  27334. <return-value transfer-ownership="none">
  27335. <type name="none" c:type="void"/>
  27336. </return-value>
  27337. <parameters>
  27338. <instance-parameter name="source" transfer-ownership="none">
  27339. <doc xml:space="preserve">input #GFile</doc>
  27340. <type name="File" c:type="GFile*"/>
  27341. </instance-parameter>
  27342. <parameter name="destination" transfer-ownership="none">
  27343. <doc xml:space="preserve">destination #GFile</doc>
  27344. <type name="File" c:type="GFile*"/>
  27345. </parameter>
  27346. <parameter name="flags" transfer-ownership="none">
  27347. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  27348. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  27349. </parameter>
  27350. <parameter name="io_priority" transfer-ownership="none">
  27351. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  27352. <type name="gint" c:type="int"/>
  27353. </parameter>
  27354. <parameter name="cancellable"
  27355. transfer-ownership="none"
  27356. nullable="1"
  27357. allow-none="1">
  27358. <doc xml:space="preserve">optional #GCancellable object,
  27359. %NULL to ignore</doc>
  27360. <type name="Cancellable" c:type="GCancellable*"/>
  27361. </parameter>
  27362. <parameter name="progress_callback"
  27363. transfer-ownership="none"
  27364. nullable="1"
  27365. allow-none="1"
  27366. closure="5">
  27367. <doc xml:space="preserve">function to callback with progress
  27368. information, or %NULL if progress information is not needed</doc>
  27369. <type name="FileProgressCallback" c:type="GFileProgressCallback"/>
  27370. </parameter>
  27371. <parameter name="progress_callback_data"
  27372. transfer-ownership="none"
  27373. nullable="1"
  27374. allow-none="1">
  27375. <doc xml:space="preserve">user data to pass to @progress_callback</doc>
  27376. <type name="gpointer" c:type="gpointer"/>
  27377. </parameter>
  27378. <parameter name="callback"
  27379. transfer-ownership="none"
  27380. nullable="1"
  27381. allow-none="1"
  27382. scope="async"
  27383. closure="7">
  27384. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  27385. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  27386. </parameter>
  27387. <parameter name="user_data"
  27388. transfer-ownership="none"
  27389. nullable="1"
  27390. allow-none="1"
  27391. closure="7">
  27392. <doc xml:space="preserve">the data to pass to callback function</doc>
  27393. <type name="gpointer" c:type="gpointer"/>
  27394. </parameter>
  27395. </parameters>
  27396. </virtual-method>
  27397. <virtual-method name="copy_finish" invoker="copy_finish" throws="1">
  27398. <doc xml:space="preserve">Finishes copying the file started with g_file_copy_async().</doc>
  27399. <return-value transfer-ownership="none">
  27400. <doc xml:space="preserve">a %TRUE on success, %FALSE on error.</doc>
  27401. <type name="gboolean" c:type="gboolean"/>
  27402. </return-value>
  27403. <parameters>
  27404. <instance-parameter name="file" transfer-ownership="none">
  27405. <doc xml:space="preserve">input #GFile</doc>
  27406. <type name="File" c:type="GFile*"/>
  27407. </instance-parameter>
  27408. <parameter name="res" transfer-ownership="none">
  27409. <doc xml:space="preserve">a #GAsyncResult</doc>
  27410. <type name="AsyncResult" c:type="GAsyncResult*"/>
  27411. </parameter>
  27412. </parameters>
  27413. </virtual-method>
  27414. <virtual-method name="create" invoker="create" throws="1">
  27415. <doc xml:space="preserve">Creates a new file and returns an output stream for writing to it.
  27416. The file must not already exist.
  27417. By default files created are generally readable by everyone,
  27418. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  27419. will be made readable only to the current user, to the level
  27420. that is supported on the target filesystem.
  27421. If @cancellable is not %NULL, then the operation can be cancelled
  27422. by triggering the cancellable object from another thread. If the
  27423. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  27424. returned.
  27425. If a file or directory with this name already exists the
  27426. %G_IO_ERROR_EXISTS error will be returned. Some file systems don't
  27427. allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME
  27428. error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will
  27429. be returned. Other errors are possible too, and depend on what kind
  27430. of filesystem the file is on.</doc>
  27431. <return-value transfer-ownership="full">
  27432. <doc xml:space="preserve">a #GFileOutputStream for the newly created
  27433. file, or %NULL on error.
  27434. Free the returned object with g_object_unref().</doc>
  27435. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  27436. </return-value>
  27437. <parameters>
  27438. <instance-parameter name="file" transfer-ownership="none">
  27439. <doc xml:space="preserve">input #GFile</doc>
  27440. <type name="File" c:type="GFile*"/>
  27441. </instance-parameter>
  27442. <parameter name="flags" transfer-ownership="none">
  27443. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  27444. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  27445. </parameter>
  27446. <parameter name="cancellable"
  27447. transfer-ownership="none"
  27448. nullable="1"
  27449. allow-none="1">
  27450. <doc xml:space="preserve">optional #GCancellable object,
  27451. %NULL to ignore</doc>
  27452. <type name="Cancellable" c:type="GCancellable*"/>
  27453. </parameter>
  27454. </parameters>
  27455. </virtual-method>
  27456. <virtual-method name="create_async" invoker="create_async">
  27457. <doc xml:space="preserve">Asynchronously creates a new file and returns an output stream
  27458. for writing to it. The file must not already exist.
  27459. For more details, see g_file_create() which is
  27460. the synchronous version of this call.
  27461. When the operation is finished, @callback will be called.
  27462. You can then call g_file_create_finish() to get the result
  27463. of the operation.</doc>
  27464. <return-value transfer-ownership="none">
  27465. <type name="none" c:type="void"/>
  27466. </return-value>
  27467. <parameters>
  27468. <instance-parameter name="file" transfer-ownership="none">
  27469. <doc xml:space="preserve">input #GFile</doc>
  27470. <type name="File" c:type="GFile*"/>
  27471. </instance-parameter>
  27472. <parameter name="flags" transfer-ownership="none">
  27473. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  27474. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  27475. </parameter>
  27476. <parameter name="io_priority" transfer-ownership="none">
  27477. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  27478. <type name="gint" c:type="int"/>
  27479. </parameter>
  27480. <parameter name="cancellable"
  27481. transfer-ownership="none"
  27482. nullable="1"
  27483. allow-none="1">
  27484. <doc xml:space="preserve">optional #GCancellable object,
  27485. %NULL to ignore</doc>
  27486. <type name="Cancellable" c:type="GCancellable*"/>
  27487. </parameter>
  27488. <parameter name="callback"
  27489. transfer-ownership="none"
  27490. nullable="1"
  27491. allow-none="1"
  27492. scope="async"
  27493. closure="4">
  27494. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  27495. when the request is satisfied</doc>
  27496. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  27497. </parameter>
  27498. <parameter name="user_data"
  27499. transfer-ownership="none"
  27500. nullable="1"
  27501. allow-none="1"
  27502. closure="4">
  27503. <doc xml:space="preserve">the data to pass to callback function</doc>
  27504. <type name="gpointer" c:type="gpointer"/>
  27505. </parameter>
  27506. </parameters>
  27507. </virtual-method>
  27508. <virtual-method name="create_finish" invoker="create_finish" throws="1">
  27509. <doc xml:space="preserve">Finishes an asynchronous file create operation started with
  27510. g_file_create_async().</doc>
  27511. <return-value transfer-ownership="full">
  27512. <doc xml:space="preserve">a #GFileOutputStream or %NULL on error.
  27513. Free the returned object with g_object_unref().</doc>
  27514. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  27515. </return-value>
  27516. <parameters>
  27517. <instance-parameter name="file" transfer-ownership="none">
  27518. <doc xml:space="preserve">input #GFile</doc>
  27519. <type name="File" c:type="GFile*"/>
  27520. </instance-parameter>
  27521. <parameter name="res" transfer-ownership="none">
  27522. <doc xml:space="preserve">a #GAsyncResult</doc>
  27523. <type name="AsyncResult" c:type="GAsyncResult*"/>
  27524. </parameter>
  27525. </parameters>
  27526. </virtual-method>
  27527. <virtual-method name="create_readwrite"
  27528. invoker="create_readwrite"
  27529. version="2.22"
  27530. throws="1">
  27531. <doc xml:space="preserve">Creates a new file and returns a stream for reading and
  27532. writing to it. The file must not already exist.
  27533. By default files created are generally readable by everyone,
  27534. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  27535. will be made readable only to the current user, to the level
  27536. that is supported on the target filesystem.
  27537. If @cancellable is not %NULL, then the operation can be cancelled
  27538. by triggering the cancellable object from another thread. If the
  27539. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  27540. returned.
  27541. If a file or directory with this name already exists, the
  27542. %G_IO_ERROR_EXISTS error will be returned. Some file systems don't
  27543. allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME
  27544. error, and if the name is too long, %G_IO_ERROR_FILENAME_TOO_LONG
  27545. will be returned. Other errors are possible too, and depend on what
  27546. kind of filesystem the file is on.
  27547. Note that in many non-local file cases read and write streams are
  27548. not supported, so make sure you really need to do read and write
  27549. streaming, rather than just opening for reading or writing.</doc>
  27550. <return-value transfer-ownership="full">
  27551. <doc xml:space="preserve">a #GFileIOStream for the newly created
  27552. file, or %NULL on error.
  27553. Free the returned object with g_object_unref().</doc>
  27554. <type name="FileIOStream" c:type="GFileIOStream*"/>
  27555. </return-value>
  27556. <parameters>
  27557. <instance-parameter name="file" transfer-ownership="none">
  27558. <doc xml:space="preserve">a #GFile</doc>
  27559. <type name="File" c:type="GFile*"/>
  27560. </instance-parameter>
  27561. <parameter name="flags" transfer-ownership="none">
  27562. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  27563. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  27564. </parameter>
  27565. <parameter name="cancellable"
  27566. transfer-ownership="none"
  27567. nullable="1"
  27568. allow-none="1">
  27569. <doc xml:space="preserve">optional #GCancellable object,
  27570. %NULL to ignore</doc>
  27571. <type name="Cancellable" c:type="GCancellable*"/>
  27572. </parameter>
  27573. </parameters>
  27574. </virtual-method>
  27575. <virtual-method name="create_readwrite_async"
  27576. invoker="create_readwrite_async"
  27577. version="2.22">
  27578. <doc xml:space="preserve">Asynchronously creates a new file and returns a stream
  27579. for reading and writing to it. The file must not already exist.
  27580. For more details, see g_file_create_readwrite() which is
  27581. the synchronous version of this call.
  27582. When the operation is finished, @callback will be called.
  27583. You can then call g_file_create_readwrite_finish() to get
  27584. the result of the operation.</doc>
  27585. <return-value transfer-ownership="none">
  27586. <type name="none" c:type="void"/>
  27587. </return-value>
  27588. <parameters>
  27589. <instance-parameter name="file" transfer-ownership="none">
  27590. <doc xml:space="preserve">input #GFile</doc>
  27591. <type name="File" c:type="GFile*"/>
  27592. </instance-parameter>
  27593. <parameter name="flags" transfer-ownership="none">
  27594. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  27595. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  27596. </parameter>
  27597. <parameter name="io_priority" transfer-ownership="none">
  27598. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  27599. <type name="gint" c:type="int"/>
  27600. </parameter>
  27601. <parameter name="cancellable"
  27602. transfer-ownership="none"
  27603. nullable="1"
  27604. allow-none="1">
  27605. <doc xml:space="preserve">optional #GCancellable object,
  27606. %NULL to ignore</doc>
  27607. <type name="Cancellable" c:type="GCancellable*"/>
  27608. </parameter>
  27609. <parameter name="callback"
  27610. transfer-ownership="none"
  27611. nullable="1"
  27612. allow-none="1"
  27613. scope="async"
  27614. closure="4">
  27615. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  27616. when the request is satisfied</doc>
  27617. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  27618. </parameter>
  27619. <parameter name="user_data"
  27620. transfer-ownership="none"
  27621. nullable="1"
  27622. allow-none="1"
  27623. closure="4">
  27624. <doc xml:space="preserve">the data to pass to callback function</doc>
  27625. <type name="gpointer" c:type="gpointer"/>
  27626. </parameter>
  27627. </parameters>
  27628. </virtual-method>
  27629. <virtual-method name="create_readwrite_finish"
  27630. invoker="create_readwrite_finish"
  27631. version="2.22"
  27632. throws="1">
  27633. <doc xml:space="preserve">Finishes an asynchronous file create operation started with
  27634. g_file_create_readwrite_async().</doc>
  27635. <return-value transfer-ownership="full">
  27636. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  27637. Free the returned object with g_object_unref().</doc>
  27638. <type name="FileIOStream" c:type="GFileIOStream*"/>
  27639. </return-value>
  27640. <parameters>
  27641. <instance-parameter name="file" transfer-ownership="none">
  27642. <doc xml:space="preserve">input #GFile</doc>
  27643. <type name="File" c:type="GFile*"/>
  27644. </instance-parameter>
  27645. <parameter name="res" transfer-ownership="none">
  27646. <doc xml:space="preserve">a #GAsyncResult</doc>
  27647. <type name="AsyncResult" c:type="GAsyncResult*"/>
  27648. </parameter>
  27649. </parameters>
  27650. </virtual-method>
  27651. <virtual-method name="delete_file" invoker="delete" throws="1">
  27652. <doc xml:space="preserve">Deletes a file. If the @file is a directory, it will only be
  27653. deleted if it is empty. This has the same semantics as g_unlink().
  27654. If @cancellable is not %NULL, then the operation can be cancelled by
  27655. triggering the cancellable object from another thread. If the operation
  27656. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  27657. <return-value transfer-ownership="none">
  27658. <doc xml:space="preserve">%TRUE if the file was deleted. %FALSE otherwise.</doc>
  27659. <type name="gboolean" c:type="gboolean"/>
  27660. </return-value>
  27661. <parameters>
  27662. <instance-parameter name="file" transfer-ownership="none">
  27663. <doc xml:space="preserve">input #GFile</doc>
  27664. <type name="File" c:type="GFile*"/>
  27665. </instance-parameter>
  27666. <parameter name="cancellable"
  27667. transfer-ownership="none"
  27668. nullable="1"
  27669. allow-none="1">
  27670. <doc xml:space="preserve">optional #GCancellable object,
  27671. %NULL to ignore</doc>
  27672. <type name="Cancellable" c:type="GCancellable*"/>
  27673. </parameter>
  27674. </parameters>
  27675. </virtual-method>
  27676. <virtual-method name="delete_file_async"
  27677. invoker="delete_async"
  27678. version="2.34">
  27679. <doc xml:space="preserve">Asynchronously delete a file. If the @file is a directory, it will
  27680. only be deleted if it is empty. This has the same semantics as
  27681. g_unlink().</doc>
  27682. <return-value transfer-ownership="none">
  27683. <type name="none" c:type="void"/>
  27684. </return-value>
  27685. <parameters>
  27686. <instance-parameter name="file" transfer-ownership="none">
  27687. <doc xml:space="preserve">input #GFile</doc>
  27688. <type name="File" c:type="GFile*"/>
  27689. </instance-parameter>
  27690. <parameter name="io_priority" transfer-ownership="none">
  27691. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  27692. <type name="gint" c:type="int"/>
  27693. </parameter>
  27694. <parameter name="cancellable"
  27695. transfer-ownership="none"
  27696. nullable="1"
  27697. allow-none="1">
  27698. <doc xml:space="preserve">optional #GCancellable object,
  27699. %NULL to ignore</doc>
  27700. <type name="Cancellable" c:type="GCancellable*"/>
  27701. </parameter>
  27702. <parameter name="callback"
  27703. transfer-ownership="none"
  27704. nullable="1"
  27705. allow-none="1"
  27706. scope="async"
  27707. closure="3">
  27708. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  27709. when the request is satisfied</doc>
  27710. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  27711. </parameter>
  27712. <parameter name="user_data"
  27713. transfer-ownership="none"
  27714. nullable="1"
  27715. allow-none="1"
  27716. closure="3">
  27717. <doc xml:space="preserve">the data to pass to callback function</doc>
  27718. <type name="gpointer" c:type="gpointer"/>
  27719. </parameter>
  27720. </parameters>
  27721. </virtual-method>
  27722. <virtual-method name="delete_file_finish"
  27723. invoker="delete_finish"
  27724. version="2.34"
  27725. throws="1">
  27726. <doc xml:space="preserve">Finishes deleting a file started with g_file_delete_async().</doc>
  27727. <return-value transfer-ownership="none">
  27728. <doc xml:space="preserve">%TRUE if the file was deleted. %FALSE otherwise.</doc>
  27729. <type name="gboolean" c:type="gboolean"/>
  27730. </return-value>
  27731. <parameters>
  27732. <instance-parameter name="file" transfer-ownership="none">
  27733. <doc xml:space="preserve">input #GFile</doc>
  27734. <type name="File" c:type="GFile*"/>
  27735. </instance-parameter>
  27736. <parameter name="result" transfer-ownership="none">
  27737. <doc xml:space="preserve">a #GAsyncResult</doc>
  27738. <type name="AsyncResult" c:type="GAsyncResult*"/>
  27739. </parameter>
  27740. </parameters>
  27741. </virtual-method>
  27742. <virtual-method name="dup" invoker="dup">
  27743. <doc xml:space="preserve">Duplicates a #GFile handle. This operation does not duplicate
  27744. the actual file or directory represented by the #GFile; see
  27745. g_file_copy() if attempting to copy a file.
  27746. This call does no blocking I/O.</doc>
  27747. <return-value transfer-ownership="full">
  27748. <doc xml:space="preserve">a new #GFile that is a duplicate
  27749. of the given #GFile.</doc>
  27750. <type name="File" c:type="GFile*"/>
  27751. </return-value>
  27752. <parameters>
  27753. <instance-parameter name="file" transfer-ownership="none">
  27754. <doc xml:space="preserve">input #GFile</doc>
  27755. <type name="File" c:type="GFile*"/>
  27756. </instance-parameter>
  27757. </parameters>
  27758. </virtual-method>
  27759. <virtual-method name="eject_mountable"
  27760. invoker="eject_mountable"
  27761. deprecated="1"
  27762. deprecated-version="2.22">
  27763. <doc xml:space="preserve">Starts an asynchronous eject on a mountable.
  27764. When this operation has completed, @callback will be called with
  27765. @user_user data, and the operation can be finalized with
  27766. g_file_eject_mountable_finish().
  27767. If @cancellable is not %NULL, then the operation can be cancelled by
  27768. triggering the cancellable object from another thread. If the operation
  27769. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  27770. <doc-deprecated xml:space="preserve">Use g_file_eject_mountable_with_operation() instead.</doc-deprecated>
  27771. <return-value transfer-ownership="none">
  27772. <type name="none" c:type="void"/>
  27773. </return-value>
  27774. <parameters>
  27775. <instance-parameter name="file" transfer-ownership="none">
  27776. <doc xml:space="preserve">input #GFile</doc>
  27777. <type name="File" c:type="GFile*"/>
  27778. </instance-parameter>
  27779. <parameter name="flags" transfer-ownership="none">
  27780. <doc xml:space="preserve">flags affecting the operation</doc>
  27781. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  27782. </parameter>
  27783. <parameter name="cancellable"
  27784. transfer-ownership="none"
  27785. nullable="1"
  27786. allow-none="1">
  27787. <doc xml:space="preserve">optional #GCancellable object,
  27788. %NULL to ignore</doc>
  27789. <type name="Cancellable" c:type="GCancellable*"/>
  27790. </parameter>
  27791. <parameter name="callback"
  27792. transfer-ownership="none"
  27793. nullable="1"
  27794. allow-none="1"
  27795. scope="async"
  27796. closure="3">
  27797. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  27798. when the request is satisfied, or %NULL</doc>
  27799. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  27800. </parameter>
  27801. <parameter name="user_data"
  27802. transfer-ownership="none"
  27803. nullable="1"
  27804. allow-none="1"
  27805. closure="3">
  27806. <doc xml:space="preserve">the data to pass to callback function</doc>
  27807. <type name="gpointer" c:type="gpointer"/>
  27808. </parameter>
  27809. </parameters>
  27810. </virtual-method>
  27811. <virtual-method name="eject_mountable_finish"
  27812. invoker="eject_mountable_finish"
  27813. deprecated="1"
  27814. deprecated-version="2.22"
  27815. throws="1">
  27816. <doc xml:space="preserve">Finishes an asynchronous eject operation started by
  27817. g_file_eject_mountable().</doc>
  27818. <doc-deprecated xml:space="preserve">Use g_file_eject_mountable_with_operation_finish()
  27819. instead.</doc-deprecated>
  27820. <return-value transfer-ownership="none">
  27821. <doc xml:space="preserve">%TRUE if the @file was ejected successfully.
  27822. %FALSE otherwise.</doc>
  27823. <type name="gboolean" c:type="gboolean"/>
  27824. </return-value>
  27825. <parameters>
  27826. <instance-parameter name="file" transfer-ownership="none">
  27827. <doc xml:space="preserve">input #GFile</doc>
  27828. <type name="File" c:type="GFile*"/>
  27829. </instance-parameter>
  27830. <parameter name="result" transfer-ownership="none">
  27831. <doc xml:space="preserve">a #GAsyncResult</doc>
  27832. <type name="AsyncResult" c:type="GAsyncResult*"/>
  27833. </parameter>
  27834. </parameters>
  27835. </virtual-method>
  27836. <virtual-method name="eject_mountable_with_operation"
  27837. invoker="eject_mountable_with_operation"
  27838. version="2.22">
  27839. <doc xml:space="preserve">Starts an asynchronous eject on a mountable.
  27840. When this operation has completed, @callback will be called with
  27841. @user_user data, and the operation can be finalized with
  27842. g_file_eject_mountable_with_operation_finish().
  27843. If @cancellable is not %NULL, then the operation can be cancelled by
  27844. triggering the cancellable object from another thread. If the operation
  27845. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  27846. <return-value transfer-ownership="none">
  27847. <type name="none" c:type="void"/>
  27848. </return-value>
  27849. <parameters>
  27850. <instance-parameter name="file" transfer-ownership="none">
  27851. <doc xml:space="preserve">input #GFile</doc>
  27852. <type name="File" c:type="GFile*"/>
  27853. </instance-parameter>
  27854. <parameter name="flags" transfer-ownership="none">
  27855. <doc xml:space="preserve">flags affecting the operation</doc>
  27856. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  27857. </parameter>
  27858. <parameter name="mount_operation"
  27859. transfer-ownership="none"
  27860. nullable="1"
  27861. allow-none="1">
  27862. <doc xml:space="preserve">a #GMountOperation,
  27863. or %NULL to avoid user interaction</doc>
  27864. <type name="MountOperation" c:type="GMountOperation*"/>
  27865. </parameter>
  27866. <parameter name="cancellable"
  27867. transfer-ownership="none"
  27868. nullable="1"
  27869. allow-none="1">
  27870. <doc xml:space="preserve">optional #GCancellable object,
  27871. %NULL to ignore</doc>
  27872. <type name="Cancellable" c:type="GCancellable*"/>
  27873. </parameter>
  27874. <parameter name="callback"
  27875. transfer-ownership="none"
  27876. nullable="1"
  27877. allow-none="1"
  27878. scope="async"
  27879. closure="4">
  27880. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  27881. when the request is satisfied, or %NULL</doc>
  27882. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  27883. </parameter>
  27884. <parameter name="user_data"
  27885. transfer-ownership="none"
  27886. nullable="1"
  27887. allow-none="1"
  27888. closure="4">
  27889. <doc xml:space="preserve">the data to pass to callback function</doc>
  27890. <type name="gpointer" c:type="gpointer"/>
  27891. </parameter>
  27892. </parameters>
  27893. </virtual-method>
  27894. <virtual-method name="eject_mountable_with_operation_finish"
  27895. invoker="eject_mountable_with_operation_finish"
  27896. version="2.22"
  27897. throws="1">
  27898. <doc xml:space="preserve">Finishes an asynchronous eject operation started by
  27899. g_file_eject_mountable_with_operation().</doc>
  27900. <return-value transfer-ownership="none">
  27901. <doc xml:space="preserve">%TRUE if the @file was ejected successfully.
  27902. %FALSE otherwise.</doc>
  27903. <type name="gboolean" c:type="gboolean"/>
  27904. </return-value>
  27905. <parameters>
  27906. <instance-parameter name="file" transfer-ownership="none">
  27907. <doc xml:space="preserve">input #GFile</doc>
  27908. <type name="File" c:type="GFile*"/>
  27909. </instance-parameter>
  27910. <parameter name="result" transfer-ownership="none">
  27911. <doc xml:space="preserve">a #GAsyncResult</doc>
  27912. <type name="AsyncResult" c:type="GAsyncResult*"/>
  27913. </parameter>
  27914. </parameters>
  27915. </virtual-method>
  27916. <virtual-method name="enumerate_children"
  27917. invoker="enumerate_children"
  27918. throws="1">
  27919. <doc xml:space="preserve">Gets the requested information about the files in a directory.
  27920. The result is a #GFileEnumerator object that will give out
  27921. #GFileInfo objects for all the files in the directory.
  27922. The @attributes value is a string that specifies the file
  27923. attributes that should be gathered. It is not an error if
  27924. it's not possible to read a particular requested attribute
  27925. from a file - it just won't be set. @attributes should
  27926. be a comma-separated list of attributes or attribute wildcards.
  27927. The wildcard "*" means all attributes, and a wildcard like
  27928. "standard::*" means all attributes in the standard namespace.
  27929. An example attribute query be "standard::*,owner::user".
  27930. The standard attributes are available as defines, like
  27931. #G_FILE_ATTRIBUTE_STANDARD_NAME.
  27932. If @cancellable is not %NULL, then the operation can be cancelled
  27933. by triggering the cancellable object from another thread. If the
  27934. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  27935. returned.
  27936. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
  27937. be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY
  27938. error will be returned. Other errors are possible too.</doc>
  27939. <return-value transfer-ownership="full">
  27940. <doc xml:space="preserve">A #GFileEnumerator if successful,
  27941. %NULL on error. Free the returned object with g_object_unref().</doc>
  27942. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  27943. </return-value>
  27944. <parameters>
  27945. <instance-parameter name="file" transfer-ownership="none">
  27946. <doc xml:space="preserve">input #GFile</doc>
  27947. <type name="File" c:type="GFile*"/>
  27948. </instance-parameter>
  27949. <parameter name="attributes" transfer-ownership="none">
  27950. <doc xml:space="preserve">an attribute query string</doc>
  27951. <type name="utf8" c:type="const char*"/>
  27952. </parameter>
  27953. <parameter name="flags" transfer-ownership="none">
  27954. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  27955. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  27956. </parameter>
  27957. <parameter name="cancellable"
  27958. transfer-ownership="none"
  27959. nullable="1"
  27960. allow-none="1">
  27961. <doc xml:space="preserve">optional #GCancellable object,
  27962. %NULL to ignore</doc>
  27963. <type name="Cancellable" c:type="GCancellable*"/>
  27964. </parameter>
  27965. </parameters>
  27966. </virtual-method>
  27967. <virtual-method name="enumerate_children_async"
  27968. invoker="enumerate_children_async">
  27969. <doc xml:space="preserve">Asynchronously gets the requested information about the files
  27970. in a directory. The result is a #GFileEnumerator object that will
  27971. give out #GFileInfo objects for all the files in the directory.
  27972. For more details, see g_file_enumerate_children() which is
  27973. the synchronous version of this call.
  27974. When the operation is finished, @callback will be called. You can
  27975. then call g_file_enumerate_children_finish() to get the result of
  27976. the operation.</doc>
  27977. <return-value transfer-ownership="none">
  27978. <type name="none" c:type="void"/>
  27979. </return-value>
  27980. <parameters>
  27981. <instance-parameter name="file" transfer-ownership="none">
  27982. <doc xml:space="preserve">input #GFile</doc>
  27983. <type name="File" c:type="GFile*"/>
  27984. </instance-parameter>
  27985. <parameter name="attributes" transfer-ownership="none">
  27986. <doc xml:space="preserve">an attribute query string</doc>
  27987. <type name="utf8" c:type="const char*"/>
  27988. </parameter>
  27989. <parameter name="flags" transfer-ownership="none">
  27990. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  27991. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  27992. </parameter>
  27993. <parameter name="io_priority" transfer-ownership="none">
  27994. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  27995. <type name="gint" c:type="int"/>
  27996. </parameter>
  27997. <parameter name="cancellable"
  27998. transfer-ownership="none"
  27999. nullable="1"
  28000. allow-none="1">
  28001. <doc xml:space="preserve">optional #GCancellable object,
  28002. %NULL to ignore</doc>
  28003. <type name="Cancellable" c:type="GCancellable*"/>
  28004. </parameter>
  28005. <parameter name="callback"
  28006. transfer-ownership="none"
  28007. nullable="1"
  28008. allow-none="1"
  28009. scope="async"
  28010. closure="5">
  28011. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  28012. request is satisfied</doc>
  28013. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  28014. </parameter>
  28015. <parameter name="user_data"
  28016. transfer-ownership="none"
  28017. nullable="1"
  28018. allow-none="1"
  28019. closure="5">
  28020. <doc xml:space="preserve">the data to pass to callback function</doc>
  28021. <type name="gpointer" c:type="gpointer"/>
  28022. </parameter>
  28023. </parameters>
  28024. </virtual-method>
  28025. <virtual-method name="enumerate_children_finish"
  28026. invoker="enumerate_children_finish"
  28027. throws="1">
  28028. <doc xml:space="preserve">Finishes an async enumerate children operation.
  28029. See g_file_enumerate_children_async().</doc>
  28030. <return-value transfer-ownership="full">
  28031. <doc xml:space="preserve">a #GFileEnumerator or %NULL
  28032. if an error occurred.
  28033. Free the returned object with g_object_unref().</doc>
  28034. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  28035. </return-value>
  28036. <parameters>
  28037. <instance-parameter name="file" transfer-ownership="none">
  28038. <doc xml:space="preserve">input #GFile</doc>
  28039. <type name="File" c:type="GFile*"/>
  28040. </instance-parameter>
  28041. <parameter name="res" transfer-ownership="none">
  28042. <doc xml:space="preserve">a #GAsyncResult</doc>
  28043. <type name="AsyncResult" c:type="GAsyncResult*"/>
  28044. </parameter>
  28045. </parameters>
  28046. </virtual-method>
  28047. <virtual-method name="equal" invoker="equal">
  28048. <doc xml:space="preserve">Checks if the two given #GFiles refer to the same file.
  28049. Note that two #GFiles that differ can still refer to the same
  28050. file on the filesystem due to various forms of filename
  28051. aliasing.
  28052. This call does no blocking I/O.</doc>
  28053. <return-value transfer-ownership="none">
  28054. <doc xml:space="preserve">%TRUE if @file1 and @file2 are equal.</doc>
  28055. <type name="gboolean" c:type="gboolean"/>
  28056. </return-value>
  28057. <parameters>
  28058. <instance-parameter name="file1" transfer-ownership="none">
  28059. <doc xml:space="preserve">the first #GFile</doc>
  28060. <type name="File" c:type="GFile*"/>
  28061. </instance-parameter>
  28062. <parameter name="file2" transfer-ownership="none">
  28063. <doc xml:space="preserve">the second #GFile</doc>
  28064. <type name="File" c:type="GFile*"/>
  28065. </parameter>
  28066. </parameters>
  28067. </virtual-method>
  28068. <virtual-method name="find_enclosing_mount"
  28069. invoker="find_enclosing_mount"
  28070. throws="1">
  28071. <doc xml:space="preserve">Gets a #GMount for the #GFile.
  28072. If the #GFileIface for @file does not have a mount (e.g.
  28073. possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND
  28074. and %NULL will be returned.
  28075. If @cancellable is not %NULL, then the operation can be cancelled by
  28076. triggering the cancellable object from another thread. If the operation
  28077. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  28078. <return-value transfer-ownership="full">
  28079. <doc xml:space="preserve">a #GMount where the @file is located
  28080. or %NULL on error.
  28081. Free the returned object with g_object_unref().</doc>
  28082. <type name="Mount" c:type="GMount*"/>
  28083. </return-value>
  28084. <parameters>
  28085. <instance-parameter name="file" transfer-ownership="none">
  28086. <doc xml:space="preserve">input #GFile</doc>
  28087. <type name="File" c:type="GFile*"/>
  28088. </instance-parameter>
  28089. <parameter name="cancellable"
  28090. transfer-ownership="none"
  28091. nullable="1"
  28092. allow-none="1">
  28093. <doc xml:space="preserve">optional #GCancellable object,
  28094. %NULL to ignore</doc>
  28095. <type name="Cancellable" c:type="GCancellable*"/>
  28096. </parameter>
  28097. </parameters>
  28098. </virtual-method>
  28099. <virtual-method name="find_enclosing_mount_async"
  28100. invoker="find_enclosing_mount_async">
  28101. <doc xml:space="preserve">Asynchronously gets the mount for the file.
  28102. For more details, see g_file_find_enclosing_mount() which is
  28103. the synchronous version of this call.
  28104. When the operation is finished, @callback will be called.
  28105. You can then call g_file_find_enclosing_mount_finish() to
  28106. get the result of the operation.</doc>
  28107. <return-value transfer-ownership="none">
  28108. <type name="none" c:type="void"/>
  28109. </return-value>
  28110. <parameters>
  28111. <instance-parameter name="file" transfer-ownership="none">
  28112. <doc xml:space="preserve">a #GFile</doc>
  28113. <type name="File" c:type="GFile*"/>
  28114. </instance-parameter>
  28115. <parameter name="io_priority" transfer-ownership="none">
  28116. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  28117. <type name="gint" c:type="int"/>
  28118. </parameter>
  28119. <parameter name="cancellable"
  28120. transfer-ownership="none"
  28121. nullable="1"
  28122. allow-none="1">
  28123. <doc xml:space="preserve">optional #GCancellable object,
  28124. %NULL to ignore</doc>
  28125. <type name="Cancellable" c:type="GCancellable*"/>
  28126. </parameter>
  28127. <parameter name="callback"
  28128. transfer-ownership="none"
  28129. nullable="1"
  28130. allow-none="1"
  28131. scope="async"
  28132. closure="3">
  28133. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  28134. when the request is satisfied</doc>
  28135. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  28136. </parameter>
  28137. <parameter name="user_data"
  28138. transfer-ownership="none"
  28139. nullable="1"
  28140. allow-none="1"
  28141. closure="3">
  28142. <doc xml:space="preserve">the data to pass to callback function</doc>
  28143. <type name="gpointer" c:type="gpointer"/>
  28144. </parameter>
  28145. </parameters>
  28146. </virtual-method>
  28147. <virtual-method name="find_enclosing_mount_finish"
  28148. invoker="find_enclosing_mount_finish"
  28149. throws="1">
  28150. <doc xml:space="preserve">Finishes an asynchronous find mount request.
  28151. See g_file_find_enclosing_mount_async().</doc>
  28152. <return-value transfer-ownership="full">
  28153. <doc xml:space="preserve">#GMount for given @file or %NULL on error.
  28154. Free the returned object with g_object_unref().</doc>
  28155. <type name="Mount" c:type="GMount*"/>
  28156. </return-value>
  28157. <parameters>
  28158. <instance-parameter name="file" transfer-ownership="none">
  28159. <doc xml:space="preserve">a #GFile</doc>
  28160. <type name="File" c:type="GFile*"/>
  28161. </instance-parameter>
  28162. <parameter name="res" transfer-ownership="none">
  28163. <doc xml:space="preserve">a #GAsyncResult</doc>
  28164. <type name="AsyncResult" c:type="GAsyncResult*"/>
  28165. </parameter>
  28166. </parameters>
  28167. </virtual-method>
  28168. <virtual-method name="get_basename" invoker="get_basename">
  28169. <doc xml:space="preserve">Gets the base name (the last component of the path) for a given #GFile.
  28170. If called for the top level of a system (such as the filesystem root
  28171. or a uri like sftp://host/) it will return a single directory separator
  28172. (and on Windows, possibly a drive letter).
  28173. The base name is a byte string (not UTF-8). It has no defined encoding
  28174. or rules other than it may not contain zero bytes. If you want to use
  28175. filenames in a user interface you should use the display name that you
  28176. can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
  28177. attribute with g_file_query_info().
  28178. This call does no blocking I/O.</doc>
  28179. <return-value transfer-ownership="full" nullable="1">
  28180. <doc xml:space="preserve">string containing the #GFile's base name, or
  28181. %NULL if given #GFile is invalid. The returned string should be
  28182. freed with g_free() when no longer needed.</doc>
  28183. <type name="utf8" c:type="char*"/>
  28184. </return-value>
  28185. <parameters>
  28186. <instance-parameter name="file" transfer-ownership="none">
  28187. <doc xml:space="preserve">input #GFile</doc>
  28188. <type name="File" c:type="GFile*"/>
  28189. </instance-parameter>
  28190. </parameters>
  28191. </virtual-method>
  28192. <virtual-method name="get_child_for_display_name"
  28193. invoker="get_child_for_display_name"
  28194. throws="1">
  28195. <doc xml:space="preserve">Gets the child of @file for a given @display_name (i.e. a UTF-8
  28196. version of the name). If this function fails, it returns %NULL
  28197. and @error will be set. This is very useful when constructing a
  28198. #GFile for a new file and the user entered the filename in the
  28199. user interface, for instance when you select a directory and
  28200. type a filename in the file selector.
  28201. This call does no blocking I/O.</doc>
  28202. <return-value transfer-ownership="full">
  28203. <doc xml:space="preserve">a #GFile to the specified child, or
  28204. %NULL if the display name couldn't be converted.
  28205. Free the returned object with g_object_unref().</doc>
  28206. <type name="File" c:type="GFile*"/>
  28207. </return-value>
  28208. <parameters>
  28209. <instance-parameter name="file" transfer-ownership="none">
  28210. <doc xml:space="preserve">input #GFile</doc>
  28211. <type name="File" c:type="GFile*"/>
  28212. </instance-parameter>
  28213. <parameter name="display_name" transfer-ownership="none">
  28214. <doc xml:space="preserve">string to a possible child</doc>
  28215. <type name="utf8" c:type="const char*"/>
  28216. </parameter>
  28217. </parameters>
  28218. </virtual-method>
  28219. <virtual-method name="get_parent" invoker="get_parent">
  28220. <doc xml:space="preserve">Gets the parent directory for the @file.
  28221. If the @file represents the root directory of the
  28222. file system, then %NULL will be returned.
  28223. This call does no blocking I/O.</doc>
  28224. <return-value transfer-ownership="full" nullable="1">
  28225. <doc xml:space="preserve">a #GFile structure to the
  28226. parent of the given #GFile or %NULL if there is no parent. Free
  28227. the returned object with g_object_unref().</doc>
  28228. <type name="File" c:type="GFile*"/>
  28229. </return-value>
  28230. <parameters>
  28231. <instance-parameter name="file" transfer-ownership="none">
  28232. <doc xml:space="preserve">input #GFile</doc>
  28233. <type name="File" c:type="GFile*"/>
  28234. </instance-parameter>
  28235. </parameters>
  28236. </virtual-method>
  28237. <virtual-method name="get_parse_name" invoker="get_parse_name">
  28238. <doc xml:space="preserve">Gets the parse name of the @file.
  28239. A parse name is a UTF-8 string that describes the
  28240. file such that one can get the #GFile back using
  28241. g_file_parse_name().
  28242. This is generally used to show the #GFile as a nice
  28243. full-pathname kind of string in a user interface,
  28244. like in a location entry.
  28245. For local files with names that can safely be converted
  28246. to UTF-8 the pathname is used, otherwise the IRI is used
  28247. (a form of URI that allows UTF-8 characters unescaped).
  28248. This call does no blocking I/O.</doc>
  28249. <return-value transfer-ownership="full">
  28250. <doc xml:space="preserve">a string containing the #GFile's parse name.
  28251. The returned string should be freed with g_free()
  28252. when no longer needed.</doc>
  28253. <type name="utf8" c:type="char*"/>
  28254. </return-value>
  28255. <parameters>
  28256. <instance-parameter name="file" transfer-ownership="none">
  28257. <doc xml:space="preserve">input #GFile</doc>
  28258. <type name="File" c:type="GFile*"/>
  28259. </instance-parameter>
  28260. </parameters>
  28261. </virtual-method>
  28262. <virtual-method name="get_path" invoker="get_path">
  28263. <doc xml:space="preserve">Gets the local pathname for #GFile, if one exists. If non-%NULL, this is
  28264. guaranteed to be an absolute, canonical path. It might contain symlinks.
  28265. This call does no blocking I/O.</doc>
  28266. <return-value transfer-ownership="full" nullable="1">
  28267. <doc xml:space="preserve">string containing the #GFile's path, or %NULL
  28268. if no such path exists. The returned string should be freed
  28269. with g_free() when no longer needed.</doc>
  28270. <type name="utf8" c:type="char*"/>
  28271. </return-value>
  28272. <parameters>
  28273. <instance-parameter name="file" transfer-ownership="none">
  28274. <doc xml:space="preserve">input #GFile</doc>
  28275. <type name="File" c:type="GFile*"/>
  28276. </instance-parameter>
  28277. </parameters>
  28278. </virtual-method>
  28279. <virtual-method name="get_relative_path" invoker="get_relative_path">
  28280. <doc xml:space="preserve">Gets the path for @descendant relative to @parent.
  28281. This call does no blocking I/O.</doc>
  28282. <return-value transfer-ownership="full" nullable="1">
  28283. <doc xml:space="preserve">string with the relative path from @descendant
  28284. to @parent, or %NULL if @descendant doesn't have @parent as
  28285. prefix. The returned string should be freed with g_free() when
  28286. no longer needed.</doc>
  28287. <type name="utf8" c:type="char*"/>
  28288. </return-value>
  28289. <parameters>
  28290. <instance-parameter name="parent" transfer-ownership="none">
  28291. <doc xml:space="preserve">input #GFile</doc>
  28292. <type name="File" c:type="GFile*"/>
  28293. </instance-parameter>
  28294. <parameter name="descendant" transfer-ownership="none">
  28295. <doc xml:space="preserve">input #GFile</doc>
  28296. <type name="File" c:type="GFile*"/>
  28297. </parameter>
  28298. </parameters>
  28299. </virtual-method>
  28300. <virtual-method name="get_uri" invoker="get_uri">
  28301. <doc xml:space="preserve">Gets the URI for the @file.
  28302. This call does no blocking I/O.</doc>
  28303. <return-value transfer-ownership="full">
  28304. <doc xml:space="preserve">a string containing the #GFile's URI.
  28305. The returned string should be freed with g_free()
  28306. when no longer needed.</doc>
  28307. <type name="utf8" c:type="char*"/>
  28308. </return-value>
  28309. <parameters>
  28310. <instance-parameter name="file" transfer-ownership="none">
  28311. <doc xml:space="preserve">input #GFile</doc>
  28312. <type name="File" c:type="GFile*"/>
  28313. </instance-parameter>
  28314. </parameters>
  28315. </virtual-method>
  28316. <virtual-method name="get_uri_scheme" invoker="get_uri_scheme">
  28317. <doc xml:space="preserve">Gets the URI scheme for a #GFile.
  28318. RFC 3986 decodes the scheme as:
  28319. |[
  28320. URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
  28321. ]|
  28322. Common schemes include "file", "http", "ftp", etc.
  28323. This call does no blocking I/O.</doc>
  28324. <return-value transfer-ownership="full">
  28325. <doc xml:space="preserve">a string containing the URI scheme for the given
  28326. #GFile. The returned string should be freed with g_free()
  28327. when no longer needed.</doc>
  28328. <type name="utf8" c:type="char*"/>
  28329. </return-value>
  28330. <parameters>
  28331. <instance-parameter name="file" transfer-ownership="none">
  28332. <doc xml:space="preserve">input #GFile</doc>
  28333. <type name="File" c:type="GFile*"/>
  28334. </instance-parameter>
  28335. </parameters>
  28336. </virtual-method>
  28337. <virtual-method name="has_uri_scheme" invoker="has_uri_scheme">
  28338. <doc xml:space="preserve">Checks to see if a #GFile has a given URI scheme.
  28339. This call does no blocking I/O.</doc>
  28340. <return-value transfer-ownership="none">
  28341. <doc xml:space="preserve">%TRUE if #GFile's backend supports the
  28342. given URI scheme, %FALSE if URI scheme is %NULL,
  28343. not supported, or #GFile is invalid.</doc>
  28344. <type name="gboolean" c:type="gboolean"/>
  28345. </return-value>
  28346. <parameters>
  28347. <instance-parameter name="file" transfer-ownership="none">
  28348. <doc xml:space="preserve">input #GFile</doc>
  28349. <type name="File" c:type="GFile*"/>
  28350. </instance-parameter>
  28351. <parameter name="uri_scheme" transfer-ownership="none">
  28352. <doc xml:space="preserve">a string containing a URI scheme</doc>
  28353. <type name="utf8" c:type="const char*"/>
  28354. </parameter>
  28355. </parameters>
  28356. </virtual-method>
  28357. <virtual-method name="hash" invoker="hash">
  28358. <doc xml:space="preserve">Creates a hash value for a #GFile.
  28359. This call does no blocking I/O.</doc>
  28360. <return-value transfer-ownership="none">
  28361. <doc xml:space="preserve">0 if @file is not a valid #GFile, otherwise an
  28362. integer that can be used as hash value for the #GFile.
  28363. This function is intended for easily hashing a #GFile to
  28364. add to a #GHashTable or similar data structure.</doc>
  28365. <type name="guint" c:type="guint"/>
  28366. </return-value>
  28367. <parameters>
  28368. <instance-parameter name="file" transfer-ownership="none">
  28369. <doc xml:space="preserve">#gconstpointer to a #GFile</doc>
  28370. <type name="File" c:type="GFile*"/>
  28371. </instance-parameter>
  28372. </parameters>
  28373. </virtual-method>
  28374. <virtual-method name="is_native" invoker="is_native">
  28375. <doc xml:space="preserve">Checks to see if a file is native to the platform.
  28376. A native file s one expressed in the platform-native filename format,
  28377. e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
  28378. as it might be on a locally mounted remote filesystem.
  28379. On some systems non-native files may be available using the native
  28380. filesystem via a userspace filesystem (FUSE), in these cases this call
  28381. will return %FALSE, but g_file_get_path() will still return a native path.
  28382. This call does no blocking I/O.</doc>
  28383. <return-value transfer-ownership="none">
  28384. <doc xml:space="preserve">%TRUE if @file is native</doc>
  28385. <type name="gboolean" c:type="gboolean"/>
  28386. </return-value>
  28387. <parameters>
  28388. <instance-parameter name="file" transfer-ownership="none">
  28389. <doc xml:space="preserve">input #GFile</doc>
  28390. <type name="File" c:type="GFile*"/>
  28391. </instance-parameter>
  28392. </parameters>
  28393. </virtual-method>
  28394. <virtual-method name="make_directory"
  28395. invoker="make_directory"
  28396. throws="1">
  28397. <doc xml:space="preserve">Creates a directory. Note that this will only create a child directory
  28398. of the immediate parent directory of the path or URI given by the #GFile.
  28399. To recursively create directories, see g_file_make_directory_with_parents().
  28400. This function will fail if the parent directory does not exist, setting
  28401. @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support
  28402. creating directories, this function will fail, setting @error to
  28403. %G_IO_ERROR_NOT_SUPPORTED.
  28404. For a local #GFile the newly created directory will have the default
  28405. (current) ownership and permissions of the current process.
  28406. If @cancellable is not %NULL, then the operation can be cancelled by
  28407. triggering the cancellable object from another thread. If the operation
  28408. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  28409. <return-value transfer-ownership="none">
  28410. <doc xml:space="preserve">%TRUE on successful creation, %FALSE otherwise.</doc>
  28411. <type name="gboolean" c:type="gboolean"/>
  28412. </return-value>
  28413. <parameters>
  28414. <instance-parameter name="file" transfer-ownership="none">
  28415. <doc xml:space="preserve">input #GFile</doc>
  28416. <type name="File" c:type="GFile*"/>
  28417. </instance-parameter>
  28418. <parameter name="cancellable"
  28419. transfer-ownership="none"
  28420. nullable="1"
  28421. allow-none="1">
  28422. <doc xml:space="preserve">optional #GCancellable object,
  28423. %NULL to ignore</doc>
  28424. <type name="Cancellable" c:type="GCancellable*"/>
  28425. </parameter>
  28426. </parameters>
  28427. </virtual-method>
  28428. <virtual-method name="make_directory_async"
  28429. invoker="make_directory_async"
  28430. version="2.38">
  28431. <doc xml:space="preserve">Asynchronously creates a directory.</doc>
  28432. <return-value transfer-ownership="none">
  28433. <type name="none" c:type="void"/>
  28434. </return-value>
  28435. <parameters>
  28436. <instance-parameter name="file" transfer-ownership="none">
  28437. <doc xml:space="preserve">input #GFile</doc>
  28438. <type name="File" c:type="GFile*"/>
  28439. </instance-parameter>
  28440. <parameter name="io_priority" transfer-ownership="none">
  28441. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  28442. <type name="gint" c:type="int"/>
  28443. </parameter>
  28444. <parameter name="cancellable"
  28445. transfer-ownership="none"
  28446. nullable="1"
  28447. allow-none="1">
  28448. <doc xml:space="preserve">optional #GCancellable object,
  28449. %NULL to ignore</doc>
  28450. <type name="Cancellable" c:type="GCancellable*"/>
  28451. </parameter>
  28452. <parameter name="callback"
  28453. transfer-ownership="none"
  28454. nullable="1"
  28455. allow-none="1"
  28456. scope="async"
  28457. closure="3">
  28458. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  28459. when the request is satisfied</doc>
  28460. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  28461. </parameter>
  28462. <parameter name="user_data"
  28463. transfer-ownership="none"
  28464. nullable="1"
  28465. allow-none="1"
  28466. closure="3">
  28467. <doc xml:space="preserve">the data to pass to callback function</doc>
  28468. <type name="gpointer" c:type="gpointer"/>
  28469. </parameter>
  28470. </parameters>
  28471. </virtual-method>
  28472. <virtual-method name="make_directory_finish"
  28473. invoker="make_directory_finish"
  28474. version="2.38"
  28475. throws="1">
  28476. <doc xml:space="preserve">Finishes an asynchronous directory creation, started with
  28477. g_file_make_directory_async().</doc>
  28478. <return-value transfer-ownership="none">
  28479. <doc xml:space="preserve">%TRUE on successful directory creation, %FALSE otherwise.</doc>
  28480. <type name="gboolean" c:type="gboolean"/>
  28481. </return-value>
  28482. <parameters>
  28483. <instance-parameter name="file" transfer-ownership="none">
  28484. <doc xml:space="preserve">input #GFile</doc>
  28485. <type name="File" c:type="GFile*"/>
  28486. </instance-parameter>
  28487. <parameter name="result" transfer-ownership="none">
  28488. <doc xml:space="preserve">a #GAsyncResult</doc>
  28489. <type name="AsyncResult" c:type="GAsyncResult*"/>
  28490. </parameter>
  28491. </parameters>
  28492. </virtual-method>
  28493. <virtual-method name="make_symbolic_link"
  28494. invoker="make_symbolic_link"
  28495. throws="1">
  28496. <doc xml:space="preserve">Creates a symbolic link named @file which contains the string
  28497. @symlink_value.
  28498. If @cancellable is not %NULL, then the operation can be cancelled by
  28499. triggering the cancellable object from another thread. If the operation
  28500. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  28501. <return-value transfer-ownership="none">
  28502. <doc xml:space="preserve">%TRUE on the creation of a new symlink, %FALSE otherwise.</doc>
  28503. <type name="gboolean" c:type="gboolean"/>
  28504. </return-value>
  28505. <parameters>
  28506. <instance-parameter name="file" transfer-ownership="none">
  28507. <doc xml:space="preserve">a #GFile with the name of the symlink to create</doc>
  28508. <type name="File" c:type="GFile*"/>
  28509. </instance-parameter>
  28510. <parameter name="symlink_value" transfer-ownership="none">
  28511. <doc xml:space="preserve">a string with the path for the target of the new symlink</doc>
  28512. <type name="utf8" c:type="const char*"/>
  28513. </parameter>
  28514. <parameter name="cancellable"
  28515. transfer-ownership="none"
  28516. nullable="1"
  28517. allow-none="1">
  28518. <doc xml:space="preserve">optional #GCancellable object,
  28519. %NULL to ignore</doc>
  28520. <type name="Cancellable" c:type="GCancellable*"/>
  28521. </parameter>
  28522. </parameters>
  28523. </virtual-method>
  28524. <virtual-method name="measure_disk_usage"
  28525. invoker="measure_disk_usage"
  28526. version="2.38"
  28527. introspectable="0"
  28528. throws="1">
  28529. <doc xml:space="preserve">Recursively measures the disk usage of @file.
  28530. This is essentially an analog of the 'du' command, but it also
  28531. reports the number of directories and non-directory files encountered
  28532. (including things like symbolic links).
  28533. By default, errors are only reported against the toplevel file
  28534. itself. Errors found while recursing are silently ignored, unless
  28535. %G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags.
  28536. The returned size, @disk_usage, is in bytes and should be formatted
  28537. with g_format_size() in order to get something reasonable for showing
  28538. in a user interface.
  28539. @progress_callback and @progress_data can be given to request
  28540. periodic progress updates while scanning. See the documentation for
  28541. #GFileMeasureProgressCallback for information about when and how the
  28542. callback will be invoked.</doc>
  28543. <return-value transfer-ownership="none">
  28544. <doc xml:space="preserve">%TRUE if successful, with the out parameters set.
  28545. %FALSE otherwise, with @error set.</doc>
  28546. <type name="gboolean" c:type="gboolean"/>
  28547. </return-value>
  28548. <parameters>
  28549. <instance-parameter name="file" transfer-ownership="none">
  28550. <doc xml:space="preserve">a #GFile</doc>
  28551. <type name="File" c:type="GFile*"/>
  28552. </instance-parameter>
  28553. <parameter name="flags" transfer-ownership="none">
  28554. <doc xml:space="preserve">#GFileMeasureFlags</doc>
  28555. <type name="FileMeasureFlags" c:type="GFileMeasureFlags"/>
  28556. </parameter>
  28557. <parameter name="cancellable"
  28558. transfer-ownership="none"
  28559. nullable="1"
  28560. allow-none="1">
  28561. <doc xml:space="preserve">optional #GCancellable</doc>
  28562. <type name="Cancellable" c:type="GCancellable*"/>
  28563. </parameter>
  28564. <parameter name="progress_callback"
  28565. transfer-ownership="none"
  28566. nullable="1"
  28567. allow-none="1"
  28568. closure="3">
  28569. <doc xml:space="preserve">a #GFileMeasureProgressCallback</doc>
  28570. <type name="FileMeasureProgressCallback"
  28571. c:type="GFileMeasureProgressCallback"/>
  28572. </parameter>
  28573. <parameter name="progress_data"
  28574. transfer-ownership="none"
  28575. nullable="1"
  28576. allow-none="1">
  28577. <doc xml:space="preserve">user_data for @progress_callback</doc>
  28578. <type name="gpointer" c:type="gpointer"/>
  28579. </parameter>
  28580. <parameter name="disk_usage"
  28581. direction="out"
  28582. caller-allocates="0"
  28583. transfer-ownership="full"
  28584. optional="1"
  28585. allow-none="1">
  28586. <doc xml:space="preserve">the number of bytes of disk space used</doc>
  28587. <type name="guint64" c:type="guint64*"/>
  28588. </parameter>
  28589. <parameter name="num_dirs"
  28590. direction="out"
  28591. caller-allocates="0"
  28592. transfer-ownership="full"
  28593. optional="1"
  28594. allow-none="1">
  28595. <doc xml:space="preserve">the number of directories encountered</doc>
  28596. <type name="guint64" c:type="guint64*"/>
  28597. </parameter>
  28598. <parameter name="num_files"
  28599. direction="out"
  28600. caller-allocates="0"
  28601. transfer-ownership="full"
  28602. optional="1"
  28603. allow-none="1">
  28604. <doc xml:space="preserve">the number of non-directories encountered</doc>
  28605. <type name="guint64" c:type="guint64*"/>
  28606. </parameter>
  28607. </parameters>
  28608. </virtual-method>
  28609. <virtual-method name="measure_disk_usage_async"
  28610. invoker="measure_disk_usage_async"
  28611. version="2.38"
  28612. introspectable="0">
  28613. <doc xml:space="preserve">Recursively measures the disk usage of @file.
  28614. This is the asynchronous version of g_file_measure_disk_usage(). See
  28615. there for more information.</doc>
  28616. <return-value transfer-ownership="none">
  28617. <type name="none" c:type="void"/>
  28618. </return-value>
  28619. <parameters>
  28620. <instance-parameter name="file" transfer-ownership="none">
  28621. <doc xml:space="preserve">a #GFile</doc>
  28622. <type name="File" c:type="GFile*"/>
  28623. </instance-parameter>
  28624. <parameter name="flags" transfer-ownership="none">
  28625. <doc xml:space="preserve">#GFileMeasureFlags</doc>
  28626. <type name="FileMeasureFlags" c:type="GFileMeasureFlags"/>
  28627. </parameter>
  28628. <parameter name="io_priority" transfer-ownership="none">
  28629. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  28630. <type name="gint" c:type="gint"/>
  28631. </parameter>
  28632. <parameter name="cancellable"
  28633. transfer-ownership="none"
  28634. nullable="1"
  28635. allow-none="1">
  28636. <doc xml:space="preserve">optional #GCancellable</doc>
  28637. <type name="Cancellable" c:type="GCancellable*"/>
  28638. </parameter>
  28639. <parameter name="progress_callback"
  28640. transfer-ownership="none"
  28641. nullable="1"
  28642. allow-none="1"
  28643. closure="4">
  28644. <doc xml:space="preserve">a #GFileMeasureProgressCallback</doc>
  28645. <type name="FileMeasureProgressCallback"
  28646. c:type="GFileMeasureProgressCallback"/>
  28647. </parameter>
  28648. <parameter name="progress_data"
  28649. transfer-ownership="none"
  28650. nullable="1"
  28651. allow-none="1">
  28652. <doc xml:space="preserve">user_data for @progress_callback</doc>
  28653. <type name="gpointer" c:type="gpointer"/>
  28654. </parameter>
  28655. <parameter name="callback"
  28656. transfer-ownership="none"
  28657. nullable="1"
  28658. allow-none="1"
  28659. scope="async"
  28660. closure="6">
  28661. <doc xml:space="preserve">a #GAsyncReadyCallback to call when complete</doc>
  28662. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  28663. </parameter>
  28664. <parameter name="user_data"
  28665. transfer-ownership="none"
  28666. nullable="1"
  28667. allow-none="1"
  28668. closure="6">
  28669. <doc xml:space="preserve">the data to pass to callback function</doc>
  28670. <type name="gpointer" c:type="gpointer"/>
  28671. </parameter>
  28672. </parameters>
  28673. </virtual-method>
  28674. <virtual-method name="measure_disk_usage_finish"
  28675. invoker="measure_disk_usage_finish"
  28676. version="2.38"
  28677. throws="1">
  28678. <doc xml:space="preserve">Collects the results from an earlier call to
  28679. g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for
  28680. more information.</doc>
  28681. <return-value transfer-ownership="none">
  28682. <doc xml:space="preserve">%TRUE if successful, with the out parameters set.
  28683. %FALSE otherwise, with @error set.</doc>
  28684. <type name="gboolean" c:type="gboolean"/>
  28685. </return-value>
  28686. <parameters>
  28687. <instance-parameter name="file" transfer-ownership="none">
  28688. <doc xml:space="preserve">a #GFile</doc>
  28689. <type name="File" c:type="GFile*"/>
  28690. </instance-parameter>
  28691. <parameter name="result" transfer-ownership="none">
  28692. <doc xml:space="preserve">the #GAsyncResult passed to your #GAsyncReadyCallback</doc>
  28693. <type name="AsyncResult" c:type="GAsyncResult*"/>
  28694. </parameter>
  28695. <parameter name="disk_usage"
  28696. direction="out"
  28697. caller-allocates="0"
  28698. transfer-ownership="full"
  28699. optional="1"
  28700. allow-none="1">
  28701. <doc xml:space="preserve">the number of bytes of disk space used</doc>
  28702. <type name="guint64" c:type="guint64*"/>
  28703. </parameter>
  28704. <parameter name="num_dirs"
  28705. direction="out"
  28706. caller-allocates="0"
  28707. transfer-ownership="full"
  28708. optional="1"
  28709. allow-none="1">
  28710. <doc xml:space="preserve">the number of directories encountered</doc>
  28711. <type name="guint64" c:type="guint64*"/>
  28712. </parameter>
  28713. <parameter name="num_files"
  28714. direction="out"
  28715. caller-allocates="0"
  28716. transfer-ownership="full"
  28717. optional="1"
  28718. allow-none="1">
  28719. <doc xml:space="preserve">the number of non-directories encountered</doc>
  28720. <type name="guint64" c:type="guint64*"/>
  28721. </parameter>
  28722. </parameters>
  28723. </virtual-method>
  28724. <virtual-method name="monitor_dir"
  28725. invoker="monitor_directory"
  28726. throws="1">
  28727. <doc xml:space="preserve">Obtains a directory monitor for the given file.
  28728. This may fail if directory monitoring is not supported.
  28729. If @cancellable is not %NULL, then the operation can be cancelled by
  28730. triggering the cancellable object from another thread. If the operation
  28731. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  28732. It does not make sense for @flags to contain
  28733. %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to
  28734. directories. It is not possible to monitor all the files in a
  28735. directory for changes made via hard links; if you want to do this then
  28736. you must register individual watches with g_file_monitor().</doc>
  28737. <return-value transfer-ownership="full">
  28738. <doc xml:space="preserve">a #GFileMonitor for the given @file,
  28739. or %NULL on error.
  28740. Free the returned object with g_object_unref().</doc>
  28741. <type name="FileMonitor" c:type="GFileMonitor*"/>
  28742. </return-value>
  28743. <parameters>
  28744. <instance-parameter name="file" transfer-ownership="none">
  28745. <doc xml:space="preserve">input #GFile</doc>
  28746. <type name="File" c:type="GFile*"/>
  28747. </instance-parameter>
  28748. <parameter name="flags" transfer-ownership="none">
  28749. <doc xml:space="preserve">a set of #GFileMonitorFlags</doc>
  28750. <type name="FileMonitorFlags" c:type="GFileMonitorFlags"/>
  28751. </parameter>
  28752. <parameter name="cancellable"
  28753. transfer-ownership="none"
  28754. nullable="1"
  28755. allow-none="1">
  28756. <doc xml:space="preserve">optional #GCancellable object,
  28757. %NULL to ignore</doc>
  28758. <type name="Cancellable" c:type="GCancellable*"/>
  28759. </parameter>
  28760. </parameters>
  28761. </virtual-method>
  28762. <virtual-method name="monitor_file" invoker="monitor_file" throws="1">
  28763. <doc xml:space="preserve">Obtains a file monitor for the given file. If no file notification
  28764. mechanism exists, then regular polling of the file is used.
  28765. If @cancellable is not %NULL, then the operation can be cancelled by
  28766. triggering the cancellable object from another thread. If the operation
  28767. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  28768. If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor
  28769. will also attempt to report changes made to the file via another
  28770. filename (ie, a hard link). Without this flag, you can only rely on
  28771. changes made through the filename contained in @file to be
  28772. reported. Using this flag may result in an increase in resource
  28773. usage, and may not have any effect depending on the #GFileMonitor
  28774. backend and/or filesystem type.</doc>
  28775. <return-value transfer-ownership="full">
  28776. <doc xml:space="preserve">a #GFileMonitor for the given @file,
  28777. or %NULL on error.
  28778. Free the returned object with g_object_unref().</doc>
  28779. <type name="FileMonitor" c:type="GFileMonitor*"/>
  28780. </return-value>
  28781. <parameters>
  28782. <instance-parameter name="file" transfer-ownership="none">
  28783. <doc xml:space="preserve">input #GFile</doc>
  28784. <type name="File" c:type="GFile*"/>
  28785. </instance-parameter>
  28786. <parameter name="flags" transfer-ownership="none">
  28787. <doc xml:space="preserve">a set of #GFileMonitorFlags</doc>
  28788. <type name="FileMonitorFlags" c:type="GFileMonitorFlags"/>
  28789. </parameter>
  28790. <parameter name="cancellable"
  28791. transfer-ownership="none"
  28792. nullable="1"
  28793. allow-none="1">
  28794. <doc xml:space="preserve">optional #GCancellable object,
  28795. %NULL to ignore</doc>
  28796. <type name="Cancellable" c:type="GCancellable*"/>
  28797. </parameter>
  28798. </parameters>
  28799. </virtual-method>
  28800. <virtual-method name="mount_enclosing_volume"
  28801. invoker="mount_enclosing_volume">
  28802. <doc xml:space="preserve">Starts a @mount_operation, mounting the volume that contains
  28803. the file @location.
  28804. When this operation has completed, @callback will be called with
  28805. @user_user data, and the operation can be finalized with
  28806. g_file_mount_enclosing_volume_finish().
  28807. If @cancellable is not %NULL, then the operation can be cancelled by
  28808. triggering the cancellable object from another thread. If the operation
  28809. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  28810. <return-value transfer-ownership="none">
  28811. <type name="none" c:type="void"/>
  28812. </return-value>
  28813. <parameters>
  28814. <instance-parameter name="location" transfer-ownership="none">
  28815. <doc xml:space="preserve">input #GFile</doc>
  28816. <type name="File" c:type="GFile*"/>
  28817. </instance-parameter>
  28818. <parameter name="flags" transfer-ownership="none">
  28819. <doc xml:space="preserve">flags affecting the operation</doc>
  28820. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  28821. </parameter>
  28822. <parameter name="mount_operation"
  28823. transfer-ownership="none"
  28824. nullable="1"
  28825. allow-none="1">
  28826. <doc xml:space="preserve">a #GMountOperation
  28827. or %NULL to avoid user interaction</doc>
  28828. <type name="MountOperation" c:type="GMountOperation*"/>
  28829. </parameter>
  28830. <parameter name="cancellable"
  28831. transfer-ownership="none"
  28832. nullable="1"
  28833. allow-none="1">
  28834. <doc xml:space="preserve">optional #GCancellable object,
  28835. %NULL to ignore</doc>
  28836. <type name="Cancellable" c:type="GCancellable*"/>
  28837. </parameter>
  28838. <parameter name="callback"
  28839. transfer-ownership="none"
  28840. nullable="1"
  28841. allow-none="1"
  28842. scope="async"
  28843. closure="4">
  28844. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  28845. when the request is satisfied, or %NULL</doc>
  28846. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  28847. </parameter>
  28848. <parameter name="user_data"
  28849. transfer-ownership="none"
  28850. nullable="1"
  28851. allow-none="1"
  28852. closure="4">
  28853. <doc xml:space="preserve">the data to pass to callback function</doc>
  28854. <type name="gpointer" c:type="gpointer"/>
  28855. </parameter>
  28856. </parameters>
  28857. </virtual-method>
  28858. <virtual-method name="mount_enclosing_volume_finish"
  28859. invoker="mount_enclosing_volume_finish"
  28860. throws="1">
  28861. <doc xml:space="preserve">Finishes a mount operation started by g_file_mount_enclosing_volume().</doc>
  28862. <return-value transfer-ownership="none">
  28863. <doc xml:space="preserve">%TRUE if successful. If an error has occurred,
  28864. this function will return %FALSE and set @error
  28865. appropriately if present.</doc>
  28866. <type name="gboolean" c:type="gboolean"/>
  28867. </return-value>
  28868. <parameters>
  28869. <instance-parameter name="location" transfer-ownership="none">
  28870. <doc xml:space="preserve">input #GFile</doc>
  28871. <type name="File" c:type="GFile*"/>
  28872. </instance-parameter>
  28873. <parameter name="result" transfer-ownership="none">
  28874. <doc xml:space="preserve">a #GAsyncResult</doc>
  28875. <type name="AsyncResult" c:type="GAsyncResult*"/>
  28876. </parameter>
  28877. </parameters>
  28878. </virtual-method>
  28879. <virtual-method name="mount_mountable" invoker="mount_mountable">
  28880. <doc xml:space="preserve">Mounts a file of type G_FILE_TYPE_MOUNTABLE.
  28881. Using @mount_operation, you can request callbacks when, for instance,
  28882. passwords are needed during authentication.
  28883. If @cancellable is not %NULL, then the operation can be cancelled by
  28884. triggering the cancellable object from another thread. If the operation
  28885. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  28886. When the operation is finished, @callback will be called.
  28887. You can then call g_file_mount_mountable_finish() to get
  28888. the result of the operation.</doc>
  28889. <return-value transfer-ownership="none">
  28890. <type name="none" c:type="void"/>
  28891. </return-value>
  28892. <parameters>
  28893. <instance-parameter name="file" transfer-ownership="none">
  28894. <doc xml:space="preserve">input #GFile</doc>
  28895. <type name="File" c:type="GFile*"/>
  28896. </instance-parameter>
  28897. <parameter name="flags" transfer-ownership="none">
  28898. <doc xml:space="preserve">flags affecting the operation</doc>
  28899. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  28900. </parameter>
  28901. <parameter name="mount_operation"
  28902. transfer-ownership="none"
  28903. nullable="1"
  28904. allow-none="1">
  28905. <doc xml:space="preserve">a #GMountOperation,
  28906. or %NULL to avoid user interaction</doc>
  28907. <type name="MountOperation" c:type="GMountOperation*"/>
  28908. </parameter>
  28909. <parameter name="cancellable"
  28910. transfer-ownership="none"
  28911. nullable="1"
  28912. allow-none="1">
  28913. <doc xml:space="preserve">optional #GCancellable object,
  28914. %NULL to ignore</doc>
  28915. <type name="Cancellable" c:type="GCancellable*"/>
  28916. </parameter>
  28917. <parameter name="callback"
  28918. transfer-ownership="none"
  28919. nullable="1"
  28920. allow-none="1"
  28921. scope="async"
  28922. closure="4">
  28923. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  28924. when the request is satisfied, or %NULL</doc>
  28925. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  28926. </parameter>
  28927. <parameter name="user_data"
  28928. transfer-ownership="none"
  28929. nullable="1"
  28930. allow-none="1"
  28931. closure="4">
  28932. <doc xml:space="preserve">the data to pass to callback function</doc>
  28933. <type name="gpointer" c:type="gpointer"/>
  28934. </parameter>
  28935. </parameters>
  28936. </virtual-method>
  28937. <virtual-method name="mount_mountable_finish"
  28938. invoker="mount_mountable_finish"
  28939. throws="1">
  28940. <doc xml:space="preserve">Finishes a mount operation. See g_file_mount_mountable() for details.
  28941. Finish an asynchronous mount operation that was started
  28942. with g_file_mount_mountable().</doc>
  28943. <return-value transfer-ownership="full">
  28944. <doc xml:space="preserve">a #GFile or %NULL on error.
  28945. Free the returned object with g_object_unref().</doc>
  28946. <type name="File" c:type="GFile*"/>
  28947. </return-value>
  28948. <parameters>
  28949. <instance-parameter name="file" transfer-ownership="none">
  28950. <doc xml:space="preserve">input #GFile</doc>
  28951. <type name="File" c:type="GFile*"/>
  28952. </instance-parameter>
  28953. <parameter name="result" transfer-ownership="none">
  28954. <doc xml:space="preserve">a #GAsyncResult</doc>
  28955. <type name="AsyncResult" c:type="GAsyncResult*"/>
  28956. </parameter>
  28957. </parameters>
  28958. </virtual-method>
  28959. <virtual-method name="move" invoker="move" throws="1">
  28960. <doc xml:space="preserve">Tries to move the file or directory @source to the location specified
  28961. by @destination. If native move operations are supported then this is
  28962. used, otherwise a copy + delete fallback is used. The native
  28963. implementation may support moving directories (for instance on moves
  28964. inside the same filesystem), but the fallback code does not.
  28965. If the flag #G_FILE_COPY_OVERWRITE is specified an already
  28966. existing @destination file is overwritten.
  28967. If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
  28968. will be copied as symlinks, otherwise the target of the
  28969. @source symlink will be copied.
  28970. If @cancellable is not %NULL, then the operation can be cancelled by
  28971. triggering the cancellable object from another thread. If the operation
  28972. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  28973. If @progress_callback is not %NULL, then the operation can be monitored
  28974. by setting this to a #GFileProgressCallback function.
  28975. @progress_callback_data will be passed to this function. It is
  28976. guaranteed that this callback will be called after all data has been
  28977. transferred with the total number of bytes copied during the operation.
  28978. If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND
  28979. error is returned, independent on the status of the @destination.
  28980. If #G_FILE_COPY_OVERWRITE is not specified and the target exists,
  28981. then the error %G_IO_ERROR_EXISTS is returned.
  28982. If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY
  28983. error is returned. If trying to overwrite a directory with a directory the
  28984. %G_IO_ERROR_WOULD_MERGE error is returned.
  28985. If the source is a directory and the target does not exist, or
  28986. #G_FILE_COPY_OVERWRITE is specified and the target is a file, then
  28987. the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native
  28988. move operation isn't available).</doc>
  28989. <return-value transfer-ownership="none">
  28990. <doc xml:space="preserve">%TRUE on successful move, %FALSE otherwise.</doc>
  28991. <type name="gboolean" c:type="gboolean"/>
  28992. </return-value>
  28993. <parameters>
  28994. <instance-parameter name="source" transfer-ownership="none">
  28995. <doc xml:space="preserve">#GFile pointing to the source location</doc>
  28996. <type name="File" c:type="GFile*"/>
  28997. </instance-parameter>
  28998. <parameter name="destination" transfer-ownership="none">
  28999. <doc xml:space="preserve">#GFile pointing to the destination location</doc>
  29000. <type name="File" c:type="GFile*"/>
  29001. </parameter>
  29002. <parameter name="flags" transfer-ownership="none">
  29003. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  29004. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  29005. </parameter>
  29006. <parameter name="cancellable"
  29007. transfer-ownership="none"
  29008. nullable="1"
  29009. allow-none="1">
  29010. <doc xml:space="preserve">optional #GCancellable object,
  29011. %NULL to ignore</doc>
  29012. <type name="Cancellable" c:type="GCancellable*"/>
  29013. </parameter>
  29014. <parameter name="progress_callback"
  29015. transfer-ownership="none"
  29016. nullable="1"
  29017. allow-none="1"
  29018. scope="call"
  29019. closure="4">
  29020. <doc xml:space="preserve">#GFileProgressCallback
  29021. function for updates</doc>
  29022. <type name="FileProgressCallback" c:type="GFileProgressCallback"/>
  29023. </parameter>
  29024. <parameter name="progress_callback_data"
  29025. transfer-ownership="none"
  29026. nullable="1"
  29027. allow-none="1">
  29028. <doc xml:space="preserve">gpointer to user data for
  29029. the callback function</doc>
  29030. <type name="gpointer" c:type="gpointer"/>
  29031. </parameter>
  29032. </parameters>
  29033. </virtual-method>
  29034. <virtual-method name="open_readwrite"
  29035. invoker="open_readwrite"
  29036. version="2.22"
  29037. throws="1">
  29038. <doc xml:space="preserve">Opens an existing file for reading and writing. The result is
  29039. a #GFileIOStream that can be used to read and write the contents
  29040. of the file.
  29041. If @cancellable is not %NULL, then the operation can be cancelled
  29042. by triggering the cancellable object from another thread. If the
  29043. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  29044. returned.
  29045. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
  29046. be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY
  29047. error will be returned. Other errors are possible too, and depend on
  29048. what kind of filesystem the file is on. Note that in many non-local
  29049. file cases read and write streams are not supported, so make sure you
  29050. really need to do read and write streaming, rather than just opening
  29051. for reading or writing.</doc>
  29052. <return-value transfer-ownership="full">
  29053. <doc xml:space="preserve">#GFileIOStream or %NULL on error.
  29054. Free the returned object with g_object_unref().</doc>
  29055. <type name="FileIOStream" c:type="GFileIOStream*"/>
  29056. </return-value>
  29057. <parameters>
  29058. <instance-parameter name="file" transfer-ownership="none">
  29059. <doc xml:space="preserve">#GFile to open</doc>
  29060. <type name="File" c:type="GFile*"/>
  29061. </instance-parameter>
  29062. <parameter name="cancellable"
  29063. transfer-ownership="none"
  29064. nullable="1"
  29065. allow-none="1">
  29066. <doc xml:space="preserve">a #GCancellable</doc>
  29067. <type name="Cancellable" c:type="GCancellable*"/>
  29068. </parameter>
  29069. </parameters>
  29070. </virtual-method>
  29071. <virtual-method name="open_readwrite_async"
  29072. invoker="open_readwrite_async"
  29073. version="2.22">
  29074. <doc xml:space="preserve">Asynchronously opens @file for reading and writing.
  29075. For more details, see g_file_open_readwrite() which is
  29076. the synchronous version of this call.
  29077. When the operation is finished, @callback will be called.
  29078. You can then call g_file_open_readwrite_finish() to get
  29079. the result of the operation.</doc>
  29080. <return-value transfer-ownership="none">
  29081. <type name="none" c:type="void"/>
  29082. </return-value>
  29083. <parameters>
  29084. <instance-parameter name="file" transfer-ownership="none">
  29085. <doc xml:space="preserve">input #GFile</doc>
  29086. <type name="File" c:type="GFile*"/>
  29087. </instance-parameter>
  29088. <parameter name="io_priority" transfer-ownership="none">
  29089. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  29090. <type name="gint" c:type="int"/>
  29091. </parameter>
  29092. <parameter name="cancellable"
  29093. transfer-ownership="none"
  29094. nullable="1"
  29095. allow-none="1">
  29096. <doc xml:space="preserve">optional #GCancellable object,
  29097. %NULL to ignore</doc>
  29098. <type name="Cancellable" c:type="GCancellable*"/>
  29099. </parameter>
  29100. <parameter name="callback"
  29101. transfer-ownership="none"
  29102. nullable="1"
  29103. allow-none="1"
  29104. scope="async"
  29105. closure="3">
  29106. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  29107. when the request is satisfied</doc>
  29108. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  29109. </parameter>
  29110. <parameter name="user_data"
  29111. transfer-ownership="none"
  29112. nullable="1"
  29113. allow-none="1"
  29114. closure="3">
  29115. <doc xml:space="preserve">the data to pass to callback function</doc>
  29116. <type name="gpointer" c:type="gpointer"/>
  29117. </parameter>
  29118. </parameters>
  29119. </virtual-method>
  29120. <virtual-method name="open_readwrite_finish"
  29121. invoker="open_readwrite_finish"
  29122. version="2.22"
  29123. throws="1">
  29124. <doc xml:space="preserve">Finishes an asynchronous file read operation started with
  29125. g_file_open_readwrite_async().</doc>
  29126. <return-value transfer-ownership="full">
  29127. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  29128. Free the returned object with g_object_unref().</doc>
  29129. <type name="FileIOStream" c:type="GFileIOStream*"/>
  29130. </return-value>
  29131. <parameters>
  29132. <instance-parameter name="file" transfer-ownership="none">
  29133. <doc xml:space="preserve">input #GFile</doc>
  29134. <type name="File" c:type="GFile*"/>
  29135. </instance-parameter>
  29136. <parameter name="res" transfer-ownership="none">
  29137. <doc xml:space="preserve">a #GAsyncResult</doc>
  29138. <type name="AsyncResult" c:type="GAsyncResult*"/>
  29139. </parameter>
  29140. </parameters>
  29141. </virtual-method>
  29142. <virtual-method name="poll_mountable"
  29143. invoker="poll_mountable"
  29144. version="2.22">
  29145. <doc xml:space="preserve">Polls a file of type #G_FILE_TYPE_MOUNTABLE.
  29146. If @cancellable is not %NULL, then the operation can be cancelled by
  29147. triggering the cancellable object from another thread. If the operation
  29148. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  29149. When the operation is finished, @callback will be called.
  29150. You can then call g_file_mount_mountable_finish() to get
  29151. the result of the operation.</doc>
  29152. <return-value transfer-ownership="none">
  29153. <type name="none" c:type="void"/>
  29154. </return-value>
  29155. <parameters>
  29156. <instance-parameter name="file" transfer-ownership="none">
  29157. <doc xml:space="preserve">input #GFile</doc>
  29158. <type name="File" c:type="GFile*"/>
  29159. </instance-parameter>
  29160. <parameter name="cancellable"
  29161. transfer-ownership="none"
  29162. nullable="1"
  29163. allow-none="1">
  29164. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  29165. <type name="Cancellable" c:type="GCancellable*"/>
  29166. </parameter>
  29167. <parameter name="callback"
  29168. transfer-ownership="none"
  29169. nullable="1"
  29170. allow-none="1"
  29171. scope="async"
  29172. closure="2">
  29173. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  29174. when the request is satisfied, or %NULL</doc>
  29175. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  29176. </parameter>
  29177. <parameter name="user_data"
  29178. transfer-ownership="none"
  29179. nullable="1"
  29180. allow-none="1"
  29181. closure="2">
  29182. <doc xml:space="preserve">the data to pass to callback function</doc>
  29183. <type name="gpointer" c:type="gpointer"/>
  29184. </parameter>
  29185. </parameters>
  29186. </virtual-method>
  29187. <virtual-method name="poll_mountable_finish"
  29188. invoker="poll_mountable_finish"
  29189. version="2.22"
  29190. throws="1">
  29191. <doc xml:space="preserve">Finishes a poll operation. See g_file_poll_mountable() for details.
  29192. Finish an asynchronous poll operation that was polled
  29193. with g_file_poll_mountable().</doc>
  29194. <return-value transfer-ownership="none">
  29195. <doc xml:space="preserve">%TRUE if the operation finished successfully. %FALSE
  29196. otherwise.</doc>
  29197. <type name="gboolean" c:type="gboolean"/>
  29198. </return-value>
  29199. <parameters>
  29200. <instance-parameter name="file" transfer-ownership="none">
  29201. <doc xml:space="preserve">input #GFile</doc>
  29202. <type name="File" c:type="GFile*"/>
  29203. </instance-parameter>
  29204. <parameter name="result" transfer-ownership="none">
  29205. <doc xml:space="preserve">a #GAsyncResult</doc>
  29206. <type name="AsyncResult" c:type="GAsyncResult*"/>
  29207. </parameter>
  29208. </parameters>
  29209. </virtual-method>
  29210. <virtual-method name="prefix_matches" invoker="has_prefix">
  29211. <doc xml:space="preserve">Checks whether @file has the prefix specified by @prefix.
  29212. In other words, if the names of initial elements of @file's
  29213. pathname match @prefix. Only full pathname elements are matched,
  29214. so a path like /foo is not considered a prefix of /foobar, only
  29215. of /foo/bar.
  29216. A #GFile is not a prefix of itself. If you want to check for
  29217. equality, use g_file_equal().
  29218. This call does no I/O, as it works purely on names. As such it can
  29219. sometimes return %FALSE even if @file is inside a @prefix (from a
  29220. filesystem point of view), because the prefix of @file is an alias
  29221. of @prefix.</doc>
  29222. <return-value transfer-ownership="none">
  29223. <doc xml:space="preserve">%TRUE if the @files's parent, grandparent, etc is @prefix,
  29224. %FALSE otherwise.</doc>
  29225. <type name="gboolean" c:type="gboolean"/>
  29226. </return-value>
  29227. <parameters>
  29228. <instance-parameter name="prefix" transfer-ownership="none">
  29229. <doc xml:space="preserve">input #GFile</doc>
  29230. <type name="File" c:type="GFile*"/>
  29231. </instance-parameter>
  29232. <parameter name="file" transfer-ownership="none">
  29233. <doc xml:space="preserve">input #GFile</doc>
  29234. <type name="File" c:type="GFile*"/>
  29235. </parameter>
  29236. </parameters>
  29237. </virtual-method>
  29238. <virtual-method name="query_filesystem_info"
  29239. invoker="query_filesystem_info"
  29240. throws="1">
  29241. <doc xml:space="preserve">Similar to g_file_query_info(), but obtains information
  29242. about the filesystem the @file is on, rather than the file itself.
  29243. For instance the amount of space available and the type of
  29244. the filesystem.
  29245. The @attributes value is a string that specifies the attributes
  29246. that should be gathered. It is not an error if it's not possible
  29247. to read a particular requested attribute from a file - it just
  29248. won't be set. @attributes should be a comma-separated list of
  29249. attributes or attribute wildcards. The wildcard "*" means all
  29250. attributes, and a wildcard like "filesystem::*" means all attributes
  29251. in the filesystem namespace. The standard namespace for filesystem
  29252. attributes is "filesystem". Common attributes of interest are
  29253. #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem
  29254. in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available),
  29255. and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
  29256. If @cancellable is not %NULL, then the operation can be cancelled
  29257. by triggering the cancellable object from another thread. If the
  29258. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  29259. returned.
  29260. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
  29261. be returned. Other errors are possible too, and depend on what
  29262. kind of filesystem the file is on.</doc>
  29263. <return-value transfer-ownership="full">
  29264. <doc xml:space="preserve">a #GFileInfo or %NULL if there was an error.
  29265. Free the returned object with g_object_unref().</doc>
  29266. <type name="FileInfo" c:type="GFileInfo*"/>
  29267. </return-value>
  29268. <parameters>
  29269. <instance-parameter name="file" transfer-ownership="none">
  29270. <doc xml:space="preserve">input #GFile</doc>
  29271. <type name="File" c:type="GFile*"/>
  29272. </instance-parameter>
  29273. <parameter name="attributes" transfer-ownership="none">
  29274. <doc xml:space="preserve">an attribute query string</doc>
  29275. <type name="utf8" c:type="const char*"/>
  29276. </parameter>
  29277. <parameter name="cancellable"
  29278. transfer-ownership="none"
  29279. nullable="1"
  29280. allow-none="1">
  29281. <doc xml:space="preserve">optional #GCancellable object,
  29282. %NULL to ignore</doc>
  29283. <type name="Cancellable" c:type="GCancellable*"/>
  29284. </parameter>
  29285. </parameters>
  29286. </virtual-method>
  29287. <virtual-method name="query_filesystem_info_async"
  29288. invoker="query_filesystem_info_async">
  29289. <doc xml:space="preserve">Asynchronously gets the requested information about the filesystem
  29290. that the specified @file is on. The result is a #GFileInfo object
  29291. that contains key-value attributes (such as type or size for the
  29292. file).
  29293. For more details, see g_file_query_filesystem_info() which is the
  29294. synchronous version of this call.
  29295. When the operation is finished, @callback will be called. You can
  29296. then call g_file_query_info_finish() to get the result of the
  29297. operation.</doc>
  29298. <return-value transfer-ownership="none">
  29299. <type name="none" c:type="void"/>
  29300. </return-value>
  29301. <parameters>
  29302. <instance-parameter name="file" transfer-ownership="none">
  29303. <doc xml:space="preserve">input #GFile</doc>
  29304. <type name="File" c:type="GFile*"/>
  29305. </instance-parameter>
  29306. <parameter name="attributes" transfer-ownership="none">
  29307. <doc xml:space="preserve">an attribute query string</doc>
  29308. <type name="utf8" c:type="const char*"/>
  29309. </parameter>
  29310. <parameter name="io_priority" transfer-ownership="none">
  29311. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  29312. <type name="gint" c:type="int"/>
  29313. </parameter>
  29314. <parameter name="cancellable"
  29315. transfer-ownership="none"
  29316. nullable="1"
  29317. allow-none="1">
  29318. <doc xml:space="preserve">optional #GCancellable object,
  29319. %NULL to ignore</doc>
  29320. <type name="Cancellable" c:type="GCancellable*"/>
  29321. </parameter>
  29322. <parameter name="callback"
  29323. transfer-ownership="none"
  29324. nullable="1"
  29325. allow-none="1"
  29326. scope="async"
  29327. closure="4">
  29328. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  29329. when the request is satisfied</doc>
  29330. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  29331. </parameter>
  29332. <parameter name="user_data"
  29333. transfer-ownership="none"
  29334. nullable="1"
  29335. allow-none="1"
  29336. closure="4">
  29337. <doc xml:space="preserve">the data to pass to callback function</doc>
  29338. <type name="gpointer" c:type="gpointer"/>
  29339. </parameter>
  29340. </parameters>
  29341. </virtual-method>
  29342. <virtual-method name="query_filesystem_info_finish"
  29343. invoker="query_filesystem_info_finish"
  29344. throws="1">
  29345. <doc xml:space="preserve">Finishes an asynchronous filesystem info query.
  29346. See g_file_query_filesystem_info_async().</doc>
  29347. <return-value transfer-ownership="full">
  29348. <doc xml:space="preserve">#GFileInfo for given @file
  29349. or %NULL on error.
  29350. Free the returned object with g_object_unref().</doc>
  29351. <type name="FileInfo" c:type="GFileInfo*"/>
  29352. </return-value>
  29353. <parameters>
  29354. <instance-parameter name="file" transfer-ownership="none">
  29355. <doc xml:space="preserve">input #GFile</doc>
  29356. <type name="File" c:type="GFile*"/>
  29357. </instance-parameter>
  29358. <parameter name="res" transfer-ownership="none">
  29359. <doc xml:space="preserve">a #GAsyncResult</doc>
  29360. <type name="AsyncResult" c:type="GAsyncResult*"/>
  29361. </parameter>
  29362. </parameters>
  29363. </virtual-method>
  29364. <virtual-method name="query_info" invoker="query_info" throws="1">
  29365. <doc xml:space="preserve">Gets the requested information about specified @file.
  29366. The result is a #GFileInfo object that contains key-value
  29367. attributes (such as the type or size of the file).
  29368. The @attributes value is a string that specifies the file
  29369. attributes that should be gathered. It is not an error if
  29370. it's not possible to read a particular requested attribute
  29371. from a file - it just won't be set. @attributes should be a
  29372. comma-separated list of attributes or attribute wildcards.
  29373. The wildcard "*" means all attributes, and a wildcard like
  29374. "standard::*" means all attributes in the standard namespace.
  29375. An example attribute query be "standard::*,owner::user".
  29376. The standard attributes are available as defines, like
  29377. #G_FILE_ATTRIBUTE_STANDARD_NAME.
  29378. If @cancellable is not %NULL, then the operation can be cancelled
  29379. by triggering the cancellable object from another thread. If the
  29380. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  29381. returned.
  29382. For symlinks, normally the information about the target of the
  29383. symlink is returned, rather than information about the symlink
  29384. itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS
  29385. in @flags the information about the symlink itself will be returned.
  29386. Also, for symlinks that point to non-existing files the information
  29387. about the symlink itself will be returned.
  29388. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be
  29389. returned. Other errors are possible too, and depend on what kind of
  29390. filesystem the file is on.</doc>
  29391. <return-value transfer-ownership="full">
  29392. <doc xml:space="preserve">a #GFileInfo for the given @file, or %NULL
  29393. on error. Free the returned object with g_object_unref().</doc>
  29394. <type name="FileInfo" c:type="GFileInfo*"/>
  29395. </return-value>
  29396. <parameters>
  29397. <instance-parameter name="file" transfer-ownership="none">
  29398. <doc xml:space="preserve">input #GFile</doc>
  29399. <type name="File" c:type="GFile*"/>
  29400. </instance-parameter>
  29401. <parameter name="attributes" transfer-ownership="none">
  29402. <doc xml:space="preserve">an attribute query string</doc>
  29403. <type name="utf8" c:type="const char*"/>
  29404. </parameter>
  29405. <parameter name="flags" transfer-ownership="none">
  29406. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  29407. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  29408. </parameter>
  29409. <parameter name="cancellable"
  29410. transfer-ownership="none"
  29411. nullable="1"
  29412. allow-none="1">
  29413. <doc xml:space="preserve">optional #GCancellable object,
  29414. %NULL to ignore</doc>
  29415. <type name="Cancellable" c:type="GCancellable*"/>
  29416. </parameter>
  29417. </parameters>
  29418. </virtual-method>
  29419. <virtual-method name="query_info_async" invoker="query_info_async">
  29420. <doc xml:space="preserve">Asynchronously gets the requested information about specified @file.
  29421. The result is a #GFileInfo object that contains key-value attributes
  29422. (such as type or size for the file).
  29423. For more details, see g_file_query_info() which is the synchronous
  29424. version of this call.
  29425. When the operation is finished, @callback will be called. You can
  29426. then call g_file_query_info_finish() to get the result of the operation.</doc>
  29427. <return-value transfer-ownership="none">
  29428. <type name="none" c:type="void"/>
  29429. </return-value>
  29430. <parameters>
  29431. <instance-parameter name="file" transfer-ownership="none">
  29432. <doc xml:space="preserve">input #GFile</doc>
  29433. <type name="File" c:type="GFile*"/>
  29434. </instance-parameter>
  29435. <parameter name="attributes" transfer-ownership="none">
  29436. <doc xml:space="preserve">an attribute query string</doc>
  29437. <type name="utf8" c:type="const char*"/>
  29438. </parameter>
  29439. <parameter name="flags" transfer-ownership="none">
  29440. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  29441. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  29442. </parameter>
  29443. <parameter name="io_priority" transfer-ownership="none">
  29444. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  29445. <type name="gint" c:type="int"/>
  29446. </parameter>
  29447. <parameter name="cancellable"
  29448. transfer-ownership="none"
  29449. nullable="1"
  29450. allow-none="1">
  29451. <doc xml:space="preserve">optional #GCancellable object,
  29452. %NULL to ignore</doc>
  29453. <type name="Cancellable" c:type="GCancellable*"/>
  29454. </parameter>
  29455. <parameter name="callback"
  29456. transfer-ownership="none"
  29457. nullable="1"
  29458. allow-none="1"
  29459. scope="async"
  29460. closure="5">
  29461. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  29462. request is satisfied</doc>
  29463. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  29464. </parameter>
  29465. <parameter name="user_data"
  29466. transfer-ownership="none"
  29467. nullable="1"
  29468. allow-none="1"
  29469. closure="5">
  29470. <doc xml:space="preserve">the data to pass to callback function</doc>
  29471. <type name="gpointer" c:type="gpointer"/>
  29472. </parameter>
  29473. </parameters>
  29474. </virtual-method>
  29475. <virtual-method name="query_info_finish"
  29476. invoker="query_info_finish"
  29477. throws="1">
  29478. <doc xml:space="preserve">Finishes an asynchronous file info query.
  29479. See g_file_query_info_async().</doc>
  29480. <return-value transfer-ownership="full">
  29481. <doc xml:space="preserve">#GFileInfo for given @file
  29482. or %NULL on error. Free the returned object with
  29483. g_object_unref().</doc>
  29484. <type name="FileInfo" c:type="GFileInfo*"/>
  29485. </return-value>
  29486. <parameters>
  29487. <instance-parameter name="file" transfer-ownership="none">
  29488. <doc xml:space="preserve">input #GFile</doc>
  29489. <type name="File" c:type="GFile*"/>
  29490. </instance-parameter>
  29491. <parameter name="res" transfer-ownership="none">
  29492. <doc xml:space="preserve">a #GAsyncResult</doc>
  29493. <type name="AsyncResult" c:type="GAsyncResult*"/>
  29494. </parameter>
  29495. </parameters>
  29496. </virtual-method>
  29497. <virtual-method name="query_settable_attributes"
  29498. invoker="query_settable_attributes"
  29499. throws="1">
  29500. <doc xml:space="preserve">Obtain the list of settable attributes for the file.
  29501. Returns the type and full attribute name of all the attributes
  29502. that can be set on this file. This doesn't mean setting it will
  29503. always succeed though, you might get an access failure, or some
  29504. specific file may not support a specific attribute.
  29505. If @cancellable is not %NULL, then the operation can be cancelled by
  29506. triggering the cancellable object from another thread. If the operation
  29507. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  29508. <return-value transfer-ownership="full">
  29509. <doc xml:space="preserve">a #GFileAttributeInfoList describing the settable attributes.
  29510. When you are done with it, release it with
  29511. g_file_attribute_info_list_unref()</doc>
  29512. <type name="FileAttributeInfoList" c:type="GFileAttributeInfoList*"/>
  29513. </return-value>
  29514. <parameters>
  29515. <instance-parameter name="file" transfer-ownership="none">
  29516. <doc xml:space="preserve">input #GFile</doc>
  29517. <type name="File" c:type="GFile*"/>
  29518. </instance-parameter>
  29519. <parameter name="cancellable"
  29520. transfer-ownership="none"
  29521. nullable="1"
  29522. allow-none="1">
  29523. <doc xml:space="preserve">optional #GCancellable object,
  29524. %NULL to ignore</doc>
  29525. <type name="Cancellable" c:type="GCancellable*"/>
  29526. </parameter>
  29527. </parameters>
  29528. </virtual-method>
  29529. <virtual-method name="query_writable_namespaces"
  29530. invoker="query_writable_namespaces"
  29531. throws="1">
  29532. <doc xml:space="preserve">Obtain the list of attribute namespaces where new attributes
  29533. can be created by a user. An example of this is extended
  29534. attributes (in the "xattr" namespace).
  29535. If @cancellable is not %NULL, then the operation can be cancelled by
  29536. triggering the cancellable object from another thread. If the operation
  29537. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  29538. <return-value transfer-ownership="full">
  29539. <doc xml:space="preserve">a #GFileAttributeInfoList describing the writable namespaces.
  29540. When you are done with it, release it with
  29541. g_file_attribute_info_list_unref()</doc>
  29542. <type name="FileAttributeInfoList" c:type="GFileAttributeInfoList*"/>
  29543. </return-value>
  29544. <parameters>
  29545. <instance-parameter name="file" transfer-ownership="none">
  29546. <doc xml:space="preserve">input #GFile</doc>
  29547. <type name="File" c:type="GFile*"/>
  29548. </instance-parameter>
  29549. <parameter name="cancellable"
  29550. transfer-ownership="none"
  29551. nullable="1"
  29552. allow-none="1">
  29553. <doc xml:space="preserve">optional #GCancellable object,
  29554. %NULL to ignore</doc>
  29555. <type name="Cancellable" c:type="GCancellable*"/>
  29556. </parameter>
  29557. </parameters>
  29558. </virtual-method>
  29559. <virtual-method name="read_async" invoker="read_async">
  29560. <doc xml:space="preserve">Asynchronously opens @file for reading.
  29561. For more details, see g_file_read() which is
  29562. the synchronous version of this call.
  29563. When the operation is finished, @callback will be called.
  29564. You can then call g_file_read_finish() to get the result
  29565. of the operation.</doc>
  29566. <return-value transfer-ownership="none">
  29567. <type name="none" c:type="void"/>
  29568. </return-value>
  29569. <parameters>
  29570. <instance-parameter name="file" transfer-ownership="none">
  29571. <doc xml:space="preserve">input #GFile</doc>
  29572. <type name="File" c:type="GFile*"/>
  29573. </instance-parameter>
  29574. <parameter name="io_priority" transfer-ownership="none">
  29575. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  29576. <type name="gint" c:type="int"/>
  29577. </parameter>
  29578. <parameter name="cancellable"
  29579. transfer-ownership="none"
  29580. nullable="1"
  29581. allow-none="1">
  29582. <doc xml:space="preserve">optional #GCancellable object,
  29583. %NULL to ignore</doc>
  29584. <type name="Cancellable" c:type="GCancellable*"/>
  29585. </parameter>
  29586. <parameter name="callback"
  29587. transfer-ownership="none"
  29588. nullable="1"
  29589. allow-none="1"
  29590. scope="async"
  29591. closure="3">
  29592. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  29593. when the request is satisfied</doc>
  29594. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  29595. </parameter>
  29596. <parameter name="user_data"
  29597. transfer-ownership="none"
  29598. nullable="1"
  29599. allow-none="1"
  29600. closure="3">
  29601. <doc xml:space="preserve">the data to pass to callback function</doc>
  29602. <type name="gpointer" c:type="gpointer"/>
  29603. </parameter>
  29604. </parameters>
  29605. </virtual-method>
  29606. <virtual-method name="read_finish" invoker="read_finish" throws="1">
  29607. <doc xml:space="preserve">Finishes an asynchronous file read operation started with
  29608. g_file_read_async().</doc>
  29609. <return-value transfer-ownership="full">
  29610. <doc xml:space="preserve">a #GFileInputStream or %NULL on error.
  29611. Free the returned object with g_object_unref().</doc>
  29612. <type name="FileInputStream" c:type="GFileInputStream*"/>
  29613. </return-value>
  29614. <parameters>
  29615. <instance-parameter name="file" transfer-ownership="none">
  29616. <doc xml:space="preserve">input #GFile</doc>
  29617. <type name="File" c:type="GFile*"/>
  29618. </instance-parameter>
  29619. <parameter name="res" transfer-ownership="none">
  29620. <doc xml:space="preserve">a #GAsyncResult</doc>
  29621. <type name="AsyncResult" c:type="GAsyncResult*"/>
  29622. </parameter>
  29623. </parameters>
  29624. </virtual-method>
  29625. <virtual-method name="read_fn" invoker="read" throws="1">
  29626. <doc xml:space="preserve">Opens a file for reading. The result is a #GFileInputStream that
  29627. can be used to read the contents of the file.
  29628. If @cancellable is not %NULL, then the operation can be cancelled by
  29629. triggering the cancellable object from another thread. If the operation
  29630. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  29631. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be
  29632. returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY
  29633. error will be returned. Other errors are possible too, and depend
  29634. on what kind of filesystem the file is on.</doc>
  29635. <return-value transfer-ownership="full">
  29636. <doc xml:space="preserve">#GFileInputStream or %NULL on error.
  29637. Free the returned object with g_object_unref().</doc>
  29638. <type name="FileInputStream" c:type="GFileInputStream*"/>
  29639. </return-value>
  29640. <parameters>
  29641. <instance-parameter name="file" transfer-ownership="none">
  29642. <doc xml:space="preserve">#GFile to read</doc>
  29643. <type name="File" c:type="GFile*"/>
  29644. </instance-parameter>
  29645. <parameter name="cancellable"
  29646. transfer-ownership="none"
  29647. nullable="1"
  29648. allow-none="1">
  29649. <doc xml:space="preserve">a #GCancellable</doc>
  29650. <type name="Cancellable" c:type="GCancellable*"/>
  29651. </parameter>
  29652. </parameters>
  29653. </virtual-method>
  29654. <virtual-method name="replace" invoker="replace" throws="1">
  29655. <doc xml:space="preserve">Returns an output stream for overwriting the file, possibly
  29656. creating a backup copy of the file first. If the file doesn't exist,
  29657. it will be created.
  29658. This will try to replace the file in the safest way possible so
  29659. that any errors during the writing will not affect an already
  29660. existing copy of the file. For instance, for local files it
  29661. may write to a temporary file and then atomically rename over
  29662. the destination when the stream is closed.
  29663. By default files created are generally readable by everyone,
  29664. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  29665. will be made readable only to the current user, to the level that
  29666. is supported on the target filesystem.
  29667. If @cancellable is not %NULL, then the operation can be cancelled
  29668. by triggering the cancellable object from another thread. If the
  29669. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  29670. returned.
  29671. If you pass in a non-%NULL @etag value and @file already exists, then
  29672. this value is compared to the current entity tag of the file, and if
  29673. they differ an %G_IO_ERROR_WRONG_ETAG error is returned. This
  29674. generally means that the file has been changed since you last read
  29675. it. You can get the new etag from g_file_output_stream_get_etag()
  29676. after you've finished writing and closed the #GFileOutputStream. When
  29677. you load a new file you can use g_file_input_stream_query_info() to
  29678. get the etag of the file.
  29679. If @make_backup is %TRUE, this function will attempt to make a
  29680. backup of the current file before overwriting it. If this fails
  29681. a %G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you
  29682. want to replace anyway, try again with @make_backup set to %FALSE.
  29683. If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will
  29684. be returned, and if the file is some other form of non-regular file
  29685. then a %G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some
  29686. file systems don't allow all file names, and may return an
  29687. %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long
  29688. %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are
  29689. possible too, and depend on what kind of filesystem the file is on.</doc>
  29690. <return-value transfer-ownership="full">
  29691. <doc xml:space="preserve">a #GFileOutputStream or %NULL on error.
  29692. Free the returned object with g_object_unref().</doc>
  29693. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  29694. </return-value>
  29695. <parameters>
  29696. <instance-parameter name="file" transfer-ownership="none">
  29697. <doc xml:space="preserve">input #GFile</doc>
  29698. <type name="File" c:type="GFile*"/>
  29699. </instance-parameter>
  29700. <parameter name="etag"
  29701. transfer-ownership="none"
  29702. nullable="1"
  29703. allow-none="1">
  29704. <doc xml:space="preserve">an optional [entity tag][gfile-etag]
  29705. for the current #GFile, or #NULL to ignore</doc>
  29706. <type name="utf8" c:type="const char*"/>
  29707. </parameter>
  29708. <parameter name="make_backup" transfer-ownership="none">
  29709. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  29710. <type name="gboolean" c:type="gboolean"/>
  29711. </parameter>
  29712. <parameter name="flags" transfer-ownership="none">
  29713. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  29714. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  29715. </parameter>
  29716. <parameter name="cancellable"
  29717. transfer-ownership="none"
  29718. nullable="1"
  29719. allow-none="1">
  29720. <doc xml:space="preserve">optional #GCancellable object,
  29721. %NULL to ignore</doc>
  29722. <type name="Cancellable" c:type="GCancellable*"/>
  29723. </parameter>
  29724. </parameters>
  29725. </virtual-method>
  29726. <virtual-method name="replace_async" invoker="replace_async">
  29727. <doc xml:space="preserve">Asynchronously overwrites the file, replacing the contents,
  29728. possibly creating a backup copy of the file first.
  29729. For more details, see g_file_replace() which is
  29730. the synchronous version of this call.
  29731. When the operation is finished, @callback will be called.
  29732. You can then call g_file_replace_finish() to get the result
  29733. of the operation.</doc>
  29734. <return-value transfer-ownership="none">
  29735. <type name="none" c:type="void"/>
  29736. </return-value>
  29737. <parameters>
  29738. <instance-parameter name="file" transfer-ownership="none">
  29739. <doc xml:space="preserve">input #GFile</doc>
  29740. <type name="File" c:type="GFile*"/>
  29741. </instance-parameter>
  29742. <parameter name="etag"
  29743. transfer-ownership="none"
  29744. nullable="1"
  29745. allow-none="1">
  29746. <doc xml:space="preserve">an [entity tag][gfile-etag] for the current #GFile,
  29747. or %NULL to ignore</doc>
  29748. <type name="utf8" c:type="const char*"/>
  29749. </parameter>
  29750. <parameter name="make_backup" transfer-ownership="none">
  29751. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  29752. <type name="gboolean" c:type="gboolean"/>
  29753. </parameter>
  29754. <parameter name="flags" transfer-ownership="none">
  29755. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  29756. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  29757. </parameter>
  29758. <parameter name="io_priority" transfer-ownership="none">
  29759. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  29760. <type name="gint" c:type="int"/>
  29761. </parameter>
  29762. <parameter name="cancellable"
  29763. transfer-ownership="none"
  29764. nullable="1"
  29765. allow-none="1">
  29766. <doc xml:space="preserve">optional #GCancellable object,
  29767. %NULL to ignore</doc>
  29768. <type name="Cancellable" c:type="GCancellable*"/>
  29769. </parameter>
  29770. <parameter name="callback"
  29771. transfer-ownership="none"
  29772. nullable="1"
  29773. allow-none="1"
  29774. scope="async"
  29775. closure="6">
  29776. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  29777. when the request is satisfied</doc>
  29778. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  29779. </parameter>
  29780. <parameter name="user_data"
  29781. transfer-ownership="none"
  29782. nullable="1"
  29783. allow-none="1"
  29784. closure="6">
  29785. <doc xml:space="preserve">the data to pass to callback function</doc>
  29786. <type name="gpointer" c:type="gpointer"/>
  29787. </parameter>
  29788. </parameters>
  29789. </virtual-method>
  29790. <virtual-method name="replace_finish"
  29791. invoker="replace_finish"
  29792. throws="1">
  29793. <doc xml:space="preserve">Finishes an asynchronous file replace operation started with
  29794. g_file_replace_async().</doc>
  29795. <return-value transfer-ownership="full">
  29796. <doc xml:space="preserve">a #GFileOutputStream, or %NULL on error.
  29797. Free the returned object with g_object_unref().</doc>
  29798. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  29799. </return-value>
  29800. <parameters>
  29801. <instance-parameter name="file" transfer-ownership="none">
  29802. <doc xml:space="preserve">input #GFile</doc>
  29803. <type name="File" c:type="GFile*"/>
  29804. </instance-parameter>
  29805. <parameter name="res" transfer-ownership="none">
  29806. <doc xml:space="preserve">a #GAsyncResult</doc>
  29807. <type name="AsyncResult" c:type="GAsyncResult*"/>
  29808. </parameter>
  29809. </parameters>
  29810. </virtual-method>
  29811. <virtual-method name="replace_readwrite"
  29812. invoker="replace_readwrite"
  29813. version="2.22"
  29814. throws="1">
  29815. <doc xml:space="preserve">Returns an output stream for overwriting the file in readwrite mode,
  29816. possibly creating a backup copy of the file first. If the file doesn't
  29817. exist, it will be created.
  29818. For details about the behaviour, see g_file_replace() which does the
  29819. same thing but returns an output stream only.
  29820. Note that in many non-local file cases read and write streams are not
  29821. supported, so make sure you really need to do read and write streaming,
  29822. rather than just opening for reading or writing.</doc>
  29823. <return-value transfer-ownership="full">
  29824. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  29825. Free the returned object with g_object_unref().</doc>
  29826. <type name="FileIOStream" c:type="GFileIOStream*"/>
  29827. </return-value>
  29828. <parameters>
  29829. <instance-parameter name="file" transfer-ownership="none">
  29830. <doc xml:space="preserve">a #GFile</doc>
  29831. <type name="File" c:type="GFile*"/>
  29832. </instance-parameter>
  29833. <parameter name="etag"
  29834. transfer-ownership="none"
  29835. nullable="1"
  29836. allow-none="1">
  29837. <doc xml:space="preserve">an optional [entity tag][gfile-etag]
  29838. for the current #GFile, or #NULL to ignore</doc>
  29839. <type name="utf8" c:type="const char*"/>
  29840. </parameter>
  29841. <parameter name="make_backup" transfer-ownership="none">
  29842. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  29843. <type name="gboolean" c:type="gboolean"/>
  29844. </parameter>
  29845. <parameter name="flags" transfer-ownership="none">
  29846. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  29847. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  29848. </parameter>
  29849. <parameter name="cancellable"
  29850. transfer-ownership="none"
  29851. nullable="1"
  29852. allow-none="1">
  29853. <doc xml:space="preserve">optional #GCancellable object,
  29854. %NULL to ignore</doc>
  29855. <type name="Cancellable" c:type="GCancellable*"/>
  29856. </parameter>
  29857. </parameters>
  29858. </virtual-method>
  29859. <virtual-method name="replace_readwrite_async"
  29860. invoker="replace_readwrite_async"
  29861. version="2.22">
  29862. <doc xml:space="preserve">Asynchronously overwrites the file in read-write mode,
  29863. replacing the contents, possibly creating a backup copy
  29864. of the file first.
  29865. For more details, see g_file_replace_readwrite() which is
  29866. the synchronous version of this call.
  29867. When the operation is finished, @callback will be called.
  29868. You can then call g_file_replace_readwrite_finish() to get
  29869. the result of the operation.</doc>
  29870. <return-value transfer-ownership="none">
  29871. <type name="none" c:type="void"/>
  29872. </return-value>
  29873. <parameters>
  29874. <instance-parameter name="file" transfer-ownership="none">
  29875. <doc xml:space="preserve">input #GFile</doc>
  29876. <type name="File" c:type="GFile*"/>
  29877. </instance-parameter>
  29878. <parameter name="etag"
  29879. transfer-ownership="none"
  29880. nullable="1"
  29881. allow-none="1">
  29882. <doc xml:space="preserve">an [entity tag][gfile-etag] for the current #GFile,
  29883. or %NULL to ignore</doc>
  29884. <type name="utf8" c:type="const char*"/>
  29885. </parameter>
  29886. <parameter name="make_backup" transfer-ownership="none">
  29887. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  29888. <type name="gboolean" c:type="gboolean"/>
  29889. </parameter>
  29890. <parameter name="flags" transfer-ownership="none">
  29891. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  29892. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  29893. </parameter>
  29894. <parameter name="io_priority" transfer-ownership="none">
  29895. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  29896. <type name="gint" c:type="int"/>
  29897. </parameter>
  29898. <parameter name="cancellable"
  29899. transfer-ownership="none"
  29900. nullable="1"
  29901. allow-none="1">
  29902. <doc xml:space="preserve">optional #GCancellable object,
  29903. %NULL to ignore</doc>
  29904. <type name="Cancellable" c:type="GCancellable*"/>
  29905. </parameter>
  29906. <parameter name="callback"
  29907. transfer-ownership="none"
  29908. nullable="1"
  29909. allow-none="1"
  29910. scope="async"
  29911. closure="6">
  29912. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  29913. when the request is satisfied</doc>
  29914. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  29915. </parameter>
  29916. <parameter name="user_data"
  29917. transfer-ownership="none"
  29918. nullable="1"
  29919. allow-none="1"
  29920. closure="6">
  29921. <doc xml:space="preserve">the data to pass to callback function</doc>
  29922. <type name="gpointer" c:type="gpointer"/>
  29923. </parameter>
  29924. </parameters>
  29925. </virtual-method>
  29926. <virtual-method name="replace_readwrite_finish"
  29927. invoker="replace_readwrite_finish"
  29928. version="2.22"
  29929. throws="1">
  29930. <doc xml:space="preserve">Finishes an asynchronous file replace operation started with
  29931. g_file_replace_readwrite_async().</doc>
  29932. <return-value transfer-ownership="full">
  29933. <doc xml:space="preserve">a #GFileIOStream, or %NULL on error.
  29934. Free the returned object with g_object_unref().</doc>
  29935. <type name="FileIOStream" c:type="GFileIOStream*"/>
  29936. </return-value>
  29937. <parameters>
  29938. <instance-parameter name="file" transfer-ownership="none">
  29939. <doc xml:space="preserve">input #GFile</doc>
  29940. <type name="File" c:type="GFile*"/>
  29941. </instance-parameter>
  29942. <parameter name="res" transfer-ownership="none">
  29943. <doc xml:space="preserve">a #GAsyncResult</doc>
  29944. <type name="AsyncResult" c:type="GAsyncResult*"/>
  29945. </parameter>
  29946. </parameters>
  29947. </virtual-method>
  29948. <virtual-method name="resolve_relative_path"
  29949. invoker="resolve_relative_path">
  29950. <doc xml:space="preserve">Resolves a relative path for @file to an absolute path.
  29951. This call does no blocking I/O.</doc>
  29952. <return-value transfer-ownership="full">
  29953. <doc xml:space="preserve">#GFile to the resolved path.
  29954. %NULL if @relative_path is %NULL or if @file is invalid.
  29955. Free the returned object with g_object_unref().</doc>
  29956. <type name="File" c:type="GFile*"/>
  29957. </return-value>
  29958. <parameters>
  29959. <instance-parameter name="file" transfer-ownership="none">
  29960. <doc xml:space="preserve">input #GFile</doc>
  29961. <type name="File" c:type="GFile*"/>
  29962. </instance-parameter>
  29963. <parameter name="relative_path" transfer-ownership="none">
  29964. <doc xml:space="preserve">a given relative path string</doc>
  29965. <type name="utf8" c:type="const char*"/>
  29966. </parameter>
  29967. </parameters>
  29968. </virtual-method>
  29969. <virtual-method name="set_attribute" invoker="set_attribute" throws="1">
  29970. <doc xml:space="preserve">Sets an attribute in the file with attribute name @attribute to @value.
  29971. Some attributes can be unset by setting @attribute to
  29972. %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
  29973. If @cancellable is not %NULL, then the operation can be cancelled by
  29974. triggering the cancellable object from another thread. If the operation
  29975. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  29976. <return-value transfer-ownership="none">
  29977. <doc xml:space="preserve">%TRUE if the attribute was set, %FALSE otherwise.</doc>
  29978. <type name="gboolean" c:type="gboolean"/>
  29979. </return-value>
  29980. <parameters>
  29981. <instance-parameter name="file" transfer-ownership="none">
  29982. <doc xml:space="preserve">input #GFile</doc>
  29983. <type name="File" c:type="GFile*"/>
  29984. </instance-parameter>
  29985. <parameter name="attribute" transfer-ownership="none">
  29986. <doc xml:space="preserve">a string containing the attribute's name</doc>
  29987. <type name="utf8" c:type="const char*"/>
  29988. </parameter>
  29989. <parameter name="type" transfer-ownership="none">
  29990. <doc xml:space="preserve">The type of the attribute</doc>
  29991. <type name="FileAttributeType" c:type="GFileAttributeType"/>
  29992. </parameter>
  29993. <parameter name="value_p"
  29994. transfer-ownership="none"
  29995. nullable="1"
  29996. allow-none="1">
  29997. <doc xml:space="preserve">a pointer to the value (or the pointer
  29998. itself if the type is a pointer type)</doc>
  29999. <type name="gpointer" c:type="gpointer"/>
  30000. </parameter>
  30001. <parameter name="flags" transfer-ownership="none">
  30002. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  30003. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  30004. </parameter>
  30005. <parameter name="cancellable"
  30006. transfer-ownership="none"
  30007. nullable="1"
  30008. allow-none="1">
  30009. <doc xml:space="preserve">optional #GCancellable object,
  30010. %NULL to ignore</doc>
  30011. <type name="Cancellable" c:type="GCancellable*"/>
  30012. </parameter>
  30013. </parameters>
  30014. </virtual-method>
  30015. <virtual-method name="set_attributes_async"
  30016. invoker="set_attributes_async">
  30017. <doc xml:space="preserve">Asynchronously sets the attributes of @file with @info.
  30018. For more details, see g_file_set_attributes_from_info(),
  30019. which is the synchronous version of this call.
  30020. When the operation is finished, @callback will be called.
  30021. You can then call g_file_set_attributes_finish() to get
  30022. the result of the operation.</doc>
  30023. <return-value transfer-ownership="none">
  30024. <type name="none" c:type="void"/>
  30025. </return-value>
  30026. <parameters>
  30027. <instance-parameter name="file" transfer-ownership="none">
  30028. <doc xml:space="preserve">input #GFile</doc>
  30029. <type name="File" c:type="GFile*"/>
  30030. </instance-parameter>
  30031. <parameter name="info" transfer-ownership="none">
  30032. <doc xml:space="preserve">a #GFileInfo</doc>
  30033. <type name="FileInfo" c:type="GFileInfo*"/>
  30034. </parameter>
  30035. <parameter name="flags" transfer-ownership="none">
  30036. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  30037. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  30038. </parameter>
  30039. <parameter name="io_priority" transfer-ownership="none">
  30040. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  30041. <type name="gint" c:type="int"/>
  30042. </parameter>
  30043. <parameter name="cancellable"
  30044. transfer-ownership="none"
  30045. nullable="1"
  30046. allow-none="1">
  30047. <doc xml:space="preserve">optional #GCancellable object,
  30048. %NULL to ignore</doc>
  30049. <type name="Cancellable" c:type="GCancellable*"/>
  30050. </parameter>
  30051. <parameter name="callback"
  30052. transfer-ownership="none"
  30053. nullable="1"
  30054. allow-none="1"
  30055. scope="async"
  30056. closure="5">
  30057. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  30058. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30059. </parameter>
  30060. <parameter name="user_data"
  30061. transfer-ownership="none"
  30062. nullable="1"
  30063. allow-none="1"
  30064. closure="5">
  30065. <doc xml:space="preserve">a #gpointer</doc>
  30066. <type name="gpointer" c:type="gpointer"/>
  30067. </parameter>
  30068. </parameters>
  30069. </virtual-method>
  30070. <virtual-method name="set_attributes_finish"
  30071. invoker="set_attributes_finish"
  30072. throws="1">
  30073. <doc xml:space="preserve">Finishes setting an attribute started in g_file_set_attributes_async().</doc>
  30074. <return-value transfer-ownership="none">
  30075. <doc xml:space="preserve">%TRUE if the attributes were set correctly, %FALSE otherwise.</doc>
  30076. <type name="gboolean" c:type="gboolean"/>
  30077. </return-value>
  30078. <parameters>
  30079. <instance-parameter name="file" transfer-ownership="none">
  30080. <doc xml:space="preserve">input #GFile</doc>
  30081. <type name="File" c:type="GFile*"/>
  30082. </instance-parameter>
  30083. <parameter name="result" transfer-ownership="none">
  30084. <doc xml:space="preserve">a #GAsyncResult</doc>
  30085. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30086. </parameter>
  30087. <parameter name="info"
  30088. direction="out"
  30089. caller-allocates="0"
  30090. transfer-ownership="full">
  30091. <doc xml:space="preserve">a #GFileInfo</doc>
  30092. <type name="FileInfo" c:type="GFileInfo**"/>
  30093. </parameter>
  30094. </parameters>
  30095. </virtual-method>
  30096. <virtual-method name="set_attributes_from_info"
  30097. invoker="set_attributes_from_info"
  30098. throws="1">
  30099. <doc xml:space="preserve">Tries to set all attributes in the #GFileInfo on the target
  30100. values, not stopping on the first error.
  30101. If there is any error during this operation then @error will
  30102. be set to the first error. Error on particular fields are flagged
  30103. by setting the "status" field in the attribute value to
  30104. %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can
  30105. also detect further errors.
  30106. If @cancellable is not %NULL, then the operation can be cancelled by
  30107. triggering the cancellable object from another thread. If the operation
  30108. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  30109. <return-value transfer-ownership="none">
  30110. <doc xml:space="preserve">%FALSE if there was any error, %TRUE otherwise.</doc>
  30111. <type name="gboolean" c:type="gboolean"/>
  30112. </return-value>
  30113. <parameters>
  30114. <instance-parameter name="file" transfer-ownership="none">
  30115. <doc xml:space="preserve">input #GFile</doc>
  30116. <type name="File" c:type="GFile*"/>
  30117. </instance-parameter>
  30118. <parameter name="info" transfer-ownership="none">
  30119. <doc xml:space="preserve">a #GFileInfo</doc>
  30120. <type name="FileInfo" c:type="GFileInfo*"/>
  30121. </parameter>
  30122. <parameter name="flags" transfer-ownership="none">
  30123. <doc xml:space="preserve">#GFileQueryInfoFlags</doc>
  30124. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  30125. </parameter>
  30126. <parameter name="cancellable"
  30127. transfer-ownership="none"
  30128. nullable="1"
  30129. allow-none="1">
  30130. <doc xml:space="preserve">optional #GCancellable object,
  30131. %NULL to ignore</doc>
  30132. <type name="Cancellable" c:type="GCancellable*"/>
  30133. </parameter>
  30134. </parameters>
  30135. </virtual-method>
  30136. <virtual-method name="set_display_name"
  30137. invoker="set_display_name"
  30138. throws="1">
  30139. <doc xml:space="preserve">Renames @file to the specified display name.
  30140. The display name is converted from UTF-8 to the correct encoding
  30141. for the target filesystem if possible and the @file is renamed to this.
  30142. If you want to implement a rename operation in the user interface the
  30143. edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
  30144. initial value in the rename widget, and then the result after editing
  30145. should be passed to g_file_set_display_name().
  30146. On success the resulting converted filename is returned.
  30147. If @cancellable is not %NULL, then the operation can be cancelled by
  30148. triggering the cancellable object from another thread. If the operation
  30149. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  30150. <return-value transfer-ownership="full">
  30151. <doc xml:space="preserve">a #GFile specifying what @file was renamed to,
  30152. or %NULL if there was an error.
  30153. Free the returned object with g_object_unref().</doc>
  30154. <type name="File" c:type="GFile*"/>
  30155. </return-value>
  30156. <parameters>
  30157. <instance-parameter name="file" transfer-ownership="none">
  30158. <doc xml:space="preserve">input #GFile</doc>
  30159. <type name="File" c:type="GFile*"/>
  30160. </instance-parameter>
  30161. <parameter name="display_name" transfer-ownership="none">
  30162. <doc xml:space="preserve">a string</doc>
  30163. <type name="utf8" c:type="const char*"/>
  30164. </parameter>
  30165. <parameter name="cancellable"
  30166. transfer-ownership="none"
  30167. nullable="1"
  30168. allow-none="1">
  30169. <doc xml:space="preserve">optional #GCancellable object,
  30170. %NULL to ignore</doc>
  30171. <type name="Cancellable" c:type="GCancellable*"/>
  30172. </parameter>
  30173. </parameters>
  30174. </virtual-method>
  30175. <virtual-method name="set_display_name_async"
  30176. invoker="set_display_name_async">
  30177. <doc xml:space="preserve">Asynchronously sets the display name for a given #GFile.
  30178. For more details, see g_file_set_display_name() which is
  30179. the synchronous version of this call.
  30180. When the operation is finished, @callback will be called.
  30181. You can then call g_file_set_display_name_finish() to get
  30182. the result of the operation.</doc>
  30183. <return-value transfer-ownership="none">
  30184. <type name="none" c:type="void"/>
  30185. </return-value>
  30186. <parameters>
  30187. <instance-parameter name="file" transfer-ownership="none">
  30188. <doc xml:space="preserve">input #GFile</doc>
  30189. <type name="File" c:type="GFile*"/>
  30190. </instance-parameter>
  30191. <parameter name="display_name" transfer-ownership="none">
  30192. <doc xml:space="preserve">a string</doc>
  30193. <type name="utf8" c:type="const char*"/>
  30194. </parameter>
  30195. <parameter name="io_priority" transfer-ownership="none">
  30196. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  30197. <type name="gint" c:type="int"/>
  30198. </parameter>
  30199. <parameter name="cancellable"
  30200. transfer-ownership="none"
  30201. nullable="1"
  30202. allow-none="1">
  30203. <doc xml:space="preserve">optional #GCancellable object,
  30204. %NULL to ignore</doc>
  30205. <type name="Cancellable" c:type="GCancellable*"/>
  30206. </parameter>
  30207. <parameter name="callback"
  30208. transfer-ownership="none"
  30209. nullable="1"
  30210. allow-none="1"
  30211. scope="async"
  30212. closure="4">
  30213. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  30214. when the request is satisfied</doc>
  30215. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30216. </parameter>
  30217. <parameter name="user_data"
  30218. transfer-ownership="none"
  30219. nullable="1"
  30220. allow-none="1"
  30221. closure="4">
  30222. <doc xml:space="preserve">the data to pass to callback function</doc>
  30223. <type name="gpointer" c:type="gpointer"/>
  30224. </parameter>
  30225. </parameters>
  30226. </virtual-method>
  30227. <virtual-method name="set_display_name_finish"
  30228. invoker="set_display_name_finish"
  30229. throws="1">
  30230. <doc xml:space="preserve">Finishes setting a display name started with
  30231. g_file_set_display_name_async().</doc>
  30232. <return-value transfer-ownership="full">
  30233. <doc xml:space="preserve">a #GFile or %NULL on error.
  30234. Free the returned object with g_object_unref().</doc>
  30235. <type name="File" c:type="GFile*"/>
  30236. </return-value>
  30237. <parameters>
  30238. <instance-parameter name="file" transfer-ownership="none">
  30239. <doc xml:space="preserve">input #GFile</doc>
  30240. <type name="File" c:type="GFile*"/>
  30241. </instance-parameter>
  30242. <parameter name="res" transfer-ownership="none">
  30243. <doc xml:space="preserve">a #GAsyncResult</doc>
  30244. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30245. </parameter>
  30246. </parameters>
  30247. </virtual-method>
  30248. <virtual-method name="start_mountable"
  30249. invoker="start_mountable"
  30250. version="2.22">
  30251. <doc xml:space="preserve">Starts a file of type #G_FILE_TYPE_MOUNTABLE.
  30252. Using @start_operation, you can request callbacks when, for instance,
  30253. passwords are needed during authentication.
  30254. If @cancellable is not %NULL, then the operation can be cancelled by
  30255. triggering the cancellable object from another thread. If the operation
  30256. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  30257. When the operation is finished, @callback will be called.
  30258. You can then call g_file_mount_mountable_finish() to get
  30259. the result of the operation.</doc>
  30260. <return-value transfer-ownership="none">
  30261. <type name="none" c:type="void"/>
  30262. </return-value>
  30263. <parameters>
  30264. <instance-parameter name="file" transfer-ownership="none">
  30265. <doc xml:space="preserve">input #GFile</doc>
  30266. <type name="File" c:type="GFile*"/>
  30267. </instance-parameter>
  30268. <parameter name="flags" transfer-ownership="none">
  30269. <doc xml:space="preserve">flags affecting the operation</doc>
  30270. <type name="DriveStartFlags" c:type="GDriveStartFlags"/>
  30271. </parameter>
  30272. <parameter name="start_operation"
  30273. transfer-ownership="none"
  30274. nullable="1"
  30275. allow-none="1">
  30276. <doc xml:space="preserve">a #GMountOperation, or %NULL to avoid user interaction</doc>
  30277. <type name="MountOperation" c:type="GMountOperation*"/>
  30278. </parameter>
  30279. <parameter name="cancellable"
  30280. transfer-ownership="none"
  30281. nullable="1"
  30282. allow-none="1">
  30283. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  30284. <type name="Cancellable" c:type="GCancellable*"/>
  30285. </parameter>
  30286. <parameter name="callback"
  30287. transfer-ownership="none"
  30288. nullable="1"
  30289. allow-none="1"
  30290. scope="async"
  30291. closure="4">
  30292. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied, or %NULL</doc>
  30293. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30294. </parameter>
  30295. <parameter name="user_data"
  30296. transfer-ownership="none"
  30297. nullable="1"
  30298. allow-none="1"
  30299. closure="4">
  30300. <doc xml:space="preserve">the data to pass to callback function</doc>
  30301. <type name="gpointer" c:type="gpointer"/>
  30302. </parameter>
  30303. </parameters>
  30304. </virtual-method>
  30305. <virtual-method name="start_mountable_finish"
  30306. invoker="start_mountable_finish"
  30307. version="2.22"
  30308. throws="1">
  30309. <doc xml:space="preserve">Finishes a start operation. See g_file_start_mountable() for details.
  30310. Finish an asynchronous start operation that was started
  30311. with g_file_start_mountable().</doc>
  30312. <return-value transfer-ownership="none">
  30313. <doc xml:space="preserve">%TRUE if the operation finished successfully. %FALSE
  30314. otherwise.</doc>
  30315. <type name="gboolean" c:type="gboolean"/>
  30316. </return-value>
  30317. <parameters>
  30318. <instance-parameter name="file" transfer-ownership="none">
  30319. <doc xml:space="preserve">input #GFile</doc>
  30320. <type name="File" c:type="GFile*"/>
  30321. </instance-parameter>
  30322. <parameter name="result" transfer-ownership="none">
  30323. <doc xml:space="preserve">a #GAsyncResult</doc>
  30324. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30325. </parameter>
  30326. </parameters>
  30327. </virtual-method>
  30328. <virtual-method name="stop_mountable"
  30329. invoker="stop_mountable"
  30330. version="2.22">
  30331. <doc xml:space="preserve">Stops a file of type #G_FILE_TYPE_MOUNTABLE.
  30332. If @cancellable is not %NULL, then the operation can be cancelled by
  30333. triggering the cancellable object from another thread. If the operation
  30334. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  30335. When the operation is finished, @callback will be called.
  30336. You can then call g_file_stop_mountable_finish() to get
  30337. the result of the operation.</doc>
  30338. <return-value transfer-ownership="none">
  30339. <type name="none" c:type="void"/>
  30340. </return-value>
  30341. <parameters>
  30342. <instance-parameter name="file" transfer-ownership="none">
  30343. <doc xml:space="preserve">input #GFile</doc>
  30344. <type name="File" c:type="GFile*"/>
  30345. </instance-parameter>
  30346. <parameter name="flags" transfer-ownership="none">
  30347. <doc xml:space="preserve">flags affecting the operation</doc>
  30348. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  30349. </parameter>
  30350. <parameter name="mount_operation"
  30351. transfer-ownership="none"
  30352. nullable="1"
  30353. allow-none="1">
  30354. <doc xml:space="preserve">a #GMountOperation,
  30355. or %NULL to avoid user interaction.</doc>
  30356. <type name="MountOperation" c:type="GMountOperation*"/>
  30357. </parameter>
  30358. <parameter name="cancellable"
  30359. transfer-ownership="none"
  30360. nullable="1"
  30361. allow-none="1">
  30362. <doc xml:space="preserve">optional #GCancellable object,
  30363. %NULL to ignore</doc>
  30364. <type name="Cancellable" c:type="GCancellable*"/>
  30365. </parameter>
  30366. <parameter name="callback"
  30367. transfer-ownership="none"
  30368. nullable="1"
  30369. allow-none="1"
  30370. scope="async"
  30371. closure="4">
  30372. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  30373. when the request is satisfied, or %NULL</doc>
  30374. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30375. </parameter>
  30376. <parameter name="user_data"
  30377. transfer-ownership="none"
  30378. nullable="1"
  30379. allow-none="1"
  30380. closure="4">
  30381. <doc xml:space="preserve">the data to pass to callback function</doc>
  30382. <type name="gpointer" c:type="gpointer"/>
  30383. </parameter>
  30384. </parameters>
  30385. </virtual-method>
  30386. <virtual-method name="stop_mountable_finish"
  30387. invoker="stop_mountable_finish"
  30388. version="2.22"
  30389. throws="1">
  30390. <doc xml:space="preserve">Finishes an stop operation, see g_file_stop_mountable() for details.
  30391. Finish an asynchronous stop operation that was started
  30392. with g_file_stop_mountable().</doc>
  30393. <return-value transfer-ownership="none">
  30394. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  30395. %FALSE otherwise.</doc>
  30396. <type name="gboolean" c:type="gboolean"/>
  30397. </return-value>
  30398. <parameters>
  30399. <instance-parameter name="file" transfer-ownership="none">
  30400. <doc xml:space="preserve">input #GFile</doc>
  30401. <type name="File" c:type="GFile*"/>
  30402. </instance-parameter>
  30403. <parameter name="result" transfer-ownership="none">
  30404. <doc xml:space="preserve">a #GAsyncResult</doc>
  30405. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30406. </parameter>
  30407. </parameters>
  30408. </virtual-method>
  30409. <virtual-method name="trash" invoker="trash" throws="1">
  30410. <doc xml:space="preserve">Sends @file to the "Trashcan", if possible. This is similar to
  30411. deleting it, but the user can recover it before emptying the trashcan.
  30412. Not all file systems support trashing, so this call can return the
  30413. %G_IO_ERROR_NOT_SUPPORTED error.
  30414. If @cancellable is not %NULL, then the operation can be cancelled by
  30415. triggering the cancellable object from another thread. If the operation
  30416. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  30417. <return-value transfer-ownership="none">
  30418. <doc xml:space="preserve">%TRUE on successful trash, %FALSE otherwise.</doc>
  30419. <type name="gboolean" c:type="gboolean"/>
  30420. </return-value>
  30421. <parameters>
  30422. <instance-parameter name="file" transfer-ownership="none">
  30423. <doc xml:space="preserve">#GFile to send to trash</doc>
  30424. <type name="File" c:type="GFile*"/>
  30425. </instance-parameter>
  30426. <parameter name="cancellable"
  30427. transfer-ownership="none"
  30428. nullable="1"
  30429. allow-none="1">
  30430. <doc xml:space="preserve">optional #GCancellable object,
  30431. %NULL to ignore</doc>
  30432. <type name="Cancellable" c:type="GCancellable*"/>
  30433. </parameter>
  30434. </parameters>
  30435. </virtual-method>
  30436. <virtual-method name="trash_async" invoker="trash_async" version="2.38">
  30437. <doc xml:space="preserve">Asynchronously sends @file to the Trash location, if possible.</doc>
  30438. <return-value transfer-ownership="none">
  30439. <type name="none" c:type="void"/>
  30440. </return-value>
  30441. <parameters>
  30442. <instance-parameter name="file" transfer-ownership="none">
  30443. <doc xml:space="preserve">input #GFile</doc>
  30444. <type name="File" c:type="GFile*"/>
  30445. </instance-parameter>
  30446. <parameter name="io_priority" transfer-ownership="none">
  30447. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  30448. <type name="gint" c:type="int"/>
  30449. </parameter>
  30450. <parameter name="cancellable"
  30451. transfer-ownership="none"
  30452. nullable="1"
  30453. allow-none="1">
  30454. <doc xml:space="preserve">optional #GCancellable object,
  30455. %NULL to ignore</doc>
  30456. <type name="Cancellable" c:type="GCancellable*"/>
  30457. </parameter>
  30458. <parameter name="callback"
  30459. transfer-ownership="none"
  30460. nullable="1"
  30461. allow-none="1"
  30462. scope="async"
  30463. closure="3">
  30464. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  30465. when the request is satisfied</doc>
  30466. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30467. </parameter>
  30468. <parameter name="user_data"
  30469. transfer-ownership="none"
  30470. nullable="1"
  30471. allow-none="1"
  30472. closure="3">
  30473. <doc xml:space="preserve">the data to pass to callback function</doc>
  30474. <type name="gpointer" c:type="gpointer"/>
  30475. </parameter>
  30476. </parameters>
  30477. </virtual-method>
  30478. <virtual-method name="trash_finish"
  30479. invoker="trash_finish"
  30480. version="2.38"
  30481. throws="1">
  30482. <doc xml:space="preserve">Finishes an asynchronous file trashing operation, started with
  30483. g_file_trash_async().</doc>
  30484. <return-value transfer-ownership="none">
  30485. <doc xml:space="preserve">%TRUE on successful trash, %FALSE otherwise.</doc>
  30486. <type name="gboolean" c:type="gboolean"/>
  30487. </return-value>
  30488. <parameters>
  30489. <instance-parameter name="file" transfer-ownership="none">
  30490. <doc xml:space="preserve">input #GFile</doc>
  30491. <type name="File" c:type="GFile*"/>
  30492. </instance-parameter>
  30493. <parameter name="result" transfer-ownership="none">
  30494. <doc xml:space="preserve">a #GAsyncResult</doc>
  30495. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30496. </parameter>
  30497. </parameters>
  30498. </virtual-method>
  30499. <virtual-method name="unmount_mountable"
  30500. invoker="unmount_mountable"
  30501. deprecated="1"
  30502. deprecated-version="2.22">
  30503. <doc xml:space="preserve">Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
  30504. If @cancellable is not %NULL, then the operation can be cancelled by
  30505. triggering the cancellable object from another thread. If the operation
  30506. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  30507. When the operation is finished, @callback will be called.
  30508. You can then call g_file_unmount_mountable_finish() to get
  30509. the result of the operation.</doc>
  30510. <doc-deprecated xml:space="preserve">Use g_file_unmount_mountable_with_operation() instead.</doc-deprecated>
  30511. <return-value transfer-ownership="none">
  30512. <type name="none" c:type="void"/>
  30513. </return-value>
  30514. <parameters>
  30515. <instance-parameter name="file" transfer-ownership="none">
  30516. <doc xml:space="preserve">input #GFile</doc>
  30517. <type name="File" c:type="GFile*"/>
  30518. </instance-parameter>
  30519. <parameter name="flags" transfer-ownership="none">
  30520. <doc xml:space="preserve">flags affecting the operation</doc>
  30521. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  30522. </parameter>
  30523. <parameter name="cancellable"
  30524. transfer-ownership="none"
  30525. nullable="1"
  30526. allow-none="1">
  30527. <doc xml:space="preserve">optional #GCancellable object,
  30528. %NULL to ignore</doc>
  30529. <type name="Cancellable" c:type="GCancellable*"/>
  30530. </parameter>
  30531. <parameter name="callback"
  30532. transfer-ownership="none"
  30533. nullable="1"
  30534. allow-none="1"
  30535. scope="async"
  30536. closure="3">
  30537. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  30538. when the request is satisfied, or %NULL</doc>
  30539. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30540. </parameter>
  30541. <parameter name="user_data"
  30542. transfer-ownership="none"
  30543. nullable="1"
  30544. allow-none="1"
  30545. closure="3">
  30546. <doc xml:space="preserve">the data to pass to callback function</doc>
  30547. <type name="gpointer" c:type="gpointer"/>
  30548. </parameter>
  30549. </parameters>
  30550. </virtual-method>
  30551. <virtual-method name="unmount_mountable_finish"
  30552. invoker="unmount_mountable_finish"
  30553. deprecated="1"
  30554. deprecated-version="2.22"
  30555. throws="1">
  30556. <doc xml:space="preserve">Finishes an unmount operation, see g_file_unmount_mountable() for details.
  30557. Finish an asynchronous unmount operation that was started
  30558. with g_file_unmount_mountable().</doc>
  30559. <doc-deprecated xml:space="preserve">Use g_file_unmount_mountable_with_operation_finish()
  30560. instead.</doc-deprecated>
  30561. <return-value transfer-ownership="none">
  30562. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  30563. %FALSE otherwise.</doc>
  30564. <type name="gboolean" c:type="gboolean"/>
  30565. </return-value>
  30566. <parameters>
  30567. <instance-parameter name="file" transfer-ownership="none">
  30568. <doc xml:space="preserve">input #GFile</doc>
  30569. <type name="File" c:type="GFile*"/>
  30570. </instance-parameter>
  30571. <parameter name="result" transfer-ownership="none">
  30572. <doc xml:space="preserve">a #GAsyncResult</doc>
  30573. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30574. </parameter>
  30575. </parameters>
  30576. </virtual-method>
  30577. <virtual-method name="unmount_mountable_with_operation"
  30578. invoker="unmount_mountable_with_operation"
  30579. version="2.22">
  30580. <doc xml:space="preserve">Unmounts a file of type #G_FILE_TYPE_MOUNTABLE.
  30581. If @cancellable is not %NULL, then the operation can be cancelled by
  30582. triggering the cancellable object from another thread. If the operation
  30583. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  30584. When the operation is finished, @callback will be called.
  30585. You can then call g_file_unmount_mountable_finish() to get
  30586. the result of the operation.</doc>
  30587. <return-value transfer-ownership="none">
  30588. <type name="none" c:type="void"/>
  30589. </return-value>
  30590. <parameters>
  30591. <instance-parameter name="file" transfer-ownership="none">
  30592. <doc xml:space="preserve">input #GFile</doc>
  30593. <type name="File" c:type="GFile*"/>
  30594. </instance-parameter>
  30595. <parameter name="flags" transfer-ownership="none">
  30596. <doc xml:space="preserve">flags affecting the operation</doc>
  30597. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  30598. </parameter>
  30599. <parameter name="mount_operation"
  30600. transfer-ownership="none"
  30601. nullable="1"
  30602. allow-none="1">
  30603. <doc xml:space="preserve">a #GMountOperation,
  30604. or %NULL to avoid user interaction</doc>
  30605. <type name="MountOperation" c:type="GMountOperation*"/>
  30606. </parameter>
  30607. <parameter name="cancellable"
  30608. transfer-ownership="none"
  30609. nullable="1"
  30610. allow-none="1">
  30611. <doc xml:space="preserve">optional #GCancellable object,
  30612. %NULL to ignore</doc>
  30613. <type name="Cancellable" c:type="GCancellable*"/>
  30614. </parameter>
  30615. <parameter name="callback"
  30616. transfer-ownership="none"
  30617. nullable="1"
  30618. allow-none="1"
  30619. scope="async"
  30620. closure="4">
  30621. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  30622. when the request is satisfied, or %NULL</doc>
  30623. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30624. </parameter>
  30625. <parameter name="user_data"
  30626. transfer-ownership="none"
  30627. nullable="1"
  30628. allow-none="1"
  30629. closure="4">
  30630. <doc xml:space="preserve">the data to pass to callback function</doc>
  30631. <type name="gpointer" c:type="gpointer"/>
  30632. </parameter>
  30633. </parameters>
  30634. </virtual-method>
  30635. <virtual-method name="unmount_mountable_with_operation_finish"
  30636. invoker="unmount_mountable_with_operation_finish"
  30637. version="2.22"
  30638. throws="1">
  30639. <doc xml:space="preserve">Finishes an unmount operation,
  30640. see g_file_unmount_mountable_with_operation() for details.
  30641. Finish an asynchronous unmount operation that was started
  30642. with g_file_unmount_mountable_with_operation().</doc>
  30643. <return-value transfer-ownership="none">
  30644. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  30645. %FALSE otherwise.</doc>
  30646. <type name="gboolean" c:type="gboolean"/>
  30647. </return-value>
  30648. <parameters>
  30649. <instance-parameter name="file" transfer-ownership="none">
  30650. <doc xml:space="preserve">input #GFile</doc>
  30651. <type name="File" c:type="GFile*"/>
  30652. </instance-parameter>
  30653. <parameter name="result" transfer-ownership="none">
  30654. <doc xml:space="preserve">a #GAsyncResult</doc>
  30655. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30656. </parameter>
  30657. </parameters>
  30658. </virtual-method>
  30659. <method name="append_to" c:identifier="g_file_append_to" throws="1">
  30660. <doc xml:space="preserve">Gets an output stream for appending data to the file.
  30661. If the file doesn't already exist it is created.
  30662. By default files created are generally readable by everyone,
  30663. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  30664. will be made readable only to the current user, to the level that
  30665. is supported on the target filesystem.
  30666. If @cancellable is not %NULL, then the operation can be cancelled
  30667. by triggering the cancellable object from another thread. If the
  30668. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  30669. returned.
  30670. Some file systems don't allow all file names, and may return an
  30671. %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the
  30672. %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are
  30673. possible too, and depend on what kind of filesystem the file is on.</doc>
  30674. <return-value transfer-ownership="full">
  30675. <doc xml:space="preserve">a #GFileOutputStream, or %NULL on error.
  30676. Free the returned object with g_object_unref().</doc>
  30677. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  30678. </return-value>
  30679. <parameters>
  30680. <instance-parameter name="file" transfer-ownership="none">
  30681. <doc xml:space="preserve">input #GFile</doc>
  30682. <type name="File" c:type="GFile*"/>
  30683. </instance-parameter>
  30684. <parameter name="flags" transfer-ownership="none">
  30685. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  30686. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  30687. </parameter>
  30688. <parameter name="cancellable"
  30689. transfer-ownership="none"
  30690. nullable="1"
  30691. allow-none="1">
  30692. <doc xml:space="preserve">optional #GCancellable object,
  30693. %NULL to ignore</doc>
  30694. <type name="Cancellable" c:type="GCancellable*"/>
  30695. </parameter>
  30696. </parameters>
  30697. </method>
  30698. <method name="append_to_async" c:identifier="g_file_append_to_async">
  30699. <doc xml:space="preserve">Asynchronously opens @file for appending.
  30700. For more details, see g_file_append_to() which is
  30701. the synchronous version of this call.
  30702. When the operation is finished, @callback will be called.
  30703. You can then call g_file_append_to_finish() to get the result
  30704. of the operation.</doc>
  30705. <return-value transfer-ownership="none">
  30706. <type name="none" c:type="void"/>
  30707. </return-value>
  30708. <parameters>
  30709. <instance-parameter name="file" transfer-ownership="none">
  30710. <doc xml:space="preserve">input #GFile</doc>
  30711. <type name="File" c:type="GFile*"/>
  30712. </instance-parameter>
  30713. <parameter name="flags" transfer-ownership="none">
  30714. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  30715. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  30716. </parameter>
  30717. <parameter name="io_priority" transfer-ownership="none">
  30718. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  30719. <type name="gint" c:type="int"/>
  30720. </parameter>
  30721. <parameter name="cancellable"
  30722. transfer-ownership="none"
  30723. nullable="1"
  30724. allow-none="1">
  30725. <doc xml:space="preserve">optional #GCancellable object,
  30726. %NULL to ignore</doc>
  30727. <type name="Cancellable" c:type="GCancellable*"/>
  30728. </parameter>
  30729. <parameter name="callback"
  30730. transfer-ownership="none"
  30731. nullable="1"
  30732. allow-none="1"
  30733. scope="async"
  30734. closure="4">
  30735. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  30736. when the request is satisfied</doc>
  30737. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30738. </parameter>
  30739. <parameter name="user_data"
  30740. transfer-ownership="none"
  30741. nullable="1"
  30742. allow-none="1">
  30743. <doc xml:space="preserve">the data to pass to callback function</doc>
  30744. <type name="gpointer" c:type="gpointer"/>
  30745. </parameter>
  30746. </parameters>
  30747. </method>
  30748. <method name="append_to_finish"
  30749. c:identifier="g_file_append_to_finish"
  30750. throws="1">
  30751. <doc xml:space="preserve">Finishes an asynchronous file append operation started with
  30752. g_file_append_to_async().</doc>
  30753. <return-value transfer-ownership="full">
  30754. <doc xml:space="preserve">a valid #GFileOutputStream
  30755. or %NULL on error.
  30756. Free the returned object with g_object_unref().</doc>
  30757. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  30758. </return-value>
  30759. <parameters>
  30760. <instance-parameter name="file" transfer-ownership="none">
  30761. <doc xml:space="preserve">input #GFile</doc>
  30762. <type name="File" c:type="GFile*"/>
  30763. </instance-parameter>
  30764. <parameter name="res" transfer-ownership="none">
  30765. <doc xml:space="preserve">#GAsyncResult</doc>
  30766. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30767. </parameter>
  30768. </parameters>
  30769. </method>
  30770. <method name="copy" c:identifier="g_file_copy" throws="1">
  30771. <doc xml:space="preserve">Copies the file @source to the location specified by @destination.
  30772. Can not handle recursive copies of directories.
  30773. If the flag #G_FILE_COPY_OVERWRITE is specified an already
  30774. existing @destination file is overwritten.
  30775. If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
  30776. will be copied as symlinks, otherwise the target of the
  30777. @source symlink will be copied.
  30778. If @cancellable is not %NULL, then the operation can be cancelled by
  30779. triggering the cancellable object from another thread. If the operation
  30780. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  30781. If @progress_callback is not %NULL, then the operation can be monitored
  30782. by setting this to a #GFileProgressCallback function.
  30783. @progress_callback_data will be passed to this function. It is guaranteed
  30784. that this callback will be called after all data has been transferred with
  30785. the total number of bytes copied during the operation.
  30786. If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error
  30787. is returned, independent on the status of the @destination.
  30788. If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then
  30789. the error %G_IO_ERROR_EXISTS is returned.
  30790. If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY
  30791. error is returned. If trying to overwrite a directory with a directory the
  30792. %G_IO_ERROR_WOULD_MERGE error is returned.
  30793. If the source is a directory and the target does not exist, or
  30794. #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the
  30795. %G_IO_ERROR_WOULD_RECURSE error is returned.
  30796. If you are interested in copying the #GFile object itself (not the on-disk
  30797. file), see g_file_dup().</doc>
  30798. <return-value transfer-ownership="none">
  30799. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise.</doc>
  30800. <type name="gboolean" c:type="gboolean"/>
  30801. </return-value>
  30802. <parameters>
  30803. <instance-parameter name="source" transfer-ownership="none">
  30804. <doc xml:space="preserve">input #GFile</doc>
  30805. <type name="File" c:type="GFile*"/>
  30806. </instance-parameter>
  30807. <parameter name="destination" transfer-ownership="none">
  30808. <doc xml:space="preserve">destination #GFile</doc>
  30809. <type name="File" c:type="GFile*"/>
  30810. </parameter>
  30811. <parameter name="flags" transfer-ownership="none">
  30812. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  30813. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  30814. </parameter>
  30815. <parameter name="cancellable"
  30816. transfer-ownership="none"
  30817. nullable="1"
  30818. allow-none="1">
  30819. <doc xml:space="preserve">optional #GCancellable object,
  30820. %NULL to ignore</doc>
  30821. <type name="Cancellable" c:type="GCancellable*"/>
  30822. </parameter>
  30823. <parameter name="progress_callback"
  30824. transfer-ownership="none"
  30825. nullable="1"
  30826. allow-none="1"
  30827. scope="call"
  30828. closure="4">
  30829. <doc xml:space="preserve">function to callback with
  30830. progress information, or %NULL if progress information is not needed</doc>
  30831. <type name="FileProgressCallback" c:type="GFileProgressCallback"/>
  30832. </parameter>
  30833. <parameter name="progress_callback_data"
  30834. transfer-ownership="none"
  30835. nullable="1"
  30836. allow-none="1">
  30837. <doc xml:space="preserve">user data to pass to @progress_callback</doc>
  30838. <type name="gpointer" c:type="gpointer"/>
  30839. </parameter>
  30840. </parameters>
  30841. </method>
  30842. <method name="copy_async"
  30843. c:identifier="g_file_copy_async"
  30844. introspectable="0">
  30845. <doc xml:space="preserve">Copies the file @source to the location specified by @destination
  30846. asynchronously. For details of the behaviour, see g_file_copy().
  30847. If @progress_callback is not %NULL, then that function that will be called
  30848. just like in g_file_copy(). The callback will run in the default main context
  30849. of the thread calling g_file_copy_async() — the same context as @callback is
  30850. run in.
  30851. When the operation is finished, @callback will be called. You can then call
  30852. g_file_copy_finish() to get the result of the operation.</doc>
  30853. <return-value transfer-ownership="none">
  30854. <type name="none" c:type="void"/>
  30855. </return-value>
  30856. <parameters>
  30857. <instance-parameter name="source" transfer-ownership="none">
  30858. <doc xml:space="preserve">input #GFile</doc>
  30859. <type name="File" c:type="GFile*"/>
  30860. </instance-parameter>
  30861. <parameter name="destination" transfer-ownership="none">
  30862. <doc xml:space="preserve">destination #GFile</doc>
  30863. <type name="File" c:type="GFile*"/>
  30864. </parameter>
  30865. <parameter name="flags" transfer-ownership="none">
  30866. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  30867. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  30868. </parameter>
  30869. <parameter name="io_priority" transfer-ownership="none">
  30870. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  30871. <type name="gint" c:type="int"/>
  30872. </parameter>
  30873. <parameter name="cancellable"
  30874. transfer-ownership="none"
  30875. nullable="1"
  30876. allow-none="1">
  30877. <doc xml:space="preserve">optional #GCancellable object,
  30878. %NULL to ignore</doc>
  30879. <type name="Cancellable" c:type="GCancellable*"/>
  30880. </parameter>
  30881. <parameter name="progress_callback"
  30882. transfer-ownership="none"
  30883. nullable="1"
  30884. allow-none="1"
  30885. closure="5">
  30886. <doc xml:space="preserve">function to callback with progress
  30887. information, or %NULL if progress information is not needed</doc>
  30888. <type name="FileProgressCallback" c:type="GFileProgressCallback"/>
  30889. </parameter>
  30890. <parameter name="progress_callback_data"
  30891. transfer-ownership="none"
  30892. nullable="1"
  30893. allow-none="1">
  30894. <doc xml:space="preserve">user data to pass to @progress_callback</doc>
  30895. <type name="gpointer" c:type="gpointer"/>
  30896. </parameter>
  30897. <parameter name="callback"
  30898. transfer-ownership="none"
  30899. nullable="1"
  30900. allow-none="1"
  30901. scope="async"
  30902. closure="7">
  30903. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  30904. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  30905. </parameter>
  30906. <parameter name="user_data"
  30907. transfer-ownership="none"
  30908. nullable="1"
  30909. allow-none="1">
  30910. <doc xml:space="preserve">the data to pass to callback function</doc>
  30911. <type name="gpointer" c:type="gpointer"/>
  30912. </parameter>
  30913. </parameters>
  30914. </method>
  30915. <method name="copy_attributes"
  30916. c:identifier="g_file_copy_attributes"
  30917. throws="1">
  30918. <doc xml:space="preserve">Copies the file attributes from @source to @destination.
  30919. Normally only a subset of the file attributes are copied,
  30920. those that are copies in a normal file copy operation
  30921. (which for instance does not include e.g. owner). However
  30922. if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
  30923. all the metadata that is possible to copy is copied. This
  30924. is useful when implementing move by copy + delete source.</doc>
  30925. <return-value transfer-ownership="none">
  30926. <doc xml:space="preserve">%TRUE if the attributes were copied successfully,
  30927. %FALSE otherwise.</doc>
  30928. <type name="gboolean" c:type="gboolean"/>
  30929. </return-value>
  30930. <parameters>
  30931. <instance-parameter name="source" transfer-ownership="none">
  30932. <doc xml:space="preserve">a #GFile with attributes</doc>
  30933. <type name="File" c:type="GFile*"/>
  30934. </instance-parameter>
  30935. <parameter name="destination" transfer-ownership="none">
  30936. <doc xml:space="preserve">a #GFile to copy attributes to</doc>
  30937. <type name="File" c:type="GFile*"/>
  30938. </parameter>
  30939. <parameter name="flags" transfer-ownership="none">
  30940. <doc xml:space="preserve">a set of #GFileCopyFlags</doc>
  30941. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  30942. </parameter>
  30943. <parameter name="cancellable"
  30944. transfer-ownership="none"
  30945. nullable="1"
  30946. allow-none="1">
  30947. <doc xml:space="preserve">optional #GCancellable object,
  30948. %NULL to ignore</doc>
  30949. <type name="Cancellable" c:type="GCancellable*"/>
  30950. </parameter>
  30951. </parameters>
  30952. </method>
  30953. <method name="copy_finish" c:identifier="g_file_copy_finish" throws="1">
  30954. <doc xml:space="preserve">Finishes copying the file started with g_file_copy_async().</doc>
  30955. <return-value transfer-ownership="none">
  30956. <doc xml:space="preserve">a %TRUE on success, %FALSE on error.</doc>
  30957. <type name="gboolean" c:type="gboolean"/>
  30958. </return-value>
  30959. <parameters>
  30960. <instance-parameter name="file" transfer-ownership="none">
  30961. <doc xml:space="preserve">input #GFile</doc>
  30962. <type name="File" c:type="GFile*"/>
  30963. </instance-parameter>
  30964. <parameter name="res" transfer-ownership="none">
  30965. <doc xml:space="preserve">a #GAsyncResult</doc>
  30966. <type name="AsyncResult" c:type="GAsyncResult*"/>
  30967. </parameter>
  30968. </parameters>
  30969. </method>
  30970. <method name="create" c:identifier="g_file_create" throws="1">
  30971. <doc xml:space="preserve">Creates a new file and returns an output stream for writing to it.
  30972. The file must not already exist.
  30973. By default files created are generally readable by everyone,
  30974. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  30975. will be made readable only to the current user, to the level
  30976. that is supported on the target filesystem.
  30977. If @cancellable is not %NULL, then the operation can be cancelled
  30978. by triggering the cancellable object from another thread. If the
  30979. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  30980. returned.
  30981. If a file or directory with this name already exists the
  30982. %G_IO_ERROR_EXISTS error will be returned. Some file systems don't
  30983. allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME
  30984. error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will
  30985. be returned. Other errors are possible too, and depend on what kind
  30986. of filesystem the file is on.</doc>
  30987. <return-value transfer-ownership="full">
  30988. <doc xml:space="preserve">a #GFileOutputStream for the newly created
  30989. file, or %NULL on error.
  30990. Free the returned object with g_object_unref().</doc>
  30991. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  30992. </return-value>
  30993. <parameters>
  30994. <instance-parameter name="file" transfer-ownership="none">
  30995. <doc xml:space="preserve">input #GFile</doc>
  30996. <type name="File" c:type="GFile*"/>
  30997. </instance-parameter>
  30998. <parameter name="flags" transfer-ownership="none">
  30999. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  31000. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  31001. </parameter>
  31002. <parameter name="cancellable"
  31003. transfer-ownership="none"
  31004. nullable="1"
  31005. allow-none="1">
  31006. <doc xml:space="preserve">optional #GCancellable object,
  31007. %NULL to ignore</doc>
  31008. <type name="Cancellable" c:type="GCancellable*"/>
  31009. </parameter>
  31010. </parameters>
  31011. </method>
  31012. <method name="create_async" c:identifier="g_file_create_async">
  31013. <doc xml:space="preserve">Asynchronously creates a new file and returns an output stream
  31014. for writing to it. The file must not already exist.
  31015. For more details, see g_file_create() which is
  31016. the synchronous version of this call.
  31017. When the operation is finished, @callback will be called.
  31018. You can then call g_file_create_finish() to get the result
  31019. of the operation.</doc>
  31020. <return-value transfer-ownership="none">
  31021. <type name="none" c:type="void"/>
  31022. </return-value>
  31023. <parameters>
  31024. <instance-parameter name="file" transfer-ownership="none">
  31025. <doc xml:space="preserve">input #GFile</doc>
  31026. <type name="File" c:type="GFile*"/>
  31027. </instance-parameter>
  31028. <parameter name="flags" transfer-ownership="none">
  31029. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  31030. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  31031. </parameter>
  31032. <parameter name="io_priority" transfer-ownership="none">
  31033. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  31034. <type name="gint" c:type="int"/>
  31035. </parameter>
  31036. <parameter name="cancellable"
  31037. transfer-ownership="none"
  31038. nullable="1"
  31039. allow-none="1">
  31040. <doc xml:space="preserve">optional #GCancellable object,
  31041. %NULL to ignore</doc>
  31042. <type name="Cancellable" c:type="GCancellable*"/>
  31043. </parameter>
  31044. <parameter name="callback"
  31045. transfer-ownership="none"
  31046. nullable="1"
  31047. allow-none="1"
  31048. scope="async"
  31049. closure="4">
  31050. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  31051. when the request is satisfied</doc>
  31052. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  31053. </parameter>
  31054. <parameter name="user_data"
  31055. transfer-ownership="none"
  31056. nullable="1"
  31057. allow-none="1">
  31058. <doc xml:space="preserve">the data to pass to callback function</doc>
  31059. <type name="gpointer" c:type="gpointer"/>
  31060. </parameter>
  31061. </parameters>
  31062. </method>
  31063. <method name="create_finish"
  31064. c:identifier="g_file_create_finish"
  31065. throws="1">
  31066. <doc xml:space="preserve">Finishes an asynchronous file create operation started with
  31067. g_file_create_async().</doc>
  31068. <return-value transfer-ownership="full">
  31069. <doc xml:space="preserve">a #GFileOutputStream or %NULL on error.
  31070. Free the returned object with g_object_unref().</doc>
  31071. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  31072. </return-value>
  31073. <parameters>
  31074. <instance-parameter name="file" transfer-ownership="none">
  31075. <doc xml:space="preserve">input #GFile</doc>
  31076. <type name="File" c:type="GFile*"/>
  31077. </instance-parameter>
  31078. <parameter name="res" transfer-ownership="none">
  31079. <doc xml:space="preserve">a #GAsyncResult</doc>
  31080. <type name="AsyncResult" c:type="GAsyncResult*"/>
  31081. </parameter>
  31082. </parameters>
  31083. </method>
  31084. <method name="create_readwrite"
  31085. c:identifier="g_file_create_readwrite"
  31086. version="2.22"
  31087. throws="1">
  31088. <doc xml:space="preserve">Creates a new file and returns a stream for reading and
  31089. writing to it. The file must not already exist.
  31090. By default files created are generally readable by everyone,
  31091. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  31092. will be made readable only to the current user, to the level
  31093. that is supported on the target filesystem.
  31094. If @cancellable is not %NULL, then the operation can be cancelled
  31095. by triggering the cancellable object from another thread. If the
  31096. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  31097. returned.
  31098. If a file or directory with this name already exists, the
  31099. %G_IO_ERROR_EXISTS error will be returned. Some file systems don't
  31100. allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME
  31101. error, and if the name is too long, %G_IO_ERROR_FILENAME_TOO_LONG
  31102. will be returned. Other errors are possible too, and depend on what
  31103. kind of filesystem the file is on.
  31104. Note that in many non-local file cases read and write streams are
  31105. not supported, so make sure you really need to do read and write
  31106. streaming, rather than just opening for reading or writing.</doc>
  31107. <return-value transfer-ownership="full">
  31108. <doc xml:space="preserve">a #GFileIOStream for the newly created
  31109. file, or %NULL on error.
  31110. Free the returned object with g_object_unref().</doc>
  31111. <type name="FileIOStream" c:type="GFileIOStream*"/>
  31112. </return-value>
  31113. <parameters>
  31114. <instance-parameter name="file" transfer-ownership="none">
  31115. <doc xml:space="preserve">a #GFile</doc>
  31116. <type name="File" c:type="GFile*"/>
  31117. </instance-parameter>
  31118. <parameter name="flags" transfer-ownership="none">
  31119. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  31120. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  31121. </parameter>
  31122. <parameter name="cancellable"
  31123. transfer-ownership="none"
  31124. nullable="1"
  31125. allow-none="1">
  31126. <doc xml:space="preserve">optional #GCancellable object,
  31127. %NULL to ignore</doc>
  31128. <type name="Cancellable" c:type="GCancellable*"/>
  31129. </parameter>
  31130. </parameters>
  31131. </method>
  31132. <method name="create_readwrite_async"
  31133. c:identifier="g_file_create_readwrite_async"
  31134. version="2.22">
  31135. <doc xml:space="preserve">Asynchronously creates a new file and returns a stream
  31136. for reading and writing to it. The file must not already exist.
  31137. For more details, see g_file_create_readwrite() which is
  31138. the synchronous version of this call.
  31139. When the operation is finished, @callback will be called.
  31140. You can then call g_file_create_readwrite_finish() to get
  31141. the result of the operation.</doc>
  31142. <return-value transfer-ownership="none">
  31143. <type name="none" c:type="void"/>
  31144. </return-value>
  31145. <parameters>
  31146. <instance-parameter name="file" transfer-ownership="none">
  31147. <doc xml:space="preserve">input #GFile</doc>
  31148. <type name="File" c:type="GFile*"/>
  31149. </instance-parameter>
  31150. <parameter name="flags" transfer-ownership="none">
  31151. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  31152. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  31153. </parameter>
  31154. <parameter name="io_priority" transfer-ownership="none">
  31155. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  31156. <type name="gint" c:type="int"/>
  31157. </parameter>
  31158. <parameter name="cancellable"
  31159. transfer-ownership="none"
  31160. nullable="1"
  31161. allow-none="1">
  31162. <doc xml:space="preserve">optional #GCancellable object,
  31163. %NULL to ignore</doc>
  31164. <type name="Cancellable" c:type="GCancellable*"/>
  31165. </parameter>
  31166. <parameter name="callback"
  31167. transfer-ownership="none"
  31168. nullable="1"
  31169. allow-none="1"
  31170. scope="async"
  31171. closure="4">
  31172. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  31173. when the request is satisfied</doc>
  31174. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  31175. </parameter>
  31176. <parameter name="user_data"
  31177. transfer-ownership="none"
  31178. nullable="1"
  31179. allow-none="1">
  31180. <doc xml:space="preserve">the data to pass to callback function</doc>
  31181. <type name="gpointer" c:type="gpointer"/>
  31182. </parameter>
  31183. </parameters>
  31184. </method>
  31185. <method name="create_readwrite_finish"
  31186. c:identifier="g_file_create_readwrite_finish"
  31187. version="2.22"
  31188. throws="1">
  31189. <doc xml:space="preserve">Finishes an asynchronous file create operation started with
  31190. g_file_create_readwrite_async().</doc>
  31191. <return-value transfer-ownership="full">
  31192. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  31193. Free the returned object with g_object_unref().</doc>
  31194. <type name="FileIOStream" c:type="GFileIOStream*"/>
  31195. </return-value>
  31196. <parameters>
  31197. <instance-parameter name="file" transfer-ownership="none">
  31198. <doc xml:space="preserve">input #GFile</doc>
  31199. <type name="File" c:type="GFile*"/>
  31200. </instance-parameter>
  31201. <parameter name="res" transfer-ownership="none">
  31202. <doc xml:space="preserve">a #GAsyncResult</doc>
  31203. <type name="AsyncResult" c:type="GAsyncResult*"/>
  31204. </parameter>
  31205. </parameters>
  31206. </method>
  31207. <method name="delete" c:identifier="g_file_delete" throws="1">
  31208. <doc xml:space="preserve">Deletes a file. If the @file is a directory, it will only be
  31209. deleted if it is empty. This has the same semantics as g_unlink().
  31210. If @cancellable is not %NULL, then the operation can be cancelled by
  31211. triggering the cancellable object from another thread. If the operation
  31212. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  31213. <return-value transfer-ownership="none">
  31214. <doc xml:space="preserve">%TRUE if the file was deleted. %FALSE otherwise.</doc>
  31215. <type name="gboolean" c:type="gboolean"/>
  31216. </return-value>
  31217. <parameters>
  31218. <instance-parameter name="file" transfer-ownership="none">
  31219. <doc xml:space="preserve">input #GFile</doc>
  31220. <type name="File" c:type="GFile*"/>
  31221. </instance-parameter>
  31222. <parameter name="cancellable"
  31223. transfer-ownership="none"
  31224. nullable="1"
  31225. allow-none="1">
  31226. <doc xml:space="preserve">optional #GCancellable object,
  31227. %NULL to ignore</doc>
  31228. <type name="Cancellable" c:type="GCancellable*"/>
  31229. </parameter>
  31230. </parameters>
  31231. </method>
  31232. <method name="delete_async"
  31233. c:identifier="g_file_delete_async"
  31234. version="2.34">
  31235. <doc xml:space="preserve">Asynchronously delete a file. If the @file is a directory, it will
  31236. only be deleted if it is empty. This has the same semantics as
  31237. g_unlink().</doc>
  31238. <return-value transfer-ownership="none">
  31239. <type name="none" c:type="void"/>
  31240. </return-value>
  31241. <parameters>
  31242. <instance-parameter name="file" transfer-ownership="none">
  31243. <doc xml:space="preserve">input #GFile</doc>
  31244. <type name="File" c:type="GFile*"/>
  31245. </instance-parameter>
  31246. <parameter name="io_priority" transfer-ownership="none">
  31247. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  31248. <type name="gint" c:type="int"/>
  31249. </parameter>
  31250. <parameter name="cancellable"
  31251. transfer-ownership="none"
  31252. nullable="1"
  31253. allow-none="1">
  31254. <doc xml:space="preserve">optional #GCancellable object,
  31255. %NULL to ignore</doc>
  31256. <type name="Cancellable" c:type="GCancellable*"/>
  31257. </parameter>
  31258. <parameter name="callback"
  31259. transfer-ownership="none"
  31260. nullable="1"
  31261. allow-none="1"
  31262. scope="async"
  31263. closure="3">
  31264. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  31265. when the request is satisfied</doc>
  31266. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  31267. </parameter>
  31268. <parameter name="user_data"
  31269. transfer-ownership="none"
  31270. nullable="1"
  31271. allow-none="1">
  31272. <doc xml:space="preserve">the data to pass to callback function</doc>
  31273. <type name="gpointer" c:type="gpointer"/>
  31274. </parameter>
  31275. </parameters>
  31276. </method>
  31277. <method name="delete_finish"
  31278. c:identifier="g_file_delete_finish"
  31279. version="2.34"
  31280. throws="1">
  31281. <doc xml:space="preserve">Finishes deleting a file started with g_file_delete_async().</doc>
  31282. <return-value transfer-ownership="none">
  31283. <doc xml:space="preserve">%TRUE if the file was deleted. %FALSE otherwise.</doc>
  31284. <type name="gboolean" c:type="gboolean"/>
  31285. </return-value>
  31286. <parameters>
  31287. <instance-parameter name="file" transfer-ownership="none">
  31288. <doc xml:space="preserve">input #GFile</doc>
  31289. <type name="File" c:type="GFile*"/>
  31290. </instance-parameter>
  31291. <parameter name="result" transfer-ownership="none">
  31292. <doc xml:space="preserve">a #GAsyncResult</doc>
  31293. <type name="AsyncResult" c:type="GAsyncResult*"/>
  31294. </parameter>
  31295. </parameters>
  31296. </method>
  31297. <method name="dup" c:identifier="g_file_dup">
  31298. <doc xml:space="preserve">Duplicates a #GFile handle. This operation does not duplicate
  31299. the actual file or directory represented by the #GFile; see
  31300. g_file_copy() if attempting to copy a file.
  31301. This call does no blocking I/O.</doc>
  31302. <return-value transfer-ownership="full">
  31303. <doc xml:space="preserve">a new #GFile that is a duplicate
  31304. of the given #GFile.</doc>
  31305. <type name="File" c:type="GFile*"/>
  31306. </return-value>
  31307. <parameters>
  31308. <instance-parameter name="file" transfer-ownership="none">
  31309. <doc xml:space="preserve">input #GFile</doc>
  31310. <type name="File" c:type="GFile*"/>
  31311. </instance-parameter>
  31312. </parameters>
  31313. </method>
  31314. <method name="eject_mountable"
  31315. c:identifier="g_file_eject_mountable"
  31316. deprecated="1"
  31317. deprecated-version="2.22">
  31318. <doc xml:space="preserve">Starts an asynchronous eject on a mountable.
  31319. When this operation has completed, @callback will be called with
  31320. @user_user data, and the operation can be finalized with
  31321. g_file_eject_mountable_finish().
  31322. If @cancellable is not %NULL, then the operation can be cancelled by
  31323. triggering the cancellable object from another thread. If the operation
  31324. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  31325. <doc-deprecated xml:space="preserve">Use g_file_eject_mountable_with_operation() instead.</doc-deprecated>
  31326. <return-value transfer-ownership="none">
  31327. <type name="none" c:type="void"/>
  31328. </return-value>
  31329. <parameters>
  31330. <instance-parameter name="file" transfer-ownership="none">
  31331. <doc xml:space="preserve">input #GFile</doc>
  31332. <type name="File" c:type="GFile*"/>
  31333. </instance-parameter>
  31334. <parameter name="flags" transfer-ownership="none">
  31335. <doc xml:space="preserve">flags affecting the operation</doc>
  31336. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  31337. </parameter>
  31338. <parameter name="cancellable"
  31339. transfer-ownership="none"
  31340. nullable="1"
  31341. allow-none="1">
  31342. <doc xml:space="preserve">optional #GCancellable object,
  31343. %NULL to ignore</doc>
  31344. <type name="Cancellable" c:type="GCancellable*"/>
  31345. </parameter>
  31346. <parameter name="callback"
  31347. transfer-ownership="none"
  31348. nullable="1"
  31349. allow-none="1"
  31350. scope="async"
  31351. closure="3">
  31352. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  31353. when the request is satisfied, or %NULL</doc>
  31354. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  31355. </parameter>
  31356. <parameter name="user_data"
  31357. transfer-ownership="none"
  31358. nullable="1"
  31359. allow-none="1">
  31360. <doc xml:space="preserve">the data to pass to callback function</doc>
  31361. <type name="gpointer" c:type="gpointer"/>
  31362. </parameter>
  31363. </parameters>
  31364. </method>
  31365. <method name="eject_mountable_finish"
  31366. c:identifier="g_file_eject_mountable_finish"
  31367. deprecated="1"
  31368. deprecated-version="2.22"
  31369. throws="1">
  31370. <doc xml:space="preserve">Finishes an asynchronous eject operation started by
  31371. g_file_eject_mountable().</doc>
  31372. <doc-deprecated xml:space="preserve">Use g_file_eject_mountable_with_operation_finish()
  31373. instead.</doc-deprecated>
  31374. <return-value transfer-ownership="none">
  31375. <doc xml:space="preserve">%TRUE if the @file was ejected successfully.
  31376. %FALSE otherwise.</doc>
  31377. <type name="gboolean" c:type="gboolean"/>
  31378. </return-value>
  31379. <parameters>
  31380. <instance-parameter name="file" transfer-ownership="none">
  31381. <doc xml:space="preserve">input #GFile</doc>
  31382. <type name="File" c:type="GFile*"/>
  31383. </instance-parameter>
  31384. <parameter name="result" transfer-ownership="none">
  31385. <doc xml:space="preserve">a #GAsyncResult</doc>
  31386. <type name="AsyncResult" c:type="GAsyncResult*"/>
  31387. </parameter>
  31388. </parameters>
  31389. </method>
  31390. <method name="eject_mountable_with_operation"
  31391. c:identifier="g_file_eject_mountable_with_operation"
  31392. version="2.22">
  31393. <doc xml:space="preserve">Starts an asynchronous eject on a mountable.
  31394. When this operation has completed, @callback will be called with
  31395. @user_user data, and the operation can be finalized with
  31396. g_file_eject_mountable_with_operation_finish().
  31397. If @cancellable is not %NULL, then the operation can be cancelled by
  31398. triggering the cancellable object from another thread. If the operation
  31399. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  31400. <return-value transfer-ownership="none">
  31401. <type name="none" c:type="void"/>
  31402. </return-value>
  31403. <parameters>
  31404. <instance-parameter name="file" transfer-ownership="none">
  31405. <doc xml:space="preserve">input #GFile</doc>
  31406. <type name="File" c:type="GFile*"/>
  31407. </instance-parameter>
  31408. <parameter name="flags" transfer-ownership="none">
  31409. <doc xml:space="preserve">flags affecting the operation</doc>
  31410. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  31411. </parameter>
  31412. <parameter name="mount_operation"
  31413. transfer-ownership="none"
  31414. nullable="1"
  31415. allow-none="1">
  31416. <doc xml:space="preserve">a #GMountOperation,
  31417. or %NULL to avoid user interaction</doc>
  31418. <type name="MountOperation" c:type="GMountOperation*"/>
  31419. </parameter>
  31420. <parameter name="cancellable"
  31421. transfer-ownership="none"
  31422. nullable="1"
  31423. allow-none="1">
  31424. <doc xml:space="preserve">optional #GCancellable object,
  31425. %NULL to ignore</doc>
  31426. <type name="Cancellable" c:type="GCancellable*"/>
  31427. </parameter>
  31428. <parameter name="callback"
  31429. transfer-ownership="none"
  31430. nullable="1"
  31431. allow-none="1"
  31432. scope="async"
  31433. closure="4">
  31434. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  31435. when the request is satisfied, or %NULL</doc>
  31436. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  31437. </parameter>
  31438. <parameter name="user_data"
  31439. transfer-ownership="none"
  31440. nullable="1"
  31441. allow-none="1">
  31442. <doc xml:space="preserve">the data to pass to callback function</doc>
  31443. <type name="gpointer" c:type="gpointer"/>
  31444. </parameter>
  31445. </parameters>
  31446. </method>
  31447. <method name="eject_mountable_with_operation_finish"
  31448. c:identifier="g_file_eject_mountable_with_operation_finish"
  31449. version="2.22"
  31450. throws="1">
  31451. <doc xml:space="preserve">Finishes an asynchronous eject operation started by
  31452. g_file_eject_mountable_with_operation().</doc>
  31453. <return-value transfer-ownership="none">
  31454. <doc xml:space="preserve">%TRUE if the @file was ejected successfully.
  31455. %FALSE otherwise.</doc>
  31456. <type name="gboolean" c:type="gboolean"/>
  31457. </return-value>
  31458. <parameters>
  31459. <instance-parameter name="file" transfer-ownership="none">
  31460. <doc xml:space="preserve">input #GFile</doc>
  31461. <type name="File" c:type="GFile*"/>
  31462. </instance-parameter>
  31463. <parameter name="result" transfer-ownership="none">
  31464. <doc xml:space="preserve">a #GAsyncResult</doc>
  31465. <type name="AsyncResult" c:type="GAsyncResult*"/>
  31466. </parameter>
  31467. </parameters>
  31468. </method>
  31469. <method name="enumerate_children"
  31470. c:identifier="g_file_enumerate_children"
  31471. throws="1">
  31472. <doc xml:space="preserve">Gets the requested information about the files in a directory.
  31473. The result is a #GFileEnumerator object that will give out
  31474. #GFileInfo objects for all the files in the directory.
  31475. The @attributes value is a string that specifies the file
  31476. attributes that should be gathered. It is not an error if
  31477. it's not possible to read a particular requested attribute
  31478. from a file - it just won't be set. @attributes should
  31479. be a comma-separated list of attributes or attribute wildcards.
  31480. The wildcard "*" means all attributes, and a wildcard like
  31481. "standard::*" means all attributes in the standard namespace.
  31482. An example attribute query be "standard::*,owner::user".
  31483. The standard attributes are available as defines, like
  31484. #G_FILE_ATTRIBUTE_STANDARD_NAME.
  31485. If @cancellable is not %NULL, then the operation can be cancelled
  31486. by triggering the cancellable object from another thread. If the
  31487. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  31488. returned.
  31489. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
  31490. be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY
  31491. error will be returned. Other errors are possible too.</doc>
  31492. <return-value transfer-ownership="full">
  31493. <doc xml:space="preserve">A #GFileEnumerator if successful,
  31494. %NULL on error. Free the returned object with g_object_unref().</doc>
  31495. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  31496. </return-value>
  31497. <parameters>
  31498. <instance-parameter name="file" transfer-ownership="none">
  31499. <doc xml:space="preserve">input #GFile</doc>
  31500. <type name="File" c:type="GFile*"/>
  31501. </instance-parameter>
  31502. <parameter name="attributes" transfer-ownership="none">
  31503. <doc xml:space="preserve">an attribute query string</doc>
  31504. <type name="utf8" c:type="const char*"/>
  31505. </parameter>
  31506. <parameter name="flags" transfer-ownership="none">
  31507. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  31508. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  31509. </parameter>
  31510. <parameter name="cancellable"
  31511. transfer-ownership="none"
  31512. nullable="1"
  31513. allow-none="1">
  31514. <doc xml:space="preserve">optional #GCancellable object,
  31515. %NULL to ignore</doc>
  31516. <type name="Cancellable" c:type="GCancellable*"/>
  31517. </parameter>
  31518. </parameters>
  31519. </method>
  31520. <method name="enumerate_children_async"
  31521. c:identifier="g_file_enumerate_children_async">
  31522. <doc xml:space="preserve">Asynchronously gets the requested information about the files
  31523. in a directory. The result is a #GFileEnumerator object that will
  31524. give out #GFileInfo objects for all the files in the directory.
  31525. For more details, see g_file_enumerate_children() which is
  31526. the synchronous version of this call.
  31527. When the operation is finished, @callback will be called. You can
  31528. then call g_file_enumerate_children_finish() to get the result of
  31529. the operation.</doc>
  31530. <return-value transfer-ownership="none">
  31531. <type name="none" c:type="void"/>
  31532. </return-value>
  31533. <parameters>
  31534. <instance-parameter name="file" transfer-ownership="none">
  31535. <doc xml:space="preserve">input #GFile</doc>
  31536. <type name="File" c:type="GFile*"/>
  31537. </instance-parameter>
  31538. <parameter name="attributes" transfer-ownership="none">
  31539. <doc xml:space="preserve">an attribute query string</doc>
  31540. <type name="utf8" c:type="const char*"/>
  31541. </parameter>
  31542. <parameter name="flags" transfer-ownership="none">
  31543. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  31544. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  31545. </parameter>
  31546. <parameter name="io_priority" transfer-ownership="none">
  31547. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  31548. <type name="gint" c:type="int"/>
  31549. </parameter>
  31550. <parameter name="cancellable"
  31551. transfer-ownership="none"
  31552. nullable="1"
  31553. allow-none="1">
  31554. <doc xml:space="preserve">optional #GCancellable object,
  31555. %NULL to ignore</doc>
  31556. <type name="Cancellable" c:type="GCancellable*"/>
  31557. </parameter>
  31558. <parameter name="callback"
  31559. transfer-ownership="none"
  31560. nullable="1"
  31561. allow-none="1"
  31562. scope="async"
  31563. closure="5">
  31564. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  31565. request is satisfied</doc>
  31566. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  31567. </parameter>
  31568. <parameter name="user_data"
  31569. transfer-ownership="none"
  31570. nullable="1"
  31571. allow-none="1">
  31572. <doc xml:space="preserve">the data to pass to callback function</doc>
  31573. <type name="gpointer" c:type="gpointer"/>
  31574. </parameter>
  31575. </parameters>
  31576. </method>
  31577. <method name="enumerate_children_finish"
  31578. c:identifier="g_file_enumerate_children_finish"
  31579. throws="1">
  31580. <doc xml:space="preserve">Finishes an async enumerate children operation.
  31581. See g_file_enumerate_children_async().</doc>
  31582. <return-value transfer-ownership="full">
  31583. <doc xml:space="preserve">a #GFileEnumerator or %NULL
  31584. if an error occurred.
  31585. Free the returned object with g_object_unref().</doc>
  31586. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  31587. </return-value>
  31588. <parameters>
  31589. <instance-parameter name="file" transfer-ownership="none">
  31590. <doc xml:space="preserve">input #GFile</doc>
  31591. <type name="File" c:type="GFile*"/>
  31592. </instance-parameter>
  31593. <parameter name="res" transfer-ownership="none">
  31594. <doc xml:space="preserve">a #GAsyncResult</doc>
  31595. <type name="AsyncResult" c:type="GAsyncResult*"/>
  31596. </parameter>
  31597. </parameters>
  31598. </method>
  31599. <method name="equal" c:identifier="g_file_equal">
  31600. <doc xml:space="preserve">Checks if the two given #GFiles refer to the same file.
  31601. Note that two #GFiles that differ can still refer to the same
  31602. file on the filesystem due to various forms of filename
  31603. aliasing.
  31604. This call does no blocking I/O.</doc>
  31605. <return-value transfer-ownership="none">
  31606. <doc xml:space="preserve">%TRUE if @file1 and @file2 are equal.</doc>
  31607. <type name="gboolean" c:type="gboolean"/>
  31608. </return-value>
  31609. <parameters>
  31610. <instance-parameter name="file1" transfer-ownership="none">
  31611. <doc xml:space="preserve">the first #GFile</doc>
  31612. <type name="File" c:type="GFile*"/>
  31613. </instance-parameter>
  31614. <parameter name="file2" transfer-ownership="none">
  31615. <doc xml:space="preserve">the second #GFile</doc>
  31616. <type name="File" c:type="GFile*"/>
  31617. </parameter>
  31618. </parameters>
  31619. </method>
  31620. <method name="find_enclosing_mount"
  31621. c:identifier="g_file_find_enclosing_mount"
  31622. throws="1">
  31623. <doc xml:space="preserve">Gets a #GMount for the #GFile.
  31624. If the #GFileIface for @file does not have a mount (e.g.
  31625. possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND
  31626. and %NULL will be returned.
  31627. If @cancellable is not %NULL, then the operation can be cancelled by
  31628. triggering the cancellable object from another thread. If the operation
  31629. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  31630. <return-value transfer-ownership="full">
  31631. <doc xml:space="preserve">a #GMount where the @file is located
  31632. or %NULL on error.
  31633. Free the returned object with g_object_unref().</doc>
  31634. <type name="Mount" c:type="GMount*"/>
  31635. </return-value>
  31636. <parameters>
  31637. <instance-parameter name="file" transfer-ownership="none">
  31638. <doc xml:space="preserve">input #GFile</doc>
  31639. <type name="File" c:type="GFile*"/>
  31640. </instance-parameter>
  31641. <parameter name="cancellable"
  31642. transfer-ownership="none"
  31643. nullable="1"
  31644. allow-none="1">
  31645. <doc xml:space="preserve">optional #GCancellable object,
  31646. %NULL to ignore</doc>
  31647. <type name="Cancellable" c:type="GCancellable*"/>
  31648. </parameter>
  31649. </parameters>
  31650. </method>
  31651. <method name="find_enclosing_mount_async"
  31652. c:identifier="g_file_find_enclosing_mount_async">
  31653. <doc xml:space="preserve">Asynchronously gets the mount for the file.
  31654. For more details, see g_file_find_enclosing_mount() which is
  31655. the synchronous version of this call.
  31656. When the operation is finished, @callback will be called.
  31657. You can then call g_file_find_enclosing_mount_finish() to
  31658. get the result of the operation.</doc>
  31659. <return-value transfer-ownership="none">
  31660. <type name="none" c:type="void"/>
  31661. </return-value>
  31662. <parameters>
  31663. <instance-parameter name="file" transfer-ownership="none">
  31664. <doc xml:space="preserve">a #GFile</doc>
  31665. <type name="File" c:type="GFile*"/>
  31666. </instance-parameter>
  31667. <parameter name="io_priority" transfer-ownership="none">
  31668. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  31669. <type name="gint" c:type="int"/>
  31670. </parameter>
  31671. <parameter name="cancellable"
  31672. transfer-ownership="none"
  31673. nullable="1"
  31674. allow-none="1">
  31675. <doc xml:space="preserve">optional #GCancellable object,
  31676. %NULL to ignore</doc>
  31677. <type name="Cancellable" c:type="GCancellable*"/>
  31678. </parameter>
  31679. <parameter name="callback"
  31680. transfer-ownership="none"
  31681. nullable="1"
  31682. allow-none="1"
  31683. scope="async"
  31684. closure="3">
  31685. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  31686. when the request is satisfied</doc>
  31687. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  31688. </parameter>
  31689. <parameter name="user_data"
  31690. transfer-ownership="none"
  31691. nullable="1"
  31692. allow-none="1">
  31693. <doc xml:space="preserve">the data to pass to callback function</doc>
  31694. <type name="gpointer" c:type="gpointer"/>
  31695. </parameter>
  31696. </parameters>
  31697. </method>
  31698. <method name="find_enclosing_mount_finish"
  31699. c:identifier="g_file_find_enclosing_mount_finish"
  31700. throws="1">
  31701. <doc xml:space="preserve">Finishes an asynchronous find mount request.
  31702. See g_file_find_enclosing_mount_async().</doc>
  31703. <return-value transfer-ownership="full">
  31704. <doc xml:space="preserve">#GMount for given @file or %NULL on error.
  31705. Free the returned object with g_object_unref().</doc>
  31706. <type name="Mount" c:type="GMount*"/>
  31707. </return-value>
  31708. <parameters>
  31709. <instance-parameter name="file" transfer-ownership="none">
  31710. <doc xml:space="preserve">a #GFile</doc>
  31711. <type name="File" c:type="GFile*"/>
  31712. </instance-parameter>
  31713. <parameter name="res" transfer-ownership="none">
  31714. <doc xml:space="preserve">a #GAsyncResult</doc>
  31715. <type name="AsyncResult" c:type="GAsyncResult*"/>
  31716. </parameter>
  31717. </parameters>
  31718. </method>
  31719. <method name="get_basename" c:identifier="g_file_get_basename">
  31720. <doc xml:space="preserve">Gets the base name (the last component of the path) for a given #GFile.
  31721. If called for the top level of a system (such as the filesystem root
  31722. or a uri like sftp://host/) it will return a single directory separator
  31723. (and on Windows, possibly a drive letter).
  31724. The base name is a byte string (not UTF-8). It has no defined encoding
  31725. or rules other than it may not contain zero bytes. If you want to use
  31726. filenames in a user interface you should use the display name that you
  31727. can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
  31728. attribute with g_file_query_info().
  31729. This call does no blocking I/O.</doc>
  31730. <return-value transfer-ownership="full" nullable="1">
  31731. <doc xml:space="preserve">string containing the #GFile's base name, or
  31732. %NULL if given #GFile is invalid. The returned string should be
  31733. freed with g_free() when no longer needed.</doc>
  31734. <type name="utf8" c:type="char*"/>
  31735. </return-value>
  31736. <parameters>
  31737. <instance-parameter name="file" transfer-ownership="none">
  31738. <doc xml:space="preserve">input #GFile</doc>
  31739. <type name="File" c:type="GFile*"/>
  31740. </instance-parameter>
  31741. </parameters>
  31742. </method>
  31743. <method name="get_child" c:identifier="g_file_get_child">
  31744. <doc xml:space="preserve">Gets a child of @file with basename equal to @name.
  31745. Note that the file with that specific name might not exist, but
  31746. you can still have a #GFile that points to it. You can use this
  31747. for instance to create that file.
  31748. This call does no blocking I/O.</doc>
  31749. <return-value transfer-ownership="full">
  31750. <doc xml:space="preserve">a #GFile to a child specified by @name.
  31751. Free the returned object with g_object_unref().</doc>
  31752. <type name="File" c:type="GFile*"/>
  31753. </return-value>
  31754. <parameters>
  31755. <instance-parameter name="file" transfer-ownership="none">
  31756. <doc xml:space="preserve">input #GFile</doc>
  31757. <type name="File" c:type="GFile*"/>
  31758. </instance-parameter>
  31759. <parameter name="name" transfer-ownership="none">
  31760. <doc xml:space="preserve">string containing the child's basename</doc>
  31761. <type name="utf8" c:type="const char*"/>
  31762. </parameter>
  31763. </parameters>
  31764. </method>
  31765. <method name="get_child_for_display_name"
  31766. c:identifier="g_file_get_child_for_display_name"
  31767. throws="1">
  31768. <doc xml:space="preserve">Gets the child of @file for a given @display_name (i.e. a UTF-8
  31769. version of the name). If this function fails, it returns %NULL
  31770. and @error will be set. This is very useful when constructing a
  31771. #GFile for a new file and the user entered the filename in the
  31772. user interface, for instance when you select a directory and
  31773. type a filename in the file selector.
  31774. This call does no blocking I/O.</doc>
  31775. <return-value transfer-ownership="full">
  31776. <doc xml:space="preserve">a #GFile to the specified child, or
  31777. %NULL if the display name couldn't be converted.
  31778. Free the returned object with g_object_unref().</doc>
  31779. <type name="File" c:type="GFile*"/>
  31780. </return-value>
  31781. <parameters>
  31782. <instance-parameter name="file" transfer-ownership="none">
  31783. <doc xml:space="preserve">input #GFile</doc>
  31784. <type name="File" c:type="GFile*"/>
  31785. </instance-parameter>
  31786. <parameter name="display_name" transfer-ownership="none">
  31787. <doc xml:space="preserve">string to a possible child</doc>
  31788. <type name="utf8" c:type="const char*"/>
  31789. </parameter>
  31790. </parameters>
  31791. </method>
  31792. <method name="get_parent" c:identifier="g_file_get_parent">
  31793. <doc xml:space="preserve">Gets the parent directory for the @file.
  31794. If the @file represents the root directory of the
  31795. file system, then %NULL will be returned.
  31796. This call does no blocking I/O.</doc>
  31797. <return-value transfer-ownership="full" nullable="1">
  31798. <doc xml:space="preserve">a #GFile structure to the
  31799. parent of the given #GFile or %NULL if there is no parent. Free
  31800. the returned object with g_object_unref().</doc>
  31801. <type name="File" c:type="GFile*"/>
  31802. </return-value>
  31803. <parameters>
  31804. <instance-parameter name="file" transfer-ownership="none">
  31805. <doc xml:space="preserve">input #GFile</doc>
  31806. <type name="File" c:type="GFile*"/>
  31807. </instance-parameter>
  31808. </parameters>
  31809. </method>
  31810. <method name="get_parse_name" c:identifier="g_file_get_parse_name">
  31811. <doc xml:space="preserve">Gets the parse name of the @file.
  31812. A parse name is a UTF-8 string that describes the
  31813. file such that one can get the #GFile back using
  31814. g_file_parse_name().
  31815. This is generally used to show the #GFile as a nice
  31816. full-pathname kind of string in a user interface,
  31817. like in a location entry.
  31818. For local files with names that can safely be converted
  31819. to UTF-8 the pathname is used, otherwise the IRI is used
  31820. (a form of URI that allows UTF-8 characters unescaped).
  31821. This call does no blocking I/O.</doc>
  31822. <return-value transfer-ownership="full">
  31823. <doc xml:space="preserve">a string containing the #GFile's parse name.
  31824. The returned string should be freed with g_free()
  31825. when no longer needed.</doc>
  31826. <type name="utf8" c:type="char*"/>
  31827. </return-value>
  31828. <parameters>
  31829. <instance-parameter name="file" transfer-ownership="none">
  31830. <doc xml:space="preserve">input #GFile</doc>
  31831. <type name="File" c:type="GFile*"/>
  31832. </instance-parameter>
  31833. </parameters>
  31834. </method>
  31835. <method name="get_path" c:identifier="g_file_get_path">
  31836. <doc xml:space="preserve">Gets the local pathname for #GFile, if one exists. If non-%NULL, this is
  31837. guaranteed to be an absolute, canonical path. It might contain symlinks.
  31838. This call does no blocking I/O.</doc>
  31839. <return-value transfer-ownership="full" nullable="1">
  31840. <doc xml:space="preserve">string containing the #GFile's path, or %NULL
  31841. if no such path exists. The returned string should be freed
  31842. with g_free() when no longer needed.</doc>
  31843. <type name="utf8" c:type="char*"/>
  31844. </return-value>
  31845. <parameters>
  31846. <instance-parameter name="file" transfer-ownership="none">
  31847. <doc xml:space="preserve">input #GFile</doc>
  31848. <type name="File" c:type="GFile*"/>
  31849. </instance-parameter>
  31850. </parameters>
  31851. </method>
  31852. <method name="get_relative_path" c:identifier="g_file_get_relative_path">
  31853. <doc xml:space="preserve">Gets the path for @descendant relative to @parent.
  31854. This call does no blocking I/O.</doc>
  31855. <return-value transfer-ownership="full" nullable="1">
  31856. <doc xml:space="preserve">string with the relative path from @descendant
  31857. to @parent, or %NULL if @descendant doesn't have @parent as
  31858. prefix. The returned string should be freed with g_free() when
  31859. no longer needed.</doc>
  31860. <type name="utf8" c:type="char*"/>
  31861. </return-value>
  31862. <parameters>
  31863. <instance-parameter name="parent" transfer-ownership="none">
  31864. <doc xml:space="preserve">input #GFile</doc>
  31865. <type name="File" c:type="GFile*"/>
  31866. </instance-parameter>
  31867. <parameter name="descendant" transfer-ownership="none">
  31868. <doc xml:space="preserve">input #GFile</doc>
  31869. <type name="File" c:type="GFile*"/>
  31870. </parameter>
  31871. </parameters>
  31872. </method>
  31873. <method name="get_uri" c:identifier="g_file_get_uri">
  31874. <doc xml:space="preserve">Gets the URI for the @file.
  31875. This call does no blocking I/O.</doc>
  31876. <return-value transfer-ownership="full">
  31877. <doc xml:space="preserve">a string containing the #GFile's URI.
  31878. The returned string should be freed with g_free()
  31879. when no longer needed.</doc>
  31880. <type name="utf8" c:type="char*"/>
  31881. </return-value>
  31882. <parameters>
  31883. <instance-parameter name="file" transfer-ownership="none">
  31884. <doc xml:space="preserve">input #GFile</doc>
  31885. <type name="File" c:type="GFile*"/>
  31886. </instance-parameter>
  31887. </parameters>
  31888. </method>
  31889. <method name="get_uri_scheme" c:identifier="g_file_get_uri_scheme">
  31890. <doc xml:space="preserve">Gets the URI scheme for a #GFile.
  31891. RFC 3986 decodes the scheme as:
  31892. |[
  31893. URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
  31894. ]|
  31895. Common schemes include "file", "http", "ftp", etc.
  31896. This call does no blocking I/O.</doc>
  31897. <return-value transfer-ownership="full">
  31898. <doc xml:space="preserve">a string containing the URI scheme for the given
  31899. #GFile. The returned string should be freed with g_free()
  31900. when no longer needed.</doc>
  31901. <type name="utf8" c:type="char*"/>
  31902. </return-value>
  31903. <parameters>
  31904. <instance-parameter name="file" transfer-ownership="none">
  31905. <doc xml:space="preserve">input #GFile</doc>
  31906. <type name="File" c:type="GFile*"/>
  31907. </instance-parameter>
  31908. </parameters>
  31909. </method>
  31910. <method name="has_parent"
  31911. c:identifier="g_file_has_parent"
  31912. version="2.24">
  31913. <doc xml:space="preserve">Checks if @file has a parent, and optionally, if it is @parent.
  31914. If @parent is %NULL then this function returns %TRUE if @file has any
  31915. parent at all. If @parent is non-%NULL then %TRUE is only returned
  31916. if @file is an immediate child of @parent.</doc>
  31917. <return-value transfer-ownership="none">
  31918. <doc xml:space="preserve">%TRUE if @file is an immediate child of @parent (or any parent in
  31919. the case that @parent is %NULL).</doc>
  31920. <type name="gboolean" c:type="gboolean"/>
  31921. </return-value>
  31922. <parameters>
  31923. <instance-parameter name="file" transfer-ownership="none">
  31924. <doc xml:space="preserve">input #GFile</doc>
  31925. <type name="File" c:type="GFile*"/>
  31926. </instance-parameter>
  31927. <parameter name="parent"
  31928. transfer-ownership="none"
  31929. nullable="1"
  31930. allow-none="1">
  31931. <doc xml:space="preserve">the parent to check for, or %NULL</doc>
  31932. <type name="File" c:type="GFile*"/>
  31933. </parameter>
  31934. </parameters>
  31935. </method>
  31936. <method name="has_prefix" c:identifier="g_file_has_prefix">
  31937. <doc xml:space="preserve">Checks whether @file has the prefix specified by @prefix.
  31938. In other words, if the names of initial elements of @file's
  31939. pathname match @prefix. Only full pathname elements are matched,
  31940. so a path like /foo is not considered a prefix of /foobar, only
  31941. of /foo/bar.
  31942. A #GFile is not a prefix of itself. If you want to check for
  31943. equality, use g_file_equal().
  31944. This call does no I/O, as it works purely on names. As such it can
  31945. sometimes return %FALSE even if @file is inside a @prefix (from a
  31946. filesystem point of view), because the prefix of @file is an alias
  31947. of @prefix.</doc>
  31948. <return-value transfer-ownership="none">
  31949. <doc xml:space="preserve">%TRUE if the @files's parent, grandparent, etc is @prefix,
  31950. %FALSE otherwise.</doc>
  31951. <type name="gboolean" c:type="gboolean"/>
  31952. </return-value>
  31953. <parameters>
  31954. <instance-parameter name="file" transfer-ownership="none">
  31955. <doc xml:space="preserve">input #GFile</doc>
  31956. <type name="File" c:type="GFile*"/>
  31957. </instance-parameter>
  31958. <parameter name="prefix" transfer-ownership="none">
  31959. <doc xml:space="preserve">input #GFile</doc>
  31960. <type name="File" c:type="GFile*"/>
  31961. </parameter>
  31962. </parameters>
  31963. </method>
  31964. <method name="has_uri_scheme" c:identifier="g_file_has_uri_scheme">
  31965. <doc xml:space="preserve">Checks to see if a #GFile has a given URI scheme.
  31966. This call does no blocking I/O.</doc>
  31967. <return-value transfer-ownership="none">
  31968. <doc xml:space="preserve">%TRUE if #GFile's backend supports the
  31969. given URI scheme, %FALSE if URI scheme is %NULL,
  31970. not supported, or #GFile is invalid.</doc>
  31971. <type name="gboolean" c:type="gboolean"/>
  31972. </return-value>
  31973. <parameters>
  31974. <instance-parameter name="file" transfer-ownership="none">
  31975. <doc xml:space="preserve">input #GFile</doc>
  31976. <type name="File" c:type="GFile*"/>
  31977. </instance-parameter>
  31978. <parameter name="uri_scheme" transfer-ownership="none">
  31979. <doc xml:space="preserve">a string containing a URI scheme</doc>
  31980. <type name="utf8" c:type="const char*"/>
  31981. </parameter>
  31982. </parameters>
  31983. </method>
  31984. <method name="hash" c:identifier="g_file_hash">
  31985. <doc xml:space="preserve">Creates a hash value for a #GFile.
  31986. This call does no blocking I/O.</doc>
  31987. <return-value transfer-ownership="none">
  31988. <doc xml:space="preserve">0 if @file is not a valid #GFile, otherwise an
  31989. integer that can be used as hash value for the #GFile.
  31990. This function is intended for easily hashing a #GFile to
  31991. add to a #GHashTable or similar data structure.</doc>
  31992. <type name="guint" c:type="guint"/>
  31993. </return-value>
  31994. <parameters>
  31995. <instance-parameter name="file" transfer-ownership="none">
  31996. <doc xml:space="preserve">#gconstpointer to a #GFile</doc>
  31997. <type name="File" c:type="gconstpointer"/>
  31998. </instance-parameter>
  31999. </parameters>
  32000. </method>
  32001. <method name="is_native" c:identifier="g_file_is_native">
  32002. <doc xml:space="preserve">Checks to see if a file is native to the platform.
  32003. A native file s one expressed in the platform-native filename format,
  32004. e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
  32005. as it might be on a locally mounted remote filesystem.
  32006. On some systems non-native files may be available using the native
  32007. filesystem via a userspace filesystem (FUSE), in these cases this call
  32008. will return %FALSE, but g_file_get_path() will still return a native path.
  32009. This call does no blocking I/O.</doc>
  32010. <return-value transfer-ownership="none">
  32011. <doc xml:space="preserve">%TRUE if @file is native</doc>
  32012. <type name="gboolean" c:type="gboolean"/>
  32013. </return-value>
  32014. <parameters>
  32015. <instance-parameter name="file" transfer-ownership="none">
  32016. <doc xml:space="preserve">input #GFile</doc>
  32017. <type name="File" c:type="GFile*"/>
  32018. </instance-parameter>
  32019. </parameters>
  32020. </method>
  32021. <method name="load_contents"
  32022. c:identifier="g_file_load_contents"
  32023. throws="1">
  32024. <doc xml:space="preserve">Loads the content of the file into memory. The data is always
  32025. zero-terminated, but this is not included in the resultant @length.
  32026. The returned @content should be freed with g_free() when no longer
  32027. needed.
  32028. If @cancellable is not %NULL, then the operation can be cancelled by
  32029. triggering the cancellable object from another thread. If the operation
  32030. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32031. <return-value transfer-ownership="none">
  32032. <doc xml:space="preserve">%TRUE if the @file's contents were successfully loaded.
  32033. %FALSE if there were errors.</doc>
  32034. <type name="gboolean" c:type="gboolean"/>
  32035. </return-value>
  32036. <parameters>
  32037. <instance-parameter name="file" transfer-ownership="none">
  32038. <doc xml:space="preserve">input #GFile</doc>
  32039. <type name="File" c:type="GFile*"/>
  32040. </instance-parameter>
  32041. <parameter name="cancellable"
  32042. transfer-ownership="none"
  32043. nullable="1"
  32044. allow-none="1">
  32045. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  32046. <type name="Cancellable" c:type="GCancellable*"/>
  32047. </parameter>
  32048. <parameter name="contents"
  32049. direction="out"
  32050. caller-allocates="0"
  32051. transfer-ownership="full">
  32052. <doc xml:space="preserve">a location to place the contents of the file</doc>
  32053. <array length="2" zero-terminated="0" c:type="char**">
  32054. <type name="guint8"/>
  32055. </array>
  32056. </parameter>
  32057. <parameter name="length"
  32058. direction="out"
  32059. caller-allocates="0"
  32060. transfer-ownership="full"
  32061. optional="1"
  32062. allow-none="1">
  32063. <doc xml:space="preserve">a location to place the length of the contents of the file,
  32064. or %NULL if the length is not needed</doc>
  32065. <type name="gsize" c:type="gsize*"/>
  32066. </parameter>
  32067. <parameter name="etag_out"
  32068. direction="out"
  32069. caller-allocates="0"
  32070. transfer-ownership="full"
  32071. optional="1"
  32072. allow-none="1">
  32073. <doc xml:space="preserve">a location to place the current entity tag for the file,
  32074. or %NULL if the entity tag is not needed</doc>
  32075. <type name="utf8" c:type="char**"/>
  32076. </parameter>
  32077. </parameters>
  32078. </method>
  32079. <method name="load_contents_async"
  32080. c:identifier="g_file_load_contents_async">
  32081. <doc xml:space="preserve">Starts an asynchronous load of the @file's contents.
  32082. For more details, see g_file_load_contents() which is
  32083. the synchronous version of this call.
  32084. When the load operation has completed, @callback will be called
  32085. with @user data. To finish the operation, call
  32086. g_file_load_contents_finish() with the #GAsyncResult returned by
  32087. the @callback.
  32088. If @cancellable is not %NULL, then the operation can be cancelled by
  32089. triggering the cancellable object from another thread. If the operation
  32090. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32091. <return-value transfer-ownership="none">
  32092. <type name="none" c:type="void"/>
  32093. </return-value>
  32094. <parameters>
  32095. <instance-parameter name="file" transfer-ownership="none">
  32096. <doc xml:space="preserve">input #GFile</doc>
  32097. <type name="File" c:type="GFile*"/>
  32098. </instance-parameter>
  32099. <parameter name="cancellable"
  32100. transfer-ownership="none"
  32101. nullable="1"
  32102. allow-none="1">
  32103. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  32104. <type name="Cancellable" c:type="GCancellable*"/>
  32105. </parameter>
  32106. <parameter name="callback"
  32107. transfer-ownership="none"
  32108. nullable="1"
  32109. allow-none="1"
  32110. scope="async"
  32111. closure="2">
  32112. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  32113. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  32114. </parameter>
  32115. <parameter name="user_data"
  32116. transfer-ownership="none"
  32117. nullable="1"
  32118. allow-none="1">
  32119. <doc xml:space="preserve">the data to pass to callback function</doc>
  32120. <type name="gpointer" c:type="gpointer"/>
  32121. </parameter>
  32122. </parameters>
  32123. </method>
  32124. <method name="load_contents_finish"
  32125. c:identifier="g_file_load_contents_finish"
  32126. throws="1">
  32127. <doc xml:space="preserve">Finishes an asynchronous load of the @file's contents.
  32128. The contents are placed in @contents, and @length is set to the
  32129. size of the @contents string. The @content should be freed with
  32130. g_free() when no longer needed. If @etag_out is present, it will be
  32131. set to the new entity tag for the @file.</doc>
  32132. <return-value transfer-ownership="none">
  32133. <doc xml:space="preserve">%TRUE if the load was successful. If %FALSE and @error is
  32134. present, it will be set appropriately.</doc>
  32135. <type name="gboolean" c:type="gboolean"/>
  32136. </return-value>
  32137. <parameters>
  32138. <instance-parameter name="file" transfer-ownership="none">
  32139. <doc xml:space="preserve">input #GFile</doc>
  32140. <type name="File" c:type="GFile*"/>
  32141. </instance-parameter>
  32142. <parameter name="res" transfer-ownership="none">
  32143. <doc xml:space="preserve">a #GAsyncResult</doc>
  32144. <type name="AsyncResult" c:type="GAsyncResult*"/>
  32145. </parameter>
  32146. <parameter name="contents"
  32147. direction="out"
  32148. caller-allocates="0"
  32149. transfer-ownership="full">
  32150. <doc xml:space="preserve">a location to place the contents of the file</doc>
  32151. <array length="2" zero-terminated="0" c:type="char**">
  32152. <type name="guint8"/>
  32153. </array>
  32154. </parameter>
  32155. <parameter name="length"
  32156. direction="out"
  32157. caller-allocates="0"
  32158. transfer-ownership="full"
  32159. optional="1"
  32160. allow-none="1">
  32161. <doc xml:space="preserve">a location to place the length of the contents of the file,
  32162. or %NULL if the length is not needed</doc>
  32163. <type name="gsize" c:type="gsize*"/>
  32164. </parameter>
  32165. <parameter name="etag_out"
  32166. direction="out"
  32167. caller-allocates="0"
  32168. transfer-ownership="full"
  32169. optional="1"
  32170. allow-none="1">
  32171. <doc xml:space="preserve">a location to place the current entity tag for the file,
  32172. or %NULL if the entity tag is not needed</doc>
  32173. <type name="utf8" c:type="char**"/>
  32174. </parameter>
  32175. </parameters>
  32176. </method>
  32177. <method name="load_partial_contents_async"
  32178. c:identifier="g_file_load_partial_contents_async"
  32179. introspectable="0">
  32180. <doc xml:space="preserve">Reads the partial contents of a file. A #GFileReadMoreCallback should
  32181. be used to stop reading from the file when appropriate, else this
  32182. function will behave exactly as g_file_load_contents_async(). This
  32183. operation can be finished by g_file_load_partial_contents_finish().
  32184. Users of this function should be aware that @user_data is passed to
  32185. both the @read_more_callback and the @callback.
  32186. If @cancellable is not %NULL, then the operation can be cancelled by
  32187. triggering the cancellable object from another thread. If the operation
  32188. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32189. <return-value transfer-ownership="none">
  32190. <type name="none" c:type="void"/>
  32191. </return-value>
  32192. <parameters>
  32193. <instance-parameter name="file" transfer-ownership="none">
  32194. <doc xml:space="preserve">input #GFile</doc>
  32195. <type name="File" c:type="GFile*"/>
  32196. </instance-parameter>
  32197. <parameter name="cancellable"
  32198. transfer-ownership="none"
  32199. nullable="1"
  32200. allow-none="1">
  32201. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  32202. <type name="Cancellable" c:type="GCancellable*"/>
  32203. </parameter>
  32204. <parameter name="read_more_callback" transfer-ownership="none">
  32205. <doc xml:space="preserve">a #GFileReadMoreCallback to receive partial data
  32206. and to specify whether further data should be read</doc>
  32207. <type name="FileReadMoreCallback" c:type="GFileReadMoreCallback"/>
  32208. </parameter>
  32209. <parameter name="callback"
  32210. transfer-ownership="none"
  32211. nullable="1"
  32212. allow-none="1"
  32213. scope="async"
  32214. closure="3">
  32215. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  32216. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  32217. </parameter>
  32218. <parameter name="user_data"
  32219. transfer-ownership="none"
  32220. nullable="1"
  32221. allow-none="1">
  32222. <doc xml:space="preserve">the data to pass to the callback functions</doc>
  32223. <type name="gpointer" c:type="gpointer"/>
  32224. </parameter>
  32225. </parameters>
  32226. </method>
  32227. <method name="load_partial_contents_finish"
  32228. c:identifier="g_file_load_partial_contents_finish"
  32229. throws="1">
  32230. <doc xml:space="preserve">Finishes an asynchronous partial load operation that was started
  32231. with g_file_load_partial_contents_async(). The data is always
  32232. zero-terminated, but this is not included in the resultant @length.
  32233. The returned @content should be freed with g_free() when no longer
  32234. needed.</doc>
  32235. <return-value transfer-ownership="none">
  32236. <doc xml:space="preserve">%TRUE if the load was successful. If %FALSE and @error is
  32237. present, it will be set appropriately.</doc>
  32238. <type name="gboolean" c:type="gboolean"/>
  32239. </return-value>
  32240. <parameters>
  32241. <instance-parameter name="file" transfer-ownership="none">
  32242. <doc xml:space="preserve">input #GFile</doc>
  32243. <type name="File" c:type="GFile*"/>
  32244. </instance-parameter>
  32245. <parameter name="res" transfer-ownership="none">
  32246. <doc xml:space="preserve">a #GAsyncResult</doc>
  32247. <type name="AsyncResult" c:type="GAsyncResult*"/>
  32248. </parameter>
  32249. <parameter name="contents"
  32250. direction="out"
  32251. caller-allocates="0"
  32252. transfer-ownership="full">
  32253. <doc xml:space="preserve">a location to place the contents of the file</doc>
  32254. <array length="2" zero-terminated="0" c:type="char**">
  32255. <type name="guint8"/>
  32256. </array>
  32257. </parameter>
  32258. <parameter name="length"
  32259. direction="out"
  32260. caller-allocates="0"
  32261. transfer-ownership="full"
  32262. optional="1"
  32263. allow-none="1">
  32264. <doc xml:space="preserve">a location to place the length of the contents of the file,
  32265. or %NULL if the length is not needed</doc>
  32266. <type name="gsize" c:type="gsize*"/>
  32267. </parameter>
  32268. <parameter name="etag_out"
  32269. direction="out"
  32270. caller-allocates="0"
  32271. transfer-ownership="full"
  32272. optional="1"
  32273. allow-none="1">
  32274. <doc xml:space="preserve">a location to place the current entity tag for the file,
  32275. or %NULL if the entity tag is not needed</doc>
  32276. <type name="utf8" c:type="char**"/>
  32277. </parameter>
  32278. </parameters>
  32279. </method>
  32280. <method name="make_directory"
  32281. c:identifier="g_file_make_directory"
  32282. throws="1">
  32283. <doc xml:space="preserve">Creates a directory. Note that this will only create a child directory
  32284. of the immediate parent directory of the path or URI given by the #GFile.
  32285. To recursively create directories, see g_file_make_directory_with_parents().
  32286. This function will fail if the parent directory does not exist, setting
  32287. @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support
  32288. creating directories, this function will fail, setting @error to
  32289. %G_IO_ERROR_NOT_SUPPORTED.
  32290. For a local #GFile the newly created directory will have the default
  32291. (current) ownership and permissions of the current process.
  32292. If @cancellable is not %NULL, then the operation can be cancelled by
  32293. triggering the cancellable object from another thread. If the operation
  32294. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32295. <return-value transfer-ownership="none">
  32296. <doc xml:space="preserve">%TRUE on successful creation, %FALSE otherwise.</doc>
  32297. <type name="gboolean" c:type="gboolean"/>
  32298. </return-value>
  32299. <parameters>
  32300. <instance-parameter name="file" transfer-ownership="none">
  32301. <doc xml:space="preserve">input #GFile</doc>
  32302. <type name="File" c:type="GFile*"/>
  32303. </instance-parameter>
  32304. <parameter name="cancellable"
  32305. transfer-ownership="none"
  32306. nullable="1"
  32307. allow-none="1">
  32308. <doc xml:space="preserve">optional #GCancellable object,
  32309. %NULL to ignore</doc>
  32310. <type name="Cancellable" c:type="GCancellable*"/>
  32311. </parameter>
  32312. </parameters>
  32313. </method>
  32314. <method name="make_directory_async"
  32315. c:identifier="g_file_make_directory_async"
  32316. version="2.38">
  32317. <doc xml:space="preserve">Asynchronously creates a directory.</doc>
  32318. <return-value transfer-ownership="none">
  32319. <type name="none" c:type="void"/>
  32320. </return-value>
  32321. <parameters>
  32322. <instance-parameter name="file" transfer-ownership="none">
  32323. <doc xml:space="preserve">input #GFile</doc>
  32324. <type name="File" c:type="GFile*"/>
  32325. </instance-parameter>
  32326. <parameter name="io_priority" transfer-ownership="none">
  32327. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  32328. <type name="gint" c:type="int"/>
  32329. </parameter>
  32330. <parameter name="cancellable"
  32331. transfer-ownership="none"
  32332. nullable="1"
  32333. allow-none="1">
  32334. <doc xml:space="preserve">optional #GCancellable object,
  32335. %NULL to ignore</doc>
  32336. <type name="Cancellable" c:type="GCancellable*"/>
  32337. </parameter>
  32338. <parameter name="callback"
  32339. transfer-ownership="none"
  32340. nullable="1"
  32341. allow-none="1"
  32342. scope="async"
  32343. closure="3">
  32344. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  32345. when the request is satisfied</doc>
  32346. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  32347. </parameter>
  32348. <parameter name="user_data"
  32349. transfer-ownership="none"
  32350. nullable="1"
  32351. allow-none="1">
  32352. <doc xml:space="preserve">the data to pass to callback function</doc>
  32353. <type name="gpointer" c:type="gpointer"/>
  32354. </parameter>
  32355. </parameters>
  32356. </method>
  32357. <method name="make_directory_finish"
  32358. c:identifier="g_file_make_directory_finish"
  32359. version="2.38"
  32360. throws="1">
  32361. <doc xml:space="preserve">Finishes an asynchronous directory creation, started with
  32362. g_file_make_directory_async().</doc>
  32363. <return-value transfer-ownership="none">
  32364. <doc xml:space="preserve">%TRUE on successful directory creation, %FALSE otherwise.</doc>
  32365. <type name="gboolean" c:type="gboolean"/>
  32366. </return-value>
  32367. <parameters>
  32368. <instance-parameter name="file" transfer-ownership="none">
  32369. <doc xml:space="preserve">input #GFile</doc>
  32370. <type name="File" c:type="GFile*"/>
  32371. </instance-parameter>
  32372. <parameter name="result" transfer-ownership="none">
  32373. <doc xml:space="preserve">a #GAsyncResult</doc>
  32374. <type name="AsyncResult" c:type="GAsyncResult*"/>
  32375. </parameter>
  32376. </parameters>
  32377. </method>
  32378. <method name="make_directory_with_parents"
  32379. c:identifier="g_file_make_directory_with_parents"
  32380. version="2.18"
  32381. throws="1">
  32382. <doc xml:space="preserve">Creates a directory and any parent directories that may not
  32383. exist similar to 'mkdir -p'. If the file system does not support
  32384. creating directories, this function will fail, setting @error to
  32385. %G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists,
  32386. this function will fail setting @error to %G_IO_ERROR_EXISTS, unlike
  32387. the similar g_mkdir_with_parents().
  32388. For a local #GFile the newly created directories will have the default
  32389. (current) ownership and permissions of the current process.
  32390. If @cancellable is not %NULL, then the operation can be cancelled by
  32391. triggering the cancellable object from another thread. If the operation
  32392. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32393. <return-value transfer-ownership="none">
  32394. <doc xml:space="preserve">%TRUE if all directories have been successfully created, %FALSE
  32395. otherwise.</doc>
  32396. <type name="gboolean" c:type="gboolean"/>
  32397. </return-value>
  32398. <parameters>
  32399. <instance-parameter name="file" transfer-ownership="none">
  32400. <doc xml:space="preserve">input #GFile</doc>
  32401. <type name="File" c:type="GFile*"/>
  32402. </instance-parameter>
  32403. <parameter name="cancellable"
  32404. transfer-ownership="none"
  32405. nullable="1"
  32406. allow-none="1">
  32407. <doc xml:space="preserve">optional #GCancellable object,
  32408. %NULL to ignore</doc>
  32409. <type name="Cancellable" c:type="GCancellable*"/>
  32410. </parameter>
  32411. </parameters>
  32412. </method>
  32413. <method name="make_symbolic_link"
  32414. c:identifier="g_file_make_symbolic_link"
  32415. throws="1">
  32416. <doc xml:space="preserve">Creates a symbolic link named @file which contains the string
  32417. @symlink_value.
  32418. If @cancellable is not %NULL, then the operation can be cancelled by
  32419. triggering the cancellable object from another thread. If the operation
  32420. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32421. <return-value transfer-ownership="none">
  32422. <doc xml:space="preserve">%TRUE on the creation of a new symlink, %FALSE otherwise.</doc>
  32423. <type name="gboolean" c:type="gboolean"/>
  32424. </return-value>
  32425. <parameters>
  32426. <instance-parameter name="file" transfer-ownership="none">
  32427. <doc xml:space="preserve">a #GFile with the name of the symlink to create</doc>
  32428. <type name="File" c:type="GFile*"/>
  32429. </instance-parameter>
  32430. <parameter name="symlink_value" transfer-ownership="none">
  32431. <doc xml:space="preserve">a string with the path for the target of the new symlink</doc>
  32432. <type name="utf8" c:type="const char*"/>
  32433. </parameter>
  32434. <parameter name="cancellable"
  32435. transfer-ownership="none"
  32436. nullable="1"
  32437. allow-none="1">
  32438. <doc xml:space="preserve">optional #GCancellable object,
  32439. %NULL to ignore</doc>
  32440. <type name="Cancellable" c:type="GCancellable*"/>
  32441. </parameter>
  32442. </parameters>
  32443. </method>
  32444. <method name="measure_disk_usage"
  32445. c:identifier="g_file_measure_disk_usage"
  32446. version="2.38"
  32447. introspectable="0"
  32448. throws="1">
  32449. <doc xml:space="preserve">Recursively measures the disk usage of @file.
  32450. This is essentially an analog of the 'du' command, but it also
  32451. reports the number of directories and non-directory files encountered
  32452. (including things like symbolic links).
  32453. By default, errors are only reported against the toplevel file
  32454. itself. Errors found while recursing are silently ignored, unless
  32455. %G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags.
  32456. The returned size, @disk_usage, is in bytes and should be formatted
  32457. with g_format_size() in order to get something reasonable for showing
  32458. in a user interface.
  32459. @progress_callback and @progress_data can be given to request
  32460. periodic progress updates while scanning. See the documentation for
  32461. #GFileMeasureProgressCallback for information about when and how the
  32462. callback will be invoked.</doc>
  32463. <return-value transfer-ownership="none">
  32464. <doc xml:space="preserve">%TRUE if successful, with the out parameters set.
  32465. %FALSE otherwise, with @error set.</doc>
  32466. <type name="gboolean" c:type="gboolean"/>
  32467. </return-value>
  32468. <parameters>
  32469. <instance-parameter name="file" transfer-ownership="none">
  32470. <doc xml:space="preserve">a #GFile</doc>
  32471. <type name="File" c:type="GFile*"/>
  32472. </instance-parameter>
  32473. <parameter name="flags" transfer-ownership="none">
  32474. <doc xml:space="preserve">#GFileMeasureFlags</doc>
  32475. <type name="FileMeasureFlags" c:type="GFileMeasureFlags"/>
  32476. </parameter>
  32477. <parameter name="cancellable"
  32478. transfer-ownership="none"
  32479. nullable="1"
  32480. allow-none="1">
  32481. <doc xml:space="preserve">optional #GCancellable</doc>
  32482. <type name="Cancellable" c:type="GCancellable*"/>
  32483. </parameter>
  32484. <parameter name="progress_callback"
  32485. transfer-ownership="none"
  32486. nullable="1"
  32487. allow-none="1"
  32488. closure="3">
  32489. <doc xml:space="preserve">a #GFileMeasureProgressCallback</doc>
  32490. <type name="FileMeasureProgressCallback"
  32491. c:type="GFileMeasureProgressCallback"/>
  32492. </parameter>
  32493. <parameter name="progress_data"
  32494. transfer-ownership="none"
  32495. nullable="1"
  32496. allow-none="1">
  32497. <doc xml:space="preserve">user_data for @progress_callback</doc>
  32498. <type name="gpointer" c:type="gpointer"/>
  32499. </parameter>
  32500. <parameter name="disk_usage"
  32501. direction="out"
  32502. caller-allocates="0"
  32503. transfer-ownership="full"
  32504. optional="1"
  32505. allow-none="1">
  32506. <doc xml:space="preserve">the number of bytes of disk space used</doc>
  32507. <type name="guint64" c:type="guint64*"/>
  32508. </parameter>
  32509. <parameter name="num_dirs"
  32510. direction="out"
  32511. caller-allocates="0"
  32512. transfer-ownership="full"
  32513. optional="1"
  32514. allow-none="1">
  32515. <doc xml:space="preserve">the number of directories encountered</doc>
  32516. <type name="guint64" c:type="guint64*"/>
  32517. </parameter>
  32518. <parameter name="num_files"
  32519. direction="out"
  32520. caller-allocates="0"
  32521. transfer-ownership="full"
  32522. optional="1"
  32523. allow-none="1">
  32524. <doc xml:space="preserve">the number of non-directories encountered</doc>
  32525. <type name="guint64" c:type="guint64*"/>
  32526. </parameter>
  32527. </parameters>
  32528. </method>
  32529. <method name="measure_disk_usage_async"
  32530. c:identifier="g_file_measure_disk_usage_async"
  32531. version="2.38"
  32532. introspectable="0">
  32533. <doc xml:space="preserve">Recursively measures the disk usage of @file.
  32534. This is the asynchronous version of g_file_measure_disk_usage(). See
  32535. there for more information.</doc>
  32536. <return-value transfer-ownership="none">
  32537. <type name="none" c:type="void"/>
  32538. </return-value>
  32539. <parameters>
  32540. <instance-parameter name="file" transfer-ownership="none">
  32541. <doc xml:space="preserve">a #GFile</doc>
  32542. <type name="File" c:type="GFile*"/>
  32543. </instance-parameter>
  32544. <parameter name="flags" transfer-ownership="none">
  32545. <doc xml:space="preserve">#GFileMeasureFlags</doc>
  32546. <type name="FileMeasureFlags" c:type="GFileMeasureFlags"/>
  32547. </parameter>
  32548. <parameter name="io_priority" transfer-ownership="none">
  32549. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  32550. <type name="gint" c:type="gint"/>
  32551. </parameter>
  32552. <parameter name="cancellable"
  32553. transfer-ownership="none"
  32554. nullable="1"
  32555. allow-none="1">
  32556. <doc xml:space="preserve">optional #GCancellable</doc>
  32557. <type name="Cancellable" c:type="GCancellable*"/>
  32558. </parameter>
  32559. <parameter name="progress_callback"
  32560. transfer-ownership="none"
  32561. nullable="1"
  32562. allow-none="1"
  32563. closure="4">
  32564. <doc xml:space="preserve">a #GFileMeasureProgressCallback</doc>
  32565. <type name="FileMeasureProgressCallback"
  32566. c:type="GFileMeasureProgressCallback"/>
  32567. </parameter>
  32568. <parameter name="progress_data"
  32569. transfer-ownership="none"
  32570. nullable="1"
  32571. allow-none="1">
  32572. <doc xml:space="preserve">user_data for @progress_callback</doc>
  32573. <type name="gpointer" c:type="gpointer"/>
  32574. </parameter>
  32575. <parameter name="callback"
  32576. transfer-ownership="none"
  32577. nullable="1"
  32578. allow-none="1"
  32579. scope="async"
  32580. closure="6">
  32581. <doc xml:space="preserve">a #GAsyncReadyCallback to call when complete</doc>
  32582. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  32583. </parameter>
  32584. <parameter name="user_data"
  32585. transfer-ownership="none"
  32586. nullable="1"
  32587. allow-none="1">
  32588. <doc xml:space="preserve">the data to pass to callback function</doc>
  32589. <type name="gpointer" c:type="gpointer"/>
  32590. </parameter>
  32591. </parameters>
  32592. </method>
  32593. <method name="measure_disk_usage_finish"
  32594. c:identifier="g_file_measure_disk_usage_finish"
  32595. version="2.38"
  32596. throws="1">
  32597. <doc xml:space="preserve">Collects the results from an earlier call to
  32598. g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for
  32599. more information.</doc>
  32600. <return-value transfer-ownership="none">
  32601. <doc xml:space="preserve">%TRUE if successful, with the out parameters set.
  32602. %FALSE otherwise, with @error set.</doc>
  32603. <type name="gboolean" c:type="gboolean"/>
  32604. </return-value>
  32605. <parameters>
  32606. <instance-parameter name="file" transfer-ownership="none">
  32607. <doc xml:space="preserve">a #GFile</doc>
  32608. <type name="File" c:type="GFile*"/>
  32609. </instance-parameter>
  32610. <parameter name="result" transfer-ownership="none">
  32611. <doc xml:space="preserve">the #GAsyncResult passed to your #GAsyncReadyCallback</doc>
  32612. <type name="AsyncResult" c:type="GAsyncResult*"/>
  32613. </parameter>
  32614. <parameter name="disk_usage"
  32615. direction="out"
  32616. caller-allocates="0"
  32617. transfer-ownership="full"
  32618. optional="1"
  32619. allow-none="1">
  32620. <doc xml:space="preserve">the number of bytes of disk space used</doc>
  32621. <type name="guint64" c:type="guint64*"/>
  32622. </parameter>
  32623. <parameter name="num_dirs"
  32624. direction="out"
  32625. caller-allocates="0"
  32626. transfer-ownership="full"
  32627. optional="1"
  32628. allow-none="1">
  32629. <doc xml:space="preserve">the number of directories encountered</doc>
  32630. <type name="guint64" c:type="guint64*"/>
  32631. </parameter>
  32632. <parameter name="num_files"
  32633. direction="out"
  32634. caller-allocates="0"
  32635. transfer-ownership="full"
  32636. optional="1"
  32637. allow-none="1">
  32638. <doc xml:space="preserve">the number of non-directories encountered</doc>
  32639. <type name="guint64" c:type="guint64*"/>
  32640. </parameter>
  32641. </parameters>
  32642. </method>
  32643. <method name="monitor"
  32644. c:identifier="g_file_monitor"
  32645. version="2.18"
  32646. throws="1">
  32647. <doc xml:space="preserve">Obtains a file or directory monitor for the given file,
  32648. depending on the type of the file.
  32649. If @cancellable is not %NULL, then the operation can be cancelled by
  32650. triggering the cancellable object from another thread. If the operation
  32651. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32652. <return-value transfer-ownership="full">
  32653. <doc xml:space="preserve">a #GFileMonitor for the given @file,
  32654. or %NULL on error.
  32655. Free the returned object with g_object_unref().</doc>
  32656. <type name="FileMonitor" c:type="GFileMonitor*"/>
  32657. </return-value>
  32658. <parameters>
  32659. <instance-parameter name="file" transfer-ownership="none">
  32660. <doc xml:space="preserve">input #GFile</doc>
  32661. <type name="File" c:type="GFile*"/>
  32662. </instance-parameter>
  32663. <parameter name="flags" transfer-ownership="none">
  32664. <doc xml:space="preserve">a set of #GFileMonitorFlags</doc>
  32665. <type name="FileMonitorFlags" c:type="GFileMonitorFlags"/>
  32666. </parameter>
  32667. <parameter name="cancellable"
  32668. transfer-ownership="none"
  32669. nullable="1"
  32670. allow-none="1">
  32671. <doc xml:space="preserve">optional #GCancellable object,
  32672. %NULL to ignore</doc>
  32673. <type name="Cancellable" c:type="GCancellable*"/>
  32674. </parameter>
  32675. </parameters>
  32676. </method>
  32677. <method name="monitor_directory"
  32678. c:identifier="g_file_monitor_directory"
  32679. throws="1">
  32680. <doc xml:space="preserve">Obtains a directory monitor for the given file.
  32681. This may fail if directory monitoring is not supported.
  32682. If @cancellable is not %NULL, then the operation can be cancelled by
  32683. triggering the cancellable object from another thread. If the operation
  32684. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  32685. It does not make sense for @flags to contain
  32686. %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to
  32687. directories. It is not possible to monitor all the files in a
  32688. directory for changes made via hard links; if you want to do this then
  32689. you must register individual watches with g_file_monitor().</doc>
  32690. <return-value transfer-ownership="full">
  32691. <doc xml:space="preserve">a #GFileMonitor for the given @file,
  32692. or %NULL on error.
  32693. Free the returned object with g_object_unref().</doc>
  32694. <type name="FileMonitor" c:type="GFileMonitor*"/>
  32695. </return-value>
  32696. <parameters>
  32697. <instance-parameter name="file" transfer-ownership="none">
  32698. <doc xml:space="preserve">input #GFile</doc>
  32699. <type name="File" c:type="GFile*"/>
  32700. </instance-parameter>
  32701. <parameter name="flags" transfer-ownership="none">
  32702. <doc xml:space="preserve">a set of #GFileMonitorFlags</doc>
  32703. <type name="FileMonitorFlags" c:type="GFileMonitorFlags"/>
  32704. </parameter>
  32705. <parameter name="cancellable"
  32706. transfer-ownership="none"
  32707. nullable="1"
  32708. allow-none="1">
  32709. <doc xml:space="preserve">optional #GCancellable object,
  32710. %NULL to ignore</doc>
  32711. <type name="Cancellable" c:type="GCancellable*"/>
  32712. </parameter>
  32713. </parameters>
  32714. </method>
  32715. <method name="monitor_file"
  32716. c:identifier="g_file_monitor_file"
  32717. throws="1">
  32718. <doc xml:space="preserve">Obtains a file monitor for the given file. If no file notification
  32719. mechanism exists, then regular polling of the file is used.
  32720. If @cancellable is not %NULL, then the operation can be cancelled by
  32721. triggering the cancellable object from another thread. If the operation
  32722. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  32723. If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor
  32724. will also attempt to report changes made to the file via another
  32725. filename (ie, a hard link). Without this flag, you can only rely on
  32726. changes made through the filename contained in @file to be
  32727. reported. Using this flag may result in an increase in resource
  32728. usage, and may not have any effect depending on the #GFileMonitor
  32729. backend and/or filesystem type.</doc>
  32730. <return-value transfer-ownership="full">
  32731. <doc xml:space="preserve">a #GFileMonitor for the given @file,
  32732. or %NULL on error.
  32733. Free the returned object with g_object_unref().</doc>
  32734. <type name="FileMonitor" c:type="GFileMonitor*"/>
  32735. </return-value>
  32736. <parameters>
  32737. <instance-parameter name="file" transfer-ownership="none">
  32738. <doc xml:space="preserve">input #GFile</doc>
  32739. <type name="File" c:type="GFile*"/>
  32740. </instance-parameter>
  32741. <parameter name="flags" transfer-ownership="none">
  32742. <doc xml:space="preserve">a set of #GFileMonitorFlags</doc>
  32743. <type name="FileMonitorFlags" c:type="GFileMonitorFlags"/>
  32744. </parameter>
  32745. <parameter name="cancellable"
  32746. transfer-ownership="none"
  32747. nullable="1"
  32748. allow-none="1">
  32749. <doc xml:space="preserve">optional #GCancellable object,
  32750. %NULL to ignore</doc>
  32751. <type name="Cancellable" c:type="GCancellable*"/>
  32752. </parameter>
  32753. </parameters>
  32754. </method>
  32755. <method name="mount_enclosing_volume"
  32756. c:identifier="g_file_mount_enclosing_volume">
  32757. <doc xml:space="preserve">Starts a @mount_operation, mounting the volume that contains
  32758. the file @location.
  32759. When this operation has completed, @callback will be called with
  32760. @user_user data, and the operation can be finalized with
  32761. g_file_mount_enclosing_volume_finish().
  32762. If @cancellable is not %NULL, then the operation can be cancelled by
  32763. triggering the cancellable object from another thread. If the operation
  32764. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  32765. <return-value transfer-ownership="none">
  32766. <type name="none" c:type="void"/>
  32767. </return-value>
  32768. <parameters>
  32769. <instance-parameter name="location" transfer-ownership="none">
  32770. <doc xml:space="preserve">input #GFile</doc>
  32771. <type name="File" c:type="GFile*"/>
  32772. </instance-parameter>
  32773. <parameter name="flags" transfer-ownership="none">
  32774. <doc xml:space="preserve">flags affecting the operation</doc>
  32775. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  32776. </parameter>
  32777. <parameter name="mount_operation"
  32778. transfer-ownership="none"
  32779. nullable="1"
  32780. allow-none="1">
  32781. <doc xml:space="preserve">a #GMountOperation
  32782. or %NULL to avoid user interaction</doc>
  32783. <type name="MountOperation" c:type="GMountOperation*"/>
  32784. </parameter>
  32785. <parameter name="cancellable"
  32786. transfer-ownership="none"
  32787. nullable="1"
  32788. allow-none="1">
  32789. <doc xml:space="preserve">optional #GCancellable object,
  32790. %NULL to ignore</doc>
  32791. <type name="Cancellable" c:type="GCancellable*"/>
  32792. </parameter>
  32793. <parameter name="callback"
  32794. transfer-ownership="none"
  32795. nullable="1"
  32796. allow-none="1"
  32797. scope="async"
  32798. closure="4">
  32799. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  32800. when the request is satisfied, or %NULL</doc>
  32801. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  32802. </parameter>
  32803. <parameter name="user_data"
  32804. transfer-ownership="none"
  32805. nullable="1"
  32806. allow-none="1">
  32807. <doc xml:space="preserve">the data to pass to callback function</doc>
  32808. <type name="gpointer" c:type="gpointer"/>
  32809. </parameter>
  32810. </parameters>
  32811. </method>
  32812. <method name="mount_enclosing_volume_finish"
  32813. c:identifier="g_file_mount_enclosing_volume_finish"
  32814. throws="1">
  32815. <doc xml:space="preserve">Finishes a mount operation started by g_file_mount_enclosing_volume().</doc>
  32816. <return-value transfer-ownership="none">
  32817. <doc xml:space="preserve">%TRUE if successful. If an error has occurred,
  32818. this function will return %FALSE and set @error
  32819. appropriately if present.</doc>
  32820. <type name="gboolean" c:type="gboolean"/>
  32821. </return-value>
  32822. <parameters>
  32823. <instance-parameter name="location" transfer-ownership="none">
  32824. <doc xml:space="preserve">input #GFile</doc>
  32825. <type name="File" c:type="GFile*"/>
  32826. </instance-parameter>
  32827. <parameter name="result" transfer-ownership="none">
  32828. <doc xml:space="preserve">a #GAsyncResult</doc>
  32829. <type name="AsyncResult" c:type="GAsyncResult*"/>
  32830. </parameter>
  32831. </parameters>
  32832. </method>
  32833. <method name="mount_mountable" c:identifier="g_file_mount_mountable">
  32834. <doc xml:space="preserve">Mounts a file of type G_FILE_TYPE_MOUNTABLE.
  32835. Using @mount_operation, you can request callbacks when, for instance,
  32836. passwords are needed during authentication.
  32837. If @cancellable is not %NULL, then the operation can be cancelled by
  32838. triggering the cancellable object from another thread. If the operation
  32839. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  32840. When the operation is finished, @callback will be called.
  32841. You can then call g_file_mount_mountable_finish() to get
  32842. the result of the operation.</doc>
  32843. <return-value transfer-ownership="none">
  32844. <type name="none" c:type="void"/>
  32845. </return-value>
  32846. <parameters>
  32847. <instance-parameter name="file" transfer-ownership="none">
  32848. <doc xml:space="preserve">input #GFile</doc>
  32849. <type name="File" c:type="GFile*"/>
  32850. </instance-parameter>
  32851. <parameter name="flags" transfer-ownership="none">
  32852. <doc xml:space="preserve">flags affecting the operation</doc>
  32853. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  32854. </parameter>
  32855. <parameter name="mount_operation"
  32856. transfer-ownership="none"
  32857. nullable="1"
  32858. allow-none="1">
  32859. <doc xml:space="preserve">a #GMountOperation,
  32860. or %NULL to avoid user interaction</doc>
  32861. <type name="MountOperation" c:type="GMountOperation*"/>
  32862. </parameter>
  32863. <parameter name="cancellable"
  32864. transfer-ownership="none"
  32865. nullable="1"
  32866. allow-none="1">
  32867. <doc xml:space="preserve">optional #GCancellable object,
  32868. %NULL to ignore</doc>
  32869. <type name="Cancellable" c:type="GCancellable*"/>
  32870. </parameter>
  32871. <parameter name="callback"
  32872. transfer-ownership="none"
  32873. nullable="1"
  32874. allow-none="1"
  32875. scope="async"
  32876. closure="4">
  32877. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  32878. when the request is satisfied, or %NULL</doc>
  32879. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  32880. </parameter>
  32881. <parameter name="user_data"
  32882. transfer-ownership="none"
  32883. nullable="1"
  32884. allow-none="1">
  32885. <doc xml:space="preserve">the data to pass to callback function</doc>
  32886. <type name="gpointer" c:type="gpointer"/>
  32887. </parameter>
  32888. </parameters>
  32889. </method>
  32890. <method name="mount_mountable_finish"
  32891. c:identifier="g_file_mount_mountable_finish"
  32892. throws="1">
  32893. <doc xml:space="preserve">Finishes a mount operation. See g_file_mount_mountable() for details.
  32894. Finish an asynchronous mount operation that was started
  32895. with g_file_mount_mountable().</doc>
  32896. <return-value transfer-ownership="full">
  32897. <doc xml:space="preserve">a #GFile or %NULL on error.
  32898. Free the returned object with g_object_unref().</doc>
  32899. <type name="File" c:type="GFile*"/>
  32900. </return-value>
  32901. <parameters>
  32902. <instance-parameter name="file" transfer-ownership="none">
  32903. <doc xml:space="preserve">input #GFile</doc>
  32904. <type name="File" c:type="GFile*"/>
  32905. </instance-parameter>
  32906. <parameter name="result" transfer-ownership="none">
  32907. <doc xml:space="preserve">a #GAsyncResult</doc>
  32908. <type name="AsyncResult" c:type="GAsyncResult*"/>
  32909. </parameter>
  32910. </parameters>
  32911. </method>
  32912. <method name="move" c:identifier="g_file_move" throws="1">
  32913. <doc xml:space="preserve">Tries to move the file or directory @source to the location specified
  32914. by @destination. If native move operations are supported then this is
  32915. used, otherwise a copy + delete fallback is used. The native
  32916. implementation may support moving directories (for instance on moves
  32917. inside the same filesystem), but the fallback code does not.
  32918. If the flag #G_FILE_COPY_OVERWRITE is specified an already
  32919. existing @destination file is overwritten.
  32920. If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
  32921. will be copied as symlinks, otherwise the target of the
  32922. @source symlink will be copied.
  32923. If @cancellable is not %NULL, then the operation can be cancelled by
  32924. triggering the cancellable object from another thread. If the operation
  32925. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  32926. If @progress_callback is not %NULL, then the operation can be monitored
  32927. by setting this to a #GFileProgressCallback function.
  32928. @progress_callback_data will be passed to this function. It is
  32929. guaranteed that this callback will be called after all data has been
  32930. transferred with the total number of bytes copied during the operation.
  32931. If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND
  32932. error is returned, independent on the status of the @destination.
  32933. If #G_FILE_COPY_OVERWRITE is not specified and the target exists,
  32934. then the error %G_IO_ERROR_EXISTS is returned.
  32935. If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY
  32936. error is returned. If trying to overwrite a directory with a directory the
  32937. %G_IO_ERROR_WOULD_MERGE error is returned.
  32938. If the source is a directory and the target does not exist, or
  32939. #G_FILE_COPY_OVERWRITE is specified and the target is a file, then
  32940. the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native
  32941. move operation isn't available).</doc>
  32942. <return-value transfer-ownership="none">
  32943. <doc xml:space="preserve">%TRUE on successful move, %FALSE otherwise.</doc>
  32944. <type name="gboolean" c:type="gboolean"/>
  32945. </return-value>
  32946. <parameters>
  32947. <instance-parameter name="source" transfer-ownership="none">
  32948. <doc xml:space="preserve">#GFile pointing to the source location</doc>
  32949. <type name="File" c:type="GFile*"/>
  32950. </instance-parameter>
  32951. <parameter name="destination" transfer-ownership="none">
  32952. <doc xml:space="preserve">#GFile pointing to the destination location</doc>
  32953. <type name="File" c:type="GFile*"/>
  32954. </parameter>
  32955. <parameter name="flags" transfer-ownership="none">
  32956. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  32957. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  32958. </parameter>
  32959. <parameter name="cancellable"
  32960. transfer-ownership="none"
  32961. nullable="1"
  32962. allow-none="1">
  32963. <doc xml:space="preserve">optional #GCancellable object,
  32964. %NULL to ignore</doc>
  32965. <type name="Cancellable" c:type="GCancellable*"/>
  32966. </parameter>
  32967. <parameter name="progress_callback"
  32968. transfer-ownership="none"
  32969. nullable="1"
  32970. allow-none="1"
  32971. scope="call"
  32972. closure="4">
  32973. <doc xml:space="preserve">#GFileProgressCallback
  32974. function for updates</doc>
  32975. <type name="FileProgressCallback" c:type="GFileProgressCallback"/>
  32976. </parameter>
  32977. <parameter name="progress_callback_data"
  32978. transfer-ownership="none"
  32979. nullable="1"
  32980. allow-none="1">
  32981. <doc xml:space="preserve">gpointer to user data for
  32982. the callback function</doc>
  32983. <type name="gpointer" c:type="gpointer"/>
  32984. </parameter>
  32985. </parameters>
  32986. </method>
  32987. <method name="open_readwrite"
  32988. c:identifier="g_file_open_readwrite"
  32989. version="2.22"
  32990. throws="1">
  32991. <doc xml:space="preserve">Opens an existing file for reading and writing. The result is
  32992. a #GFileIOStream that can be used to read and write the contents
  32993. of the file.
  32994. If @cancellable is not %NULL, then the operation can be cancelled
  32995. by triggering the cancellable object from another thread. If the
  32996. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  32997. returned.
  32998. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
  32999. be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY
  33000. error will be returned. Other errors are possible too, and depend on
  33001. what kind of filesystem the file is on. Note that in many non-local
  33002. file cases read and write streams are not supported, so make sure you
  33003. really need to do read and write streaming, rather than just opening
  33004. for reading or writing.</doc>
  33005. <return-value transfer-ownership="full">
  33006. <doc xml:space="preserve">#GFileIOStream or %NULL on error.
  33007. Free the returned object with g_object_unref().</doc>
  33008. <type name="FileIOStream" c:type="GFileIOStream*"/>
  33009. </return-value>
  33010. <parameters>
  33011. <instance-parameter name="file" transfer-ownership="none">
  33012. <doc xml:space="preserve">#GFile to open</doc>
  33013. <type name="File" c:type="GFile*"/>
  33014. </instance-parameter>
  33015. <parameter name="cancellable"
  33016. transfer-ownership="none"
  33017. nullable="1"
  33018. allow-none="1">
  33019. <doc xml:space="preserve">a #GCancellable</doc>
  33020. <type name="Cancellable" c:type="GCancellable*"/>
  33021. </parameter>
  33022. </parameters>
  33023. </method>
  33024. <method name="open_readwrite_async"
  33025. c:identifier="g_file_open_readwrite_async"
  33026. version="2.22">
  33027. <doc xml:space="preserve">Asynchronously opens @file for reading and writing.
  33028. For more details, see g_file_open_readwrite() which is
  33029. the synchronous version of this call.
  33030. When the operation is finished, @callback will be called.
  33031. You can then call g_file_open_readwrite_finish() to get
  33032. the result of the operation.</doc>
  33033. <return-value transfer-ownership="none">
  33034. <type name="none" c:type="void"/>
  33035. </return-value>
  33036. <parameters>
  33037. <instance-parameter name="file" transfer-ownership="none">
  33038. <doc xml:space="preserve">input #GFile</doc>
  33039. <type name="File" c:type="GFile*"/>
  33040. </instance-parameter>
  33041. <parameter name="io_priority" transfer-ownership="none">
  33042. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  33043. <type name="gint" c:type="int"/>
  33044. </parameter>
  33045. <parameter name="cancellable"
  33046. transfer-ownership="none"
  33047. nullable="1"
  33048. allow-none="1">
  33049. <doc xml:space="preserve">optional #GCancellable object,
  33050. %NULL to ignore</doc>
  33051. <type name="Cancellable" c:type="GCancellable*"/>
  33052. </parameter>
  33053. <parameter name="callback"
  33054. transfer-ownership="none"
  33055. nullable="1"
  33056. allow-none="1"
  33057. scope="async"
  33058. closure="3">
  33059. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  33060. when the request is satisfied</doc>
  33061. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  33062. </parameter>
  33063. <parameter name="user_data"
  33064. transfer-ownership="none"
  33065. nullable="1"
  33066. allow-none="1">
  33067. <doc xml:space="preserve">the data to pass to callback function</doc>
  33068. <type name="gpointer" c:type="gpointer"/>
  33069. </parameter>
  33070. </parameters>
  33071. </method>
  33072. <method name="open_readwrite_finish"
  33073. c:identifier="g_file_open_readwrite_finish"
  33074. version="2.22"
  33075. throws="1">
  33076. <doc xml:space="preserve">Finishes an asynchronous file read operation started with
  33077. g_file_open_readwrite_async().</doc>
  33078. <return-value transfer-ownership="full">
  33079. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  33080. Free the returned object with g_object_unref().</doc>
  33081. <type name="FileIOStream" c:type="GFileIOStream*"/>
  33082. </return-value>
  33083. <parameters>
  33084. <instance-parameter name="file" transfer-ownership="none">
  33085. <doc xml:space="preserve">input #GFile</doc>
  33086. <type name="File" c:type="GFile*"/>
  33087. </instance-parameter>
  33088. <parameter name="res" transfer-ownership="none">
  33089. <doc xml:space="preserve">a #GAsyncResult</doc>
  33090. <type name="AsyncResult" c:type="GAsyncResult*"/>
  33091. </parameter>
  33092. </parameters>
  33093. </method>
  33094. <method name="poll_mountable"
  33095. c:identifier="g_file_poll_mountable"
  33096. version="2.22">
  33097. <doc xml:space="preserve">Polls a file of type #G_FILE_TYPE_MOUNTABLE.
  33098. If @cancellable is not %NULL, then the operation can be cancelled by
  33099. triggering the cancellable object from another thread. If the operation
  33100. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  33101. When the operation is finished, @callback will be called.
  33102. You can then call g_file_mount_mountable_finish() to get
  33103. the result of the operation.</doc>
  33104. <return-value transfer-ownership="none">
  33105. <type name="none" c:type="void"/>
  33106. </return-value>
  33107. <parameters>
  33108. <instance-parameter name="file" transfer-ownership="none">
  33109. <doc xml:space="preserve">input #GFile</doc>
  33110. <type name="File" c:type="GFile*"/>
  33111. </instance-parameter>
  33112. <parameter name="cancellable"
  33113. transfer-ownership="none"
  33114. nullable="1"
  33115. allow-none="1">
  33116. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  33117. <type name="Cancellable" c:type="GCancellable*"/>
  33118. </parameter>
  33119. <parameter name="callback"
  33120. transfer-ownership="none"
  33121. nullable="1"
  33122. allow-none="1"
  33123. scope="async"
  33124. closure="2">
  33125. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  33126. when the request is satisfied, or %NULL</doc>
  33127. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  33128. </parameter>
  33129. <parameter name="user_data"
  33130. transfer-ownership="none"
  33131. nullable="1"
  33132. allow-none="1">
  33133. <doc xml:space="preserve">the data to pass to callback function</doc>
  33134. <type name="gpointer" c:type="gpointer"/>
  33135. </parameter>
  33136. </parameters>
  33137. </method>
  33138. <method name="poll_mountable_finish"
  33139. c:identifier="g_file_poll_mountable_finish"
  33140. version="2.22"
  33141. throws="1">
  33142. <doc xml:space="preserve">Finishes a poll operation. See g_file_poll_mountable() for details.
  33143. Finish an asynchronous poll operation that was polled
  33144. with g_file_poll_mountable().</doc>
  33145. <return-value transfer-ownership="none">
  33146. <doc xml:space="preserve">%TRUE if the operation finished successfully. %FALSE
  33147. otherwise.</doc>
  33148. <type name="gboolean" c:type="gboolean"/>
  33149. </return-value>
  33150. <parameters>
  33151. <instance-parameter name="file" transfer-ownership="none">
  33152. <doc xml:space="preserve">input #GFile</doc>
  33153. <type name="File" c:type="GFile*"/>
  33154. </instance-parameter>
  33155. <parameter name="result" transfer-ownership="none">
  33156. <doc xml:space="preserve">a #GAsyncResult</doc>
  33157. <type name="AsyncResult" c:type="GAsyncResult*"/>
  33158. </parameter>
  33159. </parameters>
  33160. </method>
  33161. <method name="query_default_handler"
  33162. c:identifier="g_file_query_default_handler"
  33163. throws="1">
  33164. <doc xml:space="preserve">Returns the #GAppInfo that is registered as the default
  33165. application to handle the file specified by @file.
  33166. If @cancellable is not %NULL, then the operation can be cancelled by
  33167. triggering the cancellable object from another thread. If the operation
  33168. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  33169. <return-value transfer-ownership="full">
  33170. <doc xml:space="preserve">a #GAppInfo if the handle was found,
  33171. %NULL if there were errors.
  33172. When you are done with it, release it with g_object_unref()</doc>
  33173. <type name="AppInfo" c:type="GAppInfo*"/>
  33174. </return-value>
  33175. <parameters>
  33176. <instance-parameter name="file" transfer-ownership="none">
  33177. <doc xml:space="preserve">a #GFile to open</doc>
  33178. <type name="File" c:type="GFile*"/>
  33179. </instance-parameter>
  33180. <parameter name="cancellable"
  33181. transfer-ownership="none"
  33182. nullable="1"
  33183. allow-none="1">
  33184. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  33185. <type name="Cancellable" c:type="GCancellable*"/>
  33186. </parameter>
  33187. </parameters>
  33188. </method>
  33189. <method name="query_exists" c:identifier="g_file_query_exists">
  33190. <doc xml:space="preserve">Utility function to check if a particular file exists. This is
  33191. implemented using g_file_query_info() and as such does blocking I/O.
  33192. Note that in many cases it is racy to first check for file existence
  33193. and then execute something based on the outcome of that, because the
  33194. file might have been created or removed in between the operations. The
  33195. general approach to handling that is to not check, but just do the
  33196. operation and handle the errors as they come.
  33197. As an example of race-free checking, take the case of reading a file,
  33198. and if it doesn't exist, creating it. There are two racy versions: read
  33199. it, and on error create it; and: check if it exists, if not create it.
  33200. These can both result in two processes creating the file (with perhaps
  33201. a partially written file as the result). The correct approach is to
  33202. always try to create the file with g_file_create() which will either
  33203. atomically create the file or fail with a %G_IO_ERROR_EXISTS error.
  33204. However, in many cases an existence check is useful in a user interface,
  33205. for instance to make a menu item sensitive/insensitive, so that you don't
  33206. have to fool users that something is possible and then just show an error
  33207. dialog. If you do this, you should make sure to also handle the errors
  33208. that can happen due to races when you execute the operation.</doc>
  33209. <return-value transfer-ownership="none">
  33210. <doc xml:space="preserve">%TRUE if the file exists (and can be detected without error),
  33211. %FALSE otherwise (or if cancelled).</doc>
  33212. <type name="gboolean" c:type="gboolean"/>
  33213. </return-value>
  33214. <parameters>
  33215. <instance-parameter name="file" transfer-ownership="none">
  33216. <doc xml:space="preserve">input #GFile</doc>
  33217. <type name="File" c:type="GFile*"/>
  33218. </instance-parameter>
  33219. <parameter name="cancellable"
  33220. transfer-ownership="none"
  33221. nullable="1"
  33222. allow-none="1">
  33223. <doc xml:space="preserve">optional #GCancellable object,
  33224. %NULL to ignore</doc>
  33225. <type name="Cancellable" c:type="GCancellable*"/>
  33226. </parameter>
  33227. </parameters>
  33228. </method>
  33229. <method name="query_file_type"
  33230. c:identifier="g_file_query_file_type"
  33231. version="2.18">
  33232. <doc xml:space="preserve">Utility function to inspect the #GFileType of a file. This is
  33233. implemented using g_file_query_info() and as such does blocking I/O.
  33234. The primary use case of this method is to check if a file is
  33235. a regular file, directory, or symlink.</doc>
  33236. <return-value transfer-ownership="none">
  33237. <doc xml:space="preserve">The #GFileType of the file and #G_FILE_TYPE_UNKNOWN
  33238. if the file does not exist</doc>
  33239. <type name="FileType" c:type="GFileType"/>
  33240. </return-value>
  33241. <parameters>
  33242. <instance-parameter name="file" transfer-ownership="none">
  33243. <doc xml:space="preserve">input #GFile</doc>
  33244. <type name="File" c:type="GFile*"/>
  33245. </instance-parameter>
  33246. <parameter name="flags" transfer-ownership="none">
  33247. <doc xml:space="preserve">a set of #GFileQueryInfoFlags passed to g_file_query_info()</doc>
  33248. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  33249. </parameter>
  33250. <parameter name="cancellable"
  33251. transfer-ownership="none"
  33252. nullable="1"
  33253. allow-none="1">
  33254. <doc xml:space="preserve">optional #GCancellable object,
  33255. %NULL to ignore</doc>
  33256. <type name="Cancellable" c:type="GCancellable*"/>
  33257. </parameter>
  33258. </parameters>
  33259. </method>
  33260. <method name="query_filesystem_info"
  33261. c:identifier="g_file_query_filesystem_info"
  33262. throws="1">
  33263. <doc xml:space="preserve">Similar to g_file_query_info(), but obtains information
  33264. about the filesystem the @file is on, rather than the file itself.
  33265. For instance the amount of space available and the type of
  33266. the filesystem.
  33267. The @attributes value is a string that specifies the attributes
  33268. that should be gathered. It is not an error if it's not possible
  33269. to read a particular requested attribute from a file - it just
  33270. won't be set. @attributes should be a comma-separated list of
  33271. attributes or attribute wildcards. The wildcard "*" means all
  33272. attributes, and a wildcard like "filesystem::*" means all attributes
  33273. in the filesystem namespace. The standard namespace for filesystem
  33274. attributes is "filesystem". Common attributes of interest are
  33275. #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem
  33276. in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available),
  33277. and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
  33278. If @cancellable is not %NULL, then the operation can be cancelled
  33279. by triggering the cancellable object from another thread. If the
  33280. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  33281. returned.
  33282. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
  33283. be returned. Other errors are possible too, and depend on what
  33284. kind of filesystem the file is on.</doc>
  33285. <return-value transfer-ownership="full">
  33286. <doc xml:space="preserve">a #GFileInfo or %NULL if there was an error.
  33287. Free the returned object with g_object_unref().</doc>
  33288. <type name="FileInfo" c:type="GFileInfo*"/>
  33289. </return-value>
  33290. <parameters>
  33291. <instance-parameter name="file" transfer-ownership="none">
  33292. <doc xml:space="preserve">input #GFile</doc>
  33293. <type name="File" c:type="GFile*"/>
  33294. </instance-parameter>
  33295. <parameter name="attributes" transfer-ownership="none">
  33296. <doc xml:space="preserve">an attribute query string</doc>
  33297. <type name="utf8" c:type="const char*"/>
  33298. </parameter>
  33299. <parameter name="cancellable"
  33300. transfer-ownership="none"
  33301. nullable="1"
  33302. allow-none="1">
  33303. <doc xml:space="preserve">optional #GCancellable object,
  33304. %NULL to ignore</doc>
  33305. <type name="Cancellable" c:type="GCancellable*"/>
  33306. </parameter>
  33307. </parameters>
  33308. </method>
  33309. <method name="query_filesystem_info_async"
  33310. c:identifier="g_file_query_filesystem_info_async">
  33311. <doc xml:space="preserve">Asynchronously gets the requested information about the filesystem
  33312. that the specified @file is on. The result is a #GFileInfo object
  33313. that contains key-value attributes (such as type or size for the
  33314. file).
  33315. For more details, see g_file_query_filesystem_info() which is the
  33316. synchronous version of this call.
  33317. When the operation is finished, @callback will be called. You can
  33318. then call g_file_query_info_finish() to get the result of the
  33319. operation.</doc>
  33320. <return-value transfer-ownership="none">
  33321. <type name="none" c:type="void"/>
  33322. </return-value>
  33323. <parameters>
  33324. <instance-parameter name="file" transfer-ownership="none">
  33325. <doc xml:space="preserve">input #GFile</doc>
  33326. <type name="File" c:type="GFile*"/>
  33327. </instance-parameter>
  33328. <parameter name="attributes" transfer-ownership="none">
  33329. <doc xml:space="preserve">an attribute query string</doc>
  33330. <type name="utf8" c:type="const char*"/>
  33331. </parameter>
  33332. <parameter name="io_priority" transfer-ownership="none">
  33333. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  33334. <type name="gint" c:type="int"/>
  33335. </parameter>
  33336. <parameter name="cancellable"
  33337. transfer-ownership="none"
  33338. nullable="1"
  33339. allow-none="1">
  33340. <doc xml:space="preserve">optional #GCancellable object,
  33341. %NULL to ignore</doc>
  33342. <type name="Cancellable" c:type="GCancellable*"/>
  33343. </parameter>
  33344. <parameter name="callback"
  33345. transfer-ownership="none"
  33346. nullable="1"
  33347. allow-none="1"
  33348. scope="async"
  33349. closure="4">
  33350. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  33351. when the request is satisfied</doc>
  33352. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  33353. </parameter>
  33354. <parameter name="user_data"
  33355. transfer-ownership="none"
  33356. nullable="1"
  33357. allow-none="1">
  33358. <doc xml:space="preserve">the data to pass to callback function</doc>
  33359. <type name="gpointer" c:type="gpointer"/>
  33360. </parameter>
  33361. </parameters>
  33362. </method>
  33363. <method name="query_filesystem_info_finish"
  33364. c:identifier="g_file_query_filesystem_info_finish"
  33365. throws="1">
  33366. <doc xml:space="preserve">Finishes an asynchronous filesystem info query.
  33367. See g_file_query_filesystem_info_async().</doc>
  33368. <return-value transfer-ownership="full">
  33369. <doc xml:space="preserve">#GFileInfo for given @file
  33370. or %NULL on error.
  33371. Free the returned object with g_object_unref().</doc>
  33372. <type name="FileInfo" c:type="GFileInfo*"/>
  33373. </return-value>
  33374. <parameters>
  33375. <instance-parameter name="file" transfer-ownership="none">
  33376. <doc xml:space="preserve">input #GFile</doc>
  33377. <type name="File" c:type="GFile*"/>
  33378. </instance-parameter>
  33379. <parameter name="res" transfer-ownership="none">
  33380. <doc xml:space="preserve">a #GAsyncResult</doc>
  33381. <type name="AsyncResult" c:type="GAsyncResult*"/>
  33382. </parameter>
  33383. </parameters>
  33384. </method>
  33385. <method name="query_info" c:identifier="g_file_query_info" throws="1">
  33386. <doc xml:space="preserve">Gets the requested information about specified @file.
  33387. The result is a #GFileInfo object that contains key-value
  33388. attributes (such as the type or size of the file).
  33389. The @attributes value is a string that specifies the file
  33390. attributes that should be gathered. It is not an error if
  33391. it's not possible to read a particular requested attribute
  33392. from a file - it just won't be set. @attributes should be a
  33393. comma-separated list of attributes or attribute wildcards.
  33394. The wildcard "*" means all attributes, and a wildcard like
  33395. "standard::*" means all attributes in the standard namespace.
  33396. An example attribute query be "standard::*,owner::user".
  33397. The standard attributes are available as defines, like
  33398. #G_FILE_ATTRIBUTE_STANDARD_NAME.
  33399. If @cancellable is not %NULL, then the operation can be cancelled
  33400. by triggering the cancellable object from another thread. If the
  33401. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  33402. returned.
  33403. For symlinks, normally the information about the target of the
  33404. symlink is returned, rather than information about the symlink
  33405. itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS
  33406. in @flags the information about the symlink itself will be returned.
  33407. Also, for symlinks that point to non-existing files the information
  33408. about the symlink itself will be returned.
  33409. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be
  33410. returned. Other errors are possible too, and depend on what kind of
  33411. filesystem the file is on.</doc>
  33412. <return-value transfer-ownership="full">
  33413. <doc xml:space="preserve">a #GFileInfo for the given @file, or %NULL
  33414. on error. Free the returned object with g_object_unref().</doc>
  33415. <type name="FileInfo" c:type="GFileInfo*"/>
  33416. </return-value>
  33417. <parameters>
  33418. <instance-parameter name="file" transfer-ownership="none">
  33419. <doc xml:space="preserve">input #GFile</doc>
  33420. <type name="File" c:type="GFile*"/>
  33421. </instance-parameter>
  33422. <parameter name="attributes" transfer-ownership="none">
  33423. <doc xml:space="preserve">an attribute query string</doc>
  33424. <type name="utf8" c:type="const char*"/>
  33425. </parameter>
  33426. <parameter name="flags" transfer-ownership="none">
  33427. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  33428. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  33429. </parameter>
  33430. <parameter name="cancellable"
  33431. transfer-ownership="none"
  33432. nullable="1"
  33433. allow-none="1">
  33434. <doc xml:space="preserve">optional #GCancellable object,
  33435. %NULL to ignore</doc>
  33436. <type name="Cancellable" c:type="GCancellable*"/>
  33437. </parameter>
  33438. </parameters>
  33439. </method>
  33440. <method name="query_info_async" c:identifier="g_file_query_info_async">
  33441. <doc xml:space="preserve">Asynchronously gets the requested information about specified @file.
  33442. The result is a #GFileInfo object that contains key-value attributes
  33443. (such as type or size for the file).
  33444. For more details, see g_file_query_info() which is the synchronous
  33445. version of this call.
  33446. When the operation is finished, @callback will be called. You can
  33447. then call g_file_query_info_finish() to get the result of the operation.</doc>
  33448. <return-value transfer-ownership="none">
  33449. <type name="none" c:type="void"/>
  33450. </return-value>
  33451. <parameters>
  33452. <instance-parameter name="file" transfer-ownership="none">
  33453. <doc xml:space="preserve">input #GFile</doc>
  33454. <type name="File" c:type="GFile*"/>
  33455. </instance-parameter>
  33456. <parameter name="attributes" transfer-ownership="none">
  33457. <doc xml:space="preserve">an attribute query string</doc>
  33458. <type name="utf8" c:type="const char*"/>
  33459. </parameter>
  33460. <parameter name="flags" transfer-ownership="none">
  33461. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  33462. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  33463. </parameter>
  33464. <parameter name="io_priority" transfer-ownership="none">
  33465. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  33466. <type name="gint" c:type="int"/>
  33467. </parameter>
  33468. <parameter name="cancellable"
  33469. transfer-ownership="none"
  33470. nullable="1"
  33471. allow-none="1">
  33472. <doc xml:space="preserve">optional #GCancellable object,
  33473. %NULL to ignore</doc>
  33474. <type name="Cancellable" c:type="GCancellable*"/>
  33475. </parameter>
  33476. <parameter name="callback"
  33477. transfer-ownership="none"
  33478. nullable="1"
  33479. allow-none="1"
  33480. scope="async"
  33481. closure="5">
  33482. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  33483. request is satisfied</doc>
  33484. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  33485. </parameter>
  33486. <parameter name="user_data"
  33487. transfer-ownership="none"
  33488. nullable="1"
  33489. allow-none="1">
  33490. <doc xml:space="preserve">the data to pass to callback function</doc>
  33491. <type name="gpointer" c:type="gpointer"/>
  33492. </parameter>
  33493. </parameters>
  33494. </method>
  33495. <method name="query_info_finish"
  33496. c:identifier="g_file_query_info_finish"
  33497. throws="1">
  33498. <doc xml:space="preserve">Finishes an asynchronous file info query.
  33499. See g_file_query_info_async().</doc>
  33500. <return-value transfer-ownership="full">
  33501. <doc xml:space="preserve">#GFileInfo for given @file
  33502. or %NULL on error. Free the returned object with
  33503. g_object_unref().</doc>
  33504. <type name="FileInfo" c:type="GFileInfo*"/>
  33505. </return-value>
  33506. <parameters>
  33507. <instance-parameter name="file" transfer-ownership="none">
  33508. <doc xml:space="preserve">input #GFile</doc>
  33509. <type name="File" c:type="GFile*"/>
  33510. </instance-parameter>
  33511. <parameter name="res" transfer-ownership="none">
  33512. <doc xml:space="preserve">a #GAsyncResult</doc>
  33513. <type name="AsyncResult" c:type="GAsyncResult*"/>
  33514. </parameter>
  33515. </parameters>
  33516. </method>
  33517. <method name="query_settable_attributes"
  33518. c:identifier="g_file_query_settable_attributes"
  33519. throws="1">
  33520. <doc xml:space="preserve">Obtain the list of settable attributes for the file.
  33521. Returns the type and full attribute name of all the attributes
  33522. that can be set on this file. This doesn't mean setting it will
  33523. always succeed though, you might get an access failure, or some
  33524. specific file may not support a specific attribute.
  33525. If @cancellable is not %NULL, then the operation can be cancelled by
  33526. triggering the cancellable object from another thread. If the operation
  33527. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  33528. <return-value transfer-ownership="full">
  33529. <doc xml:space="preserve">a #GFileAttributeInfoList describing the settable attributes.
  33530. When you are done with it, release it with
  33531. g_file_attribute_info_list_unref()</doc>
  33532. <type name="FileAttributeInfoList" c:type="GFileAttributeInfoList*"/>
  33533. </return-value>
  33534. <parameters>
  33535. <instance-parameter name="file" transfer-ownership="none">
  33536. <doc xml:space="preserve">input #GFile</doc>
  33537. <type name="File" c:type="GFile*"/>
  33538. </instance-parameter>
  33539. <parameter name="cancellable"
  33540. transfer-ownership="none"
  33541. nullable="1"
  33542. allow-none="1">
  33543. <doc xml:space="preserve">optional #GCancellable object,
  33544. %NULL to ignore</doc>
  33545. <type name="Cancellable" c:type="GCancellable*"/>
  33546. </parameter>
  33547. </parameters>
  33548. </method>
  33549. <method name="query_writable_namespaces"
  33550. c:identifier="g_file_query_writable_namespaces"
  33551. throws="1">
  33552. <doc xml:space="preserve">Obtain the list of attribute namespaces where new attributes
  33553. can be created by a user. An example of this is extended
  33554. attributes (in the "xattr" namespace).
  33555. If @cancellable is not %NULL, then the operation can be cancelled by
  33556. triggering the cancellable object from another thread. If the operation
  33557. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  33558. <return-value transfer-ownership="full">
  33559. <doc xml:space="preserve">a #GFileAttributeInfoList describing the writable namespaces.
  33560. When you are done with it, release it with
  33561. g_file_attribute_info_list_unref()</doc>
  33562. <type name="FileAttributeInfoList" c:type="GFileAttributeInfoList*"/>
  33563. </return-value>
  33564. <parameters>
  33565. <instance-parameter name="file" transfer-ownership="none">
  33566. <doc xml:space="preserve">input #GFile</doc>
  33567. <type name="File" c:type="GFile*"/>
  33568. </instance-parameter>
  33569. <parameter name="cancellable"
  33570. transfer-ownership="none"
  33571. nullable="1"
  33572. allow-none="1">
  33573. <doc xml:space="preserve">optional #GCancellable object,
  33574. %NULL to ignore</doc>
  33575. <type name="Cancellable" c:type="GCancellable*"/>
  33576. </parameter>
  33577. </parameters>
  33578. </method>
  33579. <method name="read" c:identifier="g_file_read" throws="1">
  33580. <doc xml:space="preserve">Opens a file for reading. The result is a #GFileInputStream that
  33581. can be used to read the contents of the file.
  33582. If @cancellable is not %NULL, then the operation can be cancelled by
  33583. triggering the cancellable object from another thread. If the operation
  33584. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  33585. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be
  33586. returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY
  33587. error will be returned. Other errors are possible too, and depend
  33588. on what kind of filesystem the file is on.</doc>
  33589. <return-value transfer-ownership="full">
  33590. <doc xml:space="preserve">#GFileInputStream or %NULL on error.
  33591. Free the returned object with g_object_unref().</doc>
  33592. <type name="FileInputStream" c:type="GFileInputStream*"/>
  33593. </return-value>
  33594. <parameters>
  33595. <instance-parameter name="file" transfer-ownership="none">
  33596. <doc xml:space="preserve">#GFile to read</doc>
  33597. <type name="File" c:type="GFile*"/>
  33598. </instance-parameter>
  33599. <parameter name="cancellable"
  33600. transfer-ownership="none"
  33601. nullable="1"
  33602. allow-none="1">
  33603. <doc xml:space="preserve">a #GCancellable</doc>
  33604. <type name="Cancellable" c:type="GCancellable*"/>
  33605. </parameter>
  33606. </parameters>
  33607. </method>
  33608. <method name="read_async" c:identifier="g_file_read_async">
  33609. <doc xml:space="preserve">Asynchronously opens @file for reading.
  33610. For more details, see g_file_read() which is
  33611. the synchronous version of this call.
  33612. When the operation is finished, @callback will be called.
  33613. You can then call g_file_read_finish() to get the result
  33614. of the operation.</doc>
  33615. <return-value transfer-ownership="none">
  33616. <type name="none" c:type="void"/>
  33617. </return-value>
  33618. <parameters>
  33619. <instance-parameter name="file" transfer-ownership="none">
  33620. <doc xml:space="preserve">input #GFile</doc>
  33621. <type name="File" c:type="GFile*"/>
  33622. </instance-parameter>
  33623. <parameter name="io_priority" transfer-ownership="none">
  33624. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  33625. <type name="gint" c:type="int"/>
  33626. </parameter>
  33627. <parameter name="cancellable"
  33628. transfer-ownership="none"
  33629. nullable="1"
  33630. allow-none="1">
  33631. <doc xml:space="preserve">optional #GCancellable object,
  33632. %NULL to ignore</doc>
  33633. <type name="Cancellable" c:type="GCancellable*"/>
  33634. </parameter>
  33635. <parameter name="callback"
  33636. transfer-ownership="none"
  33637. nullable="1"
  33638. allow-none="1"
  33639. scope="async"
  33640. closure="3">
  33641. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  33642. when the request is satisfied</doc>
  33643. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  33644. </parameter>
  33645. <parameter name="user_data"
  33646. transfer-ownership="none"
  33647. nullable="1"
  33648. allow-none="1">
  33649. <doc xml:space="preserve">the data to pass to callback function</doc>
  33650. <type name="gpointer" c:type="gpointer"/>
  33651. </parameter>
  33652. </parameters>
  33653. </method>
  33654. <method name="read_finish" c:identifier="g_file_read_finish" throws="1">
  33655. <doc xml:space="preserve">Finishes an asynchronous file read operation started with
  33656. g_file_read_async().</doc>
  33657. <return-value transfer-ownership="full">
  33658. <doc xml:space="preserve">a #GFileInputStream or %NULL on error.
  33659. Free the returned object with g_object_unref().</doc>
  33660. <type name="FileInputStream" c:type="GFileInputStream*"/>
  33661. </return-value>
  33662. <parameters>
  33663. <instance-parameter name="file" transfer-ownership="none">
  33664. <doc xml:space="preserve">input #GFile</doc>
  33665. <type name="File" c:type="GFile*"/>
  33666. </instance-parameter>
  33667. <parameter name="res" transfer-ownership="none">
  33668. <doc xml:space="preserve">a #GAsyncResult</doc>
  33669. <type name="AsyncResult" c:type="GAsyncResult*"/>
  33670. </parameter>
  33671. </parameters>
  33672. </method>
  33673. <method name="replace" c:identifier="g_file_replace" throws="1">
  33674. <doc xml:space="preserve">Returns an output stream for overwriting the file, possibly
  33675. creating a backup copy of the file first. If the file doesn't exist,
  33676. it will be created.
  33677. This will try to replace the file in the safest way possible so
  33678. that any errors during the writing will not affect an already
  33679. existing copy of the file. For instance, for local files it
  33680. may write to a temporary file and then atomically rename over
  33681. the destination when the stream is closed.
  33682. By default files created are generally readable by everyone,
  33683. but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
  33684. will be made readable only to the current user, to the level that
  33685. is supported on the target filesystem.
  33686. If @cancellable is not %NULL, then the operation can be cancelled
  33687. by triggering the cancellable object from another thread. If the
  33688. operation was cancelled, the error %G_IO_ERROR_CANCELLED will be
  33689. returned.
  33690. If you pass in a non-%NULL @etag value and @file already exists, then
  33691. this value is compared to the current entity tag of the file, and if
  33692. they differ an %G_IO_ERROR_WRONG_ETAG error is returned. This
  33693. generally means that the file has been changed since you last read
  33694. it. You can get the new etag from g_file_output_stream_get_etag()
  33695. after you've finished writing and closed the #GFileOutputStream. When
  33696. you load a new file you can use g_file_input_stream_query_info() to
  33697. get the etag of the file.
  33698. If @make_backup is %TRUE, this function will attempt to make a
  33699. backup of the current file before overwriting it. If this fails
  33700. a %G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you
  33701. want to replace anyway, try again with @make_backup set to %FALSE.
  33702. If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will
  33703. be returned, and if the file is some other form of non-regular file
  33704. then a %G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some
  33705. file systems don't allow all file names, and may return an
  33706. %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long
  33707. %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are
  33708. possible too, and depend on what kind of filesystem the file is on.</doc>
  33709. <return-value transfer-ownership="full">
  33710. <doc xml:space="preserve">a #GFileOutputStream or %NULL on error.
  33711. Free the returned object with g_object_unref().</doc>
  33712. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  33713. </return-value>
  33714. <parameters>
  33715. <instance-parameter name="file" transfer-ownership="none">
  33716. <doc xml:space="preserve">input #GFile</doc>
  33717. <type name="File" c:type="GFile*"/>
  33718. </instance-parameter>
  33719. <parameter name="etag"
  33720. transfer-ownership="none"
  33721. nullable="1"
  33722. allow-none="1">
  33723. <doc xml:space="preserve">an optional [entity tag][gfile-etag]
  33724. for the current #GFile, or #NULL to ignore</doc>
  33725. <type name="utf8" c:type="const char*"/>
  33726. </parameter>
  33727. <parameter name="make_backup" transfer-ownership="none">
  33728. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  33729. <type name="gboolean" c:type="gboolean"/>
  33730. </parameter>
  33731. <parameter name="flags" transfer-ownership="none">
  33732. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  33733. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  33734. </parameter>
  33735. <parameter name="cancellable"
  33736. transfer-ownership="none"
  33737. nullable="1"
  33738. allow-none="1">
  33739. <doc xml:space="preserve">optional #GCancellable object,
  33740. %NULL to ignore</doc>
  33741. <type name="Cancellable" c:type="GCancellable*"/>
  33742. </parameter>
  33743. </parameters>
  33744. </method>
  33745. <method name="replace_async" c:identifier="g_file_replace_async">
  33746. <doc xml:space="preserve">Asynchronously overwrites the file, replacing the contents,
  33747. possibly creating a backup copy of the file first.
  33748. For more details, see g_file_replace() which is
  33749. the synchronous version of this call.
  33750. When the operation is finished, @callback will be called.
  33751. You can then call g_file_replace_finish() to get the result
  33752. of the operation.</doc>
  33753. <return-value transfer-ownership="none">
  33754. <type name="none" c:type="void"/>
  33755. </return-value>
  33756. <parameters>
  33757. <instance-parameter name="file" transfer-ownership="none">
  33758. <doc xml:space="preserve">input #GFile</doc>
  33759. <type name="File" c:type="GFile*"/>
  33760. </instance-parameter>
  33761. <parameter name="etag"
  33762. transfer-ownership="none"
  33763. nullable="1"
  33764. allow-none="1">
  33765. <doc xml:space="preserve">an [entity tag][gfile-etag] for the current #GFile,
  33766. or %NULL to ignore</doc>
  33767. <type name="utf8" c:type="const char*"/>
  33768. </parameter>
  33769. <parameter name="make_backup" transfer-ownership="none">
  33770. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  33771. <type name="gboolean" c:type="gboolean"/>
  33772. </parameter>
  33773. <parameter name="flags" transfer-ownership="none">
  33774. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  33775. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  33776. </parameter>
  33777. <parameter name="io_priority" transfer-ownership="none">
  33778. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  33779. <type name="gint" c:type="int"/>
  33780. </parameter>
  33781. <parameter name="cancellable"
  33782. transfer-ownership="none"
  33783. nullable="1"
  33784. allow-none="1">
  33785. <doc xml:space="preserve">optional #GCancellable object,
  33786. %NULL to ignore</doc>
  33787. <type name="Cancellable" c:type="GCancellable*"/>
  33788. </parameter>
  33789. <parameter name="callback"
  33790. transfer-ownership="none"
  33791. nullable="1"
  33792. allow-none="1"
  33793. scope="async"
  33794. closure="6">
  33795. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  33796. when the request is satisfied</doc>
  33797. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  33798. </parameter>
  33799. <parameter name="user_data"
  33800. transfer-ownership="none"
  33801. nullable="1"
  33802. allow-none="1">
  33803. <doc xml:space="preserve">the data to pass to callback function</doc>
  33804. <type name="gpointer" c:type="gpointer"/>
  33805. </parameter>
  33806. </parameters>
  33807. </method>
  33808. <method name="replace_contents"
  33809. c:identifier="g_file_replace_contents"
  33810. throws="1">
  33811. <doc xml:space="preserve">Replaces the contents of @file with @contents of @length bytes.
  33812. If @etag is specified (not %NULL), any existing file must have that etag,
  33813. or the error %G_IO_ERROR_WRONG_ETAG will be returned.
  33814. If @make_backup is %TRUE, this function will attempt to make a backup
  33815. of @file. Internally, it uses g_file_replace(), so will try to replace the
  33816. file contents in the safest way possible. For example, atomic renames are
  33817. used when replacing local files’ contents.
  33818. If @cancellable is not %NULL, then the operation can be cancelled by
  33819. triggering the cancellable object from another thread. If the operation
  33820. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  33821. The returned @new_etag can be used to verify that the file hasn't
  33822. changed the next time it is saved over.</doc>
  33823. <return-value transfer-ownership="none">
  33824. <doc xml:space="preserve">%TRUE if successful. If an error has occurred, this function
  33825. will return %FALSE and set @error appropriately if present.</doc>
  33826. <type name="gboolean" c:type="gboolean"/>
  33827. </return-value>
  33828. <parameters>
  33829. <instance-parameter name="file" transfer-ownership="none">
  33830. <doc xml:space="preserve">input #GFile</doc>
  33831. <type name="File" c:type="GFile*"/>
  33832. </instance-parameter>
  33833. <parameter name="contents" transfer-ownership="none">
  33834. <doc xml:space="preserve">a string containing the new contents for @file</doc>
  33835. <array length="1" zero-terminated="0" c:type="char*">
  33836. <type name="guint8"/>
  33837. </array>
  33838. </parameter>
  33839. <parameter name="length" transfer-ownership="none">
  33840. <doc xml:space="preserve">the length of @contents in bytes</doc>
  33841. <type name="gsize" c:type="gsize"/>
  33842. </parameter>
  33843. <parameter name="etag"
  33844. transfer-ownership="none"
  33845. nullable="1"
  33846. allow-none="1">
  33847. <doc xml:space="preserve">the old [entity-tag][gfile-etag] for the document,
  33848. or %NULL</doc>
  33849. <type name="utf8" c:type="const char*"/>
  33850. </parameter>
  33851. <parameter name="make_backup" transfer-ownership="none">
  33852. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  33853. <type name="gboolean" c:type="gboolean"/>
  33854. </parameter>
  33855. <parameter name="flags" transfer-ownership="none">
  33856. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  33857. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  33858. </parameter>
  33859. <parameter name="new_etag"
  33860. direction="out"
  33861. caller-allocates="0"
  33862. transfer-ownership="full"
  33863. optional="1"
  33864. allow-none="1">
  33865. <doc xml:space="preserve">a location to a new [entity tag][gfile-etag]
  33866. for the document. This should be freed with g_free() when no longer
  33867. needed, or %NULL</doc>
  33868. <type name="utf8" c:type="char**"/>
  33869. </parameter>
  33870. <parameter name="cancellable"
  33871. transfer-ownership="none"
  33872. nullable="1"
  33873. allow-none="1">
  33874. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  33875. <type name="Cancellable" c:type="GCancellable*"/>
  33876. </parameter>
  33877. </parameters>
  33878. </method>
  33879. <method name="replace_contents_async"
  33880. c:identifier="g_file_replace_contents_async">
  33881. <doc xml:space="preserve">Starts an asynchronous replacement of @file with the given
  33882. @contents of @length bytes. @etag will replace the document's
  33883. current entity tag.
  33884. When this operation has completed, @callback will be called with
  33885. @user_user data, and the operation can be finalized with
  33886. g_file_replace_contents_finish().
  33887. If @cancellable is not %NULL, then the operation can be cancelled by
  33888. triggering the cancellable object from another thread. If the operation
  33889. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  33890. If @make_backup is %TRUE, this function will attempt to
  33891. make a backup of @file.
  33892. Note that no copy of @content will be made, so it must stay valid
  33893. until @callback is called. See g_file_replace_contents_bytes_async()
  33894. for a #GBytes version that will automatically hold a reference to the
  33895. contents (without copying) for the duration of the call.</doc>
  33896. <return-value transfer-ownership="none">
  33897. <type name="none" c:type="void"/>
  33898. </return-value>
  33899. <parameters>
  33900. <instance-parameter name="file" transfer-ownership="none">
  33901. <doc xml:space="preserve">input #GFile</doc>
  33902. <type name="File" c:type="GFile*"/>
  33903. </instance-parameter>
  33904. <parameter name="contents" transfer-ownership="none">
  33905. <doc xml:space="preserve">string of contents to replace the file with</doc>
  33906. <array length="1" zero-terminated="0" c:type="char*">
  33907. <type name="guint8"/>
  33908. </array>
  33909. </parameter>
  33910. <parameter name="length" transfer-ownership="none">
  33911. <doc xml:space="preserve">the length of @contents in bytes</doc>
  33912. <type name="gsize" c:type="gsize"/>
  33913. </parameter>
  33914. <parameter name="etag"
  33915. transfer-ownership="none"
  33916. nullable="1"
  33917. allow-none="1">
  33918. <doc xml:space="preserve">a new [entity tag][gfile-etag] for the @file, or %NULL</doc>
  33919. <type name="utf8" c:type="const char*"/>
  33920. </parameter>
  33921. <parameter name="make_backup" transfer-ownership="none">
  33922. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  33923. <type name="gboolean" c:type="gboolean"/>
  33924. </parameter>
  33925. <parameter name="flags" transfer-ownership="none">
  33926. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  33927. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  33928. </parameter>
  33929. <parameter name="cancellable"
  33930. transfer-ownership="none"
  33931. nullable="1"
  33932. allow-none="1">
  33933. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  33934. <type name="Cancellable" c:type="GCancellable*"/>
  33935. </parameter>
  33936. <parameter name="callback"
  33937. transfer-ownership="none"
  33938. nullable="1"
  33939. allow-none="1"
  33940. scope="async"
  33941. closure="7">
  33942. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  33943. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  33944. </parameter>
  33945. <parameter name="user_data"
  33946. transfer-ownership="none"
  33947. nullable="1"
  33948. allow-none="1">
  33949. <doc xml:space="preserve">the data to pass to callback function</doc>
  33950. <type name="gpointer" c:type="gpointer"/>
  33951. </parameter>
  33952. </parameters>
  33953. </method>
  33954. <method name="replace_contents_bytes_async"
  33955. c:identifier="g_file_replace_contents_bytes_async"
  33956. version="2.40">
  33957. <doc xml:space="preserve">Same as g_file_replace_contents_async() but takes a #GBytes input instead.
  33958. This function will keep a ref on @contents until the operation is done.
  33959. Unlike g_file_replace_contents_async() this allows forgetting about the
  33960. content without waiting for the callback.
  33961. When this operation has completed, @callback will be called with
  33962. @user_user data, and the operation can be finalized with
  33963. g_file_replace_contents_finish().</doc>
  33964. <return-value transfer-ownership="none">
  33965. <type name="none" c:type="void"/>
  33966. </return-value>
  33967. <parameters>
  33968. <instance-parameter name="file" transfer-ownership="none">
  33969. <doc xml:space="preserve">input #GFile</doc>
  33970. <type name="File" c:type="GFile*"/>
  33971. </instance-parameter>
  33972. <parameter name="contents" transfer-ownership="none">
  33973. <doc xml:space="preserve">a #GBytes</doc>
  33974. <type name="GLib.Bytes" c:type="GBytes*"/>
  33975. </parameter>
  33976. <parameter name="etag"
  33977. transfer-ownership="none"
  33978. nullable="1"
  33979. allow-none="1">
  33980. <doc xml:space="preserve">a new [entity tag][gfile-etag] for the @file, or %NULL</doc>
  33981. <type name="utf8" c:type="const char*"/>
  33982. </parameter>
  33983. <parameter name="make_backup" transfer-ownership="none">
  33984. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  33985. <type name="gboolean" c:type="gboolean"/>
  33986. </parameter>
  33987. <parameter name="flags" transfer-ownership="none">
  33988. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  33989. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  33990. </parameter>
  33991. <parameter name="cancellable"
  33992. transfer-ownership="none"
  33993. nullable="1"
  33994. allow-none="1">
  33995. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  33996. <type name="Cancellable" c:type="GCancellable*"/>
  33997. </parameter>
  33998. <parameter name="callback"
  33999. transfer-ownership="none"
  34000. nullable="1"
  34001. allow-none="1"
  34002. scope="async"
  34003. closure="6">
  34004. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  34005. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  34006. </parameter>
  34007. <parameter name="user_data"
  34008. transfer-ownership="none"
  34009. nullable="1"
  34010. allow-none="1">
  34011. <doc xml:space="preserve">the data to pass to callback function</doc>
  34012. <type name="gpointer" c:type="gpointer"/>
  34013. </parameter>
  34014. </parameters>
  34015. </method>
  34016. <method name="replace_contents_finish"
  34017. c:identifier="g_file_replace_contents_finish"
  34018. throws="1">
  34019. <doc xml:space="preserve">Finishes an asynchronous replace of the given @file. See
  34020. g_file_replace_contents_async(). Sets @new_etag to the new entity
  34021. tag for the document, if present.</doc>
  34022. <return-value transfer-ownership="none">
  34023. <doc xml:space="preserve">%TRUE on success, %FALSE on failure.</doc>
  34024. <type name="gboolean" c:type="gboolean"/>
  34025. </return-value>
  34026. <parameters>
  34027. <instance-parameter name="file" transfer-ownership="none">
  34028. <doc xml:space="preserve">input #GFile</doc>
  34029. <type name="File" c:type="GFile*"/>
  34030. </instance-parameter>
  34031. <parameter name="res" transfer-ownership="none">
  34032. <doc xml:space="preserve">a #GAsyncResult</doc>
  34033. <type name="AsyncResult" c:type="GAsyncResult*"/>
  34034. </parameter>
  34035. <parameter name="new_etag"
  34036. direction="out"
  34037. caller-allocates="0"
  34038. transfer-ownership="full"
  34039. optional="1"
  34040. allow-none="1">
  34041. <doc xml:space="preserve">a location of a new [entity tag][gfile-etag]
  34042. for the document. This should be freed with g_free() when it is no
  34043. longer needed, or %NULL</doc>
  34044. <type name="utf8" c:type="char**"/>
  34045. </parameter>
  34046. </parameters>
  34047. </method>
  34048. <method name="replace_finish"
  34049. c:identifier="g_file_replace_finish"
  34050. throws="1">
  34051. <doc xml:space="preserve">Finishes an asynchronous file replace operation started with
  34052. g_file_replace_async().</doc>
  34053. <return-value transfer-ownership="full">
  34054. <doc xml:space="preserve">a #GFileOutputStream, or %NULL on error.
  34055. Free the returned object with g_object_unref().</doc>
  34056. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  34057. </return-value>
  34058. <parameters>
  34059. <instance-parameter name="file" transfer-ownership="none">
  34060. <doc xml:space="preserve">input #GFile</doc>
  34061. <type name="File" c:type="GFile*"/>
  34062. </instance-parameter>
  34063. <parameter name="res" transfer-ownership="none">
  34064. <doc xml:space="preserve">a #GAsyncResult</doc>
  34065. <type name="AsyncResult" c:type="GAsyncResult*"/>
  34066. </parameter>
  34067. </parameters>
  34068. </method>
  34069. <method name="replace_readwrite"
  34070. c:identifier="g_file_replace_readwrite"
  34071. version="2.22"
  34072. throws="1">
  34073. <doc xml:space="preserve">Returns an output stream for overwriting the file in readwrite mode,
  34074. possibly creating a backup copy of the file first. If the file doesn't
  34075. exist, it will be created.
  34076. For details about the behaviour, see g_file_replace() which does the
  34077. same thing but returns an output stream only.
  34078. Note that in many non-local file cases read and write streams are not
  34079. supported, so make sure you really need to do read and write streaming,
  34080. rather than just opening for reading or writing.</doc>
  34081. <return-value transfer-ownership="full">
  34082. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  34083. Free the returned object with g_object_unref().</doc>
  34084. <type name="FileIOStream" c:type="GFileIOStream*"/>
  34085. </return-value>
  34086. <parameters>
  34087. <instance-parameter name="file" transfer-ownership="none">
  34088. <doc xml:space="preserve">a #GFile</doc>
  34089. <type name="File" c:type="GFile*"/>
  34090. </instance-parameter>
  34091. <parameter name="etag"
  34092. transfer-ownership="none"
  34093. nullable="1"
  34094. allow-none="1">
  34095. <doc xml:space="preserve">an optional [entity tag][gfile-etag]
  34096. for the current #GFile, or #NULL to ignore</doc>
  34097. <type name="utf8" c:type="const char*"/>
  34098. </parameter>
  34099. <parameter name="make_backup" transfer-ownership="none">
  34100. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  34101. <type name="gboolean" c:type="gboolean"/>
  34102. </parameter>
  34103. <parameter name="flags" transfer-ownership="none">
  34104. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  34105. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  34106. </parameter>
  34107. <parameter name="cancellable"
  34108. transfer-ownership="none"
  34109. nullable="1"
  34110. allow-none="1">
  34111. <doc xml:space="preserve">optional #GCancellable object,
  34112. %NULL to ignore</doc>
  34113. <type name="Cancellable" c:type="GCancellable*"/>
  34114. </parameter>
  34115. </parameters>
  34116. </method>
  34117. <method name="replace_readwrite_async"
  34118. c:identifier="g_file_replace_readwrite_async"
  34119. version="2.22">
  34120. <doc xml:space="preserve">Asynchronously overwrites the file in read-write mode,
  34121. replacing the contents, possibly creating a backup copy
  34122. of the file first.
  34123. For more details, see g_file_replace_readwrite() which is
  34124. the synchronous version of this call.
  34125. When the operation is finished, @callback will be called.
  34126. You can then call g_file_replace_readwrite_finish() to get
  34127. the result of the operation.</doc>
  34128. <return-value transfer-ownership="none">
  34129. <type name="none" c:type="void"/>
  34130. </return-value>
  34131. <parameters>
  34132. <instance-parameter name="file" transfer-ownership="none">
  34133. <doc xml:space="preserve">input #GFile</doc>
  34134. <type name="File" c:type="GFile*"/>
  34135. </instance-parameter>
  34136. <parameter name="etag"
  34137. transfer-ownership="none"
  34138. nullable="1"
  34139. allow-none="1">
  34140. <doc xml:space="preserve">an [entity tag][gfile-etag] for the current #GFile,
  34141. or %NULL to ignore</doc>
  34142. <type name="utf8" c:type="const char*"/>
  34143. </parameter>
  34144. <parameter name="make_backup" transfer-ownership="none">
  34145. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  34146. <type name="gboolean" c:type="gboolean"/>
  34147. </parameter>
  34148. <parameter name="flags" transfer-ownership="none">
  34149. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  34150. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  34151. </parameter>
  34152. <parameter name="io_priority" transfer-ownership="none">
  34153. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  34154. <type name="gint" c:type="int"/>
  34155. </parameter>
  34156. <parameter name="cancellable"
  34157. transfer-ownership="none"
  34158. nullable="1"
  34159. allow-none="1">
  34160. <doc xml:space="preserve">optional #GCancellable object,
  34161. %NULL to ignore</doc>
  34162. <type name="Cancellable" c:type="GCancellable*"/>
  34163. </parameter>
  34164. <parameter name="callback"
  34165. transfer-ownership="none"
  34166. nullable="1"
  34167. allow-none="1"
  34168. scope="async"
  34169. closure="6">
  34170. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  34171. when the request is satisfied</doc>
  34172. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  34173. </parameter>
  34174. <parameter name="user_data"
  34175. transfer-ownership="none"
  34176. nullable="1"
  34177. allow-none="1">
  34178. <doc xml:space="preserve">the data to pass to callback function</doc>
  34179. <type name="gpointer" c:type="gpointer"/>
  34180. </parameter>
  34181. </parameters>
  34182. </method>
  34183. <method name="replace_readwrite_finish"
  34184. c:identifier="g_file_replace_readwrite_finish"
  34185. version="2.22"
  34186. throws="1">
  34187. <doc xml:space="preserve">Finishes an asynchronous file replace operation started with
  34188. g_file_replace_readwrite_async().</doc>
  34189. <return-value transfer-ownership="full">
  34190. <doc xml:space="preserve">a #GFileIOStream, or %NULL on error.
  34191. Free the returned object with g_object_unref().</doc>
  34192. <type name="FileIOStream" c:type="GFileIOStream*"/>
  34193. </return-value>
  34194. <parameters>
  34195. <instance-parameter name="file" transfer-ownership="none">
  34196. <doc xml:space="preserve">input #GFile</doc>
  34197. <type name="File" c:type="GFile*"/>
  34198. </instance-parameter>
  34199. <parameter name="res" transfer-ownership="none">
  34200. <doc xml:space="preserve">a #GAsyncResult</doc>
  34201. <type name="AsyncResult" c:type="GAsyncResult*"/>
  34202. </parameter>
  34203. </parameters>
  34204. </method>
  34205. <method name="resolve_relative_path"
  34206. c:identifier="g_file_resolve_relative_path">
  34207. <doc xml:space="preserve">Resolves a relative path for @file to an absolute path.
  34208. This call does no blocking I/O.</doc>
  34209. <return-value transfer-ownership="full">
  34210. <doc xml:space="preserve">#GFile to the resolved path.
  34211. %NULL if @relative_path is %NULL or if @file is invalid.
  34212. Free the returned object with g_object_unref().</doc>
  34213. <type name="File" c:type="GFile*"/>
  34214. </return-value>
  34215. <parameters>
  34216. <instance-parameter name="file" transfer-ownership="none">
  34217. <doc xml:space="preserve">input #GFile</doc>
  34218. <type name="File" c:type="GFile*"/>
  34219. </instance-parameter>
  34220. <parameter name="relative_path" transfer-ownership="none">
  34221. <doc xml:space="preserve">a given relative path string</doc>
  34222. <type name="utf8" c:type="const char*"/>
  34223. </parameter>
  34224. </parameters>
  34225. </method>
  34226. <method name="set_attribute"
  34227. c:identifier="g_file_set_attribute"
  34228. throws="1">
  34229. <doc xml:space="preserve">Sets an attribute in the file with attribute name @attribute to @value.
  34230. Some attributes can be unset by setting @attribute to
  34231. %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
  34232. If @cancellable is not %NULL, then the operation can be cancelled by
  34233. triggering the cancellable object from another thread. If the operation
  34234. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34235. <return-value transfer-ownership="none">
  34236. <doc xml:space="preserve">%TRUE if the attribute was set, %FALSE otherwise.</doc>
  34237. <type name="gboolean" c:type="gboolean"/>
  34238. </return-value>
  34239. <parameters>
  34240. <instance-parameter name="file" transfer-ownership="none">
  34241. <doc xml:space="preserve">input #GFile</doc>
  34242. <type name="File" c:type="GFile*"/>
  34243. </instance-parameter>
  34244. <parameter name="attribute" transfer-ownership="none">
  34245. <doc xml:space="preserve">a string containing the attribute's name</doc>
  34246. <type name="utf8" c:type="const char*"/>
  34247. </parameter>
  34248. <parameter name="type" transfer-ownership="none">
  34249. <doc xml:space="preserve">The type of the attribute</doc>
  34250. <type name="FileAttributeType" c:type="GFileAttributeType"/>
  34251. </parameter>
  34252. <parameter name="value_p"
  34253. transfer-ownership="none"
  34254. nullable="1"
  34255. allow-none="1">
  34256. <doc xml:space="preserve">a pointer to the value (or the pointer
  34257. itself if the type is a pointer type)</doc>
  34258. <type name="gpointer" c:type="gpointer"/>
  34259. </parameter>
  34260. <parameter name="flags" transfer-ownership="none">
  34261. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  34262. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34263. </parameter>
  34264. <parameter name="cancellable"
  34265. transfer-ownership="none"
  34266. nullable="1"
  34267. allow-none="1">
  34268. <doc xml:space="preserve">optional #GCancellable object,
  34269. %NULL to ignore</doc>
  34270. <type name="Cancellable" c:type="GCancellable*"/>
  34271. </parameter>
  34272. </parameters>
  34273. </method>
  34274. <method name="set_attribute_byte_string"
  34275. c:identifier="g_file_set_attribute_byte_string"
  34276. throws="1">
  34277. <doc xml:space="preserve">Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
  34278. If @attribute is of a different type, this operation will fail,
  34279. returning %FALSE.
  34280. If @cancellable is not %NULL, then the operation can be cancelled by
  34281. triggering the cancellable object from another thread. If the operation
  34282. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34283. <return-value transfer-ownership="none">
  34284. <doc xml:space="preserve">%TRUE if the @attribute was successfully set to @value
  34285. in the @file, %FALSE otherwise.</doc>
  34286. <type name="gboolean" c:type="gboolean"/>
  34287. </return-value>
  34288. <parameters>
  34289. <instance-parameter name="file" transfer-ownership="none">
  34290. <doc xml:space="preserve">input #GFile</doc>
  34291. <type name="File" c:type="GFile*"/>
  34292. </instance-parameter>
  34293. <parameter name="attribute" transfer-ownership="none">
  34294. <doc xml:space="preserve">a string containing the attribute's name</doc>
  34295. <type name="utf8" c:type="const char*"/>
  34296. </parameter>
  34297. <parameter name="value" transfer-ownership="none">
  34298. <doc xml:space="preserve">a string containing the attribute's new value</doc>
  34299. <type name="utf8" c:type="const char*"/>
  34300. </parameter>
  34301. <parameter name="flags" transfer-ownership="none">
  34302. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  34303. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34304. </parameter>
  34305. <parameter name="cancellable"
  34306. transfer-ownership="none"
  34307. nullable="1"
  34308. allow-none="1">
  34309. <doc xml:space="preserve">optional #GCancellable object,
  34310. %NULL to ignore</doc>
  34311. <type name="Cancellable" c:type="GCancellable*"/>
  34312. </parameter>
  34313. </parameters>
  34314. </method>
  34315. <method name="set_attribute_int32"
  34316. c:identifier="g_file_set_attribute_int32"
  34317. throws="1">
  34318. <doc xml:space="preserve">Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
  34319. If @attribute is of a different type, this operation will fail.
  34320. If @cancellable is not %NULL, then the operation can be cancelled by
  34321. triggering the cancellable object from another thread. If the operation
  34322. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34323. <return-value transfer-ownership="none">
  34324. <doc xml:space="preserve">%TRUE if the @attribute was successfully set to @value
  34325. in the @file, %FALSE otherwise.</doc>
  34326. <type name="gboolean" c:type="gboolean"/>
  34327. </return-value>
  34328. <parameters>
  34329. <instance-parameter name="file" transfer-ownership="none">
  34330. <doc xml:space="preserve">input #GFile</doc>
  34331. <type name="File" c:type="GFile*"/>
  34332. </instance-parameter>
  34333. <parameter name="attribute" transfer-ownership="none">
  34334. <doc xml:space="preserve">a string containing the attribute's name</doc>
  34335. <type name="utf8" c:type="const char*"/>
  34336. </parameter>
  34337. <parameter name="value" transfer-ownership="none">
  34338. <doc xml:space="preserve">a #gint32 containing the attribute's new value</doc>
  34339. <type name="gint32" c:type="gint32"/>
  34340. </parameter>
  34341. <parameter name="flags" transfer-ownership="none">
  34342. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  34343. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34344. </parameter>
  34345. <parameter name="cancellable"
  34346. transfer-ownership="none"
  34347. nullable="1"
  34348. allow-none="1">
  34349. <doc xml:space="preserve">optional #GCancellable object,
  34350. %NULL to ignore</doc>
  34351. <type name="Cancellable" c:type="GCancellable*"/>
  34352. </parameter>
  34353. </parameters>
  34354. </method>
  34355. <method name="set_attribute_int64"
  34356. c:identifier="g_file_set_attribute_int64"
  34357. throws="1">
  34358. <doc xml:space="preserve">Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
  34359. If @attribute is of a different type, this operation will fail.
  34360. If @cancellable is not %NULL, then the operation can be cancelled by
  34361. triggering the cancellable object from another thread. If the operation
  34362. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34363. <return-value transfer-ownership="none">
  34364. <doc xml:space="preserve">%TRUE if the @attribute was successfully set, %FALSE otherwise.</doc>
  34365. <type name="gboolean" c:type="gboolean"/>
  34366. </return-value>
  34367. <parameters>
  34368. <instance-parameter name="file" transfer-ownership="none">
  34369. <doc xml:space="preserve">input #GFile</doc>
  34370. <type name="File" c:type="GFile*"/>
  34371. </instance-parameter>
  34372. <parameter name="attribute" transfer-ownership="none">
  34373. <doc xml:space="preserve">a string containing the attribute's name</doc>
  34374. <type name="utf8" c:type="const char*"/>
  34375. </parameter>
  34376. <parameter name="value" transfer-ownership="none">
  34377. <doc xml:space="preserve">a #guint64 containing the attribute's new value</doc>
  34378. <type name="gint64" c:type="gint64"/>
  34379. </parameter>
  34380. <parameter name="flags" transfer-ownership="none">
  34381. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  34382. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34383. </parameter>
  34384. <parameter name="cancellable"
  34385. transfer-ownership="none"
  34386. nullable="1"
  34387. allow-none="1">
  34388. <doc xml:space="preserve">optional #GCancellable object,
  34389. %NULL to ignore</doc>
  34390. <type name="Cancellable" c:type="GCancellable*"/>
  34391. </parameter>
  34392. </parameters>
  34393. </method>
  34394. <method name="set_attribute_string"
  34395. c:identifier="g_file_set_attribute_string"
  34396. throws="1">
  34397. <doc xml:space="preserve">Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
  34398. If @attribute is of a different type, this operation will fail.
  34399. If @cancellable is not %NULL, then the operation can be cancelled by
  34400. triggering the cancellable object from another thread. If the operation
  34401. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34402. <return-value transfer-ownership="none">
  34403. <doc xml:space="preserve">%TRUE if the @attribute was successfully set, %FALSE otherwise.</doc>
  34404. <type name="gboolean" c:type="gboolean"/>
  34405. </return-value>
  34406. <parameters>
  34407. <instance-parameter name="file" transfer-ownership="none">
  34408. <doc xml:space="preserve">input #GFile</doc>
  34409. <type name="File" c:type="GFile*"/>
  34410. </instance-parameter>
  34411. <parameter name="attribute" transfer-ownership="none">
  34412. <doc xml:space="preserve">a string containing the attribute's name</doc>
  34413. <type name="utf8" c:type="const char*"/>
  34414. </parameter>
  34415. <parameter name="value" transfer-ownership="none">
  34416. <doc xml:space="preserve">a string containing the attribute's value</doc>
  34417. <type name="utf8" c:type="const char*"/>
  34418. </parameter>
  34419. <parameter name="flags" transfer-ownership="none">
  34420. <doc xml:space="preserve">#GFileQueryInfoFlags</doc>
  34421. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34422. </parameter>
  34423. <parameter name="cancellable"
  34424. transfer-ownership="none"
  34425. nullable="1"
  34426. allow-none="1">
  34427. <doc xml:space="preserve">optional #GCancellable object,
  34428. %NULL to ignore</doc>
  34429. <type name="Cancellable" c:type="GCancellable*"/>
  34430. </parameter>
  34431. </parameters>
  34432. </method>
  34433. <method name="set_attribute_uint32"
  34434. c:identifier="g_file_set_attribute_uint32"
  34435. throws="1">
  34436. <doc xml:space="preserve">Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
  34437. If @attribute is of a different type, this operation will fail.
  34438. If @cancellable is not %NULL, then the operation can be cancelled by
  34439. triggering the cancellable object from another thread. If the operation
  34440. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34441. <return-value transfer-ownership="none">
  34442. <doc xml:space="preserve">%TRUE if the @attribute was successfully set to @value
  34443. in the @file, %FALSE otherwise.</doc>
  34444. <type name="gboolean" c:type="gboolean"/>
  34445. </return-value>
  34446. <parameters>
  34447. <instance-parameter name="file" transfer-ownership="none">
  34448. <doc xml:space="preserve">input #GFile</doc>
  34449. <type name="File" c:type="GFile*"/>
  34450. </instance-parameter>
  34451. <parameter name="attribute" transfer-ownership="none">
  34452. <doc xml:space="preserve">a string containing the attribute's name</doc>
  34453. <type name="utf8" c:type="const char*"/>
  34454. </parameter>
  34455. <parameter name="value" transfer-ownership="none">
  34456. <doc xml:space="preserve">a #guint32 containing the attribute's new value</doc>
  34457. <type name="guint32" c:type="guint32"/>
  34458. </parameter>
  34459. <parameter name="flags" transfer-ownership="none">
  34460. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  34461. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34462. </parameter>
  34463. <parameter name="cancellable"
  34464. transfer-ownership="none"
  34465. nullable="1"
  34466. allow-none="1">
  34467. <doc xml:space="preserve">optional #GCancellable object,
  34468. %NULL to ignore</doc>
  34469. <type name="Cancellable" c:type="GCancellable*"/>
  34470. </parameter>
  34471. </parameters>
  34472. </method>
  34473. <method name="set_attribute_uint64"
  34474. c:identifier="g_file_set_attribute_uint64"
  34475. throws="1">
  34476. <doc xml:space="preserve">Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
  34477. If @attribute is of a different type, this operation will fail.
  34478. If @cancellable is not %NULL, then the operation can be cancelled by
  34479. triggering the cancellable object from another thread. If the operation
  34480. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34481. <return-value transfer-ownership="none">
  34482. <doc xml:space="preserve">%TRUE if the @attribute was successfully set to @value
  34483. in the @file, %FALSE otherwise.</doc>
  34484. <type name="gboolean" c:type="gboolean"/>
  34485. </return-value>
  34486. <parameters>
  34487. <instance-parameter name="file" transfer-ownership="none">
  34488. <doc xml:space="preserve">input #GFile</doc>
  34489. <type name="File" c:type="GFile*"/>
  34490. </instance-parameter>
  34491. <parameter name="attribute" transfer-ownership="none">
  34492. <doc xml:space="preserve">a string containing the attribute's name</doc>
  34493. <type name="utf8" c:type="const char*"/>
  34494. </parameter>
  34495. <parameter name="value" transfer-ownership="none">
  34496. <doc xml:space="preserve">a #guint64 containing the attribute's new value</doc>
  34497. <type name="guint64" c:type="guint64"/>
  34498. </parameter>
  34499. <parameter name="flags" transfer-ownership="none">
  34500. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  34501. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34502. </parameter>
  34503. <parameter name="cancellable"
  34504. transfer-ownership="none"
  34505. nullable="1"
  34506. allow-none="1">
  34507. <doc xml:space="preserve">optional #GCancellable object,
  34508. %NULL to ignore</doc>
  34509. <type name="Cancellable" c:type="GCancellable*"/>
  34510. </parameter>
  34511. </parameters>
  34512. </method>
  34513. <method name="set_attributes_async"
  34514. c:identifier="g_file_set_attributes_async">
  34515. <doc xml:space="preserve">Asynchronously sets the attributes of @file with @info.
  34516. For more details, see g_file_set_attributes_from_info(),
  34517. which is the synchronous version of this call.
  34518. When the operation is finished, @callback will be called.
  34519. You can then call g_file_set_attributes_finish() to get
  34520. the result of the operation.</doc>
  34521. <return-value transfer-ownership="none">
  34522. <type name="none" c:type="void"/>
  34523. </return-value>
  34524. <parameters>
  34525. <instance-parameter name="file" transfer-ownership="none">
  34526. <doc xml:space="preserve">input #GFile</doc>
  34527. <type name="File" c:type="GFile*"/>
  34528. </instance-parameter>
  34529. <parameter name="info" transfer-ownership="none">
  34530. <doc xml:space="preserve">a #GFileInfo</doc>
  34531. <type name="FileInfo" c:type="GFileInfo*"/>
  34532. </parameter>
  34533. <parameter name="flags" transfer-ownership="none">
  34534. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  34535. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34536. </parameter>
  34537. <parameter name="io_priority" transfer-ownership="none">
  34538. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  34539. <type name="gint" c:type="int"/>
  34540. </parameter>
  34541. <parameter name="cancellable"
  34542. transfer-ownership="none"
  34543. nullable="1"
  34544. allow-none="1">
  34545. <doc xml:space="preserve">optional #GCancellable object,
  34546. %NULL to ignore</doc>
  34547. <type name="Cancellable" c:type="GCancellable*"/>
  34548. </parameter>
  34549. <parameter name="callback"
  34550. transfer-ownership="none"
  34551. nullable="1"
  34552. allow-none="1"
  34553. scope="async"
  34554. closure="5">
  34555. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  34556. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  34557. </parameter>
  34558. <parameter name="user_data"
  34559. transfer-ownership="none"
  34560. nullable="1"
  34561. allow-none="1">
  34562. <doc xml:space="preserve">a #gpointer</doc>
  34563. <type name="gpointer" c:type="gpointer"/>
  34564. </parameter>
  34565. </parameters>
  34566. </method>
  34567. <method name="set_attributes_finish"
  34568. c:identifier="g_file_set_attributes_finish"
  34569. throws="1">
  34570. <doc xml:space="preserve">Finishes setting an attribute started in g_file_set_attributes_async().</doc>
  34571. <return-value transfer-ownership="none">
  34572. <doc xml:space="preserve">%TRUE if the attributes were set correctly, %FALSE otherwise.</doc>
  34573. <type name="gboolean" c:type="gboolean"/>
  34574. </return-value>
  34575. <parameters>
  34576. <instance-parameter name="file" transfer-ownership="none">
  34577. <doc xml:space="preserve">input #GFile</doc>
  34578. <type name="File" c:type="GFile*"/>
  34579. </instance-parameter>
  34580. <parameter name="result" transfer-ownership="none">
  34581. <doc xml:space="preserve">a #GAsyncResult</doc>
  34582. <type name="AsyncResult" c:type="GAsyncResult*"/>
  34583. </parameter>
  34584. <parameter name="info"
  34585. direction="out"
  34586. caller-allocates="0"
  34587. transfer-ownership="full">
  34588. <doc xml:space="preserve">a #GFileInfo</doc>
  34589. <type name="FileInfo" c:type="GFileInfo**"/>
  34590. </parameter>
  34591. </parameters>
  34592. </method>
  34593. <method name="set_attributes_from_info"
  34594. c:identifier="g_file_set_attributes_from_info"
  34595. throws="1">
  34596. <doc xml:space="preserve">Tries to set all attributes in the #GFileInfo on the target
  34597. values, not stopping on the first error.
  34598. If there is any error during this operation then @error will
  34599. be set to the first error. Error on particular fields are flagged
  34600. by setting the "status" field in the attribute value to
  34601. %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can
  34602. also detect further errors.
  34603. If @cancellable is not %NULL, then the operation can be cancelled by
  34604. triggering the cancellable object from another thread. If the operation
  34605. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34606. <return-value transfer-ownership="none">
  34607. <doc xml:space="preserve">%FALSE if there was any error, %TRUE otherwise.</doc>
  34608. <type name="gboolean" c:type="gboolean"/>
  34609. </return-value>
  34610. <parameters>
  34611. <instance-parameter name="file" transfer-ownership="none">
  34612. <doc xml:space="preserve">input #GFile</doc>
  34613. <type name="File" c:type="GFile*"/>
  34614. </instance-parameter>
  34615. <parameter name="info" transfer-ownership="none">
  34616. <doc xml:space="preserve">a #GFileInfo</doc>
  34617. <type name="FileInfo" c:type="GFileInfo*"/>
  34618. </parameter>
  34619. <parameter name="flags" transfer-ownership="none">
  34620. <doc xml:space="preserve">#GFileQueryInfoFlags</doc>
  34621. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  34622. </parameter>
  34623. <parameter name="cancellable"
  34624. transfer-ownership="none"
  34625. nullable="1"
  34626. allow-none="1">
  34627. <doc xml:space="preserve">optional #GCancellable object,
  34628. %NULL to ignore</doc>
  34629. <type name="Cancellable" c:type="GCancellable*"/>
  34630. </parameter>
  34631. </parameters>
  34632. </method>
  34633. <method name="set_display_name"
  34634. c:identifier="g_file_set_display_name"
  34635. throws="1">
  34636. <doc xml:space="preserve">Renames @file to the specified display name.
  34637. The display name is converted from UTF-8 to the correct encoding
  34638. for the target filesystem if possible and the @file is renamed to this.
  34639. If you want to implement a rename operation in the user interface the
  34640. edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
  34641. initial value in the rename widget, and then the result after editing
  34642. should be passed to g_file_set_display_name().
  34643. On success the resulting converted filename is returned.
  34644. If @cancellable is not %NULL, then the operation can be cancelled by
  34645. triggering the cancellable object from another thread. If the operation
  34646. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34647. <return-value transfer-ownership="full">
  34648. <doc xml:space="preserve">a #GFile specifying what @file was renamed to,
  34649. or %NULL if there was an error.
  34650. Free the returned object with g_object_unref().</doc>
  34651. <type name="File" c:type="GFile*"/>
  34652. </return-value>
  34653. <parameters>
  34654. <instance-parameter name="file" transfer-ownership="none">
  34655. <doc xml:space="preserve">input #GFile</doc>
  34656. <type name="File" c:type="GFile*"/>
  34657. </instance-parameter>
  34658. <parameter name="display_name" transfer-ownership="none">
  34659. <doc xml:space="preserve">a string</doc>
  34660. <type name="utf8" c:type="const char*"/>
  34661. </parameter>
  34662. <parameter name="cancellable"
  34663. transfer-ownership="none"
  34664. nullable="1"
  34665. allow-none="1">
  34666. <doc xml:space="preserve">optional #GCancellable object,
  34667. %NULL to ignore</doc>
  34668. <type name="Cancellable" c:type="GCancellable*"/>
  34669. </parameter>
  34670. </parameters>
  34671. </method>
  34672. <method name="set_display_name_async"
  34673. c:identifier="g_file_set_display_name_async">
  34674. <doc xml:space="preserve">Asynchronously sets the display name for a given #GFile.
  34675. For more details, see g_file_set_display_name() which is
  34676. the synchronous version of this call.
  34677. When the operation is finished, @callback will be called.
  34678. You can then call g_file_set_display_name_finish() to get
  34679. the result of the operation.</doc>
  34680. <return-value transfer-ownership="none">
  34681. <type name="none" c:type="void"/>
  34682. </return-value>
  34683. <parameters>
  34684. <instance-parameter name="file" transfer-ownership="none">
  34685. <doc xml:space="preserve">input #GFile</doc>
  34686. <type name="File" c:type="GFile*"/>
  34687. </instance-parameter>
  34688. <parameter name="display_name" transfer-ownership="none">
  34689. <doc xml:space="preserve">a string</doc>
  34690. <type name="utf8" c:type="const char*"/>
  34691. </parameter>
  34692. <parameter name="io_priority" transfer-ownership="none">
  34693. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  34694. <type name="gint" c:type="int"/>
  34695. </parameter>
  34696. <parameter name="cancellable"
  34697. transfer-ownership="none"
  34698. nullable="1"
  34699. allow-none="1">
  34700. <doc xml:space="preserve">optional #GCancellable object,
  34701. %NULL to ignore</doc>
  34702. <type name="Cancellable" c:type="GCancellable*"/>
  34703. </parameter>
  34704. <parameter name="callback"
  34705. transfer-ownership="none"
  34706. nullable="1"
  34707. allow-none="1"
  34708. scope="async"
  34709. closure="4">
  34710. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  34711. when the request is satisfied</doc>
  34712. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  34713. </parameter>
  34714. <parameter name="user_data"
  34715. transfer-ownership="none"
  34716. nullable="1"
  34717. allow-none="1">
  34718. <doc xml:space="preserve">the data to pass to callback function</doc>
  34719. <type name="gpointer" c:type="gpointer"/>
  34720. </parameter>
  34721. </parameters>
  34722. </method>
  34723. <method name="set_display_name_finish"
  34724. c:identifier="g_file_set_display_name_finish"
  34725. throws="1">
  34726. <doc xml:space="preserve">Finishes setting a display name started with
  34727. g_file_set_display_name_async().</doc>
  34728. <return-value transfer-ownership="full">
  34729. <doc xml:space="preserve">a #GFile or %NULL on error.
  34730. Free the returned object with g_object_unref().</doc>
  34731. <type name="File" c:type="GFile*"/>
  34732. </return-value>
  34733. <parameters>
  34734. <instance-parameter name="file" transfer-ownership="none">
  34735. <doc xml:space="preserve">input #GFile</doc>
  34736. <type name="File" c:type="GFile*"/>
  34737. </instance-parameter>
  34738. <parameter name="res" transfer-ownership="none">
  34739. <doc xml:space="preserve">a #GAsyncResult</doc>
  34740. <type name="AsyncResult" c:type="GAsyncResult*"/>
  34741. </parameter>
  34742. </parameters>
  34743. </method>
  34744. <method name="start_mountable"
  34745. c:identifier="g_file_start_mountable"
  34746. version="2.22">
  34747. <doc xml:space="preserve">Starts a file of type #G_FILE_TYPE_MOUNTABLE.
  34748. Using @start_operation, you can request callbacks when, for instance,
  34749. passwords are needed during authentication.
  34750. If @cancellable is not %NULL, then the operation can be cancelled by
  34751. triggering the cancellable object from another thread. If the operation
  34752. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  34753. When the operation is finished, @callback will be called.
  34754. You can then call g_file_mount_mountable_finish() to get
  34755. the result of the operation.</doc>
  34756. <return-value transfer-ownership="none">
  34757. <type name="none" c:type="void"/>
  34758. </return-value>
  34759. <parameters>
  34760. <instance-parameter name="file" transfer-ownership="none">
  34761. <doc xml:space="preserve">input #GFile</doc>
  34762. <type name="File" c:type="GFile*"/>
  34763. </instance-parameter>
  34764. <parameter name="flags" transfer-ownership="none">
  34765. <doc xml:space="preserve">flags affecting the operation</doc>
  34766. <type name="DriveStartFlags" c:type="GDriveStartFlags"/>
  34767. </parameter>
  34768. <parameter name="start_operation"
  34769. transfer-ownership="none"
  34770. nullable="1"
  34771. allow-none="1">
  34772. <doc xml:space="preserve">a #GMountOperation, or %NULL to avoid user interaction</doc>
  34773. <type name="MountOperation" c:type="GMountOperation*"/>
  34774. </parameter>
  34775. <parameter name="cancellable"
  34776. transfer-ownership="none"
  34777. nullable="1"
  34778. allow-none="1">
  34779. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  34780. <type name="Cancellable" c:type="GCancellable*"/>
  34781. </parameter>
  34782. <parameter name="callback"
  34783. transfer-ownership="none"
  34784. nullable="1"
  34785. allow-none="1"
  34786. scope="async"
  34787. closure="4">
  34788. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied, or %NULL</doc>
  34789. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  34790. </parameter>
  34791. <parameter name="user_data"
  34792. transfer-ownership="none"
  34793. nullable="1"
  34794. allow-none="1">
  34795. <doc xml:space="preserve">the data to pass to callback function</doc>
  34796. <type name="gpointer" c:type="gpointer"/>
  34797. </parameter>
  34798. </parameters>
  34799. </method>
  34800. <method name="start_mountable_finish"
  34801. c:identifier="g_file_start_mountable_finish"
  34802. version="2.22"
  34803. throws="1">
  34804. <doc xml:space="preserve">Finishes a start operation. See g_file_start_mountable() for details.
  34805. Finish an asynchronous start operation that was started
  34806. with g_file_start_mountable().</doc>
  34807. <return-value transfer-ownership="none">
  34808. <doc xml:space="preserve">%TRUE if the operation finished successfully. %FALSE
  34809. otherwise.</doc>
  34810. <type name="gboolean" c:type="gboolean"/>
  34811. </return-value>
  34812. <parameters>
  34813. <instance-parameter name="file" transfer-ownership="none">
  34814. <doc xml:space="preserve">input #GFile</doc>
  34815. <type name="File" c:type="GFile*"/>
  34816. </instance-parameter>
  34817. <parameter name="result" transfer-ownership="none">
  34818. <doc xml:space="preserve">a #GAsyncResult</doc>
  34819. <type name="AsyncResult" c:type="GAsyncResult*"/>
  34820. </parameter>
  34821. </parameters>
  34822. </method>
  34823. <method name="stop_mountable"
  34824. c:identifier="g_file_stop_mountable"
  34825. version="2.22">
  34826. <doc xml:space="preserve">Stops a file of type #G_FILE_TYPE_MOUNTABLE.
  34827. If @cancellable is not %NULL, then the operation can be cancelled by
  34828. triggering the cancellable object from another thread. If the operation
  34829. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  34830. When the operation is finished, @callback will be called.
  34831. You can then call g_file_stop_mountable_finish() to get
  34832. the result of the operation.</doc>
  34833. <return-value transfer-ownership="none">
  34834. <type name="none" c:type="void"/>
  34835. </return-value>
  34836. <parameters>
  34837. <instance-parameter name="file" transfer-ownership="none">
  34838. <doc xml:space="preserve">input #GFile</doc>
  34839. <type name="File" c:type="GFile*"/>
  34840. </instance-parameter>
  34841. <parameter name="flags" transfer-ownership="none">
  34842. <doc xml:space="preserve">flags affecting the operation</doc>
  34843. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  34844. </parameter>
  34845. <parameter name="mount_operation"
  34846. transfer-ownership="none"
  34847. nullable="1"
  34848. allow-none="1">
  34849. <doc xml:space="preserve">a #GMountOperation,
  34850. or %NULL to avoid user interaction.</doc>
  34851. <type name="MountOperation" c:type="GMountOperation*"/>
  34852. </parameter>
  34853. <parameter name="cancellable"
  34854. transfer-ownership="none"
  34855. nullable="1"
  34856. allow-none="1">
  34857. <doc xml:space="preserve">optional #GCancellable object,
  34858. %NULL to ignore</doc>
  34859. <type name="Cancellable" c:type="GCancellable*"/>
  34860. </parameter>
  34861. <parameter name="callback"
  34862. transfer-ownership="none"
  34863. nullable="1"
  34864. allow-none="1"
  34865. scope="async"
  34866. closure="4">
  34867. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  34868. when the request is satisfied, or %NULL</doc>
  34869. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  34870. </parameter>
  34871. <parameter name="user_data"
  34872. transfer-ownership="none"
  34873. nullable="1"
  34874. allow-none="1">
  34875. <doc xml:space="preserve">the data to pass to callback function</doc>
  34876. <type name="gpointer" c:type="gpointer"/>
  34877. </parameter>
  34878. </parameters>
  34879. </method>
  34880. <method name="stop_mountable_finish"
  34881. c:identifier="g_file_stop_mountable_finish"
  34882. version="2.22"
  34883. throws="1">
  34884. <doc xml:space="preserve">Finishes an stop operation, see g_file_stop_mountable() for details.
  34885. Finish an asynchronous stop operation that was started
  34886. with g_file_stop_mountable().</doc>
  34887. <return-value transfer-ownership="none">
  34888. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  34889. %FALSE otherwise.</doc>
  34890. <type name="gboolean" c:type="gboolean"/>
  34891. </return-value>
  34892. <parameters>
  34893. <instance-parameter name="file" transfer-ownership="none">
  34894. <doc xml:space="preserve">input #GFile</doc>
  34895. <type name="File" c:type="GFile*"/>
  34896. </instance-parameter>
  34897. <parameter name="result" transfer-ownership="none">
  34898. <doc xml:space="preserve">a #GAsyncResult</doc>
  34899. <type name="AsyncResult" c:type="GAsyncResult*"/>
  34900. </parameter>
  34901. </parameters>
  34902. </method>
  34903. <method name="supports_thread_contexts"
  34904. c:identifier="g_file_supports_thread_contexts"
  34905. version="2.22">
  34906. <doc xml:space="preserve">Checks if @file supports
  34907. [thread-default contexts][g-main-context-push-thread-default-context].
  34908. If this returns %FALSE, you cannot perform asynchronous operations on
  34909. @file in a thread that has a thread-default context.</doc>
  34910. <return-value transfer-ownership="none">
  34911. <doc xml:space="preserve">Whether or not @file supports thread-default contexts.</doc>
  34912. <type name="gboolean" c:type="gboolean"/>
  34913. </return-value>
  34914. <parameters>
  34915. <instance-parameter name="file" transfer-ownership="none">
  34916. <doc xml:space="preserve">a #GFile</doc>
  34917. <type name="File" c:type="GFile*"/>
  34918. </instance-parameter>
  34919. </parameters>
  34920. </method>
  34921. <method name="trash" c:identifier="g_file_trash" throws="1">
  34922. <doc xml:space="preserve">Sends @file to the "Trashcan", if possible. This is similar to
  34923. deleting it, but the user can recover it before emptying the trashcan.
  34924. Not all file systems support trashing, so this call can return the
  34925. %G_IO_ERROR_NOT_SUPPORTED error.
  34926. If @cancellable is not %NULL, then the operation can be cancelled by
  34927. triggering the cancellable object from another thread. If the operation
  34928. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  34929. <return-value transfer-ownership="none">
  34930. <doc xml:space="preserve">%TRUE on successful trash, %FALSE otherwise.</doc>
  34931. <type name="gboolean" c:type="gboolean"/>
  34932. </return-value>
  34933. <parameters>
  34934. <instance-parameter name="file" transfer-ownership="none">
  34935. <doc xml:space="preserve">#GFile to send to trash</doc>
  34936. <type name="File" c:type="GFile*"/>
  34937. </instance-parameter>
  34938. <parameter name="cancellable"
  34939. transfer-ownership="none"
  34940. nullable="1"
  34941. allow-none="1">
  34942. <doc xml:space="preserve">optional #GCancellable object,
  34943. %NULL to ignore</doc>
  34944. <type name="Cancellable" c:type="GCancellable*"/>
  34945. </parameter>
  34946. </parameters>
  34947. </method>
  34948. <method name="trash_async"
  34949. c:identifier="g_file_trash_async"
  34950. version="2.38">
  34951. <doc xml:space="preserve">Asynchronously sends @file to the Trash location, if possible.</doc>
  34952. <return-value transfer-ownership="none">
  34953. <type name="none" c:type="void"/>
  34954. </return-value>
  34955. <parameters>
  34956. <instance-parameter name="file" transfer-ownership="none">
  34957. <doc xml:space="preserve">input #GFile</doc>
  34958. <type name="File" c:type="GFile*"/>
  34959. </instance-parameter>
  34960. <parameter name="io_priority" transfer-ownership="none">
  34961. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  34962. <type name="gint" c:type="int"/>
  34963. </parameter>
  34964. <parameter name="cancellable"
  34965. transfer-ownership="none"
  34966. nullable="1"
  34967. allow-none="1">
  34968. <doc xml:space="preserve">optional #GCancellable object,
  34969. %NULL to ignore</doc>
  34970. <type name="Cancellable" c:type="GCancellable*"/>
  34971. </parameter>
  34972. <parameter name="callback"
  34973. transfer-ownership="none"
  34974. nullable="1"
  34975. allow-none="1"
  34976. scope="async"
  34977. closure="3">
  34978. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  34979. when the request is satisfied</doc>
  34980. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  34981. </parameter>
  34982. <parameter name="user_data"
  34983. transfer-ownership="none"
  34984. nullable="1"
  34985. allow-none="1">
  34986. <doc xml:space="preserve">the data to pass to callback function</doc>
  34987. <type name="gpointer" c:type="gpointer"/>
  34988. </parameter>
  34989. </parameters>
  34990. </method>
  34991. <method name="trash_finish"
  34992. c:identifier="g_file_trash_finish"
  34993. version="2.38"
  34994. throws="1">
  34995. <doc xml:space="preserve">Finishes an asynchronous file trashing operation, started with
  34996. g_file_trash_async().</doc>
  34997. <return-value transfer-ownership="none">
  34998. <doc xml:space="preserve">%TRUE on successful trash, %FALSE otherwise.</doc>
  34999. <type name="gboolean" c:type="gboolean"/>
  35000. </return-value>
  35001. <parameters>
  35002. <instance-parameter name="file" transfer-ownership="none">
  35003. <doc xml:space="preserve">input #GFile</doc>
  35004. <type name="File" c:type="GFile*"/>
  35005. </instance-parameter>
  35006. <parameter name="result" transfer-ownership="none">
  35007. <doc xml:space="preserve">a #GAsyncResult</doc>
  35008. <type name="AsyncResult" c:type="GAsyncResult*"/>
  35009. </parameter>
  35010. </parameters>
  35011. </method>
  35012. <method name="unmount_mountable"
  35013. c:identifier="g_file_unmount_mountable"
  35014. deprecated="1"
  35015. deprecated-version="2.22">
  35016. <doc xml:space="preserve">Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
  35017. If @cancellable is not %NULL, then the operation can be cancelled by
  35018. triggering the cancellable object from another thread. If the operation
  35019. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  35020. When the operation is finished, @callback will be called.
  35021. You can then call g_file_unmount_mountable_finish() to get
  35022. the result of the operation.</doc>
  35023. <doc-deprecated xml:space="preserve">Use g_file_unmount_mountable_with_operation() instead.</doc-deprecated>
  35024. <return-value transfer-ownership="none">
  35025. <type name="none" c:type="void"/>
  35026. </return-value>
  35027. <parameters>
  35028. <instance-parameter name="file" transfer-ownership="none">
  35029. <doc xml:space="preserve">input #GFile</doc>
  35030. <type name="File" c:type="GFile*"/>
  35031. </instance-parameter>
  35032. <parameter name="flags" transfer-ownership="none">
  35033. <doc xml:space="preserve">flags affecting the operation</doc>
  35034. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  35035. </parameter>
  35036. <parameter name="cancellable"
  35037. transfer-ownership="none"
  35038. nullable="1"
  35039. allow-none="1">
  35040. <doc xml:space="preserve">optional #GCancellable object,
  35041. %NULL to ignore</doc>
  35042. <type name="Cancellable" c:type="GCancellable*"/>
  35043. </parameter>
  35044. <parameter name="callback"
  35045. transfer-ownership="none"
  35046. nullable="1"
  35047. allow-none="1"
  35048. scope="async"
  35049. closure="3">
  35050. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  35051. when the request is satisfied, or %NULL</doc>
  35052. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  35053. </parameter>
  35054. <parameter name="user_data"
  35055. transfer-ownership="none"
  35056. nullable="1"
  35057. allow-none="1">
  35058. <doc xml:space="preserve">the data to pass to callback function</doc>
  35059. <type name="gpointer" c:type="gpointer"/>
  35060. </parameter>
  35061. </parameters>
  35062. </method>
  35063. <method name="unmount_mountable_finish"
  35064. c:identifier="g_file_unmount_mountable_finish"
  35065. deprecated="1"
  35066. deprecated-version="2.22"
  35067. throws="1">
  35068. <doc xml:space="preserve">Finishes an unmount operation, see g_file_unmount_mountable() for details.
  35069. Finish an asynchronous unmount operation that was started
  35070. with g_file_unmount_mountable().</doc>
  35071. <doc-deprecated xml:space="preserve">Use g_file_unmount_mountable_with_operation_finish()
  35072. instead.</doc-deprecated>
  35073. <return-value transfer-ownership="none">
  35074. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  35075. %FALSE otherwise.</doc>
  35076. <type name="gboolean" c:type="gboolean"/>
  35077. </return-value>
  35078. <parameters>
  35079. <instance-parameter name="file" transfer-ownership="none">
  35080. <doc xml:space="preserve">input #GFile</doc>
  35081. <type name="File" c:type="GFile*"/>
  35082. </instance-parameter>
  35083. <parameter name="result" transfer-ownership="none">
  35084. <doc xml:space="preserve">a #GAsyncResult</doc>
  35085. <type name="AsyncResult" c:type="GAsyncResult*"/>
  35086. </parameter>
  35087. </parameters>
  35088. </method>
  35089. <method name="unmount_mountable_with_operation"
  35090. c:identifier="g_file_unmount_mountable_with_operation"
  35091. version="2.22">
  35092. <doc xml:space="preserve">Unmounts a file of type #G_FILE_TYPE_MOUNTABLE.
  35093. If @cancellable is not %NULL, then the operation can be cancelled by
  35094. triggering the cancellable object from another thread. If the operation
  35095. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  35096. When the operation is finished, @callback will be called.
  35097. You can then call g_file_unmount_mountable_finish() to get
  35098. the result of the operation.</doc>
  35099. <return-value transfer-ownership="none">
  35100. <type name="none" c:type="void"/>
  35101. </return-value>
  35102. <parameters>
  35103. <instance-parameter name="file" transfer-ownership="none">
  35104. <doc xml:space="preserve">input #GFile</doc>
  35105. <type name="File" c:type="GFile*"/>
  35106. </instance-parameter>
  35107. <parameter name="flags" transfer-ownership="none">
  35108. <doc xml:space="preserve">flags affecting the operation</doc>
  35109. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  35110. </parameter>
  35111. <parameter name="mount_operation"
  35112. transfer-ownership="none"
  35113. nullable="1"
  35114. allow-none="1">
  35115. <doc xml:space="preserve">a #GMountOperation,
  35116. or %NULL to avoid user interaction</doc>
  35117. <type name="MountOperation" c:type="GMountOperation*"/>
  35118. </parameter>
  35119. <parameter name="cancellable"
  35120. transfer-ownership="none"
  35121. nullable="1"
  35122. allow-none="1">
  35123. <doc xml:space="preserve">optional #GCancellable object,
  35124. %NULL to ignore</doc>
  35125. <type name="Cancellable" c:type="GCancellable*"/>
  35126. </parameter>
  35127. <parameter name="callback"
  35128. transfer-ownership="none"
  35129. nullable="1"
  35130. allow-none="1"
  35131. scope="async"
  35132. closure="4">
  35133. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  35134. when the request is satisfied, or %NULL</doc>
  35135. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  35136. </parameter>
  35137. <parameter name="user_data"
  35138. transfer-ownership="none"
  35139. nullable="1"
  35140. allow-none="1">
  35141. <doc xml:space="preserve">the data to pass to callback function</doc>
  35142. <type name="gpointer" c:type="gpointer"/>
  35143. </parameter>
  35144. </parameters>
  35145. </method>
  35146. <method name="unmount_mountable_with_operation_finish"
  35147. c:identifier="g_file_unmount_mountable_with_operation_finish"
  35148. version="2.22"
  35149. throws="1">
  35150. <doc xml:space="preserve">Finishes an unmount operation,
  35151. see g_file_unmount_mountable_with_operation() for details.
  35152. Finish an asynchronous unmount operation that was started
  35153. with g_file_unmount_mountable_with_operation().</doc>
  35154. <return-value transfer-ownership="none">
  35155. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  35156. %FALSE otherwise.</doc>
  35157. <type name="gboolean" c:type="gboolean"/>
  35158. </return-value>
  35159. <parameters>
  35160. <instance-parameter name="file" transfer-ownership="none">
  35161. <doc xml:space="preserve">input #GFile</doc>
  35162. <type name="File" c:type="GFile*"/>
  35163. </instance-parameter>
  35164. <parameter name="result" transfer-ownership="none">
  35165. <doc xml:space="preserve">a #GAsyncResult</doc>
  35166. <type name="AsyncResult" c:type="GAsyncResult*"/>
  35167. </parameter>
  35168. </parameters>
  35169. </method>
  35170. </interface>
  35171. <record name="FileAttributeInfo" c:type="GFileAttributeInfo">
  35172. <doc xml:space="preserve">Information about a specific attribute.</doc>
  35173. <field name="name" writable="1">
  35174. <doc xml:space="preserve">the name of the attribute.</doc>
  35175. <type name="utf8" c:type="char*"/>
  35176. </field>
  35177. <field name="type" writable="1">
  35178. <doc xml:space="preserve">the #GFileAttributeType type of the attribute.</doc>
  35179. <type name="FileAttributeType" c:type="GFileAttributeType"/>
  35180. </field>
  35181. <field name="flags" writable="1">
  35182. <doc xml:space="preserve">a set of #GFileAttributeInfoFlags.</doc>
  35183. <type name="FileAttributeInfoFlags" c:type="GFileAttributeInfoFlags"/>
  35184. </field>
  35185. </record>
  35186. <bitfield name="FileAttributeInfoFlags"
  35187. glib:type-name="GFileAttributeInfoFlags"
  35188. glib:get-type="g_file_attribute_info_flags_get_type"
  35189. c:type="GFileAttributeInfoFlags">
  35190. <doc xml:space="preserve">Flags specifying the behaviour of an attribute.</doc>
  35191. <member name="none"
  35192. value="0"
  35193. c:identifier="G_FILE_ATTRIBUTE_INFO_NONE"
  35194. glib:nick="none">
  35195. <doc xml:space="preserve">no flags set.</doc>
  35196. </member>
  35197. <member name="copy_with_file"
  35198. value="1"
  35199. c:identifier="G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE"
  35200. glib:nick="copy-with-file">
  35201. <doc xml:space="preserve">copy the attribute values when the file is copied.</doc>
  35202. </member>
  35203. <member name="copy_when_moved"
  35204. value="2"
  35205. c:identifier="G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED"
  35206. glib:nick="copy-when-moved">
  35207. <doc xml:space="preserve">copy the attribute values when the file is moved.</doc>
  35208. </member>
  35209. </bitfield>
  35210. <record name="FileAttributeInfoList"
  35211. c:type="GFileAttributeInfoList"
  35212. glib:type-name="GFileAttributeInfoList"
  35213. glib:get-type="g_file_attribute_info_list_get_type"
  35214. c:symbol-prefix="file_attribute_info_list">
  35215. <doc xml:space="preserve">Acts as a lightweight registry for possible valid file attributes.
  35216. The registry stores Key-Value pair formats as #GFileAttributeInfos.</doc>
  35217. <field name="infos" writable="1">
  35218. <doc xml:space="preserve">an array of #GFileAttributeInfos.</doc>
  35219. <type name="FileAttributeInfo" c:type="GFileAttributeInfo*"/>
  35220. </field>
  35221. <field name="n_infos" writable="1">
  35222. <doc xml:space="preserve">the number of values in the array.</doc>
  35223. <type name="gint" c:type="int"/>
  35224. </field>
  35225. <constructor name="new" c:identifier="g_file_attribute_info_list_new">
  35226. <doc xml:space="preserve">Creates a new file attribute info list.</doc>
  35227. <return-value transfer-ownership="full">
  35228. <doc xml:space="preserve">a #GFileAttributeInfoList.</doc>
  35229. <type name="FileAttributeInfoList" c:type="GFileAttributeInfoList*"/>
  35230. </return-value>
  35231. </constructor>
  35232. <method name="add" c:identifier="g_file_attribute_info_list_add">
  35233. <doc xml:space="preserve">Adds a new attribute with @name to the @list, setting
  35234. its @type and @flags.</doc>
  35235. <return-value transfer-ownership="none">
  35236. <type name="none" c:type="void"/>
  35237. </return-value>
  35238. <parameters>
  35239. <instance-parameter name="list" transfer-ownership="none">
  35240. <doc xml:space="preserve">a #GFileAttributeInfoList.</doc>
  35241. <type name="FileAttributeInfoList"
  35242. c:type="GFileAttributeInfoList*"/>
  35243. </instance-parameter>
  35244. <parameter name="name" transfer-ownership="none">
  35245. <doc xml:space="preserve">the name of the attribute to add.</doc>
  35246. <type name="utf8" c:type="const char*"/>
  35247. </parameter>
  35248. <parameter name="type" transfer-ownership="none">
  35249. <doc xml:space="preserve">the #GFileAttributeType for the attribute.</doc>
  35250. <type name="FileAttributeType" c:type="GFileAttributeType"/>
  35251. </parameter>
  35252. <parameter name="flags" transfer-ownership="none">
  35253. <doc xml:space="preserve">#GFileAttributeInfoFlags for the attribute.</doc>
  35254. <type name="FileAttributeInfoFlags"
  35255. c:type="GFileAttributeInfoFlags"/>
  35256. </parameter>
  35257. </parameters>
  35258. </method>
  35259. <method name="dup" c:identifier="g_file_attribute_info_list_dup">
  35260. <doc xml:space="preserve">Makes a duplicate of a file attribute info list.</doc>
  35261. <return-value transfer-ownership="full">
  35262. <doc xml:space="preserve">a copy of the given @list.</doc>
  35263. <type name="FileAttributeInfoList" c:type="GFileAttributeInfoList*"/>
  35264. </return-value>
  35265. <parameters>
  35266. <instance-parameter name="list" transfer-ownership="none">
  35267. <doc xml:space="preserve">a #GFileAttributeInfoList to duplicate.</doc>
  35268. <type name="FileAttributeInfoList"
  35269. c:type="GFileAttributeInfoList*"/>
  35270. </instance-parameter>
  35271. </parameters>
  35272. </method>
  35273. <method name="lookup" c:identifier="g_file_attribute_info_list_lookup">
  35274. <doc xml:space="preserve">Gets the file attribute with the name @name from @list.</doc>
  35275. <return-value transfer-ownership="none">
  35276. <doc xml:space="preserve">a #GFileAttributeInfo for the @name, or %NULL if an
  35277. attribute isn't found.</doc>
  35278. <type name="FileAttributeInfo" c:type="const GFileAttributeInfo*"/>
  35279. </return-value>
  35280. <parameters>
  35281. <instance-parameter name="list" transfer-ownership="none">
  35282. <doc xml:space="preserve">a #GFileAttributeInfoList.</doc>
  35283. <type name="FileAttributeInfoList"
  35284. c:type="GFileAttributeInfoList*"/>
  35285. </instance-parameter>
  35286. <parameter name="name" transfer-ownership="none">
  35287. <doc xml:space="preserve">the name of the attribute to lookup.</doc>
  35288. <type name="utf8" c:type="const char*"/>
  35289. </parameter>
  35290. </parameters>
  35291. </method>
  35292. <method name="ref" c:identifier="g_file_attribute_info_list_ref">
  35293. <doc xml:space="preserve">References a file attribute info list.</doc>
  35294. <return-value transfer-ownership="full">
  35295. <doc xml:space="preserve">#GFileAttributeInfoList or %NULL on error.</doc>
  35296. <type name="FileAttributeInfoList" c:type="GFileAttributeInfoList*"/>
  35297. </return-value>
  35298. <parameters>
  35299. <instance-parameter name="list" transfer-ownership="none">
  35300. <doc xml:space="preserve">a #GFileAttributeInfoList to reference.</doc>
  35301. <type name="FileAttributeInfoList"
  35302. c:type="GFileAttributeInfoList*"/>
  35303. </instance-parameter>
  35304. </parameters>
  35305. </method>
  35306. <method name="unref" c:identifier="g_file_attribute_info_list_unref">
  35307. <doc xml:space="preserve">Removes a reference from the given @list. If the reference count
  35308. falls to zero, the @list is deleted.</doc>
  35309. <return-value transfer-ownership="none">
  35310. <type name="none" c:type="void"/>
  35311. </return-value>
  35312. <parameters>
  35313. <instance-parameter name="list" transfer-ownership="none">
  35314. <doc xml:space="preserve">The #GFileAttributeInfoList to unreference.</doc>
  35315. <type name="FileAttributeInfoList"
  35316. c:type="GFileAttributeInfoList*"/>
  35317. </instance-parameter>
  35318. </parameters>
  35319. </method>
  35320. </record>
  35321. <record name="FileAttributeMatcher"
  35322. c:type="GFileAttributeMatcher"
  35323. glib:type-name="GFileAttributeMatcher"
  35324. glib:get-type="g_file_attribute_matcher_get_type"
  35325. c:symbol-prefix="file_attribute_matcher">
  35326. <doc xml:space="preserve">Determines if a string matches a file attribute.</doc>
  35327. <constructor name="new" c:identifier="g_file_attribute_matcher_new">
  35328. <doc xml:space="preserve">Creates a new file attribute matcher, which matches attributes
  35329. against a given string. #GFileAttributeMatchers are reference
  35330. counted structures, and are created with a reference count of 1. If
  35331. the number of references falls to 0, the #GFileAttributeMatcher is
  35332. automatically destroyed.
  35333. The @attribute string should be formatted with specific keys separated
  35334. from namespaces with a double colon. Several "namespace::key" strings may be
  35335. concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
  35336. The wildcard "*" may be used to match all keys and namespaces, or
  35337. "namespace::*" will match all keys in a given namespace.
  35338. ## Examples of file attribute matcher strings and results
  35339. - `"*"`: matches all attributes.
  35340. - `"standard::is-hidden"`: matches only the key is-hidden in the
  35341. standard namespace.
  35342. - `"standard::type,unix::*"`: matches the type key in the standard
  35343. namespace and all keys in the unix namespace.</doc>
  35344. <return-value transfer-ownership="full">
  35345. <doc xml:space="preserve">a #GFileAttributeMatcher</doc>
  35346. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35347. </return-value>
  35348. <parameters>
  35349. <parameter name="attributes" transfer-ownership="none">
  35350. <doc xml:space="preserve">an attribute string to match.</doc>
  35351. <type name="utf8" c:type="const char*"/>
  35352. </parameter>
  35353. </parameters>
  35354. </constructor>
  35355. <method name="enumerate_namespace"
  35356. c:identifier="g_file_attribute_matcher_enumerate_namespace">
  35357. <doc xml:space="preserve">Checks if the matcher will match all of the keys in a given namespace.
  35358. This will always return %TRUE if a wildcard character is in use (e.g. if
  35359. matcher was created with "standard::*" and @ns is "standard", or if matcher was created
  35360. using "*" and namespace is anything.)
  35361. TODO: this is awkwardly worded.</doc>
  35362. <return-value transfer-ownership="none">
  35363. <doc xml:space="preserve">%TRUE if the matcher matches all of the entries
  35364. in the given @ns, %FALSE otherwise.</doc>
  35365. <type name="gboolean" c:type="gboolean"/>
  35366. </return-value>
  35367. <parameters>
  35368. <instance-parameter name="matcher" transfer-ownership="none">
  35369. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35370. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35371. </instance-parameter>
  35372. <parameter name="ns" transfer-ownership="none">
  35373. <doc xml:space="preserve">a string containing a file attribute namespace.</doc>
  35374. <type name="utf8" c:type="const char*"/>
  35375. </parameter>
  35376. </parameters>
  35377. </method>
  35378. <method name="enumerate_next"
  35379. c:identifier="g_file_attribute_matcher_enumerate_next">
  35380. <doc xml:space="preserve">Gets the next matched attribute from a #GFileAttributeMatcher.</doc>
  35381. <return-value transfer-ownership="none">
  35382. <doc xml:space="preserve">a string containing the next attribute or %NULL if
  35383. no more attribute exist.</doc>
  35384. <type name="utf8" c:type="const char*"/>
  35385. </return-value>
  35386. <parameters>
  35387. <instance-parameter name="matcher" transfer-ownership="none">
  35388. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35389. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35390. </instance-parameter>
  35391. </parameters>
  35392. </method>
  35393. <method name="matches" c:identifier="g_file_attribute_matcher_matches">
  35394. <doc xml:space="preserve">Checks if an attribute will be matched by an attribute matcher. If
  35395. the matcher was created with the "*" matching string, this function
  35396. will always return %TRUE.</doc>
  35397. <return-value transfer-ownership="none">
  35398. <doc xml:space="preserve">%TRUE if @attribute matches @matcher. %FALSE otherwise.</doc>
  35399. <type name="gboolean" c:type="gboolean"/>
  35400. </return-value>
  35401. <parameters>
  35402. <instance-parameter name="matcher" transfer-ownership="none">
  35403. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35404. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35405. </instance-parameter>
  35406. <parameter name="attribute" transfer-ownership="none">
  35407. <doc xml:space="preserve">a file attribute key.</doc>
  35408. <type name="utf8" c:type="const char*"/>
  35409. </parameter>
  35410. </parameters>
  35411. </method>
  35412. <method name="matches_only"
  35413. c:identifier="g_file_attribute_matcher_matches_only">
  35414. <doc xml:space="preserve">Checks if a attribute matcher only matches a given attribute. Always
  35415. returns %FALSE if "*" was used when creating the matcher.</doc>
  35416. <return-value transfer-ownership="none">
  35417. <doc xml:space="preserve">%TRUE if the matcher only matches @attribute. %FALSE otherwise.</doc>
  35418. <type name="gboolean" c:type="gboolean"/>
  35419. </return-value>
  35420. <parameters>
  35421. <instance-parameter name="matcher" transfer-ownership="none">
  35422. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35423. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35424. </instance-parameter>
  35425. <parameter name="attribute" transfer-ownership="none">
  35426. <doc xml:space="preserve">a file attribute key.</doc>
  35427. <type name="utf8" c:type="const char*"/>
  35428. </parameter>
  35429. </parameters>
  35430. </method>
  35431. <method name="ref" c:identifier="g_file_attribute_matcher_ref">
  35432. <doc xml:space="preserve">References a file attribute matcher.</doc>
  35433. <return-value transfer-ownership="full">
  35434. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35435. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35436. </return-value>
  35437. <parameters>
  35438. <instance-parameter name="matcher" transfer-ownership="none">
  35439. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35440. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35441. </instance-parameter>
  35442. </parameters>
  35443. </method>
  35444. <method name="subtract" c:identifier="g_file_attribute_matcher_subtract">
  35445. <doc xml:space="preserve">Subtracts all attributes of @subtract from @matcher and returns
  35446. a matcher that supports those attributes.
  35447. Note that currently it is not possible to remove a single
  35448. attribute when the @matcher matches the whole namespace - or remove
  35449. a namespace or attribute when the matcher matches everything. This
  35450. is a limitation of the current implementation, but may be fixed
  35451. in the future.</doc>
  35452. <return-value transfer-ownership="full">
  35453. <doc xml:space="preserve">A file attribute matcher matching all attributes of
  35454. @matcher that are not matched by @subtract</doc>
  35455. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35456. </return-value>
  35457. <parameters>
  35458. <instance-parameter name="matcher" transfer-ownership="none">
  35459. <doc xml:space="preserve">Matcher to subtract from</doc>
  35460. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35461. </instance-parameter>
  35462. <parameter name="subtract" transfer-ownership="none">
  35463. <doc xml:space="preserve">The matcher to subtract</doc>
  35464. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35465. </parameter>
  35466. </parameters>
  35467. </method>
  35468. <method name="to_string"
  35469. c:identifier="g_file_attribute_matcher_to_string"
  35470. version="2.32">
  35471. <doc xml:space="preserve">Prints what the matcher is matching against. The format will be
  35472. equal to the format passed to g_file_attribute_matcher_new().
  35473. The output however, might not be identical, as the matcher may
  35474. decide to use a different order or omit needless parts.</doc>
  35475. <return-value transfer-ownership="full">
  35476. <doc xml:space="preserve">a string describing the attributes the matcher matches
  35477. against or %NULL if @matcher was %NULL.</doc>
  35478. <type name="utf8" c:type="char*"/>
  35479. </return-value>
  35480. <parameters>
  35481. <instance-parameter name="matcher"
  35482. transfer-ownership="none"
  35483. nullable="1"
  35484. allow-none="1">
  35485. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35486. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35487. </instance-parameter>
  35488. </parameters>
  35489. </method>
  35490. <method name="unref" c:identifier="g_file_attribute_matcher_unref">
  35491. <doc xml:space="preserve">Unreferences @matcher. If the reference count falls below 1,
  35492. the @matcher is automatically freed.</doc>
  35493. <return-value transfer-ownership="none">
  35494. <type name="none" c:type="void"/>
  35495. </return-value>
  35496. <parameters>
  35497. <instance-parameter name="matcher" transfer-ownership="none">
  35498. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  35499. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  35500. </instance-parameter>
  35501. </parameters>
  35502. </method>
  35503. </record>
  35504. <enumeration name="FileAttributeStatus"
  35505. glib:type-name="GFileAttributeStatus"
  35506. glib:get-type="g_file_attribute_status_get_type"
  35507. c:type="GFileAttributeStatus">
  35508. <doc xml:space="preserve">Used by g_file_set_attributes_from_info() when setting file attributes.</doc>
  35509. <member name="unset"
  35510. value="0"
  35511. c:identifier="G_FILE_ATTRIBUTE_STATUS_UNSET"
  35512. glib:nick="unset">
  35513. <doc xml:space="preserve">Attribute value is unset (empty).</doc>
  35514. </member>
  35515. <member name="set"
  35516. value="1"
  35517. c:identifier="G_FILE_ATTRIBUTE_STATUS_SET"
  35518. glib:nick="set">
  35519. <doc xml:space="preserve">Attribute value is set.</doc>
  35520. </member>
  35521. <member name="error_setting"
  35522. value="2"
  35523. c:identifier="G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING"
  35524. glib:nick="error-setting">
  35525. <doc xml:space="preserve">Indicates an error in setting the value.</doc>
  35526. </member>
  35527. </enumeration>
  35528. <enumeration name="FileAttributeType"
  35529. glib:type-name="GFileAttributeType"
  35530. glib:get-type="g_file_attribute_type_get_type"
  35531. c:type="GFileAttributeType">
  35532. <doc xml:space="preserve">The data types for file attributes.</doc>
  35533. <member name="invalid"
  35534. value="0"
  35535. c:identifier="G_FILE_ATTRIBUTE_TYPE_INVALID"
  35536. glib:nick="invalid">
  35537. <doc xml:space="preserve">indicates an invalid or uninitalized type.</doc>
  35538. </member>
  35539. <member name="string"
  35540. value="1"
  35541. c:identifier="G_FILE_ATTRIBUTE_TYPE_STRING"
  35542. glib:nick="string">
  35543. <doc xml:space="preserve">a null terminated UTF8 string.</doc>
  35544. </member>
  35545. <member name="byte_string"
  35546. value="2"
  35547. c:identifier="G_FILE_ATTRIBUTE_TYPE_BYTE_STRING"
  35548. glib:nick="byte-string">
  35549. <doc xml:space="preserve">a zero terminated string of non-zero bytes.</doc>
  35550. </member>
  35551. <member name="boolean"
  35552. value="3"
  35553. c:identifier="G_FILE_ATTRIBUTE_TYPE_BOOLEAN"
  35554. glib:nick="boolean">
  35555. <doc xml:space="preserve">a boolean value.</doc>
  35556. </member>
  35557. <member name="uint32"
  35558. value="4"
  35559. c:identifier="G_FILE_ATTRIBUTE_TYPE_UINT32"
  35560. glib:nick="uint32">
  35561. <doc xml:space="preserve">an unsigned 4-byte/32-bit integer.</doc>
  35562. </member>
  35563. <member name="int32"
  35564. value="5"
  35565. c:identifier="G_FILE_ATTRIBUTE_TYPE_INT32"
  35566. glib:nick="int32">
  35567. <doc xml:space="preserve">a signed 4-byte/32-bit integer.</doc>
  35568. </member>
  35569. <member name="uint64"
  35570. value="6"
  35571. c:identifier="G_FILE_ATTRIBUTE_TYPE_UINT64"
  35572. glib:nick="uint64">
  35573. <doc xml:space="preserve">an unsigned 8-byte/64-bit integer.</doc>
  35574. </member>
  35575. <member name="int64"
  35576. value="7"
  35577. c:identifier="G_FILE_ATTRIBUTE_TYPE_INT64"
  35578. glib:nick="int64">
  35579. <doc xml:space="preserve">a signed 8-byte/64-bit integer.</doc>
  35580. </member>
  35581. <member name="object"
  35582. value="8"
  35583. c:identifier="G_FILE_ATTRIBUTE_TYPE_OBJECT"
  35584. glib:nick="object">
  35585. <doc xml:space="preserve">a #GObject.</doc>
  35586. </member>
  35587. <member name="stringv"
  35588. value="9"
  35589. c:identifier="G_FILE_ATTRIBUTE_TYPE_STRINGV"
  35590. glib:nick="stringv">
  35591. <doc xml:space="preserve">a %NULL terminated char **. Since 2.22</doc>
  35592. </member>
  35593. </enumeration>
  35594. <bitfield name="FileCopyFlags"
  35595. glib:type-name="GFileCopyFlags"
  35596. glib:get-type="g_file_copy_flags_get_type"
  35597. c:type="GFileCopyFlags">
  35598. <doc xml:space="preserve">Flags used when copying or moving files.</doc>
  35599. <member name="none"
  35600. value="0"
  35601. c:identifier="G_FILE_COPY_NONE"
  35602. glib:nick="none">
  35603. <doc xml:space="preserve">No flags set.</doc>
  35604. </member>
  35605. <member name="overwrite"
  35606. value="1"
  35607. c:identifier="G_FILE_COPY_OVERWRITE"
  35608. glib:nick="overwrite">
  35609. <doc xml:space="preserve">Overwrite any existing files</doc>
  35610. </member>
  35611. <member name="backup"
  35612. value="2"
  35613. c:identifier="G_FILE_COPY_BACKUP"
  35614. glib:nick="backup">
  35615. <doc xml:space="preserve">Make a backup of any existing files.</doc>
  35616. </member>
  35617. <member name="nofollow_symlinks"
  35618. value="4"
  35619. c:identifier="G_FILE_COPY_NOFOLLOW_SYMLINKS"
  35620. glib:nick="nofollow-symlinks">
  35621. <doc xml:space="preserve">Don't follow symlinks.</doc>
  35622. </member>
  35623. <member name="all_metadata"
  35624. value="8"
  35625. c:identifier="G_FILE_COPY_ALL_METADATA"
  35626. glib:nick="all-metadata">
  35627. <doc xml:space="preserve">Copy all file metadata instead of just default set used for copy (see #GFileInfo).</doc>
  35628. </member>
  35629. <member name="no_fallback_for_move"
  35630. value="16"
  35631. c:identifier="G_FILE_COPY_NO_FALLBACK_FOR_MOVE"
  35632. glib:nick="no-fallback-for-move">
  35633. <doc xml:space="preserve">Don't use copy and delete fallback if native move not supported.</doc>
  35634. </member>
  35635. <member name="target_default_perms"
  35636. value="32"
  35637. c:identifier="G_FILE_COPY_TARGET_DEFAULT_PERMS"
  35638. glib:nick="target-default-perms">
  35639. <doc xml:space="preserve">Leaves target file with default perms, instead of setting the source file perms.</doc>
  35640. </member>
  35641. </bitfield>
  35642. <bitfield name="FileCreateFlags"
  35643. glib:type-name="GFileCreateFlags"
  35644. glib:get-type="g_file_create_flags_get_type"
  35645. c:type="GFileCreateFlags">
  35646. <doc xml:space="preserve">Flags used when an operation may create a file.</doc>
  35647. <member name="none"
  35648. value="0"
  35649. c:identifier="G_FILE_CREATE_NONE"
  35650. glib:nick="none">
  35651. <doc xml:space="preserve">No flags set.</doc>
  35652. </member>
  35653. <member name="private"
  35654. value="1"
  35655. c:identifier="G_FILE_CREATE_PRIVATE"
  35656. glib:nick="private">
  35657. <doc xml:space="preserve">Create a file that can only be
  35658. accessed by the current user.</doc>
  35659. </member>
  35660. <member name="replace_destination"
  35661. value="2"
  35662. c:identifier="G_FILE_CREATE_REPLACE_DESTINATION"
  35663. glib:nick="replace-destination">
  35664. <doc xml:space="preserve">Replace the destination
  35665. as if it didn't exist before. Don't try to keep any old
  35666. permissions, replace instead of following links. This
  35667. is generally useful if you're doing a "copy over"
  35668. rather than a "save new version of" replace operation.
  35669. You can think of it as "unlink destination" before
  35670. writing to it, although the implementation may not
  35671. be exactly like that. Since 2.20</doc>
  35672. </member>
  35673. </bitfield>
  35674. <interface name="FileDescriptorBased"
  35675. c:symbol-prefix="file_descriptor_based"
  35676. c:type="GFileDescriptorBased"
  35677. glib:type-name="GFileDescriptorBased"
  35678. glib:get-type="g_file_descriptor_based_get_type"
  35679. glib:type-struct="FileDescriptorBasedIface">
  35680. <doc xml:space="preserve">#GFileDescriptorBased is implemented by streams (implementations of
  35681. #GInputStream or #GOutputStream) that are based on file descriptors.
  35682. Note that `&lt;gio/gfiledescriptorbased.h&gt;` belongs to the UNIX-specific
  35683. GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
  35684. file when using it.</doc>
  35685. <virtual-method name="get_fd" invoker="get_fd" version="2.24">
  35686. <doc xml:space="preserve">Gets the underlying file descriptor.</doc>
  35687. <return-value transfer-ownership="none">
  35688. <doc xml:space="preserve">The file descriptor</doc>
  35689. <type name="gint" c:type="int"/>
  35690. </return-value>
  35691. <parameters>
  35692. <instance-parameter name="fd_based" transfer-ownership="none">
  35693. <doc xml:space="preserve">a #GFileDescriptorBased.</doc>
  35694. <type name="FileDescriptorBased" c:type="GFileDescriptorBased*"/>
  35695. </instance-parameter>
  35696. </parameters>
  35697. </virtual-method>
  35698. <method name="get_fd"
  35699. c:identifier="g_file_descriptor_based_get_fd"
  35700. version="2.24">
  35701. <doc xml:space="preserve">Gets the underlying file descriptor.</doc>
  35702. <return-value transfer-ownership="none">
  35703. <doc xml:space="preserve">The file descriptor</doc>
  35704. <type name="gint" c:type="int"/>
  35705. </return-value>
  35706. <parameters>
  35707. <instance-parameter name="fd_based" transfer-ownership="none">
  35708. <doc xml:space="preserve">a #GFileDescriptorBased.</doc>
  35709. <type name="FileDescriptorBased" c:type="GFileDescriptorBased*"/>
  35710. </instance-parameter>
  35711. </parameters>
  35712. </method>
  35713. </interface>
  35714. <record name="FileDescriptorBasedIface"
  35715. c:type="GFileDescriptorBasedIface"
  35716. glib:is-gtype-struct-for="FileDescriptorBased">
  35717. <doc xml:space="preserve">An interface for file descriptor based io objects.</doc>
  35718. <field name="g_iface">
  35719. <doc xml:space="preserve">The parent interface.</doc>
  35720. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  35721. </field>
  35722. <field name="get_fd">
  35723. <callback name="get_fd">
  35724. <return-value transfer-ownership="none">
  35725. <doc xml:space="preserve">The file descriptor</doc>
  35726. <type name="gint" c:type="int"/>
  35727. </return-value>
  35728. <parameters>
  35729. <parameter name="fd_based" transfer-ownership="none">
  35730. <doc xml:space="preserve">a #GFileDescriptorBased.</doc>
  35731. <type name="FileDescriptorBased" c:type="GFileDescriptorBased*"/>
  35732. </parameter>
  35733. </parameters>
  35734. </callback>
  35735. </field>
  35736. </record>
  35737. <class name="FileEnumerator"
  35738. c:symbol-prefix="file_enumerator"
  35739. c:type="GFileEnumerator"
  35740. parent="GObject.Object"
  35741. glib:type-name="GFileEnumerator"
  35742. glib:get-type="g_file_enumerator_get_type"
  35743. glib:type-struct="FileEnumeratorClass">
  35744. <doc xml:space="preserve">#GFileEnumerator allows you to operate on a set of #GFiles,
  35745. returning a #GFileInfo structure for each file enumerated (e.g.
  35746. g_file_enumerate_children() will return a #GFileEnumerator for each
  35747. of the children within a directory).
  35748. To get the next file's information from a #GFileEnumerator, use
  35749. g_file_enumerator_next_file() or its asynchronous version,
  35750. g_file_enumerator_next_files_async(). Note that the asynchronous
  35751. version will return a list of #GFileInfos, whereas the
  35752. synchronous will only return the next file in the enumerator.
  35753. The ordering of returned files is unspecified for non-Unix
  35754. platforms; for more information, see g_dir_read_name(). On Unix,
  35755. when operating on local files, returned files will be sorted by
  35756. inode number. Effectively you can assume that the ordering of
  35757. returned files will be stable between successive calls (and
  35758. applications) assuming the directory is unchanged.
  35759. If your application needs a specific ordering, such as by name or
  35760. modification time, you will have to implement that in your
  35761. application code.
  35762. To close a #GFileEnumerator, use g_file_enumerator_close(), or
  35763. its asynchronous version, g_file_enumerator_close_async(). Once
  35764. a #GFileEnumerator is closed, no further actions may be performed
  35765. on it, and it should be freed with g_object_unref().</doc>
  35766. <virtual-method name="close_async" invoker="close_async">
  35767. <doc xml:space="preserve">Asynchronously closes the file enumerator.
  35768. If @cancellable is not %NULL, then the operation can be cancelled by
  35769. triggering the cancellable object from another thread. If the operation
  35770. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
  35771. g_file_enumerator_close_finish().</doc>
  35772. <return-value transfer-ownership="none">
  35773. <type name="none" c:type="void"/>
  35774. </return-value>
  35775. <parameters>
  35776. <instance-parameter name="enumerator" transfer-ownership="none">
  35777. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  35778. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35779. </instance-parameter>
  35780. <parameter name="io_priority" transfer-ownership="none">
  35781. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  35782. <type name="gint" c:type="int"/>
  35783. </parameter>
  35784. <parameter name="cancellable"
  35785. transfer-ownership="none"
  35786. nullable="1"
  35787. allow-none="1">
  35788. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  35789. <type name="Cancellable" c:type="GCancellable*"/>
  35790. </parameter>
  35791. <parameter name="callback"
  35792. transfer-ownership="none"
  35793. nullable="1"
  35794. allow-none="1"
  35795. scope="async"
  35796. closure="3">
  35797. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  35798. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  35799. </parameter>
  35800. <parameter name="user_data"
  35801. transfer-ownership="none"
  35802. nullable="1"
  35803. allow-none="1"
  35804. closure="3">
  35805. <doc xml:space="preserve">the data to pass to callback function</doc>
  35806. <type name="gpointer" c:type="gpointer"/>
  35807. </parameter>
  35808. </parameters>
  35809. </virtual-method>
  35810. <virtual-method name="close_finish" invoker="close_finish" throws="1">
  35811. <doc xml:space="preserve">Finishes closing a file enumerator, started from g_file_enumerator_close_async().
  35812. If the file enumerator was already closed when g_file_enumerator_close_async()
  35813. was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
  35814. return %FALSE. If the file enumerator had pending operation when the close
  35815. operation was started, then this function will report %G_IO_ERROR_PENDING, and
  35816. return %FALSE. If @cancellable was not %NULL, then the operation may have been
  35817. cancelled by triggering the cancellable object from another thread. If the operation
  35818. was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
  35819. returned.</doc>
  35820. <return-value transfer-ownership="none">
  35821. <doc xml:space="preserve">%TRUE if the close operation has finished successfully.</doc>
  35822. <type name="gboolean" c:type="gboolean"/>
  35823. </return-value>
  35824. <parameters>
  35825. <instance-parameter name="enumerator" transfer-ownership="none">
  35826. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  35827. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35828. </instance-parameter>
  35829. <parameter name="result" transfer-ownership="none">
  35830. <doc xml:space="preserve">a #GAsyncResult.</doc>
  35831. <type name="AsyncResult" c:type="GAsyncResult*"/>
  35832. </parameter>
  35833. </parameters>
  35834. </virtual-method>
  35835. <virtual-method name="close_fn" throws="1">
  35836. <return-value transfer-ownership="none">
  35837. <type name="gboolean" c:type="gboolean"/>
  35838. </return-value>
  35839. <parameters>
  35840. <instance-parameter name="enumerator" transfer-ownership="none">
  35841. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35842. </instance-parameter>
  35843. <parameter name="cancellable"
  35844. transfer-ownership="none"
  35845. nullable="1"
  35846. allow-none="1">
  35847. <type name="Cancellable" c:type="GCancellable*"/>
  35848. </parameter>
  35849. </parameters>
  35850. </virtual-method>
  35851. <virtual-method name="next_file" invoker="next_file" throws="1">
  35852. <doc xml:space="preserve">Returns information for the next file in the enumerated object.
  35853. Will block until the information is available. The #GFileInfo
  35854. returned from this function will contain attributes that match the
  35855. attribute string that was passed when the #GFileEnumerator was created.
  35856. See the documentation of #GFileEnumerator for information about the
  35857. order of returned files.
  35858. On error, returns %NULL and sets @error to the error. If the
  35859. enumerator is at the end, %NULL will be returned and @error will
  35860. be unset.</doc>
  35861. <return-value transfer-ownership="full" nullable="1">
  35862. <doc xml:space="preserve">A #GFileInfo or %NULL on error
  35863. or end of enumerator. Free the returned object with
  35864. g_object_unref() when no longer needed.</doc>
  35865. <type name="FileInfo" c:type="GFileInfo*"/>
  35866. </return-value>
  35867. <parameters>
  35868. <instance-parameter name="enumerator" transfer-ownership="none">
  35869. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  35870. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35871. </instance-parameter>
  35872. <parameter name="cancellable"
  35873. transfer-ownership="none"
  35874. nullable="1"
  35875. allow-none="1">
  35876. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  35877. <type name="Cancellable" c:type="GCancellable*"/>
  35878. </parameter>
  35879. </parameters>
  35880. </virtual-method>
  35881. <virtual-method name="next_files_async" invoker="next_files_async">
  35882. <doc xml:space="preserve">Request information for a number of files from the enumerator asynchronously.
  35883. When all i/o for the operation is finished the @callback will be called with
  35884. the requested information.
  35885. See the documentation of #GFileEnumerator for information about the
  35886. order of returned files.
  35887. The callback can be called with less than @num_files files in case of error
  35888. or at the end of the enumerator. In case of a partial error the callback will
  35889. be called with any succeeding items and no error, and on the next request the
  35890. error will be reported. If a request is cancelled the callback will be called
  35891. with %G_IO_ERROR_CANCELLED.
  35892. During an async request no other sync and async calls are allowed, and will
  35893. result in %G_IO_ERROR_PENDING errors.
  35894. Any outstanding i/o request with higher priority (lower numerical value) will
  35895. be executed before an outstanding request with lower priority. Default
  35896. priority is %G_PRIORITY_DEFAULT.</doc>
  35897. <return-value transfer-ownership="none">
  35898. <type name="none" c:type="void"/>
  35899. </return-value>
  35900. <parameters>
  35901. <instance-parameter name="enumerator" transfer-ownership="none">
  35902. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  35903. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35904. </instance-parameter>
  35905. <parameter name="num_files" transfer-ownership="none">
  35906. <doc xml:space="preserve">the number of file info objects to request</doc>
  35907. <type name="gint" c:type="int"/>
  35908. </parameter>
  35909. <parameter name="io_priority" transfer-ownership="none">
  35910. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  35911. <type name="gint" c:type="int"/>
  35912. </parameter>
  35913. <parameter name="cancellable"
  35914. transfer-ownership="none"
  35915. nullable="1"
  35916. allow-none="1">
  35917. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  35918. <type name="Cancellable" c:type="GCancellable*"/>
  35919. </parameter>
  35920. <parameter name="callback"
  35921. transfer-ownership="none"
  35922. nullable="1"
  35923. allow-none="1"
  35924. scope="async"
  35925. closure="4">
  35926. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  35927. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  35928. </parameter>
  35929. <parameter name="user_data"
  35930. transfer-ownership="none"
  35931. nullable="1"
  35932. allow-none="1"
  35933. closure="4">
  35934. <doc xml:space="preserve">the data to pass to callback function</doc>
  35935. <type name="gpointer" c:type="gpointer"/>
  35936. </parameter>
  35937. </parameters>
  35938. </virtual-method>
  35939. <virtual-method name="next_files_finish"
  35940. invoker="next_files_finish"
  35941. throws="1">
  35942. <doc xml:space="preserve">Finishes the asynchronous operation started with g_file_enumerator_next_files_async().</doc>
  35943. <return-value transfer-ownership="full">
  35944. <doc xml:space="preserve">a #GList of #GFileInfos. You must free the list with
  35945. g_list_free() and unref the infos with g_object_unref() when you're
  35946. done with them.</doc>
  35947. <type name="GLib.List" c:type="GList*">
  35948. <type name="FileInfo"/>
  35949. </type>
  35950. </return-value>
  35951. <parameters>
  35952. <instance-parameter name="enumerator" transfer-ownership="none">
  35953. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  35954. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35955. </instance-parameter>
  35956. <parameter name="result" transfer-ownership="none">
  35957. <doc xml:space="preserve">a #GAsyncResult.</doc>
  35958. <type name="AsyncResult" c:type="GAsyncResult*"/>
  35959. </parameter>
  35960. </parameters>
  35961. </virtual-method>
  35962. <method name="close" c:identifier="g_file_enumerator_close" throws="1">
  35963. <doc xml:space="preserve">Releases all resources used by this enumerator, making the
  35964. enumerator return %G_IO_ERROR_CLOSED on all calls.
  35965. This will be automatically called when the last reference
  35966. is dropped, but you might want to call this function to make
  35967. sure resources are released as early as possible.</doc>
  35968. <return-value transfer-ownership="none">
  35969. <doc xml:space="preserve">#TRUE on success or #FALSE on error.</doc>
  35970. <type name="gboolean" c:type="gboolean"/>
  35971. </return-value>
  35972. <parameters>
  35973. <instance-parameter name="enumerator" transfer-ownership="none">
  35974. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  35975. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35976. </instance-parameter>
  35977. <parameter name="cancellable"
  35978. transfer-ownership="none"
  35979. nullable="1"
  35980. allow-none="1">
  35981. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  35982. <type name="Cancellable" c:type="GCancellable*"/>
  35983. </parameter>
  35984. </parameters>
  35985. </method>
  35986. <method name="close_async" c:identifier="g_file_enumerator_close_async">
  35987. <doc xml:space="preserve">Asynchronously closes the file enumerator.
  35988. If @cancellable is not %NULL, then the operation can be cancelled by
  35989. triggering the cancellable object from another thread. If the operation
  35990. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
  35991. g_file_enumerator_close_finish().</doc>
  35992. <return-value transfer-ownership="none">
  35993. <type name="none" c:type="void"/>
  35994. </return-value>
  35995. <parameters>
  35996. <instance-parameter name="enumerator" transfer-ownership="none">
  35997. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  35998. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  35999. </instance-parameter>
  36000. <parameter name="io_priority" transfer-ownership="none">
  36001. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  36002. <type name="gint" c:type="int"/>
  36003. </parameter>
  36004. <parameter name="cancellable"
  36005. transfer-ownership="none"
  36006. nullable="1"
  36007. allow-none="1">
  36008. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36009. <type name="Cancellable" c:type="GCancellable*"/>
  36010. </parameter>
  36011. <parameter name="callback"
  36012. transfer-ownership="none"
  36013. nullable="1"
  36014. allow-none="1"
  36015. scope="async"
  36016. closure="3">
  36017. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  36018. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  36019. </parameter>
  36020. <parameter name="user_data"
  36021. transfer-ownership="none"
  36022. nullable="1"
  36023. allow-none="1">
  36024. <doc xml:space="preserve">the data to pass to callback function</doc>
  36025. <type name="gpointer" c:type="gpointer"/>
  36026. </parameter>
  36027. </parameters>
  36028. </method>
  36029. <method name="close_finish"
  36030. c:identifier="g_file_enumerator_close_finish"
  36031. throws="1">
  36032. <doc xml:space="preserve">Finishes closing a file enumerator, started from g_file_enumerator_close_async().
  36033. If the file enumerator was already closed when g_file_enumerator_close_async()
  36034. was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
  36035. return %FALSE. If the file enumerator had pending operation when the close
  36036. operation was started, then this function will report %G_IO_ERROR_PENDING, and
  36037. return %FALSE. If @cancellable was not %NULL, then the operation may have been
  36038. cancelled by triggering the cancellable object from another thread. If the operation
  36039. was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
  36040. returned.</doc>
  36041. <return-value transfer-ownership="none">
  36042. <doc xml:space="preserve">%TRUE if the close operation has finished successfully.</doc>
  36043. <type name="gboolean" c:type="gboolean"/>
  36044. </return-value>
  36045. <parameters>
  36046. <instance-parameter name="enumerator" transfer-ownership="none">
  36047. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36048. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36049. </instance-parameter>
  36050. <parameter name="result" transfer-ownership="none">
  36051. <doc xml:space="preserve">a #GAsyncResult.</doc>
  36052. <type name="AsyncResult" c:type="GAsyncResult*"/>
  36053. </parameter>
  36054. </parameters>
  36055. </method>
  36056. <method name="get_child"
  36057. c:identifier="g_file_enumerator_get_child"
  36058. version="2.36">
  36059. <doc xml:space="preserve">Return a new #GFile which refers to the file named by @info in the source
  36060. directory of @enumerator. This function is primarily intended to be used
  36061. inside loops with g_file_enumerator_next_file().
  36062. This is a convenience method that's equivalent to:
  36063. |[&lt;!-- language="C" --&gt;
  36064. gchar *name = g_file_info_get_name (info);
  36065. GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr),
  36066. name);
  36067. ]|</doc>
  36068. <return-value transfer-ownership="full">
  36069. <doc xml:space="preserve">a #GFile for the #GFileInfo passed it.</doc>
  36070. <type name="File" c:type="GFile*"/>
  36071. </return-value>
  36072. <parameters>
  36073. <instance-parameter name="enumerator" transfer-ownership="none">
  36074. <doc xml:space="preserve">a #GFileEnumerator</doc>
  36075. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36076. </instance-parameter>
  36077. <parameter name="info" transfer-ownership="none">
  36078. <doc xml:space="preserve">a #GFileInfo gotten from g_file_enumerator_next_file()
  36079. or the async equivalents.</doc>
  36080. <type name="FileInfo" c:type="GFileInfo*"/>
  36081. </parameter>
  36082. </parameters>
  36083. </method>
  36084. <method name="get_container"
  36085. c:identifier="g_file_enumerator_get_container"
  36086. version="2.18">
  36087. <doc xml:space="preserve">Get the #GFile container which is being enumerated.</doc>
  36088. <return-value transfer-ownership="none">
  36089. <doc xml:space="preserve">the #GFile which is being enumerated.</doc>
  36090. <type name="File" c:type="GFile*"/>
  36091. </return-value>
  36092. <parameters>
  36093. <instance-parameter name="enumerator" transfer-ownership="none">
  36094. <doc xml:space="preserve">a #GFileEnumerator</doc>
  36095. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36096. </instance-parameter>
  36097. </parameters>
  36098. </method>
  36099. <method name="has_pending" c:identifier="g_file_enumerator_has_pending">
  36100. <doc xml:space="preserve">Checks if the file enumerator has pending operations.</doc>
  36101. <return-value transfer-ownership="none">
  36102. <doc xml:space="preserve">%TRUE if the @enumerator has pending operations.</doc>
  36103. <type name="gboolean" c:type="gboolean"/>
  36104. </return-value>
  36105. <parameters>
  36106. <instance-parameter name="enumerator" transfer-ownership="none">
  36107. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36108. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36109. </instance-parameter>
  36110. </parameters>
  36111. </method>
  36112. <method name="is_closed" c:identifier="g_file_enumerator_is_closed">
  36113. <doc xml:space="preserve">Checks if the file enumerator has been closed.</doc>
  36114. <return-value transfer-ownership="none">
  36115. <doc xml:space="preserve">%TRUE if the @enumerator is closed.</doc>
  36116. <type name="gboolean" c:type="gboolean"/>
  36117. </return-value>
  36118. <parameters>
  36119. <instance-parameter name="enumerator" transfer-ownership="none">
  36120. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36121. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36122. </instance-parameter>
  36123. </parameters>
  36124. </method>
  36125. <method name="iterate"
  36126. c:identifier="g_file_enumerator_iterate"
  36127. version="2.44"
  36128. throws="1">
  36129. <doc xml:space="preserve">This is a version of g_file_enumerator_next_file() that's easier to
  36130. use correctly from C programs. With g_file_enumerator_next_file(),
  36131. the gboolean return value signifies "end of iteration or error", which
  36132. requires allocation of a temporary #GError.
  36133. In contrast, with this function, a %FALSE return from
  36134. gs_file_enumerator_iterate() *always* means
  36135. "error". End of iteration is signaled by @out_info or @out_child being %NULL.
  36136. Another crucial difference is that the references for @out_info and
  36137. @out_child are owned by @direnum (they are cached as hidden
  36138. properties). You must not unref them in your own code. This makes
  36139. memory management significantly easier for C code in combination
  36140. with loops.
  36141. Finally, this function optionally allows retrieving a #GFile as
  36142. well.
  36143. You must specify at least one of @out_info or @out_child.
  36144. The code pattern for correctly using g_file_enumerator_iterate() from C
  36145. is:
  36146. |[
  36147. direnum = g_file_enumerate_children (file, ...);
  36148. while (TRUE)
  36149. {
  36150. GFileInfo *info;
  36151. if (!g_file_enumerator_iterate (direnum, &amp;info, NULL, cancellable, error))
  36152. goto out;
  36153. if (!info)
  36154. break;
  36155. ... do stuff with "info"; do not unref it! ...
  36156. }
  36157. out:
  36158. g_object_unref (direnum); // Note: frees the last @info
  36159. ]|</doc>
  36160. <return-value transfer-ownership="none">
  36161. <type name="gboolean" c:type="gboolean"/>
  36162. </return-value>
  36163. <parameters>
  36164. <instance-parameter name="direnum" transfer-ownership="none">
  36165. <doc xml:space="preserve">an open #GFileEnumerator</doc>
  36166. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36167. </instance-parameter>
  36168. <parameter name="out_info"
  36169. direction="out"
  36170. caller-allocates="0"
  36171. transfer-ownership="none"
  36172. optional="1"
  36173. allow-none="1">
  36174. <doc xml:space="preserve">Output location for the next #GFileInfo, or %NULL</doc>
  36175. <type name="FileInfo" c:type="GFileInfo**"/>
  36176. </parameter>
  36177. <parameter name="out_child"
  36178. direction="out"
  36179. caller-allocates="0"
  36180. transfer-ownership="none"
  36181. optional="1"
  36182. allow-none="1">
  36183. <doc xml:space="preserve">Output location for the next #GFile, or %NULL</doc>
  36184. <type name="File" c:type="GFile**"/>
  36185. </parameter>
  36186. <parameter name="cancellable"
  36187. transfer-ownership="none"
  36188. nullable="1"
  36189. allow-none="1">
  36190. <doc xml:space="preserve">a #GCancellable</doc>
  36191. <type name="Cancellable" c:type="GCancellable*"/>
  36192. </parameter>
  36193. </parameters>
  36194. </method>
  36195. <method name="next_file"
  36196. c:identifier="g_file_enumerator_next_file"
  36197. throws="1">
  36198. <doc xml:space="preserve">Returns information for the next file in the enumerated object.
  36199. Will block until the information is available. The #GFileInfo
  36200. returned from this function will contain attributes that match the
  36201. attribute string that was passed when the #GFileEnumerator was created.
  36202. See the documentation of #GFileEnumerator for information about the
  36203. order of returned files.
  36204. On error, returns %NULL and sets @error to the error. If the
  36205. enumerator is at the end, %NULL will be returned and @error will
  36206. be unset.</doc>
  36207. <return-value transfer-ownership="full" nullable="1">
  36208. <doc xml:space="preserve">A #GFileInfo or %NULL on error
  36209. or end of enumerator. Free the returned object with
  36210. g_object_unref() when no longer needed.</doc>
  36211. <type name="FileInfo" c:type="GFileInfo*"/>
  36212. </return-value>
  36213. <parameters>
  36214. <instance-parameter name="enumerator" transfer-ownership="none">
  36215. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36216. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36217. </instance-parameter>
  36218. <parameter name="cancellable"
  36219. transfer-ownership="none"
  36220. nullable="1"
  36221. allow-none="1">
  36222. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36223. <type name="Cancellable" c:type="GCancellable*"/>
  36224. </parameter>
  36225. </parameters>
  36226. </method>
  36227. <method name="next_files_async"
  36228. c:identifier="g_file_enumerator_next_files_async">
  36229. <doc xml:space="preserve">Request information for a number of files from the enumerator asynchronously.
  36230. When all i/o for the operation is finished the @callback will be called with
  36231. the requested information.
  36232. See the documentation of #GFileEnumerator for information about the
  36233. order of returned files.
  36234. The callback can be called with less than @num_files files in case of error
  36235. or at the end of the enumerator. In case of a partial error the callback will
  36236. be called with any succeeding items and no error, and on the next request the
  36237. error will be reported. If a request is cancelled the callback will be called
  36238. with %G_IO_ERROR_CANCELLED.
  36239. During an async request no other sync and async calls are allowed, and will
  36240. result in %G_IO_ERROR_PENDING errors.
  36241. Any outstanding i/o request with higher priority (lower numerical value) will
  36242. be executed before an outstanding request with lower priority. Default
  36243. priority is %G_PRIORITY_DEFAULT.</doc>
  36244. <return-value transfer-ownership="none">
  36245. <type name="none" c:type="void"/>
  36246. </return-value>
  36247. <parameters>
  36248. <instance-parameter name="enumerator" transfer-ownership="none">
  36249. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36250. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36251. </instance-parameter>
  36252. <parameter name="num_files" transfer-ownership="none">
  36253. <doc xml:space="preserve">the number of file info objects to request</doc>
  36254. <type name="gint" c:type="int"/>
  36255. </parameter>
  36256. <parameter name="io_priority" transfer-ownership="none">
  36257. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  36258. <type name="gint" c:type="int"/>
  36259. </parameter>
  36260. <parameter name="cancellable"
  36261. transfer-ownership="none"
  36262. nullable="1"
  36263. allow-none="1">
  36264. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36265. <type name="Cancellable" c:type="GCancellable*"/>
  36266. </parameter>
  36267. <parameter name="callback"
  36268. transfer-ownership="none"
  36269. nullable="1"
  36270. allow-none="1"
  36271. scope="async"
  36272. closure="4">
  36273. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  36274. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  36275. </parameter>
  36276. <parameter name="user_data"
  36277. transfer-ownership="none"
  36278. nullable="1"
  36279. allow-none="1">
  36280. <doc xml:space="preserve">the data to pass to callback function</doc>
  36281. <type name="gpointer" c:type="gpointer"/>
  36282. </parameter>
  36283. </parameters>
  36284. </method>
  36285. <method name="next_files_finish"
  36286. c:identifier="g_file_enumerator_next_files_finish"
  36287. throws="1">
  36288. <doc xml:space="preserve">Finishes the asynchronous operation started with g_file_enumerator_next_files_async().</doc>
  36289. <return-value transfer-ownership="full">
  36290. <doc xml:space="preserve">a #GList of #GFileInfos. You must free the list with
  36291. g_list_free() and unref the infos with g_object_unref() when you're
  36292. done with them.</doc>
  36293. <type name="GLib.List" c:type="GList*">
  36294. <type name="FileInfo"/>
  36295. </type>
  36296. </return-value>
  36297. <parameters>
  36298. <instance-parameter name="enumerator" transfer-ownership="none">
  36299. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36300. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36301. </instance-parameter>
  36302. <parameter name="result" transfer-ownership="none">
  36303. <doc xml:space="preserve">a #GAsyncResult.</doc>
  36304. <type name="AsyncResult" c:type="GAsyncResult*"/>
  36305. </parameter>
  36306. </parameters>
  36307. </method>
  36308. <method name="set_pending" c:identifier="g_file_enumerator_set_pending">
  36309. <doc xml:space="preserve">Sets the file enumerator as having pending operations.</doc>
  36310. <return-value transfer-ownership="none">
  36311. <type name="none" c:type="void"/>
  36312. </return-value>
  36313. <parameters>
  36314. <instance-parameter name="enumerator" transfer-ownership="none">
  36315. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36316. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36317. </instance-parameter>
  36318. <parameter name="pending" transfer-ownership="none">
  36319. <doc xml:space="preserve">a boolean value.</doc>
  36320. <type name="gboolean" c:type="gboolean"/>
  36321. </parameter>
  36322. </parameters>
  36323. </method>
  36324. <property name="container"
  36325. readable="0"
  36326. writable="1"
  36327. construct-only="1"
  36328. transfer-ownership="none">
  36329. <type name="File"/>
  36330. </property>
  36331. <field name="parent_instance">
  36332. <type name="GObject.Object" c:type="GObject"/>
  36333. </field>
  36334. <field name="priv" readable="0" private="1">
  36335. <type name="FileEnumeratorPrivate" c:type="GFileEnumeratorPrivate*"/>
  36336. </field>
  36337. </class>
  36338. <record name="FileEnumeratorClass"
  36339. c:type="GFileEnumeratorClass"
  36340. glib:is-gtype-struct-for="FileEnumerator">
  36341. <field name="parent_class">
  36342. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  36343. </field>
  36344. <field name="next_file">
  36345. <callback name="next_file" throws="1">
  36346. <return-value transfer-ownership="full" nullable="1">
  36347. <doc xml:space="preserve">A #GFileInfo or %NULL on error
  36348. or end of enumerator. Free the returned object with
  36349. g_object_unref() when no longer needed.</doc>
  36350. <type name="FileInfo" c:type="GFileInfo*"/>
  36351. </return-value>
  36352. <parameters>
  36353. <parameter name="enumerator" transfer-ownership="none">
  36354. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36355. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36356. </parameter>
  36357. <parameter name="cancellable"
  36358. transfer-ownership="none"
  36359. nullable="1"
  36360. allow-none="1">
  36361. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36362. <type name="Cancellable" c:type="GCancellable*"/>
  36363. </parameter>
  36364. </parameters>
  36365. </callback>
  36366. </field>
  36367. <field name="close_fn">
  36368. <callback name="close_fn" throws="1">
  36369. <return-value transfer-ownership="none">
  36370. <type name="gboolean" c:type="gboolean"/>
  36371. </return-value>
  36372. <parameters>
  36373. <parameter name="enumerator" transfer-ownership="none">
  36374. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36375. </parameter>
  36376. <parameter name="cancellable"
  36377. transfer-ownership="none"
  36378. nullable="1"
  36379. allow-none="1">
  36380. <type name="Cancellable" c:type="GCancellable*"/>
  36381. </parameter>
  36382. </parameters>
  36383. </callback>
  36384. </field>
  36385. <field name="next_files_async">
  36386. <callback name="next_files_async">
  36387. <return-value transfer-ownership="none">
  36388. <type name="none" c:type="void"/>
  36389. </return-value>
  36390. <parameters>
  36391. <parameter name="enumerator" transfer-ownership="none">
  36392. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36393. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36394. </parameter>
  36395. <parameter name="num_files" transfer-ownership="none">
  36396. <doc xml:space="preserve">the number of file info objects to request</doc>
  36397. <type name="gint" c:type="int"/>
  36398. </parameter>
  36399. <parameter name="io_priority" transfer-ownership="none">
  36400. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  36401. <type name="gint" c:type="int"/>
  36402. </parameter>
  36403. <parameter name="cancellable"
  36404. transfer-ownership="none"
  36405. nullable="1"
  36406. allow-none="1">
  36407. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36408. <type name="Cancellable" c:type="GCancellable*"/>
  36409. </parameter>
  36410. <parameter name="callback"
  36411. transfer-ownership="none"
  36412. nullable="1"
  36413. allow-none="1"
  36414. scope="async"
  36415. closure="5">
  36416. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  36417. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  36418. </parameter>
  36419. <parameter name="user_data"
  36420. transfer-ownership="none"
  36421. nullable="1"
  36422. allow-none="1"
  36423. closure="5">
  36424. <doc xml:space="preserve">the data to pass to callback function</doc>
  36425. <type name="gpointer" c:type="gpointer"/>
  36426. </parameter>
  36427. </parameters>
  36428. </callback>
  36429. </field>
  36430. <field name="next_files_finish">
  36431. <callback name="next_files_finish" throws="1">
  36432. <return-value transfer-ownership="full">
  36433. <doc xml:space="preserve">a #GList of #GFileInfos. You must free the list with
  36434. g_list_free() and unref the infos with g_object_unref() when you're
  36435. done with them.</doc>
  36436. <type name="GLib.List" c:type="GList*">
  36437. <type name="FileInfo"/>
  36438. </type>
  36439. </return-value>
  36440. <parameters>
  36441. <parameter name="enumerator" transfer-ownership="none">
  36442. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36443. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36444. </parameter>
  36445. <parameter name="result" transfer-ownership="none">
  36446. <doc xml:space="preserve">a #GAsyncResult.</doc>
  36447. <type name="AsyncResult" c:type="GAsyncResult*"/>
  36448. </parameter>
  36449. </parameters>
  36450. </callback>
  36451. </field>
  36452. <field name="close_async">
  36453. <callback name="close_async">
  36454. <return-value transfer-ownership="none">
  36455. <type name="none" c:type="void"/>
  36456. </return-value>
  36457. <parameters>
  36458. <parameter name="enumerator" transfer-ownership="none">
  36459. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36460. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36461. </parameter>
  36462. <parameter name="io_priority" transfer-ownership="none">
  36463. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  36464. <type name="gint" c:type="int"/>
  36465. </parameter>
  36466. <parameter name="cancellable"
  36467. transfer-ownership="none"
  36468. nullable="1"
  36469. allow-none="1">
  36470. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36471. <type name="Cancellable" c:type="GCancellable*"/>
  36472. </parameter>
  36473. <parameter name="callback"
  36474. transfer-ownership="none"
  36475. nullable="1"
  36476. allow-none="1"
  36477. scope="async"
  36478. closure="4">
  36479. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  36480. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  36481. </parameter>
  36482. <parameter name="user_data"
  36483. transfer-ownership="none"
  36484. nullable="1"
  36485. allow-none="1"
  36486. closure="4">
  36487. <doc xml:space="preserve">the data to pass to callback function</doc>
  36488. <type name="gpointer" c:type="gpointer"/>
  36489. </parameter>
  36490. </parameters>
  36491. </callback>
  36492. </field>
  36493. <field name="close_finish">
  36494. <callback name="close_finish" throws="1">
  36495. <return-value transfer-ownership="none">
  36496. <doc xml:space="preserve">%TRUE if the close operation has finished successfully.</doc>
  36497. <type name="gboolean" c:type="gboolean"/>
  36498. </return-value>
  36499. <parameters>
  36500. <parameter name="enumerator" transfer-ownership="none">
  36501. <doc xml:space="preserve">a #GFileEnumerator.</doc>
  36502. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  36503. </parameter>
  36504. <parameter name="result" transfer-ownership="none">
  36505. <doc xml:space="preserve">a #GAsyncResult.</doc>
  36506. <type name="AsyncResult" c:type="GAsyncResult*"/>
  36507. </parameter>
  36508. </parameters>
  36509. </callback>
  36510. </field>
  36511. <field name="_g_reserved1" introspectable="0">
  36512. <callback name="_g_reserved1">
  36513. <return-value transfer-ownership="none">
  36514. <type name="none" c:type="void"/>
  36515. </return-value>
  36516. </callback>
  36517. </field>
  36518. <field name="_g_reserved2" introspectable="0">
  36519. <callback name="_g_reserved2">
  36520. <return-value transfer-ownership="none">
  36521. <type name="none" c:type="void"/>
  36522. </return-value>
  36523. </callback>
  36524. </field>
  36525. <field name="_g_reserved3" introspectable="0">
  36526. <callback name="_g_reserved3">
  36527. <return-value transfer-ownership="none">
  36528. <type name="none" c:type="void"/>
  36529. </return-value>
  36530. </callback>
  36531. </field>
  36532. <field name="_g_reserved4" introspectable="0">
  36533. <callback name="_g_reserved4">
  36534. <return-value transfer-ownership="none">
  36535. <type name="none" c:type="void"/>
  36536. </return-value>
  36537. </callback>
  36538. </field>
  36539. <field name="_g_reserved5" introspectable="0">
  36540. <callback name="_g_reserved5">
  36541. <return-value transfer-ownership="none">
  36542. <type name="none" c:type="void"/>
  36543. </return-value>
  36544. </callback>
  36545. </field>
  36546. <field name="_g_reserved6" introspectable="0">
  36547. <callback name="_g_reserved6">
  36548. <return-value transfer-ownership="none">
  36549. <type name="none" c:type="void"/>
  36550. </return-value>
  36551. </callback>
  36552. </field>
  36553. <field name="_g_reserved7" introspectable="0">
  36554. <callback name="_g_reserved7">
  36555. <return-value transfer-ownership="none">
  36556. <type name="none" c:type="void"/>
  36557. </return-value>
  36558. </callback>
  36559. </field>
  36560. </record>
  36561. <record name="FileEnumeratorPrivate"
  36562. c:type="GFileEnumeratorPrivate"
  36563. disguised="1">
  36564. </record>
  36565. <class name="FileIOStream"
  36566. c:symbol-prefix="file_io_stream"
  36567. c:type="GFileIOStream"
  36568. parent="IOStream"
  36569. glib:type-name="GFileIOStream"
  36570. glib:get-type="g_file_io_stream_get_type"
  36571. glib:type-struct="FileIOStreamClass">
  36572. <doc xml:space="preserve">GFileIOStream provides io streams that both read and write to the same
  36573. file handle.
  36574. GFileIOStream implements #GSeekable, which allows the io
  36575. stream to jump to arbitrary positions in the file and to truncate
  36576. the file, provided the filesystem of the file supports these
  36577. operations.
  36578. To find the position of a file io stream, use
  36579. g_seekable_tell().
  36580. To find out if a file io stream supports seeking, use g_seekable_can_seek().
  36581. To position a file io stream, use g_seekable_seek().
  36582. To find out if a file io stream supports truncating, use
  36583. g_seekable_can_truncate(). To truncate a file io
  36584. stream, use g_seekable_truncate().
  36585. The default implementation of all the #GFileIOStream operations
  36586. and the implementation of #GSeekable just call into the same operations
  36587. on the output stream.</doc>
  36588. <implements name="Seekable"/>
  36589. <virtual-method name="can_seek">
  36590. <return-value transfer-ownership="none">
  36591. <type name="gboolean" c:type="gboolean"/>
  36592. </return-value>
  36593. <parameters>
  36594. <instance-parameter name="stream" transfer-ownership="none">
  36595. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36596. </instance-parameter>
  36597. </parameters>
  36598. </virtual-method>
  36599. <virtual-method name="can_truncate">
  36600. <return-value transfer-ownership="none">
  36601. <type name="gboolean" c:type="gboolean"/>
  36602. </return-value>
  36603. <parameters>
  36604. <instance-parameter name="stream" transfer-ownership="none">
  36605. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36606. </instance-parameter>
  36607. </parameters>
  36608. </virtual-method>
  36609. <virtual-method name="get_etag" invoker="get_etag" version="2.22">
  36610. <doc xml:space="preserve">Gets the entity tag for the file when it has been written.
  36611. This must be called after the stream has been written
  36612. and closed, as the etag can change while writing.</doc>
  36613. <return-value transfer-ownership="full">
  36614. <doc xml:space="preserve">the entity tag for the stream.</doc>
  36615. <type name="utf8" c:type="char*"/>
  36616. </return-value>
  36617. <parameters>
  36618. <instance-parameter name="stream" transfer-ownership="none">
  36619. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36620. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36621. </instance-parameter>
  36622. </parameters>
  36623. </virtual-method>
  36624. <virtual-method name="query_info"
  36625. invoker="query_info"
  36626. version="2.22"
  36627. throws="1">
  36628. <doc xml:space="preserve">Queries a file io stream for the given @attributes.
  36629. This function blocks while querying the stream. For the asynchronous
  36630. version of this function, see g_file_io_stream_query_info_async().
  36631. While the stream is blocked, the stream will set the pending flag
  36632. internally, and any other operations on the stream will fail with
  36633. %G_IO_ERROR_PENDING.
  36634. Can fail if the stream was already closed (with @error being set to
  36635. %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
  36636. set to %G_IO_ERROR_PENDING), or if querying info is not supported for
  36637. the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
  36638. all cases of failure, %NULL will be returned.
  36639. If @cancellable is not %NULL, then the operation can be cancelled by
  36640. triggering the cancellable object from another thread. If the operation
  36641. was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
  36642. be returned.</doc>
  36643. <return-value transfer-ownership="full">
  36644. <doc xml:space="preserve">a #GFileInfo for the @stream, or %NULL on error.</doc>
  36645. <type name="FileInfo" c:type="GFileInfo*"/>
  36646. </return-value>
  36647. <parameters>
  36648. <instance-parameter name="stream" transfer-ownership="none">
  36649. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36650. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36651. </instance-parameter>
  36652. <parameter name="attributes" transfer-ownership="none">
  36653. <doc xml:space="preserve">a file attribute query string.</doc>
  36654. <type name="utf8" c:type="const char*"/>
  36655. </parameter>
  36656. <parameter name="cancellable"
  36657. transfer-ownership="none"
  36658. nullable="1"
  36659. allow-none="1">
  36660. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36661. <type name="Cancellable" c:type="GCancellable*"/>
  36662. </parameter>
  36663. </parameters>
  36664. </virtual-method>
  36665. <virtual-method name="query_info_async"
  36666. invoker="query_info_async"
  36667. version="2.22">
  36668. <doc xml:space="preserve">Asynchronously queries the @stream for a #GFileInfo. When completed,
  36669. @callback will be called with a #GAsyncResult which can be used to
  36670. finish the operation with g_file_io_stream_query_info_finish().
  36671. For the synchronous version of this function, see
  36672. g_file_io_stream_query_info().</doc>
  36673. <return-value transfer-ownership="none">
  36674. <type name="none" c:type="void"/>
  36675. </return-value>
  36676. <parameters>
  36677. <instance-parameter name="stream" transfer-ownership="none">
  36678. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36679. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36680. </instance-parameter>
  36681. <parameter name="attributes" transfer-ownership="none">
  36682. <doc xml:space="preserve">a file attribute query string.</doc>
  36683. <type name="utf8" c:type="const char*"/>
  36684. </parameter>
  36685. <parameter name="io_priority" transfer-ownership="none">
  36686. <doc xml:space="preserve">the [I/O priority][gio-GIOScheduler] of the request</doc>
  36687. <type name="gint" c:type="int"/>
  36688. </parameter>
  36689. <parameter name="cancellable"
  36690. transfer-ownership="none"
  36691. nullable="1"
  36692. allow-none="1">
  36693. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36694. <type name="Cancellable" c:type="GCancellable*"/>
  36695. </parameter>
  36696. <parameter name="callback"
  36697. transfer-ownership="none"
  36698. nullable="1"
  36699. allow-none="1"
  36700. scope="async"
  36701. closure="4">
  36702. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  36703. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  36704. </parameter>
  36705. <parameter name="user_data"
  36706. transfer-ownership="none"
  36707. nullable="1"
  36708. allow-none="1"
  36709. closure="4">
  36710. <doc xml:space="preserve">the data to pass to callback function</doc>
  36711. <type name="gpointer" c:type="gpointer"/>
  36712. </parameter>
  36713. </parameters>
  36714. </virtual-method>
  36715. <virtual-method name="query_info_finish"
  36716. invoker="query_info_finish"
  36717. version="2.22"
  36718. throws="1">
  36719. <doc xml:space="preserve">Finalizes the asynchronous query started
  36720. by g_file_io_stream_query_info_async().</doc>
  36721. <return-value transfer-ownership="full">
  36722. <doc xml:space="preserve">A #GFileInfo for the finished query.</doc>
  36723. <type name="FileInfo" c:type="GFileInfo*"/>
  36724. </return-value>
  36725. <parameters>
  36726. <instance-parameter name="stream" transfer-ownership="none">
  36727. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36728. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36729. </instance-parameter>
  36730. <parameter name="result" transfer-ownership="none">
  36731. <doc xml:space="preserve">a #GAsyncResult.</doc>
  36732. <type name="AsyncResult" c:type="GAsyncResult*"/>
  36733. </parameter>
  36734. </parameters>
  36735. </virtual-method>
  36736. <virtual-method name="seek" throws="1">
  36737. <return-value transfer-ownership="none">
  36738. <type name="gboolean" c:type="gboolean"/>
  36739. </return-value>
  36740. <parameters>
  36741. <instance-parameter name="stream" transfer-ownership="none">
  36742. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36743. </instance-parameter>
  36744. <parameter name="offset" transfer-ownership="none">
  36745. <type name="gint64" c:type="goffset"/>
  36746. </parameter>
  36747. <parameter name="type" transfer-ownership="none">
  36748. <type name="GLib.SeekType" c:type="GSeekType"/>
  36749. </parameter>
  36750. <parameter name="cancellable"
  36751. transfer-ownership="none"
  36752. nullable="1"
  36753. allow-none="1">
  36754. <type name="Cancellable" c:type="GCancellable*"/>
  36755. </parameter>
  36756. </parameters>
  36757. </virtual-method>
  36758. <virtual-method name="tell">
  36759. <return-value transfer-ownership="none">
  36760. <type name="gint64" c:type="goffset"/>
  36761. </return-value>
  36762. <parameters>
  36763. <instance-parameter name="stream" transfer-ownership="none">
  36764. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36765. </instance-parameter>
  36766. </parameters>
  36767. </virtual-method>
  36768. <virtual-method name="truncate_fn" throws="1">
  36769. <return-value transfer-ownership="none">
  36770. <type name="gboolean" c:type="gboolean"/>
  36771. </return-value>
  36772. <parameters>
  36773. <instance-parameter name="stream" transfer-ownership="none">
  36774. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36775. </instance-parameter>
  36776. <parameter name="size" transfer-ownership="none">
  36777. <type name="gint64" c:type="goffset"/>
  36778. </parameter>
  36779. <parameter name="cancellable"
  36780. transfer-ownership="none"
  36781. nullable="1"
  36782. allow-none="1">
  36783. <type name="Cancellable" c:type="GCancellable*"/>
  36784. </parameter>
  36785. </parameters>
  36786. </virtual-method>
  36787. <method name="get_etag"
  36788. c:identifier="g_file_io_stream_get_etag"
  36789. version="2.22">
  36790. <doc xml:space="preserve">Gets the entity tag for the file when it has been written.
  36791. This must be called after the stream has been written
  36792. and closed, as the etag can change while writing.</doc>
  36793. <return-value transfer-ownership="full">
  36794. <doc xml:space="preserve">the entity tag for the stream.</doc>
  36795. <type name="utf8" c:type="char*"/>
  36796. </return-value>
  36797. <parameters>
  36798. <instance-parameter name="stream" transfer-ownership="none">
  36799. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36800. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36801. </instance-parameter>
  36802. </parameters>
  36803. </method>
  36804. <method name="query_info"
  36805. c:identifier="g_file_io_stream_query_info"
  36806. version="2.22"
  36807. throws="1">
  36808. <doc xml:space="preserve">Queries a file io stream for the given @attributes.
  36809. This function blocks while querying the stream. For the asynchronous
  36810. version of this function, see g_file_io_stream_query_info_async().
  36811. While the stream is blocked, the stream will set the pending flag
  36812. internally, and any other operations on the stream will fail with
  36813. %G_IO_ERROR_PENDING.
  36814. Can fail if the stream was already closed (with @error being set to
  36815. %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
  36816. set to %G_IO_ERROR_PENDING), or if querying info is not supported for
  36817. the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
  36818. all cases of failure, %NULL will be returned.
  36819. If @cancellable is not %NULL, then the operation can be cancelled by
  36820. triggering the cancellable object from another thread. If the operation
  36821. was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
  36822. be returned.</doc>
  36823. <return-value transfer-ownership="full">
  36824. <doc xml:space="preserve">a #GFileInfo for the @stream, or %NULL on error.</doc>
  36825. <type name="FileInfo" c:type="GFileInfo*"/>
  36826. </return-value>
  36827. <parameters>
  36828. <instance-parameter name="stream" transfer-ownership="none">
  36829. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36830. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36831. </instance-parameter>
  36832. <parameter name="attributes" transfer-ownership="none">
  36833. <doc xml:space="preserve">a file attribute query string.</doc>
  36834. <type name="utf8" c:type="const char*"/>
  36835. </parameter>
  36836. <parameter name="cancellable"
  36837. transfer-ownership="none"
  36838. nullable="1"
  36839. allow-none="1">
  36840. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36841. <type name="Cancellable" c:type="GCancellable*"/>
  36842. </parameter>
  36843. </parameters>
  36844. </method>
  36845. <method name="query_info_async"
  36846. c:identifier="g_file_io_stream_query_info_async"
  36847. version="2.22">
  36848. <doc xml:space="preserve">Asynchronously queries the @stream for a #GFileInfo. When completed,
  36849. @callback will be called with a #GAsyncResult which can be used to
  36850. finish the operation with g_file_io_stream_query_info_finish().
  36851. For the synchronous version of this function, see
  36852. g_file_io_stream_query_info().</doc>
  36853. <return-value transfer-ownership="none">
  36854. <type name="none" c:type="void"/>
  36855. </return-value>
  36856. <parameters>
  36857. <instance-parameter name="stream" transfer-ownership="none">
  36858. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36859. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36860. </instance-parameter>
  36861. <parameter name="attributes" transfer-ownership="none">
  36862. <doc xml:space="preserve">a file attribute query string.</doc>
  36863. <type name="utf8" c:type="const char*"/>
  36864. </parameter>
  36865. <parameter name="io_priority" transfer-ownership="none">
  36866. <doc xml:space="preserve">the [I/O priority][gio-GIOScheduler] of the request</doc>
  36867. <type name="gint" c:type="int"/>
  36868. </parameter>
  36869. <parameter name="cancellable"
  36870. transfer-ownership="none"
  36871. nullable="1"
  36872. allow-none="1">
  36873. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  36874. <type name="Cancellable" c:type="GCancellable*"/>
  36875. </parameter>
  36876. <parameter name="callback"
  36877. transfer-ownership="none"
  36878. nullable="1"
  36879. allow-none="1"
  36880. scope="async"
  36881. closure="4">
  36882. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  36883. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  36884. </parameter>
  36885. <parameter name="user_data"
  36886. transfer-ownership="none"
  36887. nullable="1"
  36888. allow-none="1">
  36889. <doc xml:space="preserve">the data to pass to callback function</doc>
  36890. <type name="gpointer" c:type="gpointer"/>
  36891. </parameter>
  36892. </parameters>
  36893. </method>
  36894. <method name="query_info_finish"
  36895. c:identifier="g_file_io_stream_query_info_finish"
  36896. version="2.22"
  36897. throws="1">
  36898. <doc xml:space="preserve">Finalizes the asynchronous query started
  36899. by g_file_io_stream_query_info_async().</doc>
  36900. <return-value transfer-ownership="full">
  36901. <doc xml:space="preserve">A #GFileInfo for the finished query.</doc>
  36902. <type name="FileInfo" c:type="GFileInfo*"/>
  36903. </return-value>
  36904. <parameters>
  36905. <instance-parameter name="stream" transfer-ownership="none">
  36906. <doc xml:space="preserve">a #GFileIOStream.</doc>
  36907. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36908. </instance-parameter>
  36909. <parameter name="result" transfer-ownership="none">
  36910. <doc xml:space="preserve">a #GAsyncResult.</doc>
  36911. <type name="AsyncResult" c:type="GAsyncResult*"/>
  36912. </parameter>
  36913. </parameters>
  36914. </method>
  36915. <field name="parent_instance">
  36916. <type name="IOStream" c:type="GIOStream"/>
  36917. </field>
  36918. <field name="priv" readable="0" private="1">
  36919. <type name="FileIOStreamPrivate" c:type="GFileIOStreamPrivate*"/>
  36920. </field>
  36921. </class>
  36922. <record name="FileIOStreamClass"
  36923. c:type="GFileIOStreamClass"
  36924. glib:is-gtype-struct-for="FileIOStream">
  36925. <field name="parent_class">
  36926. <type name="IOStreamClass" c:type="GIOStreamClass"/>
  36927. </field>
  36928. <field name="tell">
  36929. <callback name="tell">
  36930. <return-value transfer-ownership="none">
  36931. <type name="gint64" c:type="goffset"/>
  36932. </return-value>
  36933. <parameters>
  36934. <parameter name="stream" transfer-ownership="none">
  36935. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36936. </parameter>
  36937. </parameters>
  36938. </callback>
  36939. </field>
  36940. <field name="can_seek">
  36941. <callback name="can_seek">
  36942. <return-value transfer-ownership="none">
  36943. <type name="gboolean" c:type="gboolean"/>
  36944. </return-value>
  36945. <parameters>
  36946. <parameter name="stream" transfer-ownership="none">
  36947. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36948. </parameter>
  36949. </parameters>
  36950. </callback>
  36951. </field>
  36952. <field name="seek">
  36953. <callback name="seek" throws="1">
  36954. <return-value transfer-ownership="none">
  36955. <type name="gboolean" c:type="gboolean"/>
  36956. </return-value>
  36957. <parameters>
  36958. <parameter name="stream" transfer-ownership="none">
  36959. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36960. </parameter>
  36961. <parameter name="offset" transfer-ownership="none">
  36962. <type name="gint64" c:type="goffset"/>
  36963. </parameter>
  36964. <parameter name="type" transfer-ownership="none">
  36965. <type name="GLib.SeekType" c:type="GSeekType"/>
  36966. </parameter>
  36967. <parameter name="cancellable"
  36968. transfer-ownership="none"
  36969. nullable="1"
  36970. allow-none="1">
  36971. <type name="Cancellable" c:type="GCancellable*"/>
  36972. </parameter>
  36973. </parameters>
  36974. </callback>
  36975. </field>
  36976. <field name="can_truncate">
  36977. <callback name="can_truncate">
  36978. <return-value transfer-ownership="none">
  36979. <type name="gboolean" c:type="gboolean"/>
  36980. </return-value>
  36981. <parameters>
  36982. <parameter name="stream" transfer-ownership="none">
  36983. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36984. </parameter>
  36985. </parameters>
  36986. </callback>
  36987. </field>
  36988. <field name="truncate_fn">
  36989. <callback name="truncate_fn" throws="1">
  36990. <return-value transfer-ownership="none">
  36991. <type name="gboolean" c:type="gboolean"/>
  36992. </return-value>
  36993. <parameters>
  36994. <parameter name="stream" transfer-ownership="none">
  36995. <type name="FileIOStream" c:type="GFileIOStream*"/>
  36996. </parameter>
  36997. <parameter name="size" transfer-ownership="none">
  36998. <type name="gint64" c:type="goffset"/>
  36999. </parameter>
  37000. <parameter name="cancellable"
  37001. transfer-ownership="none"
  37002. nullable="1"
  37003. allow-none="1">
  37004. <type name="Cancellable" c:type="GCancellable*"/>
  37005. </parameter>
  37006. </parameters>
  37007. </callback>
  37008. </field>
  37009. <field name="query_info">
  37010. <callback name="query_info" throws="1">
  37011. <return-value transfer-ownership="full">
  37012. <doc xml:space="preserve">a #GFileInfo for the @stream, or %NULL on error.</doc>
  37013. <type name="FileInfo" c:type="GFileInfo*"/>
  37014. </return-value>
  37015. <parameters>
  37016. <parameter name="stream" transfer-ownership="none">
  37017. <doc xml:space="preserve">a #GFileIOStream.</doc>
  37018. <type name="FileIOStream" c:type="GFileIOStream*"/>
  37019. </parameter>
  37020. <parameter name="attributes" transfer-ownership="none">
  37021. <doc xml:space="preserve">a file attribute query string.</doc>
  37022. <type name="utf8" c:type="const char*"/>
  37023. </parameter>
  37024. <parameter name="cancellable"
  37025. transfer-ownership="none"
  37026. nullable="1"
  37027. allow-none="1">
  37028. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  37029. <type name="Cancellable" c:type="GCancellable*"/>
  37030. </parameter>
  37031. </parameters>
  37032. </callback>
  37033. </field>
  37034. <field name="query_info_async">
  37035. <callback name="query_info_async">
  37036. <return-value transfer-ownership="none">
  37037. <type name="none" c:type="void"/>
  37038. </return-value>
  37039. <parameters>
  37040. <parameter name="stream" transfer-ownership="none">
  37041. <doc xml:space="preserve">a #GFileIOStream.</doc>
  37042. <type name="FileIOStream" c:type="GFileIOStream*"/>
  37043. </parameter>
  37044. <parameter name="attributes" transfer-ownership="none">
  37045. <doc xml:space="preserve">a file attribute query string.</doc>
  37046. <type name="utf8" c:type="const char*"/>
  37047. </parameter>
  37048. <parameter name="io_priority" transfer-ownership="none">
  37049. <doc xml:space="preserve">the [I/O priority][gio-GIOScheduler] of the request</doc>
  37050. <type name="gint" c:type="int"/>
  37051. </parameter>
  37052. <parameter name="cancellable"
  37053. transfer-ownership="none"
  37054. nullable="1"
  37055. allow-none="1">
  37056. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  37057. <type name="Cancellable" c:type="GCancellable*"/>
  37058. </parameter>
  37059. <parameter name="callback"
  37060. transfer-ownership="none"
  37061. nullable="1"
  37062. allow-none="1"
  37063. scope="async"
  37064. closure="5">
  37065. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  37066. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  37067. </parameter>
  37068. <parameter name="user_data"
  37069. transfer-ownership="none"
  37070. nullable="1"
  37071. allow-none="1"
  37072. closure="5">
  37073. <doc xml:space="preserve">the data to pass to callback function</doc>
  37074. <type name="gpointer" c:type="gpointer"/>
  37075. </parameter>
  37076. </parameters>
  37077. </callback>
  37078. </field>
  37079. <field name="query_info_finish">
  37080. <callback name="query_info_finish" throws="1">
  37081. <return-value transfer-ownership="full">
  37082. <doc xml:space="preserve">A #GFileInfo for the finished query.</doc>
  37083. <type name="FileInfo" c:type="GFileInfo*"/>
  37084. </return-value>
  37085. <parameters>
  37086. <parameter name="stream" transfer-ownership="none">
  37087. <doc xml:space="preserve">a #GFileIOStream.</doc>
  37088. <type name="FileIOStream" c:type="GFileIOStream*"/>
  37089. </parameter>
  37090. <parameter name="result" transfer-ownership="none">
  37091. <doc xml:space="preserve">a #GAsyncResult.</doc>
  37092. <type name="AsyncResult" c:type="GAsyncResult*"/>
  37093. </parameter>
  37094. </parameters>
  37095. </callback>
  37096. </field>
  37097. <field name="get_etag">
  37098. <callback name="get_etag">
  37099. <return-value transfer-ownership="full">
  37100. <doc xml:space="preserve">the entity tag for the stream.</doc>
  37101. <type name="utf8" c:type="char*"/>
  37102. </return-value>
  37103. <parameters>
  37104. <parameter name="stream" transfer-ownership="none">
  37105. <doc xml:space="preserve">a #GFileIOStream.</doc>
  37106. <type name="FileIOStream" c:type="GFileIOStream*"/>
  37107. </parameter>
  37108. </parameters>
  37109. </callback>
  37110. </field>
  37111. <field name="_g_reserved1" introspectable="0">
  37112. <callback name="_g_reserved1">
  37113. <return-value transfer-ownership="none">
  37114. <type name="none" c:type="void"/>
  37115. </return-value>
  37116. </callback>
  37117. </field>
  37118. <field name="_g_reserved2" introspectable="0">
  37119. <callback name="_g_reserved2">
  37120. <return-value transfer-ownership="none">
  37121. <type name="none" c:type="void"/>
  37122. </return-value>
  37123. </callback>
  37124. </field>
  37125. <field name="_g_reserved3" introspectable="0">
  37126. <callback name="_g_reserved3">
  37127. <return-value transfer-ownership="none">
  37128. <type name="none" c:type="void"/>
  37129. </return-value>
  37130. </callback>
  37131. </field>
  37132. <field name="_g_reserved4" introspectable="0">
  37133. <callback name="_g_reserved4">
  37134. <return-value transfer-ownership="none">
  37135. <type name="none" c:type="void"/>
  37136. </return-value>
  37137. </callback>
  37138. </field>
  37139. <field name="_g_reserved5" introspectable="0">
  37140. <callback name="_g_reserved5">
  37141. <return-value transfer-ownership="none">
  37142. <type name="none" c:type="void"/>
  37143. </return-value>
  37144. </callback>
  37145. </field>
  37146. </record>
  37147. <record name="FileIOStreamPrivate"
  37148. c:type="GFileIOStreamPrivate"
  37149. disguised="1">
  37150. </record>
  37151. <class name="FileIcon"
  37152. c:symbol-prefix="file_icon"
  37153. c:type="GFileIcon"
  37154. parent="GObject.Object"
  37155. glib:type-name="GFileIcon"
  37156. glib:get-type="g_file_icon_get_type"
  37157. glib:type-struct="FileIconClass">
  37158. <doc xml:space="preserve">#GFileIcon specifies an icon by pointing to an image file
  37159. to be used as icon.</doc>
  37160. <implements name="Icon"/>
  37161. <implements name="LoadableIcon"/>
  37162. <constructor name="new" c:identifier="g_file_icon_new">
  37163. <doc xml:space="preserve">Creates a new icon for a file.</doc>
  37164. <return-value transfer-ownership="full">
  37165. <doc xml:space="preserve">a #GIcon for the given
  37166. @file, or %NULL on error.</doc>
  37167. <type name="FileIcon" c:type="GIcon*"/>
  37168. </return-value>
  37169. <parameters>
  37170. <parameter name="file" transfer-ownership="none">
  37171. <doc xml:space="preserve">a #GFile.</doc>
  37172. <type name="File" c:type="GFile*"/>
  37173. </parameter>
  37174. </parameters>
  37175. </constructor>
  37176. <method name="get_file" c:identifier="g_file_icon_get_file">
  37177. <doc xml:space="preserve">Gets the #GFile associated with the given @icon.</doc>
  37178. <return-value transfer-ownership="none">
  37179. <doc xml:space="preserve">a #GFile, or %NULL.</doc>
  37180. <type name="File" c:type="GFile*"/>
  37181. </return-value>
  37182. <parameters>
  37183. <instance-parameter name="icon" transfer-ownership="none">
  37184. <doc xml:space="preserve">a #GIcon.</doc>
  37185. <type name="FileIcon" c:type="GFileIcon*"/>
  37186. </instance-parameter>
  37187. </parameters>
  37188. </method>
  37189. <property name="file"
  37190. writable="1"
  37191. construct-only="1"
  37192. transfer-ownership="none">
  37193. <doc xml:space="preserve">The file containing the icon.</doc>
  37194. <type name="File"/>
  37195. </property>
  37196. </class>
  37197. <record name="FileIconClass"
  37198. c:type="GFileIconClass"
  37199. disguised="1"
  37200. glib:is-gtype-struct-for="FileIcon">
  37201. </record>
  37202. <record name="FileIface"
  37203. c:type="GFileIface"
  37204. glib:is-gtype-struct-for="File">
  37205. <doc xml:space="preserve">An interface for writing VFS file handles.</doc>
  37206. <field name="g_iface">
  37207. <doc xml:space="preserve">The parent interface.</doc>
  37208. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  37209. </field>
  37210. <field name="dup">
  37211. <callback name="dup">
  37212. <return-value transfer-ownership="full">
  37213. <doc xml:space="preserve">a new #GFile that is a duplicate
  37214. of the given #GFile.</doc>
  37215. <type name="File" c:type="GFile*"/>
  37216. </return-value>
  37217. <parameters>
  37218. <parameter name="file" transfer-ownership="none">
  37219. <doc xml:space="preserve">input #GFile</doc>
  37220. <type name="File" c:type="GFile*"/>
  37221. </parameter>
  37222. </parameters>
  37223. </callback>
  37224. </field>
  37225. <field name="hash">
  37226. <callback name="hash">
  37227. <return-value transfer-ownership="none">
  37228. <doc xml:space="preserve">0 if @file is not a valid #GFile, otherwise an
  37229. integer that can be used as hash value for the #GFile.
  37230. This function is intended for easily hashing a #GFile to
  37231. add to a #GHashTable or similar data structure.</doc>
  37232. <type name="guint" c:type="guint"/>
  37233. </return-value>
  37234. <parameters>
  37235. <parameter name="file" transfer-ownership="none">
  37236. <doc xml:space="preserve">#gconstpointer to a #GFile</doc>
  37237. <type name="File" c:type="GFile*"/>
  37238. </parameter>
  37239. </parameters>
  37240. </callback>
  37241. </field>
  37242. <field name="equal">
  37243. <callback name="equal">
  37244. <return-value transfer-ownership="none">
  37245. <doc xml:space="preserve">%TRUE if @file1 and @file2 are equal.</doc>
  37246. <type name="gboolean" c:type="gboolean"/>
  37247. </return-value>
  37248. <parameters>
  37249. <parameter name="file1" transfer-ownership="none">
  37250. <doc xml:space="preserve">the first #GFile</doc>
  37251. <type name="File" c:type="GFile*"/>
  37252. </parameter>
  37253. <parameter name="file2" transfer-ownership="none">
  37254. <doc xml:space="preserve">the second #GFile</doc>
  37255. <type name="File" c:type="GFile*"/>
  37256. </parameter>
  37257. </parameters>
  37258. </callback>
  37259. </field>
  37260. <field name="is_native">
  37261. <callback name="is_native">
  37262. <return-value transfer-ownership="none">
  37263. <doc xml:space="preserve">%TRUE if @file is native</doc>
  37264. <type name="gboolean" c:type="gboolean"/>
  37265. </return-value>
  37266. <parameters>
  37267. <parameter name="file" transfer-ownership="none">
  37268. <doc xml:space="preserve">input #GFile</doc>
  37269. <type name="File" c:type="GFile*"/>
  37270. </parameter>
  37271. </parameters>
  37272. </callback>
  37273. </field>
  37274. <field name="has_uri_scheme">
  37275. <callback name="has_uri_scheme">
  37276. <return-value transfer-ownership="none">
  37277. <doc xml:space="preserve">%TRUE if #GFile's backend supports the
  37278. given URI scheme, %FALSE if URI scheme is %NULL,
  37279. not supported, or #GFile is invalid.</doc>
  37280. <type name="gboolean" c:type="gboolean"/>
  37281. </return-value>
  37282. <parameters>
  37283. <parameter name="file" transfer-ownership="none">
  37284. <doc xml:space="preserve">input #GFile</doc>
  37285. <type name="File" c:type="GFile*"/>
  37286. </parameter>
  37287. <parameter name="uri_scheme" transfer-ownership="none">
  37288. <doc xml:space="preserve">a string containing a URI scheme</doc>
  37289. <type name="utf8" c:type="const char*"/>
  37290. </parameter>
  37291. </parameters>
  37292. </callback>
  37293. </field>
  37294. <field name="get_uri_scheme">
  37295. <callback name="get_uri_scheme">
  37296. <return-value transfer-ownership="full">
  37297. <doc xml:space="preserve">a string containing the URI scheme for the given
  37298. #GFile. The returned string should be freed with g_free()
  37299. when no longer needed.</doc>
  37300. <type name="utf8" c:type="char*"/>
  37301. </return-value>
  37302. <parameters>
  37303. <parameter name="file" transfer-ownership="none">
  37304. <doc xml:space="preserve">input #GFile</doc>
  37305. <type name="File" c:type="GFile*"/>
  37306. </parameter>
  37307. </parameters>
  37308. </callback>
  37309. </field>
  37310. <field name="get_basename">
  37311. <callback name="get_basename">
  37312. <return-value transfer-ownership="full" nullable="1">
  37313. <doc xml:space="preserve">string containing the #GFile's base name, or
  37314. %NULL if given #GFile is invalid. The returned string should be
  37315. freed with g_free() when no longer needed.</doc>
  37316. <type name="utf8" c:type="char*"/>
  37317. </return-value>
  37318. <parameters>
  37319. <parameter name="file" transfer-ownership="none">
  37320. <doc xml:space="preserve">input #GFile</doc>
  37321. <type name="File" c:type="GFile*"/>
  37322. </parameter>
  37323. </parameters>
  37324. </callback>
  37325. </field>
  37326. <field name="get_path">
  37327. <callback name="get_path">
  37328. <return-value transfer-ownership="full" nullable="1">
  37329. <doc xml:space="preserve">string containing the #GFile's path, or %NULL
  37330. if no such path exists. The returned string should be freed
  37331. with g_free() when no longer needed.</doc>
  37332. <type name="utf8" c:type="char*"/>
  37333. </return-value>
  37334. <parameters>
  37335. <parameter name="file" transfer-ownership="none">
  37336. <doc xml:space="preserve">input #GFile</doc>
  37337. <type name="File" c:type="GFile*"/>
  37338. </parameter>
  37339. </parameters>
  37340. </callback>
  37341. </field>
  37342. <field name="get_uri">
  37343. <callback name="get_uri">
  37344. <return-value transfer-ownership="full">
  37345. <doc xml:space="preserve">a string containing the #GFile's URI.
  37346. The returned string should be freed with g_free()
  37347. when no longer needed.</doc>
  37348. <type name="utf8" c:type="char*"/>
  37349. </return-value>
  37350. <parameters>
  37351. <parameter name="file" transfer-ownership="none">
  37352. <doc xml:space="preserve">input #GFile</doc>
  37353. <type name="File" c:type="GFile*"/>
  37354. </parameter>
  37355. </parameters>
  37356. </callback>
  37357. </field>
  37358. <field name="get_parse_name">
  37359. <callback name="get_parse_name">
  37360. <return-value transfer-ownership="full">
  37361. <doc xml:space="preserve">a string containing the #GFile's parse name.
  37362. The returned string should be freed with g_free()
  37363. when no longer needed.</doc>
  37364. <type name="utf8" c:type="char*"/>
  37365. </return-value>
  37366. <parameters>
  37367. <parameter name="file" transfer-ownership="none">
  37368. <doc xml:space="preserve">input #GFile</doc>
  37369. <type name="File" c:type="GFile*"/>
  37370. </parameter>
  37371. </parameters>
  37372. </callback>
  37373. </field>
  37374. <field name="get_parent">
  37375. <callback name="get_parent">
  37376. <return-value transfer-ownership="full" nullable="1">
  37377. <doc xml:space="preserve">a #GFile structure to the
  37378. parent of the given #GFile or %NULL if there is no parent. Free
  37379. the returned object with g_object_unref().</doc>
  37380. <type name="File" c:type="GFile*"/>
  37381. </return-value>
  37382. <parameters>
  37383. <parameter name="file" transfer-ownership="none">
  37384. <doc xml:space="preserve">input #GFile</doc>
  37385. <type name="File" c:type="GFile*"/>
  37386. </parameter>
  37387. </parameters>
  37388. </callback>
  37389. </field>
  37390. <field name="prefix_matches">
  37391. <callback name="prefix_matches">
  37392. <return-value transfer-ownership="none">
  37393. <doc xml:space="preserve">%TRUE if the @files's parent, grandparent, etc is @prefix,
  37394. %FALSE otherwise.</doc>
  37395. <type name="gboolean" c:type="gboolean"/>
  37396. </return-value>
  37397. <parameters>
  37398. <parameter name="prefix" transfer-ownership="none">
  37399. <doc xml:space="preserve">input #GFile</doc>
  37400. <type name="File" c:type="GFile*"/>
  37401. </parameter>
  37402. <parameter name="file" transfer-ownership="none">
  37403. <doc xml:space="preserve">input #GFile</doc>
  37404. <type name="File" c:type="GFile*"/>
  37405. </parameter>
  37406. </parameters>
  37407. </callback>
  37408. </field>
  37409. <field name="get_relative_path">
  37410. <callback name="get_relative_path">
  37411. <return-value transfer-ownership="full" nullable="1">
  37412. <doc xml:space="preserve">string with the relative path from @descendant
  37413. to @parent, or %NULL if @descendant doesn't have @parent as
  37414. prefix. The returned string should be freed with g_free() when
  37415. no longer needed.</doc>
  37416. <type name="utf8" c:type="char*"/>
  37417. </return-value>
  37418. <parameters>
  37419. <parameter name="parent" transfer-ownership="none">
  37420. <doc xml:space="preserve">input #GFile</doc>
  37421. <type name="File" c:type="GFile*"/>
  37422. </parameter>
  37423. <parameter name="descendant" transfer-ownership="none">
  37424. <doc xml:space="preserve">input #GFile</doc>
  37425. <type name="File" c:type="GFile*"/>
  37426. </parameter>
  37427. </parameters>
  37428. </callback>
  37429. </field>
  37430. <field name="resolve_relative_path">
  37431. <callback name="resolve_relative_path">
  37432. <return-value transfer-ownership="full">
  37433. <doc xml:space="preserve">#GFile to the resolved path.
  37434. %NULL if @relative_path is %NULL or if @file is invalid.
  37435. Free the returned object with g_object_unref().</doc>
  37436. <type name="File" c:type="GFile*"/>
  37437. </return-value>
  37438. <parameters>
  37439. <parameter name="file" transfer-ownership="none">
  37440. <doc xml:space="preserve">input #GFile</doc>
  37441. <type name="File" c:type="GFile*"/>
  37442. </parameter>
  37443. <parameter name="relative_path" transfer-ownership="none">
  37444. <doc xml:space="preserve">a given relative path string</doc>
  37445. <type name="utf8" c:type="const char*"/>
  37446. </parameter>
  37447. </parameters>
  37448. </callback>
  37449. </field>
  37450. <field name="get_child_for_display_name">
  37451. <callback name="get_child_for_display_name" throws="1">
  37452. <return-value transfer-ownership="full">
  37453. <doc xml:space="preserve">a #GFile to the specified child, or
  37454. %NULL if the display name couldn't be converted.
  37455. Free the returned object with g_object_unref().</doc>
  37456. <type name="File" c:type="GFile*"/>
  37457. </return-value>
  37458. <parameters>
  37459. <parameter name="file" transfer-ownership="none">
  37460. <doc xml:space="preserve">input #GFile</doc>
  37461. <type name="File" c:type="GFile*"/>
  37462. </parameter>
  37463. <parameter name="display_name" transfer-ownership="none">
  37464. <doc xml:space="preserve">string to a possible child</doc>
  37465. <type name="utf8" c:type="const char*"/>
  37466. </parameter>
  37467. </parameters>
  37468. </callback>
  37469. </field>
  37470. <field name="enumerate_children">
  37471. <callback name="enumerate_children" throws="1">
  37472. <return-value transfer-ownership="full">
  37473. <doc xml:space="preserve">A #GFileEnumerator if successful,
  37474. %NULL on error. Free the returned object with g_object_unref().</doc>
  37475. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  37476. </return-value>
  37477. <parameters>
  37478. <parameter name="file" transfer-ownership="none">
  37479. <doc xml:space="preserve">input #GFile</doc>
  37480. <type name="File" c:type="GFile*"/>
  37481. </parameter>
  37482. <parameter name="attributes" transfer-ownership="none">
  37483. <doc xml:space="preserve">an attribute query string</doc>
  37484. <type name="utf8" c:type="const char*"/>
  37485. </parameter>
  37486. <parameter name="flags" transfer-ownership="none">
  37487. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  37488. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  37489. </parameter>
  37490. <parameter name="cancellable"
  37491. transfer-ownership="none"
  37492. nullable="1"
  37493. allow-none="1">
  37494. <doc xml:space="preserve">optional #GCancellable object,
  37495. %NULL to ignore</doc>
  37496. <type name="Cancellable" c:type="GCancellable*"/>
  37497. </parameter>
  37498. </parameters>
  37499. </callback>
  37500. </field>
  37501. <field name="enumerate_children_async">
  37502. <callback name="enumerate_children_async">
  37503. <return-value transfer-ownership="none">
  37504. <type name="none" c:type="void"/>
  37505. </return-value>
  37506. <parameters>
  37507. <parameter name="file" transfer-ownership="none">
  37508. <doc xml:space="preserve">input #GFile</doc>
  37509. <type name="File" c:type="GFile*"/>
  37510. </parameter>
  37511. <parameter name="attributes" transfer-ownership="none">
  37512. <doc xml:space="preserve">an attribute query string</doc>
  37513. <type name="utf8" c:type="const char*"/>
  37514. </parameter>
  37515. <parameter name="flags" transfer-ownership="none">
  37516. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  37517. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  37518. </parameter>
  37519. <parameter name="io_priority" transfer-ownership="none">
  37520. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  37521. <type name="gint" c:type="int"/>
  37522. </parameter>
  37523. <parameter name="cancellable"
  37524. transfer-ownership="none"
  37525. nullable="1"
  37526. allow-none="1">
  37527. <doc xml:space="preserve">optional #GCancellable object,
  37528. %NULL to ignore</doc>
  37529. <type name="Cancellable" c:type="GCancellable*"/>
  37530. </parameter>
  37531. <parameter name="callback"
  37532. transfer-ownership="none"
  37533. nullable="1"
  37534. allow-none="1"
  37535. scope="async"
  37536. closure="6">
  37537. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  37538. request is satisfied</doc>
  37539. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  37540. </parameter>
  37541. <parameter name="user_data"
  37542. transfer-ownership="none"
  37543. nullable="1"
  37544. allow-none="1"
  37545. closure="6">
  37546. <doc xml:space="preserve">the data to pass to callback function</doc>
  37547. <type name="gpointer" c:type="gpointer"/>
  37548. </parameter>
  37549. </parameters>
  37550. </callback>
  37551. </field>
  37552. <field name="enumerate_children_finish">
  37553. <callback name="enumerate_children_finish" throws="1">
  37554. <return-value transfer-ownership="full">
  37555. <doc xml:space="preserve">a #GFileEnumerator or %NULL
  37556. if an error occurred.
  37557. Free the returned object with g_object_unref().</doc>
  37558. <type name="FileEnumerator" c:type="GFileEnumerator*"/>
  37559. </return-value>
  37560. <parameters>
  37561. <parameter name="file" transfer-ownership="none">
  37562. <doc xml:space="preserve">input #GFile</doc>
  37563. <type name="File" c:type="GFile*"/>
  37564. </parameter>
  37565. <parameter name="res" transfer-ownership="none">
  37566. <doc xml:space="preserve">a #GAsyncResult</doc>
  37567. <type name="AsyncResult" c:type="GAsyncResult*"/>
  37568. </parameter>
  37569. </parameters>
  37570. </callback>
  37571. </field>
  37572. <field name="query_info">
  37573. <callback name="query_info" throws="1">
  37574. <return-value transfer-ownership="full">
  37575. <doc xml:space="preserve">a #GFileInfo for the given @file, or %NULL
  37576. on error. Free the returned object with g_object_unref().</doc>
  37577. <type name="FileInfo" c:type="GFileInfo*"/>
  37578. </return-value>
  37579. <parameters>
  37580. <parameter name="file" transfer-ownership="none">
  37581. <doc xml:space="preserve">input #GFile</doc>
  37582. <type name="File" c:type="GFile*"/>
  37583. </parameter>
  37584. <parameter name="attributes" transfer-ownership="none">
  37585. <doc xml:space="preserve">an attribute query string</doc>
  37586. <type name="utf8" c:type="const char*"/>
  37587. </parameter>
  37588. <parameter name="flags" transfer-ownership="none">
  37589. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  37590. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  37591. </parameter>
  37592. <parameter name="cancellable"
  37593. transfer-ownership="none"
  37594. nullable="1"
  37595. allow-none="1">
  37596. <doc xml:space="preserve">optional #GCancellable object,
  37597. %NULL to ignore</doc>
  37598. <type name="Cancellable" c:type="GCancellable*"/>
  37599. </parameter>
  37600. </parameters>
  37601. </callback>
  37602. </field>
  37603. <field name="query_info_async">
  37604. <callback name="query_info_async">
  37605. <return-value transfer-ownership="none">
  37606. <type name="none" c:type="void"/>
  37607. </return-value>
  37608. <parameters>
  37609. <parameter name="file" transfer-ownership="none">
  37610. <doc xml:space="preserve">input #GFile</doc>
  37611. <type name="File" c:type="GFile*"/>
  37612. </parameter>
  37613. <parameter name="attributes" transfer-ownership="none">
  37614. <doc xml:space="preserve">an attribute query string</doc>
  37615. <type name="utf8" c:type="const char*"/>
  37616. </parameter>
  37617. <parameter name="flags" transfer-ownership="none">
  37618. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  37619. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  37620. </parameter>
  37621. <parameter name="io_priority" transfer-ownership="none">
  37622. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  37623. <type name="gint" c:type="int"/>
  37624. </parameter>
  37625. <parameter name="cancellable"
  37626. transfer-ownership="none"
  37627. nullable="1"
  37628. allow-none="1">
  37629. <doc xml:space="preserve">optional #GCancellable object,
  37630. %NULL to ignore</doc>
  37631. <type name="Cancellable" c:type="GCancellable*"/>
  37632. </parameter>
  37633. <parameter name="callback"
  37634. transfer-ownership="none"
  37635. nullable="1"
  37636. allow-none="1"
  37637. scope="async"
  37638. closure="6">
  37639. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  37640. request is satisfied</doc>
  37641. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  37642. </parameter>
  37643. <parameter name="user_data"
  37644. transfer-ownership="none"
  37645. nullable="1"
  37646. allow-none="1"
  37647. closure="6">
  37648. <doc xml:space="preserve">the data to pass to callback function</doc>
  37649. <type name="gpointer" c:type="gpointer"/>
  37650. </parameter>
  37651. </parameters>
  37652. </callback>
  37653. </field>
  37654. <field name="query_info_finish">
  37655. <callback name="query_info_finish" throws="1">
  37656. <return-value transfer-ownership="full">
  37657. <doc xml:space="preserve">#GFileInfo for given @file
  37658. or %NULL on error. Free the returned object with
  37659. g_object_unref().</doc>
  37660. <type name="FileInfo" c:type="GFileInfo*"/>
  37661. </return-value>
  37662. <parameters>
  37663. <parameter name="file" transfer-ownership="none">
  37664. <doc xml:space="preserve">input #GFile</doc>
  37665. <type name="File" c:type="GFile*"/>
  37666. </parameter>
  37667. <parameter name="res" transfer-ownership="none">
  37668. <doc xml:space="preserve">a #GAsyncResult</doc>
  37669. <type name="AsyncResult" c:type="GAsyncResult*"/>
  37670. </parameter>
  37671. </parameters>
  37672. </callback>
  37673. </field>
  37674. <field name="query_filesystem_info">
  37675. <callback name="query_filesystem_info" throws="1">
  37676. <return-value transfer-ownership="full">
  37677. <doc xml:space="preserve">a #GFileInfo or %NULL if there was an error.
  37678. Free the returned object with g_object_unref().</doc>
  37679. <type name="FileInfo" c:type="GFileInfo*"/>
  37680. </return-value>
  37681. <parameters>
  37682. <parameter name="file" transfer-ownership="none">
  37683. <doc xml:space="preserve">input #GFile</doc>
  37684. <type name="File" c:type="GFile*"/>
  37685. </parameter>
  37686. <parameter name="attributes" transfer-ownership="none">
  37687. <doc xml:space="preserve">an attribute query string</doc>
  37688. <type name="utf8" c:type="const char*"/>
  37689. </parameter>
  37690. <parameter name="cancellable"
  37691. transfer-ownership="none"
  37692. nullable="1"
  37693. allow-none="1">
  37694. <doc xml:space="preserve">optional #GCancellable object,
  37695. %NULL to ignore</doc>
  37696. <type name="Cancellable" c:type="GCancellable*"/>
  37697. </parameter>
  37698. </parameters>
  37699. </callback>
  37700. </field>
  37701. <field name="query_filesystem_info_async">
  37702. <callback name="query_filesystem_info_async">
  37703. <return-value transfer-ownership="none">
  37704. <type name="none" c:type="void"/>
  37705. </return-value>
  37706. <parameters>
  37707. <parameter name="file" transfer-ownership="none">
  37708. <doc xml:space="preserve">input #GFile</doc>
  37709. <type name="File" c:type="GFile*"/>
  37710. </parameter>
  37711. <parameter name="attributes" transfer-ownership="none">
  37712. <doc xml:space="preserve">an attribute query string</doc>
  37713. <type name="utf8" c:type="const char*"/>
  37714. </parameter>
  37715. <parameter name="io_priority" transfer-ownership="none">
  37716. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  37717. <type name="gint" c:type="int"/>
  37718. </parameter>
  37719. <parameter name="cancellable"
  37720. transfer-ownership="none"
  37721. nullable="1"
  37722. allow-none="1">
  37723. <doc xml:space="preserve">optional #GCancellable object,
  37724. %NULL to ignore</doc>
  37725. <type name="Cancellable" c:type="GCancellable*"/>
  37726. </parameter>
  37727. <parameter name="callback"
  37728. transfer-ownership="none"
  37729. nullable="1"
  37730. allow-none="1"
  37731. scope="async"
  37732. closure="5">
  37733. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  37734. when the request is satisfied</doc>
  37735. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  37736. </parameter>
  37737. <parameter name="user_data"
  37738. transfer-ownership="none"
  37739. nullable="1"
  37740. allow-none="1"
  37741. closure="5">
  37742. <doc xml:space="preserve">the data to pass to callback function</doc>
  37743. <type name="gpointer" c:type="gpointer"/>
  37744. </parameter>
  37745. </parameters>
  37746. </callback>
  37747. </field>
  37748. <field name="query_filesystem_info_finish">
  37749. <callback name="query_filesystem_info_finish" throws="1">
  37750. <return-value transfer-ownership="full">
  37751. <doc xml:space="preserve">#GFileInfo for given @file
  37752. or %NULL on error.
  37753. Free the returned object with g_object_unref().</doc>
  37754. <type name="FileInfo" c:type="GFileInfo*"/>
  37755. </return-value>
  37756. <parameters>
  37757. <parameter name="file" transfer-ownership="none">
  37758. <doc xml:space="preserve">input #GFile</doc>
  37759. <type name="File" c:type="GFile*"/>
  37760. </parameter>
  37761. <parameter name="res" transfer-ownership="none">
  37762. <doc xml:space="preserve">a #GAsyncResult</doc>
  37763. <type name="AsyncResult" c:type="GAsyncResult*"/>
  37764. </parameter>
  37765. </parameters>
  37766. </callback>
  37767. </field>
  37768. <field name="find_enclosing_mount">
  37769. <callback name="find_enclosing_mount" throws="1">
  37770. <return-value transfer-ownership="full">
  37771. <doc xml:space="preserve">a #GMount where the @file is located
  37772. or %NULL on error.
  37773. Free the returned object with g_object_unref().</doc>
  37774. <type name="Mount" c:type="GMount*"/>
  37775. </return-value>
  37776. <parameters>
  37777. <parameter name="file" transfer-ownership="none">
  37778. <doc xml:space="preserve">input #GFile</doc>
  37779. <type name="File" c:type="GFile*"/>
  37780. </parameter>
  37781. <parameter name="cancellable"
  37782. transfer-ownership="none"
  37783. nullable="1"
  37784. allow-none="1">
  37785. <doc xml:space="preserve">optional #GCancellable object,
  37786. %NULL to ignore</doc>
  37787. <type name="Cancellable" c:type="GCancellable*"/>
  37788. </parameter>
  37789. </parameters>
  37790. </callback>
  37791. </field>
  37792. <field name="find_enclosing_mount_async">
  37793. <callback name="find_enclosing_mount_async">
  37794. <return-value transfer-ownership="none">
  37795. <type name="none" c:type="void"/>
  37796. </return-value>
  37797. <parameters>
  37798. <parameter name="file" transfer-ownership="none">
  37799. <doc xml:space="preserve">a #GFile</doc>
  37800. <type name="File" c:type="GFile*"/>
  37801. </parameter>
  37802. <parameter name="io_priority" transfer-ownership="none">
  37803. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  37804. <type name="gint" c:type="int"/>
  37805. </parameter>
  37806. <parameter name="cancellable"
  37807. transfer-ownership="none"
  37808. nullable="1"
  37809. allow-none="1">
  37810. <doc xml:space="preserve">optional #GCancellable object,
  37811. %NULL to ignore</doc>
  37812. <type name="Cancellable" c:type="GCancellable*"/>
  37813. </parameter>
  37814. <parameter name="callback"
  37815. transfer-ownership="none"
  37816. nullable="1"
  37817. allow-none="1"
  37818. scope="async"
  37819. closure="4">
  37820. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  37821. when the request is satisfied</doc>
  37822. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  37823. </parameter>
  37824. <parameter name="user_data"
  37825. transfer-ownership="none"
  37826. nullable="1"
  37827. allow-none="1"
  37828. closure="4">
  37829. <doc xml:space="preserve">the data to pass to callback function</doc>
  37830. <type name="gpointer" c:type="gpointer"/>
  37831. </parameter>
  37832. </parameters>
  37833. </callback>
  37834. </field>
  37835. <field name="find_enclosing_mount_finish">
  37836. <callback name="find_enclosing_mount_finish" throws="1">
  37837. <return-value transfer-ownership="full">
  37838. <doc xml:space="preserve">#GMount for given @file or %NULL on error.
  37839. Free the returned object with g_object_unref().</doc>
  37840. <type name="Mount" c:type="GMount*"/>
  37841. </return-value>
  37842. <parameters>
  37843. <parameter name="file" transfer-ownership="none">
  37844. <doc xml:space="preserve">a #GFile</doc>
  37845. <type name="File" c:type="GFile*"/>
  37846. </parameter>
  37847. <parameter name="res" transfer-ownership="none">
  37848. <doc xml:space="preserve">a #GAsyncResult</doc>
  37849. <type name="AsyncResult" c:type="GAsyncResult*"/>
  37850. </parameter>
  37851. </parameters>
  37852. </callback>
  37853. </field>
  37854. <field name="set_display_name">
  37855. <callback name="set_display_name" throws="1">
  37856. <return-value transfer-ownership="full">
  37857. <doc xml:space="preserve">a #GFile specifying what @file was renamed to,
  37858. or %NULL if there was an error.
  37859. Free the returned object with g_object_unref().</doc>
  37860. <type name="File" c:type="GFile*"/>
  37861. </return-value>
  37862. <parameters>
  37863. <parameter name="file" transfer-ownership="none">
  37864. <doc xml:space="preserve">input #GFile</doc>
  37865. <type name="File" c:type="GFile*"/>
  37866. </parameter>
  37867. <parameter name="display_name" transfer-ownership="none">
  37868. <doc xml:space="preserve">a string</doc>
  37869. <type name="utf8" c:type="const char*"/>
  37870. </parameter>
  37871. <parameter name="cancellable"
  37872. transfer-ownership="none"
  37873. nullable="1"
  37874. allow-none="1">
  37875. <doc xml:space="preserve">optional #GCancellable object,
  37876. %NULL to ignore</doc>
  37877. <type name="Cancellable" c:type="GCancellable*"/>
  37878. </parameter>
  37879. </parameters>
  37880. </callback>
  37881. </field>
  37882. <field name="set_display_name_async">
  37883. <callback name="set_display_name_async">
  37884. <return-value transfer-ownership="none">
  37885. <type name="none" c:type="void"/>
  37886. </return-value>
  37887. <parameters>
  37888. <parameter name="file" transfer-ownership="none">
  37889. <doc xml:space="preserve">input #GFile</doc>
  37890. <type name="File" c:type="GFile*"/>
  37891. </parameter>
  37892. <parameter name="display_name" transfer-ownership="none">
  37893. <doc xml:space="preserve">a string</doc>
  37894. <type name="utf8" c:type="const char*"/>
  37895. </parameter>
  37896. <parameter name="io_priority" transfer-ownership="none">
  37897. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  37898. <type name="gint" c:type="int"/>
  37899. </parameter>
  37900. <parameter name="cancellable"
  37901. transfer-ownership="none"
  37902. nullable="1"
  37903. allow-none="1">
  37904. <doc xml:space="preserve">optional #GCancellable object,
  37905. %NULL to ignore</doc>
  37906. <type name="Cancellable" c:type="GCancellable*"/>
  37907. </parameter>
  37908. <parameter name="callback"
  37909. transfer-ownership="none"
  37910. nullable="1"
  37911. allow-none="1"
  37912. scope="async"
  37913. closure="5">
  37914. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  37915. when the request is satisfied</doc>
  37916. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  37917. </parameter>
  37918. <parameter name="user_data"
  37919. transfer-ownership="none"
  37920. nullable="1"
  37921. allow-none="1"
  37922. closure="5">
  37923. <doc xml:space="preserve">the data to pass to callback function</doc>
  37924. <type name="gpointer" c:type="gpointer"/>
  37925. </parameter>
  37926. </parameters>
  37927. </callback>
  37928. </field>
  37929. <field name="set_display_name_finish">
  37930. <callback name="set_display_name_finish" throws="1">
  37931. <return-value transfer-ownership="full">
  37932. <doc xml:space="preserve">a #GFile or %NULL on error.
  37933. Free the returned object with g_object_unref().</doc>
  37934. <type name="File" c:type="GFile*"/>
  37935. </return-value>
  37936. <parameters>
  37937. <parameter name="file" transfer-ownership="none">
  37938. <doc xml:space="preserve">input #GFile</doc>
  37939. <type name="File" c:type="GFile*"/>
  37940. </parameter>
  37941. <parameter name="res" transfer-ownership="none">
  37942. <doc xml:space="preserve">a #GAsyncResult</doc>
  37943. <type name="AsyncResult" c:type="GAsyncResult*"/>
  37944. </parameter>
  37945. </parameters>
  37946. </callback>
  37947. </field>
  37948. <field name="query_settable_attributes">
  37949. <callback name="query_settable_attributes" throws="1">
  37950. <return-value transfer-ownership="full">
  37951. <doc xml:space="preserve">a #GFileAttributeInfoList describing the settable attributes.
  37952. When you are done with it, release it with
  37953. g_file_attribute_info_list_unref()</doc>
  37954. <type name="FileAttributeInfoList"
  37955. c:type="GFileAttributeInfoList*"/>
  37956. </return-value>
  37957. <parameters>
  37958. <parameter name="file" transfer-ownership="none">
  37959. <doc xml:space="preserve">input #GFile</doc>
  37960. <type name="File" c:type="GFile*"/>
  37961. </parameter>
  37962. <parameter name="cancellable"
  37963. transfer-ownership="none"
  37964. nullable="1"
  37965. allow-none="1">
  37966. <doc xml:space="preserve">optional #GCancellable object,
  37967. %NULL to ignore</doc>
  37968. <type name="Cancellable" c:type="GCancellable*"/>
  37969. </parameter>
  37970. </parameters>
  37971. </callback>
  37972. </field>
  37973. <field name="_query_settable_attributes_async" introspectable="0">
  37974. <callback name="_query_settable_attributes_async">
  37975. <return-value transfer-ownership="none">
  37976. <type name="none" c:type="void"/>
  37977. </return-value>
  37978. </callback>
  37979. </field>
  37980. <field name="_query_settable_attributes_finish" introspectable="0">
  37981. <callback name="_query_settable_attributes_finish">
  37982. <return-value transfer-ownership="none">
  37983. <type name="none" c:type="void"/>
  37984. </return-value>
  37985. </callback>
  37986. </field>
  37987. <field name="query_writable_namespaces">
  37988. <callback name="query_writable_namespaces" throws="1">
  37989. <return-value transfer-ownership="full">
  37990. <doc xml:space="preserve">a #GFileAttributeInfoList describing the writable namespaces.
  37991. When you are done with it, release it with
  37992. g_file_attribute_info_list_unref()</doc>
  37993. <type name="FileAttributeInfoList"
  37994. c:type="GFileAttributeInfoList*"/>
  37995. </return-value>
  37996. <parameters>
  37997. <parameter name="file" transfer-ownership="none">
  37998. <doc xml:space="preserve">input #GFile</doc>
  37999. <type name="File" c:type="GFile*"/>
  38000. </parameter>
  38001. <parameter name="cancellable"
  38002. transfer-ownership="none"
  38003. nullable="1"
  38004. allow-none="1">
  38005. <doc xml:space="preserve">optional #GCancellable object,
  38006. %NULL to ignore</doc>
  38007. <type name="Cancellable" c:type="GCancellable*"/>
  38008. </parameter>
  38009. </parameters>
  38010. </callback>
  38011. </field>
  38012. <field name="_query_writable_namespaces_async" introspectable="0">
  38013. <callback name="_query_writable_namespaces_async">
  38014. <return-value transfer-ownership="none">
  38015. <type name="none" c:type="void"/>
  38016. </return-value>
  38017. </callback>
  38018. </field>
  38019. <field name="_query_writable_namespaces_finish" introspectable="0">
  38020. <callback name="_query_writable_namespaces_finish">
  38021. <return-value transfer-ownership="none">
  38022. <type name="none" c:type="void"/>
  38023. </return-value>
  38024. </callback>
  38025. </field>
  38026. <field name="set_attribute">
  38027. <callback name="set_attribute" throws="1">
  38028. <return-value transfer-ownership="none">
  38029. <doc xml:space="preserve">%TRUE if the attribute was set, %FALSE otherwise.</doc>
  38030. <type name="gboolean" c:type="gboolean"/>
  38031. </return-value>
  38032. <parameters>
  38033. <parameter name="file" transfer-ownership="none">
  38034. <doc xml:space="preserve">input #GFile</doc>
  38035. <type name="File" c:type="GFile*"/>
  38036. </parameter>
  38037. <parameter name="attribute" transfer-ownership="none">
  38038. <doc xml:space="preserve">a string containing the attribute's name</doc>
  38039. <type name="utf8" c:type="const char*"/>
  38040. </parameter>
  38041. <parameter name="type" transfer-ownership="none">
  38042. <doc xml:space="preserve">The type of the attribute</doc>
  38043. <type name="FileAttributeType" c:type="GFileAttributeType"/>
  38044. </parameter>
  38045. <parameter name="value_p"
  38046. transfer-ownership="none"
  38047. nullable="1"
  38048. allow-none="1">
  38049. <doc xml:space="preserve">a pointer to the value (or the pointer
  38050. itself if the type is a pointer type)</doc>
  38051. <type name="gpointer" c:type="gpointer"/>
  38052. </parameter>
  38053. <parameter name="flags" transfer-ownership="none">
  38054. <doc xml:space="preserve">a set of #GFileQueryInfoFlags</doc>
  38055. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  38056. </parameter>
  38057. <parameter name="cancellable"
  38058. transfer-ownership="none"
  38059. nullable="1"
  38060. allow-none="1">
  38061. <doc xml:space="preserve">optional #GCancellable object,
  38062. %NULL to ignore</doc>
  38063. <type name="Cancellable" c:type="GCancellable*"/>
  38064. </parameter>
  38065. </parameters>
  38066. </callback>
  38067. </field>
  38068. <field name="set_attributes_from_info">
  38069. <callback name="set_attributes_from_info" throws="1">
  38070. <return-value transfer-ownership="none">
  38071. <doc xml:space="preserve">%FALSE if there was any error, %TRUE otherwise.</doc>
  38072. <type name="gboolean" c:type="gboolean"/>
  38073. </return-value>
  38074. <parameters>
  38075. <parameter name="file" transfer-ownership="none">
  38076. <doc xml:space="preserve">input #GFile</doc>
  38077. <type name="File" c:type="GFile*"/>
  38078. </parameter>
  38079. <parameter name="info" transfer-ownership="none">
  38080. <doc xml:space="preserve">a #GFileInfo</doc>
  38081. <type name="FileInfo" c:type="GFileInfo*"/>
  38082. </parameter>
  38083. <parameter name="flags" transfer-ownership="none">
  38084. <doc xml:space="preserve">#GFileQueryInfoFlags</doc>
  38085. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  38086. </parameter>
  38087. <parameter name="cancellable"
  38088. transfer-ownership="none"
  38089. nullable="1"
  38090. allow-none="1">
  38091. <doc xml:space="preserve">optional #GCancellable object,
  38092. %NULL to ignore</doc>
  38093. <type name="Cancellable" c:type="GCancellable*"/>
  38094. </parameter>
  38095. </parameters>
  38096. </callback>
  38097. </field>
  38098. <field name="set_attributes_async">
  38099. <callback name="set_attributes_async">
  38100. <return-value transfer-ownership="none">
  38101. <type name="none" c:type="void"/>
  38102. </return-value>
  38103. <parameters>
  38104. <parameter name="file" transfer-ownership="none">
  38105. <doc xml:space="preserve">input #GFile</doc>
  38106. <type name="File" c:type="GFile*"/>
  38107. </parameter>
  38108. <parameter name="info" transfer-ownership="none">
  38109. <doc xml:space="preserve">a #GFileInfo</doc>
  38110. <type name="FileInfo" c:type="GFileInfo*"/>
  38111. </parameter>
  38112. <parameter name="flags" transfer-ownership="none">
  38113. <doc xml:space="preserve">a #GFileQueryInfoFlags</doc>
  38114. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  38115. </parameter>
  38116. <parameter name="io_priority" transfer-ownership="none">
  38117. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38118. <type name="gint" c:type="int"/>
  38119. </parameter>
  38120. <parameter name="cancellable"
  38121. transfer-ownership="none"
  38122. nullable="1"
  38123. allow-none="1">
  38124. <doc xml:space="preserve">optional #GCancellable object,
  38125. %NULL to ignore</doc>
  38126. <type name="Cancellable" c:type="GCancellable*"/>
  38127. </parameter>
  38128. <parameter name="callback"
  38129. transfer-ownership="none"
  38130. nullable="1"
  38131. allow-none="1"
  38132. scope="async"
  38133. closure="6">
  38134. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  38135. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38136. </parameter>
  38137. <parameter name="user_data"
  38138. transfer-ownership="none"
  38139. nullable="1"
  38140. allow-none="1"
  38141. closure="6">
  38142. <doc xml:space="preserve">a #gpointer</doc>
  38143. <type name="gpointer" c:type="gpointer"/>
  38144. </parameter>
  38145. </parameters>
  38146. </callback>
  38147. </field>
  38148. <field name="set_attributes_finish">
  38149. <callback name="set_attributes_finish" throws="1">
  38150. <return-value transfer-ownership="none">
  38151. <doc xml:space="preserve">%TRUE if the attributes were set correctly, %FALSE otherwise.</doc>
  38152. <type name="gboolean" c:type="gboolean"/>
  38153. </return-value>
  38154. <parameters>
  38155. <parameter name="file" transfer-ownership="none">
  38156. <doc xml:space="preserve">input #GFile</doc>
  38157. <type name="File" c:type="GFile*"/>
  38158. </parameter>
  38159. <parameter name="result" transfer-ownership="none">
  38160. <doc xml:space="preserve">a #GAsyncResult</doc>
  38161. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38162. </parameter>
  38163. <parameter name="info"
  38164. direction="out"
  38165. caller-allocates="0"
  38166. transfer-ownership="full">
  38167. <doc xml:space="preserve">a #GFileInfo</doc>
  38168. <type name="FileInfo" c:type="GFileInfo**"/>
  38169. </parameter>
  38170. </parameters>
  38171. </callback>
  38172. </field>
  38173. <field name="read_fn">
  38174. <callback name="read_fn" throws="1">
  38175. <return-value transfer-ownership="full">
  38176. <doc xml:space="preserve">#GFileInputStream or %NULL on error.
  38177. Free the returned object with g_object_unref().</doc>
  38178. <type name="FileInputStream" c:type="GFileInputStream*"/>
  38179. </return-value>
  38180. <parameters>
  38181. <parameter name="file" transfer-ownership="none">
  38182. <doc xml:space="preserve">#GFile to read</doc>
  38183. <type name="File" c:type="GFile*"/>
  38184. </parameter>
  38185. <parameter name="cancellable"
  38186. transfer-ownership="none"
  38187. nullable="1"
  38188. allow-none="1">
  38189. <doc xml:space="preserve">a #GCancellable</doc>
  38190. <type name="Cancellable" c:type="GCancellable*"/>
  38191. </parameter>
  38192. </parameters>
  38193. </callback>
  38194. </field>
  38195. <field name="read_async">
  38196. <callback name="read_async">
  38197. <return-value transfer-ownership="none">
  38198. <type name="none" c:type="void"/>
  38199. </return-value>
  38200. <parameters>
  38201. <parameter name="file" transfer-ownership="none">
  38202. <doc xml:space="preserve">input #GFile</doc>
  38203. <type name="File" c:type="GFile*"/>
  38204. </parameter>
  38205. <parameter name="io_priority" transfer-ownership="none">
  38206. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38207. <type name="gint" c:type="int"/>
  38208. </parameter>
  38209. <parameter name="cancellable"
  38210. transfer-ownership="none"
  38211. nullable="1"
  38212. allow-none="1">
  38213. <doc xml:space="preserve">optional #GCancellable object,
  38214. %NULL to ignore</doc>
  38215. <type name="Cancellable" c:type="GCancellable*"/>
  38216. </parameter>
  38217. <parameter name="callback"
  38218. transfer-ownership="none"
  38219. nullable="1"
  38220. allow-none="1"
  38221. scope="async"
  38222. closure="4">
  38223. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  38224. when the request is satisfied</doc>
  38225. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38226. </parameter>
  38227. <parameter name="user_data"
  38228. transfer-ownership="none"
  38229. nullable="1"
  38230. allow-none="1"
  38231. closure="4">
  38232. <doc xml:space="preserve">the data to pass to callback function</doc>
  38233. <type name="gpointer" c:type="gpointer"/>
  38234. </parameter>
  38235. </parameters>
  38236. </callback>
  38237. </field>
  38238. <field name="read_finish">
  38239. <callback name="read_finish" throws="1">
  38240. <return-value transfer-ownership="full">
  38241. <doc xml:space="preserve">a #GFileInputStream or %NULL on error.
  38242. Free the returned object with g_object_unref().</doc>
  38243. <type name="FileInputStream" c:type="GFileInputStream*"/>
  38244. </return-value>
  38245. <parameters>
  38246. <parameter name="file" transfer-ownership="none">
  38247. <doc xml:space="preserve">input #GFile</doc>
  38248. <type name="File" c:type="GFile*"/>
  38249. </parameter>
  38250. <parameter name="res" transfer-ownership="none">
  38251. <doc xml:space="preserve">a #GAsyncResult</doc>
  38252. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38253. </parameter>
  38254. </parameters>
  38255. </callback>
  38256. </field>
  38257. <field name="append_to">
  38258. <callback name="append_to" throws="1">
  38259. <return-value transfer-ownership="full">
  38260. <doc xml:space="preserve">a #GFileOutputStream, or %NULL on error.
  38261. Free the returned object with g_object_unref().</doc>
  38262. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  38263. </return-value>
  38264. <parameters>
  38265. <parameter name="file" transfer-ownership="none">
  38266. <doc xml:space="preserve">input #GFile</doc>
  38267. <type name="File" c:type="GFile*"/>
  38268. </parameter>
  38269. <parameter name="flags" transfer-ownership="none">
  38270. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  38271. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  38272. </parameter>
  38273. <parameter name="cancellable"
  38274. transfer-ownership="none"
  38275. nullable="1"
  38276. allow-none="1">
  38277. <doc xml:space="preserve">optional #GCancellable object,
  38278. %NULL to ignore</doc>
  38279. <type name="Cancellable" c:type="GCancellable*"/>
  38280. </parameter>
  38281. </parameters>
  38282. </callback>
  38283. </field>
  38284. <field name="append_to_async">
  38285. <callback name="append_to_async">
  38286. <return-value transfer-ownership="none">
  38287. <type name="none" c:type="void"/>
  38288. </return-value>
  38289. <parameters>
  38290. <parameter name="file" transfer-ownership="none">
  38291. <doc xml:space="preserve">input #GFile</doc>
  38292. <type name="File" c:type="GFile*"/>
  38293. </parameter>
  38294. <parameter name="flags" transfer-ownership="none">
  38295. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  38296. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  38297. </parameter>
  38298. <parameter name="io_priority" transfer-ownership="none">
  38299. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38300. <type name="gint" c:type="int"/>
  38301. </parameter>
  38302. <parameter name="cancellable"
  38303. transfer-ownership="none"
  38304. nullable="1"
  38305. allow-none="1">
  38306. <doc xml:space="preserve">optional #GCancellable object,
  38307. %NULL to ignore</doc>
  38308. <type name="Cancellable" c:type="GCancellable*"/>
  38309. </parameter>
  38310. <parameter name="callback"
  38311. transfer-ownership="none"
  38312. nullable="1"
  38313. allow-none="1"
  38314. scope="async"
  38315. closure="5">
  38316. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  38317. when the request is satisfied</doc>
  38318. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38319. </parameter>
  38320. <parameter name="user_data"
  38321. transfer-ownership="none"
  38322. nullable="1"
  38323. allow-none="1"
  38324. closure="5">
  38325. <doc xml:space="preserve">the data to pass to callback function</doc>
  38326. <type name="gpointer" c:type="gpointer"/>
  38327. </parameter>
  38328. </parameters>
  38329. </callback>
  38330. </field>
  38331. <field name="append_to_finish">
  38332. <callback name="append_to_finish" throws="1">
  38333. <return-value transfer-ownership="full">
  38334. <doc xml:space="preserve">a valid #GFileOutputStream
  38335. or %NULL on error.
  38336. Free the returned object with g_object_unref().</doc>
  38337. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  38338. </return-value>
  38339. <parameters>
  38340. <parameter name="file" transfer-ownership="none">
  38341. <doc xml:space="preserve">input #GFile</doc>
  38342. <type name="File" c:type="GFile*"/>
  38343. </parameter>
  38344. <parameter name="res" transfer-ownership="none">
  38345. <doc xml:space="preserve">#GAsyncResult</doc>
  38346. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38347. </parameter>
  38348. </parameters>
  38349. </callback>
  38350. </field>
  38351. <field name="create">
  38352. <callback name="create" throws="1">
  38353. <return-value transfer-ownership="full">
  38354. <doc xml:space="preserve">a #GFileOutputStream for the newly created
  38355. file, or %NULL on error.
  38356. Free the returned object with g_object_unref().</doc>
  38357. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  38358. </return-value>
  38359. <parameters>
  38360. <parameter name="file" transfer-ownership="none">
  38361. <doc xml:space="preserve">input #GFile</doc>
  38362. <type name="File" c:type="GFile*"/>
  38363. </parameter>
  38364. <parameter name="flags" transfer-ownership="none">
  38365. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  38366. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  38367. </parameter>
  38368. <parameter name="cancellable"
  38369. transfer-ownership="none"
  38370. nullable="1"
  38371. allow-none="1">
  38372. <doc xml:space="preserve">optional #GCancellable object,
  38373. %NULL to ignore</doc>
  38374. <type name="Cancellable" c:type="GCancellable*"/>
  38375. </parameter>
  38376. </parameters>
  38377. </callback>
  38378. </field>
  38379. <field name="create_async">
  38380. <callback name="create_async">
  38381. <return-value transfer-ownership="none">
  38382. <type name="none" c:type="void"/>
  38383. </return-value>
  38384. <parameters>
  38385. <parameter name="file" transfer-ownership="none">
  38386. <doc xml:space="preserve">input #GFile</doc>
  38387. <type name="File" c:type="GFile*"/>
  38388. </parameter>
  38389. <parameter name="flags" transfer-ownership="none">
  38390. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  38391. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  38392. </parameter>
  38393. <parameter name="io_priority" transfer-ownership="none">
  38394. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38395. <type name="gint" c:type="int"/>
  38396. </parameter>
  38397. <parameter name="cancellable"
  38398. transfer-ownership="none"
  38399. nullable="1"
  38400. allow-none="1">
  38401. <doc xml:space="preserve">optional #GCancellable object,
  38402. %NULL to ignore</doc>
  38403. <type name="Cancellable" c:type="GCancellable*"/>
  38404. </parameter>
  38405. <parameter name="callback"
  38406. transfer-ownership="none"
  38407. nullable="1"
  38408. allow-none="1"
  38409. scope="async"
  38410. closure="5">
  38411. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  38412. when the request is satisfied</doc>
  38413. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38414. </parameter>
  38415. <parameter name="user_data"
  38416. transfer-ownership="none"
  38417. nullable="1"
  38418. allow-none="1"
  38419. closure="5">
  38420. <doc xml:space="preserve">the data to pass to callback function</doc>
  38421. <type name="gpointer" c:type="gpointer"/>
  38422. </parameter>
  38423. </parameters>
  38424. </callback>
  38425. </field>
  38426. <field name="create_finish">
  38427. <callback name="create_finish" throws="1">
  38428. <return-value transfer-ownership="full">
  38429. <doc xml:space="preserve">a #GFileOutputStream or %NULL on error.
  38430. Free the returned object with g_object_unref().</doc>
  38431. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  38432. </return-value>
  38433. <parameters>
  38434. <parameter name="file" transfer-ownership="none">
  38435. <doc xml:space="preserve">input #GFile</doc>
  38436. <type name="File" c:type="GFile*"/>
  38437. </parameter>
  38438. <parameter name="res" transfer-ownership="none">
  38439. <doc xml:space="preserve">a #GAsyncResult</doc>
  38440. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38441. </parameter>
  38442. </parameters>
  38443. </callback>
  38444. </field>
  38445. <field name="replace">
  38446. <callback name="replace" throws="1">
  38447. <return-value transfer-ownership="full">
  38448. <doc xml:space="preserve">a #GFileOutputStream or %NULL on error.
  38449. Free the returned object with g_object_unref().</doc>
  38450. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  38451. </return-value>
  38452. <parameters>
  38453. <parameter name="file" transfer-ownership="none">
  38454. <doc xml:space="preserve">input #GFile</doc>
  38455. <type name="File" c:type="GFile*"/>
  38456. </parameter>
  38457. <parameter name="etag"
  38458. transfer-ownership="none"
  38459. nullable="1"
  38460. allow-none="1">
  38461. <doc xml:space="preserve">an optional [entity tag][gfile-etag]
  38462. for the current #GFile, or #NULL to ignore</doc>
  38463. <type name="utf8" c:type="const char*"/>
  38464. </parameter>
  38465. <parameter name="make_backup" transfer-ownership="none">
  38466. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  38467. <type name="gboolean" c:type="gboolean"/>
  38468. </parameter>
  38469. <parameter name="flags" transfer-ownership="none">
  38470. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  38471. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  38472. </parameter>
  38473. <parameter name="cancellable"
  38474. transfer-ownership="none"
  38475. nullable="1"
  38476. allow-none="1">
  38477. <doc xml:space="preserve">optional #GCancellable object,
  38478. %NULL to ignore</doc>
  38479. <type name="Cancellable" c:type="GCancellable*"/>
  38480. </parameter>
  38481. </parameters>
  38482. </callback>
  38483. </field>
  38484. <field name="replace_async">
  38485. <callback name="replace_async">
  38486. <return-value transfer-ownership="none">
  38487. <type name="none" c:type="void"/>
  38488. </return-value>
  38489. <parameters>
  38490. <parameter name="file" transfer-ownership="none">
  38491. <doc xml:space="preserve">input #GFile</doc>
  38492. <type name="File" c:type="GFile*"/>
  38493. </parameter>
  38494. <parameter name="etag"
  38495. transfer-ownership="none"
  38496. nullable="1"
  38497. allow-none="1">
  38498. <doc xml:space="preserve">an [entity tag][gfile-etag] for the current #GFile,
  38499. or %NULL to ignore</doc>
  38500. <type name="utf8" c:type="const char*"/>
  38501. </parameter>
  38502. <parameter name="make_backup" transfer-ownership="none">
  38503. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  38504. <type name="gboolean" c:type="gboolean"/>
  38505. </parameter>
  38506. <parameter name="flags" transfer-ownership="none">
  38507. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  38508. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  38509. </parameter>
  38510. <parameter name="io_priority" transfer-ownership="none">
  38511. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38512. <type name="gint" c:type="int"/>
  38513. </parameter>
  38514. <parameter name="cancellable"
  38515. transfer-ownership="none"
  38516. nullable="1"
  38517. allow-none="1">
  38518. <doc xml:space="preserve">optional #GCancellable object,
  38519. %NULL to ignore</doc>
  38520. <type name="Cancellable" c:type="GCancellable*"/>
  38521. </parameter>
  38522. <parameter name="callback"
  38523. transfer-ownership="none"
  38524. nullable="1"
  38525. allow-none="1"
  38526. scope="async"
  38527. closure="7">
  38528. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  38529. when the request is satisfied</doc>
  38530. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38531. </parameter>
  38532. <parameter name="user_data"
  38533. transfer-ownership="none"
  38534. nullable="1"
  38535. allow-none="1"
  38536. closure="7">
  38537. <doc xml:space="preserve">the data to pass to callback function</doc>
  38538. <type name="gpointer" c:type="gpointer"/>
  38539. </parameter>
  38540. </parameters>
  38541. </callback>
  38542. </field>
  38543. <field name="replace_finish">
  38544. <callback name="replace_finish" throws="1">
  38545. <return-value transfer-ownership="full">
  38546. <doc xml:space="preserve">a #GFileOutputStream, or %NULL on error.
  38547. Free the returned object with g_object_unref().</doc>
  38548. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  38549. </return-value>
  38550. <parameters>
  38551. <parameter name="file" transfer-ownership="none">
  38552. <doc xml:space="preserve">input #GFile</doc>
  38553. <type name="File" c:type="GFile*"/>
  38554. </parameter>
  38555. <parameter name="res" transfer-ownership="none">
  38556. <doc xml:space="preserve">a #GAsyncResult</doc>
  38557. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38558. </parameter>
  38559. </parameters>
  38560. </callback>
  38561. </field>
  38562. <field name="delete_file">
  38563. <callback name="delete_file" throws="1">
  38564. <return-value transfer-ownership="none">
  38565. <doc xml:space="preserve">%TRUE if the file was deleted. %FALSE otherwise.</doc>
  38566. <type name="gboolean" c:type="gboolean"/>
  38567. </return-value>
  38568. <parameters>
  38569. <parameter name="file" transfer-ownership="none">
  38570. <doc xml:space="preserve">input #GFile</doc>
  38571. <type name="File" c:type="GFile*"/>
  38572. </parameter>
  38573. <parameter name="cancellable"
  38574. transfer-ownership="none"
  38575. nullable="1"
  38576. allow-none="1">
  38577. <doc xml:space="preserve">optional #GCancellable object,
  38578. %NULL to ignore</doc>
  38579. <type name="Cancellable" c:type="GCancellable*"/>
  38580. </parameter>
  38581. </parameters>
  38582. </callback>
  38583. </field>
  38584. <field name="delete_file_async">
  38585. <callback name="delete_file_async">
  38586. <return-value transfer-ownership="none">
  38587. <type name="none" c:type="void"/>
  38588. </return-value>
  38589. <parameters>
  38590. <parameter name="file" transfer-ownership="none">
  38591. <doc xml:space="preserve">input #GFile</doc>
  38592. <type name="File" c:type="GFile*"/>
  38593. </parameter>
  38594. <parameter name="io_priority" transfer-ownership="none">
  38595. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38596. <type name="gint" c:type="int"/>
  38597. </parameter>
  38598. <parameter name="cancellable"
  38599. transfer-ownership="none"
  38600. nullable="1"
  38601. allow-none="1">
  38602. <doc xml:space="preserve">optional #GCancellable object,
  38603. %NULL to ignore</doc>
  38604. <type name="Cancellable" c:type="GCancellable*"/>
  38605. </parameter>
  38606. <parameter name="callback"
  38607. transfer-ownership="none"
  38608. nullable="1"
  38609. allow-none="1"
  38610. scope="async"
  38611. closure="4">
  38612. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  38613. when the request is satisfied</doc>
  38614. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38615. </parameter>
  38616. <parameter name="user_data"
  38617. transfer-ownership="none"
  38618. nullable="1"
  38619. allow-none="1"
  38620. closure="4">
  38621. <doc xml:space="preserve">the data to pass to callback function</doc>
  38622. <type name="gpointer" c:type="gpointer"/>
  38623. </parameter>
  38624. </parameters>
  38625. </callback>
  38626. </field>
  38627. <field name="delete_file_finish">
  38628. <callback name="delete_file_finish" throws="1">
  38629. <return-value transfer-ownership="none">
  38630. <doc xml:space="preserve">%TRUE if the file was deleted. %FALSE otherwise.</doc>
  38631. <type name="gboolean" c:type="gboolean"/>
  38632. </return-value>
  38633. <parameters>
  38634. <parameter name="file" transfer-ownership="none">
  38635. <doc xml:space="preserve">input #GFile</doc>
  38636. <type name="File" c:type="GFile*"/>
  38637. </parameter>
  38638. <parameter name="result" transfer-ownership="none">
  38639. <doc xml:space="preserve">a #GAsyncResult</doc>
  38640. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38641. </parameter>
  38642. </parameters>
  38643. </callback>
  38644. </field>
  38645. <field name="trash">
  38646. <callback name="trash" throws="1">
  38647. <return-value transfer-ownership="none">
  38648. <doc xml:space="preserve">%TRUE on successful trash, %FALSE otherwise.</doc>
  38649. <type name="gboolean" c:type="gboolean"/>
  38650. </return-value>
  38651. <parameters>
  38652. <parameter name="file" transfer-ownership="none">
  38653. <doc xml:space="preserve">#GFile to send to trash</doc>
  38654. <type name="File" c:type="GFile*"/>
  38655. </parameter>
  38656. <parameter name="cancellable"
  38657. transfer-ownership="none"
  38658. nullable="1"
  38659. allow-none="1">
  38660. <doc xml:space="preserve">optional #GCancellable object,
  38661. %NULL to ignore</doc>
  38662. <type name="Cancellable" c:type="GCancellable*"/>
  38663. </parameter>
  38664. </parameters>
  38665. </callback>
  38666. </field>
  38667. <field name="trash_async">
  38668. <callback name="trash_async">
  38669. <return-value transfer-ownership="none">
  38670. <type name="none" c:type="void"/>
  38671. </return-value>
  38672. <parameters>
  38673. <parameter name="file" transfer-ownership="none">
  38674. <doc xml:space="preserve">input #GFile</doc>
  38675. <type name="File" c:type="GFile*"/>
  38676. </parameter>
  38677. <parameter name="io_priority" transfer-ownership="none">
  38678. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38679. <type name="gint" c:type="int"/>
  38680. </parameter>
  38681. <parameter name="cancellable"
  38682. transfer-ownership="none"
  38683. nullable="1"
  38684. allow-none="1">
  38685. <doc xml:space="preserve">optional #GCancellable object,
  38686. %NULL to ignore</doc>
  38687. <type name="Cancellable" c:type="GCancellable*"/>
  38688. </parameter>
  38689. <parameter name="callback"
  38690. transfer-ownership="none"
  38691. nullable="1"
  38692. allow-none="1"
  38693. scope="async"
  38694. closure="4">
  38695. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  38696. when the request is satisfied</doc>
  38697. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38698. </parameter>
  38699. <parameter name="user_data"
  38700. transfer-ownership="none"
  38701. nullable="1"
  38702. allow-none="1"
  38703. closure="4">
  38704. <doc xml:space="preserve">the data to pass to callback function</doc>
  38705. <type name="gpointer" c:type="gpointer"/>
  38706. </parameter>
  38707. </parameters>
  38708. </callback>
  38709. </field>
  38710. <field name="trash_finish">
  38711. <callback name="trash_finish" throws="1">
  38712. <return-value transfer-ownership="none">
  38713. <doc xml:space="preserve">%TRUE on successful trash, %FALSE otherwise.</doc>
  38714. <type name="gboolean" c:type="gboolean"/>
  38715. </return-value>
  38716. <parameters>
  38717. <parameter name="file" transfer-ownership="none">
  38718. <doc xml:space="preserve">input #GFile</doc>
  38719. <type name="File" c:type="GFile*"/>
  38720. </parameter>
  38721. <parameter name="result" transfer-ownership="none">
  38722. <doc xml:space="preserve">a #GAsyncResult</doc>
  38723. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38724. </parameter>
  38725. </parameters>
  38726. </callback>
  38727. </field>
  38728. <field name="make_directory">
  38729. <callback name="make_directory" throws="1">
  38730. <return-value transfer-ownership="none">
  38731. <doc xml:space="preserve">%TRUE on successful creation, %FALSE otherwise.</doc>
  38732. <type name="gboolean" c:type="gboolean"/>
  38733. </return-value>
  38734. <parameters>
  38735. <parameter name="file" transfer-ownership="none">
  38736. <doc xml:space="preserve">input #GFile</doc>
  38737. <type name="File" c:type="GFile*"/>
  38738. </parameter>
  38739. <parameter name="cancellable"
  38740. transfer-ownership="none"
  38741. nullable="1"
  38742. allow-none="1">
  38743. <doc xml:space="preserve">optional #GCancellable object,
  38744. %NULL to ignore</doc>
  38745. <type name="Cancellable" c:type="GCancellable*"/>
  38746. </parameter>
  38747. </parameters>
  38748. </callback>
  38749. </field>
  38750. <field name="make_directory_async">
  38751. <callback name="make_directory_async">
  38752. <return-value transfer-ownership="none">
  38753. <type name="none" c:type="void"/>
  38754. </return-value>
  38755. <parameters>
  38756. <parameter name="file" transfer-ownership="none">
  38757. <doc xml:space="preserve">input #GFile</doc>
  38758. <type name="File" c:type="GFile*"/>
  38759. </parameter>
  38760. <parameter name="io_priority" transfer-ownership="none">
  38761. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38762. <type name="gint" c:type="int"/>
  38763. </parameter>
  38764. <parameter name="cancellable"
  38765. transfer-ownership="none"
  38766. nullable="1"
  38767. allow-none="1">
  38768. <doc xml:space="preserve">optional #GCancellable object,
  38769. %NULL to ignore</doc>
  38770. <type name="Cancellable" c:type="GCancellable*"/>
  38771. </parameter>
  38772. <parameter name="callback"
  38773. transfer-ownership="none"
  38774. nullable="1"
  38775. allow-none="1"
  38776. scope="async"
  38777. closure="4">
  38778. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  38779. when the request is satisfied</doc>
  38780. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38781. </parameter>
  38782. <parameter name="user_data"
  38783. transfer-ownership="none"
  38784. nullable="1"
  38785. allow-none="1"
  38786. closure="4">
  38787. <doc xml:space="preserve">the data to pass to callback function</doc>
  38788. <type name="gpointer" c:type="gpointer"/>
  38789. </parameter>
  38790. </parameters>
  38791. </callback>
  38792. </field>
  38793. <field name="make_directory_finish">
  38794. <callback name="make_directory_finish" throws="1">
  38795. <return-value transfer-ownership="none">
  38796. <doc xml:space="preserve">%TRUE on successful directory creation, %FALSE otherwise.</doc>
  38797. <type name="gboolean" c:type="gboolean"/>
  38798. </return-value>
  38799. <parameters>
  38800. <parameter name="file" transfer-ownership="none">
  38801. <doc xml:space="preserve">input #GFile</doc>
  38802. <type name="File" c:type="GFile*"/>
  38803. </parameter>
  38804. <parameter name="result" transfer-ownership="none">
  38805. <doc xml:space="preserve">a #GAsyncResult</doc>
  38806. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38807. </parameter>
  38808. </parameters>
  38809. </callback>
  38810. </field>
  38811. <field name="make_symbolic_link">
  38812. <callback name="make_symbolic_link" throws="1">
  38813. <return-value transfer-ownership="none">
  38814. <doc xml:space="preserve">%TRUE on the creation of a new symlink, %FALSE otherwise.</doc>
  38815. <type name="gboolean" c:type="gboolean"/>
  38816. </return-value>
  38817. <parameters>
  38818. <parameter name="file" transfer-ownership="none">
  38819. <doc xml:space="preserve">a #GFile with the name of the symlink to create</doc>
  38820. <type name="File" c:type="GFile*"/>
  38821. </parameter>
  38822. <parameter name="symlink_value" transfer-ownership="none">
  38823. <doc xml:space="preserve">a string with the path for the target of the new symlink</doc>
  38824. <type name="utf8" c:type="const char*"/>
  38825. </parameter>
  38826. <parameter name="cancellable"
  38827. transfer-ownership="none"
  38828. nullable="1"
  38829. allow-none="1">
  38830. <doc xml:space="preserve">optional #GCancellable object,
  38831. %NULL to ignore</doc>
  38832. <type name="Cancellable" c:type="GCancellable*"/>
  38833. </parameter>
  38834. </parameters>
  38835. </callback>
  38836. </field>
  38837. <field name="_make_symbolic_link_async" introspectable="0">
  38838. <callback name="_make_symbolic_link_async">
  38839. <return-value transfer-ownership="none">
  38840. <type name="none" c:type="void"/>
  38841. </return-value>
  38842. </callback>
  38843. </field>
  38844. <field name="_make_symbolic_link_finish" introspectable="0">
  38845. <callback name="_make_symbolic_link_finish">
  38846. <return-value transfer-ownership="none">
  38847. <type name="none" c:type="void"/>
  38848. </return-value>
  38849. </callback>
  38850. </field>
  38851. <field name="copy">
  38852. <callback name="copy" throws="1">
  38853. <return-value transfer-ownership="none">
  38854. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise.</doc>
  38855. <type name="gboolean" c:type="gboolean"/>
  38856. </return-value>
  38857. <parameters>
  38858. <parameter name="source" transfer-ownership="none">
  38859. <doc xml:space="preserve">input #GFile</doc>
  38860. <type name="File" c:type="GFile*"/>
  38861. </parameter>
  38862. <parameter name="destination" transfer-ownership="none">
  38863. <doc xml:space="preserve">destination #GFile</doc>
  38864. <type name="File" c:type="GFile*"/>
  38865. </parameter>
  38866. <parameter name="flags" transfer-ownership="none">
  38867. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  38868. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  38869. </parameter>
  38870. <parameter name="cancellable"
  38871. transfer-ownership="none"
  38872. nullable="1"
  38873. allow-none="1">
  38874. <doc xml:space="preserve">optional #GCancellable object,
  38875. %NULL to ignore</doc>
  38876. <type name="Cancellable" c:type="GCancellable*"/>
  38877. </parameter>
  38878. <parameter name="progress_callback"
  38879. transfer-ownership="none"
  38880. nullable="1"
  38881. allow-none="1"
  38882. scope="call"
  38883. closure="5">
  38884. <doc xml:space="preserve">function to callback with
  38885. progress information, or %NULL if progress information is not needed</doc>
  38886. <type name="FileProgressCallback"
  38887. c:type="GFileProgressCallback"/>
  38888. </parameter>
  38889. <parameter name="progress_callback_data"
  38890. transfer-ownership="none"
  38891. nullable="1"
  38892. allow-none="1">
  38893. <doc xml:space="preserve">user data to pass to @progress_callback</doc>
  38894. <type name="gpointer" c:type="gpointer"/>
  38895. </parameter>
  38896. </parameters>
  38897. </callback>
  38898. </field>
  38899. <field name="copy_async" introspectable="0">
  38900. <callback name="copy_async" introspectable="0">
  38901. <return-value transfer-ownership="none">
  38902. <type name="none" c:type="void"/>
  38903. </return-value>
  38904. <parameters>
  38905. <parameter name="source" transfer-ownership="none">
  38906. <doc xml:space="preserve">input #GFile</doc>
  38907. <type name="File" c:type="GFile*"/>
  38908. </parameter>
  38909. <parameter name="destination" transfer-ownership="none">
  38910. <doc xml:space="preserve">destination #GFile</doc>
  38911. <type name="File" c:type="GFile*"/>
  38912. </parameter>
  38913. <parameter name="flags" transfer-ownership="none">
  38914. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  38915. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  38916. </parameter>
  38917. <parameter name="io_priority" transfer-ownership="none">
  38918. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  38919. <type name="gint" c:type="int"/>
  38920. </parameter>
  38921. <parameter name="cancellable"
  38922. transfer-ownership="none"
  38923. nullable="1"
  38924. allow-none="1">
  38925. <doc xml:space="preserve">optional #GCancellable object,
  38926. %NULL to ignore</doc>
  38927. <type name="Cancellable" c:type="GCancellable*"/>
  38928. </parameter>
  38929. <parameter name="progress_callback"
  38930. transfer-ownership="none"
  38931. nullable="1"
  38932. allow-none="1"
  38933. closure="6">
  38934. <doc xml:space="preserve">function to callback with progress
  38935. information, or %NULL if progress information is not needed</doc>
  38936. <type name="FileProgressCallback"
  38937. c:type="GFileProgressCallback"/>
  38938. </parameter>
  38939. <parameter name="progress_callback_data"
  38940. transfer-ownership="none"
  38941. nullable="1"
  38942. allow-none="1">
  38943. <doc xml:space="preserve">user data to pass to @progress_callback</doc>
  38944. <type name="gpointer" c:type="gpointer"/>
  38945. </parameter>
  38946. <parameter name="callback"
  38947. transfer-ownership="none"
  38948. nullable="1"
  38949. allow-none="1"
  38950. scope="async"
  38951. closure="8">
  38952. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  38953. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  38954. </parameter>
  38955. <parameter name="user_data"
  38956. transfer-ownership="none"
  38957. nullable="1"
  38958. allow-none="1"
  38959. closure="8">
  38960. <doc xml:space="preserve">the data to pass to callback function</doc>
  38961. <type name="gpointer" c:type="gpointer"/>
  38962. </parameter>
  38963. </parameters>
  38964. </callback>
  38965. </field>
  38966. <field name="copy_finish">
  38967. <callback name="copy_finish" throws="1">
  38968. <return-value transfer-ownership="none">
  38969. <doc xml:space="preserve">a %TRUE on success, %FALSE on error.</doc>
  38970. <type name="gboolean" c:type="gboolean"/>
  38971. </return-value>
  38972. <parameters>
  38973. <parameter name="file" transfer-ownership="none">
  38974. <doc xml:space="preserve">input #GFile</doc>
  38975. <type name="File" c:type="GFile*"/>
  38976. </parameter>
  38977. <parameter name="res" transfer-ownership="none">
  38978. <doc xml:space="preserve">a #GAsyncResult</doc>
  38979. <type name="AsyncResult" c:type="GAsyncResult*"/>
  38980. </parameter>
  38981. </parameters>
  38982. </callback>
  38983. </field>
  38984. <field name="move">
  38985. <callback name="move" throws="1">
  38986. <return-value transfer-ownership="none">
  38987. <doc xml:space="preserve">%TRUE on successful move, %FALSE otherwise.</doc>
  38988. <type name="gboolean" c:type="gboolean"/>
  38989. </return-value>
  38990. <parameters>
  38991. <parameter name="source" transfer-ownership="none">
  38992. <doc xml:space="preserve">#GFile pointing to the source location</doc>
  38993. <type name="File" c:type="GFile*"/>
  38994. </parameter>
  38995. <parameter name="destination" transfer-ownership="none">
  38996. <doc xml:space="preserve">#GFile pointing to the destination location</doc>
  38997. <type name="File" c:type="GFile*"/>
  38998. </parameter>
  38999. <parameter name="flags" transfer-ownership="none">
  39000. <doc xml:space="preserve">set of #GFileCopyFlags</doc>
  39001. <type name="FileCopyFlags" c:type="GFileCopyFlags"/>
  39002. </parameter>
  39003. <parameter name="cancellable"
  39004. transfer-ownership="none"
  39005. nullable="1"
  39006. allow-none="1">
  39007. <doc xml:space="preserve">optional #GCancellable object,
  39008. %NULL to ignore</doc>
  39009. <type name="Cancellable" c:type="GCancellable*"/>
  39010. </parameter>
  39011. <parameter name="progress_callback"
  39012. transfer-ownership="none"
  39013. nullable="1"
  39014. allow-none="1"
  39015. scope="call"
  39016. closure="5">
  39017. <doc xml:space="preserve">#GFileProgressCallback
  39018. function for updates</doc>
  39019. <type name="FileProgressCallback"
  39020. c:type="GFileProgressCallback"/>
  39021. </parameter>
  39022. <parameter name="progress_callback_data"
  39023. transfer-ownership="none"
  39024. nullable="1"
  39025. allow-none="1">
  39026. <doc xml:space="preserve">gpointer to user data for
  39027. the callback function</doc>
  39028. <type name="gpointer" c:type="gpointer"/>
  39029. </parameter>
  39030. </parameters>
  39031. </callback>
  39032. </field>
  39033. <field name="_move_async" introspectable="0">
  39034. <callback name="_move_async">
  39035. <return-value transfer-ownership="none">
  39036. <type name="none" c:type="void"/>
  39037. </return-value>
  39038. </callback>
  39039. </field>
  39040. <field name="_move_finish" introspectable="0">
  39041. <callback name="_move_finish">
  39042. <return-value transfer-ownership="none">
  39043. <type name="none" c:type="void"/>
  39044. </return-value>
  39045. </callback>
  39046. </field>
  39047. <field name="mount_mountable">
  39048. <callback name="mount_mountable">
  39049. <return-value transfer-ownership="none">
  39050. <type name="none" c:type="void"/>
  39051. </return-value>
  39052. <parameters>
  39053. <parameter name="file" transfer-ownership="none">
  39054. <doc xml:space="preserve">input #GFile</doc>
  39055. <type name="File" c:type="GFile*"/>
  39056. </parameter>
  39057. <parameter name="flags" transfer-ownership="none">
  39058. <doc xml:space="preserve">flags affecting the operation</doc>
  39059. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  39060. </parameter>
  39061. <parameter name="mount_operation"
  39062. transfer-ownership="none"
  39063. nullable="1"
  39064. allow-none="1">
  39065. <doc xml:space="preserve">a #GMountOperation,
  39066. or %NULL to avoid user interaction</doc>
  39067. <type name="MountOperation" c:type="GMountOperation*"/>
  39068. </parameter>
  39069. <parameter name="cancellable"
  39070. transfer-ownership="none"
  39071. nullable="1"
  39072. allow-none="1">
  39073. <doc xml:space="preserve">optional #GCancellable object,
  39074. %NULL to ignore</doc>
  39075. <type name="Cancellable" c:type="GCancellable*"/>
  39076. </parameter>
  39077. <parameter name="callback"
  39078. transfer-ownership="none"
  39079. nullable="1"
  39080. allow-none="1"
  39081. scope="async"
  39082. closure="5">
  39083. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39084. when the request is satisfied, or %NULL</doc>
  39085. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39086. </parameter>
  39087. <parameter name="user_data"
  39088. transfer-ownership="none"
  39089. nullable="1"
  39090. allow-none="1"
  39091. closure="5">
  39092. <doc xml:space="preserve">the data to pass to callback function</doc>
  39093. <type name="gpointer" c:type="gpointer"/>
  39094. </parameter>
  39095. </parameters>
  39096. </callback>
  39097. </field>
  39098. <field name="mount_mountable_finish">
  39099. <callback name="mount_mountable_finish" throws="1">
  39100. <return-value transfer-ownership="full">
  39101. <doc xml:space="preserve">a #GFile or %NULL on error.
  39102. Free the returned object with g_object_unref().</doc>
  39103. <type name="File" c:type="GFile*"/>
  39104. </return-value>
  39105. <parameters>
  39106. <parameter name="file" transfer-ownership="none">
  39107. <doc xml:space="preserve">input #GFile</doc>
  39108. <type name="File" c:type="GFile*"/>
  39109. </parameter>
  39110. <parameter name="result" transfer-ownership="none">
  39111. <doc xml:space="preserve">a #GAsyncResult</doc>
  39112. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39113. </parameter>
  39114. </parameters>
  39115. </callback>
  39116. </field>
  39117. <field name="unmount_mountable">
  39118. <callback name="unmount_mountable">
  39119. <return-value transfer-ownership="none">
  39120. <type name="none" c:type="void"/>
  39121. </return-value>
  39122. <parameters>
  39123. <parameter name="file" transfer-ownership="none">
  39124. <doc xml:space="preserve">input #GFile</doc>
  39125. <type name="File" c:type="GFile*"/>
  39126. </parameter>
  39127. <parameter name="flags" transfer-ownership="none">
  39128. <doc xml:space="preserve">flags affecting the operation</doc>
  39129. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  39130. </parameter>
  39131. <parameter name="cancellable"
  39132. transfer-ownership="none"
  39133. nullable="1"
  39134. allow-none="1">
  39135. <doc xml:space="preserve">optional #GCancellable object,
  39136. %NULL to ignore</doc>
  39137. <type name="Cancellable" c:type="GCancellable*"/>
  39138. </parameter>
  39139. <parameter name="callback"
  39140. transfer-ownership="none"
  39141. nullable="1"
  39142. allow-none="1"
  39143. scope="async"
  39144. closure="4">
  39145. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39146. when the request is satisfied, or %NULL</doc>
  39147. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39148. </parameter>
  39149. <parameter name="user_data"
  39150. transfer-ownership="none"
  39151. nullable="1"
  39152. allow-none="1"
  39153. closure="4">
  39154. <doc xml:space="preserve">the data to pass to callback function</doc>
  39155. <type name="gpointer" c:type="gpointer"/>
  39156. </parameter>
  39157. </parameters>
  39158. </callback>
  39159. </field>
  39160. <field name="unmount_mountable_finish">
  39161. <callback name="unmount_mountable_finish" throws="1">
  39162. <return-value transfer-ownership="none">
  39163. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  39164. %FALSE otherwise.</doc>
  39165. <type name="gboolean" c:type="gboolean"/>
  39166. </return-value>
  39167. <parameters>
  39168. <parameter name="file" transfer-ownership="none">
  39169. <doc xml:space="preserve">input #GFile</doc>
  39170. <type name="File" c:type="GFile*"/>
  39171. </parameter>
  39172. <parameter name="result" transfer-ownership="none">
  39173. <doc xml:space="preserve">a #GAsyncResult</doc>
  39174. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39175. </parameter>
  39176. </parameters>
  39177. </callback>
  39178. </field>
  39179. <field name="eject_mountable">
  39180. <callback name="eject_mountable">
  39181. <return-value transfer-ownership="none">
  39182. <type name="none" c:type="void"/>
  39183. </return-value>
  39184. <parameters>
  39185. <parameter name="file" transfer-ownership="none">
  39186. <doc xml:space="preserve">input #GFile</doc>
  39187. <type name="File" c:type="GFile*"/>
  39188. </parameter>
  39189. <parameter name="flags" transfer-ownership="none">
  39190. <doc xml:space="preserve">flags affecting the operation</doc>
  39191. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  39192. </parameter>
  39193. <parameter name="cancellable"
  39194. transfer-ownership="none"
  39195. nullable="1"
  39196. allow-none="1">
  39197. <doc xml:space="preserve">optional #GCancellable object,
  39198. %NULL to ignore</doc>
  39199. <type name="Cancellable" c:type="GCancellable*"/>
  39200. </parameter>
  39201. <parameter name="callback"
  39202. transfer-ownership="none"
  39203. nullable="1"
  39204. allow-none="1"
  39205. scope="async"
  39206. closure="4">
  39207. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39208. when the request is satisfied, or %NULL</doc>
  39209. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39210. </parameter>
  39211. <parameter name="user_data"
  39212. transfer-ownership="none"
  39213. nullable="1"
  39214. allow-none="1"
  39215. closure="4">
  39216. <doc xml:space="preserve">the data to pass to callback function</doc>
  39217. <type name="gpointer" c:type="gpointer"/>
  39218. </parameter>
  39219. </parameters>
  39220. </callback>
  39221. </field>
  39222. <field name="eject_mountable_finish">
  39223. <callback name="eject_mountable_finish" throws="1">
  39224. <return-value transfer-ownership="none">
  39225. <doc xml:space="preserve">%TRUE if the @file was ejected successfully.
  39226. %FALSE otherwise.</doc>
  39227. <type name="gboolean" c:type="gboolean"/>
  39228. </return-value>
  39229. <parameters>
  39230. <parameter name="file" transfer-ownership="none">
  39231. <doc xml:space="preserve">input #GFile</doc>
  39232. <type name="File" c:type="GFile*"/>
  39233. </parameter>
  39234. <parameter name="result" transfer-ownership="none">
  39235. <doc xml:space="preserve">a #GAsyncResult</doc>
  39236. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39237. </parameter>
  39238. </parameters>
  39239. </callback>
  39240. </field>
  39241. <field name="mount_enclosing_volume">
  39242. <callback name="mount_enclosing_volume">
  39243. <return-value transfer-ownership="none">
  39244. <type name="none" c:type="void"/>
  39245. </return-value>
  39246. <parameters>
  39247. <parameter name="location" transfer-ownership="none">
  39248. <doc xml:space="preserve">input #GFile</doc>
  39249. <type name="File" c:type="GFile*"/>
  39250. </parameter>
  39251. <parameter name="flags" transfer-ownership="none">
  39252. <doc xml:space="preserve">flags affecting the operation</doc>
  39253. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  39254. </parameter>
  39255. <parameter name="mount_operation"
  39256. transfer-ownership="none"
  39257. nullable="1"
  39258. allow-none="1">
  39259. <doc xml:space="preserve">a #GMountOperation
  39260. or %NULL to avoid user interaction</doc>
  39261. <type name="MountOperation" c:type="GMountOperation*"/>
  39262. </parameter>
  39263. <parameter name="cancellable"
  39264. transfer-ownership="none"
  39265. nullable="1"
  39266. allow-none="1">
  39267. <doc xml:space="preserve">optional #GCancellable object,
  39268. %NULL to ignore</doc>
  39269. <type name="Cancellable" c:type="GCancellable*"/>
  39270. </parameter>
  39271. <parameter name="callback"
  39272. transfer-ownership="none"
  39273. nullable="1"
  39274. allow-none="1"
  39275. scope="async"
  39276. closure="5">
  39277. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39278. when the request is satisfied, or %NULL</doc>
  39279. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39280. </parameter>
  39281. <parameter name="user_data"
  39282. transfer-ownership="none"
  39283. nullable="1"
  39284. allow-none="1"
  39285. closure="5">
  39286. <doc xml:space="preserve">the data to pass to callback function</doc>
  39287. <type name="gpointer" c:type="gpointer"/>
  39288. </parameter>
  39289. </parameters>
  39290. </callback>
  39291. </field>
  39292. <field name="mount_enclosing_volume_finish">
  39293. <callback name="mount_enclosing_volume_finish" throws="1">
  39294. <return-value transfer-ownership="none">
  39295. <doc xml:space="preserve">%TRUE if successful. If an error has occurred,
  39296. this function will return %FALSE and set @error
  39297. appropriately if present.</doc>
  39298. <type name="gboolean" c:type="gboolean"/>
  39299. </return-value>
  39300. <parameters>
  39301. <parameter name="location" transfer-ownership="none">
  39302. <doc xml:space="preserve">input #GFile</doc>
  39303. <type name="File" c:type="GFile*"/>
  39304. </parameter>
  39305. <parameter name="result" transfer-ownership="none">
  39306. <doc xml:space="preserve">a #GAsyncResult</doc>
  39307. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39308. </parameter>
  39309. </parameters>
  39310. </callback>
  39311. </field>
  39312. <field name="monitor_dir">
  39313. <callback name="monitor_dir" throws="1">
  39314. <return-value transfer-ownership="full">
  39315. <doc xml:space="preserve">a #GFileMonitor for the given @file,
  39316. or %NULL on error.
  39317. Free the returned object with g_object_unref().</doc>
  39318. <type name="FileMonitor" c:type="GFileMonitor*"/>
  39319. </return-value>
  39320. <parameters>
  39321. <parameter name="file" transfer-ownership="none">
  39322. <doc xml:space="preserve">input #GFile</doc>
  39323. <type name="File" c:type="GFile*"/>
  39324. </parameter>
  39325. <parameter name="flags" transfer-ownership="none">
  39326. <doc xml:space="preserve">a set of #GFileMonitorFlags</doc>
  39327. <type name="FileMonitorFlags" c:type="GFileMonitorFlags"/>
  39328. </parameter>
  39329. <parameter name="cancellable"
  39330. transfer-ownership="none"
  39331. nullable="1"
  39332. allow-none="1">
  39333. <doc xml:space="preserve">optional #GCancellable object,
  39334. %NULL to ignore</doc>
  39335. <type name="Cancellable" c:type="GCancellable*"/>
  39336. </parameter>
  39337. </parameters>
  39338. </callback>
  39339. </field>
  39340. <field name="monitor_file">
  39341. <callback name="monitor_file" throws="1">
  39342. <return-value transfer-ownership="full">
  39343. <doc xml:space="preserve">a #GFileMonitor for the given @file,
  39344. or %NULL on error.
  39345. Free the returned object with g_object_unref().</doc>
  39346. <type name="FileMonitor" c:type="GFileMonitor*"/>
  39347. </return-value>
  39348. <parameters>
  39349. <parameter name="file" transfer-ownership="none">
  39350. <doc xml:space="preserve">input #GFile</doc>
  39351. <type name="File" c:type="GFile*"/>
  39352. </parameter>
  39353. <parameter name="flags" transfer-ownership="none">
  39354. <doc xml:space="preserve">a set of #GFileMonitorFlags</doc>
  39355. <type name="FileMonitorFlags" c:type="GFileMonitorFlags"/>
  39356. </parameter>
  39357. <parameter name="cancellable"
  39358. transfer-ownership="none"
  39359. nullable="1"
  39360. allow-none="1">
  39361. <doc xml:space="preserve">optional #GCancellable object,
  39362. %NULL to ignore</doc>
  39363. <type name="Cancellable" c:type="GCancellable*"/>
  39364. </parameter>
  39365. </parameters>
  39366. </callback>
  39367. </field>
  39368. <field name="open_readwrite">
  39369. <callback name="open_readwrite" throws="1">
  39370. <return-value transfer-ownership="full">
  39371. <doc xml:space="preserve">#GFileIOStream or %NULL on error.
  39372. Free the returned object with g_object_unref().</doc>
  39373. <type name="FileIOStream" c:type="GFileIOStream*"/>
  39374. </return-value>
  39375. <parameters>
  39376. <parameter name="file" transfer-ownership="none">
  39377. <doc xml:space="preserve">#GFile to open</doc>
  39378. <type name="File" c:type="GFile*"/>
  39379. </parameter>
  39380. <parameter name="cancellable"
  39381. transfer-ownership="none"
  39382. nullable="1"
  39383. allow-none="1">
  39384. <doc xml:space="preserve">a #GCancellable</doc>
  39385. <type name="Cancellable" c:type="GCancellable*"/>
  39386. </parameter>
  39387. </parameters>
  39388. </callback>
  39389. </field>
  39390. <field name="open_readwrite_async">
  39391. <callback name="open_readwrite_async">
  39392. <return-value transfer-ownership="none">
  39393. <type name="none" c:type="void"/>
  39394. </return-value>
  39395. <parameters>
  39396. <parameter name="file" transfer-ownership="none">
  39397. <doc xml:space="preserve">input #GFile</doc>
  39398. <type name="File" c:type="GFile*"/>
  39399. </parameter>
  39400. <parameter name="io_priority" transfer-ownership="none">
  39401. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  39402. <type name="gint" c:type="int"/>
  39403. </parameter>
  39404. <parameter name="cancellable"
  39405. transfer-ownership="none"
  39406. nullable="1"
  39407. allow-none="1">
  39408. <doc xml:space="preserve">optional #GCancellable object,
  39409. %NULL to ignore</doc>
  39410. <type name="Cancellable" c:type="GCancellable*"/>
  39411. </parameter>
  39412. <parameter name="callback"
  39413. transfer-ownership="none"
  39414. nullable="1"
  39415. allow-none="1"
  39416. scope="async"
  39417. closure="4">
  39418. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39419. when the request is satisfied</doc>
  39420. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39421. </parameter>
  39422. <parameter name="user_data"
  39423. transfer-ownership="none"
  39424. nullable="1"
  39425. allow-none="1"
  39426. closure="4">
  39427. <doc xml:space="preserve">the data to pass to callback function</doc>
  39428. <type name="gpointer" c:type="gpointer"/>
  39429. </parameter>
  39430. </parameters>
  39431. </callback>
  39432. </field>
  39433. <field name="open_readwrite_finish">
  39434. <callback name="open_readwrite_finish" throws="1">
  39435. <return-value transfer-ownership="full">
  39436. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  39437. Free the returned object with g_object_unref().</doc>
  39438. <type name="FileIOStream" c:type="GFileIOStream*"/>
  39439. </return-value>
  39440. <parameters>
  39441. <parameter name="file" transfer-ownership="none">
  39442. <doc xml:space="preserve">input #GFile</doc>
  39443. <type name="File" c:type="GFile*"/>
  39444. </parameter>
  39445. <parameter name="res" transfer-ownership="none">
  39446. <doc xml:space="preserve">a #GAsyncResult</doc>
  39447. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39448. </parameter>
  39449. </parameters>
  39450. </callback>
  39451. </field>
  39452. <field name="create_readwrite">
  39453. <callback name="create_readwrite" throws="1">
  39454. <return-value transfer-ownership="full">
  39455. <doc xml:space="preserve">a #GFileIOStream for the newly created
  39456. file, or %NULL on error.
  39457. Free the returned object with g_object_unref().</doc>
  39458. <type name="FileIOStream" c:type="GFileIOStream*"/>
  39459. </return-value>
  39460. <parameters>
  39461. <parameter name="file" transfer-ownership="none">
  39462. <doc xml:space="preserve">a #GFile</doc>
  39463. <type name="File" c:type="GFile*"/>
  39464. </parameter>
  39465. <parameter name="flags" transfer-ownership="none">
  39466. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  39467. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  39468. </parameter>
  39469. <parameter name="cancellable"
  39470. transfer-ownership="none"
  39471. nullable="1"
  39472. allow-none="1">
  39473. <doc xml:space="preserve">optional #GCancellable object,
  39474. %NULL to ignore</doc>
  39475. <type name="Cancellable" c:type="GCancellable*"/>
  39476. </parameter>
  39477. </parameters>
  39478. </callback>
  39479. </field>
  39480. <field name="create_readwrite_async">
  39481. <callback name="create_readwrite_async">
  39482. <return-value transfer-ownership="none">
  39483. <type name="none" c:type="void"/>
  39484. </return-value>
  39485. <parameters>
  39486. <parameter name="file" transfer-ownership="none">
  39487. <doc xml:space="preserve">input #GFile</doc>
  39488. <type name="File" c:type="GFile*"/>
  39489. </parameter>
  39490. <parameter name="flags" transfer-ownership="none">
  39491. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  39492. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  39493. </parameter>
  39494. <parameter name="io_priority" transfer-ownership="none">
  39495. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  39496. <type name="gint" c:type="int"/>
  39497. </parameter>
  39498. <parameter name="cancellable"
  39499. transfer-ownership="none"
  39500. nullable="1"
  39501. allow-none="1">
  39502. <doc xml:space="preserve">optional #GCancellable object,
  39503. %NULL to ignore</doc>
  39504. <type name="Cancellable" c:type="GCancellable*"/>
  39505. </parameter>
  39506. <parameter name="callback"
  39507. transfer-ownership="none"
  39508. nullable="1"
  39509. allow-none="1"
  39510. scope="async"
  39511. closure="5">
  39512. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39513. when the request is satisfied</doc>
  39514. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39515. </parameter>
  39516. <parameter name="user_data"
  39517. transfer-ownership="none"
  39518. nullable="1"
  39519. allow-none="1"
  39520. closure="5">
  39521. <doc xml:space="preserve">the data to pass to callback function</doc>
  39522. <type name="gpointer" c:type="gpointer"/>
  39523. </parameter>
  39524. </parameters>
  39525. </callback>
  39526. </field>
  39527. <field name="create_readwrite_finish">
  39528. <callback name="create_readwrite_finish" throws="1">
  39529. <return-value transfer-ownership="full">
  39530. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  39531. Free the returned object with g_object_unref().</doc>
  39532. <type name="FileIOStream" c:type="GFileIOStream*"/>
  39533. </return-value>
  39534. <parameters>
  39535. <parameter name="file" transfer-ownership="none">
  39536. <doc xml:space="preserve">input #GFile</doc>
  39537. <type name="File" c:type="GFile*"/>
  39538. </parameter>
  39539. <parameter name="res" transfer-ownership="none">
  39540. <doc xml:space="preserve">a #GAsyncResult</doc>
  39541. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39542. </parameter>
  39543. </parameters>
  39544. </callback>
  39545. </field>
  39546. <field name="replace_readwrite">
  39547. <callback name="replace_readwrite" throws="1">
  39548. <return-value transfer-ownership="full">
  39549. <doc xml:space="preserve">a #GFileIOStream or %NULL on error.
  39550. Free the returned object with g_object_unref().</doc>
  39551. <type name="FileIOStream" c:type="GFileIOStream*"/>
  39552. </return-value>
  39553. <parameters>
  39554. <parameter name="file" transfer-ownership="none">
  39555. <doc xml:space="preserve">a #GFile</doc>
  39556. <type name="File" c:type="GFile*"/>
  39557. </parameter>
  39558. <parameter name="etag"
  39559. transfer-ownership="none"
  39560. nullable="1"
  39561. allow-none="1">
  39562. <doc xml:space="preserve">an optional [entity tag][gfile-etag]
  39563. for the current #GFile, or #NULL to ignore</doc>
  39564. <type name="utf8" c:type="const char*"/>
  39565. </parameter>
  39566. <parameter name="make_backup" transfer-ownership="none">
  39567. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  39568. <type name="gboolean" c:type="gboolean"/>
  39569. </parameter>
  39570. <parameter name="flags" transfer-ownership="none">
  39571. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  39572. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  39573. </parameter>
  39574. <parameter name="cancellable"
  39575. transfer-ownership="none"
  39576. nullable="1"
  39577. allow-none="1">
  39578. <doc xml:space="preserve">optional #GCancellable object,
  39579. %NULL to ignore</doc>
  39580. <type name="Cancellable" c:type="GCancellable*"/>
  39581. </parameter>
  39582. </parameters>
  39583. </callback>
  39584. </field>
  39585. <field name="replace_readwrite_async">
  39586. <callback name="replace_readwrite_async">
  39587. <return-value transfer-ownership="none">
  39588. <type name="none" c:type="void"/>
  39589. </return-value>
  39590. <parameters>
  39591. <parameter name="file" transfer-ownership="none">
  39592. <doc xml:space="preserve">input #GFile</doc>
  39593. <type name="File" c:type="GFile*"/>
  39594. </parameter>
  39595. <parameter name="etag"
  39596. transfer-ownership="none"
  39597. nullable="1"
  39598. allow-none="1">
  39599. <doc xml:space="preserve">an [entity tag][gfile-etag] for the current #GFile,
  39600. or %NULL to ignore</doc>
  39601. <type name="utf8" c:type="const char*"/>
  39602. </parameter>
  39603. <parameter name="make_backup" transfer-ownership="none">
  39604. <doc xml:space="preserve">%TRUE if a backup should be created</doc>
  39605. <type name="gboolean" c:type="gboolean"/>
  39606. </parameter>
  39607. <parameter name="flags" transfer-ownership="none">
  39608. <doc xml:space="preserve">a set of #GFileCreateFlags</doc>
  39609. <type name="FileCreateFlags" c:type="GFileCreateFlags"/>
  39610. </parameter>
  39611. <parameter name="io_priority" transfer-ownership="none">
  39612. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  39613. <type name="gint" c:type="int"/>
  39614. </parameter>
  39615. <parameter name="cancellable"
  39616. transfer-ownership="none"
  39617. nullable="1"
  39618. allow-none="1">
  39619. <doc xml:space="preserve">optional #GCancellable object,
  39620. %NULL to ignore</doc>
  39621. <type name="Cancellable" c:type="GCancellable*"/>
  39622. </parameter>
  39623. <parameter name="callback"
  39624. transfer-ownership="none"
  39625. nullable="1"
  39626. allow-none="1"
  39627. scope="async"
  39628. closure="7">
  39629. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39630. when the request is satisfied</doc>
  39631. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39632. </parameter>
  39633. <parameter name="user_data"
  39634. transfer-ownership="none"
  39635. nullable="1"
  39636. allow-none="1"
  39637. closure="7">
  39638. <doc xml:space="preserve">the data to pass to callback function</doc>
  39639. <type name="gpointer" c:type="gpointer"/>
  39640. </parameter>
  39641. </parameters>
  39642. </callback>
  39643. </field>
  39644. <field name="replace_readwrite_finish">
  39645. <callback name="replace_readwrite_finish" throws="1">
  39646. <return-value transfer-ownership="full">
  39647. <doc xml:space="preserve">a #GFileIOStream, or %NULL on error.
  39648. Free the returned object with g_object_unref().</doc>
  39649. <type name="FileIOStream" c:type="GFileIOStream*"/>
  39650. </return-value>
  39651. <parameters>
  39652. <parameter name="file" transfer-ownership="none">
  39653. <doc xml:space="preserve">input #GFile</doc>
  39654. <type name="File" c:type="GFile*"/>
  39655. </parameter>
  39656. <parameter name="res" transfer-ownership="none">
  39657. <doc xml:space="preserve">a #GAsyncResult</doc>
  39658. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39659. </parameter>
  39660. </parameters>
  39661. </callback>
  39662. </field>
  39663. <field name="start_mountable">
  39664. <callback name="start_mountable">
  39665. <return-value transfer-ownership="none">
  39666. <type name="none" c:type="void"/>
  39667. </return-value>
  39668. <parameters>
  39669. <parameter name="file" transfer-ownership="none">
  39670. <doc xml:space="preserve">input #GFile</doc>
  39671. <type name="File" c:type="GFile*"/>
  39672. </parameter>
  39673. <parameter name="flags" transfer-ownership="none">
  39674. <doc xml:space="preserve">flags affecting the operation</doc>
  39675. <type name="DriveStartFlags" c:type="GDriveStartFlags"/>
  39676. </parameter>
  39677. <parameter name="start_operation"
  39678. transfer-ownership="none"
  39679. nullable="1"
  39680. allow-none="1">
  39681. <doc xml:space="preserve">a #GMountOperation, or %NULL to avoid user interaction</doc>
  39682. <type name="MountOperation" c:type="GMountOperation*"/>
  39683. </parameter>
  39684. <parameter name="cancellable"
  39685. transfer-ownership="none"
  39686. nullable="1"
  39687. allow-none="1">
  39688. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  39689. <type name="Cancellable" c:type="GCancellable*"/>
  39690. </parameter>
  39691. <parameter name="callback"
  39692. transfer-ownership="none"
  39693. nullable="1"
  39694. allow-none="1"
  39695. scope="async"
  39696. closure="5">
  39697. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied, or %NULL</doc>
  39698. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39699. </parameter>
  39700. <parameter name="user_data"
  39701. transfer-ownership="none"
  39702. nullable="1"
  39703. allow-none="1"
  39704. closure="5">
  39705. <doc xml:space="preserve">the data to pass to callback function</doc>
  39706. <type name="gpointer" c:type="gpointer"/>
  39707. </parameter>
  39708. </parameters>
  39709. </callback>
  39710. </field>
  39711. <field name="start_mountable_finish">
  39712. <callback name="start_mountable_finish" throws="1">
  39713. <return-value transfer-ownership="none">
  39714. <doc xml:space="preserve">%TRUE if the operation finished successfully. %FALSE
  39715. otherwise.</doc>
  39716. <type name="gboolean" c:type="gboolean"/>
  39717. </return-value>
  39718. <parameters>
  39719. <parameter name="file" transfer-ownership="none">
  39720. <doc xml:space="preserve">input #GFile</doc>
  39721. <type name="File" c:type="GFile*"/>
  39722. </parameter>
  39723. <parameter name="result" transfer-ownership="none">
  39724. <doc xml:space="preserve">a #GAsyncResult</doc>
  39725. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39726. </parameter>
  39727. </parameters>
  39728. </callback>
  39729. </field>
  39730. <field name="stop_mountable">
  39731. <callback name="stop_mountable">
  39732. <return-value transfer-ownership="none">
  39733. <type name="none" c:type="void"/>
  39734. </return-value>
  39735. <parameters>
  39736. <parameter name="file" transfer-ownership="none">
  39737. <doc xml:space="preserve">input #GFile</doc>
  39738. <type name="File" c:type="GFile*"/>
  39739. </parameter>
  39740. <parameter name="flags" transfer-ownership="none">
  39741. <doc xml:space="preserve">flags affecting the operation</doc>
  39742. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  39743. </parameter>
  39744. <parameter name="mount_operation"
  39745. transfer-ownership="none"
  39746. nullable="1"
  39747. allow-none="1">
  39748. <doc xml:space="preserve">a #GMountOperation,
  39749. or %NULL to avoid user interaction.</doc>
  39750. <type name="MountOperation" c:type="GMountOperation*"/>
  39751. </parameter>
  39752. <parameter name="cancellable"
  39753. transfer-ownership="none"
  39754. nullable="1"
  39755. allow-none="1">
  39756. <doc xml:space="preserve">optional #GCancellable object,
  39757. %NULL to ignore</doc>
  39758. <type name="Cancellable" c:type="GCancellable*"/>
  39759. </parameter>
  39760. <parameter name="callback"
  39761. transfer-ownership="none"
  39762. nullable="1"
  39763. allow-none="1"
  39764. scope="async"
  39765. closure="5">
  39766. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39767. when the request is satisfied, or %NULL</doc>
  39768. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39769. </parameter>
  39770. <parameter name="user_data"
  39771. transfer-ownership="none"
  39772. nullable="1"
  39773. allow-none="1"
  39774. closure="5">
  39775. <doc xml:space="preserve">the data to pass to callback function</doc>
  39776. <type name="gpointer" c:type="gpointer"/>
  39777. </parameter>
  39778. </parameters>
  39779. </callback>
  39780. </field>
  39781. <field name="stop_mountable_finish">
  39782. <callback name="stop_mountable_finish" throws="1">
  39783. <return-value transfer-ownership="none">
  39784. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  39785. %FALSE otherwise.</doc>
  39786. <type name="gboolean" c:type="gboolean"/>
  39787. </return-value>
  39788. <parameters>
  39789. <parameter name="file" transfer-ownership="none">
  39790. <doc xml:space="preserve">input #GFile</doc>
  39791. <type name="File" c:type="GFile*"/>
  39792. </parameter>
  39793. <parameter name="result" transfer-ownership="none">
  39794. <doc xml:space="preserve">a #GAsyncResult</doc>
  39795. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39796. </parameter>
  39797. </parameters>
  39798. </callback>
  39799. </field>
  39800. <field name="supports_thread_contexts">
  39801. <doc xml:space="preserve">a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.</doc>
  39802. <type name="gboolean" c:type="gboolean"/>
  39803. </field>
  39804. <field name="unmount_mountable_with_operation">
  39805. <callback name="unmount_mountable_with_operation">
  39806. <return-value transfer-ownership="none">
  39807. <type name="none" c:type="void"/>
  39808. </return-value>
  39809. <parameters>
  39810. <parameter name="file" transfer-ownership="none">
  39811. <doc xml:space="preserve">input #GFile</doc>
  39812. <type name="File" c:type="GFile*"/>
  39813. </parameter>
  39814. <parameter name="flags" transfer-ownership="none">
  39815. <doc xml:space="preserve">flags affecting the operation</doc>
  39816. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  39817. </parameter>
  39818. <parameter name="mount_operation"
  39819. transfer-ownership="none"
  39820. nullable="1"
  39821. allow-none="1">
  39822. <doc xml:space="preserve">a #GMountOperation,
  39823. or %NULL to avoid user interaction</doc>
  39824. <type name="MountOperation" c:type="GMountOperation*"/>
  39825. </parameter>
  39826. <parameter name="cancellable"
  39827. transfer-ownership="none"
  39828. nullable="1"
  39829. allow-none="1">
  39830. <doc xml:space="preserve">optional #GCancellable object,
  39831. %NULL to ignore</doc>
  39832. <type name="Cancellable" c:type="GCancellable*"/>
  39833. </parameter>
  39834. <parameter name="callback"
  39835. transfer-ownership="none"
  39836. nullable="1"
  39837. allow-none="1"
  39838. scope="async"
  39839. closure="5">
  39840. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39841. when the request is satisfied, or %NULL</doc>
  39842. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39843. </parameter>
  39844. <parameter name="user_data"
  39845. transfer-ownership="none"
  39846. nullable="1"
  39847. allow-none="1"
  39848. closure="5">
  39849. <doc xml:space="preserve">the data to pass to callback function</doc>
  39850. <type name="gpointer" c:type="gpointer"/>
  39851. </parameter>
  39852. </parameters>
  39853. </callback>
  39854. </field>
  39855. <field name="unmount_mountable_with_operation_finish">
  39856. <callback name="unmount_mountable_with_operation_finish" throws="1">
  39857. <return-value transfer-ownership="none">
  39858. <doc xml:space="preserve">%TRUE if the operation finished successfully.
  39859. %FALSE otherwise.</doc>
  39860. <type name="gboolean" c:type="gboolean"/>
  39861. </return-value>
  39862. <parameters>
  39863. <parameter name="file" transfer-ownership="none">
  39864. <doc xml:space="preserve">input #GFile</doc>
  39865. <type name="File" c:type="GFile*"/>
  39866. </parameter>
  39867. <parameter name="result" transfer-ownership="none">
  39868. <doc xml:space="preserve">a #GAsyncResult</doc>
  39869. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39870. </parameter>
  39871. </parameters>
  39872. </callback>
  39873. </field>
  39874. <field name="eject_mountable_with_operation">
  39875. <callback name="eject_mountable_with_operation">
  39876. <return-value transfer-ownership="none">
  39877. <type name="none" c:type="void"/>
  39878. </return-value>
  39879. <parameters>
  39880. <parameter name="file" transfer-ownership="none">
  39881. <doc xml:space="preserve">input #GFile</doc>
  39882. <type name="File" c:type="GFile*"/>
  39883. </parameter>
  39884. <parameter name="flags" transfer-ownership="none">
  39885. <doc xml:space="preserve">flags affecting the operation</doc>
  39886. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  39887. </parameter>
  39888. <parameter name="mount_operation"
  39889. transfer-ownership="none"
  39890. nullable="1"
  39891. allow-none="1">
  39892. <doc xml:space="preserve">a #GMountOperation,
  39893. or %NULL to avoid user interaction</doc>
  39894. <type name="MountOperation" c:type="GMountOperation*"/>
  39895. </parameter>
  39896. <parameter name="cancellable"
  39897. transfer-ownership="none"
  39898. nullable="1"
  39899. allow-none="1">
  39900. <doc xml:space="preserve">optional #GCancellable object,
  39901. %NULL to ignore</doc>
  39902. <type name="Cancellable" c:type="GCancellable*"/>
  39903. </parameter>
  39904. <parameter name="callback"
  39905. transfer-ownership="none"
  39906. nullable="1"
  39907. allow-none="1"
  39908. scope="async"
  39909. closure="5">
  39910. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39911. when the request is satisfied, or %NULL</doc>
  39912. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39913. </parameter>
  39914. <parameter name="user_data"
  39915. transfer-ownership="none"
  39916. nullable="1"
  39917. allow-none="1"
  39918. closure="5">
  39919. <doc xml:space="preserve">the data to pass to callback function</doc>
  39920. <type name="gpointer" c:type="gpointer"/>
  39921. </parameter>
  39922. </parameters>
  39923. </callback>
  39924. </field>
  39925. <field name="eject_mountable_with_operation_finish">
  39926. <callback name="eject_mountable_with_operation_finish" throws="1">
  39927. <return-value transfer-ownership="none">
  39928. <doc xml:space="preserve">%TRUE if the @file was ejected successfully.
  39929. %FALSE otherwise.</doc>
  39930. <type name="gboolean" c:type="gboolean"/>
  39931. </return-value>
  39932. <parameters>
  39933. <parameter name="file" transfer-ownership="none">
  39934. <doc xml:space="preserve">input #GFile</doc>
  39935. <type name="File" c:type="GFile*"/>
  39936. </parameter>
  39937. <parameter name="result" transfer-ownership="none">
  39938. <doc xml:space="preserve">a #GAsyncResult</doc>
  39939. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39940. </parameter>
  39941. </parameters>
  39942. </callback>
  39943. </field>
  39944. <field name="poll_mountable">
  39945. <callback name="poll_mountable">
  39946. <return-value transfer-ownership="none">
  39947. <type name="none" c:type="void"/>
  39948. </return-value>
  39949. <parameters>
  39950. <parameter name="file" transfer-ownership="none">
  39951. <doc xml:space="preserve">input #GFile</doc>
  39952. <type name="File" c:type="GFile*"/>
  39953. </parameter>
  39954. <parameter name="cancellable"
  39955. transfer-ownership="none"
  39956. nullable="1"
  39957. allow-none="1">
  39958. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  39959. <type name="Cancellable" c:type="GCancellable*"/>
  39960. </parameter>
  39961. <parameter name="callback"
  39962. transfer-ownership="none"
  39963. nullable="1"
  39964. allow-none="1"
  39965. scope="async"
  39966. closure="3">
  39967. <doc xml:space="preserve">a #GAsyncReadyCallback to call
  39968. when the request is satisfied, or %NULL</doc>
  39969. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  39970. </parameter>
  39971. <parameter name="user_data"
  39972. transfer-ownership="none"
  39973. nullable="1"
  39974. allow-none="1"
  39975. closure="3">
  39976. <doc xml:space="preserve">the data to pass to callback function</doc>
  39977. <type name="gpointer" c:type="gpointer"/>
  39978. </parameter>
  39979. </parameters>
  39980. </callback>
  39981. </field>
  39982. <field name="poll_mountable_finish">
  39983. <callback name="poll_mountable_finish" throws="1">
  39984. <return-value transfer-ownership="none">
  39985. <doc xml:space="preserve">%TRUE if the operation finished successfully. %FALSE
  39986. otherwise.</doc>
  39987. <type name="gboolean" c:type="gboolean"/>
  39988. </return-value>
  39989. <parameters>
  39990. <parameter name="file" transfer-ownership="none">
  39991. <doc xml:space="preserve">input #GFile</doc>
  39992. <type name="File" c:type="GFile*"/>
  39993. </parameter>
  39994. <parameter name="result" transfer-ownership="none">
  39995. <doc xml:space="preserve">a #GAsyncResult</doc>
  39996. <type name="AsyncResult" c:type="GAsyncResult*"/>
  39997. </parameter>
  39998. </parameters>
  39999. </callback>
  40000. </field>
  40001. <field name="measure_disk_usage" introspectable="0">
  40002. <callback name="measure_disk_usage" introspectable="0" throws="1">
  40003. <return-value transfer-ownership="none">
  40004. <doc xml:space="preserve">%TRUE if successful, with the out parameters set.
  40005. %FALSE otherwise, with @error set.</doc>
  40006. <type name="gboolean" c:type="gboolean"/>
  40007. </return-value>
  40008. <parameters>
  40009. <parameter name="file" transfer-ownership="none">
  40010. <doc xml:space="preserve">a #GFile</doc>
  40011. <type name="File" c:type="GFile*"/>
  40012. </parameter>
  40013. <parameter name="flags" transfer-ownership="none">
  40014. <doc xml:space="preserve">#GFileMeasureFlags</doc>
  40015. <type name="FileMeasureFlags" c:type="GFileMeasureFlags"/>
  40016. </parameter>
  40017. <parameter name="cancellable"
  40018. transfer-ownership="none"
  40019. nullable="1"
  40020. allow-none="1">
  40021. <doc xml:space="preserve">optional #GCancellable</doc>
  40022. <type name="Cancellable" c:type="GCancellable*"/>
  40023. </parameter>
  40024. <parameter name="progress_callback"
  40025. transfer-ownership="none"
  40026. nullable="1"
  40027. allow-none="1"
  40028. closure="4">
  40029. <doc xml:space="preserve">a #GFileMeasureProgressCallback</doc>
  40030. <type name="FileMeasureProgressCallback"
  40031. c:type="GFileMeasureProgressCallback"/>
  40032. </parameter>
  40033. <parameter name="progress_data"
  40034. transfer-ownership="none"
  40035. nullable="1"
  40036. allow-none="1">
  40037. <doc xml:space="preserve">user_data for @progress_callback</doc>
  40038. <type name="gpointer" c:type="gpointer"/>
  40039. </parameter>
  40040. <parameter name="disk_usage"
  40041. direction="out"
  40042. caller-allocates="0"
  40043. transfer-ownership="full"
  40044. optional="1"
  40045. allow-none="1">
  40046. <doc xml:space="preserve">the number of bytes of disk space used</doc>
  40047. <type name="guint64" c:type="guint64*"/>
  40048. </parameter>
  40049. <parameter name="num_dirs"
  40050. direction="out"
  40051. caller-allocates="0"
  40052. transfer-ownership="full"
  40053. optional="1"
  40054. allow-none="1">
  40055. <doc xml:space="preserve">the number of directories encountered</doc>
  40056. <type name="guint64" c:type="guint64*"/>
  40057. </parameter>
  40058. <parameter name="num_files"
  40059. direction="out"
  40060. caller-allocates="0"
  40061. transfer-ownership="full"
  40062. optional="1"
  40063. allow-none="1">
  40064. <doc xml:space="preserve">the number of non-directories encountered</doc>
  40065. <type name="guint64" c:type="guint64*"/>
  40066. </parameter>
  40067. </parameters>
  40068. </callback>
  40069. </field>
  40070. <field name="measure_disk_usage_async" introspectable="0">
  40071. <callback name="measure_disk_usage_async" introspectable="0">
  40072. <return-value transfer-ownership="none">
  40073. <type name="none" c:type="void"/>
  40074. </return-value>
  40075. <parameters>
  40076. <parameter name="file" transfer-ownership="none">
  40077. <doc xml:space="preserve">a #GFile</doc>
  40078. <type name="File" c:type="GFile*"/>
  40079. </parameter>
  40080. <parameter name="flags" transfer-ownership="none">
  40081. <doc xml:space="preserve">#GFileMeasureFlags</doc>
  40082. <type name="FileMeasureFlags" c:type="GFileMeasureFlags"/>
  40083. </parameter>
  40084. <parameter name="io_priority" transfer-ownership="none">
  40085. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  40086. <type name="gint" c:type="gint"/>
  40087. </parameter>
  40088. <parameter name="cancellable"
  40089. transfer-ownership="none"
  40090. nullable="1"
  40091. allow-none="1">
  40092. <doc xml:space="preserve">optional #GCancellable</doc>
  40093. <type name="Cancellable" c:type="GCancellable*"/>
  40094. </parameter>
  40095. <parameter name="progress_callback"
  40096. transfer-ownership="none"
  40097. nullable="1"
  40098. allow-none="1"
  40099. closure="5">
  40100. <doc xml:space="preserve">a #GFileMeasureProgressCallback</doc>
  40101. <type name="FileMeasureProgressCallback"
  40102. c:type="GFileMeasureProgressCallback"/>
  40103. </parameter>
  40104. <parameter name="progress_data"
  40105. transfer-ownership="none"
  40106. nullable="1"
  40107. allow-none="1">
  40108. <doc xml:space="preserve">user_data for @progress_callback</doc>
  40109. <type name="gpointer" c:type="gpointer"/>
  40110. </parameter>
  40111. <parameter name="callback"
  40112. transfer-ownership="none"
  40113. nullable="1"
  40114. allow-none="1"
  40115. scope="async"
  40116. closure="7">
  40117. <doc xml:space="preserve">a #GAsyncReadyCallback to call when complete</doc>
  40118. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  40119. </parameter>
  40120. <parameter name="user_data"
  40121. transfer-ownership="none"
  40122. nullable="1"
  40123. allow-none="1"
  40124. closure="7">
  40125. <doc xml:space="preserve">the data to pass to callback function</doc>
  40126. <type name="gpointer" c:type="gpointer"/>
  40127. </parameter>
  40128. </parameters>
  40129. </callback>
  40130. </field>
  40131. <field name="measure_disk_usage_finish">
  40132. <callback name="measure_disk_usage_finish" throws="1">
  40133. <return-value transfer-ownership="none">
  40134. <doc xml:space="preserve">%TRUE if successful, with the out parameters set.
  40135. %FALSE otherwise, with @error set.</doc>
  40136. <type name="gboolean" c:type="gboolean"/>
  40137. </return-value>
  40138. <parameters>
  40139. <parameter name="file" transfer-ownership="none">
  40140. <doc xml:space="preserve">a #GFile</doc>
  40141. <type name="File" c:type="GFile*"/>
  40142. </parameter>
  40143. <parameter name="result" transfer-ownership="none">
  40144. <doc xml:space="preserve">the #GAsyncResult passed to your #GAsyncReadyCallback</doc>
  40145. <type name="AsyncResult" c:type="GAsyncResult*"/>
  40146. </parameter>
  40147. <parameter name="disk_usage"
  40148. direction="out"
  40149. caller-allocates="0"
  40150. transfer-ownership="full"
  40151. optional="1"
  40152. allow-none="1">
  40153. <doc xml:space="preserve">the number of bytes of disk space used</doc>
  40154. <type name="guint64" c:type="guint64*"/>
  40155. </parameter>
  40156. <parameter name="num_dirs"
  40157. direction="out"
  40158. caller-allocates="0"
  40159. transfer-ownership="full"
  40160. optional="1"
  40161. allow-none="1">
  40162. <doc xml:space="preserve">the number of directories encountered</doc>
  40163. <type name="guint64" c:type="guint64*"/>
  40164. </parameter>
  40165. <parameter name="num_files"
  40166. direction="out"
  40167. caller-allocates="0"
  40168. transfer-ownership="full"
  40169. optional="1"
  40170. allow-none="1">
  40171. <doc xml:space="preserve">the number of non-directories encountered</doc>
  40172. <type name="guint64" c:type="guint64*"/>
  40173. </parameter>
  40174. </parameters>
  40175. </callback>
  40176. </field>
  40177. </record>
  40178. <class name="FileInfo"
  40179. c:symbol-prefix="file_info"
  40180. c:type="GFileInfo"
  40181. parent="GObject.Object"
  40182. glib:type-name="GFileInfo"
  40183. glib:get-type="g_file_info_get_type"
  40184. glib:type-struct="FileInfoClass">
  40185. <doc xml:space="preserve">Functionality for manipulating basic metadata for files. #GFileInfo
  40186. implements methods for getting information that all files should
  40187. contain, and allows for manipulation of extended attributes.
  40188. See [GFileAttribute][gio-GFileAttribute] for more information on how
  40189. GIO handles file attributes.
  40190. To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
  40191. async variant). To obtain a #GFileInfo for a file input or output
  40192. stream, use g_file_input_stream_query_info() or
  40193. g_file_output_stream_query_info() (or their async variants).
  40194. To change the actual attributes of a file, you should then set the
  40195. attribute in the #GFileInfo and call g_file_set_attributes_from_info()
  40196. or g_file_set_attributes_async() on a GFile.
  40197. However, not all attributes can be changed in the file. For instance,
  40198. the actual size of a file cannot be changed via g_file_info_set_size().
  40199. You may call g_file_query_settable_attributes() and
  40200. g_file_query_writable_namespaces() to discover the settable attributes
  40201. of a particular file at runtime.
  40202. #GFileAttributeMatcher allows for searching through a #GFileInfo for
  40203. attributes.</doc>
  40204. <constructor name="new" c:identifier="g_file_info_new">
  40205. <doc xml:space="preserve">Creates a new file info structure.</doc>
  40206. <return-value transfer-ownership="full">
  40207. <doc xml:space="preserve">a #GFileInfo.</doc>
  40208. <type name="FileInfo" c:type="GFileInfo*"/>
  40209. </return-value>
  40210. </constructor>
  40211. <method name="clear_status" c:identifier="g_file_info_clear_status">
  40212. <doc xml:space="preserve">Clears the status information from @info.</doc>
  40213. <return-value transfer-ownership="none">
  40214. <type name="none" c:type="void"/>
  40215. </return-value>
  40216. <parameters>
  40217. <instance-parameter name="info" transfer-ownership="none">
  40218. <doc xml:space="preserve">a #GFileInfo.</doc>
  40219. <type name="FileInfo" c:type="GFileInfo*"/>
  40220. </instance-parameter>
  40221. </parameters>
  40222. </method>
  40223. <method name="copy_into" c:identifier="g_file_info_copy_into">
  40224. <doc xml:space="preserve">First clears all of the [GFileAttribute][gio-GFileAttribute] of @dest_info,
  40225. and then copies all of the file attributes from @src_info to @dest_info.</doc>
  40226. <return-value transfer-ownership="none">
  40227. <type name="none" c:type="void"/>
  40228. </return-value>
  40229. <parameters>
  40230. <instance-parameter name="src_info" transfer-ownership="none">
  40231. <doc xml:space="preserve">source to copy attributes from.</doc>
  40232. <type name="FileInfo" c:type="GFileInfo*"/>
  40233. </instance-parameter>
  40234. <parameter name="dest_info" transfer-ownership="none">
  40235. <doc xml:space="preserve">destination to copy attributes to.</doc>
  40236. <type name="FileInfo" c:type="GFileInfo*"/>
  40237. </parameter>
  40238. </parameters>
  40239. </method>
  40240. <method name="dup" c:identifier="g_file_info_dup">
  40241. <doc xml:space="preserve">Duplicates a file info structure.</doc>
  40242. <return-value transfer-ownership="full">
  40243. <doc xml:space="preserve">a duplicate #GFileInfo of @other.</doc>
  40244. <type name="FileInfo" c:type="GFileInfo*"/>
  40245. </return-value>
  40246. <parameters>
  40247. <instance-parameter name="other" transfer-ownership="none">
  40248. <doc xml:space="preserve">a #GFileInfo.</doc>
  40249. <type name="FileInfo" c:type="GFileInfo*"/>
  40250. </instance-parameter>
  40251. </parameters>
  40252. </method>
  40253. <method name="get_attribute_as_string"
  40254. c:identifier="g_file_info_get_attribute_as_string">
  40255. <doc xml:space="preserve">Gets the value of a attribute, formated as a string.
  40256. This escapes things as needed to make the string valid
  40257. utf8.</doc>
  40258. <return-value transfer-ownership="full">
  40259. <doc xml:space="preserve">a UTF-8 string associated with the given @attribute.
  40260. When you're done with the string it must be freed with g_free().</doc>
  40261. <type name="utf8" c:type="char*"/>
  40262. </return-value>
  40263. <parameters>
  40264. <instance-parameter name="info" transfer-ownership="none">
  40265. <doc xml:space="preserve">a #GFileInfo.</doc>
  40266. <type name="FileInfo" c:type="GFileInfo*"/>
  40267. </instance-parameter>
  40268. <parameter name="attribute" transfer-ownership="none">
  40269. <doc xml:space="preserve">a file attribute key.</doc>
  40270. <type name="utf8" c:type="const char*"/>
  40271. </parameter>
  40272. </parameters>
  40273. </method>
  40274. <method name="get_attribute_boolean"
  40275. c:identifier="g_file_info_get_attribute_boolean">
  40276. <doc xml:space="preserve">Gets the value of a boolean attribute. If the attribute does not
  40277. contain a boolean value, %FALSE will be returned.</doc>
  40278. <return-value transfer-ownership="none">
  40279. <doc xml:space="preserve">the boolean value contained within the attribute.</doc>
  40280. <type name="gboolean" c:type="gboolean"/>
  40281. </return-value>
  40282. <parameters>
  40283. <instance-parameter name="info" transfer-ownership="none">
  40284. <doc xml:space="preserve">a #GFileInfo.</doc>
  40285. <type name="FileInfo" c:type="GFileInfo*"/>
  40286. </instance-parameter>
  40287. <parameter name="attribute" transfer-ownership="none">
  40288. <doc xml:space="preserve">a file attribute key.</doc>
  40289. <type name="utf8" c:type="const char*"/>
  40290. </parameter>
  40291. </parameters>
  40292. </method>
  40293. <method name="get_attribute_byte_string"
  40294. c:identifier="g_file_info_get_attribute_byte_string">
  40295. <doc xml:space="preserve">Gets the value of a byte string attribute. If the attribute does
  40296. not contain a byte string, %NULL will be returned.</doc>
  40297. <return-value transfer-ownership="none">
  40298. <doc xml:space="preserve">the contents of the @attribute value as a byte string, or
  40299. %NULL otherwise.</doc>
  40300. <type name="utf8" c:type="const char*"/>
  40301. </return-value>
  40302. <parameters>
  40303. <instance-parameter name="info" transfer-ownership="none">
  40304. <doc xml:space="preserve">a #GFileInfo.</doc>
  40305. <type name="FileInfo" c:type="GFileInfo*"/>
  40306. </instance-parameter>
  40307. <parameter name="attribute" transfer-ownership="none">
  40308. <doc xml:space="preserve">a file attribute key.</doc>
  40309. <type name="utf8" c:type="const char*"/>
  40310. </parameter>
  40311. </parameters>
  40312. </method>
  40313. <method name="get_attribute_data"
  40314. c:identifier="g_file_info_get_attribute_data">
  40315. <doc xml:space="preserve">Gets the attribute type, value and status for an attribute key.</doc>
  40316. <return-value transfer-ownership="none">
  40317. <doc xml:space="preserve">%TRUE if @info has an attribute named @attribute,
  40318. %FALSE otherwise.</doc>
  40319. <type name="gboolean" c:type="gboolean"/>
  40320. </return-value>
  40321. <parameters>
  40322. <instance-parameter name="info" transfer-ownership="none">
  40323. <doc xml:space="preserve">a #GFileInfo</doc>
  40324. <type name="FileInfo" c:type="GFileInfo*"/>
  40325. </instance-parameter>
  40326. <parameter name="attribute" transfer-ownership="none">
  40327. <doc xml:space="preserve">a file attribute key</doc>
  40328. <type name="utf8" c:type="const char*"/>
  40329. </parameter>
  40330. <parameter name="type"
  40331. direction="out"
  40332. caller-allocates="0"
  40333. transfer-ownership="full"
  40334. optional="1"
  40335. allow-none="1">
  40336. <doc xml:space="preserve">return location for the attribute type, or %NULL</doc>
  40337. <type name="FileAttributeType" c:type="GFileAttributeType*"/>
  40338. </parameter>
  40339. <parameter name="value_pp"
  40340. direction="out"
  40341. caller-allocates="0"
  40342. transfer-ownership="full"
  40343. optional="1"
  40344. allow-none="1">
  40345. <doc xml:space="preserve">return location for the
  40346. attribute value, or %NULL; the attribute value will not be %NULL</doc>
  40347. <type name="gpointer" c:type="gpointer*"/>
  40348. </parameter>
  40349. <parameter name="status"
  40350. direction="out"
  40351. caller-allocates="0"
  40352. transfer-ownership="full"
  40353. optional="1"
  40354. allow-none="1">
  40355. <doc xml:space="preserve">return location for the attribute status, or %NULL</doc>
  40356. <type name="FileAttributeStatus" c:type="GFileAttributeStatus*"/>
  40357. </parameter>
  40358. </parameters>
  40359. </method>
  40360. <method name="get_attribute_int32"
  40361. c:identifier="g_file_info_get_attribute_int32">
  40362. <doc xml:space="preserve">Gets a signed 32-bit integer contained within the attribute. If the
  40363. attribute does not contain a signed 32-bit integer, or is invalid,
  40364. 0 will be returned.</doc>
  40365. <return-value transfer-ownership="none">
  40366. <doc xml:space="preserve">a signed 32-bit integer from the attribute.</doc>
  40367. <type name="gint32" c:type="gint32"/>
  40368. </return-value>
  40369. <parameters>
  40370. <instance-parameter name="info" transfer-ownership="none">
  40371. <doc xml:space="preserve">a #GFileInfo.</doc>
  40372. <type name="FileInfo" c:type="GFileInfo*"/>
  40373. </instance-parameter>
  40374. <parameter name="attribute" transfer-ownership="none">
  40375. <doc xml:space="preserve">a file attribute key.</doc>
  40376. <type name="utf8" c:type="const char*"/>
  40377. </parameter>
  40378. </parameters>
  40379. </method>
  40380. <method name="get_attribute_int64"
  40381. c:identifier="g_file_info_get_attribute_int64">
  40382. <doc xml:space="preserve">Gets a signed 64-bit integer contained within the attribute. If the
  40383. attribute does not contain an signed 64-bit integer, or is invalid,
  40384. 0 will be returned.</doc>
  40385. <return-value transfer-ownership="none">
  40386. <doc xml:space="preserve">a signed 64-bit integer from the attribute.</doc>
  40387. <type name="gint64" c:type="gint64"/>
  40388. </return-value>
  40389. <parameters>
  40390. <instance-parameter name="info" transfer-ownership="none">
  40391. <doc xml:space="preserve">a #GFileInfo.</doc>
  40392. <type name="FileInfo" c:type="GFileInfo*"/>
  40393. </instance-parameter>
  40394. <parameter name="attribute" transfer-ownership="none">
  40395. <doc xml:space="preserve">a file attribute key.</doc>
  40396. <type name="utf8" c:type="const char*"/>
  40397. </parameter>
  40398. </parameters>
  40399. </method>
  40400. <method name="get_attribute_object"
  40401. c:identifier="g_file_info_get_attribute_object">
  40402. <doc xml:space="preserve">Gets the value of a #GObject attribute. If the attribute does
  40403. not contain a #GObject, %NULL will be returned.</doc>
  40404. <return-value transfer-ownership="none">
  40405. <doc xml:space="preserve">a #GObject associated with the given @attribute, or
  40406. %NULL otherwise.</doc>
  40407. <type name="GObject.Object" c:type="GObject*"/>
  40408. </return-value>
  40409. <parameters>
  40410. <instance-parameter name="info" transfer-ownership="none">
  40411. <doc xml:space="preserve">a #GFileInfo.</doc>
  40412. <type name="FileInfo" c:type="GFileInfo*"/>
  40413. </instance-parameter>
  40414. <parameter name="attribute" transfer-ownership="none">
  40415. <doc xml:space="preserve">a file attribute key.</doc>
  40416. <type name="utf8" c:type="const char*"/>
  40417. </parameter>
  40418. </parameters>
  40419. </method>
  40420. <method name="get_attribute_status"
  40421. c:identifier="g_file_info_get_attribute_status">
  40422. <doc xml:space="preserve">Gets the attribute status for an attribute key.</doc>
  40423. <return-value transfer-ownership="none">
  40424. <doc xml:space="preserve">a #GFileAttributeStatus for the given @attribute, or
  40425. %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.</doc>
  40426. <type name="FileAttributeStatus" c:type="GFileAttributeStatus"/>
  40427. </return-value>
  40428. <parameters>
  40429. <instance-parameter name="info" transfer-ownership="none">
  40430. <doc xml:space="preserve">a #GFileInfo</doc>
  40431. <type name="FileInfo" c:type="GFileInfo*"/>
  40432. </instance-parameter>
  40433. <parameter name="attribute" transfer-ownership="none">
  40434. <doc xml:space="preserve">a file attribute key</doc>
  40435. <type name="utf8" c:type="const char*"/>
  40436. </parameter>
  40437. </parameters>
  40438. </method>
  40439. <method name="get_attribute_string"
  40440. c:identifier="g_file_info_get_attribute_string">
  40441. <doc xml:space="preserve">Gets the value of a string attribute. If the attribute does
  40442. not contain a string, %NULL will be returned.</doc>
  40443. <return-value transfer-ownership="none">
  40444. <doc xml:space="preserve">the contents of the @attribute value as a UTF-8 string, or
  40445. %NULL otherwise.</doc>
  40446. <type name="utf8" c:type="const char*"/>
  40447. </return-value>
  40448. <parameters>
  40449. <instance-parameter name="info" transfer-ownership="none">
  40450. <doc xml:space="preserve">a #GFileInfo.</doc>
  40451. <type name="FileInfo" c:type="GFileInfo*"/>
  40452. </instance-parameter>
  40453. <parameter name="attribute" transfer-ownership="none">
  40454. <doc xml:space="preserve">a file attribute key.</doc>
  40455. <type name="utf8" c:type="const char*"/>
  40456. </parameter>
  40457. </parameters>
  40458. </method>
  40459. <method name="get_attribute_stringv"
  40460. c:identifier="g_file_info_get_attribute_stringv"
  40461. version="2.22">
  40462. <doc xml:space="preserve">Gets the value of a stringv attribute. If the attribute does
  40463. not contain a stringv, %NULL will be returned.</doc>
  40464. <return-value transfer-ownership="none">
  40465. <doc xml:space="preserve">the contents of the @attribute value as a stringv, or
  40466. %NULL otherwise. Do not free. These returned strings are UTF-8.</doc>
  40467. <array c:type="char**">
  40468. <type name="utf8"/>
  40469. </array>
  40470. </return-value>
  40471. <parameters>
  40472. <instance-parameter name="info" transfer-ownership="none">
  40473. <doc xml:space="preserve">a #GFileInfo.</doc>
  40474. <type name="FileInfo" c:type="GFileInfo*"/>
  40475. </instance-parameter>
  40476. <parameter name="attribute" transfer-ownership="none">
  40477. <doc xml:space="preserve">a file attribute key.</doc>
  40478. <type name="utf8" c:type="const char*"/>
  40479. </parameter>
  40480. </parameters>
  40481. </method>
  40482. <method name="get_attribute_type"
  40483. c:identifier="g_file_info_get_attribute_type">
  40484. <doc xml:space="preserve">Gets the attribute type for an attribute key.</doc>
  40485. <return-value transfer-ownership="none">
  40486. <doc xml:space="preserve">a #GFileAttributeType for the given @attribute, or
  40487. %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.</doc>
  40488. <type name="FileAttributeType" c:type="GFileAttributeType"/>
  40489. </return-value>
  40490. <parameters>
  40491. <instance-parameter name="info" transfer-ownership="none">
  40492. <doc xml:space="preserve">a #GFileInfo.</doc>
  40493. <type name="FileInfo" c:type="GFileInfo*"/>
  40494. </instance-parameter>
  40495. <parameter name="attribute" transfer-ownership="none">
  40496. <doc xml:space="preserve">a file attribute key.</doc>
  40497. <type name="utf8" c:type="const char*"/>
  40498. </parameter>
  40499. </parameters>
  40500. </method>
  40501. <method name="get_attribute_uint32"
  40502. c:identifier="g_file_info_get_attribute_uint32">
  40503. <doc xml:space="preserve">Gets an unsigned 32-bit integer contained within the attribute. If the
  40504. attribute does not contain an unsigned 32-bit integer, or is invalid,
  40505. 0 will be returned.</doc>
  40506. <return-value transfer-ownership="none">
  40507. <doc xml:space="preserve">an unsigned 32-bit integer from the attribute.</doc>
  40508. <type name="guint32" c:type="guint32"/>
  40509. </return-value>
  40510. <parameters>
  40511. <instance-parameter name="info" transfer-ownership="none">
  40512. <doc xml:space="preserve">a #GFileInfo.</doc>
  40513. <type name="FileInfo" c:type="GFileInfo*"/>
  40514. </instance-parameter>
  40515. <parameter name="attribute" transfer-ownership="none">
  40516. <doc xml:space="preserve">a file attribute key.</doc>
  40517. <type name="utf8" c:type="const char*"/>
  40518. </parameter>
  40519. </parameters>
  40520. </method>
  40521. <method name="get_attribute_uint64"
  40522. c:identifier="g_file_info_get_attribute_uint64">
  40523. <doc xml:space="preserve">Gets a unsigned 64-bit integer contained within the attribute. If the
  40524. attribute does not contain an unsigned 64-bit integer, or is invalid,
  40525. 0 will be returned.</doc>
  40526. <return-value transfer-ownership="none">
  40527. <doc xml:space="preserve">a unsigned 64-bit integer from the attribute.</doc>
  40528. <type name="guint64" c:type="guint64"/>
  40529. </return-value>
  40530. <parameters>
  40531. <instance-parameter name="info" transfer-ownership="none">
  40532. <doc xml:space="preserve">a #GFileInfo.</doc>
  40533. <type name="FileInfo" c:type="GFileInfo*"/>
  40534. </instance-parameter>
  40535. <parameter name="attribute" transfer-ownership="none">
  40536. <doc xml:space="preserve">a file attribute key.</doc>
  40537. <type name="utf8" c:type="const char*"/>
  40538. </parameter>
  40539. </parameters>
  40540. </method>
  40541. <method name="get_content_type"
  40542. c:identifier="g_file_info_get_content_type">
  40543. <doc xml:space="preserve">Gets the file's content type.</doc>
  40544. <return-value transfer-ownership="none">
  40545. <doc xml:space="preserve">a string containing the file's content type.</doc>
  40546. <type name="utf8" c:type="const char*"/>
  40547. </return-value>
  40548. <parameters>
  40549. <instance-parameter name="info" transfer-ownership="none">
  40550. <doc xml:space="preserve">a #GFileInfo.</doc>
  40551. <type name="FileInfo" c:type="GFileInfo*"/>
  40552. </instance-parameter>
  40553. </parameters>
  40554. </method>
  40555. <method name="get_deletion_date"
  40556. c:identifier="g_file_info_get_deletion_date"
  40557. version="2.36">
  40558. <doc xml:space="preserve">Returns the #GDateTime representing the deletion date of the file, as
  40559. available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the
  40560. G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned.</doc>
  40561. <return-value transfer-ownership="full">
  40562. <doc xml:space="preserve">a #GDateTime, or %NULL.</doc>
  40563. <type name="GLib.DateTime" c:type="GDateTime*"/>
  40564. </return-value>
  40565. <parameters>
  40566. <instance-parameter name="info" transfer-ownership="none">
  40567. <doc xml:space="preserve">a #GFileInfo.</doc>
  40568. <type name="FileInfo" c:type="GFileInfo*"/>
  40569. </instance-parameter>
  40570. </parameters>
  40571. </method>
  40572. <method name="get_display_name"
  40573. c:identifier="g_file_info_get_display_name">
  40574. <doc xml:space="preserve">Gets a display name for a file.</doc>
  40575. <return-value transfer-ownership="none">
  40576. <doc xml:space="preserve">a string containing the display name.</doc>
  40577. <type name="utf8" c:type="const char*"/>
  40578. </return-value>
  40579. <parameters>
  40580. <instance-parameter name="info" transfer-ownership="none">
  40581. <doc xml:space="preserve">a #GFileInfo.</doc>
  40582. <type name="FileInfo" c:type="GFileInfo*"/>
  40583. </instance-parameter>
  40584. </parameters>
  40585. </method>
  40586. <method name="get_edit_name" c:identifier="g_file_info_get_edit_name">
  40587. <doc xml:space="preserve">Gets the edit name for a file.</doc>
  40588. <return-value transfer-ownership="none">
  40589. <doc xml:space="preserve">a string containing the edit name.</doc>
  40590. <type name="utf8" c:type="const char*"/>
  40591. </return-value>
  40592. <parameters>
  40593. <instance-parameter name="info" transfer-ownership="none">
  40594. <doc xml:space="preserve">a #GFileInfo.</doc>
  40595. <type name="FileInfo" c:type="GFileInfo*"/>
  40596. </instance-parameter>
  40597. </parameters>
  40598. </method>
  40599. <method name="get_etag" c:identifier="g_file_info_get_etag">
  40600. <doc xml:space="preserve">Gets the [entity tag][gfile-etag] for a given
  40601. #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.</doc>
  40602. <return-value transfer-ownership="none">
  40603. <doc xml:space="preserve">a string containing the value of the "etag:value" attribute.</doc>
  40604. <type name="utf8" c:type="const char*"/>
  40605. </return-value>
  40606. <parameters>
  40607. <instance-parameter name="info" transfer-ownership="none">
  40608. <doc xml:space="preserve">a #GFileInfo.</doc>
  40609. <type name="FileInfo" c:type="GFileInfo*"/>
  40610. </instance-parameter>
  40611. </parameters>
  40612. </method>
  40613. <method name="get_file_type" c:identifier="g_file_info_get_file_type">
  40614. <doc xml:space="preserve">Gets a file's type (whether it is a regular file, symlink, etc).
  40615. This is different from the file's content type, see g_file_info_get_content_type().</doc>
  40616. <return-value transfer-ownership="none">
  40617. <doc xml:space="preserve">a #GFileType for the given file.</doc>
  40618. <type name="FileType" c:type="GFileType"/>
  40619. </return-value>
  40620. <parameters>
  40621. <instance-parameter name="info" transfer-ownership="none">
  40622. <doc xml:space="preserve">a #GFileInfo.</doc>
  40623. <type name="FileInfo" c:type="GFileInfo*"/>
  40624. </instance-parameter>
  40625. </parameters>
  40626. </method>
  40627. <method name="get_icon" c:identifier="g_file_info_get_icon">
  40628. <doc xml:space="preserve">Gets the icon for a file.</doc>
  40629. <return-value transfer-ownership="none">
  40630. <doc xml:space="preserve">#GIcon for the given @info.</doc>
  40631. <type name="Icon" c:type="GIcon*"/>
  40632. </return-value>
  40633. <parameters>
  40634. <instance-parameter name="info" transfer-ownership="none">
  40635. <doc xml:space="preserve">a #GFileInfo.</doc>
  40636. <type name="FileInfo" c:type="GFileInfo*"/>
  40637. </instance-parameter>
  40638. </parameters>
  40639. </method>
  40640. <method name="get_is_backup" c:identifier="g_file_info_get_is_backup">
  40641. <doc xml:space="preserve">Checks if a file is a backup file.</doc>
  40642. <return-value transfer-ownership="none">
  40643. <doc xml:space="preserve">%TRUE if file is a backup file, %FALSE otherwise.</doc>
  40644. <type name="gboolean" c:type="gboolean"/>
  40645. </return-value>
  40646. <parameters>
  40647. <instance-parameter name="info" transfer-ownership="none">
  40648. <doc xml:space="preserve">a #GFileInfo.</doc>
  40649. <type name="FileInfo" c:type="GFileInfo*"/>
  40650. </instance-parameter>
  40651. </parameters>
  40652. </method>
  40653. <method name="get_is_hidden" c:identifier="g_file_info_get_is_hidden">
  40654. <doc xml:space="preserve">Checks if a file is hidden.</doc>
  40655. <return-value transfer-ownership="none">
  40656. <doc xml:space="preserve">%TRUE if the file is a hidden file, %FALSE otherwise.</doc>
  40657. <type name="gboolean" c:type="gboolean"/>
  40658. </return-value>
  40659. <parameters>
  40660. <instance-parameter name="info" transfer-ownership="none">
  40661. <doc xml:space="preserve">a #GFileInfo.</doc>
  40662. <type name="FileInfo" c:type="GFileInfo*"/>
  40663. </instance-parameter>
  40664. </parameters>
  40665. </method>
  40666. <method name="get_is_symlink" c:identifier="g_file_info_get_is_symlink">
  40667. <doc xml:space="preserve">Checks if a file is a symlink.</doc>
  40668. <return-value transfer-ownership="none">
  40669. <doc xml:space="preserve">%TRUE if the given @info is a symlink.</doc>
  40670. <type name="gboolean" c:type="gboolean"/>
  40671. </return-value>
  40672. <parameters>
  40673. <instance-parameter name="info" transfer-ownership="none">
  40674. <doc xml:space="preserve">a #GFileInfo.</doc>
  40675. <type name="FileInfo" c:type="GFileInfo*"/>
  40676. </instance-parameter>
  40677. </parameters>
  40678. </method>
  40679. <method name="get_modification_time"
  40680. c:identifier="g_file_info_get_modification_time">
  40681. <doc xml:space="preserve">Gets the modification time of the current @info and sets it
  40682. in @result.</doc>
  40683. <return-value transfer-ownership="none">
  40684. <type name="none" c:type="void"/>
  40685. </return-value>
  40686. <parameters>
  40687. <instance-parameter name="info" transfer-ownership="none">
  40688. <doc xml:space="preserve">a #GFileInfo.</doc>
  40689. <type name="FileInfo" c:type="GFileInfo*"/>
  40690. </instance-parameter>
  40691. <parameter name="result"
  40692. direction="out"
  40693. caller-allocates="1"
  40694. transfer-ownership="none">
  40695. <doc xml:space="preserve">a #GTimeVal.</doc>
  40696. <type name="GLib.TimeVal" c:type="GTimeVal*"/>
  40697. </parameter>
  40698. </parameters>
  40699. </method>
  40700. <method name="get_name" c:identifier="g_file_info_get_name">
  40701. <doc xml:space="preserve">Gets the name for a file.</doc>
  40702. <return-value transfer-ownership="none">
  40703. <doc xml:space="preserve">a string containing the file name.</doc>
  40704. <type name="utf8" c:type="const char*"/>
  40705. </return-value>
  40706. <parameters>
  40707. <instance-parameter name="info" transfer-ownership="none">
  40708. <doc xml:space="preserve">a #GFileInfo.</doc>
  40709. <type name="FileInfo" c:type="GFileInfo*"/>
  40710. </instance-parameter>
  40711. </parameters>
  40712. </method>
  40713. <method name="get_size" c:identifier="g_file_info_get_size">
  40714. <doc xml:space="preserve">Gets the file's size.</doc>
  40715. <return-value transfer-ownership="none">
  40716. <doc xml:space="preserve">a #goffset containing the file's size.</doc>
  40717. <type name="gint64" c:type="goffset"/>
  40718. </return-value>
  40719. <parameters>
  40720. <instance-parameter name="info" transfer-ownership="none">
  40721. <doc xml:space="preserve">a #GFileInfo.</doc>
  40722. <type name="FileInfo" c:type="GFileInfo*"/>
  40723. </instance-parameter>
  40724. </parameters>
  40725. </method>
  40726. <method name="get_sort_order" c:identifier="g_file_info_get_sort_order">
  40727. <doc xml:space="preserve">Gets the value of the sort_order attribute from the #GFileInfo.
  40728. See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.</doc>
  40729. <return-value transfer-ownership="none">
  40730. <doc xml:space="preserve">a #gint32 containing the value of the "standard::sort_order" attribute.</doc>
  40731. <type name="gint32" c:type="gint32"/>
  40732. </return-value>
  40733. <parameters>
  40734. <instance-parameter name="info" transfer-ownership="none">
  40735. <doc xml:space="preserve">a #GFileInfo.</doc>
  40736. <type name="FileInfo" c:type="GFileInfo*"/>
  40737. </instance-parameter>
  40738. </parameters>
  40739. </method>
  40740. <method name="get_symbolic_icon"
  40741. c:identifier="g_file_info_get_symbolic_icon"
  40742. version="2.34">
  40743. <doc xml:space="preserve">Gets the symbolic icon for a file.</doc>
  40744. <return-value transfer-ownership="none">
  40745. <doc xml:space="preserve">#GIcon for the given @info.</doc>
  40746. <type name="Icon" c:type="GIcon*"/>
  40747. </return-value>
  40748. <parameters>
  40749. <instance-parameter name="info" transfer-ownership="none">
  40750. <doc xml:space="preserve">a #GFileInfo.</doc>
  40751. <type name="FileInfo" c:type="GFileInfo*"/>
  40752. </instance-parameter>
  40753. </parameters>
  40754. </method>
  40755. <method name="get_symlink_target"
  40756. c:identifier="g_file_info_get_symlink_target">
  40757. <doc xml:space="preserve">Gets the symlink target for a given #GFileInfo.</doc>
  40758. <return-value transfer-ownership="none">
  40759. <doc xml:space="preserve">a string containing the symlink target.</doc>
  40760. <type name="utf8" c:type="const char*"/>
  40761. </return-value>
  40762. <parameters>
  40763. <instance-parameter name="info" transfer-ownership="none">
  40764. <doc xml:space="preserve">a #GFileInfo.</doc>
  40765. <type name="FileInfo" c:type="GFileInfo*"/>
  40766. </instance-parameter>
  40767. </parameters>
  40768. </method>
  40769. <method name="has_attribute" c:identifier="g_file_info_has_attribute">
  40770. <doc xml:space="preserve">Checks if a file info structure has an attribute named @attribute.</doc>
  40771. <return-value transfer-ownership="none">
  40772. <doc xml:space="preserve">%TRUE if @Ginfo has an attribute named @attribute,
  40773. %FALSE otherwise.</doc>
  40774. <type name="gboolean" c:type="gboolean"/>
  40775. </return-value>
  40776. <parameters>
  40777. <instance-parameter name="info" transfer-ownership="none">
  40778. <doc xml:space="preserve">a #GFileInfo.</doc>
  40779. <type name="FileInfo" c:type="GFileInfo*"/>
  40780. </instance-parameter>
  40781. <parameter name="attribute" transfer-ownership="none">
  40782. <doc xml:space="preserve">a file attribute key.</doc>
  40783. <type name="utf8" c:type="const char*"/>
  40784. </parameter>
  40785. </parameters>
  40786. </method>
  40787. <method name="has_namespace"
  40788. c:identifier="g_file_info_has_namespace"
  40789. version="2.22">
  40790. <doc xml:space="preserve">Checks if a file info structure has an attribute in the
  40791. specified @name_space.</doc>
  40792. <return-value transfer-ownership="none">
  40793. <doc xml:space="preserve">%TRUE if @Ginfo has an attribute in @name_space,
  40794. %FALSE otherwise.</doc>
  40795. <type name="gboolean" c:type="gboolean"/>
  40796. </return-value>
  40797. <parameters>
  40798. <instance-parameter name="info" transfer-ownership="none">
  40799. <doc xml:space="preserve">a #GFileInfo.</doc>
  40800. <type name="FileInfo" c:type="GFileInfo*"/>
  40801. </instance-parameter>
  40802. <parameter name="name_space" transfer-ownership="none">
  40803. <doc xml:space="preserve">a file attribute namespace.</doc>
  40804. <type name="utf8" c:type="const char*"/>
  40805. </parameter>
  40806. </parameters>
  40807. </method>
  40808. <method name="list_attributes"
  40809. c:identifier="g_file_info_list_attributes">
  40810. <doc xml:space="preserve">Lists the file info structure's attributes.</doc>
  40811. <return-value transfer-ownership="full" nullable="1">
  40812. <doc xml:space="preserve">a
  40813. null-terminated array of strings of all of the possible attribute
  40814. types for the given @name_space, or %NULL on error.</doc>
  40815. <array c:type="char**">
  40816. <type name="utf8"/>
  40817. </array>
  40818. </return-value>
  40819. <parameters>
  40820. <instance-parameter name="info" transfer-ownership="none">
  40821. <doc xml:space="preserve">a #GFileInfo.</doc>
  40822. <type name="FileInfo" c:type="GFileInfo*"/>
  40823. </instance-parameter>
  40824. <parameter name="name_space"
  40825. transfer-ownership="none"
  40826. nullable="1"
  40827. allow-none="1">
  40828. <doc xml:space="preserve">a file attribute key's namespace, or %NULL to list
  40829. all attributes.</doc>
  40830. <type name="utf8" c:type="const char*"/>
  40831. </parameter>
  40832. </parameters>
  40833. </method>
  40834. <method name="remove_attribute"
  40835. c:identifier="g_file_info_remove_attribute">
  40836. <doc xml:space="preserve">Removes all cases of @attribute from @info if it exists.</doc>
  40837. <return-value transfer-ownership="none">
  40838. <type name="none" c:type="void"/>
  40839. </return-value>
  40840. <parameters>
  40841. <instance-parameter name="info" transfer-ownership="none">
  40842. <doc xml:space="preserve">a #GFileInfo.</doc>
  40843. <type name="FileInfo" c:type="GFileInfo*"/>
  40844. </instance-parameter>
  40845. <parameter name="attribute" transfer-ownership="none">
  40846. <doc xml:space="preserve">a file attribute key.</doc>
  40847. <type name="utf8" c:type="const char*"/>
  40848. </parameter>
  40849. </parameters>
  40850. </method>
  40851. <method name="set_attribute" c:identifier="g_file_info_set_attribute">
  40852. <doc xml:space="preserve">Sets the @attribute to contain the given value, if possible. To unset the
  40853. attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type.</doc>
  40854. <return-value transfer-ownership="none">
  40855. <type name="none" c:type="void"/>
  40856. </return-value>
  40857. <parameters>
  40858. <instance-parameter name="info" transfer-ownership="none">
  40859. <doc xml:space="preserve">a #GFileInfo.</doc>
  40860. <type name="FileInfo" c:type="GFileInfo*"/>
  40861. </instance-parameter>
  40862. <parameter name="attribute" transfer-ownership="none">
  40863. <doc xml:space="preserve">a file attribute key.</doc>
  40864. <type name="utf8" c:type="const char*"/>
  40865. </parameter>
  40866. <parameter name="type" transfer-ownership="none">
  40867. <doc xml:space="preserve">a #GFileAttributeType</doc>
  40868. <type name="FileAttributeType" c:type="GFileAttributeType"/>
  40869. </parameter>
  40870. <parameter name="value_p" transfer-ownership="none">
  40871. <doc xml:space="preserve">pointer to the value</doc>
  40872. <type name="gpointer" c:type="gpointer"/>
  40873. </parameter>
  40874. </parameters>
  40875. </method>
  40876. <method name="set_attribute_boolean"
  40877. c:identifier="g_file_info_set_attribute_boolean">
  40878. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  40879. if possible.</doc>
  40880. <return-value transfer-ownership="none">
  40881. <type name="none" c:type="void"/>
  40882. </return-value>
  40883. <parameters>
  40884. <instance-parameter name="info" transfer-ownership="none">
  40885. <doc xml:space="preserve">a #GFileInfo.</doc>
  40886. <type name="FileInfo" c:type="GFileInfo*"/>
  40887. </instance-parameter>
  40888. <parameter name="attribute" transfer-ownership="none">
  40889. <doc xml:space="preserve">a file attribute key.</doc>
  40890. <type name="utf8" c:type="const char*"/>
  40891. </parameter>
  40892. <parameter name="attr_value" transfer-ownership="none">
  40893. <doc xml:space="preserve">a boolean value.</doc>
  40894. <type name="gboolean" c:type="gboolean"/>
  40895. </parameter>
  40896. </parameters>
  40897. </method>
  40898. <method name="set_attribute_byte_string"
  40899. c:identifier="g_file_info_set_attribute_byte_string">
  40900. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  40901. if possible.</doc>
  40902. <return-value transfer-ownership="none">
  40903. <type name="none" c:type="void"/>
  40904. </return-value>
  40905. <parameters>
  40906. <instance-parameter name="info" transfer-ownership="none">
  40907. <doc xml:space="preserve">a #GFileInfo.</doc>
  40908. <type name="FileInfo" c:type="GFileInfo*"/>
  40909. </instance-parameter>
  40910. <parameter name="attribute" transfer-ownership="none">
  40911. <doc xml:space="preserve">a file attribute key.</doc>
  40912. <type name="utf8" c:type="const char*"/>
  40913. </parameter>
  40914. <parameter name="attr_value" transfer-ownership="none">
  40915. <doc xml:space="preserve">a byte string.</doc>
  40916. <type name="utf8" c:type="const char*"/>
  40917. </parameter>
  40918. </parameters>
  40919. </method>
  40920. <method name="set_attribute_int32"
  40921. c:identifier="g_file_info_set_attribute_int32">
  40922. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  40923. if possible.</doc>
  40924. <return-value transfer-ownership="none">
  40925. <type name="none" c:type="void"/>
  40926. </return-value>
  40927. <parameters>
  40928. <instance-parameter name="info" transfer-ownership="none">
  40929. <doc xml:space="preserve">a #GFileInfo.</doc>
  40930. <type name="FileInfo" c:type="GFileInfo*"/>
  40931. </instance-parameter>
  40932. <parameter name="attribute" transfer-ownership="none">
  40933. <doc xml:space="preserve">a file attribute key.</doc>
  40934. <type name="utf8" c:type="const char*"/>
  40935. </parameter>
  40936. <parameter name="attr_value" transfer-ownership="none">
  40937. <doc xml:space="preserve">a signed 32-bit integer</doc>
  40938. <type name="gint32" c:type="gint32"/>
  40939. </parameter>
  40940. </parameters>
  40941. </method>
  40942. <method name="set_attribute_int64"
  40943. c:identifier="g_file_info_set_attribute_int64">
  40944. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  40945. if possible.</doc>
  40946. <return-value transfer-ownership="none">
  40947. <type name="none" c:type="void"/>
  40948. </return-value>
  40949. <parameters>
  40950. <instance-parameter name="info" transfer-ownership="none">
  40951. <doc xml:space="preserve">a #GFileInfo.</doc>
  40952. <type name="FileInfo" c:type="GFileInfo*"/>
  40953. </instance-parameter>
  40954. <parameter name="attribute" transfer-ownership="none">
  40955. <doc xml:space="preserve">attribute name to set.</doc>
  40956. <type name="utf8" c:type="const char*"/>
  40957. </parameter>
  40958. <parameter name="attr_value" transfer-ownership="none">
  40959. <doc xml:space="preserve">int64 value to set attribute to.</doc>
  40960. <type name="gint64" c:type="gint64"/>
  40961. </parameter>
  40962. </parameters>
  40963. </method>
  40964. <method name="set_attribute_mask"
  40965. c:identifier="g_file_info_set_attribute_mask">
  40966. <doc xml:space="preserve">Sets @mask on @info to match specific attribute types.</doc>
  40967. <return-value transfer-ownership="none">
  40968. <type name="none" c:type="void"/>
  40969. </return-value>
  40970. <parameters>
  40971. <instance-parameter name="info" transfer-ownership="none">
  40972. <doc xml:space="preserve">a #GFileInfo.</doc>
  40973. <type name="FileInfo" c:type="GFileInfo*"/>
  40974. </instance-parameter>
  40975. <parameter name="mask" transfer-ownership="none">
  40976. <doc xml:space="preserve">a #GFileAttributeMatcher.</doc>
  40977. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  40978. </parameter>
  40979. </parameters>
  40980. </method>
  40981. <method name="set_attribute_object"
  40982. c:identifier="g_file_info_set_attribute_object">
  40983. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  40984. if possible.</doc>
  40985. <return-value transfer-ownership="none">
  40986. <type name="none" c:type="void"/>
  40987. </return-value>
  40988. <parameters>
  40989. <instance-parameter name="info" transfer-ownership="none">
  40990. <doc xml:space="preserve">a #GFileInfo.</doc>
  40991. <type name="FileInfo" c:type="GFileInfo*"/>
  40992. </instance-parameter>
  40993. <parameter name="attribute" transfer-ownership="none">
  40994. <doc xml:space="preserve">a file attribute key.</doc>
  40995. <type name="utf8" c:type="const char*"/>
  40996. </parameter>
  40997. <parameter name="attr_value" transfer-ownership="none">
  40998. <doc xml:space="preserve">a #GObject.</doc>
  40999. <type name="GObject.Object" c:type="GObject*"/>
  41000. </parameter>
  41001. </parameters>
  41002. </method>
  41003. <method name="set_attribute_status"
  41004. c:identifier="g_file_info_set_attribute_status"
  41005. version="2.22">
  41006. <doc xml:space="preserve">Sets the attribute status for an attribute key. This is only
  41007. needed by external code that implement g_file_set_attributes_from_info()
  41008. or similar functions.
  41009. The attribute must exist in @info for this to work. Otherwise %FALSE
  41010. is returned and @info is unchanged.</doc>
  41011. <return-value transfer-ownership="none">
  41012. <doc xml:space="preserve">%TRUE if the status was changed, %FALSE if the key was not set.</doc>
  41013. <type name="gboolean" c:type="gboolean"/>
  41014. </return-value>
  41015. <parameters>
  41016. <instance-parameter name="info" transfer-ownership="none">
  41017. <doc xml:space="preserve">a #GFileInfo</doc>
  41018. <type name="FileInfo" c:type="GFileInfo*"/>
  41019. </instance-parameter>
  41020. <parameter name="attribute" transfer-ownership="none">
  41021. <doc xml:space="preserve">a file attribute key</doc>
  41022. <type name="utf8" c:type="const char*"/>
  41023. </parameter>
  41024. <parameter name="status" transfer-ownership="none">
  41025. <doc xml:space="preserve">a #GFileAttributeStatus</doc>
  41026. <type name="FileAttributeStatus" c:type="GFileAttributeStatus"/>
  41027. </parameter>
  41028. </parameters>
  41029. </method>
  41030. <method name="set_attribute_string"
  41031. c:identifier="g_file_info_set_attribute_string">
  41032. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  41033. if possible.</doc>
  41034. <return-value transfer-ownership="none">
  41035. <type name="none" c:type="void"/>
  41036. </return-value>
  41037. <parameters>
  41038. <instance-parameter name="info" transfer-ownership="none">
  41039. <doc xml:space="preserve">a #GFileInfo.</doc>
  41040. <type name="FileInfo" c:type="GFileInfo*"/>
  41041. </instance-parameter>
  41042. <parameter name="attribute" transfer-ownership="none">
  41043. <doc xml:space="preserve">a file attribute key.</doc>
  41044. <type name="utf8" c:type="const char*"/>
  41045. </parameter>
  41046. <parameter name="attr_value" transfer-ownership="none">
  41047. <doc xml:space="preserve">a UTF-8 string.</doc>
  41048. <type name="utf8" c:type="const char*"/>
  41049. </parameter>
  41050. </parameters>
  41051. </method>
  41052. <method name="set_attribute_stringv"
  41053. c:identifier="g_file_info_set_attribute_stringv">
  41054. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  41055. if possible.
  41056. Sinze: 2.22</doc>
  41057. <return-value transfer-ownership="none">
  41058. <type name="none" c:type="void"/>
  41059. </return-value>
  41060. <parameters>
  41061. <instance-parameter name="info" transfer-ownership="none">
  41062. <doc xml:space="preserve">a #GFileInfo.</doc>
  41063. <type name="FileInfo" c:type="GFileInfo*"/>
  41064. </instance-parameter>
  41065. <parameter name="attribute" transfer-ownership="none">
  41066. <doc xml:space="preserve">a file attribute key</doc>
  41067. <type name="utf8" c:type="const char*"/>
  41068. </parameter>
  41069. <parameter name="attr_value" transfer-ownership="none">
  41070. <doc xml:space="preserve">a %NULL terminated array of UTF-8 strings.</doc>
  41071. <array zero-terminated="0" c:type="char**">
  41072. <type name="utf8"/>
  41073. </array>
  41074. </parameter>
  41075. </parameters>
  41076. </method>
  41077. <method name="set_attribute_uint32"
  41078. c:identifier="g_file_info_set_attribute_uint32">
  41079. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  41080. if possible.</doc>
  41081. <return-value transfer-ownership="none">
  41082. <type name="none" c:type="void"/>
  41083. </return-value>
  41084. <parameters>
  41085. <instance-parameter name="info" transfer-ownership="none">
  41086. <doc xml:space="preserve">a #GFileInfo.</doc>
  41087. <type name="FileInfo" c:type="GFileInfo*"/>
  41088. </instance-parameter>
  41089. <parameter name="attribute" transfer-ownership="none">
  41090. <doc xml:space="preserve">a file attribute key.</doc>
  41091. <type name="utf8" c:type="const char*"/>
  41092. </parameter>
  41093. <parameter name="attr_value" transfer-ownership="none">
  41094. <doc xml:space="preserve">an unsigned 32-bit integer.</doc>
  41095. <type name="guint32" c:type="guint32"/>
  41096. </parameter>
  41097. </parameters>
  41098. </method>
  41099. <method name="set_attribute_uint64"
  41100. c:identifier="g_file_info_set_attribute_uint64">
  41101. <doc xml:space="preserve">Sets the @attribute to contain the given @attr_value,
  41102. if possible.</doc>
  41103. <return-value transfer-ownership="none">
  41104. <type name="none" c:type="void"/>
  41105. </return-value>
  41106. <parameters>
  41107. <instance-parameter name="info" transfer-ownership="none">
  41108. <doc xml:space="preserve">a #GFileInfo.</doc>
  41109. <type name="FileInfo" c:type="GFileInfo*"/>
  41110. </instance-parameter>
  41111. <parameter name="attribute" transfer-ownership="none">
  41112. <doc xml:space="preserve">a file attribute key.</doc>
  41113. <type name="utf8" c:type="const char*"/>
  41114. </parameter>
  41115. <parameter name="attr_value" transfer-ownership="none">
  41116. <doc xml:space="preserve">an unsigned 64-bit integer.</doc>
  41117. <type name="guint64" c:type="guint64"/>
  41118. </parameter>
  41119. </parameters>
  41120. </method>
  41121. <method name="set_content_type"
  41122. c:identifier="g_file_info_set_content_type">
  41123. <doc xml:space="preserve">Sets the content type attribute for a given #GFileInfo.
  41124. See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.</doc>
  41125. <return-value transfer-ownership="none">
  41126. <type name="none" c:type="void"/>
  41127. </return-value>
  41128. <parameters>
  41129. <instance-parameter name="info" transfer-ownership="none">
  41130. <doc xml:space="preserve">a #GFileInfo.</doc>
  41131. <type name="FileInfo" c:type="GFileInfo*"/>
  41132. </instance-parameter>
  41133. <parameter name="content_type" transfer-ownership="none">
  41134. <doc xml:space="preserve">a content type. See [GContentType][gio-GContentType]</doc>
  41135. <type name="utf8" c:type="const char*"/>
  41136. </parameter>
  41137. </parameters>
  41138. </method>
  41139. <method name="set_display_name"
  41140. c:identifier="g_file_info_set_display_name">
  41141. <doc xml:space="preserve">Sets the display name for the current #GFileInfo.
  41142. See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.</doc>
  41143. <return-value transfer-ownership="none">
  41144. <type name="none" c:type="void"/>
  41145. </return-value>
  41146. <parameters>
  41147. <instance-parameter name="info" transfer-ownership="none">
  41148. <doc xml:space="preserve">a #GFileInfo.</doc>
  41149. <type name="FileInfo" c:type="GFileInfo*"/>
  41150. </instance-parameter>
  41151. <parameter name="display_name" transfer-ownership="none">
  41152. <doc xml:space="preserve">a string containing a display name.</doc>
  41153. <type name="utf8" c:type="const char*"/>
  41154. </parameter>
  41155. </parameters>
  41156. </method>
  41157. <method name="set_edit_name" c:identifier="g_file_info_set_edit_name">
  41158. <doc xml:space="preserve">Sets the edit name for the current file.
  41159. See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.</doc>
  41160. <return-value transfer-ownership="none">
  41161. <type name="none" c:type="void"/>
  41162. </return-value>
  41163. <parameters>
  41164. <instance-parameter name="info" transfer-ownership="none">
  41165. <doc xml:space="preserve">a #GFileInfo.</doc>
  41166. <type name="FileInfo" c:type="GFileInfo*"/>
  41167. </instance-parameter>
  41168. <parameter name="edit_name" transfer-ownership="none">
  41169. <doc xml:space="preserve">a string containing an edit name.</doc>
  41170. <type name="utf8" c:type="const char*"/>
  41171. </parameter>
  41172. </parameters>
  41173. </method>
  41174. <method name="set_file_type" c:identifier="g_file_info_set_file_type">
  41175. <doc xml:space="preserve">Sets the file type in a #GFileInfo to @type.
  41176. See %G_FILE_ATTRIBUTE_STANDARD_TYPE.</doc>
  41177. <return-value transfer-ownership="none">
  41178. <type name="none" c:type="void"/>
  41179. </return-value>
  41180. <parameters>
  41181. <instance-parameter name="info" transfer-ownership="none">
  41182. <doc xml:space="preserve">a #GFileInfo.</doc>
  41183. <type name="FileInfo" c:type="GFileInfo*"/>
  41184. </instance-parameter>
  41185. <parameter name="type" transfer-ownership="none">
  41186. <doc xml:space="preserve">a #GFileType.</doc>
  41187. <type name="FileType" c:type="GFileType"/>
  41188. </parameter>
  41189. </parameters>
  41190. </method>
  41191. <method name="set_icon" c:identifier="g_file_info_set_icon">
  41192. <doc xml:space="preserve">Sets the icon for a given #GFileInfo.
  41193. See %G_FILE_ATTRIBUTE_STANDARD_ICON.</doc>
  41194. <return-value transfer-ownership="none">
  41195. <type name="none" c:type="void"/>
  41196. </return-value>
  41197. <parameters>
  41198. <instance-parameter name="info" transfer-ownership="none">
  41199. <doc xml:space="preserve">a #GFileInfo.</doc>
  41200. <type name="FileInfo" c:type="GFileInfo*"/>
  41201. </instance-parameter>
  41202. <parameter name="icon" transfer-ownership="none">
  41203. <doc xml:space="preserve">a #GIcon.</doc>
  41204. <type name="Icon" c:type="GIcon*"/>
  41205. </parameter>
  41206. </parameters>
  41207. </method>
  41208. <method name="set_is_hidden" c:identifier="g_file_info_set_is_hidden">
  41209. <doc xml:space="preserve">Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden.
  41210. See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.</doc>
  41211. <return-value transfer-ownership="none">
  41212. <type name="none" c:type="void"/>
  41213. </return-value>
  41214. <parameters>
  41215. <instance-parameter name="info" transfer-ownership="none">
  41216. <doc xml:space="preserve">a #GFileInfo.</doc>
  41217. <type name="FileInfo" c:type="GFileInfo*"/>
  41218. </instance-parameter>
  41219. <parameter name="is_hidden" transfer-ownership="none">
  41220. <doc xml:space="preserve">a #gboolean.</doc>
  41221. <type name="gboolean" c:type="gboolean"/>
  41222. </parameter>
  41223. </parameters>
  41224. </method>
  41225. <method name="set_is_symlink" c:identifier="g_file_info_set_is_symlink">
  41226. <doc xml:space="preserve">Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
  41227. See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.</doc>
  41228. <return-value transfer-ownership="none">
  41229. <type name="none" c:type="void"/>
  41230. </return-value>
  41231. <parameters>
  41232. <instance-parameter name="info" transfer-ownership="none">
  41233. <doc xml:space="preserve">a #GFileInfo.</doc>
  41234. <type name="FileInfo" c:type="GFileInfo*"/>
  41235. </instance-parameter>
  41236. <parameter name="is_symlink" transfer-ownership="none">
  41237. <doc xml:space="preserve">a #gboolean.</doc>
  41238. <type name="gboolean" c:type="gboolean"/>
  41239. </parameter>
  41240. </parameters>
  41241. </method>
  41242. <method name="set_modification_time"
  41243. c:identifier="g_file_info_set_modification_time">
  41244. <doc xml:space="preserve">Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
  41245. info to the given time value.</doc>
  41246. <return-value transfer-ownership="none">
  41247. <type name="none" c:type="void"/>
  41248. </return-value>
  41249. <parameters>
  41250. <instance-parameter name="info" transfer-ownership="none">
  41251. <doc xml:space="preserve">a #GFileInfo.</doc>
  41252. <type name="FileInfo" c:type="GFileInfo*"/>
  41253. </instance-parameter>
  41254. <parameter name="mtime" transfer-ownership="none">
  41255. <doc xml:space="preserve">a #GTimeVal.</doc>
  41256. <type name="GLib.TimeVal" c:type="GTimeVal*"/>
  41257. </parameter>
  41258. </parameters>
  41259. </method>
  41260. <method name="set_name" c:identifier="g_file_info_set_name">
  41261. <doc xml:space="preserve">Sets the name attribute for the current #GFileInfo.
  41262. See %G_FILE_ATTRIBUTE_STANDARD_NAME.</doc>
  41263. <return-value transfer-ownership="none">
  41264. <type name="none" c:type="void"/>
  41265. </return-value>
  41266. <parameters>
  41267. <instance-parameter name="info" transfer-ownership="none">
  41268. <doc xml:space="preserve">a #GFileInfo.</doc>
  41269. <type name="FileInfo" c:type="GFileInfo*"/>
  41270. </instance-parameter>
  41271. <parameter name="name" transfer-ownership="none">
  41272. <doc xml:space="preserve">a string containing a name.</doc>
  41273. <type name="utf8" c:type="const char*"/>
  41274. </parameter>
  41275. </parameters>
  41276. </method>
  41277. <method name="set_size" c:identifier="g_file_info_set_size">
  41278. <doc xml:space="preserve">Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
  41279. to the given size.</doc>
  41280. <return-value transfer-ownership="none">
  41281. <type name="none" c:type="void"/>
  41282. </return-value>
  41283. <parameters>
  41284. <instance-parameter name="info" transfer-ownership="none">
  41285. <doc xml:space="preserve">a #GFileInfo.</doc>
  41286. <type name="FileInfo" c:type="GFileInfo*"/>
  41287. </instance-parameter>
  41288. <parameter name="size" transfer-ownership="none">
  41289. <doc xml:space="preserve">a #goffset containing the file's size.</doc>
  41290. <type name="gint64" c:type="goffset"/>
  41291. </parameter>
  41292. </parameters>
  41293. </method>
  41294. <method name="set_sort_order" c:identifier="g_file_info_set_sort_order">
  41295. <doc xml:space="preserve">Sets the sort order attribute in the file info structure. See
  41296. %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.</doc>
  41297. <return-value transfer-ownership="none">
  41298. <type name="none" c:type="void"/>
  41299. </return-value>
  41300. <parameters>
  41301. <instance-parameter name="info" transfer-ownership="none">
  41302. <doc xml:space="preserve">a #GFileInfo.</doc>
  41303. <type name="FileInfo" c:type="GFileInfo*"/>
  41304. </instance-parameter>
  41305. <parameter name="sort_order" transfer-ownership="none">
  41306. <doc xml:space="preserve">a sort order integer.</doc>
  41307. <type name="gint32" c:type="gint32"/>
  41308. </parameter>
  41309. </parameters>
  41310. </method>
  41311. <method name="set_symbolic_icon"
  41312. c:identifier="g_file_info_set_symbolic_icon"
  41313. version="2.34">
  41314. <doc xml:space="preserve">Sets the symbolic icon for a given #GFileInfo.
  41315. See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.</doc>
  41316. <return-value transfer-ownership="none">
  41317. <type name="none" c:type="void"/>
  41318. </return-value>
  41319. <parameters>
  41320. <instance-parameter name="info" transfer-ownership="none">
  41321. <doc xml:space="preserve">a #GFileInfo.</doc>
  41322. <type name="FileInfo" c:type="GFileInfo*"/>
  41323. </instance-parameter>
  41324. <parameter name="icon" transfer-ownership="none">
  41325. <doc xml:space="preserve">a #GIcon.</doc>
  41326. <type name="Icon" c:type="GIcon*"/>
  41327. </parameter>
  41328. </parameters>
  41329. </method>
  41330. <method name="set_symlink_target"
  41331. c:identifier="g_file_info_set_symlink_target">
  41332. <doc xml:space="preserve">Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
  41333. to the given symlink target.</doc>
  41334. <return-value transfer-ownership="none">
  41335. <type name="none" c:type="void"/>
  41336. </return-value>
  41337. <parameters>
  41338. <instance-parameter name="info" transfer-ownership="none">
  41339. <doc xml:space="preserve">a #GFileInfo.</doc>
  41340. <type name="FileInfo" c:type="GFileInfo*"/>
  41341. </instance-parameter>
  41342. <parameter name="symlink_target" transfer-ownership="none">
  41343. <doc xml:space="preserve">a static string containing a path to a symlink target.</doc>
  41344. <type name="utf8" c:type="const char*"/>
  41345. </parameter>
  41346. </parameters>
  41347. </method>
  41348. <method name="unset_attribute_mask"
  41349. c:identifier="g_file_info_unset_attribute_mask">
  41350. <doc xml:space="preserve">Unsets a mask set by g_file_info_set_attribute_mask(), if one
  41351. is set.</doc>
  41352. <return-value transfer-ownership="none">
  41353. <type name="none" c:type="void"/>
  41354. </return-value>
  41355. <parameters>
  41356. <instance-parameter name="info" transfer-ownership="none">
  41357. <doc xml:space="preserve">#GFileInfo.</doc>
  41358. <type name="FileInfo" c:type="GFileInfo*"/>
  41359. </instance-parameter>
  41360. </parameters>
  41361. </method>
  41362. </class>
  41363. <record name="FileInfoClass"
  41364. c:type="GFileInfoClass"
  41365. disguised="1"
  41366. glib:is-gtype-struct-for="FileInfo">
  41367. </record>
  41368. <class name="FileInputStream"
  41369. c:symbol-prefix="file_input_stream"
  41370. c:type="GFileInputStream"
  41371. parent="InputStream"
  41372. glib:type-name="GFileInputStream"
  41373. glib:get-type="g_file_input_stream_get_type"
  41374. glib:type-struct="FileInputStreamClass">
  41375. <doc xml:space="preserve">GFileInputStream provides input streams that take their
  41376. content from a file.
  41377. GFileInputStream implements #GSeekable, which allows the input
  41378. stream to jump to arbitrary positions in the file, provided the
  41379. filesystem of the file allows it. To find the position of a file
  41380. input stream, use g_seekable_tell(). To find out if a file input
  41381. stream supports seeking, use g_seekable_can_seek().
  41382. To position a file input stream, use g_seekable_seek().</doc>
  41383. <implements name="Seekable"/>
  41384. <virtual-method name="can_seek">
  41385. <return-value transfer-ownership="none">
  41386. <type name="gboolean" c:type="gboolean"/>
  41387. </return-value>
  41388. <parameters>
  41389. <instance-parameter name="stream" transfer-ownership="none">
  41390. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41391. </instance-parameter>
  41392. </parameters>
  41393. </virtual-method>
  41394. <virtual-method name="query_info" invoker="query_info" throws="1">
  41395. <doc xml:space="preserve">Queries a file input stream the given @attributes. This function blocks
  41396. while querying the stream. For the asynchronous (non-blocking) version
  41397. of this function, see g_file_input_stream_query_info_async(). While the
  41398. stream is blocked, the stream will set the pending flag internally, and
  41399. any other operations on the stream will fail with %G_IO_ERROR_PENDING.</doc>
  41400. <return-value transfer-ownership="full">
  41401. <doc xml:space="preserve">a #GFileInfo, or %NULL on error.</doc>
  41402. <type name="FileInfo" c:type="GFileInfo*"/>
  41403. </return-value>
  41404. <parameters>
  41405. <instance-parameter name="stream" transfer-ownership="none">
  41406. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41407. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41408. </instance-parameter>
  41409. <parameter name="attributes" transfer-ownership="none">
  41410. <doc xml:space="preserve">a file attribute query string.</doc>
  41411. <type name="utf8" c:type="const char*"/>
  41412. </parameter>
  41413. <parameter name="cancellable"
  41414. transfer-ownership="none"
  41415. nullable="1"
  41416. allow-none="1">
  41417. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  41418. <type name="Cancellable" c:type="GCancellable*"/>
  41419. </parameter>
  41420. </parameters>
  41421. </virtual-method>
  41422. <virtual-method name="query_info_async" invoker="query_info_async">
  41423. <doc xml:space="preserve">Queries the stream information asynchronously.
  41424. When the operation is finished @callback will be called.
  41425. You can then call g_file_input_stream_query_info_finish()
  41426. to get the result of the operation.
  41427. For the synchronous version of this function,
  41428. see g_file_input_stream_query_info().
  41429. If @cancellable is not %NULL, then the operation can be cancelled by
  41430. triggering the cancellable object from another thread. If the operation
  41431. was cancelled, the error %G_IO_ERROR_CANCELLED will be set</doc>
  41432. <return-value transfer-ownership="none">
  41433. <type name="none" c:type="void"/>
  41434. </return-value>
  41435. <parameters>
  41436. <instance-parameter name="stream" transfer-ownership="none">
  41437. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41438. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41439. </instance-parameter>
  41440. <parameter name="attributes" transfer-ownership="none">
  41441. <doc xml:space="preserve">a file attribute query string.</doc>
  41442. <type name="utf8" c:type="const char*"/>
  41443. </parameter>
  41444. <parameter name="io_priority" transfer-ownership="none">
  41445. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  41446. <type name="gint" c:type="int"/>
  41447. </parameter>
  41448. <parameter name="cancellable"
  41449. transfer-ownership="none"
  41450. nullable="1"
  41451. allow-none="1">
  41452. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  41453. <type name="Cancellable" c:type="GCancellable*"/>
  41454. </parameter>
  41455. <parameter name="callback"
  41456. transfer-ownership="none"
  41457. nullable="1"
  41458. allow-none="1"
  41459. scope="async"
  41460. closure="4">
  41461. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  41462. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  41463. </parameter>
  41464. <parameter name="user_data"
  41465. transfer-ownership="none"
  41466. nullable="1"
  41467. allow-none="1"
  41468. closure="4">
  41469. <doc xml:space="preserve">the data to pass to callback function</doc>
  41470. <type name="gpointer" c:type="gpointer"/>
  41471. </parameter>
  41472. </parameters>
  41473. </virtual-method>
  41474. <virtual-method name="query_info_finish"
  41475. invoker="query_info_finish"
  41476. throws="1">
  41477. <doc xml:space="preserve">Finishes an asynchronous info query operation.</doc>
  41478. <return-value transfer-ownership="full">
  41479. <doc xml:space="preserve">#GFileInfo.</doc>
  41480. <type name="FileInfo" c:type="GFileInfo*"/>
  41481. </return-value>
  41482. <parameters>
  41483. <instance-parameter name="stream" transfer-ownership="none">
  41484. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41485. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41486. </instance-parameter>
  41487. <parameter name="result" transfer-ownership="none">
  41488. <doc xml:space="preserve">a #GAsyncResult.</doc>
  41489. <type name="AsyncResult" c:type="GAsyncResult*"/>
  41490. </parameter>
  41491. </parameters>
  41492. </virtual-method>
  41493. <virtual-method name="seek" throws="1">
  41494. <return-value transfer-ownership="none">
  41495. <type name="gboolean" c:type="gboolean"/>
  41496. </return-value>
  41497. <parameters>
  41498. <instance-parameter name="stream" transfer-ownership="none">
  41499. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41500. </instance-parameter>
  41501. <parameter name="offset" transfer-ownership="none">
  41502. <type name="gint64" c:type="goffset"/>
  41503. </parameter>
  41504. <parameter name="type" transfer-ownership="none">
  41505. <type name="GLib.SeekType" c:type="GSeekType"/>
  41506. </parameter>
  41507. <parameter name="cancellable"
  41508. transfer-ownership="none"
  41509. nullable="1"
  41510. allow-none="1">
  41511. <type name="Cancellable" c:type="GCancellable*"/>
  41512. </parameter>
  41513. </parameters>
  41514. </virtual-method>
  41515. <virtual-method name="tell">
  41516. <return-value transfer-ownership="none">
  41517. <type name="gint64" c:type="goffset"/>
  41518. </return-value>
  41519. <parameters>
  41520. <instance-parameter name="stream" transfer-ownership="none">
  41521. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41522. </instance-parameter>
  41523. </parameters>
  41524. </virtual-method>
  41525. <method name="query_info"
  41526. c:identifier="g_file_input_stream_query_info"
  41527. throws="1">
  41528. <doc xml:space="preserve">Queries a file input stream the given @attributes. This function blocks
  41529. while querying the stream. For the asynchronous (non-blocking) version
  41530. of this function, see g_file_input_stream_query_info_async(). While the
  41531. stream is blocked, the stream will set the pending flag internally, and
  41532. any other operations on the stream will fail with %G_IO_ERROR_PENDING.</doc>
  41533. <return-value transfer-ownership="full">
  41534. <doc xml:space="preserve">a #GFileInfo, or %NULL on error.</doc>
  41535. <type name="FileInfo" c:type="GFileInfo*"/>
  41536. </return-value>
  41537. <parameters>
  41538. <instance-parameter name="stream" transfer-ownership="none">
  41539. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41540. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41541. </instance-parameter>
  41542. <parameter name="attributes" transfer-ownership="none">
  41543. <doc xml:space="preserve">a file attribute query string.</doc>
  41544. <type name="utf8" c:type="const char*"/>
  41545. </parameter>
  41546. <parameter name="cancellable"
  41547. transfer-ownership="none"
  41548. nullable="1"
  41549. allow-none="1">
  41550. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  41551. <type name="Cancellable" c:type="GCancellable*"/>
  41552. </parameter>
  41553. </parameters>
  41554. </method>
  41555. <method name="query_info_async"
  41556. c:identifier="g_file_input_stream_query_info_async">
  41557. <doc xml:space="preserve">Queries the stream information asynchronously.
  41558. When the operation is finished @callback will be called.
  41559. You can then call g_file_input_stream_query_info_finish()
  41560. to get the result of the operation.
  41561. For the synchronous version of this function,
  41562. see g_file_input_stream_query_info().
  41563. If @cancellable is not %NULL, then the operation can be cancelled by
  41564. triggering the cancellable object from another thread. If the operation
  41565. was cancelled, the error %G_IO_ERROR_CANCELLED will be set</doc>
  41566. <return-value transfer-ownership="none">
  41567. <type name="none" c:type="void"/>
  41568. </return-value>
  41569. <parameters>
  41570. <instance-parameter name="stream" transfer-ownership="none">
  41571. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41572. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41573. </instance-parameter>
  41574. <parameter name="attributes" transfer-ownership="none">
  41575. <doc xml:space="preserve">a file attribute query string.</doc>
  41576. <type name="utf8" c:type="const char*"/>
  41577. </parameter>
  41578. <parameter name="io_priority" transfer-ownership="none">
  41579. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  41580. <type name="gint" c:type="int"/>
  41581. </parameter>
  41582. <parameter name="cancellable"
  41583. transfer-ownership="none"
  41584. nullable="1"
  41585. allow-none="1">
  41586. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  41587. <type name="Cancellable" c:type="GCancellable*"/>
  41588. </parameter>
  41589. <parameter name="callback"
  41590. transfer-ownership="none"
  41591. nullable="1"
  41592. allow-none="1"
  41593. scope="async"
  41594. closure="4">
  41595. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  41596. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  41597. </parameter>
  41598. <parameter name="user_data"
  41599. transfer-ownership="none"
  41600. nullable="1"
  41601. allow-none="1">
  41602. <doc xml:space="preserve">the data to pass to callback function</doc>
  41603. <type name="gpointer" c:type="gpointer"/>
  41604. </parameter>
  41605. </parameters>
  41606. </method>
  41607. <method name="query_info_finish"
  41608. c:identifier="g_file_input_stream_query_info_finish"
  41609. throws="1">
  41610. <doc xml:space="preserve">Finishes an asynchronous info query operation.</doc>
  41611. <return-value transfer-ownership="full">
  41612. <doc xml:space="preserve">#GFileInfo.</doc>
  41613. <type name="FileInfo" c:type="GFileInfo*"/>
  41614. </return-value>
  41615. <parameters>
  41616. <instance-parameter name="stream" transfer-ownership="none">
  41617. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41618. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41619. </instance-parameter>
  41620. <parameter name="result" transfer-ownership="none">
  41621. <doc xml:space="preserve">a #GAsyncResult.</doc>
  41622. <type name="AsyncResult" c:type="GAsyncResult*"/>
  41623. </parameter>
  41624. </parameters>
  41625. </method>
  41626. <field name="parent_instance">
  41627. <type name="InputStream" c:type="GInputStream"/>
  41628. </field>
  41629. <field name="priv" readable="0" private="1">
  41630. <type name="FileInputStreamPrivate" c:type="GFileInputStreamPrivate*"/>
  41631. </field>
  41632. </class>
  41633. <record name="FileInputStreamClass"
  41634. c:type="GFileInputStreamClass"
  41635. glib:is-gtype-struct-for="FileInputStream">
  41636. <field name="parent_class">
  41637. <type name="InputStreamClass" c:type="GInputStreamClass"/>
  41638. </field>
  41639. <field name="tell">
  41640. <callback name="tell">
  41641. <return-value transfer-ownership="none">
  41642. <type name="gint64" c:type="goffset"/>
  41643. </return-value>
  41644. <parameters>
  41645. <parameter name="stream" transfer-ownership="none">
  41646. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41647. </parameter>
  41648. </parameters>
  41649. </callback>
  41650. </field>
  41651. <field name="can_seek">
  41652. <callback name="can_seek">
  41653. <return-value transfer-ownership="none">
  41654. <type name="gboolean" c:type="gboolean"/>
  41655. </return-value>
  41656. <parameters>
  41657. <parameter name="stream" transfer-ownership="none">
  41658. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41659. </parameter>
  41660. </parameters>
  41661. </callback>
  41662. </field>
  41663. <field name="seek">
  41664. <callback name="seek" throws="1">
  41665. <return-value transfer-ownership="none">
  41666. <type name="gboolean" c:type="gboolean"/>
  41667. </return-value>
  41668. <parameters>
  41669. <parameter name="stream" transfer-ownership="none">
  41670. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41671. </parameter>
  41672. <parameter name="offset" transfer-ownership="none">
  41673. <type name="gint64" c:type="goffset"/>
  41674. </parameter>
  41675. <parameter name="type" transfer-ownership="none">
  41676. <type name="GLib.SeekType" c:type="GSeekType"/>
  41677. </parameter>
  41678. <parameter name="cancellable"
  41679. transfer-ownership="none"
  41680. nullable="1"
  41681. allow-none="1">
  41682. <type name="Cancellable" c:type="GCancellable*"/>
  41683. </parameter>
  41684. </parameters>
  41685. </callback>
  41686. </field>
  41687. <field name="query_info">
  41688. <callback name="query_info" throws="1">
  41689. <return-value transfer-ownership="full">
  41690. <doc xml:space="preserve">a #GFileInfo, or %NULL on error.</doc>
  41691. <type name="FileInfo" c:type="GFileInfo*"/>
  41692. </return-value>
  41693. <parameters>
  41694. <parameter name="stream" transfer-ownership="none">
  41695. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41696. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41697. </parameter>
  41698. <parameter name="attributes" transfer-ownership="none">
  41699. <doc xml:space="preserve">a file attribute query string.</doc>
  41700. <type name="utf8" c:type="const char*"/>
  41701. </parameter>
  41702. <parameter name="cancellable"
  41703. transfer-ownership="none"
  41704. nullable="1"
  41705. allow-none="1">
  41706. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  41707. <type name="Cancellable" c:type="GCancellable*"/>
  41708. </parameter>
  41709. </parameters>
  41710. </callback>
  41711. </field>
  41712. <field name="query_info_async">
  41713. <callback name="query_info_async">
  41714. <return-value transfer-ownership="none">
  41715. <type name="none" c:type="void"/>
  41716. </return-value>
  41717. <parameters>
  41718. <parameter name="stream" transfer-ownership="none">
  41719. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41720. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41721. </parameter>
  41722. <parameter name="attributes" transfer-ownership="none">
  41723. <doc xml:space="preserve">a file attribute query string.</doc>
  41724. <type name="utf8" c:type="const char*"/>
  41725. </parameter>
  41726. <parameter name="io_priority" transfer-ownership="none">
  41727. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  41728. <type name="gint" c:type="int"/>
  41729. </parameter>
  41730. <parameter name="cancellable"
  41731. transfer-ownership="none"
  41732. nullable="1"
  41733. allow-none="1">
  41734. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  41735. <type name="Cancellable" c:type="GCancellable*"/>
  41736. </parameter>
  41737. <parameter name="callback"
  41738. transfer-ownership="none"
  41739. nullable="1"
  41740. allow-none="1"
  41741. scope="async"
  41742. closure="5">
  41743. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  41744. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  41745. </parameter>
  41746. <parameter name="user_data"
  41747. transfer-ownership="none"
  41748. nullable="1"
  41749. allow-none="1"
  41750. closure="5">
  41751. <doc xml:space="preserve">the data to pass to callback function</doc>
  41752. <type name="gpointer" c:type="gpointer"/>
  41753. </parameter>
  41754. </parameters>
  41755. </callback>
  41756. </field>
  41757. <field name="query_info_finish">
  41758. <callback name="query_info_finish" throws="1">
  41759. <return-value transfer-ownership="full">
  41760. <doc xml:space="preserve">#GFileInfo.</doc>
  41761. <type name="FileInfo" c:type="GFileInfo*"/>
  41762. </return-value>
  41763. <parameters>
  41764. <parameter name="stream" transfer-ownership="none">
  41765. <doc xml:space="preserve">a #GFileInputStream.</doc>
  41766. <type name="FileInputStream" c:type="GFileInputStream*"/>
  41767. </parameter>
  41768. <parameter name="result" transfer-ownership="none">
  41769. <doc xml:space="preserve">a #GAsyncResult.</doc>
  41770. <type name="AsyncResult" c:type="GAsyncResult*"/>
  41771. </parameter>
  41772. </parameters>
  41773. </callback>
  41774. </field>
  41775. <field name="_g_reserved1" introspectable="0">
  41776. <callback name="_g_reserved1">
  41777. <return-value transfer-ownership="none">
  41778. <type name="none" c:type="void"/>
  41779. </return-value>
  41780. </callback>
  41781. </field>
  41782. <field name="_g_reserved2" introspectable="0">
  41783. <callback name="_g_reserved2">
  41784. <return-value transfer-ownership="none">
  41785. <type name="none" c:type="void"/>
  41786. </return-value>
  41787. </callback>
  41788. </field>
  41789. <field name="_g_reserved3" introspectable="0">
  41790. <callback name="_g_reserved3">
  41791. <return-value transfer-ownership="none">
  41792. <type name="none" c:type="void"/>
  41793. </return-value>
  41794. </callback>
  41795. </field>
  41796. <field name="_g_reserved4" introspectable="0">
  41797. <callback name="_g_reserved4">
  41798. <return-value transfer-ownership="none">
  41799. <type name="none" c:type="void"/>
  41800. </return-value>
  41801. </callback>
  41802. </field>
  41803. <field name="_g_reserved5" introspectable="0">
  41804. <callback name="_g_reserved5">
  41805. <return-value transfer-ownership="none">
  41806. <type name="none" c:type="void"/>
  41807. </return-value>
  41808. </callback>
  41809. </field>
  41810. </record>
  41811. <record name="FileInputStreamPrivate"
  41812. c:type="GFileInputStreamPrivate"
  41813. disguised="1">
  41814. </record>
  41815. <bitfield name="FileMeasureFlags"
  41816. version="2.38"
  41817. glib:type-name="GFileMeasureFlags"
  41818. glib:get-type="g_file_measure_flags_get_type"
  41819. c:type="GFileMeasureFlags">
  41820. <doc xml:space="preserve">Flags that can be used with g_file_measure_disk_usage().</doc>
  41821. <member name="none"
  41822. value="0"
  41823. c:identifier="G_FILE_MEASURE_NONE"
  41824. glib:nick="none">
  41825. <doc xml:space="preserve">No flags set.</doc>
  41826. </member>
  41827. <member name="report_any_error"
  41828. value="2"
  41829. c:identifier="G_FILE_MEASURE_REPORT_ANY_ERROR"
  41830. glib:nick="report-any-error">
  41831. <doc xml:space="preserve">Report any error encountered
  41832. while traversing the directory tree. Normally errors are only
  41833. reported for the toplevel file.</doc>
  41834. </member>
  41835. <member name="apparent_size"
  41836. value="4"
  41837. c:identifier="G_FILE_MEASURE_APPARENT_SIZE"
  41838. glib:nick="apparent-size">
  41839. <doc xml:space="preserve">Tally usage based on apparent file
  41840. sizes. Normally, the block-size is used, if available, as this is a
  41841. more accurate representation of disk space used.
  41842. Compare with `du --apparent-size`.</doc>
  41843. </member>
  41844. <member name="no_xdev"
  41845. value="8"
  41846. c:identifier="G_FILE_MEASURE_NO_XDEV"
  41847. glib:nick="no-xdev">
  41848. <doc xml:space="preserve">Do not cross mount point boundaries.
  41849. Compare with `du -x`.</doc>
  41850. </member>
  41851. </bitfield>
  41852. <callback name="FileMeasureProgressCallback"
  41853. c:type="GFileMeasureProgressCallback"
  41854. version="2.38">
  41855. <doc xml:space="preserve">This callback type is used by g_file_measure_disk_usage() to make
  41856. periodic progress reports when measuring the amount of disk spaced
  41857. used by a directory.
  41858. These calls are made on a best-effort basis and not all types of
  41859. #GFile will support them. At the minimum, however, one call will
  41860. always be made immediately.
  41861. In the case that there is no support, @reporting will be set to
  41862. %FALSE (and the other values undefined) and no further calls will be
  41863. made. Otherwise, the @reporting will be %TRUE and the other values
  41864. all-zeros during the first (immediate) call. In this way, you can
  41865. know which type of progress UI to show without a delay.
  41866. For g_file_measure_disk_usage() the callback is made directly. For
  41867. g_file_measure_disk_usage_async() the callback is made via the
  41868. default main context of the calling thread (ie: the same way that the
  41869. final async result would be reported).
  41870. @current_size is in the same units as requested by the operation (see
  41871. %G_FILE_DISK_USAGE_APPARENT_SIZE).
  41872. The frequency of the updates is implementation defined, but is
  41873. ideally about once every 200ms.
  41874. The last progress callback may or may not be equal to the final
  41875. result. Always check the async result to get the final value.</doc>
  41876. <return-value transfer-ownership="none">
  41877. <type name="none" c:type="void"/>
  41878. </return-value>
  41879. <parameters>
  41880. <parameter name="reporting" transfer-ownership="none">
  41881. <doc xml:space="preserve">%TRUE if more reports will come</doc>
  41882. <type name="gboolean" c:type="gboolean"/>
  41883. </parameter>
  41884. <parameter name="current_size" transfer-ownership="none">
  41885. <doc xml:space="preserve">the current cumulative size measurement</doc>
  41886. <type name="guint64" c:type="guint64"/>
  41887. </parameter>
  41888. <parameter name="num_dirs" transfer-ownership="none">
  41889. <doc xml:space="preserve">the number of directories visited so far</doc>
  41890. <type name="guint64" c:type="guint64"/>
  41891. </parameter>
  41892. <parameter name="num_files" transfer-ownership="none">
  41893. <doc xml:space="preserve">the number of non-directory files encountered</doc>
  41894. <type name="guint64" c:type="guint64"/>
  41895. </parameter>
  41896. <parameter name="user_data"
  41897. transfer-ownership="none"
  41898. nullable="1"
  41899. allow-none="1"
  41900. closure="4">
  41901. <doc xml:space="preserve">the data passed to the original request for this callback</doc>
  41902. <type name="gpointer" c:type="gpointer"/>
  41903. </parameter>
  41904. </parameters>
  41905. </callback>
  41906. <class name="FileMonitor"
  41907. c:symbol-prefix="file_monitor"
  41908. c:type="GFileMonitor"
  41909. parent="GObject.Object"
  41910. abstract="1"
  41911. glib:type-name="GFileMonitor"
  41912. glib:get-type="g_file_monitor_get_type"
  41913. glib:type-struct="FileMonitorClass">
  41914. <doc xml:space="preserve">Monitors a file or directory for changes.
  41915. To obtain a #GFileMonitor for a file or directory, use
  41916. g_file_monitor(), g_file_monitor_file(), or
  41917. g_file_monitor_directory().
  41918. To get informed about changes to the file or directory you are
  41919. monitoring, connect to the #GFileMonitor::changed signal. The
  41920. signal will be emitted in the
  41921. [thread-default main context][g-main-context-push-thread-default]
  41922. of the thread that the monitor was created in
  41923. (though if the global default main context is blocked, this may
  41924. cause notifications to be blocked even if the thread-default
  41925. context is still running).</doc>
  41926. <virtual-method name="cancel" invoker="cancel">
  41927. <doc xml:space="preserve">Cancels a file monitor.</doc>
  41928. <return-value transfer-ownership="none">
  41929. <doc xml:space="preserve">always %TRUE</doc>
  41930. <type name="gboolean" c:type="gboolean"/>
  41931. </return-value>
  41932. <parameters>
  41933. <instance-parameter name="monitor" transfer-ownership="none">
  41934. <doc xml:space="preserve">a #GFileMonitor.</doc>
  41935. <type name="FileMonitor" c:type="GFileMonitor*"/>
  41936. </instance-parameter>
  41937. </parameters>
  41938. </virtual-method>
  41939. <virtual-method name="changed">
  41940. <return-value transfer-ownership="none">
  41941. <type name="none" c:type="void"/>
  41942. </return-value>
  41943. <parameters>
  41944. <instance-parameter name="monitor" transfer-ownership="none">
  41945. <type name="FileMonitor" c:type="GFileMonitor*"/>
  41946. </instance-parameter>
  41947. <parameter name="file" transfer-ownership="none">
  41948. <type name="File" c:type="GFile*"/>
  41949. </parameter>
  41950. <parameter name="other_file" transfer-ownership="none">
  41951. <type name="File" c:type="GFile*"/>
  41952. </parameter>
  41953. <parameter name="event_type" transfer-ownership="none">
  41954. <type name="FileMonitorEvent" c:type="GFileMonitorEvent"/>
  41955. </parameter>
  41956. </parameters>
  41957. </virtual-method>
  41958. <method name="cancel" c:identifier="g_file_monitor_cancel">
  41959. <doc xml:space="preserve">Cancels a file monitor.</doc>
  41960. <return-value transfer-ownership="none">
  41961. <doc xml:space="preserve">always %TRUE</doc>
  41962. <type name="gboolean" c:type="gboolean"/>
  41963. </return-value>
  41964. <parameters>
  41965. <instance-parameter name="monitor" transfer-ownership="none">
  41966. <doc xml:space="preserve">a #GFileMonitor.</doc>
  41967. <type name="FileMonitor" c:type="GFileMonitor*"/>
  41968. </instance-parameter>
  41969. </parameters>
  41970. </method>
  41971. <method name="emit_event" c:identifier="g_file_monitor_emit_event">
  41972. <doc xml:space="preserve">Emits the #GFileMonitor::changed signal if a change
  41973. has taken place. Should be called from file monitor
  41974. implementations only.
  41975. Implementations are responsible to call this method from the
  41976. [thread-default main context][g-main-context-push-thread-default] of the
  41977. thread that the monitor was created in.</doc>
  41978. <return-value transfer-ownership="none">
  41979. <type name="none" c:type="void"/>
  41980. </return-value>
  41981. <parameters>
  41982. <instance-parameter name="monitor" transfer-ownership="none">
  41983. <doc xml:space="preserve">a #GFileMonitor.</doc>
  41984. <type name="FileMonitor" c:type="GFileMonitor*"/>
  41985. </instance-parameter>
  41986. <parameter name="child" transfer-ownership="none">
  41987. <doc xml:space="preserve">a #GFile.</doc>
  41988. <type name="File" c:type="GFile*"/>
  41989. </parameter>
  41990. <parameter name="other_file" transfer-ownership="none">
  41991. <doc xml:space="preserve">a #GFile.</doc>
  41992. <type name="File" c:type="GFile*"/>
  41993. </parameter>
  41994. <parameter name="event_type" transfer-ownership="none">
  41995. <doc xml:space="preserve">a set of #GFileMonitorEvent flags.</doc>
  41996. <type name="FileMonitorEvent" c:type="GFileMonitorEvent"/>
  41997. </parameter>
  41998. </parameters>
  41999. </method>
  42000. <method name="is_cancelled" c:identifier="g_file_monitor_is_cancelled">
  42001. <doc xml:space="preserve">Returns whether the monitor is canceled.</doc>
  42002. <return-value transfer-ownership="none">
  42003. <doc xml:space="preserve">%TRUE if monitor is canceled. %FALSE otherwise.</doc>
  42004. <type name="gboolean" c:type="gboolean"/>
  42005. </return-value>
  42006. <parameters>
  42007. <instance-parameter name="monitor" transfer-ownership="none">
  42008. <doc xml:space="preserve">a #GFileMonitor</doc>
  42009. <type name="FileMonitor" c:type="GFileMonitor*"/>
  42010. </instance-parameter>
  42011. </parameters>
  42012. </method>
  42013. <method name="set_rate_limit"
  42014. c:identifier="g_file_monitor_set_rate_limit">
  42015. <doc xml:space="preserve">Sets the rate limit to which the @monitor will report
  42016. consecutive change events to the same file.</doc>
  42017. <return-value transfer-ownership="none">
  42018. <type name="none" c:type="void"/>
  42019. </return-value>
  42020. <parameters>
  42021. <instance-parameter name="monitor" transfer-ownership="none">
  42022. <doc xml:space="preserve">a #GFileMonitor.</doc>
  42023. <type name="FileMonitor" c:type="GFileMonitor*"/>
  42024. </instance-parameter>
  42025. <parameter name="limit_msecs" transfer-ownership="none">
  42026. <doc xml:space="preserve">a non-negative integer with the limit in milliseconds
  42027. to poll for changes</doc>
  42028. <type name="gint" c:type="gint"/>
  42029. </parameter>
  42030. </parameters>
  42031. </method>
  42032. <property name="cancelled" transfer-ownership="none">
  42033. <type name="gboolean" c:type="gboolean"/>
  42034. </property>
  42035. <property name="rate-limit" writable="1" transfer-ownership="none">
  42036. <type name="gint" c:type="gint"/>
  42037. </property>
  42038. <field name="parent_instance">
  42039. <type name="GObject.Object" c:type="GObject"/>
  42040. </field>
  42041. <field name="priv" readable="0" private="1">
  42042. <type name="FileMonitorPrivate" c:type="GFileMonitorPrivate*"/>
  42043. </field>
  42044. <glib:signal name="changed" when="last">
  42045. <doc xml:space="preserve">Emitted when @file has been changed.
  42046. If using %G_FILE_MONITOR_WATCH_RENAMES on a directory monitor, and
  42047. the information is available (and if supported by the backend),
  42048. @event_type may be %G_FILE_MONITOR_EVENT_RENAMED,
  42049. %G_FILE_MONITOR_EVENT_MOVED_IN or %G_FILE_MONITOR_EVENT_MOVED_OUT.
  42050. In all cases @file will be a child of the monitored directory. For
  42051. renames, @file will be the old name and @other_file is the new
  42052. name. For "moved in" events, @file is the name of the file that
  42053. appeared and @other_file is the old name that it was moved from (in
  42054. another directory). For "moved out" events, @file is the name of
  42055. the file that used to be in this directory and @other_file is the
  42056. name of the file at its new location.
  42057. It makes sense to treat %G_FILE_MONITOR_EVENT_MOVED_IN as
  42058. equivalent to %G_FILE_MONITOR_EVENT_CREATED and
  42059. %G_FILE_MONITOR_EVENT_MOVED_OUT as equivalent to
  42060. %G_FILE_MONITOR_EVENT_DELETED, with extra information.
  42061. %G_FILE_MONITOR_EVENT_RENAMED is equivalent to a delete/create
  42062. pair. This is exactly how the events will be reported in the case
  42063. that the %G_FILE_MONITOR_WATCH_RENAMES flag is not in use.
  42064. If using the deprecated flag %G_FILE_MONITOR_SEND_MOVED flag and @event_type is
  42065. #G_FILE_MONITOR_EVENT_MOVED, @file will be set to a #GFile containing the
  42066. old path, and @other_file will be set to a #GFile containing the new path.
  42067. In all the other cases, @other_file will be set to #NULL.</doc>
  42068. <return-value transfer-ownership="none">
  42069. <type name="none" c:type="void"/>
  42070. </return-value>
  42071. <parameters>
  42072. <parameter name="file" transfer-ownership="none">
  42073. <doc xml:space="preserve">a #GFile.</doc>
  42074. <type name="File"/>
  42075. </parameter>
  42076. <parameter name="other_file"
  42077. transfer-ownership="none"
  42078. nullable="1"
  42079. allow-none="1">
  42080. <doc xml:space="preserve">a #GFile or #NULL.</doc>
  42081. <type name="File"/>
  42082. </parameter>
  42083. <parameter name="event_type" transfer-ownership="none">
  42084. <doc xml:space="preserve">a #GFileMonitorEvent.</doc>
  42085. <type name="FileMonitorEvent"/>
  42086. </parameter>
  42087. </parameters>
  42088. </glib:signal>
  42089. </class>
  42090. <record name="FileMonitorClass"
  42091. c:type="GFileMonitorClass"
  42092. glib:is-gtype-struct-for="FileMonitor">
  42093. <field name="parent_class">
  42094. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  42095. </field>
  42096. <field name="changed">
  42097. <callback name="changed">
  42098. <return-value transfer-ownership="none">
  42099. <type name="none" c:type="void"/>
  42100. </return-value>
  42101. <parameters>
  42102. <parameter name="monitor" transfer-ownership="none">
  42103. <type name="FileMonitor" c:type="GFileMonitor*"/>
  42104. </parameter>
  42105. <parameter name="file" transfer-ownership="none">
  42106. <type name="File" c:type="GFile*"/>
  42107. </parameter>
  42108. <parameter name="other_file" transfer-ownership="none">
  42109. <type name="File" c:type="GFile*"/>
  42110. </parameter>
  42111. <parameter name="event_type" transfer-ownership="none">
  42112. <type name="FileMonitorEvent" c:type="GFileMonitorEvent"/>
  42113. </parameter>
  42114. </parameters>
  42115. </callback>
  42116. </field>
  42117. <field name="cancel">
  42118. <callback name="cancel">
  42119. <return-value transfer-ownership="none">
  42120. <doc xml:space="preserve">always %TRUE</doc>
  42121. <type name="gboolean" c:type="gboolean"/>
  42122. </return-value>
  42123. <parameters>
  42124. <parameter name="monitor" transfer-ownership="none">
  42125. <doc xml:space="preserve">a #GFileMonitor.</doc>
  42126. <type name="FileMonitor" c:type="GFileMonitor*"/>
  42127. </parameter>
  42128. </parameters>
  42129. </callback>
  42130. </field>
  42131. <field name="_g_reserved1" introspectable="0">
  42132. <callback name="_g_reserved1">
  42133. <return-value transfer-ownership="none">
  42134. <type name="none" c:type="void"/>
  42135. </return-value>
  42136. </callback>
  42137. </field>
  42138. <field name="_g_reserved2" introspectable="0">
  42139. <callback name="_g_reserved2">
  42140. <return-value transfer-ownership="none">
  42141. <type name="none" c:type="void"/>
  42142. </return-value>
  42143. </callback>
  42144. </field>
  42145. <field name="_g_reserved3" introspectable="0">
  42146. <callback name="_g_reserved3">
  42147. <return-value transfer-ownership="none">
  42148. <type name="none" c:type="void"/>
  42149. </return-value>
  42150. </callback>
  42151. </field>
  42152. <field name="_g_reserved4" introspectable="0">
  42153. <callback name="_g_reserved4">
  42154. <return-value transfer-ownership="none">
  42155. <type name="none" c:type="void"/>
  42156. </return-value>
  42157. </callback>
  42158. </field>
  42159. <field name="_g_reserved5" introspectable="0">
  42160. <callback name="_g_reserved5">
  42161. <return-value transfer-ownership="none">
  42162. <type name="none" c:type="void"/>
  42163. </return-value>
  42164. </callback>
  42165. </field>
  42166. </record>
  42167. <enumeration name="FileMonitorEvent"
  42168. glib:type-name="GFileMonitorEvent"
  42169. glib:get-type="g_file_monitor_event_get_type"
  42170. c:type="GFileMonitorEvent">
  42171. <doc xml:space="preserve">Specifies what type of event a monitor event is.</doc>
  42172. <member name="changed"
  42173. value="0"
  42174. c:identifier="G_FILE_MONITOR_EVENT_CHANGED"
  42175. glib:nick="changed">
  42176. <doc xml:space="preserve">a file changed.</doc>
  42177. </member>
  42178. <member name="changes_done_hint"
  42179. value="1"
  42180. c:identifier="G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT"
  42181. glib:nick="changes-done-hint">
  42182. <doc xml:space="preserve">a hint that this was probably the last change in a set of changes.</doc>
  42183. </member>
  42184. <member name="deleted"
  42185. value="2"
  42186. c:identifier="G_FILE_MONITOR_EVENT_DELETED"
  42187. glib:nick="deleted">
  42188. <doc xml:space="preserve">a file was deleted.</doc>
  42189. </member>
  42190. <member name="created"
  42191. value="3"
  42192. c:identifier="G_FILE_MONITOR_EVENT_CREATED"
  42193. glib:nick="created">
  42194. <doc xml:space="preserve">a file was created.</doc>
  42195. </member>
  42196. <member name="attribute_changed"
  42197. value="4"
  42198. c:identifier="G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED"
  42199. glib:nick="attribute-changed">
  42200. <doc xml:space="preserve">a file attribute was changed.</doc>
  42201. </member>
  42202. <member name="pre_unmount"
  42203. value="5"
  42204. c:identifier="G_FILE_MONITOR_EVENT_PRE_UNMOUNT"
  42205. glib:nick="pre-unmount">
  42206. <doc xml:space="preserve">the file location will soon be unmounted.</doc>
  42207. </member>
  42208. <member name="unmounted"
  42209. value="6"
  42210. c:identifier="G_FILE_MONITOR_EVENT_UNMOUNTED"
  42211. glib:nick="unmounted">
  42212. <doc xml:space="preserve">the file location was unmounted.</doc>
  42213. </member>
  42214. <member name="moved"
  42215. value="7"
  42216. c:identifier="G_FILE_MONITOR_EVENT_MOVED"
  42217. glib:nick="moved">
  42218. <doc xml:space="preserve">the file was moved -- only sent if the
  42219. (deprecated) %G_FILE_MONITOR_SEND_MOVED flag is set</doc>
  42220. </member>
  42221. <member name="renamed"
  42222. value="8"
  42223. c:identifier="G_FILE_MONITOR_EVENT_RENAMED"
  42224. glib:nick="renamed">
  42225. <doc xml:space="preserve">the file was renamed within the
  42226. current directory -- only sent if the %G_FILE_MONITOR_WATCH_MOVES
  42227. flag is set. Since: 2.44.</doc>
  42228. </member>
  42229. <member name="moved_in"
  42230. value="9"
  42231. c:identifier="G_FILE_MONITOR_EVENT_MOVED_IN"
  42232. glib:nick="moved-in">
  42233. <doc xml:space="preserve">the file was moved into the
  42234. monitored directory from another location -- only sent if the
  42235. %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.44.</doc>
  42236. </member>
  42237. <member name="moved_out"
  42238. value="10"
  42239. c:identifier="G_FILE_MONITOR_EVENT_MOVED_OUT"
  42240. glib:nick="moved-out">
  42241. <doc xml:space="preserve">the file was moved out of the
  42242. monitored directory to another location -- only sent if the
  42243. %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.44</doc>
  42244. </member>
  42245. </enumeration>
  42246. <bitfield name="FileMonitorFlags"
  42247. glib:type-name="GFileMonitorFlags"
  42248. glib:get-type="g_file_monitor_flags_get_type"
  42249. c:type="GFileMonitorFlags">
  42250. <doc xml:space="preserve">Flags used to set what a #GFileMonitor will watch for.</doc>
  42251. <member name="none"
  42252. value="0"
  42253. c:identifier="G_FILE_MONITOR_NONE"
  42254. glib:nick="none">
  42255. <doc xml:space="preserve">No flags set.</doc>
  42256. </member>
  42257. <member name="watch_mounts"
  42258. value="1"
  42259. c:identifier="G_FILE_MONITOR_WATCH_MOUNTS"
  42260. glib:nick="watch-mounts">
  42261. <doc xml:space="preserve">Watch for mount events.</doc>
  42262. </member>
  42263. <member name="send_moved"
  42264. value="2"
  42265. c:identifier="G_FILE_MONITOR_SEND_MOVED"
  42266. glib:nick="send-moved">
  42267. <doc xml:space="preserve">Pair DELETED and CREATED events caused
  42268. by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED
  42269. event instead (NB: not supported on all backends; the default
  42270. behaviour -without specifying this flag- is to send single DELETED
  42271. and CREATED events). Deprecated since 2.44: use
  42272. %G_FILE_MONITOR_WATCH_MOVES instead.</doc>
  42273. </member>
  42274. <member name="watch_hard_links"
  42275. value="4"
  42276. c:identifier="G_FILE_MONITOR_WATCH_HARD_LINKS"
  42277. glib:nick="watch-hard-links">
  42278. <doc xml:space="preserve">Watch for changes to the file made
  42279. via another hard link. Since 2.36.</doc>
  42280. </member>
  42281. <member name="watch_moves"
  42282. value="8"
  42283. c:identifier="G_FILE_MONITOR_WATCH_MOVES"
  42284. glib:nick="watch-moves">
  42285. <doc xml:space="preserve">Watch for rename operations on a
  42286. monitored directory. This causes %G_FILE_MONITOR_EVENT_RENAMED,
  42287. %G_FILE_MONITOR_EVENT_MOVED_IN and %G_FILE_MONITOR_EVENT_MOVED_OUT
  42288. events to be emitted when possible. Since: 2.44.</doc>
  42289. </member>
  42290. </bitfield>
  42291. <record name="FileMonitorPrivate"
  42292. c:type="GFileMonitorPrivate"
  42293. disguised="1">
  42294. </record>
  42295. <class name="FileOutputStream"
  42296. c:symbol-prefix="file_output_stream"
  42297. c:type="GFileOutputStream"
  42298. parent="OutputStream"
  42299. glib:type-name="GFileOutputStream"
  42300. glib:get-type="g_file_output_stream_get_type"
  42301. glib:type-struct="FileOutputStreamClass">
  42302. <doc xml:space="preserve">GFileOutputStream provides output streams that write their
  42303. content to a file.
  42304. GFileOutputStream implements #GSeekable, which allows the output
  42305. stream to jump to arbitrary positions in the file and to truncate
  42306. the file, provided the filesystem of the file supports these
  42307. operations.
  42308. To find the position of a file output stream, use g_seekable_tell().
  42309. To find out if a file output stream supports seeking, use
  42310. g_seekable_can_seek().To position a file output stream, use
  42311. g_seekable_seek(). To find out if a file output stream supports
  42312. truncating, use g_seekable_can_truncate(). To truncate a file output
  42313. stream, use g_seekable_truncate().</doc>
  42314. <implements name="Seekable"/>
  42315. <virtual-method name="can_seek">
  42316. <return-value transfer-ownership="none">
  42317. <type name="gboolean" c:type="gboolean"/>
  42318. </return-value>
  42319. <parameters>
  42320. <instance-parameter name="stream" transfer-ownership="none">
  42321. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42322. </instance-parameter>
  42323. </parameters>
  42324. </virtual-method>
  42325. <virtual-method name="can_truncate">
  42326. <return-value transfer-ownership="none">
  42327. <type name="gboolean" c:type="gboolean"/>
  42328. </return-value>
  42329. <parameters>
  42330. <instance-parameter name="stream" transfer-ownership="none">
  42331. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42332. </instance-parameter>
  42333. </parameters>
  42334. </virtual-method>
  42335. <virtual-method name="get_etag" invoker="get_etag">
  42336. <doc xml:space="preserve">Gets the entity tag for the file when it has been written.
  42337. This must be called after the stream has been written
  42338. and closed, as the etag can change while writing.</doc>
  42339. <return-value transfer-ownership="full">
  42340. <doc xml:space="preserve">the entity tag for the stream.</doc>
  42341. <type name="utf8" c:type="char*"/>
  42342. </return-value>
  42343. <parameters>
  42344. <instance-parameter name="stream" transfer-ownership="none">
  42345. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42346. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42347. </instance-parameter>
  42348. </parameters>
  42349. </virtual-method>
  42350. <virtual-method name="query_info" invoker="query_info" throws="1">
  42351. <doc xml:space="preserve">Queries a file output stream for the given @attributes.
  42352. This function blocks while querying the stream. For the asynchronous
  42353. version of this function, see g_file_output_stream_query_info_async().
  42354. While the stream is blocked, the stream will set the pending flag
  42355. internally, and any other operations on the stream will fail with
  42356. %G_IO_ERROR_PENDING.
  42357. Can fail if the stream was already closed (with @error being set to
  42358. %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
  42359. set to %G_IO_ERROR_PENDING), or if querying info is not supported for
  42360. the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
  42361. all cases of failure, %NULL will be returned.
  42362. If @cancellable is not %NULL, then the operation can be cancelled by
  42363. triggering the cancellable object from another thread. If the operation
  42364. was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
  42365. be returned.</doc>
  42366. <return-value transfer-ownership="full">
  42367. <doc xml:space="preserve">a #GFileInfo for the @stream, or %NULL on error.</doc>
  42368. <type name="FileInfo" c:type="GFileInfo*"/>
  42369. </return-value>
  42370. <parameters>
  42371. <instance-parameter name="stream" transfer-ownership="none">
  42372. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42373. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42374. </instance-parameter>
  42375. <parameter name="attributes" transfer-ownership="none">
  42376. <doc xml:space="preserve">a file attribute query string.</doc>
  42377. <type name="utf8" c:type="const char*"/>
  42378. </parameter>
  42379. <parameter name="cancellable"
  42380. transfer-ownership="none"
  42381. nullable="1"
  42382. allow-none="1">
  42383. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  42384. <type name="Cancellable" c:type="GCancellable*"/>
  42385. </parameter>
  42386. </parameters>
  42387. </virtual-method>
  42388. <virtual-method name="query_info_async" invoker="query_info_async">
  42389. <doc xml:space="preserve">Asynchronously queries the @stream for a #GFileInfo. When completed,
  42390. @callback will be called with a #GAsyncResult which can be used to
  42391. finish the operation with g_file_output_stream_query_info_finish().
  42392. For the synchronous version of this function, see
  42393. g_file_output_stream_query_info().</doc>
  42394. <return-value transfer-ownership="none">
  42395. <type name="none" c:type="void"/>
  42396. </return-value>
  42397. <parameters>
  42398. <instance-parameter name="stream" transfer-ownership="none">
  42399. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42400. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42401. </instance-parameter>
  42402. <parameter name="attributes" transfer-ownership="none">
  42403. <doc xml:space="preserve">a file attribute query string.</doc>
  42404. <type name="utf8" c:type="const char*"/>
  42405. </parameter>
  42406. <parameter name="io_priority" transfer-ownership="none">
  42407. <doc xml:space="preserve">the [I/O priority][gio-GIOScheduler] of the request</doc>
  42408. <type name="gint" c:type="int"/>
  42409. </parameter>
  42410. <parameter name="cancellable"
  42411. transfer-ownership="none"
  42412. nullable="1"
  42413. allow-none="1">
  42414. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  42415. <type name="Cancellable" c:type="GCancellable*"/>
  42416. </parameter>
  42417. <parameter name="callback"
  42418. transfer-ownership="none"
  42419. nullable="1"
  42420. allow-none="1"
  42421. scope="async"
  42422. closure="4">
  42423. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  42424. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  42425. </parameter>
  42426. <parameter name="user_data"
  42427. transfer-ownership="none"
  42428. nullable="1"
  42429. allow-none="1"
  42430. closure="4">
  42431. <doc xml:space="preserve">the data to pass to callback function</doc>
  42432. <type name="gpointer" c:type="gpointer"/>
  42433. </parameter>
  42434. </parameters>
  42435. </virtual-method>
  42436. <virtual-method name="query_info_finish"
  42437. invoker="query_info_finish"
  42438. throws="1">
  42439. <doc xml:space="preserve">Finalizes the asynchronous query started
  42440. by g_file_output_stream_query_info_async().</doc>
  42441. <return-value transfer-ownership="full">
  42442. <doc xml:space="preserve">A #GFileInfo for the finished query.</doc>
  42443. <type name="FileInfo" c:type="GFileInfo*"/>
  42444. </return-value>
  42445. <parameters>
  42446. <instance-parameter name="stream" transfer-ownership="none">
  42447. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42448. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42449. </instance-parameter>
  42450. <parameter name="result" transfer-ownership="none">
  42451. <doc xml:space="preserve">a #GAsyncResult.</doc>
  42452. <type name="AsyncResult" c:type="GAsyncResult*"/>
  42453. </parameter>
  42454. </parameters>
  42455. </virtual-method>
  42456. <virtual-method name="seek" throws="1">
  42457. <return-value transfer-ownership="none">
  42458. <type name="gboolean" c:type="gboolean"/>
  42459. </return-value>
  42460. <parameters>
  42461. <instance-parameter name="stream" transfer-ownership="none">
  42462. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42463. </instance-parameter>
  42464. <parameter name="offset" transfer-ownership="none">
  42465. <type name="gint64" c:type="goffset"/>
  42466. </parameter>
  42467. <parameter name="type" transfer-ownership="none">
  42468. <type name="GLib.SeekType" c:type="GSeekType"/>
  42469. </parameter>
  42470. <parameter name="cancellable"
  42471. transfer-ownership="none"
  42472. nullable="1"
  42473. allow-none="1">
  42474. <type name="Cancellable" c:type="GCancellable*"/>
  42475. </parameter>
  42476. </parameters>
  42477. </virtual-method>
  42478. <virtual-method name="tell">
  42479. <return-value transfer-ownership="none">
  42480. <type name="gint64" c:type="goffset"/>
  42481. </return-value>
  42482. <parameters>
  42483. <instance-parameter name="stream" transfer-ownership="none">
  42484. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42485. </instance-parameter>
  42486. </parameters>
  42487. </virtual-method>
  42488. <virtual-method name="truncate_fn" throws="1">
  42489. <return-value transfer-ownership="none">
  42490. <type name="gboolean" c:type="gboolean"/>
  42491. </return-value>
  42492. <parameters>
  42493. <instance-parameter name="stream" transfer-ownership="none">
  42494. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42495. </instance-parameter>
  42496. <parameter name="size" transfer-ownership="none">
  42497. <type name="gint64" c:type="goffset"/>
  42498. </parameter>
  42499. <parameter name="cancellable"
  42500. transfer-ownership="none"
  42501. nullable="1"
  42502. allow-none="1">
  42503. <type name="Cancellable" c:type="GCancellable*"/>
  42504. </parameter>
  42505. </parameters>
  42506. </virtual-method>
  42507. <method name="get_etag" c:identifier="g_file_output_stream_get_etag">
  42508. <doc xml:space="preserve">Gets the entity tag for the file when it has been written.
  42509. This must be called after the stream has been written
  42510. and closed, as the etag can change while writing.</doc>
  42511. <return-value transfer-ownership="full">
  42512. <doc xml:space="preserve">the entity tag for the stream.</doc>
  42513. <type name="utf8" c:type="char*"/>
  42514. </return-value>
  42515. <parameters>
  42516. <instance-parameter name="stream" transfer-ownership="none">
  42517. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42518. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42519. </instance-parameter>
  42520. </parameters>
  42521. </method>
  42522. <method name="query_info"
  42523. c:identifier="g_file_output_stream_query_info"
  42524. throws="1">
  42525. <doc xml:space="preserve">Queries a file output stream for the given @attributes.
  42526. This function blocks while querying the stream. For the asynchronous
  42527. version of this function, see g_file_output_stream_query_info_async().
  42528. While the stream is blocked, the stream will set the pending flag
  42529. internally, and any other operations on the stream will fail with
  42530. %G_IO_ERROR_PENDING.
  42531. Can fail if the stream was already closed (with @error being set to
  42532. %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
  42533. set to %G_IO_ERROR_PENDING), or if querying info is not supported for
  42534. the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
  42535. all cases of failure, %NULL will be returned.
  42536. If @cancellable is not %NULL, then the operation can be cancelled by
  42537. triggering the cancellable object from another thread. If the operation
  42538. was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
  42539. be returned.</doc>
  42540. <return-value transfer-ownership="full">
  42541. <doc xml:space="preserve">a #GFileInfo for the @stream, or %NULL on error.</doc>
  42542. <type name="FileInfo" c:type="GFileInfo*"/>
  42543. </return-value>
  42544. <parameters>
  42545. <instance-parameter name="stream" transfer-ownership="none">
  42546. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42547. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42548. </instance-parameter>
  42549. <parameter name="attributes" transfer-ownership="none">
  42550. <doc xml:space="preserve">a file attribute query string.</doc>
  42551. <type name="utf8" c:type="const char*"/>
  42552. </parameter>
  42553. <parameter name="cancellable"
  42554. transfer-ownership="none"
  42555. nullable="1"
  42556. allow-none="1">
  42557. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  42558. <type name="Cancellable" c:type="GCancellable*"/>
  42559. </parameter>
  42560. </parameters>
  42561. </method>
  42562. <method name="query_info_async"
  42563. c:identifier="g_file_output_stream_query_info_async">
  42564. <doc xml:space="preserve">Asynchronously queries the @stream for a #GFileInfo. When completed,
  42565. @callback will be called with a #GAsyncResult which can be used to
  42566. finish the operation with g_file_output_stream_query_info_finish().
  42567. For the synchronous version of this function, see
  42568. g_file_output_stream_query_info().</doc>
  42569. <return-value transfer-ownership="none">
  42570. <type name="none" c:type="void"/>
  42571. </return-value>
  42572. <parameters>
  42573. <instance-parameter name="stream" transfer-ownership="none">
  42574. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42575. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42576. </instance-parameter>
  42577. <parameter name="attributes" transfer-ownership="none">
  42578. <doc xml:space="preserve">a file attribute query string.</doc>
  42579. <type name="utf8" c:type="const char*"/>
  42580. </parameter>
  42581. <parameter name="io_priority" transfer-ownership="none">
  42582. <doc xml:space="preserve">the [I/O priority][gio-GIOScheduler] of the request</doc>
  42583. <type name="gint" c:type="int"/>
  42584. </parameter>
  42585. <parameter name="cancellable"
  42586. transfer-ownership="none"
  42587. nullable="1"
  42588. allow-none="1">
  42589. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  42590. <type name="Cancellable" c:type="GCancellable*"/>
  42591. </parameter>
  42592. <parameter name="callback"
  42593. transfer-ownership="none"
  42594. nullable="1"
  42595. allow-none="1"
  42596. scope="async"
  42597. closure="4">
  42598. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  42599. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  42600. </parameter>
  42601. <parameter name="user_data"
  42602. transfer-ownership="none"
  42603. nullable="1"
  42604. allow-none="1">
  42605. <doc xml:space="preserve">the data to pass to callback function</doc>
  42606. <type name="gpointer" c:type="gpointer"/>
  42607. </parameter>
  42608. </parameters>
  42609. </method>
  42610. <method name="query_info_finish"
  42611. c:identifier="g_file_output_stream_query_info_finish"
  42612. throws="1">
  42613. <doc xml:space="preserve">Finalizes the asynchronous query started
  42614. by g_file_output_stream_query_info_async().</doc>
  42615. <return-value transfer-ownership="full">
  42616. <doc xml:space="preserve">A #GFileInfo for the finished query.</doc>
  42617. <type name="FileInfo" c:type="GFileInfo*"/>
  42618. </return-value>
  42619. <parameters>
  42620. <instance-parameter name="stream" transfer-ownership="none">
  42621. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42622. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42623. </instance-parameter>
  42624. <parameter name="result" transfer-ownership="none">
  42625. <doc xml:space="preserve">a #GAsyncResult.</doc>
  42626. <type name="AsyncResult" c:type="GAsyncResult*"/>
  42627. </parameter>
  42628. </parameters>
  42629. </method>
  42630. <field name="parent_instance">
  42631. <type name="OutputStream" c:type="GOutputStream"/>
  42632. </field>
  42633. <field name="priv" readable="0" private="1">
  42634. <type name="FileOutputStreamPrivate"
  42635. c:type="GFileOutputStreamPrivate*"/>
  42636. </field>
  42637. </class>
  42638. <record name="FileOutputStreamClass"
  42639. c:type="GFileOutputStreamClass"
  42640. glib:is-gtype-struct-for="FileOutputStream">
  42641. <field name="parent_class">
  42642. <type name="OutputStreamClass" c:type="GOutputStreamClass"/>
  42643. </field>
  42644. <field name="tell">
  42645. <callback name="tell">
  42646. <return-value transfer-ownership="none">
  42647. <type name="gint64" c:type="goffset"/>
  42648. </return-value>
  42649. <parameters>
  42650. <parameter name="stream" transfer-ownership="none">
  42651. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42652. </parameter>
  42653. </parameters>
  42654. </callback>
  42655. </field>
  42656. <field name="can_seek">
  42657. <callback name="can_seek">
  42658. <return-value transfer-ownership="none">
  42659. <type name="gboolean" c:type="gboolean"/>
  42660. </return-value>
  42661. <parameters>
  42662. <parameter name="stream" transfer-ownership="none">
  42663. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42664. </parameter>
  42665. </parameters>
  42666. </callback>
  42667. </field>
  42668. <field name="seek">
  42669. <callback name="seek" throws="1">
  42670. <return-value transfer-ownership="none">
  42671. <type name="gboolean" c:type="gboolean"/>
  42672. </return-value>
  42673. <parameters>
  42674. <parameter name="stream" transfer-ownership="none">
  42675. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42676. </parameter>
  42677. <parameter name="offset" transfer-ownership="none">
  42678. <type name="gint64" c:type="goffset"/>
  42679. </parameter>
  42680. <parameter name="type" transfer-ownership="none">
  42681. <type name="GLib.SeekType" c:type="GSeekType"/>
  42682. </parameter>
  42683. <parameter name="cancellable"
  42684. transfer-ownership="none"
  42685. nullable="1"
  42686. allow-none="1">
  42687. <type name="Cancellable" c:type="GCancellable*"/>
  42688. </parameter>
  42689. </parameters>
  42690. </callback>
  42691. </field>
  42692. <field name="can_truncate">
  42693. <callback name="can_truncate">
  42694. <return-value transfer-ownership="none">
  42695. <type name="gboolean" c:type="gboolean"/>
  42696. </return-value>
  42697. <parameters>
  42698. <parameter name="stream" transfer-ownership="none">
  42699. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42700. </parameter>
  42701. </parameters>
  42702. </callback>
  42703. </field>
  42704. <field name="truncate_fn">
  42705. <callback name="truncate_fn" throws="1">
  42706. <return-value transfer-ownership="none">
  42707. <type name="gboolean" c:type="gboolean"/>
  42708. </return-value>
  42709. <parameters>
  42710. <parameter name="stream" transfer-ownership="none">
  42711. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42712. </parameter>
  42713. <parameter name="size" transfer-ownership="none">
  42714. <type name="gint64" c:type="goffset"/>
  42715. </parameter>
  42716. <parameter name="cancellable"
  42717. transfer-ownership="none"
  42718. nullable="1"
  42719. allow-none="1">
  42720. <type name="Cancellable" c:type="GCancellable*"/>
  42721. </parameter>
  42722. </parameters>
  42723. </callback>
  42724. </field>
  42725. <field name="query_info">
  42726. <callback name="query_info" throws="1">
  42727. <return-value transfer-ownership="full">
  42728. <doc xml:space="preserve">a #GFileInfo for the @stream, or %NULL on error.</doc>
  42729. <type name="FileInfo" c:type="GFileInfo*"/>
  42730. </return-value>
  42731. <parameters>
  42732. <parameter name="stream" transfer-ownership="none">
  42733. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42734. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42735. </parameter>
  42736. <parameter name="attributes" transfer-ownership="none">
  42737. <doc xml:space="preserve">a file attribute query string.</doc>
  42738. <type name="utf8" c:type="const char*"/>
  42739. </parameter>
  42740. <parameter name="cancellable"
  42741. transfer-ownership="none"
  42742. nullable="1"
  42743. allow-none="1">
  42744. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  42745. <type name="Cancellable" c:type="GCancellable*"/>
  42746. </parameter>
  42747. </parameters>
  42748. </callback>
  42749. </field>
  42750. <field name="query_info_async">
  42751. <callback name="query_info_async">
  42752. <return-value transfer-ownership="none">
  42753. <type name="none" c:type="void"/>
  42754. </return-value>
  42755. <parameters>
  42756. <parameter name="stream" transfer-ownership="none">
  42757. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42758. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42759. </parameter>
  42760. <parameter name="attributes" transfer-ownership="none">
  42761. <doc xml:space="preserve">a file attribute query string.</doc>
  42762. <type name="utf8" c:type="const char*"/>
  42763. </parameter>
  42764. <parameter name="io_priority" transfer-ownership="none">
  42765. <doc xml:space="preserve">the [I/O priority][gio-GIOScheduler] of the request</doc>
  42766. <type name="gint" c:type="int"/>
  42767. </parameter>
  42768. <parameter name="cancellable"
  42769. transfer-ownership="none"
  42770. nullable="1"
  42771. allow-none="1">
  42772. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  42773. <type name="Cancellable" c:type="GCancellable*"/>
  42774. </parameter>
  42775. <parameter name="callback"
  42776. transfer-ownership="none"
  42777. nullable="1"
  42778. allow-none="1"
  42779. scope="async"
  42780. closure="5">
  42781. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  42782. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  42783. </parameter>
  42784. <parameter name="user_data"
  42785. transfer-ownership="none"
  42786. nullable="1"
  42787. allow-none="1"
  42788. closure="5">
  42789. <doc xml:space="preserve">the data to pass to callback function</doc>
  42790. <type name="gpointer" c:type="gpointer"/>
  42791. </parameter>
  42792. </parameters>
  42793. </callback>
  42794. </field>
  42795. <field name="query_info_finish">
  42796. <callback name="query_info_finish" throws="1">
  42797. <return-value transfer-ownership="full">
  42798. <doc xml:space="preserve">A #GFileInfo for the finished query.</doc>
  42799. <type name="FileInfo" c:type="GFileInfo*"/>
  42800. </return-value>
  42801. <parameters>
  42802. <parameter name="stream" transfer-ownership="none">
  42803. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42804. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42805. </parameter>
  42806. <parameter name="result" transfer-ownership="none">
  42807. <doc xml:space="preserve">a #GAsyncResult.</doc>
  42808. <type name="AsyncResult" c:type="GAsyncResult*"/>
  42809. </parameter>
  42810. </parameters>
  42811. </callback>
  42812. </field>
  42813. <field name="get_etag">
  42814. <callback name="get_etag">
  42815. <return-value transfer-ownership="full">
  42816. <doc xml:space="preserve">the entity tag for the stream.</doc>
  42817. <type name="utf8" c:type="char*"/>
  42818. </return-value>
  42819. <parameters>
  42820. <parameter name="stream" transfer-ownership="none">
  42821. <doc xml:space="preserve">a #GFileOutputStream.</doc>
  42822. <type name="FileOutputStream" c:type="GFileOutputStream*"/>
  42823. </parameter>
  42824. </parameters>
  42825. </callback>
  42826. </field>
  42827. <field name="_g_reserved1" introspectable="0">
  42828. <callback name="_g_reserved1">
  42829. <return-value transfer-ownership="none">
  42830. <type name="none" c:type="void"/>
  42831. </return-value>
  42832. </callback>
  42833. </field>
  42834. <field name="_g_reserved2" introspectable="0">
  42835. <callback name="_g_reserved2">
  42836. <return-value transfer-ownership="none">
  42837. <type name="none" c:type="void"/>
  42838. </return-value>
  42839. </callback>
  42840. </field>
  42841. <field name="_g_reserved3" introspectable="0">
  42842. <callback name="_g_reserved3">
  42843. <return-value transfer-ownership="none">
  42844. <type name="none" c:type="void"/>
  42845. </return-value>
  42846. </callback>
  42847. </field>
  42848. <field name="_g_reserved4" introspectable="0">
  42849. <callback name="_g_reserved4">
  42850. <return-value transfer-ownership="none">
  42851. <type name="none" c:type="void"/>
  42852. </return-value>
  42853. </callback>
  42854. </field>
  42855. <field name="_g_reserved5" introspectable="0">
  42856. <callback name="_g_reserved5">
  42857. <return-value transfer-ownership="none">
  42858. <type name="none" c:type="void"/>
  42859. </return-value>
  42860. </callback>
  42861. </field>
  42862. </record>
  42863. <record name="FileOutputStreamPrivate"
  42864. c:type="GFileOutputStreamPrivate"
  42865. disguised="1">
  42866. </record>
  42867. <callback name="FileProgressCallback" c:type="GFileProgressCallback">
  42868. <doc xml:space="preserve">When doing file operations that may take a while, such as moving
  42869. a file or copying a file, a progress callback is used to pass how
  42870. far along that operation is to the application.</doc>
  42871. <return-value transfer-ownership="none">
  42872. <type name="none" c:type="void"/>
  42873. </return-value>
  42874. <parameters>
  42875. <parameter name="current_num_bytes" transfer-ownership="none">
  42876. <doc xml:space="preserve">the current number of bytes in the operation.</doc>
  42877. <type name="gint64" c:type="goffset"/>
  42878. </parameter>
  42879. <parameter name="total_num_bytes" transfer-ownership="none">
  42880. <doc xml:space="preserve">the total number of bytes in the operation.</doc>
  42881. <type name="gint64" c:type="goffset"/>
  42882. </parameter>
  42883. <parameter name="user_data"
  42884. transfer-ownership="none"
  42885. nullable="1"
  42886. allow-none="1"
  42887. closure="2">
  42888. <doc xml:space="preserve">user data passed to the callback.</doc>
  42889. <type name="gpointer" c:type="gpointer"/>
  42890. </parameter>
  42891. </parameters>
  42892. </callback>
  42893. <bitfield name="FileQueryInfoFlags"
  42894. glib:type-name="GFileQueryInfoFlags"
  42895. glib:get-type="g_file_query_info_flags_get_type"
  42896. c:type="GFileQueryInfoFlags">
  42897. <doc xml:space="preserve">Flags used when querying a #GFileInfo.</doc>
  42898. <member name="none"
  42899. value="0"
  42900. c:identifier="G_FILE_QUERY_INFO_NONE"
  42901. glib:nick="none">
  42902. <doc xml:space="preserve">No flags set.</doc>
  42903. </member>
  42904. <member name="nofollow_symlinks"
  42905. value="1"
  42906. c:identifier="G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS"
  42907. glib:nick="nofollow-symlinks">
  42908. <doc xml:space="preserve">Don't follow symlinks.</doc>
  42909. </member>
  42910. </bitfield>
  42911. <callback name="FileReadMoreCallback" c:type="GFileReadMoreCallback">
  42912. <doc xml:space="preserve">When loading the partial contents of a file with g_file_load_partial_contents_async(),
  42913. it may become necessary to determine if any more data from the file should be loaded.
  42914. A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
  42915. should be read, or %FALSE otherwise.</doc>
  42916. <return-value transfer-ownership="none">
  42917. <doc xml:space="preserve">%TRUE if more data should be read back. %FALSE otherwise.</doc>
  42918. <type name="gboolean" c:type="gboolean"/>
  42919. </return-value>
  42920. <parameters>
  42921. <parameter name="file_contents" transfer-ownership="none">
  42922. <doc xml:space="preserve">the data as currently read.</doc>
  42923. <type name="utf8" c:type="const char*"/>
  42924. </parameter>
  42925. <parameter name="file_size" transfer-ownership="none">
  42926. <doc xml:space="preserve">the size of the data currently read.</doc>
  42927. <type name="gint64" c:type="goffset"/>
  42928. </parameter>
  42929. <parameter name="callback_data"
  42930. transfer-ownership="none"
  42931. nullable="1"
  42932. allow-none="1">
  42933. <doc xml:space="preserve">data passed to the callback.</doc>
  42934. <type name="gpointer" c:type="gpointer"/>
  42935. </parameter>
  42936. </parameters>
  42937. </callback>
  42938. <enumeration name="FileType"
  42939. glib:type-name="GFileType"
  42940. glib:get-type="g_file_type_get_type"
  42941. c:type="GFileType">
  42942. <doc xml:space="preserve">Indicates the file's on-disk type.</doc>
  42943. <member name="unknown"
  42944. value="0"
  42945. c:identifier="G_FILE_TYPE_UNKNOWN"
  42946. glib:nick="unknown">
  42947. <doc xml:space="preserve">File's type is unknown.</doc>
  42948. </member>
  42949. <member name="regular"
  42950. value="1"
  42951. c:identifier="G_FILE_TYPE_REGULAR"
  42952. glib:nick="regular">
  42953. <doc xml:space="preserve">File handle represents a regular file.</doc>
  42954. </member>
  42955. <member name="directory"
  42956. value="2"
  42957. c:identifier="G_FILE_TYPE_DIRECTORY"
  42958. glib:nick="directory">
  42959. <doc xml:space="preserve">File handle represents a directory.</doc>
  42960. </member>
  42961. <member name="symbolic_link"
  42962. value="3"
  42963. c:identifier="G_FILE_TYPE_SYMBOLIC_LINK"
  42964. glib:nick="symbolic-link">
  42965. <doc xml:space="preserve">File handle represents a symbolic link
  42966. (Unix systems).</doc>
  42967. </member>
  42968. <member name="special"
  42969. value="4"
  42970. c:identifier="G_FILE_TYPE_SPECIAL"
  42971. glib:nick="special">
  42972. <doc xml:space="preserve">File is a "special" file, such as a socket, fifo,
  42973. block device, or character device.</doc>
  42974. </member>
  42975. <member name="shortcut"
  42976. value="5"
  42977. c:identifier="G_FILE_TYPE_SHORTCUT"
  42978. glib:nick="shortcut">
  42979. <doc xml:space="preserve">File is a shortcut (Windows systems).</doc>
  42980. </member>
  42981. <member name="mountable"
  42982. value="6"
  42983. c:identifier="G_FILE_TYPE_MOUNTABLE"
  42984. glib:nick="mountable">
  42985. <doc xml:space="preserve">File is a mountable location.</doc>
  42986. </member>
  42987. </enumeration>
  42988. <class name="FilenameCompleter"
  42989. c:symbol-prefix="filename_completer"
  42990. c:type="GFilenameCompleter"
  42991. parent="GObject.Object"
  42992. glib:type-name="GFilenameCompleter"
  42993. glib:get-type="g_filename_completer_get_type"
  42994. glib:type-struct="FilenameCompleterClass">
  42995. <doc xml:space="preserve">Completes partial file and directory names given a partial string by
  42996. looking in the file system for clues. Can return a list of possible
  42997. completion strings for widget implementations.</doc>
  42998. <constructor name="new" c:identifier="g_filename_completer_new">
  42999. <doc xml:space="preserve">Creates a new filename completer.</doc>
  43000. <return-value transfer-ownership="full">
  43001. <doc xml:space="preserve">a #GFilenameCompleter.</doc>
  43002. <type name="FilenameCompleter" c:type="GFilenameCompleter*"/>
  43003. </return-value>
  43004. </constructor>
  43005. <virtual-method name="got_completion_data">
  43006. <return-value transfer-ownership="none">
  43007. <type name="none" c:type="void"/>
  43008. </return-value>
  43009. <parameters>
  43010. <instance-parameter name="filename_completer"
  43011. transfer-ownership="none">
  43012. <type name="FilenameCompleter" c:type="GFilenameCompleter*"/>
  43013. </instance-parameter>
  43014. </parameters>
  43015. </virtual-method>
  43016. <method name="get_completion_suffix"
  43017. c:identifier="g_filename_completer_get_completion_suffix">
  43018. <doc xml:space="preserve">Obtains a completion for @initial_text from @completer.</doc>
  43019. <return-value transfer-ownership="full">
  43020. <doc xml:space="preserve">a completed string, or %NULL if no completion exists.
  43021. This string is not owned by GIO, so remember to g_free() it
  43022. when finished.</doc>
  43023. <type name="utf8" c:type="char*"/>
  43024. </return-value>
  43025. <parameters>
  43026. <instance-parameter name="completer" transfer-ownership="none">
  43027. <doc xml:space="preserve">the filename completer.</doc>
  43028. <type name="FilenameCompleter" c:type="GFilenameCompleter*"/>
  43029. </instance-parameter>
  43030. <parameter name="initial_text" transfer-ownership="none">
  43031. <doc xml:space="preserve">text to be completed.</doc>
  43032. <type name="utf8" c:type="const char*"/>
  43033. </parameter>
  43034. </parameters>
  43035. </method>
  43036. <method name="get_completions"
  43037. c:identifier="g_filename_completer_get_completions">
  43038. <doc xml:space="preserve">Gets an array of completion strings for a given initial text.</doc>
  43039. <return-value transfer-ownership="full">
  43040. <doc xml:space="preserve">array of strings with possible completions for @initial_text.
  43041. This array must be freed by g_strfreev() when finished.</doc>
  43042. <array c:type="char**">
  43043. <type name="utf8"/>
  43044. </array>
  43045. </return-value>
  43046. <parameters>
  43047. <instance-parameter name="completer" transfer-ownership="none">
  43048. <doc xml:space="preserve">the filename completer.</doc>
  43049. <type name="FilenameCompleter" c:type="GFilenameCompleter*"/>
  43050. </instance-parameter>
  43051. <parameter name="initial_text" transfer-ownership="none">
  43052. <doc xml:space="preserve">text to be completed.</doc>
  43053. <type name="utf8" c:type="const char*"/>
  43054. </parameter>
  43055. </parameters>
  43056. </method>
  43057. <method name="set_dirs_only"
  43058. c:identifier="g_filename_completer_set_dirs_only">
  43059. <doc xml:space="preserve">If @dirs_only is %TRUE, @completer will only
  43060. complete directory names, and not file names.</doc>
  43061. <return-value transfer-ownership="none">
  43062. <type name="none" c:type="void"/>
  43063. </return-value>
  43064. <parameters>
  43065. <instance-parameter name="completer" transfer-ownership="none">
  43066. <doc xml:space="preserve">the filename completer.</doc>
  43067. <type name="FilenameCompleter" c:type="GFilenameCompleter*"/>
  43068. </instance-parameter>
  43069. <parameter name="dirs_only" transfer-ownership="none">
  43070. <doc xml:space="preserve">a #gboolean.</doc>
  43071. <type name="gboolean" c:type="gboolean"/>
  43072. </parameter>
  43073. </parameters>
  43074. </method>
  43075. <glib:signal name="got-completion-data" when="last">
  43076. <doc xml:space="preserve">Emitted when the file name completion information comes available.</doc>
  43077. <return-value transfer-ownership="none">
  43078. <type name="none" c:type="void"/>
  43079. </return-value>
  43080. </glib:signal>
  43081. </class>
  43082. <record name="FilenameCompleterClass"
  43083. c:type="GFilenameCompleterClass"
  43084. glib:is-gtype-struct-for="FilenameCompleter">
  43085. <field name="parent_class">
  43086. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  43087. </field>
  43088. <field name="got_completion_data">
  43089. <callback name="got_completion_data">
  43090. <return-value transfer-ownership="none">
  43091. <type name="none" c:type="void"/>
  43092. </return-value>
  43093. <parameters>
  43094. <parameter name="filename_completer" transfer-ownership="none">
  43095. <type name="FilenameCompleter" c:type="GFilenameCompleter*"/>
  43096. </parameter>
  43097. </parameters>
  43098. </callback>
  43099. </field>
  43100. <field name="_g_reserved1" introspectable="0">
  43101. <callback name="_g_reserved1">
  43102. <return-value transfer-ownership="none">
  43103. <type name="none" c:type="void"/>
  43104. </return-value>
  43105. </callback>
  43106. </field>
  43107. <field name="_g_reserved2" introspectable="0">
  43108. <callback name="_g_reserved2">
  43109. <return-value transfer-ownership="none">
  43110. <type name="none" c:type="void"/>
  43111. </return-value>
  43112. </callback>
  43113. </field>
  43114. <field name="_g_reserved3" introspectable="0">
  43115. <callback name="_g_reserved3">
  43116. <return-value transfer-ownership="none">
  43117. <type name="none" c:type="void"/>
  43118. </return-value>
  43119. </callback>
  43120. </field>
  43121. </record>
  43122. <enumeration name="FilesystemPreviewType"
  43123. glib:type-name="GFilesystemPreviewType"
  43124. glib:get-type="g_filesystem_preview_type_get_type"
  43125. c:type="GFilesystemPreviewType">
  43126. <doc xml:space="preserve">Indicates a hint from the file system whether files should be
  43127. previewed in a file manager. Returned as the value of the key
  43128. #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.</doc>
  43129. <member name="if_always"
  43130. value="0"
  43131. c:identifier="G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS"
  43132. glib:nick="if-always">
  43133. <doc xml:space="preserve">Only preview files if user has explicitly requested it.</doc>
  43134. </member>
  43135. <member name="if_local"
  43136. value="1"
  43137. c:identifier="G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL"
  43138. glib:nick="if-local">
  43139. <doc xml:space="preserve">Preview files if user has requested preview of "local" files.</doc>
  43140. </member>
  43141. <member name="never"
  43142. value="2"
  43143. c:identifier="G_FILESYSTEM_PREVIEW_TYPE_NEVER"
  43144. glib:nick="never">
  43145. <doc xml:space="preserve">Never preview files.</doc>
  43146. </member>
  43147. </enumeration>
  43148. <class name="FilterInputStream"
  43149. c:symbol-prefix="filter_input_stream"
  43150. c:type="GFilterInputStream"
  43151. parent="InputStream"
  43152. abstract="1"
  43153. glib:type-name="GFilterInputStream"
  43154. glib:get-type="g_filter_input_stream_get_type"
  43155. glib:type-struct="FilterInputStreamClass">
  43156. <doc xml:space="preserve">Base class for input stream implementations that perform some
  43157. kind of filtering operation on a base stream. Typical examples
  43158. of filtering operations are character set conversion, compression
  43159. and byte order flipping.</doc>
  43160. <method name="get_base_stream"
  43161. c:identifier="g_filter_input_stream_get_base_stream">
  43162. <doc xml:space="preserve">Gets the base stream for the filter stream.</doc>
  43163. <return-value transfer-ownership="none">
  43164. <doc xml:space="preserve">a #GInputStream.</doc>
  43165. <type name="InputStream" c:type="GInputStream*"/>
  43166. </return-value>
  43167. <parameters>
  43168. <instance-parameter name="stream" transfer-ownership="none">
  43169. <doc xml:space="preserve">a #GFilterInputStream.</doc>
  43170. <type name="FilterInputStream" c:type="GFilterInputStream*"/>
  43171. </instance-parameter>
  43172. </parameters>
  43173. </method>
  43174. <method name="get_close_base_stream"
  43175. c:identifier="g_filter_input_stream_get_close_base_stream">
  43176. <doc xml:space="preserve">Returns whether the base stream will be closed when @stream is
  43177. closed.</doc>
  43178. <return-value transfer-ownership="none">
  43179. <doc xml:space="preserve">%TRUE if the base stream will be closed.</doc>
  43180. <type name="gboolean" c:type="gboolean"/>
  43181. </return-value>
  43182. <parameters>
  43183. <instance-parameter name="stream" transfer-ownership="none">
  43184. <doc xml:space="preserve">a #GFilterInputStream.</doc>
  43185. <type name="FilterInputStream" c:type="GFilterInputStream*"/>
  43186. </instance-parameter>
  43187. </parameters>
  43188. </method>
  43189. <method name="set_close_base_stream"
  43190. c:identifier="g_filter_input_stream_set_close_base_stream">
  43191. <doc xml:space="preserve">Sets whether the base stream will be closed when @stream is closed.</doc>
  43192. <return-value transfer-ownership="none">
  43193. <type name="none" c:type="void"/>
  43194. </return-value>
  43195. <parameters>
  43196. <instance-parameter name="stream" transfer-ownership="none">
  43197. <doc xml:space="preserve">a #GFilterInputStream.</doc>
  43198. <type name="FilterInputStream" c:type="GFilterInputStream*"/>
  43199. </instance-parameter>
  43200. <parameter name="close_base" transfer-ownership="none">
  43201. <doc xml:space="preserve">%TRUE to close the base stream.</doc>
  43202. <type name="gboolean" c:type="gboolean"/>
  43203. </parameter>
  43204. </parameters>
  43205. </method>
  43206. <property name="base-stream"
  43207. writable="1"
  43208. construct-only="1"
  43209. transfer-ownership="none">
  43210. <type name="InputStream"/>
  43211. </property>
  43212. <property name="close-base-stream"
  43213. writable="1"
  43214. construct="1"
  43215. transfer-ownership="none">
  43216. <type name="gboolean" c:type="gboolean"/>
  43217. </property>
  43218. <field name="parent_instance">
  43219. <type name="InputStream" c:type="GInputStream"/>
  43220. </field>
  43221. <field name="base_stream">
  43222. <type name="InputStream" c:type="GInputStream*"/>
  43223. </field>
  43224. </class>
  43225. <record name="FilterInputStreamClass"
  43226. c:type="GFilterInputStreamClass"
  43227. glib:is-gtype-struct-for="FilterInputStream">
  43228. <field name="parent_class">
  43229. <type name="InputStreamClass" c:type="GInputStreamClass"/>
  43230. </field>
  43231. <field name="_g_reserved1" introspectable="0">
  43232. <callback name="_g_reserved1">
  43233. <return-value transfer-ownership="none">
  43234. <type name="none" c:type="void"/>
  43235. </return-value>
  43236. </callback>
  43237. </field>
  43238. <field name="_g_reserved2" introspectable="0">
  43239. <callback name="_g_reserved2">
  43240. <return-value transfer-ownership="none">
  43241. <type name="none" c:type="void"/>
  43242. </return-value>
  43243. </callback>
  43244. </field>
  43245. <field name="_g_reserved3" introspectable="0">
  43246. <callback name="_g_reserved3">
  43247. <return-value transfer-ownership="none">
  43248. <type name="none" c:type="void"/>
  43249. </return-value>
  43250. </callback>
  43251. </field>
  43252. </record>
  43253. <class name="FilterOutputStream"
  43254. c:symbol-prefix="filter_output_stream"
  43255. c:type="GFilterOutputStream"
  43256. parent="OutputStream"
  43257. abstract="1"
  43258. glib:type-name="GFilterOutputStream"
  43259. glib:get-type="g_filter_output_stream_get_type"
  43260. glib:type-struct="FilterOutputStreamClass">
  43261. <doc xml:space="preserve">Base class for output stream implementations that perform some
  43262. kind of filtering operation on a base stream. Typical examples
  43263. of filtering operations are character set conversion, compression
  43264. and byte order flipping.</doc>
  43265. <method name="get_base_stream"
  43266. c:identifier="g_filter_output_stream_get_base_stream">
  43267. <doc xml:space="preserve">Gets the base stream for the filter stream.</doc>
  43268. <return-value transfer-ownership="none">
  43269. <doc xml:space="preserve">a #GOutputStream.</doc>
  43270. <type name="OutputStream" c:type="GOutputStream*"/>
  43271. </return-value>
  43272. <parameters>
  43273. <instance-parameter name="stream" transfer-ownership="none">
  43274. <doc xml:space="preserve">a #GFilterOutputStream.</doc>
  43275. <type name="FilterOutputStream" c:type="GFilterOutputStream*"/>
  43276. </instance-parameter>
  43277. </parameters>
  43278. </method>
  43279. <method name="get_close_base_stream"
  43280. c:identifier="g_filter_output_stream_get_close_base_stream">
  43281. <doc xml:space="preserve">Returns whether the base stream will be closed when @stream is
  43282. closed.</doc>
  43283. <return-value transfer-ownership="none">
  43284. <doc xml:space="preserve">%TRUE if the base stream will be closed.</doc>
  43285. <type name="gboolean" c:type="gboolean"/>
  43286. </return-value>
  43287. <parameters>
  43288. <instance-parameter name="stream" transfer-ownership="none">
  43289. <doc xml:space="preserve">a #GFilterOutputStream.</doc>
  43290. <type name="FilterOutputStream" c:type="GFilterOutputStream*"/>
  43291. </instance-parameter>
  43292. </parameters>
  43293. </method>
  43294. <method name="set_close_base_stream"
  43295. c:identifier="g_filter_output_stream_set_close_base_stream">
  43296. <doc xml:space="preserve">Sets whether the base stream will be closed when @stream is closed.</doc>
  43297. <return-value transfer-ownership="none">
  43298. <type name="none" c:type="void"/>
  43299. </return-value>
  43300. <parameters>
  43301. <instance-parameter name="stream" transfer-ownership="none">
  43302. <doc xml:space="preserve">a #GFilterOutputStream.</doc>
  43303. <type name="FilterOutputStream" c:type="GFilterOutputStream*"/>
  43304. </instance-parameter>
  43305. <parameter name="close_base" transfer-ownership="none">
  43306. <doc xml:space="preserve">%TRUE to close the base stream.</doc>
  43307. <type name="gboolean" c:type="gboolean"/>
  43308. </parameter>
  43309. </parameters>
  43310. </method>
  43311. <property name="base-stream"
  43312. writable="1"
  43313. construct-only="1"
  43314. transfer-ownership="none">
  43315. <type name="OutputStream"/>
  43316. </property>
  43317. <property name="close-base-stream"
  43318. writable="1"
  43319. construct-only="1"
  43320. transfer-ownership="none">
  43321. <type name="gboolean" c:type="gboolean"/>
  43322. </property>
  43323. <field name="parent_instance">
  43324. <type name="OutputStream" c:type="GOutputStream"/>
  43325. </field>
  43326. <field name="base_stream">
  43327. <type name="OutputStream" c:type="GOutputStream*"/>
  43328. </field>
  43329. </class>
  43330. <record name="FilterOutputStreamClass"
  43331. c:type="GFilterOutputStreamClass"
  43332. glib:is-gtype-struct-for="FilterOutputStream">
  43333. <field name="parent_class">
  43334. <type name="OutputStreamClass" c:type="GOutputStreamClass"/>
  43335. </field>
  43336. <field name="_g_reserved1" introspectable="0">
  43337. <callback name="_g_reserved1">
  43338. <return-value transfer-ownership="none">
  43339. <type name="none" c:type="void"/>
  43340. </return-value>
  43341. </callback>
  43342. </field>
  43343. <field name="_g_reserved2" introspectable="0">
  43344. <callback name="_g_reserved2">
  43345. <return-value transfer-ownership="none">
  43346. <type name="none" c:type="void"/>
  43347. </return-value>
  43348. </callback>
  43349. </field>
  43350. <field name="_g_reserved3" introspectable="0">
  43351. <callback name="_g_reserved3">
  43352. <return-value transfer-ownership="none">
  43353. <type name="none" c:type="void"/>
  43354. </return-value>
  43355. </callback>
  43356. </field>
  43357. </record>
  43358. <enumeration name="IOErrorEnum"
  43359. glib:type-name="GIOErrorEnum"
  43360. glib:get-type="g_io_error_enum_get_type"
  43361. c:type="GIOErrorEnum"
  43362. glib:error-domain="g-io-error-quark">
  43363. <doc xml:space="preserve">Error codes returned by GIO functions.
  43364. Note that this domain may be extended in future GLib releases. In
  43365. general, new error codes either only apply to new APIs, or else
  43366. replace %G_IO_ERROR_FAILED in cases that were not explicitly
  43367. distinguished before. You should therefore avoid writing code like
  43368. |[&lt;!-- language="C" --&gt;
  43369. if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED))
  43370. {
  43371. // Assume that this is EPRINTERONFIRE
  43372. ...
  43373. }
  43374. ]|
  43375. but should instead treat all unrecognized error codes the same as
  43376. #G_IO_ERROR_FAILED.</doc>
  43377. <member name="failed"
  43378. value="0"
  43379. c:identifier="G_IO_ERROR_FAILED"
  43380. glib:nick="failed">
  43381. <doc xml:space="preserve">Generic error condition for when an operation fails
  43382. and no more specific #GIOErrorEnum value is defined.</doc>
  43383. </member>
  43384. <member name="not_found"
  43385. value="1"
  43386. c:identifier="G_IO_ERROR_NOT_FOUND"
  43387. glib:nick="not-found">
  43388. <doc xml:space="preserve">File not found.</doc>
  43389. </member>
  43390. <member name="exists"
  43391. value="2"
  43392. c:identifier="G_IO_ERROR_EXISTS"
  43393. glib:nick="exists">
  43394. <doc xml:space="preserve">File already exists.</doc>
  43395. </member>
  43396. <member name="is_directory"
  43397. value="3"
  43398. c:identifier="G_IO_ERROR_IS_DIRECTORY"
  43399. glib:nick="is-directory">
  43400. <doc xml:space="preserve">File is a directory.</doc>
  43401. </member>
  43402. <member name="not_directory"
  43403. value="4"
  43404. c:identifier="G_IO_ERROR_NOT_DIRECTORY"
  43405. glib:nick="not-directory">
  43406. <doc xml:space="preserve">File is not a directory.</doc>
  43407. </member>
  43408. <member name="not_empty"
  43409. value="5"
  43410. c:identifier="G_IO_ERROR_NOT_EMPTY"
  43411. glib:nick="not-empty">
  43412. <doc xml:space="preserve">File is a directory that isn't empty.</doc>
  43413. </member>
  43414. <member name="not_regular_file"
  43415. value="6"
  43416. c:identifier="G_IO_ERROR_NOT_REGULAR_FILE"
  43417. glib:nick="not-regular-file">
  43418. <doc xml:space="preserve">File is not a regular file.</doc>
  43419. </member>
  43420. <member name="not_symbolic_link"
  43421. value="7"
  43422. c:identifier="G_IO_ERROR_NOT_SYMBOLIC_LINK"
  43423. glib:nick="not-symbolic-link">
  43424. <doc xml:space="preserve">File is not a symbolic link.</doc>
  43425. </member>
  43426. <member name="not_mountable_file"
  43427. value="8"
  43428. c:identifier="G_IO_ERROR_NOT_MOUNTABLE_FILE"
  43429. glib:nick="not-mountable-file">
  43430. <doc xml:space="preserve">File cannot be mounted.</doc>
  43431. </member>
  43432. <member name="filename_too_long"
  43433. value="9"
  43434. c:identifier="G_IO_ERROR_FILENAME_TOO_LONG"
  43435. glib:nick="filename-too-long">
  43436. <doc xml:space="preserve">Filename is too many characters.</doc>
  43437. </member>
  43438. <member name="invalid_filename"
  43439. value="10"
  43440. c:identifier="G_IO_ERROR_INVALID_FILENAME"
  43441. glib:nick="invalid-filename">
  43442. <doc xml:space="preserve">Filename is invalid or contains invalid characters.</doc>
  43443. </member>
  43444. <member name="too_many_links"
  43445. value="11"
  43446. c:identifier="G_IO_ERROR_TOO_MANY_LINKS"
  43447. glib:nick="too-many-links">
  43448. <doc xml:space="preserve">File contains too many symbolic links.</doc>
  43449. </member>
  43450. <member name="no_space"
  43451. value="12"
  43452. c:identifier="G_IO_ERROR_NO_SPACE"
  43453. glib:nick="no-space">
  43454. <doc xml:space="preserve">No space left on drive.</doc>
  43455. </member>
  43456. <member name="invalid_argument"
  43457. value="13"
  43458. c:identifier="G_IO_ERROR_INVALID_ARGUMENT"
  43459. glib:nick="invalid-argument">
  43460. <doc xml:space="preserve">Invalid argument.</doc>
  43461. </member>
  43462. <member name="permission_denied"
  43463. value="14"
  43464. c:identifier="G_IO_ERROR_PERMISSION_DENIED"
  43465. glib:nick="permission-denied">
  43466. <doc xml:space="preserve">Permission denied.</doc>
  43467. </member>
  43468. <member name="not_supported"
  43469. value="15"
  43470. c:identifier="G_IO_ERROR_NOT_SUPPORTED"
  43471. glib:nick="not-supported">
  43472. <doc xml:space="preserve">Operation (or one of its parameters) not supported</doc>
  43473. </member>
  43474. <member name="not_mounted"
  43475. value="16"
  43476. c:identifier="G_IO_ERROR_NOT_MOUNTED"
  43477. glib:nick="not-mounted">
  43478. <doc xml:space="preserve">File isn't mounted.</doc>
  43479. </member>
  43480. <member name="already_mounted"
  43481. value="17"
  43482. c:identifier="G_IO_ERROR_ALREADY_MOUNTED"
  43483. glib:nick="already-mounted">
  43484. <doc xml:space="preserve">File is already mounted.</doc>
  43485. </member>
  43486. <member name="closed"
  43487. value="18"
  43488. c:identifier="G_IO_ERROR_CLOSED"
  43489. glib:nick="closed">
  43490. <doc xml:space="preserve">File was closed.</doc>
  43491. </member>
  43492. <member name="cancelled"
  43493. value="19"
  43494. c:identifier="G_IO_ERROR_CANCELLED"
  43495. glib:nick="cancelled">
  43496. <doc xml:space="preserve">Operation was cancelled. See #GCancellable.</doc>
  43497. </member>
  43498. <member name="pending"
  43499. value="20"
  43500. c:identifier="G_IO_ERROR_PENDING"
  43501. glib:nick="pending">
  43502. <doc xml:space="preserve">Operations are still pending.</doc>
  43503. </member>
  43504. <member name="read_only"
  43505. value="21"
  43506. c:identifier="G_IO_ERROR_READ_ONLY"
  43507. glib:nick="read-only">
  43508. <doc xml:space="preserve">File is read only.</doc>
  43509. </member>
  43510. <member name="cant_create_backup"
  43511. value="22"
  43512. c:identifier="G_IO_ERROR_CANT_CREATE_BACKUP"
  43513. glib:nick="cant-create-backup">
  43514. <doc xml:space="preserve">Backup couldn't be created.</doc>
  43515. </member>
  43516. <member name="wrong_etag"
  43517. value="23"
  43518. c:identifier="G_IO_ERROR_WRONG_ETAG"
  43519. glib:nick="wrong-etag">
  43520. <doc xml:space="preserve">File's Entity Tag was incorrect.</doc>
  43521. </member>
  43522. <member name="timed_out"
  43523. value="24"
  43524. c:identifier="G_IO_ERROR_TIMED_OUT"
  43525. glib:nick="timed-out">
  43526. <doc xml:space="preserve">Operation timed out.</doc>
  43527. </member>
  43528. <member name="would_recurse"
  43529. value="25"
  43530. c:identifier="G_IO_ERROR_WOULD_RECURSE"
  43531. glib:nick="would-recurse">
  43532. <doc xml:space="preserve">Operation would be recursive.</doc>
  43533. </member>
  43534. <member name="busy"
  43535. value="26"
  43536. c:identifier="G_IO_ERROR_BUSY"
  43537. glib:nick="busy">
  43538. <doc xml:space="preserve">File is busy.</doc>
  43539. </member>
  43540. <member name="would_block"
  43541. value="27"
  43542. c:identifier="G_IO_ERROR_WOULD_BLOCK"
  43543. glib:nick="would-block">
  43544. <doc xml:space="preserve">Operation would block.</doc>
  43545. </member>
  43546. <member name="host_not_found"
  43547. value="28"
  43548. c:identifier="G_IO_ERROR_HOST_NOT_FOUND"
  43549. glib:nick="host-not-found">
  43550. <doc xml:space="preserve">Host couldn't be found (remote operations).</doc>
  43551. </member>
  43552. <member name="would_merge"
  43553. value="29"
  43554. c:identifier="G_IO_ERROR_WOULD_MERGE"
  43555. glib:nick="would-merge">
  43556. <doc xml:space="preserve">Operation would merge files.</doc>
  43557. </member>
  43558. <member name="failed_handled"
  43559. value="30"
  43560. c:identifier="G_IO_ERROR_FAILED_HANDLED"
  43561. glib:nick="failed-handled">
  43562. <doc xml:space="preserve">Operation failed and a helper program has
  43563. already interacted with the user. Do not display any error dialog.</doc>
  43564. </member>
  43565. <member name="too_many_open_files"
  43566. value="31"
  43567. c:identifier="G_IO_ERROR_TOO_MANY_OPEN_FILES"
  43568. glib:nick="too-many-open-files">
  43569. <doc xml:space="preserve">The current process has too many files
  43570. open and can't open any more. Duplicate descriptors do count toward
  43571. this limit. Since 2.20</doc>
  43572. </member>
  43573. <member name="not_initialized"
  43574. value="32"
  43575. c:identifier="G_IO_ERROR_NOT_INITIALIZED"
  43576. glib:nick="not-initialized">
  43577. <doc xml:space="preserve">The object has not been initialized. Since 2.22</doc>
  43578. </member>
  43579. <member name="address_in_use"
  43580. value="33"
  43581. c:identifier="G_IO_ERROR_ADDRESS_IN_USE"
  43582. glib:nick="address-in-use">
  43583. <doc xml:space="preserve">The requested address is already in use. Since 2.22</doc>
  43584. </member>
  43585. <member name="partial_input"
  43586. value="34"
  43587. c:identifier="G_IO_ERROR_PARTIAL_INPUT"
  43588. glib:nick="partial-input">
  43589. <doc xml:space="preserve">Need more input to finish operation. Since 2.24</doc>
  43590. </member>
  43591. <member name="invalid_data"
  43592. value="35"
  43593. c:identifier="G_IO_ERROR_INVALID_DATA"
  43594. glib:nick="invalid-data">
  43595. <doc xml:space="preserve">The input data was invalid. Since 2.24</doc>
  43596. </member>
  43597. <member name="dbus_error"
  43598. value="36"
  43599. c:identifier="G_IO_ERROR_DBUS_ERROR"
  43600. glib:nick="dbus-error">
  43601. <doc xml:space="preserve">A remote object generated an error that
  43602. doesn't correspond to a locally registered #GError error
  43603. domain. Use g_dbus_error_get_remote_error() to extract the D-Bus
  43604. error name and g_dbus_error_strip_remote_error() to fix up the
  43605. message so it matches what was received on the wire. Since 2.26.</doc>
  43606. </member>
  43607. <member name="host_unreachable"
  43608. value="37"
  43609. c:identifier="G_IO_ERROR_HOST_UNREACHABLE"
  43610. glib:nick="host-unreachable">
  43611. <doc xml:space="preserve">Host unreachable. Since 2.26</doc>
  43612. </member>
  43613. <member name="network_unreachable"
  43614. value="38"
  43615. c:identifier="G_IO_ERROR_NETWORK_UNREACHABLE"
  43616. glib:nick="network-unreachable">
  43617. <doc xml:space="preserve">Network unreachable. Since 2.26</doc>
  43618. </member>
  43619. <member name="connection_refused"
  43620. value="39"
  43621. c:identifier="G_IO_ERROR_CONNECTION_REFUSED"
  43622. glib:nick="connection-refused">
  43623. <doc xml:space="preserve">Connection refused. Since 2.26</doc>
  43624. </member>
  43625. <member name="proxy_failed"
  43626. value="40"
  43627. c:identifier="G_IO_ERROR_PROXY_FAILED"
  43628. glib:nick="proxy-failed">
  43629. <doc xml:space="preserve">Connection to proxy server failed. Since 2.26</doc>
  43630. </member>
  43631. <member name="proxy_auth_failed"
  43632. value="41"
  43633. c:identifier="G_IO_ERROR_PROXY_AUTH_FAILED"
  43634. glib:nick="proxy-auth-failed">
  43635. <doc xml:space="preserve">Proxy authentication failed. Since 2.26</doc>
  43636. </member>
  43637. <member name="proxy_need_auth"
  43638. value="42"
  43639. c:identifier="G_IO_ERROR_PROXY_NEED_AUTH"
  43640. glib:nick="proxy-need-auth">
  43641. <doc xml:space="preserve">Proxy server needs authentication. Since 2.26</doc>
  43642. </member>
  43643. <member name="proxy_not_allowed"
  43644. value="43"
  43645. c:identifier="G_IO_ERROR_PROXY_NOT_ALLOWED"
  43646. glib:nick="proxy-not-allowed">
  43647. <doc xml:space="preserve">Proxy connection is not allowed by ruleset.
  43648. Since 2.26</doc>
  43649. </member>
  43650. <member name="broken_pipe"
  43651. value="44"
  43652. c:identifier="G_IO_ERROR_BROKEN_PIPE"
  43653. glib:nick="broken-pipe">
  43654. <doc xml:space="preserve">Broken pipe. Since 2.36</doc>
  43655. </member>
  43656. <member name="connection_closed"
  43657. value="44"
  43658. c:identifier="G_IO_ERROR_CONNECTION_CLOSED"
  43659. glib:nick="connection-closed">
  43660. <doc xml:space="preserve">Connection closed by peer. Note that this
  43661. is the same code as %G_IO_ERROR_BROKEN_PIPE; before 2.44 some
  43662. "connection closed" errors returned %G_IO_ERROR_BROKEN_PIPE, but others
  43663. returned %G_IO_ERROR_FAILED. Now they should all return the same
  43664. value, which has this more logical name. Since 2.44.</doc>
  43665. </member>
  43666. <member name="not_connected"
  43667. value="45"
  43668. c:identifier="G_IO_ERROR_NOT_CONNECTED"
  43669. glib:nick="not-connected">
  43670. <doc xml:space="preserve">Transport endpoint is not connected. Since 2.44</doc>
  43671. </member>
  43672. <member name="message_too_large"
  43673. value="46"
  43674. c:identifier="G_IO_ERROR_MESSAGE_TOO_LARGE"
  43675. glib:nick="message-too-large">
  43676. <doc xml:space="preserve">Message too large. Since 2.48.</doc>
  43677. </member>
  43678. </enumeration>
  43679. <record name="IOExtension" c:type="GIOExtension" disguised="1">
  43680. <doc xml:space="preserve">#GIOExtension is an opaque data structure and can only be accessed
  43681. using the following functions.</doc>
  43682. <method name="get_name" c:identifier="g_io_extension_get_name">
  43683. <doc xml:space="preserve">Gets the name under which @extension was registered.
  43684. Note that the same type may be registered as extension
  43685. for multiple extension points, under different names.</doc>
  43686. <return-value transfer-ownership="none">
  43687. <doc xml:space="preserve">the name of @extension.</doc>
  43688. <type name="utf8" c:type="const char*"/>
  43689. </return-value>
  43690. <parameters>
  43691. <instance-parameter name="extension" transfer-ownership="none">
  43692. <doc xml:space="preserve">a #GIOExtension</doc>
  43693. <type name="IOExtension" c:type="GIOExtension*"/>
  43694. </instance-parameter>
  43695. </parameters>
  43696. </method>
  43697. <method name="get_priority" c:identifier="g_io_extension_get_priority">
  43698. <doc xml:space="preserve">Gets the priority with which @extension was registered.</doc>
  43699. <return-value transfer-ownership="none">
  43700. <doc xml:space="preserve">the priority of @extension</doc>
  43701. <type name="gint" c:type="gint"/>
  43702. </return-value>
  43703. <parameters>
  43704. <instance-parameter name="extension" transfer-ownership="none">
  43705. <doc xml:space="preserve">a #GIOExtension</doc>
  43706. <type name="IOExtension" c:type="GIOExtension*"/>
  43707. </instance-parameter>
  43708. </parameters>
  43709. </method>
  43710. <method name="get_type" c:identifier="g_io_extension_get_type">
  43711. <doc xml:space="preserve">Gets the type associated with @extension.</doc>
  43712. <return-value transfer-ownership="none">
  43713. <doc xml:space="preserve">the type of @extension</doc>
  43714. <type name="GType" c:type="GType"/>
  43715. </return-value>
  43716. <parameters>
  43717. <instance-parameter name="extension" transfer-ownership="none">
  43718. <doc xml:space="preserve">a #GIOExtension</doc>
  43719. <type name="IOExtension" c:type="GIOExtension*"/>
  43720. </instance-parameter>
  43721. </parameters>
  43722. </method>
  43723. <method name="ref_class"
  43724. c:identifier="g_io_extension_ref_class"
  43725. introspectable="0">
  43726. <doc xml:space="preserve">Gets a reference to the class for the type that is
  43727. associated with @extension.</doc>
  43728. <return-value transfer-ownership="full">
  43729. <doc xml:space="preserve">the #GTypeClass for the type of @extension</doc>
  43730. <type name="GObject.TypeClass" c:type="GTypeClass*"/>
  43731. </return-value>
  43732. <parameters>
  43733. <instance-parameter name="extension" transfer-ownership="none">
  43734. <doc xml:space="preserve">a #GIOExtension</doc>
  43735. <type name="IOExtension" c:type="GIOExtension*"/>
  43736. </instance-parameter>
  43737. </parameters>
  43738. </method>
  43739. </record>
  43740. <record name="IOExtensionPoint" c:type="GIOExtensionPoint" disguised="1">
  43741. <doc xml:space="preserve">#GIOExtensionPoint is an opaque data structure and can only be accessed
  43742. using the following functions.</doc>
  43743. <method name="get_extension_by_name"
  43744. c:identifier="g_io_extension_point_get_extension_by_name">
  43745. <doc xml:space="preserve">Finds a #GIOExtension for an extension point by name.</doc>
  43746. <return-value transfer-ownership="none">
  43747. <doc xml:space="preserve">the #GIOExtension for @extension_point that has the
  43748. given name, or %NULL if there is no extension with that name</doc>
  43749. <type name="IOExtension" c:type="GIOExtension*"/>
  43750. </return-value>
  43751. <parameters>
  43752. <instance-parameter name="extension_point" transfer-ownership="none">
  43753. <doc xml:space="preserve">a #GIOExtensionPoint</doc>
  43754. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  43755. </instance-parameter>
  43756. <parameter name="name" transfer-ownership="none">
  43757. <doc xml:space="preserve">the name of the extension to get</doc>
  43758. <type name="utf8" c:type="const char*"/>
  43759. </parameter>
  43760. </parameters>
  43761. </method>
  43762. <method name="get_extensions"
  43763. c:identifier="g_io_extension_point_get_extensions">
  43764. <doc xml:space="preserve">Gets a list of all extensions that implement this extension point.
  43765. The list is sorted by priority, beginning with the highest priority.</doc>
  43766. <return-value transfer-ownership="none">
  43767. <doc xml:space="preserve">a #GList of
  43768. #GIOExtensions. The list is owned by GIO and should not be
  43769. modified.</doc>
  43770. <type name="GLib.List" c:type="GList*">
  43771. <type name="IOExtension"/>
  43772. </type>
  43773. </return-value>
  43774. <parameters>
  43775. <instance-parameter name="extension_point" transfer-ownership="none">
  43776. <doc xml:space="preserve">a #GIOExtensionPoint</doc>
  43777. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  43778. </instance-parameter>
  43779. </parameters>
  43780. </method>
  43781. <method name="get_required_type"
  43782. c:identifier="g_io_extension_point_get_required_type">
  43783. <doc xml:space="preserve">Gets the required type for @extension_point.</doc>
  43784. <return-value transfer-ownership="none">
  43785. <doc xml:space="preserve">the #GType that all implementations must have,
  43786. or #G_TYPE_INVALID if the extension point has no required type</doc>
  43787. <type name="GType" c:type="GType"/>
  43788. </return-value>
  43789. <parameters>
  43790. <instance-parameter name="extension_point" transfer-ownership="none">
  43791. <doc xml:space="preserve">a #GIOExtensionPoint</doc>
  43792. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  43793. </instance-parameter>
  43794. </parameters>
  43795. </method>
  43796. <method name="set_required_type"
  43797. c:identifier="g_io_extension_point_set_required_type">
  43798. <doc xml:space="preserve">Sets the required type for @extension_point to @type.
  43799. All implementations must henceforth have this type.</doc>
  43800. <return-value transfer-ownership="none">
  43801. <type name="none" c:type="void"/>
  43802. </return-value>
  43803. <parameters>
  43804. <instance-parameter name="extension_point" transfer-ownership="none">
  43805. <doc xml:space="preserve">a #GIOExtensionPoint</doc>
  43806. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  43807. </instance-parameter>
  43808. <parameter name="type" transfer-ownership="none">
  43809. <doc xml:space="preserve">the #GType to require</doc>
  43810. <type name="GType" c:type="GType"/>
  43811. </parameter>
  43812. </parameters>
  43813. </method>
  43814. <function name="implement" c:identifier="g_io_extension_point_implement">
  43815. <doc xml:space="preserve">Registers @type as extension for the extension point with name
  43816. @extension_point_name.
  43817. If @type has already been registered as an extension for this
  43818. extension point, the existing #GIOExtension object is returned.</doc>
  43819. <return-value transfer-ownership="none">
  43820. <doc xml:space="preserve">a #GIOExtension object for #GType</doc>
  43821. <type name="IOExtension" c:type="GIOExtension*"/>
  43822. </return-value>
  43823. <parameters>
  43824. <parameter name="extension_point_name" transfer-ownership="none">
  43825. <doc xml:space="preserve">the name of the extension point</doc>
  43826. <type name="utf8" c:type="const char*"/>
  43827. </parameter>
  43828. <parameter name="type" transfer-ownership="none">
  43829. <doc xml:space="preserve">the #GType to register as extension</doc>
  43830. <type name="GType" c:type="GType"/>
  43831. </parameter>
  43832. <parameter name="extension_name" transfer-ownership="none">
  43833. <doc xml:space="preserve">the name for the extension</doc>
  43834. <type name="utf8" c:type="const char*"/>
  43835. </parameter>
  43836. <parameter name="priority" transfer-ownership="none">
  43837. <doc xml:space="preserve">the priority for the extension</doc>
  43838. <type name="gint" c:type="gint"/>
  43839. </parameter>
  43840. </parameters>
  43841. </function>
  43842. <function name="lookup" c:identifier="g_io_extension_point_lookup">
  43843. <doc xml:space="preserve">Looks up an existing extension point.</doc>
  43844. <return-value transfer-ownership="none">
  43845. <doc xml:space="preserve">the #GIOExtensionPoint, or %NULL if there
  43846. is no registered extension point with the given name.</doc>
  43847. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  43848. </return-value>
  43849. <parameters>
  43850. <parameter name="name" transfer-ownership="none">
  43851. <doc xml:space="preserve">the name of the extension point</doc>
  43852. <type name="utf8" c:type="const char*"/>
  43853. </parameter>
  43854. </parameters>
  43855. </function>
  43856. <function name="register" c:identifier="g_io_extension_point_register">
  43857. <doc xml:space="preserve">Registers an extension point.</doc>
  43858. <return-value transfer-ownership="none">
  43859. <doc xml:space="preserve">the new #GIOExtensionPoint. This object is
  43860. owned by GIO and should not be freed.</doc>
  43861. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  43862. </return-value>
  43863. <parameters>
  43864. <parameter name="name" transfer-ownership="none">
  43865. <doc xml:space="preserve">The name of the extension point</doc>
  43866. <type name="utf8" c:type="const char*"/>
  43867. </parameter>
  43868. </parameters>
  43869. </function>
  43870. </record>
  43871. <class name="IOModule"
  43872. c:symbol-prefix="io_module"
  43873. c:type="GIOModule"
  43874. parent="GObject.TypeModule"
  43875. glib:type-name="GIOModule"
  43876. glib:get-type="g_io_module_get_type"
  43877. glib:type-struct="IOModuleClass">
  43878. <doc xml:space="preserve">Provides an interface and default functions for loading and unloading
  43879. modules. This is used internally to make GIO extensible, but can also
  43880. be used by others to implement module loading.</doc>
  43881. <implements name="GObject.TypePlugin"/>
  43882. <constructor name="new" c:identifier="g_io_module_new">
  43883. <doc xml:space="preserve">Creates a new GIOModule that will load the specific
  43884. shared library when in use.</doc>
  43885. <return-value transfer-ownership="full">
  43886. <doc xml:space="preserve">a #GIOModule from given @filename,
  43887. or %NULL on error.</doc>
  43888. <type name="IOModule" c:type="GIOModule*"/>
  43889. </return-value>
  43890. <parameters>
  43891. <parameter name="filename" transfer-ownership="none">
  43892. <doc xml:space="preserve">filename of the shared library module.</doc>
  43893. <type name="utf8" c:type="const gchar*"/>
  43894. </parameter>
  43895. </parameters>
  43896. </constructor>
  43897. <function name="query" c:identifier="g_io_module_query" version="2.24">
  43898. <doc xml:space="preserve">Optional API for GIO modules to implement.
  43899. Should return a list of all the extension points that may be
  43900. implemented in this module.
  43901. This method will not be called in normal use, however it may be
  43902. called when probing existing modules and recording which extension
  43903. points that this model is used for. This means we won't have to
  43904. load and initialize this module unless its needed.
  43905. If this function is not implemented by the module the module will
  43906. always be loaded, initialized and then unloaded on application
  43907. startup so that it can register its extension points during init.
  43908. Note that a module need not actually implement all the extension
  43909. points that g_io_module_query() returns, since the exact list of
  43910. extension may depend on runtime issues. However all extension
  43911. points actually implemented must be returned by g_io_module_query()
  43912. (if defined).
  43913. When installing a module that implements g_io_module_query() you must
  43914. run gio-querymodules in order to build the cache files required for
  43915. lazy loading.</doc>
  43916. <return-value transfer-ownership="full">
  43917. <doc xml:space="preserve">A %NULL-terminated array of strings,
  43918. listing the supported extension points of the module. The array
  43919. must be suitable for freeing with g_strfreev().</doc>
  43920. <array c:type="char**">
  43921. <type name="utf8"/>
  43922. </array>
  43923. </return-value>
  43924. </function>
  43925. <method name="load" c:identifier="g_io_module_load">
  43926. <doc xml:space="preserve">Required API for GIO modules to implement.
  43927. This function is run after the module has been loaded into GIO,
  43928. to initialize the module. Typically, this function will call
  43929. g_io_extension_point_implement().</doc>
  43930. <return-value transfer-ownership="none">
  43931. <type name="none" c:type="void"/>
  43932. </return-value>
  43933. <parameters>
  43934. <instance-parameter name="module" transfer-ownership="none">
  43935. <doc xml:space="preserve">a #GIOModule.</doc>
  43936. <type name="IOModule" c:type="GIOModule*"/>
  43937. </instance-parameter>
  43938. </parameters>
  43939. </method>
  43940. <method name="unload" c:identifier="g_io_module_unload">
  43941. <doc xml:space="preserve">Required API for GIO modules to implement.
  43942. This function is run when the module is being unloaded from GIO,
  43943. to finalize the module.</doc>
  43944. <return-value transfer-ownership="none">
  43945. <type name="none" c:type="void"/>
  43946. </return-value>
  43947. <parameters>
  43948. <instance-parameter name="module" transfer-ownership="none">
  43949. <doc xml:space="preserve">a #GIOModule.</doc>
  43950. <type name="IOModule" c:type="GIOModule*"/>
  43951. </instance-parameter>
  43952. </parameters>
  43953. </method>
  43954. </class>
  43955. <record name="IOModuleClass"
  43956. c:type="GIOModuleClass"
  43957. disguised="1"
  43958. glib:is-gtype-struct-for="IOModule">
  43959. </record>
  43960. <record name="IOModuleScope"
  43961. c:type="GIOModuleScope"
  43962. disguised="1"
  43963. version="2.30">
  43964. <doc xml:space="preserve">Represents a scope for loading IO modules. A scope can be used for blocking
  43965. duplicate modules, or blocking a module you don't want to load.
  43966. The scope can be used with g_io_modules_load_all_in_directory_with_scope()
  43967. or g_io_modules_scan_all_in_directory_with_scope().</doc>
  43968. <method name="block"
  43969. c:identifier="g_io_module_scope_block"
  43970. version="2.30">
  43971. <doc xml:space="preserve">Block modules with the given @basename from being loaded when
  43972. this scope is used with g_io_modules_scan_all_in_directory_with_scope()
  43973. or g_io_modules_load_all_in_directory_with_scope().</doc>
  43974. <return-value transfer-ownership="none">
  43975. <type name="none" c:type="void"/>
  43976. </return-value>
  43977. <parameters>
  43978. <instance-parameter name="scope" transfer-ownership="none">
  43979. <doc xml:space="preserve">a module loading scope</doc>
  43980. <type name="IOModuleScope" c:type="GIOModuleScope*"/>
  43981. </instance-parameter>
  43982. <parameter name="basename" transfer-ownership="none">
  43983. <doc xml:space="preserve">the basename to block</doc>
  43984. <type name="utf8" c:type="const gchar*"/>
  43985. </parameter>
  43986. </parameters>
  43987. </method>
  43988. <method name="free" c:identifier="g_io_module_scope_free" version="2.30">
  43989. <doc xml:space="preserve">Free a module scope.</doc>
  43990. <return-value transfer-ownership="none">
  43991. <type name="none" c:type="void"/>
  43992. </return-value>
  43993. <parameters>
  43994. <instance-parameter name="scope" transfer-ownership="none">
  43995. <doc xml:space="preserve">a module loading scope</doc>
  43996. <type name="IOModuleScope" c:type="GIOModuleScope*"/>
  43997. </instance-parameter>
  43998. </parameters>
  43999. </method>
  44000. <function name="new"
  44001. c:identifier="g_io_module_scope_new"
  44002. version="2.30"
  44003. introspectable="0">
  44004. <doc xml:space="preserve">Create a new scope for loading of IO modules. A scope can be used for
  44005. blocking duplicate modules, or blocking a module you don't want to load.
  44006. Specify the %G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules
  44007. which have the same base name as a module that has already been seen
  44008. in this scope.</doc>
  44009. <return-value transfer-ownership="full">
  44010. <doc xml:space="preserve">the new module scope</doc>
  44011. <type name="IOModuleScope" c:type="GIOModuleScope*"/>
  44012. </return-value>
  44013. <parameters>
  44014. <parameter name="flags" transfer-ownership="none">
  44015. <doc xml:space="preserve">flags for the new scope</doc>
  44016. <type name="IOModuleScopeFlags" c:type="GIOModuleScopeFlags"/>
  44017. </parameter>
  44018. </parameters>
  44019. </function>
  44020. </record>
  44021. <enumeration name="IOModuleScopeFlags"
  44022. version="2.30"
  44023. glib:type-name="GIOModuleScopeFlags"
  44024. glib:get-type="g_io_module_scope_flags_get_type"
  44025. c:type="GIOModuleScopeFlags">
  44026. <doc xml:space="preserve">Flags for use with g_io_module_scope_new().</doc>
  44027. <member name="none"
  44028. value="0"
  44029. c:identifier="G_IO_MODULE_SCOPE_NONE"
  44030. glib:nick="none">
  44031. <doc xml:space="preserve">No module scan flags</doc>
  44032. </member>
  44033. <member name="block_duplicates"
  44034. value="1"
  44035. c:identifier="G_IO_MODULE_SCOPE_BLOCK_DUPLICATES"
  44036. glib:nick="block-duplicates">
  44037. <doc xml:space="preserve">When using this scope to load or
  44038. scan modules, automatically block a modules which has the same base
  44039. basename as previously loaded module.</doc>
  44040. </member>
  44041. </enumeration>
  44042. <record name="IOSchedulerJob" c:type="GIOSchedulerJob" disguised="1">
  44043. <doc xml:space="preserve">Opaque class for defining and scheduling IO jobs.</doc>
  44044. <method name="send_to_mainloop"
  44045. c:identifier="g_io_scheduler_job_send_to_mainloop"
  44046. deprecated="1">
  44047. <doc xml:space="preserve">Used from an I/O job to send a callback to be run in the thread
  44048. that the job was started from, waiting for the result (and thus
  44049. blocking the I/O job).</doc>
  44050. <doc-deprecated xml:space="preserve">Use g_main_context_invoke().</doc-deprecated>
  44051. <return-value transfer-ownership="none">
  44052. <doc xml:space="preserve">The return value of @func</doc>
  44053. <type name="gboolean" c:type="gboolean"/>
  44054. </return-value>
  44055. <parameters>
  44056. <instance-parameter name="job" transfer-ownership="none">
  44057. <doc xml:space="preserve">a #GIOSchedulerJob</doc>
  44058. <type name="IOSchedulerJob" c:type="GIOSchedulerJob*"/>
  44059. </instance-parameter>
  44060. <parameter name="func"
  44061. transfer-ownership="none"
  44062. scope="notified"
  44063. closure="1"
  44064. destroy="2">
  44065. <doc xml:space="preserve">a #GSourceFunc callback that will be called in the original thread</doc>
  44066. <type name="GLib.SourceFunc" c:type="GSourceFunc"/>
  44067. </parameter>
  44068. <parameter name="user_data"
  44069. transfer-ownership="none"
  44070. nullable="1"
  44071. allow-none="1">
  44072. <doc xml:space="preserve">data to pass to @func</doc>
  44073. <type name="gpointer" c:type="gpointer"/>
  44074. </parameter>
  44075. <parameter name="notify"
  44076. transfer-ownership="none"
  44077. nullable="1"
  44078. allow-none="1"
  44079. scope="async">
  44080. <doc xml:space="preserve">a #GDestroyNotify for @user_data, or %NULL</doc>
  44081. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  44082. </parameter>
  44083. </parameters>
  44084. </method>
  44085. <method name="send_to_mainloop_async"
  44086. c:identifier="g_io_scheduler_job_send_to_mainloop_async"
  44087. deprecated="1">
  44088. <doc xml:space="preserve">Used from an I/O job to send a callback to be run asynchronously in
  44089. the thread that the job was started from. The callback will be run
  44090. when the main loop is available, but at that time the I/O job might
  44091. have finished. The return value from the callback is ignored.
  44092. Note that if you are passing the @user_data from g_io_scheduler_push_job()
  44093. on to this function you have to ensure that it is not freed before
  44094. @func is called, either by passing %NULL as @notify to
  44095. g_io_scheduler_push_job() or by using refcounting for @user_data.</doc>
  44096. <doc-deprecated xml:space="preserve">Use g_main_context_invoke().</doc-deprecated>
  44097. <return-value transfer-ownership="none">
  44098. <type name="none" c:type="void"/>
  44099. </return-value>
  44100. <parameters>
  44101. <instance-parameter name="job" transfer-ownership="none">
  44102. <doc xml:space="preserve">a #GIOSchedulerJob</doc>
  44103. <type name="IOSchedulerJob" c:type="GIOSchedulerJob*"/>
  44104. </instance-parameter>
  44105. <parameter name="func"
  44106. transfer-ownership="none"
  44107. scope="notified"
  44108. closure="1"
  44109. destroy="2">
  44110. <doc xml:space="preserve">a #GSourceFunc callback that will be called in the original thread</doc>
  44111. <type name="GLib.SourceFunc" c:type="GSourceFunc"/>
  44112. </parameter>
  44113. <parameter name="user_data"
  44114. transfer-ownership="none"
  44115. nullable="1"
  44116. allow-none="1">
  44117. <doc xml:space="preserve">data to pass to @func</doc>
  44118. <type name="gpointer" c:type="gpointer"/>
  44119. </parameter>
  44120. <parameter name="notify"
  44121. transfer-ownership="none"
  44122. nullable="1"
  44123. allow-none="1"
  44124. scope="async">
  44125. <doc xml:space="preserve">a #GDestroyNotify for @user_data, or %NULL</doc>
  44126. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  44127. </parameter>
  44128. </parameters>
  44129. </method>
  44130. </record>
  44131. <callback name="IOSchedulerJobFunc" c:type="GIOSchedulerJobFunc">
  44132. <doc xml:space="preserve">I/O Job function.
  44133. Long-running jobs should periodically check the @cancellable
  44134. to see if they have been cancelled.</doc>
  44135. <return-value transfer-ownership="none">
  44136. <doc xml:space="preserve">%TRUE if this function should be called again to
  44137. complete the job, %FALSE if the job is complete (or cancelled)</doc>
  44138. <type name="gboolean" c:type="gboolean"/>
  44139. </return-value>
  44140. <parameters>
  44141. <parameter name="job" transfer-ownership="none">
  44142. <doc xml:space="preserve">a #GIOSchedulerJob.</doc>
  44143. <type name="IOSchedulerJob" c:type="GIOSchedulerJob*"/>
  44144. </parameter>
  44145. <parameter name="cancellable"
  44146. transfer-ownership="none"
  44147. nullable="1"
  44148. allow-none="1">
  44149. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  44150. <type name="Cancellable" c:type="GCancellable*"/>
  44151. </parameter>
  44152. <parameter name="user_data"
  44153. transfer-ownership="none"
  44154. nullable="1"
  44155. allow-none="1"
  44156. closure="2">
  44157. <doc xml:space="preserve">the data to pass to callback function</doc>
  44158. <type name="gpointer" c:type="gpointer"/>
  44159. </parameter>
  44160. </parameters>
  44161. </callback>
  44162. <class name="IOStream"
  44163. c:symbol-prefix="io_stream"
  44164. c:type="GIOStream"
  44165. parent="GObject.Object"
  44166. abstract="1"
  44167. glib:type-name="GIOStream"
  44168. glib:get-type="g_io_stream_get_type"
  44169. glib:type-struct="IOStreamClass">
  44170. <doc xml:space="preserve">GIOStream represents an object that has both read and write streams.
  44171. Generally the two streams act as separate input and output streams,
  44172. but they share some common resources and state. For instance, for
  44173. seekable streams, both streams may use the same position.
  44174. Examples of #GIOStream objects are #GSocketConnection, which represents
  44175. a two-way network connection; and #GFileIOStream, which represents a
  44176. file handle opened in read-write mode.
  44177. To do the actual reading and writing you need to get the substreams
  44178. with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
  44179. The #GIOStream object owns the input and the output streams, not the other
  44180. way around, so keeping the substreams alive will not keep the #GIOStream
  44181. object alive. If the #GIOStream object is freed it will be closed, thus
  44182. closing the substreams, so even if the substreams stay alive they will
  44183. always return %G_IO_ERROR_CLOSED for all operations.
  44184. To close a stream use g_io_stream_close() which will close the common
  44185. stream object and also the individual substreams. You can also close
  44186. the substreams themselves. In most cases this only marks the
  44187. substream as closed, so further I/O on it fails but common state in the
  44188. #GIOStream may still be open. However, some streams may support
  44189. "half-closed" states where one direction of the stream is actually shut down.
  44190. Operations on #GIOStreams cannot be started while another operation on the
  44191. #GIOStream or its substreams is in progress. Specifically, an application can
  44192. read from the #GInputStream and write to the #GOutputStream simultaneously
  44193. (either in separate threads, or as asynchronous operations in the same
  44194. thread), but an application cannot start any #GIOStream operation while there
  44195. is a #GIOStream, #GInputStream or #GOutputStream operation in progress, and
  44196. an application can’t start any #GInputStream or #GOutputStream operation
  44197. while there is a #GIOStream operation in progress.
  44198. This is a product of individual stream operations being associated with a
  44199. given #GMainContext (the thread-default context at the time the operation was
  44200. started), rather than entire streams being associated with a single
  44201. #GMainContext.
  44202. GIO may run operations on #GIOStreams from other (worker) threads, and this
  44203. may be exposed to application code in the behaviour of wrapper streams, such
  44204. as #GBufferedInputStream or #GTlsConnection. With such wrapper APIs,
  44205. application code may only run operations on the base (wrapped) stream when
  44206. the wrapper stream is idle. Note that the semantics of such operations may
  44207. not be well-defined due to the state the wrapper stream leaves the base
  44208. stream in (though they are guaranteed not to crash).</doc>
  44209. <function name="splice_finish"
  44210. c:identifier="g_io_stream_splice_finish"
  44211. version="2.28"
  44212. throws="1">
  44213. <doc xml:space="preserve">Finishes an asynchronous io stream splice operation.</doc>
  44214. <return-value transfer-ownership="none">
  44215. <doc xml:space="preserve">%TRUE on success, %FALSE otherwise.</doc>
  44216. <type name="gboolean" c:type="gboolean"/>
  44217. </return-value>
  44218. <parameters>
  44219. <parameter name="result" transfer-ownership="none">
  44220. <doc xml:space="preserve">a #GAsyncResult.</doc>
  44221. <type name="AsyncResult" c:type="GAsyncResult*"/>
  44222. </parameter>
  44223. </parameters>
  44224. </function>
  44225. <virtual-method name="close_async" invoker="close_async" version="2.22">
  44226. <doc xml:space="preserve">Requests an asynchronous close of the stream, releasing resources
  44227. related to it. When the operation is finished @callback will be
  44228. called. You can then call g_io_stream_close_finish() to get
  44229. the result of the operation.
  44230. For behaviour details see g_io_stream_close().
  44231. The asynchronous methods have a default fallback that uses threads
  44232. to implement asynchronicity, so they are optional for inheriting
  44233. classes. However, if you override one you must override all.</doc>
  44234. <return-value transfer-ownership="none">
  44235. <type name="none" c:type="void"/>
  44236. </return-value>
  44237. <parameters>
  44238. <instance-parameter name="stream" transfer-ownership="none">
  44239. <doc xml:space="preserve">a #GIOStream</doc>
  44240. <type name="IOStream" c:type="GIOStream*"/>
  44241. </instance-parameter>
  44242. <parameter name="io_priority" transfer-ownership="none">
  44243. <doc xml:space="preserve">the io priority of the request</doc>
  44244. <type name="gint" c:type="int"/>
  44245. </parameter>
  44246. <parameter name="cancellable"
  44247. transfer-ownership="none"
  44248. nullable="1"
  44249. allow-none="1">
  44250. <doc xml:space="preserve">optional cancellable object</doc>
  44251. <type name="Cancellable" c:type="GCancellable*"/>
  44252. </parameter>
  44253. <parameter name="callback"
  44254. transfer-ownership="none"
  44255. nullable="1"
  44256. allow-none="1"
  44257. scope="async"
  44258. closure="3">
  44259. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  44260. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  44261. </parameter>
  44262. <parameter name="user_data"
  44263. transfer-ownership="none"
  44264. nullable="1"
  44265. allow-none="1"
  44266. closure="3">
  44267. <doc xml:space="preserve">the data to pass to callback function</doc>
  44268. <type name="gpointer" c:type="gpointer"/>
  44269. </parameter>
  44270. </parameters>
  44271. </virtual-method>
  44272. <virtual-method name="close_finish"
  44273. invoker="close_finish"
  44274. version="2.22"
  44275. throws="1">
  44276. <doc xml:space="preserve">Closes a stream.</doc>
  44277. <return-value transfer-ownership="none">
  44278. <doc xml:space="preserve">%TRUE if stream was successfully closed, %FALSE otherwise.</doc>
  44279. <type name="gboolean" c:type="gboolean"/>
  44280. </return-value>
  44281. <parameters>
  44282. <instance-parameter name="stream" transfer-ownership="none">
  44283. <doc xml:space="preserve">a #GIOStream</doc>
  44284. <type name="IOStream" c:type="GIOStream*"/>
  44285. </instance-parameter>
  44286. <parameter name="result" transfer-ownership="none">
  44287. <doc xml:space="preserve">a #GAsyncResult</doc>
  44288. <type name="AsyncResult" c:type="GAsyncResult*"/>
  44289. </parameter>
  44290. </parameters>
  44291. </virtual-method>
  44292. <virtual-method name="close_fn" throws="1">
  44293. <return-value transfer-ownership="none">
  44294. <type name="gboolean" c:type="gboolean"/>
  44295. </return-value>
  44296. <parameters>
  44297. <instance-parameter name="stream" transfer-ownership="none">
  44298. <type name="IOStream" c:type="GIOStream*"/>
  44299. </instance-parameter>
  44300. <parameter name="cancellable"
  44301. transfer-ownership="none"
  44302. nullable="1"
  44303. allow-none="1">
  44304. <type name="Cancellable" c:type="GCancellable*"/>
  44305. </parameter>
  44306. </parameters>
  44307. </virtual-method>
  44308. <virtual-method name="get_input_stream"
  44309. invoker="get_input_stream"
  44310. version="2.22">
  44311. <doc xml:space="preserve">Gets the input stream for this object. This is used
  44312. for reading.</doc>
  44313. <return-value transfer-ownership="none">
  44314. <doc xml:space="preserve">a #GInputStream, owned by the #GIOStream.
  44315. Do not free.</doc>
  44316. <type name="InputStream" c:type="GInputStream*"/>
  44317. </return-value>
  44318. <parameters>
  44319. <instance-parameter name="stream" transfer-ownership="none">
  44320. <doc xml:space="preserve">a #GIOStream</doc>
  44321. <type name="IOStream" c:type="GIOStream*"/>
  44322. </instance-parameter>
  44323. </parameters>
  44324. </virtual-method>
  44325. <virtual-method name="get_output_stream"
  44326. invoker="get_output_stream"
  44327. version="2.22">
  44328. <doc xml:space="preserve">Gets the output stream for this object. This is used for
  44329. writing.</doc>
  44330. <return-value transfer-ownership="none">
  44331. <doc xml:space="preserve">a #GOutputStream, owned by the #GIOStream.
  44332. Do not free.</doc>
  44333. <type name="OutputStream" c:type="GOutputStream*"/>
  44334. </return-value>
  44335. <parameters>
  44336. <instance-parameter name="stream" transfer-ownership="none">
  44337. <doc xml:space="preserve">a #GIOStream</doc>
  44338. <type name="IOStream" c:type="GIOStream*"/>
  44339. </instance-parameter>
  44340. </parameters>
  44341. </virtual-method>
  44342. <method name="clear_pending"
  44343. c:identifier="g_io_stream_clear_pending"
  44344. version="2.22">
  44345. <doc xml:space="preserve">Clears the pending flag on @stream.</doc>
  44346. <return-value transfer-ownership="none">
  44347. <type name="none" c:type="void"/>
  44348. </return-value>
  44349. <parameters>
  44350. <instance-parameter name="stream" transfer-ownership="none">
  44351. <doc xml:space="preserve">a #GIOStream</doc>
  44352. <type name="IOStream" c:type="GIOStream*"/>
  44353. </instance-parameter>
  44354. </parameters>
  44355. </method>
  44356. <method name="close"
  44357. c:identifier="g_io_stream_close"
  44358. version="2.22"
  44359. throws="1">
  44360. <doc xml:space="preserve">Closes the stream, releasing resources related to it. This will also
  44361. close the individual input and output streams, if they are not already
  44362. closed.
  44363. Once the stream is closed, all other operations will return
  44364. %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
  44365. return an error.
  44366. Closing a stream will automatically flush any outstanding buffers
  44367. in the stream.
  44368. Streams will be automatically closed when the last reference
  44369. is dropped, but you might want to call this function to make sure
  44370. resources are released as early as possible.
  44371. Some streams might keep the backing store of the stream (e.g. a file
  44372. descriptor) open after the stream is closed. See the documentation for
  44373. the individual stream for details.
  44374. On failure the first error that happened will be reported, but the
  44375. close operation will finish as much as possible. A stream that failed
  44376. to close will still return %G_IO_ERROR_CLOSED for all operations.
  44377. Still, it is important to check and report the error to the user,
  44378. otherwise there might be a loss of data as all data might not be written.
  44379. If @cancellable is not NULL, then the operation can be cancelled by
  44380. triggering the cancellable object from another thread. If the operation
  44381. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  44382. Cancelling a close will still leave the stream closed, but some streams
  44383. can use a faster close that doesn't block to e.g. check errors.
  44384. The default implementation of this method just calls close on the
  44385. individual input/output streams.</doc>
  44386. <return-value transfer-ownership="none">
  44387. <doc xml:space="preserve">%TRUE on success, %FALSE on failure</doc>
  44388. <type name="gboolean" c:type="gboolean"/>
  44389. </return-value>
  44390. <parameters>
  44391. <instance-parameter name="stream" transfer-ownership="none">
  44392. <doc xml:space="preserve">a #GIOStream</doc>
  44393. <type name="IOStream" c:type="GIOStream*"/>
  44394. </instance-parameter>
  44395. <parameter name="cancellable"
  44396. transfer-ownership="none"
  44397. nullable="1"
  44398. allow-none="1">
  44399. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  44400. <type name="Cancellable" c:type="GCancellable*"/>
  44401. </parameter>
  44402. </parameters>
  44403. </method>
  44404. <method name="close_async"
  44405. c:identifier="g_io_stream_close_async"
  44406. version="2.22">
  44407. <doc xml:space="preserve">Requests an asynchronous close of the stream, releasing resources
  44408. related to it. When the operation is finished @callback will be
  44409. called. You can then call g_io_stream_close_finish() to get
  44410. the result of the operation.
  44411. For behaviour details see g_io_stream_close().
  44412. The asynchronous methods have a default fallback that uses threads
  44413. to implement asynchronicity, so they are optional for inheriting
  44414. classes. However, if you override one you must override all.</doc>
  44415. <return-value transfer-ownership="none">
  44416. <type name="none" c:type="void"/>
  44417. </return-value>
  44418. <parameters>
  44419. <instance-parameter name="stream" transfer-ownership="none">
  44420. <doc xml:space="preserve">a #GIOStream</doc>
  44421. <type name="IOStream" c:type="GIOStream*"/>
  44422. </instance-parameter>
  44423. <parameter name="io_priority" transfer-ownership="none">
  44424. <doc xml:space="preserve">the io priority of the request</doc>
  44425. <type name="gint" c:type="int"/>
  44426. </parameter>
  44427. <parameter name="cancellable"
  44428. transfer-ownership="none"
  44429. nullable="1"
  44430. allow-none="1">
  44431. <doc xml:space="preserve">optional cancellable object</doc>
  44432. <type name="Cancellable" c:type="GCancellable*"/>
  44433. </parameter>
  44434. <parameter name="callback"
  44435. transfer-ownership="none"
  44436. nullable="1"
  44437. allow-none="1"
  44438. scope="async"
  44439. closure="3">
  44440. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  44441. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  44442. </parameter>
  44443. <parameter name="user_data"
  44444. transfer-ownership="none"
  44445. nullable="1"
  44446. allow-none="1">
  44447. <doc xml:space="preserve">the data to pass to callback function</doc>
  44448. <type name="gpointer" c:type="gpointer"/>
  44449. </parameter>
  44450. </parameters>
  44451. </method>
  44452. <method name="close_finish"
  44453. c:identifier="g_io_stream_close_finish"
  44454. version="2.22"
  44455. throws="1">
  44456. <doc xml:space="preserve">Closes a stream.</doc>
  44457. <return-value transfer-ownership="none">
  44458. <doc xml:space="preserve">%TRUE if stream was successfully closed, %FALSE otherwise.</doc>
  44459. <type name="gboolean" c:type="gboolean"/>
  44460. </return-value>
  44461. <parameters>
  44462. <instance-parameter name="stream" transfer-ownership="none">
  44463. <doc xml:space="preserve">a #GIOStream</doc>
  44464. <type name="IOStream" c:type="GIOStream*"/>
  44465. </instance-parameter>
  44466. <parameter name="result" transfer-ownership="none">
  44467. <doc xml:space="preserve">a #GAsyncResult</doc>
  44468. <type name="AsyncResult" c:type="GAsyncResult*"/>
  44469. </parameter>
  44470. </parameters>
  44471. </method>
  44472. <method name="get_input_stream"
  44473. c:identifier="g_io_stream_get_input_stream"
  44474. version="2.22">
  44475. <doc xml:space="preserve">Gets the input stream for this object. This is used
  44476. for reading.</doc>
  44477. <return-value transfer-ownership="none">
  44478. <doc xml:space="preserve">a #GInputStream, owned by the #GIOStream.
  44479. Do not free.</doc>
  44480. <type name="InputStream" c:type="GInputStream*"/>
  44481. </return-value>
  44482. <parameters>
  44483. <instance-parameter name="stream" transfer-ownership="none">
  44484. <doc xml:space="preserve">a #GIOStream</doc>
  44485. <type name="IOStream" c:type="GIOStream*"/>
  44486. </instance-parameter>
  44487. </parameters>
  44488. </method>
  44489. <method name="get_output_stream"
  44490. c:identifier="g_io_stream_get_output_stream"
  44491. version="2.22">
  44492. <doc xml:space="preserve">Gets the output stream for this object. This is used for
  44493. writing.</doc>
  44494. <return-value transfer-ownership="none">
  44495. <doc xml:space="preserve">a #GOutputStream, owned by the #GIOStream.
  44496. Do not free.</doc>
  44497. <type name="OutputStream" c:type="GOutputStream*"/>
  44498. </return-value>
  44499. <parameters>
  44500. <instance-parameter name="stream" transfer-ownership="none">
  44501. <doc xml:space="preserve">a #GIOStream</doc>
  44502. <type name="IOStream" c:type="GIOStream*"/>
  44503. </instance-parameter>
  44504. </parameters>
  44505. </method>
  44506. <method name="has_pending"
  44507. c:identifier="g_io_stream_has_pending"
  44508. version="2.22">
  44509. <doc xml:space="preserve">Checks if a stream has pending actions.</doc>
  44510. <return-value transfer-ownership="none">
  44511. <doc xml:space="preserve">%TRUE if @stream has pending actions.</doc>
  44512. <type name="gboolean" c:type="gboolean"/>
  44513. </return-value>
  44514. <parameters>
  44515. <instance-parameter name="stream" transfer-ownership="none">
  44516. <doc xml:space="preserve">a #GIOStream</doc>
  44517. <type name="IOStream" c:type="GIOStream*"/>
  44518. </instance-parameter>
  44519. </parameters>
  44520. </method>
  44521. <method name="is_closed"
  44522. c:identifier="g_io_stream_is_closed"
  44523. version="2.22">
  44524. <doc xml:space="preserve">Checks if a stream is closed.</doc>
  44525. <return-value transfer-ownership="none">
  44526. <doc xml:space="preserve">%TRUE if the stream is closed.</doc>
  44527. <type name="gboolean" c:type="gboolean"/>
  44528. </return-value>
  44529. <parameters>
  44530. <instance-parameter name="stream" transfer-ownership="none">
  44531. <doc xml:space="preserve">a #GIOStream</doc>
  44532. <type name="IOStream" c:type="GIOStream*"/>
  44533. </instance-parameter>
  44534. </parameters>
  44535. </method>
  44536. <method name="set_pending"
  44537. c:identifier="g_io_stream_set_pending"
  44538. version="2.22"
  44539. throws="1">
  44540. <doc xml:space="preserve">Sets @stream to have actions pending. If the pending flag is
  44541. already set or @stream is closed, it will return %FALSE and set
  44542. @error.</doc>
  44543. <return-value transfer-ownership="none">
  44544. <doc xml:space="preserve">%TRUE if pending was previously unset and is now set.</doc>
  44545. <type name="gboolean" c:type="gboolean"/>
  44546. </return-value>
  44547. <parameters>
  44548. <instance-parameter name="stream" transfer-ownership="none">
  44549. <doc xml:space="preserve">a #GIOStream</doc>
  44550. <type name="IOStream" c:type="GIOStream*"/>
  44551. </instance-parameter>
  44552. </parameters>
  44553. </method>
  44554. <method name="splice_async"
  44555. c:identifier="g_io_stream_splice_async"
  44556. version="2.28">
  44557. <doc xml:space="preserve">Asyncronously splice the output stream of @stream1 to the input stream of
  44558. @stream2, and splice the output stream of @stream2 to the input stream of
  44559. @stream1.
  44560. When the operation is finished @callback will be called.
  44561. You can then call g_io_stream_splice_finish() to get the
  44562. result of the operation.</doc>
  44563. <return-value transfer-ownership="none">
  44564. <type name="none" c:type="void"/>
  44565. </return-value>
  44566. <parameters>
  44567. <instance-parameter name="stream1" transfer-ownership="none">
  44568. <doc xml:space="preserve">a #GIOStream.</doc>
  44569. <type name="IOStream" c:type="GIOStream*"/>
  44570. </instance-parameter>
  44571. <parameter name="stream2" transfer-ownership="none">
  44572. <doc xml:space="preserve">a #GIOStream.</doc>
  44573. <type name="IOStream" c:type="GIOStream*"/>
  44574. </parameter>
  44575. <parameter name="flags" transfer-ownership="none">
  44576. <doc xml:space="preserve">a set of #GIOStreamSpliceFlags.</doc>
  44577. <type name="IOStreamSpliceFlags" c:type="GIOStreamSpliceFlags"/>
  44578. </parameter>
  44579. <parameter name="io_priority" transfer-ownership="none">
  44580. <doc xml:space="preserve">the io priority of the request.</doc>
  44581. <type name="gint" c:type="int"/>
  44582. </parameter>
  44583. <parameter name="cancellable"
  44584. transfer-ownership="none"
  44585. nullable="1"
  44586. allow-none="1">
  44587. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  44588. <type name="Cancellable" c:type="GCancellable*"/>
  44589. </parameter>
  44590. <parameter name="callback"
  44591. transfer-ownership="none"
  44592. nullable="1"
  44593. allow-none="1"
  44594. scope="async"
  44595. closure="5">
  44596. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  44597. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  44598. </parameter>
  44599. <parameter name="user_data"
  44600. transfer-ownership="none"
  44601. nullable="1"
  44602. allow-none="1">
  44603. <doc xml:space="preserve">user data passed to @callback.</doc>
  44604. <type name="gpointer" c:type="gpointer"/>
  44605. </parameter>
  44606. </parameters>
  44607. </method>
  44608. <property name="closed" transfer-ownership="none">
  44609. <type name="gboolean" c:type="gboolean"/>
  44610. </property>
  44611. <property name="input-stream" transfer-ownership="none">
  44612. <type name="InputStream"/>
  44613. </property>
  44614. <property name="output-stream" transfer-ownership="none">
  44615. <type name="OutputStream"/>
  44616. </property>
  44617. <field name="parent_instance">
  44618. <type name="GObject.Object" c:type="GObject"/>
  44619. </field>
  44620. <field name="priv" readable="0" private="1">
  44621. <type name="IOStreamPrivate" c:type="GIOStreamPrivate*"/>
  44622. </field>
  44623. </class>
  44624. <record name="IOStreamAdapter" c:type="GIOStreamAdapter" disguised="1">
  44625. </record>
  44626. <record name="IOStreamClass"
  44627. c:type="GIOStreamClass"
  44628. glib:is-gtype-struct-for="IOStream">
  44629. <field name="parent_class">
  44630. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  44631. </field>
  44632. <field name="get_input_stream">
  44633. <callback name="get_input_stream">
  44634. <return-value transfer-ownership="none">
  44635. <doc xml:space="preserve">a #GInputStream, owned by the #GIOStream.
  44636. Do not free.</doc>
  44637. <type name="InputStream" c:type="GInputStream*"/>
  44638. </return-value>
  44639. <parameters>
  44640. <parameter name="stream" transfer-ownership="none">
  44641. <doc xml:space="preserve">a #GIOStream</doc>
  44642. <type name="IOStream" c:type="GIOStream*"/>
  44643. </parameter>
  44644. </parameters>
  44645. </callback>
  44646. </field>
  44647. <field name="get_output_stream">
  44648. <callback name="get_output_stream">
  44649. <return-value transfer-ownership="none">
  44650. <doc xml:space="preserve">a #GOutputStream, owned by the #GIOStream.
  44651. Do not free.</doc>
  44652. <type name="OutputStream" c:type="GOutputStream*"/>
  44653. </return-value>
  44654. <parameters>
  44655. <parameter name="stream" transfer-ownership="none">
  44656. <doc xml:space="preserve">a #GIOStream</doc>
  44657. <type name="IOStream" c:type="GIOStream*"/>
  44658. </parameter>
  44659. </parameters>
  44660. </callback>
  44661. </field>
  44662. <field name="close_fn">
  44663. <callback name="close_fn" throws="1">
  44664. <return-value transfer-ownership="none">
  44665. <type name="gboolean" c:type="gboolean"/>
  44666. </return-value>
  44667. <parameters>
  44668. <parameter name="stream" transfer-ownership="none">
  44669. <type name="IOStream" c:type="GIOStream*"/>
  44670. </parameter>
  44671. <parameter name="cancellable"
  44672. transfer-ownership="none"
  44673. nullable="1"
  44674. allow-none="1">
  44675. <type name="Cancellable" c:type="GCancellable*"/>
  44676. </parameter>
  44677. </parameters>
  44678. </callback>
  44679. </field>
  44680. <field name="close_async">
  44681. <callback name="close_async">
  44682. <return-value transfer-ownership="none">
  44683. <type name="none" c:type="void"/>
  44684. </return-value>
  44685. <parameters>
  44686. <parameter name="stream" transfer-ownership="none">
  44687. <doc xml:space="preserve">a #GIOStream</doc>
  44688. <type name="IOStream" c:type="GIOStream*"/>
  44689. </parameter>
  44690. <parameter name="io_priority" transfer-ownership="none">
  44691. <doc xml:space="preserve">the io priority of the request</doc>
  44692. <type name="gint" c:type="int"/>
  44693. </parameter>
  44694. <parameter name="cancellable"
  44695. transfer-ownership="none"
  44696. nullable="1"
  44697. allow-none="1">
  44698. <doc xml:space="preserve">optional cancellable object</doc>
  44699. <type name="Cancellable" c:type="GCancellable*"/>
  44700. </parameter>
  44701. <parameter name="callback"
  44702. transfer-ownership="none"
  44703. nullable="1"
  44704. allow-none="1"
  44705. scope="async"
  44706. closure="4">
  44707. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  44708. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  44709. </parameter>
  44710. <parameter name="user_data"
  44711. transfer-ownership="none"
  44712. nullable="1"
  44713. allow-none="1"
  44714. closure="4">
  44715. <doc xml:space="preserve">the data to pass to callback function</doc>
  44716. <type name="gpointer" c:type="gpointer"/>
  44717. </parameter>
  44718. </parameters>
  44719. </callback>
  44720. </field>
  44721. <field name="close_finish">
  44722. <callback name="close_finish" throws="1">
  44723. <return-value transfer-ownership="none">
  44724. <doc xml:space="preserve">%TRUE if stream was successfully closed, %FALSE otherwise.</doc>
  44725. <type name="gboolean" c:type="gboolean"/>
  44726. </return-value>
  44727. <parameters>
  44728. <parameter name="stream" transfer-ownership="none">
  44729. <doc xml:space="preserve">a #GIOStream</doc>
  44730. <type name="IOStream" c:type="GIOStream*"/>
  44731. </parameter>
  44732. <parameter name="result" transfer-ownership="none">
  44733. <doc xml:space="preserve">a #GAsyncResult</doc>
  44734. <type name="AsyncResult" c:type="GAsyncResult*"/>
  44735. </parameter>
  44736. </parameters>
  44737. </callback>
  44738. </field>
  44739. <field name="_g_reserved1" introspectable="0">
  44740. <callback name="_g_reserved1">
  44741. <return-value transfer-ownership="none">
  44742. <type name="none" c:type="void"/>
  44743. </return-value>
  44744. </callback>
  44745. </field>
  44746. <field name="_g_reserved2" introspectable="0">
  44747. <callback name="_g_reserved2">
  44748. <return-value transfer-ownership="none">
  44749. <type name="none" c:type="void"/>
  44750. </return-value>
  44751. </callback>
  44752. </field>
  44753. <field name="_g_reserved3" introspectable="0">
  44754. <callback name="_g_reserved3">
  44755. <return-value transfer-ownership="none">
  44756. <type name="none" c:type="void"/>
  44757. </return-value>
  44758. </callback>
  44759. </field>
  44760. <field name="_g_reserved4" introspectable="0">
  44761. <callback name="_g_reserved4">
  44762. <return-value transfer-ownership="none">
  44763. <type name="none" c:type="void"/>
  44764. </return-value>
  44765. </callback>
  44766. </field>
  44767. <field name="_g_reserved5" introspectable="0">
  44768. <callback name="_g_reserved5">
  44769. <return-value transfer-ownership="none">
  44770. <type name="none" c:type="void"/>
  44771. </return-value>
  44772. </callback>
  44773. </field>
  44774. <field name="_g_reserved6" introspectable="0">
  44775. <callback name="_g_reserved6">
  44776. <return-value transfer-ownership="none">
  44777. <type name="none" c:type="void"/>
  44778. </return-value>
  44779. </callback>
  44780. </field>
  44781. <field name="_g_reserved7" introspectable="0">
  44782. <callback name="_g_reserved7">
  44783. <return-value transfer-ownership="none">
  44784. <type name="none" c:type="void"/>
  44785. </return-value>
  44786. </callback>
  44787. </field>
  44788. <field name="_g_reserved8" introspectable="0">
  44789. <callback name="_g_reserved8">
  44790. <return-value transfer-ownership="none">
  44791. <type name="none" c:type="void"/>
  44792. </return-value>
  44793. </callback>
  44794. </field>
  44795. <field name="_g_reserved9" introspectable="0">
  44796. <callback name="_g_reserved9">
  44797. <return-value transfer-ownership="none">
  44798. <type name="none" c:type="void"/>
  44799. </return-value>
  44800. </callback>
  44801. </field>
  44802. <field name="_g_reserved10" introspectable="0">
  44803. <callback name="_g_reserved10">
  44804. <return-value transfer-ownership="none">
  44805. <type name="none" c:type="void"/>
  44806. </return-value>
  44807. </callback>
  44808. </field>
  44809. </record>
  44810. <record name="IOStreamPrivate" c:type="GIOStreamPrivate" disguised="1">
  44811. </record>
  44812. <bitfield name="IOStreamSpliceFlags"
  44813. version="2.28"
  44814. glib:type-name="GIOStreamSpliceFlags"
  44815. glib:get-type="g_io_stream_splice_flags_get_type"
  44816. c:type="GIOStreamSpliceFlags">
  44817. <doc xml:space="preserve">GIOStreamSpliceFlags determine how streams should be spliced.</doc>
  44818. <member name="none"
  44819. value="0"
  44820. c:identifier="G_IO_STREAM_SPLICE_NONE"
  44821. glib:nick="none">
  44822. <doc xml:space="preserve">Do not close either stream.</doc>
  44823. </member>
  44824. <member name="close_stream1"
  44825. value="1"
  44826. c:identifier="G_IO_STREAM_SPLICE_CLOSE_STREAM1"
  44827. glib:nick="close-stream1">
  44828. <doc xml:space="preserve">Close the first stream after
  44829. the splice.</doc>
  44830. </member>
  44831. <member name="close_stream2"
  44832. value="2"
  44833. c:identifier="G_IO_STREAM_SPLICE_CLOSE_STREAM2"
  44834. glib:nick="close-stream2">
  44835. <doc xml:space="preserve">Close the second stream after
  44836. the splice.</doc>
  44837. </member>
  44838. <member name="wait_for_both"
  44839. value="4"
  44840. c:identifier="G_IO_STREAM_SPLICE_WAIT_FOR_BOTH"
  44841. glib:nick="wait-for-both">
  44842. <doc xml:space="preserve">Wait for both splice operations to finish
  44843. before calling the callback.</doc>
  44844. </member>
  44845. </bitfield>
  44846. <interface name="Icon"
  44847. c:symbol-prefix="icon"
  44848. c:type="GIcon"
  44849. glib:type-name="GIcon"
  44850. glib:get-type="g_icon_get_type"
  44851. glib:type-struct="IconIface">
  44852. <doc xml:space="preserve">#GIcon is a very minimal interface for icons. It provides functions
  44853. for checking the equality of two icons, hashing of icons and
  44854. serializing an icon to and from strings.
  44855. #GIcon does not provide the actual pixmap for the icon as this is out
  44856. of GIO's scope, however implementations of #GIcon may contain the name
  44857. of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
  44858. To obtain a hash of a #GIcon, see g_icon_hash().
  44859. To check if two #GIcons are equal, see g_icon_equal().
  44860. For serializing a #GIcon, use g_icon_serialize() and
  44861. g_icon_deserialize().
  44862. If you want to consume #GIcon (for example, in a toolkit) you must
  44863. be prepared to handle at least the three following cases:
  44864. #GLoadableIcon, #GThemedIcon and #GEmblemedIcon. It may also make
  44865. sense to have fast-paths for other cases (like handling #GdkPixbuf
  44866. directly, for example) but all compliant #GIcon implementations
  44867. outside of GIO must implement #GLoadableIcon.
  44868. If your application or library provides one or more #GIcon
  44869. implementations you need to ensure that your new implementation also
  44870. implements #GLoadableIcon. Additionally, you must provide an
  44871. implementation of g_icon_serialize() that gives a result that is
  44872. understood by g_icon_deserialize(), yielding one of the built-in icon
  44873. types.</doc>
  44874. <function name="deserialize"
  44875. c:identifier="g_icon_deserialize"
  44876. version="2.38">
  44877. <doc xml:space="preserve">Deserializes a #GIcon previously serialized using g_icon_serialize().</doc>
  44878. <return-value transfer-ownership="full">
  44879. <doc xml:space="preserve">a #GIcon, or %NULL when deserialization fails.</doc>
  44880. <type name="Icon" c:type="GIcon*"/>
  44881. </return-value>
  44882. <parameters>
  44883. <parameter name="value" transfer-ownership="none">
  44884. <doc xml:space="preserve">a #GVariant created with g_icon_serialize()</doc>
  44885. <type name="GLib.Variant" c:type="GVariant*"/>
  44886. </parameter>
  44887. </parameters>
  44888. </function>
  44889. <function name="hash" c:identifier="g_icon_hash">
  44890. <doc xml:space="preserve">Gets a hash for an icon.</doc>
  44891. <return-value transfer-ownership="none">
  44892. <doc xml:space="preserve">a #guint containing a hash for the @icon, suitable for
  44893. use in a #GHashTable or similar data structure.</doc>
  44894. <type name="guint" c:type="guint"/>
  44895. </return-value>
  44896. <parameters>
  44897. <parameter name="icon" transfer-ownership="none">
  44898. <doc xml:space="preserve">#gconstpointer to an icon object.</doc>
  44899. <type name="gpointer" c:type="gconstpointer"/>
  44900. </parameter>
  44901. </parameters>
  44902. </function>
  44903. <function name="new_for_string"
  44904. c:identifier="g_icon_new_for_string"
  44905. version="2.20"
  44906. throws="1">
  44907. <doc xml:space="preserve">Generate a #GIcon instance from @str. This function can fail if
  44908. @str is not valid - see g_icon_to_string() for discussion.
  44909. If your application or library provides one or more #GIcon
  44910. implementations you need to ensure that each #GType is registered
  44911. with the type system prior to calling g_icon_new_for_string().</doc>
  44912. <return-value transfer-ownership="full">
  44913. <doc xml:space="preserve">An object implementing the #GIcon
  44914. interface or %NULL if @error is set.</doc>
  44915. <type name="Icon" c:type="GIcon*"/>
  44916. </return-value>
  44917. <parameters>
  44918. <parameter name="str" transfer-ownership="none">
  44919. <doc xml:space="preserve">A string obtained via g_icon_to_string().</doc>
  44920. <type name="utf8" c:type="const gchar*"/>
  44921. </parameter>
  44922. </parameters>
  44923. </function>
  44924. <virtual-method name="equal" invoker="equal">
  44925. <doc xml:space="preserve">Checks if two icons are equal.</doc>
  44926. <return-value transfer-ownership="none">
  44927. <doc xml:space="preserve">%TRUE if @icon1 is equal to @icon2. %FALSE otherwise.</doc>
  44928. <type name="gboolean" c:type="gboolean"/>
  44929. </return-value>
  44930. <parameters>
  44931. <instance-parameter name="icon1"
  44932. transfer-ownership="none"
  44933. nullable="1"
  44934. allow-none="1">
  44935. <doc xml:space="preserve">pointer to the first #GIcon.</doc>
  44936. <type name="Icon" c:type="GIcon*"/>
  44937. </instance-parameter>
  44938. <parameter name="icon2"
  44939. transfer-ownership="none"
  44940. nullable="1"
  44941. allow-none="1">
  44942. <doc xml:space="preserve">pointer to the second #GIcon.</doc>
  44943. <type name="Icon" c:type="GIcon*"/>
  44944. </parameter>
  44945. </parameters>
  44946. </virtual-method>
  44947. <virtual-method name="hash" invoker="hash">
  44948. <doc xml:space="preserve">Gets a hash for an icon.</doc>
  44949. <return-value transfer-ownership="none">
  44950. <doc xml:space="preserve">a #guint containing a hash for the @icon, suitable for
  44951. use in a #GHashTable or similar data structure.</doc>
  44952. <type name="guint" c:type="guint"/>
  44953. </return-value>
  44954. <parameters>
  44955. <instance-parameter name="icon" transfer-ownership="none">
  44956. <doc xml:space="preserve">#gconstpointer to an icon object.</doc>
  44957. <type name="Icon" c:type="GIcon*"/>
  44958. </instance-parameter>
  44959. </parameters>
  44960. </virtual-method>
  44961. <virtual-method name="serialize" invoker="serialize" version="2.38">
  44962. <doc xml:space="preserve">Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
  44963. back by calling g_icon_deserialize() on the returned value.
  44964. As serialization will avoid using raw icon data when possible, it only
  44965. makes sense to transfer the #GVariant between processes on the same machine,
  44966. (as opposed to over the network), and within the same file system namespace.</doc>
  44967. <return-value transfer-ownership="full">
  44968. <doc xml:space="preserve">a #GVariant, or %NULL when serialization fails.</doc>
  44969. <type name="GLib.Variant" c:type="GVariant*"/>
  44970. </return-value>
  44971. <parameters>
  44972. <instance-parameter name="icon" transfer-ownership="none">
  44973. <doc xml:space="preserve">a #GIcon</doc>
  44974. <type name="Icon" c:type="GIcon*"/>
  44975. </instance-parameter>
  44976. </parameters>
  44977. </virtual-method>
  44978. <virtual-method name="to_tokens"
  44979. invoker="to_string"
  44980. version="2.20"
  44981. introspectable="0">
  44982. <doc xml:space="preserve">Generates a textual representation of @icon that can be used for
  44983. serialization such as when passing @icon to a different process or
  44984. saving it to persistent storage. Use g_icon_new_for_string() to
  44985. get @icon back from the returned string.
  44986. The encoding of the returned string is proprietary to #GIcon except
  44987. in the following two cases
  44988. - If @icon is a #GFileIcon, the returned string is a native path
  44989. (such as `/path/to/my icon.png`) without escaping
  44990. if the #GFile for @icon is a native file. If the file is not
  44991. native, the returned string is the result of g_file_get_uri()
  44992. (such as `sftp://path/to/my%20icon.png`).
  44993. - If @icon is a #GThemedIcon with exactly one name, the encoding is
  44994. simply the name (such as `network-server`).</doc>
  44995. <return-value transfer-ownership="none">
  44996. <doc xml:space="preserve">An allocated NUL-terminated UTF8 string or
  44997. %NULL if @icon can't be serialized. Use g_free() to free.</doc>
  44998. <type name="gboolean" c:type="gboolean"/>
  44999. </return-value>
  45000. <parameters>
  45001. <instance-parameter name="icon" transfer-ownership="none">
  45002. <doc xml:space="preserve">a #GIcon.</doc>
  45003. <type name="Icon" c:type="GIcon*"/>
  45004. </instance-parameter>
  45005. <parameter name="tokens" transfer-ownership="none">
  45006. <array name="GLib.PtrArray" c:type="GPtrArray*">
  45007. <type name="gpointer" c:type="gpointer"/>
  45008. </array>
  45009. </parameter>
  45010. <parameter name="out_version" transfer-ownership="none">
  45011. <type name="gint" c:type="gint*"/>
  45012. </parameter>
  45013. </parameters>
  45014. </virtual-method>
  45015. <method name="equal" c:identifier="g_icon_equal">
  45016. <doc xml:space="preserve">Checks if two icons are equal.</doc>
  45017. <return-value transfer-ownership="none">
  45018. <doc xml:space="preserve">%TRUE if @icon1 is equal to @icon2. %FALSE otherwise.</doc>
  45019. <type name="gboolean" c:type="gboolean"/>
  45020. </return-value>
  45021. <parameters>
  45022. <instance-parameter name="icon1"
  45023. transfer-ownership="none"
  45024. nullable="1"
  45025. allow-none="1">
  45026. <doc xml:space="preserve">pointer to the first #GIcon.</doc>
  45027. <type name="Icon" c:type="GIcon*"/>
  45028. </instance-parameter>
  45029. <parameter name="icon2"
  45030. transfer-ownership="none"
  45031. nullable="1"
  45032. allow-none="1">
  45033. <doc xml:space="preserve">pointer to the second #GIcon.</doc>
  45034. <type name="Icon" c:type="GIcon*"/>
  45035. </parameter>
  45036. </parameters>
  45037. </method>
  45038. <method name="serialize" c:identifier="g_icon_serialize" version="2.38">
  45039. <doc xml:space="preserve">Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
  45040. back by calling g_icon_deserialize() on the returned value.
  45041. As serialization will avoid using raw icon data when possible, it only
  45042. makes sense to transfer the #GVariant between processes on the same machine,
  45043. (as opposed to over the network), and within the same file system namespace.</doc>
  45044. <return-value transfer-ownership="full">
  45045. <doc xml:space="preserve">a #GVariant, or %NULL when serialization fails.</doc>
  45046. <type name="GLib.Variant" c:type="GVariant*"/>
  45047. </return-value>
  45048. <parameters>
  45049. <instance-parameter name="icon" transfer-ownership="none">
  45050. <doc xml:space="preserve">a #GIcon</doc>
  45051. <type name="Icon" c:type="GIcon*"/>
  45052. </instance-parameter>
  45053. </parameters>
  45054. </method>
  45055. <method name="to_string" c:identifier="g_icon_to_string" version="2.20">
  45056. <doc xml:space="preserve">Generates a textual representation of @icon that can be used for
  45057. serialization such as when passing @icon to a different process or
  45058. saving it to persistent storage. Use g_icon_new_for_string() to
  45059. get @icon back from the returned string.
  45060. The encoding of the returned string is proprietary to #GIcon except
  45061. in the following two cases
  45062. - If @icon is a #GFileIcon, the returned string is a native path
  45063. (such as `/path/to/my icon.png`) without escaping
  45064. if the #GFile for @icon is a native file. If the file is not
  45065. native, the returned string is the result of g_file_get_uri()
  45066. (such as `sftp://path/to/my%20icon.png`).
  45067. - If @icon is a #GThemedIcon with exactly one name, the encoding is
  45068. simply the name (such as `network-server`).</doc>
  45069. <return-value transfer-ownership="full" nullable="1">
  45070. <doc xml:space="preserve">An allocated NUL-terminated UTF8 string or
  45071. %NULL if @icon can't be serialized. Use g_free() to free.</doc>
  45072. <type name="utf8" c:type="gchar*"/>
  45073. </return-value>
  45074. <parameters>
  45075. <instance-parameter name="icon" transfer-ownership="none">
  45076. <doc xml:space="preserve">a #GIcon.</doc>
  45077. <type name="Icon" c:type="GIcon*"/>
  45078. </instance-parameter>
  45079. </parameters>
  45080. </method>
  45081. </interface>
  45082. <record name="IconIface"
  45083. c:type="GIconIface"
  45084. glib:is-gtype-struct-for="Icon">
  45085. <doc xml:space="preserve">GIconIface is used to implement GIcon types for various
  45086. different systems. See #GThemedIcon and #GLoadableIcon for
  45087. examples of how to implement this interface.</doc>
  45088. <field name="g_iface">
  45089. <doc xml:space="preserve">The parent interface.</doc>
  45090. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  45091. </field>
  45092. <field name="hash">
  45093. <callback name="hash">
  45094. <return-value transfer-ownership="none">
  45095. <doc xml:space="preserve">a #guint containing a hash for the @icon, suitable for
  45096. use in a #GHashTable or similar data structure.</doc>
  45097. <type name="guint" c:type="guint"/>
  45098. </return-value>
  45099. <parameters>
  45100. <parameter name="icon" transfer-ownership="none">
  45101. <doc xml:space="preserve">#gconstpointer to an icon object.</doc>
  45102. <type name="Icon" c:type="GIcon*"/>
  45103. </parameter>
  45104. </parameters>
  45105. </callback>
  45106. </field>
  45107. <field name="equal">
  45108. <callback name="equal">
  45109. <return-value transfer-ownership="none">
  45110. <doc xml:space="preserve">%TRUE if @icon1 is equal to @icon2. %FALSE otherwise.</doc>
  45111. <type name="gboolean" c:type="gboolean"/>
  45112. </return-value>
  45113. <parameters>
  45114. <parameter name="icon1"
  45115. transfer-ownership="none"
  45116. nullable="1"
  45117. allow-none="1">
  45118. <doc xml:space="preserve">pointer to the first #GIcon.</doc>
  45119. <type name="Icon" c:type="GIcon*"/>
  45120. </parameter>
  45121. <parameter name="icon2"
  45122. transfer-ownership="none"
  45123. nullable="1"
  45124. allow-none="1">
  45125. <doc xml:space="preserve">pointer to the second #GIcon.</doc>
  45126. <type name="Icon" c:type="GIcon*"/>
  45127. </parameter>
  45128. </parameters>
  45129. </callback>
  45130. </field>
  45131. <field name="to_tokens" introspectable="0">
  45132. <callback name="to_tokens" introspectable="0">
  45133. <return-value transfer-ownership="none">
  45134. <doc xml:space="preserve">An allocated NUL-terminated UTF8 string or
  45135. %NULL if @icon can't be serialized. Use g_free() to free.</doc>
  45136. <type name="gboolean" c:type="gboolean"/>
  45137. </return-value>
  45138. <parameters>
  45139. <parameter name="icon" transfer-ownership="none">
  45140. <doc xml:space="preserve">a #GIcon.</doc>
  45141. <type name="Icon" c:type="GIcon*"/>
  45142. </parameter>
  45143. <parameter name="tokens" transfer-ownership="none">
  45144. <array name="GLib.PtrArray" c:type="GPtrArray*">
  45145. <type name="gpointer" c:type="gpointer"/>
  45146. </array>
  45147. </parameter>
  45148. <parameter name="out_version" transfer-ownership="none">
  45149. <type name="gint" c:type="gint*"/>
  45150. </parameter>
  45151. </parameters>
  45152. </callback>
  45153. </field>
  45154. <field name="from_tokens" introspectable="0">
  45155. <callback name="from_tokens" introspectable="0" throws="1">
  45156. <return-value>
  45157. <type name="Icon" c:type="GIcon*"/>
  45158. </return-value>
  45159. <parameters>
  45160. <parameter name="tokens" transfer-ownership="none">
  45161. <type name="utf8" c:type="gchar**"/>
  45162. </parameter>
  45163. <parameter name="num_tokens" transfer-ownership="none">
  45164. <type name="gint" c:type="gint"/>
  45165. </parameter>
  45166. <parameter name="version" transfer-ownership="none">
  45167. <type name="gint" c:type="gint"/>
  45168. </parameter>
  45169. </parameters>
  45170. </callback>
  45171. </field>
  45172. <field name="serialize">
  45173. <callback name="serialize">
  45174. <return-value transfer-ownership="full">
  45175. <doc xml:space="preserve">a #GVariant, or %NULL when serialization fails.</doc>
  45176. <type name="GLib.Variant" c:type="GVariant*"/>
  45177. </return-value>
  45178. <parameters>
  45179. <parameter name="icon" transfer-ownership="none">
  45180. <doc xml:space="preserve">a #GIcon</doc>
  45181. <type name="Icon" c:type="GIcon*"/>
  45182. </parameter>
  45183. </parameters>
  45184. </callback>
  45185. </field>
  45186. </record>
  45187. <class name="InetAddress"
  45188. c:symbol-prefix="inet_address"
  45189. c:type="GInetAddress"
  45190. parent="GObject.Object"
  45191. glib:type-name="GInetAddress"
  45192. glib:get-type="g_inet_address_get_type"
  45193. glib:type-struct="InetAddressClass">
  45194. <doc xml:space="preserve">#GInetAddress represents an IPv4 or IPv6 internet address. Use
  45195. g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
  45196. look up the #GInetAddress for a hostname. Use
  45197. g_resolver_lookup_by_address() or
  45198. g_resolver_lookup_by_address_async() to look up the hostname for a
  45199. #GInetAddress.
  45200. To actually connect to a remote host, you will need a
  45201. #GInetSocketAddress (which includes a #GInetAddress as well as a
  45202. port number).</doc>
  45203. <constructor name="new_any"
  45204. c:identifier="g_inet_address_new_any"
  45205. version="2.22">
  45206. <doc xml:space="preserve">Creates a #GInetAddress for the "any" address (unassigned/"don't
  45207. care") for @family.</doc>
  45208. <return-value transfer-ownership="full">
  45209. <doc xml:space="preserve">a new #GInetAddress corresponding to the "any" address
  45210. for @family.
  45211. Free the returned object with g_object_unref().</doc>
  45212. <type name="InetAddress" c:type="GInetAddress*"/>
  45213. </return-value>
  45214. <parameters>
  45215. <parameter name="family" transfer-ownership="none">
  45216. <doc xml:space="preserve">the address family</doc>
  45217. <type name="SocketFamily" c:type="GSocketFamily"/>
  45218. </parameter>
  45219. </parameters>
  45220. </constructor>
  45221. <constructor name="new_from_bytes"
  45222. c:identifier="g_inet_address_new_from_bytes"
  45223. version="2.22">
  45224. <doc xml:space="preserve">Creates a new #GInetAddress from the given @family and @bytes.
  45225. @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for
  45226. %G_SOCKET_FAMILY_IPV6.</doc>
  45227. <return-value transfer-ownership="full">
  45228. <doc xml:space="preserve">a new #GInetAddress corresponding to @family and @bytes.
  45229. Free the returned object with g_object_unref().</doc>
  45230. <type name="InetAddress" c:type="GInetAddress*"/>
  45231. </return-value>
  45232. <parameters>
  45233. <parameter name="bytes" transfer-ownership="none">
  45234. <doc xml:space="preserve">raw address data</doc>
  45235. <array zero-terminated="0" c:type="guint8*">
  45236. <type name="guint8"/>
  45237. </array>
  45238. </parameter>
  45239. <parameter name="family" transfer-ownership="none">
  45240. <doc xml:space="preserve">the address family of @bytes</doc>
  45241. <type name="SocketFamily" c:type="GSocketFamily"/>
  45242. </parameter>
  45243. </parameters>
  45244. </constructor>
  45245. <constructor name="new_from_string"
  45246. c:identifier="g_inet_address_new_from_string"
  45247. version="2.22">
  45248. <doc xml:space="preserve">Parses @string as an IP address and creates a new #GInetAddress.</doc>
  45249. <return-value transfer-ownership="full">
  45250. <doc xml:space="preserve">a new #GInetAddress corresponding to @string, or %NULL if
  45251. @string could not be parsed.
  45252. Free the returned object with g_object_unref().</doc>
  45253. <type name="InetAddress" c:type="GInetAddress*"/>
  45254. </return-value>
  45255. <parameters>
  45256. <parameter name="string" transfer-ownership="none">
  45257. <doc xml:space="preserve">a string representation of an IP address</doc>
  45258. <type name="utf8" c:type="const gchar*"/>
  45259. </parameter>
  45260. </parameters>
  45261. </constructor>
  45262. <constructor name="new_loopback"
  45263. c:identifier="g_inet_address_new_loopback"
  45264. version="2.22">
  45265. <doc xml:space="preserve">Creates a #GInetAddress for the loopback address for @family.</doc>
  45266. <return-value transfer-ownership="full">
  45267. <doc xml:space="preserve">a new #GInetAddress corresponding to the loopback address
  45268. for @family.
  45269. Free the returned object with g_object_unref().</doc>
  45270. <type name="InetAddress" c:type="GInetAddress*"/>
  45271. </return-value>
  45272. <parameters>
  45273. <parameter name="family" transfer-ownership="none">
  45274. <doc xml:space="preserve">the address family</doc>
  45275. <type name="SocketFamily" c:type="GSocketFamily"/>
  45276. </parameter>
  45277. </parameters>
  45278. </constructor>
  45279. <virtual-method name="to_bytes"
  45280. invoker="to_bytes"
  45281. version="2.22"
  45282. introspectable="0">
  45283. <doc xml:space="preserve">Gets the raw binary address data from @address.</doc>
  45284. <return-value transfer-ownership="none">
  45285. <doc xml:space="preserve">a pointer to an internal array of the bytes in @address,
  45286. which should not be modified, stored, or freed. The size of this
  45287. array can be gotten with g_inet_address_get_native_size().</doc>
  45288. <type name="guint8" c:type="const guint8*"/>
  45289. </return-value>
  45290. <parameters>
  45291. <instance-parameter name="address" transfer-ownership="none">
  45292. <doc xml:space="preserve">a #GInetAddress</doc>
  45293. <type name="InetAddress" c:type="GInetAddress*"/>
  45294. </instance-parameter>
  45295. </parameters>
  45296. </virtual-method>
  45297. <virtual-method name="to_string" invoker="to_string" version="2.22">
  45298. <doc xml:space="preserve">Converts @address to string form.</doc>
  45299. <return-value transfer-ownership="full">
  45300. <doc xml:space="preserve">a representation of @address as a string, which should be
  45301. freed after use.</doc>
  45302. <type name="utf8" c:type="gchar*"/>
  45303. </return-value>
  45304. <parameters>
  45305. <instance-parameter name="address" transfer-ownership="none">
  45306. <doc xml:space="preserve">a #GInetAddress</doc>
  45307. <type name="InetAddress" c:type="GInetAddress*"/>
  45308. </instance-parameter>
  45309. </parameters>
  45310. </virtual-method>
  45311. <method name="equal" c:identifier="g_inet_address_equal" version="2.30">
  45312. <doc xml:space="preserve">Checks if two #GInetAddress instances are equal, e.g. the same address.</doc>
  45313. <return-value transfer-ownership="none">
  45314. <doc xml:space="preserve">%TRUE if @address and @other_address are equal, %FALSE otherwise.</doc>
  45315. <type name="gboolean" c:type="gboolean"/>
  45316. </return-value>
  45317. <parameters>
  45318. <instance-parameter name="address" transfer-ownership="none">
  45319. <doc xml:space="preserve">A #GInetAddress.</doc>
  45320. <type name="InetAddress" c:type="GInetAddress*"/>
  45321. </instance-parameter>
  45322. <parameter name="other_address" transfer-ownership="none">
  45323. <doc xml:space="preserve">Another #GInetAddress.</doc>
  45324. <type name="InetAddress" c:type="GInetAddress*"/>
  45325. </parameter>
  45326. </parameters>
  45327. </method>
  45328. <method name="get_family"
  45329. c:identifier="g_inet_address_get_family"
  45330. version="2.22">
  45331. <doc xml:space="preserve">Gets @address's family</doc>
  45332. <return-value transfer-ownership="none">
  45333. <doc xml:space="preserve">@address's family</doc>
  45334. <type name="SocketFamily" c:type="GSocketFamily"/>
  45335. </return-value>
  45336. <parameters>
  45337. <instance-parameter name="address" transfer-ownership="none">
  45338. <doc xml:space="preserve">a #GInetAddress</doc>
  45339. <type name="InetAddress" c:type="GInetAddress*"/>
  45340. </instance-parameter>
  45341. </parameters>
  45342. </method>
  45343. <method name="get_is_any"
  45344. c:identifier="g_inet_address_get_is_any"
  45345. version="2.22">
  45346. <doc xml:space="preserve">Tests whether @address is the "any" address for its family.</doc>
  45347. <return-value transfer-ownership="none">
  45348. <doc xml:space="preserve">%TRUE if @address is the "any" address for its family.</doc>
  45349. <type name="gboolean" c:type="gboolean"/>
  45350. </return-value>
  45351. <parameters>
  45352. <instance-parameter name="address" transfer-ownership="none">
  45353. <doc xml:space="preserve">a #GInetAddress</doc>
  45354. <type name="InetAddress" c:type="GInetAddress*"/>
  45355. </instance-parameter>
  45356. </parameters>
  45357. </method>
  45358. <method name="get_is_link_local"
  45359. c:identifier="g_inet_address_get_is_link_local"
  45360. version="2.22">
  45361. <doc xml:space="preserve">Tests whether @address is a link-local address (that is, if it
  45362. identifies a host on a local network that is not connected to the
  45363. Internet).</doc>
  45364. <return-value transfer-ownership="none">
  45365. <doc xml:space="preserve">%TRUE if @address is a link-local address.</doc>
  45366. <type name="gboolean" c:type="gboolean"/>
  45367. </return-value>
  45368. <parameters>
  45369. <instance-parameter name="address" transfer-ownership="none">
  45370. <doc xml:space="preserve">a #GInetAddress</doc>
  45371. <type name="InetAddress" c:type="GInetAddress*"/>
  45372. </instance-parameter>
  45373. </parameters>
  45374. </method>
  45375. <method name="get_is_loopback"
  45376. c:identifier="g_inet_address_get_is_loopback"
  45377. version="2.22">
  45378. <doc xml:space="preserve">Tests whether @address is the loopback address for its family.</doc>
  45379. <return-value transfer-ownership="none">
  45380. <doc xml:space="preserve">%TRUE if @address is the loopback address for its family.</doc>
  45381. <type name="gboolean" c:type="gboolean"/>
  45382. </return-value>
  45383. <parameters>
  45384. <instance-parameter name="address" transfer-ownership="none">
  45385. <doc xml:space="preserve">a #GInetAddress</doc>
  45386. <type name="InetAddress" c:type="GInetAddress*"/>
  45387. </instance-parameter>
  45388. </parameters>
  45389. </method>
  45390. <method name="get_is_mc_global"
  45391. c:identifier="g_inet_address_get_is_mc_global"
  45392. version="2.22">
  45393. <doc xml:space="preserve">Tests whether @address is a global multicast address.</doc>
  45394. <return-value transfer-ownership="none">
  45395. <doc xml:space="preserve">%TRUE if @address is a global multicast address.</doc>
  45396. <type name="gboolean" c:type="gboolean"/>
  45397. </return-value>
  45398. <parameters>
  45399. <instance-parameter name="address" transfer-ownership="none">
  45400. <doc xml:space="preserve">a #GInetAddress</doc>
  45401. <type name="InetAddress" c:type="GInetAddress*"/>
  45402. </instance-parameter>
  45403. </parameters>
  45404. </method>
  45405. <method name="get_is_mc_link_local"
  45406. c:identifier="g_inet_address_get_is_mc_link_local"
  45407. version="2.22">
  45408. <doc xml:space="preserve">Tests whether @address is a link-local multicast address.</doc>
  45409. <return-value transfer-ownership="none">
  45410. <doc xml:space="preserve">%TRUE if @address is a link-local multicast address.</doc>
  45411. <type name="gboolean" c:type="gboolean"/>
  45412. </return-value>
  45413. <parameters>
  45414. <instance-parameter name="address" transfer-ownership="none">
  45415. <doc xml:space="preserve">a #GInetAddress</doc>
  45416. <type name="InetAddress" c:type="GInetAddress*"/>
  45417. </instance-parameter>
  45418. </parameters>
  45419. </method>
  45420. <method name="get_is_mc_node_local"
  45421. c:identifier="g_inet_address_get_is_mc_node_local"
  45422. version="2.22">
  45423. <doc xml:space="preserve">Tests whether @address is a node-local multicast address.</doc>
  45424. <return-value transfer-ownership="none">
  45425. <doc xml:space="preserve">%TRUE if @address is a node-local multicast address.</doc>
  45426. <type name="gboolean" c:type="gboolean"/>
  45427. </return-value>
  45428. <parameters>
  45429. <instance-parameter name="address" transfer-ownership="none">
  45430. <doc xml:space="preserve">a #GInetAddress</doc>
  45431. <type name="InetAddress" c:type="GInetAddress*"/>
  45432. </instance-parameter>
  45433. </parameters>
  45434. </method>
  45435. <method name="get_is_mc_org_local"
  45436. c:identifier="g_inet_address_get_is_mc_org_local"
  45437. version="2.22">
  45438. <doc xml:space="preserve">Tests whether @address is an organization-local multicast address.</doc>
  45439. <return-value transfer-ownership="none">
  45440. <doc xml:space="preserve">%TRUE if @address is an organization-local multicast address.</doc>
  45441. <type name="gboolean" c:type="gboolean"/>
  45442. </return-value>
  45443. <parameters>
  45444. <instance-parameter name="address" transfer-ownership="none">
  45445. <doc xml:space="preserve">a #GInetAddress</doc>
  45446. <type name="InetAddress" c:type="GInetAddress*"/>
  45447. </instance-parameter>
  45448. </parameters>
  45449. </method>
  45450. <method name="get_is_mc_site_local"
  45451. c:identifier="g_inet_address_get_is_mc_site_local"
  45452. version="2.22">
  45453. <doc xml:space="preserve">Tests whether @address is a site-local multicast address.</doc>
  45454. <return-value transfer-ownership="none">
  45455. <doc xml:space="preserve">%TRUE if @address is a site-local multicast address.</doc>
  45456. <type name="gboolean" c:type="gboolean"/>
  45457. </return-value>
  45458. <parameters>
  45459. <instance-parameter name="address" transfer-ownership="none">
  45460. <doc xml:space="preserve">a #GInetAddress</doc>
  45461. <type name="InetAddress" c:type="GInetAddress*"/>
  45462. </instance-parameter>
  45463. </parameters>
  45464. </method>
  45465. <method name="get_is_multicast"
  45466. c:identifier="g_inet_address_get_is_multicast"
  45467. version="2.22">
  45468. <doc xml:space="preserve">Tests whether @address is a multicast address.</doc>
  45469. <return-value transfer-ownership="none">
  45470. <doc xml:space="preserve">%TRUE if @address is a multicast address.</doc>
  45471. <type name="gboolean" c:type="gboolean"/>
  45472. </return-value>
  45473. <parameters>
  45474. <instance-parameter name="address" transfer-ownership="none">
  45475. <doc xml:space="preserve">a #GInetAddress</doc>
  45476. <type name="InetAddress" c:type="GInetAddress*"/>
  45477. </instance-parameter>
  45478. </parameters>
  45479. </method>
  45480. <method name="get_is_site_local"
  45481. c:identifier="g_inet_address_get_is_site_local"
  45482. version="2.22">
  45483. <doc xml:space="preserve">Tests whether @address is a site-local address such as 10.0.0.1
  45484. (that is, the address identifies a host on a local network that can
  45485. not be reached directly from the Internet, but which may have
  45486. outgoing Internet connectivity via a NAT or firewall).</doc>
  45487. <return-value transfer-ownership="none">
  45488. <doc xml:space="preserve">%TRUE if @address is a site-local address.</doc>
  45489. <type name="gboolean" c:type="gboolean"/>
  45490. </return-value>
  45491. <parameters>
  45492. <instance-parameter name="address" transfer-ownership="none">
  45493. <doc xml:space="preserve">a #GInetAddress</doc>
  45494. <type name="InetAddress" c:type="GInetAddress*"/>
  45495. </instance-parameter>
  45496. </parameters>
  45497. </method>
  45498. <method name="get_native_size"
  45499. c:identifier="g_inet_address_get_native_size"
  45500. version="2.22">
  45501. <doc xml:space="preserve">Gets the size of the native raw binary address for @address. This
  45502. is the size of the data that you get from g_inet_address_to_bytes().</doc>
  45503. <return-value transfer-ownership="none">
  45504. <doc xml:space="preserve">the number of bytes used for the native version of @address.</doc>
  45505. <type name="gsize" c:type="gsize"/>
  45506. </return-value>
  45507. <parameters>
  45508. <instance-parameter name="address" transfer-ownership="none">
  45509. <doc xml:space="preserve">a #GInetAddress</doc>
  45510. <type name="InetAddress" c:type="GInetAddress*"/>
  45511. </instance-parameter>
  45512. </parameters>
  45513. </method>
  45514. <method name="to_bytes"
  45515. c:identifier="g_inet_address_to_bytes"
  45516. version="2.22"
  45517. introspectable="0">
  45518. <doc xml:space="preserve">Gets the raw binary address data from @address.</doc>
  45519. <return-value transfer-ownership="none">
  45520. <doc xml:space="preserve">a pointer to an internal array of the bytes in @address,
  45521. which should not be modified, stored, or freed. The size of this
  45522. array can be gotten with g_inet_address_get_native_size().</doc>
  45523. <type name="guint8" c:type="const guint8*"/>
  45524. </return-value>
  45525. <parameters>
  45526. <instance-parameter name="address" transfer-ownership="none">
  45527. <doc xml:space="preserve">a #GInetAddress</doc>
  45528. <type name="InetAddress" c:type="GInetAddress*"/>
  45529. </instance-parameter>
  45530. </parameters>
  45531. </method>
  45532. <method name="to_string"
  45533. c:identifier="g_inet_address_to_string"
  45534. version="2.22">
  45535. <doc xml:space="preserve">Converts @address to string form.</doc>
  45536. <return-value transfer-ownership="full">
  45537. <doc xml:space="preserve">a representation of @address as a string, which should be
  45538. freed after use.</doc>
  45539. <type name="utf8" c:type="gchar*"/>
  45540. </return-value>
  45541. <parameters>
  45542. <instance-parameter name="address" transfer-ownership="none">
  45543. <doc xml:space="preserve">a #GInetAddress</doc>
  45544. <type name="InetAddress" c:type="GInetAddress*"/>
  45545. </instance-parameter>
  45546. </parameters>
  45547. </method>
  45548. <property name="bytes"
  45549. writable="1"
  45550. construct-only="1"
  45551. transfer-ownership="none">
  45552. <type name="gpointer" c:type="gpointer"/>
  45553. </property>
  45554. <property name="family"
  45555. writable="1"
  45556. construct-only="1"
  45557. transfer-ownership="none">
  45558. <type name="SocketFamily"/>
  45559. </property>
  45560. <property name="is-any" version="2.22" transfer-ownership="none">
  45561. <doc xml:space="preserve">Whether this is the "any" address for its family.
  45562. See g_inet_address_get_is_any().</doc>
  45563. <type name="gboolean" c:type="gboolean"/>
  45564. </property>
  45565. <property name="is-link-local" version="2.22" transfer-ownership="none">
  45566. <doc xml:space="preserve">Whether this is a link-local address.
  45567. See g_inet_address_get_is_link_local().</doc>
  45568. <type name="gboolean" c:type="gboolean"/>
  45569. </property>
  45570. <property name="is-loopback" version="2.22" transfer-ownership="none">
  45571. <doc xml:space="preserve">Whether this is the loopback address for its family.
  45572. See g_inet_address_get_is_loopback().</doc>
  45573. <type name="gboolean" c:type="gboolean"/>
  45574. </property>
  45575. <property name="is-mc-global" version="2.22" transfer-ownership="none">
  45576. <doc xml:space="preserve">Whether this is a global multicast address.
  45577. See g_inet_address_get_is_mc_global().</doc>
  45578. <type name="gboolean" c:type="gboolean"/>
  45579. </property>
  45580. <property name="is-mc-link-local"
  45581. version="2.22"
  45582. transfer-ownership="none">
  45583. <doc xml:space="preserve">Whether this is a link-local multicast address.
  45584. See g_inet_address_get_is_mc_link_local().</doc>
  45585. <type name="gboolean" c:type="gboolean"/>
  45586. </property>
  45587. <property name="is-mc-node-local"
  45588. version="2.22"
  45589. transfer-ownership="none">
  45590. <doc xml:space="preserve">Whether this is a node-local multicast address.
  45591. See g_inet_address_get_is_mc_node_local().</doc>
  45592. <type name="gboolean" c:type="gboolean"/>
  45593. </property>
  45594. <property name="is-mc-org-local"
  45595. version="2.22"
  45596. transfer-ownership="none">
  45597. <doc xml:space="preserve">Whether this is an organization-local multicast address.
  45598. See g_inet_address_get_is_mc_org_local().</doc>
  45599. <type name="gboolean" c:type="gboolean"/>
  45600. </property>
  45601. <property name="is-mc-site-local"
  45602. version="2.22"
  45603. transfer-ownership="none">
  45604. <doc xml:space="preserve">Whether this is a site-local multicast address.
  45605. See g_inet_address_get_is_mc_site_local().</doc>
  45606. <type name="gboolean" c:type="gboolean"/>
  45607. </property>
  45608. <property name="is-multicast" version="2.22" transfer-ownership="none">
  45609. <doc xml:space="preserve">Whether this is a multicast address.
  45610. See g_inet_address_get_is_multicast().</doc>
  45611. <type name="gboolean" c:type="gboolean"/>
  45612. </property>
  45613. <property name="is-site-local" version="2.22" transfer-ownership="none">
  45614. <doc xml:space="preserve">Whether this is a site-local address.
  45615. See g_inet_address_get_is_loopback().</doc>
  45616. <type name="gboolean" c:type="gboolean"/>
  45617. </property>
  45618. <field name="parent_instance">
  45619. <type name="GObject.Object" c:type="GObject"/>
  45620. </field>
  45621. <field name="priv" readable="0" private="1">
  45622. <type name="InetAddressPrivate" c:type="GInetAddressPrivate*"/>
  45623. </field>
  45624. </class>
  45625. <record name="InetAddressClass"
  45626. c:type="GInetAddressClass"
  45627. glib:is-gtype-struct-for="InetAddress">
  45628. <field name="parent_class">
  45629. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  45630. </field>
  45631. <field name="to_string">
  45632. <callback name="to_string">
  45633. <return-value transfer-ownership="full">
  45634. <doc xml:space="preserve">a representation of @address as a string, which should be
  45635. freed after use.</doc>
  45636. <type name="utf8" c:type="gchar*"/>
  45637. </return-value>
  45638. <parameters>
  45639. <parameter name="address" transfer-ownership="none">
  45640. <doc xml:space="preserve">a #GInetAddress</doc>
  45641. <type name="InetAddress" c:type="GInetAddress*"/>
  45642. </parameter>
  45643. </parameters>
  45644. </callback>
  45645. </field>
  45646. <field name="to_bytes">
  45647. <callback name="to_bytes">
  45648. <return-value transfer-ownership="none">
  45649. <doc xml:space="preserve">a pointer to an internal array of the bytes in @address,
  45650. which should not be modified, stored, or freed. The size of this
  45651. array can be gotten with g_inet_address_get_native_size().</doc>
  45652. <type name="guint8" c:type="const guint8*"/>
  45653. </return-value>
  45654. <parameters>
  45655. <parameter name="address" transfer-ownership="none">
  45656. <doc xml:space="preserve">a #GInetAddress</doc>
  45657. <type name="InetAddress" c:type="GInetAddress*"/>
  45658. </parameter>
  45659. </parameters>
  45660. </callback>
  45661. </field>
  45662. </record>
  45663. <class name="InetAddressMask"
  45664. c:symbol-prefix="inet_address_mask"
  45665. c:type="GInetAddressMask"
  45666. version="2.32"
  45667. parent="GObject.Object"
  45668. glib:type-name="GInetAddressMask"
  45669. glib:get-type="g_inet_address_mask_get_type"
  45670. glib:type-struct="InetAddressMaskClass">
  45671. <doc xml:space="preserve">#GInetAddressMask represents a range of IPv4 or IPv6 addresses
  45672. described by a base address and a length indicating how many bits
  45673. of the base address are relevant for matching purposes. These are
  45674. often given in string form. Eg, "10.0.0.0/8", or "fe80::/10".</doc>
  45675. <implements name="Initable"/>
  45676. <constructor name="new"
  45677. c:identifier="g_inet_address_mask_new"
  45678. version="2.32"
  45679. throws="1">
  45680. <doc xml:space="preserve">Creates a new #GInetAddressMask representing all addresses whose
  45681. first @length bits match @addr.</doc>
  45682. <return-value transfer-ownership="full">
  45683. <doc xml:space="preserve">a new #GInetAddressMask, or %NULL on error</doc>
  45684. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45685. </return-value>
  45686. <parameters>
  45687. <parameter name="addr" transfer-ownership="none">
  45688. <doc xml:space="preserve">a #GInetAddress</doc>
  45689. <type name="InetAddress" c:type="GInetAddress*"/>
  45690. </parameter>
  45691. <parameter name="length" transfer-ownership="none">
  45692. <doc xml:space="preserve">number of bits of @addr to use</doc>
  45693. <type name="guint" c:type="guint"/>
  45694. </parameter>
  45695. </parameters>
  45696. </constructor>
  45697. <constructor name="new_from_string"
  45698. c:identifier="g_inet_address_mask_new_from_string"
  45699. version="2.32"
  45700. throws="1">
  45701. <doc xml:space="preserve">Parses @mask_string as an IP address and (optional) length, and
  45702. creates a new #GInetAddressMask. The length, if present, is
  45703. delimited by a "/". If it is not present, then the length is
  45704. assumed to be the full length of the address.</doc>
  45705. <return-value transfer-ownership="full">
  45706. <doc xml:space="preserve">a new #GInetAddressMask corresponding to @string, or %NULL
  45707. on error.</doc>
  45708. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45709. </return-value>
  45710. <parameters>
  45711. <parameter name="mask_string" transfer-ownership="none">
  45712. <doc xml:space="preserve">an IP address or address/length string</doc>
  45713. <type name="utf8" c:type="const gchar*"/>
  45714. </parameter>
  45715. </parameters>
  45716. </constructor>
  45717. <method name="equal"
  45718. c:identifier="g_inet_address_mask_equal"
  45719. version="2.32">
  45720. <doc xml:space="preserve">Tests if @mask and @mask2 are the same mask.</doc>
  45721. <return-value transfer-ownership="none">
  45722. <doc xml:space="preserve">whether @mask and @mask2 are the same mask</doc>
  45723. <type name="gboolean" c:type="gboolean"/>
  45724. </return-value>
  45725. <parameters>
  45726. <instance-parameter name="mask" transfer-ownership="none">
  45727. <doc xml:space="preserve">a #GInetAddressMask</doc>
  45728. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45729. </instance-parameter>
  45730. <parameter name="mask2" transfer-ownership="none">
  45731. <doc xml:space="preserve">another #GInetAddressMask</doc>
  45732. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45733. </parameter>
  45734. </parameters>
  45735. </method>
  45736. <method name="get_address"
  45737. c:identifier="g_inet_address_mask_get_address"
  45738. version="2.32">
  45739. <doc xml:space="preserve">Gets @mask's base address</doc>
  45740. <return-value transfer-ownership="none">
  45741. <doc xml:space="preserve">@mask's base address</doc>
  45742. <type name="InetAddress" c:type="GInetAddress*"/>
  45743. </return-value>
  45744. <parameters>
  45745. <instance-parameter name="mask" transfer-ownership="none">
  45746. <doc xml:space="preserve">a #GInetAddressMask</doc>
  45747. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45748. </instance-parameter>
  45749. </parameters>
  45750. </method>
  45751. <method name="get_family"
  45752. c:identifier="g_inet_address_mask_get_family"
  45753. version="2.32">
  45754. <doc xml:space="preserve">Gets the #GSocketFamily of @mask's address</doc>
  45755. <return-value transfer-ownership="none">
  45756. <doc xml:space="preserve">the #GSocketFamily of @mask's address</doc>
  45757. <type name="SocketFamily" c:type="GSocketFamily"/>
  45758. </return-value>
  45759. <parameters>
  45760. <instance-parameter name="mask" transfer-ownership="none">
  45761. <doc xml:space="preserve">a #GInetAddressMask</doc>
  45762. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45763. </instance-parameter>
  45764. </parameters>
  45765. </method>
  45766. <method name="get_length"
  45767. c:identifier="g_inet_address_mask_get_length"
  45768. version="2.32">
  45769. <doc xml:space="preserve">Gets @mask's length</doc>
  45770. <return-value transfer-ownership="none">
  45771. <doc xml:space="preserve">@mask's length</doc>
  45772. <type name="guint" c:type="guint"/>
  45773. </return-value>
  45774. <parameters>
  45775. <instance-parameter name="mask" transfer-ownership="none">
  45776. <doc xml:space="preserve">a #GInetAddressMask</doc>
  45777. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45778. </instance-parameter>
  45779. </parameters>
  45780. </method>
  45781. <method name="matches"
  45782. c:identifier="g_inet_address_mask_matches"
  45783. version="2.32">
  45784. <doc xml:space="preserve">Tests if @address falls within the range described by @mask.</doc>
  45785. <return-value transfer-ownership="none">
  45786. <doc xml:space="preserve">whether @address falls within the range described by
  45787. @mask.</doc>
  45788. <type name="gboolean" c:type="gboolean"/>
  45789. </return-value>
  45790. <parameters>
  45791. <instance-parameter name="mask" transfer-ownership="none">
  45792. <doc xml:space="preserve">a #GInetAddressMask</doc>
  45793. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45794. </instance-parameter>
  45795. <parameter name="address" transfer-ownership="none">
  45796. <doc xml:space="preserve">a #GInetAddress</doc>
  45797. <type name="InetAddress" c:type="GInetAddress*"/>
  45798. </parameter>
  45799. </parameters>
  45800. </method>
  45801. <method name="to_string"
  45802. c:identifier="g_inet_address_mask_to_string"
  45803. version="2.32">
  45804. <doc xml:space="preserve">Converts @mask back to its corresponding string form.</doc>
  45805. <return-value transfer-ownership="full">
  45806. <doc xml:space="preserve">a string corresponding to @mask.</doc>
  45807. <type name="utf8" c:type="gchar*"/>
  45808. </return-value>
  45809. <parameters>
  45810. <instance-parameter name="mask" transfer-ownership="none">
  45811. <doc xml:space="preserve">a #GInetAddressMask</doc>
  45812. <type name="InetAddressMask" c:type="GInetAddressMask*"/>
  45813. </instance-parameter>
  45814. </parameters>
  45815. </method>
  45816. <property name="address" writable="1" transfer-ownership="none">
  45817. <type name="InetAddress"/>
  45818. </property>
  45819. <property name="family" transfer-ownership="none">
  45820. <type name="SocketFamily"/>
  45821. </property>
  45822. <property name="length" writable="1" transfer-ownership="none">
  45823. <type name="guint" c:type="guint"/>
  45824. </property>
  45825. <field name="parent_instance">
  45826. <type name="GObject.Object" c:type="GObject"/>
  45827. </field>
  45828. <field name="priv" readable="0" private="1">
  45829. <type name="InetAddressMaskPrivate" c:type="GInetAddressMaskPrivate*"/>
  45830. </field>
  45831. </class>
  45832. <record name="InetAddressMaskClass"
  45833. c:type="GInetAddressMaskClass"
  45834. glib:is-gtype-struct-for="InetAddressMask">
  45835. <field name="parent_class">
  45836. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  45837. </field>
  45838. </record>
  45839. <record name="InetAddressMaskPrivate"
  45840. c:type="GInetAddressMaskPrivate"
  45841. disguised="1">
  45842. </record>
  45843. <record name="InetAddressPrivate"
  45844. c:type="GInetAddressPrivate"
  45845. disguised="1">
  45846. </record>
  45847. <class name="InetSocketAddress"
  45848. c:symbol-prefix="inet_socket_address"
  45849. c:type="GInetSocketAddress"
  45850. parent="SocketAddress"
  45851. glib:type-name="GInetSocketAddress"
  45852. glib:get-type="g_inet_socket_address_get_type"
  45853. glib:type-struct="InetSocketAddressClass">
  45854. <doc xml:space="preserve">An IPv4 or IPv6 socket address; that is, the combination of a
  45855. #GInetAddress and a port number.</doc>
  45856. <implements name="SocketConnectable"/>
  45857. <constructor name="new"
  45858. c:identifier="g_inet_socket_address_new"
  45859. version="2.22">
  45860. <doc xml:space="preserve">Creates a new #GInetSocketAddress for @address and @port.</doc>
  45861. <return-value transfer-ownership="full">
  45862. <doc xml:space="preserve">a new #GInetSocketAddress</doc>
  45863. <type name="SocketAddress" c:type="GSocketAddress*"/>
  45864. </return-value>
  45865. <parameters>
  45866. <parameter name="address" transfer-ownership="none">
  45867. <doc xml:space="preserve">a #GInetAddress</doc>
  45868. <type name="InetAddress" c:type="GInetAddress*"/>
  45869. </parameter>
  45870. <parameter name="port" transfer-ownership="none">
  45871. <doc xml:space="preserve">a port number</doc>
  45872. <type name="guint16" c:type="guint16"/>
  45873. </parameter>
  45874. </parameters>
  45875. </constructor>
  45876. <constructor name="new_from_string"
  45877. c:identifier="g_inet_socket_address_new_from_string"
  45878. version="2.40">
  45879. <doc xml:space="preserve">Creates a new #GInetSocketAddress for @address and @port.
  45880. If @address is an IPv6 address, it can also contain a scope ID
  45881. (separated from the address by a "&lt;literal&gt;%&lt;/literal&gt;").</doc>
  45882. <return-value transfer-ownership="full">
  45883. <doc xml:space="preserve">a new #GInetSocketAddress, or %NULL if @address cannot be
  45884. parsed.</doc>
  45885. <type name="SocketAddress" c:type="GSocketAddress*"/>
  45886. </return-value>
  45887. <parameters>
  45888. <parameter name="address" transfer-ownership="none">
  45889. <doc xml:space="preserve">the string form of an IP address</doc>
  45890. <type name="utf8" c:type="const char*"/>
  45891. </parameter>
  45892. <parameter name="port" transfer-ownership="none">
  45893. <doc xml:space="preserve">a port number</doc>
  45894. <type name="guint" c:type="guint"/>
  45895. </parameter>
  45896. </parameters>
  45897. </constructor>
  45898. <method name="get_address"
  45899. c:identifier="g_inet_socket_address_get_address"
  45900. version="2.22">
  45901. <doc xml:space="preserve">Gets @address's #GInetAddress.</doc>
  45902. <return-value transfer-ownership="none">
  45903. <doc xml:space="preserve">the #GInetAddress for @address, which must be
  45904. g_object_ref()'d if it will be stored</doc>
  45905. <type name="InetAddress" c:type="GInetAddress*"/>
  45906. </return-value>
  45907. <parameters>
  45908. <instance-parameter name="address" transfer-ownership="none">
  45909. <doc xml:space="preserve">a #GInetSocketAddress</doc>
  45910. <type name="InetSocketAddress" c:type="GInetSocketAddress*"/>
  45911. </instance-parameter>
  45912. </parameters>
  45913. </method>
  45914. <method name="get_flowinfo"
  45915. c:identifier="g_inet_socket_address_get_flowinfo"
  45916. version="2.32">
  45917. <doc xml:space="preserve">Gets the `sin6_flowinfo` field from @address,
  45918. which must be an IPv6 address.</doc>
  45919. <return-value transfer-ownership="none">
  45920. <doc xml:space="preserve">the flowinfo field</doc>
  45921. <type name="guint32" c:type="guint32"/>
  45922. </return-value>
  45923. <parameters>
  45924. <instance-parameter name="address" transfer-ownership="none">
  45925. <doc xml:space="preserve">a %G_SOCKET_FAMILY_IPV6 #GInetSocketAddress</doc>
  45926. <type name="InetSocketAddress" c:type="GInetSocketAddress*"/>
  45927. </instance-parameter>
  45928. </parameters>
  45929. </method>
  45930. <method name="get_port"
  45931. c:identifier="g_inet_socket_address_get_port"
  45932. version="2.22">
  45933. <doc xml:space="preserve">Gets @address's port.</doc>
  45934. <return-value transfer-ownership="none">
  45935. <doc xml:space="preserve">the port for @address</doc>
  45936. <type name="guint16" c:type="guint16"/>
  45937. </return-value>
  45938. <parameters>
  45939. <instance-parameter name="address" transfer-ownership="none">
  45940. <doc xml:space="preserve">a #GInetSocketAddress</doc>
  45941. <type name="InetSocketAddress" c:type="GInetSocketAddress*"/>
  45942. </instance-parameter>
  45943. </parameters>
  45944. </method>
  45945. <method name="get_scope_id"
  45946. c:identifier="g_inet_socket_address_get_scope_id"
  45947. version="2.32">
  45948. <doc xml:space="preserve">Gets the `sin6_scope_id` field from @address,
  45949. which must be an IPv6 address.</doc>
  45950. <return-value transfer-ownership="none">
  45951. <doc xml:space="preserve">the scope id field</doc>
  45952. <type name="guint32" c:type="guint32"/>
  45953. </return-value>
  45954. <parameters>
  45955. <instance-parameter name="address" transfer-ownership="none">
  45956. <doc xml:space="preserve">a %G_SOCKET_FAMILY_IPV6 #GInetAddress</doc>
  45957. <type name="InetSocketAddress" c:type="GInetSocketAddress*"/>
  45958. </instance-parameter>
  45959. </parameters>
  45960. </method>
  45961. <property name="address"
  45962. writable="1"
  45963. construct-only="1"
  45964. transfer-ownership="none">
  45965. <type name="InetAddress"/>
  45966. </property>
  45967. <property name="flowinfo"
  45968. version="2.32"
  45969. writable="1"
  45970. construct-only="1"
  45971. transfer-ownership="none">
  45972. <doc xml:space="preserve">The `sin6_flowinfo` field, for IPv6 addresses.</doc>
  45973. <type name="guint" c:type="guint"/>
  45974. </property>
  45975. <property name="port"
  45976. writable="1"
  45977. construct-only="1"
  45978. transfer-ownership="none">
  45979. <type name="guint" c:type="guint"/>
  45980. </property>
  45981. <property name="scope-id"
  45982. writable="1"
  45983. construct-only="1"
  45984. transfer-ownership="none">
  45985. <type name="guint" c:type="guint"/>
  45986. </property>
  45987. <field name="parent_instance">
  45988. <type name="SocketAddress" c:type="GSocketAddress"/>
  45989. </field>
  45990. <field name="priv" readable="0" private="1">
  45991. <type name="InetSocketAddressPrivate"
  45992. c:type="GInetSocketAddressPrivate*"/>
  45993. </field>
  45994. </class>
  45995. <record name="InetSocketAddressClass"
  45996. c:type="GInetSocketAddressClass"
  45997. glib:is-gtype-struct-for="InetSocketAddress">
  45998. <field name="parent_class">
  45999. <type name="SocketAddressClass" c:type="GSocketAddressClass"/>
  46000. </field>
  46001. </record>
  46002. <record name="InetSocketAddressPrivate"
  46003. c:type="GInetSocketAddressPrivate"
  46004. disguised="1">
  46005. </record>
  46006. <interface name="Initable"
  46007. c:symbol-prefix="initable"
  46008. c:type="GInitable"
  46009. version="2.22"
  46010. glib:type-name="GInitable"
  46011. glib:get-type="g_initable_get_type"
  46012. glib:type-struct="InitableIface">
  46013. <doc xml:space="preserve">#GInitable is implemented by objects that can fail during
  46014. initialization. If an object implements this interface then
  46015. it must be initialized as the first thing after construction,
  46016. either via g_initable_init() or g_async_initable_init_async()
  46017. (the latter is only available if it also implements #GAsyncInitable).
  46018. If the object is not initialized, or initialization returns with an
  46019. error, then all operations on the object except g_object_ref() and
  46020. g_object_unref() are considered to be invalid, and have undefined
  46021. behaviour. They will often fail with g_critical() or g_warning(), but
  46022. this must not be relied on.
  46023. Users of objects implementing this are not intended to use
  46024. the interface method directly, instead it will be used automatically
  46025. in various ways. For C applications you generally just call
  46026. g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
  46027. This will call g_initable_init() under the cover, returning %NULL and
  46028. setting a #GError on failure (at which point the instance is
  46029. unreferenced).
  46030. For bindings in languages where the native constructor supports
  46031. exceptions the binding could check for objects implemention %GInitable
  46032. during normal construction and automatically initialize them, throwing
  46033. an exception on failure.</doc>
  46034. <function name="new"
  46035. c:identifier="g_initable_new"
  46036. version="2.22"
  46037. introspectable="0">
  46038. <doc xml:space="preserve">Helper function for constructing #GInitable object. This is
  46039. similar to g_object_new() but also initializes the object
  46040. and returns %NULL, setting an error on failure.</doc>
  46041. <return-value transfer-ownership="full">
  46042. <doc xml:space="preserve">a newly allocated
  46043. #GObject, or %NULL on error</doc>
  46044. <type name="GObject.Object" c:type="gpointer"/>
  46045. </return-value>
  46046. <parameters>
  46047. <parameter name="object_type" transfer-ownership="none">
  46048. <doc xml:space="preserve">a #GType supporting #GInitable.</doc>
  46049. <type name="GType" c:type="GType"/>
  46050. </parameter>
  46051. <parameter name="cancellable"
  46052. transfer-ownership="none"
  46053. nullable="1"
  46054. allow-none="1">
  46055. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46056. <type name="Cancellable" c:type="GCancellable*"/>
  46057. </parameter>
  46058. <parameter name="error" transfer-ownership="none">
  46059. <doc xml:space="preserve">a #GError location to store the error occurring, or %NULL to
  46060. ignore.</doc>
  46061. <type name="GLib.Error" c:type="GError**"/>
  46062. </parameter>
  46063. <parameter name="first_property_name"
  46064. transfer-ownership="none"
  46065. nullable="1"
  46066. allow-none="1">
  46067. <doc xml:space="preserve">the name of the first property, or %NULL if no
  46068. properties</doc>
  46069. <type name="utf8" c:type="const gchar*"/>
  46070. </parameter>
  46071. <parameter name="..." transfer-ownership="none">
  46072. <doc xml:space="preserve">the value if the first property, followed by and other property
  46073. value pairs, and ended by %NULL.</doc>
  46074. <varargs/>
  46075. </parameter>
  46076. </parameters>
  46077. </function>
  46078. <function name="new_valist"
  46079. c:identifier="g_initable_new_valist"
  46080. version="2.22"
  46081. introspectable="0"
  46082. throws="1">
  46083. <doc xml:space="preserve">Helper function for constructing #GInitable object. This is
  46084. similar to g_object_new_valist() but also initializes the object
  46085. and returns %NULL, setting an error on failure.</doc>
  46086. <return-value transfer-ownership="full">
  46087. <doc xml:space="preserve">a newly allocated
  46088. #GObject, or %NULL on error</doc>
  46089. <type name="GObject.Object" c:type="GObject*"/>
  46090. </return-value>
  46091. <parameters>
  46092. <parameter name="object_type" transfer-ownership="none">
  46093. <doc xml:space="preserve">a #GType supporting #GInitable.</doc>
  46094. <type name="GType" c:type="GType"/>
  46095. </parameter>
  46096. <parameter name="first_property_name" transfer-ownership="none">
  46097. <doc xml:space="preserve">the name of the first property, followed by
  46098. the value, and other property value pairs, and ended by %NULL.</doc>
  46099. <type name="utf8" c:type="const gchar*"/>
  46100. </parameter>
  46101. <parameter name="var_args" transfer-ownership="none">
  46102. <doc xml:space="preserve">The var args list generated from @first_property_name.</doc>
  46103. <type name="va_list" c:type="va_list"/>
  46104. </parameter>
  46105. <parameter name="cancellable"
  46106. transfer-ownership="none"
  46107. nullable="1"
  46108. allow-none="1">
  46109. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46110. <type name="Cancellable" c:type="GCancellable*"/>
  46111. </parameter>
  46112. </parameters>
  46113. </function>
  46114. <function name="newv"
  46115. c:identifier="g_initable_newv"
  46116. version="2.22"
  46117. throws="1">
  46118. <doc xml:space="preserve">Helper function for constructing #GInitable object. This is
  46119. similar to g_object_newv() but also initializes the object
  46120. and returns %NULL, setting an error on failure.</doc>
  46121. <return-value transfer-ownership="full">
  46122. <doc xml:space="preserve">a newly allocated
  46123. #GObject, or %NULL on error</doc>
  46124. <type name="GObject.Object" c:type="gpointer"/>
  46125. </return-value>
  46126. <parameters>
  46127. <parameter name="object_type" transfer-ownership="none">
  46128. <doc xml:space="preserve">a #GType supporting #GInitable.</doc>
  46129. <type name="GType" c:type="GType"/>
  46130. </parameter>
  46131. <parameter name="n_parameters" transfer-ownership="none">
  46132. <doc xml:space="preserve">the number of parameters in @parameters</doc>
  46133. <type name="guint" c:type="guint"/>
  46134. </parameter>
  46135. <parameter name="parameters" transfer-ownership="none">
  46136. <doc xml:space="preserve">the parameters to use to construct the object</doc>
  46137. <array length="1" zero-terminated="0" c:type="GParameter*">
  46138. <type name="GObject.Parameter" c:type="GParameter"/>
  46139. </array>
  46140. </parameter>
  46141. <parameter name="cancellable"
  46142. transfer-ownership="none"
  46143. nullable="1"
  46144. allow-none="1">
  46145. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46146. <type name="Cancellable" c:type="GCancellable*"/>
  46147. </parameter>
  46148. </parameters>
  46149. </function>
  46150. <virtual-method name="init" invoker="init" version="2.22" throws="1">
  46151. <doc xml:space="preserve">Initializes the object implementing the interface.
  46152. The object must be initialized before any real use after initial
  46153. construction, either with this function or g_async_initable_init_async().
  46154. Implementations may also support cancellation. If @cancellable is not %NULL,
  46155. then initialization can be cancelled by triggering the cancellable object
  46156. from another thread. If the operation was cancelled, the error
  46157. %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
  46158. the object doesn't support cancellable initialization the error
  46159. %G_IO_ERROR_NOT_SUPPORTED will be returned.
  46160. If the object is not initialized, or initialization returns with an
  46161. error, then all operations on the object except g_object_ref() and
  46162. g_object_unref() are considered to be invalid, and have undefined
  46163. behaviour. See the [introduction][ginitable] for more details.
  46164. Implementations of this method must be idempotent, i.e. multiple calls
  46165. to this function with the same argument should return the same results.
  46166. Only the first call initializes the object, further calls return the result
  46167. of the first call. This is so that it's safe to implement the singleton
  46168. pattern in the GObject constructor function.</doc>
  46169. <return-value transfer-ownership="none">
  46170. <doc xml:space="preserve">%TRUE if successful. If an error has occurred, this function will
  46171. return %FALSE and set @error appropriately if present.</doc>
  46172. <type name="gboolean" c:type="gboolean"/>
  46173. </return-value>
  46174. <parameters>
  46175. <instance-parameter name="initable" transfer-ownership="none">
  46176. <doc xml:space="preserve">a #GInitable.</doc>
  46177. <type name="Initable" c:type="GInitable*"/>
  46178. </instance-parameter>
  46179. <parameter name="cancellable"
  46180. transfer-ownership="none"
  46181. nullable="1"
  46182. allow-none="1">
  46183. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46184. <type name="Cancellable" c:type="GCancellable*"/>
  46185. </parameter>
  46186. </parameters>
  46187. </virtual-method>
  46188. <method name="init"
  46189. c:identifier="g_initable_init"
  46190. version="2.22"
  46191. throws="1">
  46192. <doc xml:space="preserve">Initializes the object implementing the interface.
  46193. The object must be initialized before any real use after initial
  46194. construction, either with this function or g_async_initable_init_async().
  46195. Implementations may also support cancellation. If @cancellable is not %NULL,
  46196. then initialization can be cancelled by triggering the cancellable object
  46197. from another thread. If the operation was cancelled, the error
  46198. %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
  46199. the object doesn't support cancellable initialization the error
  46200. %G_IO_ERROR_NOT_SUPPORTED will be returned.
  46201. If the object is not initialized, or initialization returns with an
  46202. error, then all operations on the object except g_object_ref() and
  46203. g_object_unref() are considered to be invalid, and have undefined
  46204. behaviour. See the [introduction][ginitable] for more details.
  46205. Implementations of this method must be idempotent, i.e. multiple calls
  46206. to this function with the same argument should return the same results.
  46207. Only the first call initializes the object, further calls return the result
  46208. of the first call. This is so that it's safe to implement the singleton
  46209. pattern in the GObject constructor function.</doc>
  46210. <return-value transfer-ownership="none">
  46211. <doc xml:space="preserve">%TRUE if successful. If an error has occurred, this function will
  46212. return %FALSE and set @error appropriately if present.</doc>
  46213. <type name="gboolean" c:type="gboolean"/>
  46214. </return-value>
  46215. <parameters>
  46216. <instance-parameter name="initable" transfer-ownership="none">
  46217. <doc xml:space="preserve">a #GInitable.</doc>
  46218. <type name="Initable" c:type="GInitable*"/>
  46219. </instance-parameter>
  46220. <parameter name="cancellable"
  46221. transfer-ownership="none"
  46222. nullable="1"
  46223. allow-none="1">
  46224. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46225. <type name="Cancellable" c:type="GCancellable*"/>
  46226. </parameter>
  46227. </parameters>
  46228. </method>
  46229. </interface>
  46230. <record name="InitableIface"
  46231. c:type="GInitableIface"
  46232. glib:is-gtype-struct-for="Initable"
  46233. version="2.22">
  46234. <doc xml:space="preserve">Provides an interface for initializing object such that initialization
  46235. may fail.</doc>
  46236. <field name="g_iface">
  46237. <doc xml:space="preserve">The parent interface.</doc>
  46238. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  46239. </field>
  46240. <field name="init">
  46241. <callback name="init" throws="1">
  46242. <return-value transfer-ownership="none">
  46243. <doc xml:space="preserve">%TRUE if successful. If an error has occurred, this function will
  46244. return %FALSE and set @error appropriately if present.</doc>
  46245. <type name="gboolean" c:type="gboolean"/>
  46246. </return-value>
  46247. <parameters>
  46248. <parameter name="initable" transfer-ownership="none">
  46249. <doc xml:space="preserve">a #GInitable.</doc>
  46250. <type name="Initable" c:type="GInitable*"/>
  46251. </parameter>
  46252. <parameter name="cancellable"
  46253. transfer-ownership="none"
  46254. nullable="1"
  46255. allow-none="1">
  46256. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46257. <type name="Cancellable" c:type="GCancellable*"/>
  46258. </parameter>
  46259. </parameters>
  46260. </callback>
  46261. </field>
  46262. </record>
  46263. <record name="InputMessage" c:type="GInputMessage" version="2.48">
  46264. <doc xml:space="preserve">Structure used for scatter/gather data input when receiving multiple
  46265. messages or packets in one go. You generally pass in an array of empty
  46266. #GInputVectors and the operation will use all the buffers as if they
  46267. were one buffer, and will set @bytes_received to the total number of bytes
  46268. received across all #GInputVectors.
  46269. This structure closely mirrors `struct mmsghdr` and `struct msghdr` from
  46270. the POSIX sockets API (see `man 2 recvmmsg`).
  46271. If @address is non-%NULL then it is set to the source address the message
  46272. was received from, and the caller must free it afterwards.
  46273. If @control_messages is non-%NULL then it is set to an array of control
  46274. messages received with the message (if any), and the caller must free it
  46275. afterwards. @num_control_messages is set to the number of elements in
  46276. this array, which may be zero.
  46277. Flags relevant to this message will be returned in @flags. For example,
  46278. `MSG_EOR` or `MSG_TRUNC`.</doc>
  46279. <field name="address" writable="1">
  46280. <doc xml:space="preserve">return location
  46281. for a #GSocketAddress, or %NULL</doc>
  46282. <type name="SocketAddress" c:type="GSocketAddress**"/>
  46283. </field>
  46284. <field name="vectors" writable="1">
  46285. <doc xml:space="preserve">pointer to an
  46286. array of input vectors</doc>
  46287. <array length="2" zero-terminated="0" c:type="GInputVector*">
  46288. <type name="InputVector" c:type="GInputVector"/>
  46289. </array>
  46290. </field>
  46291. <field name="num_vectors" writable="1">
  46292. <doc xml:space="preserve">the number of input vectors pointed to by @vectors</doc>
  46293. <type name="guint" c:type="guint"/>
  46294. </field>
  46295. <field name="bytes_received" writable="1">
  46296. <doc xml:space="preserve">will be set to the number of bytes that have been
  46297. received</doc>
  46298. <type name="gsize" c:type="gsize"/>
  46299. </field>
  46300. <field name="flags" writable="1">
  46301. <doc xml:space="preserve">collection of #GSocketMsgFlags for the received message,
  46302. outputted by the call</doc>
  46303. <type name="gint" c:type="gint"/>
  46304. </field>
  46305. <field name="control_messages" writable="1">
  46306. <doc xml:space="preserve">return location for a
  46307. caller-allocated array of #GSocketControlMessages, or %NULL</doc>
  46308. <array length="6"
  46309. zero-terminated="0"
  46310. c:type="GSocketControlMessage***">
  46311. <type name="SocketControlMessage" c:type="GSocketControlMessage**"/>
  46312. </array>
  46313. </field>
  46314. <field name="num_control_messages" writable="1">
  46315. <doc xml:space="preserve">return location for the number of
  46316. elements in @control_messages</doc>
  46317. <type name="guint" c:type="guint*"/>
  46318. </field>
  46319. </record>
  46320. <class name="InputStream"
  46321. c:symbol-prefix="input_stream"
  46322. c:type="GInputStream"
  46323. parent="GObject.Object"
  46324. abstract="1"
  46325. glib:type-name="GInputStream"
  46326. glib:get-type="g_input_stream_get_type"
  46327. glib:type-struct="InputStreamClass">
  46328. <doc xml:space="preserve">#GInputStream has functions to read from a stream (g_input_stream_read()),
  46329. to close a stream (g_input_stream_close()) and to skip some content
  46330. (g_input_stream_skip()).
  46331. To copy the content of an input stream to an output stream without
  46332. manually handling the reads and writes, use g_output_stream_splice().
  46333. See the documentation for #GIOStream for details of thread safety of
  46334. streaming APIs.
  46335. All of these functions have async variants too.</doc>
  46336. <virtual-method name="close_async" invoker="close_async">
  46337. <doc xml:space="preserve">Requests an asynchronous closes of the stream, releasing resources related to it.
  46338. When the operation is finished @callback will be called.
  46339. You can then call g_input_stream_close_finish() to get the result of the
  46340. operation.
  46341. For behaviour details see g_input_stream_close().
  46342. The asyncronous methods have a default fallback that uses threads to implement
  46343. asynchronicity, so they are optional for inheriting classes. However, if you
  46344. override one you must override all.</doc>
  46345. <return-value transfer-ownership="none">
  46346. <type name="none" c:type="void"/>
  46347. </return-value>
  46348. <parameters>
  46349. <instance-parameter name="stream" transfer-ownership="none">
  46350. <doc xml:space="preserve">A #GInputStream.</doc>
  46351. <type name="InputStream" c:type="GInputStream*"/>
  46352. </instance-parameter>
  46353. <parameter name="io_priority" transfer-ownership="none">
  46354. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  46355. <type name="gint" c:type="int"/>
  46356. </parameter>
  46357. <parameter name="cancellable"
  46358. transfer-ownership="none"
  46359. nullable="1"
  46360. allow-none="1">
  46361. <doc xml:space="preserve">optional cancellable object</doc>
  46362. <type name="Cancellable" c:type="GCancellable*"/>
  46363. </parameter>
  46364. <parameter name="callback"
  46365. transfer-ownership="none"
  46366. nullable="1"
  46367. allow-none="1"
  46368. scope="async"
  46369. closure="3">
  46370. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  46371. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  46372. </parameter>
  46373. <parameter name="user_data"
  46374. transfer-ownership="none"
  46375. nullable="1"
  46376. allow-none="1"
  46377. closure="3">
  46378. <doc xml:space="preserve">the data to pass to callback function</doc>
  46379. <type name="gpointer" c:type="gpointer"/>
  46380. </parameter>
  46381. </parameters>
  46382. </virtual-method>
  46383. <virtual-method name="close_finish" invoker="close_finish" throws="1">
  46384. <doc xml:space="preserve">Finishes closing a stream asynchronously, started from g_input_stream_close_async().</doc>
  46385. <return-value transfer-ownership="none">
  46386. <doc xml:space="preserve">%TRUE if the stream was closed successfully.</doc>
  46387. <type name="gboolean" c:type="gboolean"/>
  46388. </return-value>
  46389. <parameters>
  46390. <instance-parameter name="stream" transfer-ownership="none">
  46391. <doc xml:space="preserve">a #GInputStream.</doc>
  46392. <type name="InputStream" c:type="GInputStream*"/>
  46393. </instance-parameter>
  46394. <parameter name="result" transfer-ownership="none">
  46395. <doc xml:space="preserve">a #GAsyncResult.</doc>
  46396. <type name="AsyncResult" c:type="GAsyncResult*"/>
  46397. </parameter>
  46398. </parameters>
  46399. </virtual-method>
  46400. <virtual-method name="close_fn" throws="1">
  46401. <return-value transfer-ownership="none">
  46402. <type name="gboolean" c:type="gboolean"/>
  46403. </return-value>
  46404. <parameters>
  46405. <instance-parameter name="stream" transfer-ownership="none">
  46406. <type name="InputStream" c:type="GInputStream*"/>
  46407. </instance-parameter>
  46408. <parameter name="cancellable"
  46409. transfer-ownership="none"
  46410. nullable="1"
  46411. allow-none="1">
  46412. <type name="Cancellable" c:type="GCancellable*"/>
  46413. </parameter>
  46414. </parameters>
  46415. </virtual-method>
  46416. <virtual-method name="read_async" invoker="read_async">
  46417. <doc xml:space="preserve">Request an asynchronous read of @count bytes from the stream into the buffer
  46418. starting at @buffer. When the operation is finished @callback will be called.
  46419. You can then call g_input_stream_read_finish() to get the result of the
  46420. operation.
  46421. During an async request no other sync and async calls are allowed on @stream, and will
  46422. result in %G_IO_ERROR_PENDING errors.
  46423. A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  46424. On success, the number of bytes read into the buffer will be passed to the
  46425. callback. It is not an error if this is not the same as the requested size, as it
  46426. can happen e.g. near the end of a file, but generally we try to read
  46427. as many bytes as requested. Zero is returned on end of file
  46428. (or if @count is zero), but never otherwise.
  46429. Any outstanding i/o request with higher priority (lower numerical value) will
  46430. be executed before an outstanding request with lower priority. Default
  46431. priority is %G_PRIORITY_DEFAULT.
  46432. The asyncronous methods have a default fallback that uses threads to implement
  46433. asynchronicity, so they are optional for inheriting classes. However, if you
  46434. override one you must override all.</doc>
  46435. <return-value transfer-ownership="none">
  46436. <type name="none" c:type="void"/>
  46437. </return-value>
  46438. <parameters>
  46439. <instance-parameter name="stream" transfer-ownership="none">
  46440. <doc xml:space="preserve">A #GInputStream.</doc>
  46441. <type name="InputStream" c:type="GInputStream*"/>
  46442. </instance-parameter>
  46443. <parameter name="buffer"
  46444. transfer-ownership="none"
  46445. nullable="1"
  46446. allow-none="1">
  46447. <doc xml:space="preserve">a buffer to
  46448. read data into (which should be at least count bytes long).</doc>
  46449. <array length="1" zero-terminated="0" c:type="void*">
  46450. <type name="guint8"/>
  46451. </array>
  46452. </parameter>
  46453. <parameter name="count" transfer-ownership="none">
  46454. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  46455. <type name="gsize" c:type="gsize"/>
  46456. </parameter>
  46457. <parameter name="io_priority" transfer-ownership="none">
  46458. <doc xml:space="preserve">the [I/O priority][io-priority]
  46459. of the request.</doc>
  46460. <type name="gint" c:type="int"/>
  46461. </parameter>
  46462. <parameter name="cancellable"
  46463. transfer-ownership="none"
  46464. nullable="1"
  46465. allow-none="1">
  46466. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46467. <type name="Cancellable" c:type="GCancellable*"/>
  46468. </parameter>
  46469. <parameter name="callback"
  46470. transfer-ownership="none"
  46471. nullable="1"
  46472. allow-none="1"
  46473. scope="async"
  46474. closure="5">
  46475. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  46476. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  46477. </parameter>
  46478. <parameter name="user_data"
  46479. transfer-ownership="none"
  46480. nullable="1"
  46481. allow-none="1"
  46482. closure="5">
  46483. <doc xml:space="preserve">the data to pass to callback function</doc>
  46484. <type name="gpointer" c:type="gpointer"/>
  46485. </parameter>
  46486. </parameters>
  46487. </virtual-method>
  46488. <virtual-method name="read_finish" invoker="read_finish" throws="1">
  46489. <doc xml:space="preserve">Finishes an asynchronous stream read operation.</doc>
  46490. <return-value transfer-ownership="none">
  46491. <doc xml:space="preserve">number of bytes read in, or -1 on error, or 0 on end of file.</doc>
  46492. <type name="gssize" c:type="gssize"/>
  46493. </return-value>
  46494. <parameters>
  46495. <instance-parameter name="stream" transfer-ownership="none">
  46496. <doc xml:space="preserve">a #GInputStream.</doc>
  46497. <type name="InputStream" c:type="GInputStream*"/>
  46498. </instance-parameter>
  46499. <parameter name="result" transfer-ownership="none">
  46500. <doc xml:space="preserve">a #GAsyncResult.</doc>
  46501. <type name="AsyncResult" c:type="GAsyncResult*"/>
  46502. </parameter>
  46503. </parameters>
  46504. </virtual-method>
  46505. <virtual-method name="read_fn" throws="1">
  46506. <return-value transfer-ownership="none">
  46507. <type name="gssize" c:type="gssize"/>
  46508. </return-value>
  46509. <parameters>
  46510. <instance-parameter name="stream" transfer-ownership="none">
  46511. <type name="InputStream" c:type="GInputStream*"/>
  46512. </instance-parameter>
  46513. <parameter name="buffer"
  46514. transfer-ownership="none"
  46515. nullable="1"
  46516. allow-none="1">
  46517. <type name="gpointer" c:type="void*"/>
  46518. </parameter>
  46519. <parameter name="count" transfer-ownership="none">
  46520. <type name="gsize" c:type="gsize"/>
  46521. </parameter>
  46522. <parameter name="cancellable"
  46523. transfer-ownership="none"
  46524. nullable="1"
  46525. allow-none="1">
  46526. <type name="Cancellable" c:type="GCancellable*"/>
  46527. </parameter>
  46528. </parameters>
  46529. </virtual-method>
  46530. <virtual-method name="skip" invoker="skip" throws="1">
  46531. <doc xml:space="preserve">Tries to skip @count bytes from the stream. Will block during the operation.
  46532. This is identical to g_input_stream_read(), from a behaviour standpoint,
  46533. but the bytes that are skipped are not returned to the user. Some
  46534. streams have an implementation that is more efficient than reading the data.
  46535. This function is optional for inherited classes, as the default implementation
  46536. emulates it using read.
  46537. If @cancellable is not %NULL, then the operation can be cancelled by
  46538. triggering the cancellable object from another thread. If the operation
  46539. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  46540. operation was partially finished when the operation was cancelled the
  46541. partial result will be returned, without an error.</doc>
  46542. <return-value transfer-ownership="none">
  46543. <doc xml:space="preserve">Number of bytes skipped, or -1 on error</doc>
  46544. <type name="gssize" c:type="gssize"/>
  46545. </return-value>
  46546. <parameters>
  46547. <instance-parameter name="stream" transfer-ownership="none">
  46548. <doc xml:space="preserve">a #GInputStream.</doc>
  46549. <type name="InputStream" c:type="GInputStream*"/>
  46550. </instance-parameter>
  46551. <parameter name="count" transfer-ownership="none">
  46552. <doc xml:space="preserve">the number of bytes that will be skipped from the stream</doc>
  46553. <type name="gsize" c:type="gsize"/>
  46554. </parameter>
  46555. <parameter name="cancellable"
  46556. transfer-ownership="none"
  46557. nullable="1"
  46558. allow-none="1">
  46559. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46560. <type name="Cancellable" c:type="GCancellable*"/>
  46561. </parameter>
  46562. </parameters>
  46563. </virtual-method>
  46564. <virtual-method name="skip_async" invoker="skip_async">
  46565. <doc xml:space="preserve">Request an asynchronous skip of @count bytes from the stream.
  46566. When the operation is finished @callback will be called.
  46567. You can then call g_input_stream_skip_finish() to get the result
  46568. of the operation.
  46569. During an async request no other sync and async calls are allowed,
  46570. and will result in %G_IO_ERROR_PENDING errors.
  46571. A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  46572. On success, the number of bytes skipped will be passed to the callback.
  46573. It is not an error if this is not the same as the requested size, as it
  46574. can happen e.g. near the end of a file, but generally we try to skip
  46575. as many bytes as requested. Zero is returned on end of file
  46576. (or if @count is zero), but never otherwise.
  46577. Any outstanding i/o request with higher priority (lower numerical value)
  46578. will be executed before an outstanding request with lower priority.
  46579. Default priority is %G_PRIORITY_DEFAULT.
  46580. The asynchronous methods have a default fallback that uses threads to
  46581. implement asynchronicity, so they are optional for inheriting classes.
  46582. However, if you override one, you must override all.</doc>
  46583. <return-value transfer-ownership="none">
  46584. <type name="none" c:type="void"/>
  46585. </return-value>
  46586. <parameters>
  46587. <instance-parameter name="stream" transfer-ownership="none">
  46588. <doc xml:space="preserve">A #GInputStream.</doc>
  46589. <type name="InputStream" c:type="GInputStream*"/>
  46590. </instance-parameter>
  46591. <parameter name="count" transfer-ownership="none">
  46592. <doc xml:space="preserve">the number of bytes that will be skipped from the stream</doc>
  46593. <type name="gsize" c:type="gsize"/>
  46594. </parameter>
  46595. <parameter name="io_priority" transfer-ownership="none">
  46596. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  46597. <type name="gint" c:type="int"/>
  46598. </parameter>
  46599. <parameter name="cancellable"
  46600. transfer-ownership="none"
  46601. nullable="1"
  46602. allow-none="1">
  46603. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46604. <type name="Cancellable" c:type="GCancellable*"/>
  46605. </parameter>
  46606. <parameter name="callback"
  46607. transfer-ownership="none"
  46608. nullable="1"
  46609. allow-none="1"
  46610. scope="async"
  46611. closure="4">
  46612. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  46613. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  46614. </parameter>
  46615. <parameter name="user_data"
  46616. transfer-ownership="none"
  46617. nullable="1"
  46618. allow-none="1"
  46619. closure="4">
  46620. <doc xml:space="preserve">the data to pass to callback function</doc>
  46621. <type name="gpointer" c:type="gpointer"/>
  46622. </parameter>
  46623. </parameters>
  46624. </virtual-method>
  46625. <virtual-method name="skip_finish" invoker="skip_finish" throws="1">
  46626. <doc xml:space="preserve">Finishes a stream skip operation.</doc>
  46627. <return-value transfer-ownership="none">
  46628. <doc xml:space="preserve">the size of the bytes skipped, or %-1 on error.</doc>
  46629. <type name="gssize" c:type="gssize"/>
  46630. </return-value>
  46631. <parameters>
  46632. <instance-parameter name="stream" transfer-ownership="none">
  46633. <doc xml:space="preserve">a #GInputStream.</doc>
  46634. <type name="InputStream" c:type="GInputStream*"/>
  46635. </instance-parameter>
  46636. <parameter name="result" transfer-ownership="none">
  46637. <doc xml:space="preserve">a #GAsyncResult.</doc>
  46638. <type name="AsyncResult" c:type="GAsyncResult*"/>
  46639. </parameter>
  46640. </parameters>
  46641. </virtual-method>
  46642. <method name="clear_pending" c:identifier="g_input_stream_clear_pending">
  46643. <doc xml:space="preserve">Clears the pending flag on @stream.</doc>
  46644. <return-value transfer-ownership="none">
  46645. <type name="none" c:type="void"/>
  46646. </return-value>
  46647. <parameters>
  46648. <instance-parameter name="stream" transfer-ownership="none">
  46649. <doc xml:space="preserve">input stream</doc>
  46650. <type name="InputStream" c:type="GInputStream*"/>
  46651. </instance-parameter>
  46652. </parameters>
  46653. </method>
  46654. <method name="close" c:identifier="g_input_stream_close" throws="1">
  46655. <doc xml:space="preserve">Closes the stream, releasing resources related to it.
  46656. Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
  46657. Closing a stream multiple times will not return an error.
  46658. Streams will be automatically closed when the last reference
  46659. is dropped, but you might want to call this function to make sure
  46660. resources are released as early as possible.
  46661. Some streams might keep the backing store of the stream (e.g. a file descriptor)
  46662. open after the stream is closed. See the documentation for the individual
  46663. stream for details.
  46664. On failure the first error that happened will be reported, but the close
  46665. operation will finish as much as possible. A stream that failed to
  46666. close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
  46667. is important to check and report the error to the user.
  46668. If @cancellable is not %NULL, then the operation can be cancelled by
  46669. triggering the cancellable object from another thread. If the operation
  46670. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  46671. Cancelling a close will still leave the stream closed, but some streams
  46672. can use a faster close that doesn't block to e.g. check errors.</doc>
  46673. <return-value transfer-ownership="none">
  46674. <doc xml:space="preserve">%TRUE on success, %FALSE on failure</doc>
  46675. <type name="gboolean" c:type="gboolean"/>
  46676. </return-value>
  46677. <parameters>
  46678. <instance-parameter name="stream" transfer-ownership="none">
  46679. <doc xml:space="preserve">A #GInputStream.</doc>
  46680. <type name="InputStream" c:type="GInputStream*"/>
  46681. </instance-parameter>
  46682. <parameter name="cancellable"
  46683. transfer-ownership="none"
  46684. nullable="1"
  46685. allow-none="1">
  46686. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46687. <type name="Cancellable" c:type="GCancellable*"/>
  46688. </parameter>
  46689. </parameters>
  46690. </method>
  46691. <method name="close_async" c:identifier="g_input_stream_close_async">
  46692. <doc xml:space="preserve">Requests an asynchronous closes of the stream, releasing resources related to it.
  46693. When the operation is finished @callback will be called.
  46694. You can then call g_input_stream_close_finish() to get the result of the
  46695. operation.
  46696. For behaviour details see g_input_stream_close().
  46697. The asyncronous methods have a default fallback that uses threads to implement
  46698. asynchronicity, so they are optional for inheriting classes. However, if you
  46699. override one you must override all.</doc>
  46700. <return-value transfer-ownership="none">
  46701. <type name="none" c:type="void"/>
  46702. </return-value>
  46703. <parameters>
  46704. <instance-parameter name="stream" transfer-ownership="none">
  46705. <doc xml:space="preserve">A #GInputStream.</doc>
  46706. <type name="InputStream" c:type="GInputStream*"/>
  46707. </instance-parameter>
  46708. <parameter name="io_priority" transfer-ownership="none">
  46709. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  46710. <type name="gint" c:type="int"/>
  46711. </parameter>
  46712. <parameter name="cancellable"
  46713. transfer-ownership="none"
  46714. nullable="1"
  46715. allow-none="1">
  46716. <doc xml:space="preserve">optional cancellable object</doc>
  46717. <type name="Cancellable" c:type="GCancellable*"/>
  46718. </parameter>
  46719. <parameter name="callback"
  46720. transfer-ownership="none"
  46721. nullable="1"
  46722. allow-none="1"
  46723. scope="async"
  46724. closure="3">
  46725. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  46726. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  46727. </parameter>
  46728. <parameter name="user_data"
  46729. transfer-ownership="none"
  46730. nullable="1"
  46731. allow-none="1">
  46732. <doc xml:space="preserve">the data to pass to callback function</doc>
  46733. <type name="gpointer" c:type="gpointer"/>
  46734. </parameter>
  46735. </parameters>
  46736. </method>
  46737. <method name="close_finish"
  46738. c:identifier="g_input_stream_close_finish"
  46739. throws="1">
  46740. <doc xml:space="preserve">Finishes closing a stream asynchronously, started from g_input_stream_close_async().</doc>
  46741. <return-value transfer-ownership="none">
  46742. <doc xml:space="preserve">%TRUE if the stream was closed successfully.</doc>
  46743. <type name="gboolean" c:type="gboolean"/>
  46744. </return-value>
  46745. <parameters>
  46746. <instance-parameter name="stream" transfer-ownership="none">
  46747. <doc xml:space="preserve">a #GInputStream.</doc>
  46748. <type name="InputStream" c:type="GInputStream*"/>
  46749. </instance-parameter>
  46750. <parameter name="result" transfer-ownership="none">
  46751. <doc xml:space="preserve">a #GAsyncResult.</doc>
  46752. <type name="AsyncResult" c:type="GAsyncResult*"/>
  46753. </parameter>
  46754. </parameters>
  46755. </method>
  46756. <method name="has_pending" c:identifier="g_input_stream_has_pending">
  46757. <doc xml:space="preserve">Checks if an input stream has pending actions.</doc>
  46758. <return-value transfer-ownership="none">
  46759. <doc xml:space="preserve">%TRUE if @stream has pending actions.</doc>
  46760. <type name="gboolean" c:type="gboolean"/>
  46761. </return-value>
  46762. <parameters>
  46763. <instance-parameter name="stream" transfer-ownership="none">
  46764. <doc xml:space="preserve">input stream.</doc>
  46765. <type name="InputStream" c:type="GInputStream*"/>
  46766. </instance-parameter>
  46767. </parameters>
  46768. </method>
  46769. <method name="is_closed" c:identifier="g_input_stream_is_closed">
  46770. <doc xml:space="preserve">Checks if an input stream is closed.</doc>
  46771. <return-value transfer-ownership="none">
  46772. <doc xml:space="preserve">%TRUE if the stream is closed.</doc>
  46773. <type name="gboolean" c:type="gboolean"/>
  46774. </return-value>
  46775. <parameters>
  46776. <instance-parameter name="stream" transfer-ownership="none">
  46777. <doc xml:space="preserve">input stream.</doc>
  46778. <type name="InputStream" c:type="GInputStream*"/>
  46779. </instance-parameter>
  46780. </parameters>
  46781. </method>
  46782. <method name="read" c:identifier="g_input_stream_read" throws="1">
  46783. <doc xml:space="preserve">Tries to read @count bytes from the stream into the buffer starting at
  46784. @buffer. Will block during this read.
  46785. If count is zero returns zero and does nothing. A value of @count
  46786. larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  46787. On success, the number of bytes read into the buffer is returned.
  46788. It is not an error if this is not the same as the requested size, as it
  46789. can happen e.g. near the end of a file. Zero is returned on end of file
  46790. (or if @count is zero), but never otherwise.
  46791. The returned @buffer is not a nul-terminated string, it can contain nul bytes
  46792. at any position, and this function doesn't nul-terminate the @buffer.
  46793. If @cancellable is not %NULL, then the operation can be cancelled by
  46794. triggering the cancellable object from another thread. If the operation
  46795. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  46796. operation was partially finished when the operation was cancelled the
  46797. partial result will be returned, without an error.
  46798. On error -1 is returned and @error is set accordingly.</doc>
  46799. <return-value transfer-ownership="none">
  46800. <doc xml:space="preserve">Number of bytes read, or -1 on error, or 0 on end of file.</doc>
  46801. <type name="gssize" c:type="gssize"/>
  46802. </return-value>
  46803. <parameters>
  46804. <instance-parameter name="stream" transfer-ownership="none">
  46805. <doc xml:space="preserve">a #GInputStream.</doc>
  46806. <type name="InputStream" c:type="GInputStream*"/>
  46807. </instance-parameter>
  46808. <parameter name="buffer" transfer-ownership="none">
  46809. <doc xml:space="preserve">a buffer to
  46810. read data into (which should be at least count bytes long).</doc>
  46811. <array length="1" zero-terminated="0" c:type="void*">
  46812. <type name="guint8"/>
  46813. </array>
  46814. </parameter>
  46815. <parameter name="count" transfer-ownership="none">
  46816. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  46817. <type name="gsize" c:type="gsize"/>
  46818. </parameter>
  46819. <parameter name="cancellable"
  46820. transfer-ownership="none"
  46821. nullable="1"
  46822. allow-none="1">
  46823. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46824. <type name="Cancellable" c:type="GCancellable*"/>
  46825. </parameter>
  46826. </parameters>
  46827. </method>
  46828. <method name="read_all"
  46829. c:identifier="g_input_stream_read_all"
  46830. throws="1">
  46831. <doc xml:space="preserve">Tries to read @count bytes from the stream into the buffer starting at
  46832. @buffer. Will block during this read.
  46833. This function is similar to g_input_stream_read(), except it tries to
  46834. read as many bytes as requested, only stopping on an error or end of stream.
  46835. On a successful read of @count bytes, or if we reached the end of the
  46836. stream, %TRUE is returned, and @bytes_read is set to the number of bytes
  46837. read into @buffer.
  46838. If there is an error during the operation %FALSE is returned and @error
  46839. is set to indicate the error status.
  46840. As a special exception to the normal conventions for functions that
  46841. use #GError, if this function returns %FALSE (and sets @error) then
  46842. @bytes_read will be set to the number of bytes that were successfully
  46843. read before the error was encountered. This functionality is only
  46844. available from C. If you need it from another language then you must
  46845. write your own loop around g_input_stream_read().</doc>
  46846. <return-value transfer-ownership="none">
  46847. <doc xml:space="preserve">%TRUE on success, %FALSE if there was an error</doc>
  46848. <type name="gboolean" c:type="gboolean"/>
  46849. </return-value>
  46850. <parameters>
  46851. <instance-parameter name="stream" transfer-ownership="none">
  46852. <doc xml:space="preserve">a #GInputStream.</doc>
  46853. <type name="InputStream" c:type="GInputStream*"/>
  46854. </instance-parameter>
  46855. <parameter name="buffer" transfer-ownership="none">
  46856. <doc xml:space="preserve">a buffer to
  46857. read data into (which should be at least count bytes long).</doc>
  46858. <array length="1" zero-terminated="0" c:type="void*">
  46859. <type name="guint8"/>
  46860. </array>
  46861. </parameter>
  46862. <parameter name="count" transfer-ownership="none">
  46863. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  46864. <type name="gsize" c:type="gsize"/>
  46865. </parameter>
  46866. <parameter name="bytes_read"
  46867. direction="out"
  46868. caller-allocates="0"
  46869. transfer-ownership="full">
  46870. <doc xml:space="preserve">location to store the number of bytes that was read from the stream</doc>
  46871. <type name="gsize" c:type="gsize*"/>
  46872. </parameter>
  46873. <parameter name="cancellable"
  46874. transfer-ownership="none"
  46875. nullable="1"
  46876. allow-none="1">
  46877. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  46878. <type name="Cancellable" c:type="GCancellable*"/>
  46879. </parameter>
  46880. </parameters>
  46881. </method>
  46882. <method name="read_all_async"
  46883. c:identifier="g_input_stream_read_all_async"
  46884. version="2.44">
  46885. <doc xml:space="preserve">Request an asynchronous read of @count bytes from the stream into the
  46886. buffer starting at @buffer.
  46887. This is the asynchronous equivalent of g_input_stream_read_all().
  46888. Call g_input_stream_read_all_finish() to collect the result.
  46889. Any outstanding I/O request with higher priority (lower numerical
  46890. value) will be executed before an outstanding request with lower
  46891. priority. Default priority is %G_PRIORITY_DEFAULT.</doc>
  46892. <return-value transfer-ownership="none">
  46893. <type name="none" c:type="void"/>
  46894. </return-value>
  46895. <parameters>
  46896. <instance-parameter name="stream" transfer-ownership="none">
  46897. <doc xml:space="preserve">A #GInputStream</doc>
  46898. <type name="InputStream" c:type="GInputStream*"/>
  46899. </instance-parameter>
  46900. <parameter name="buffer" transfer-ownership="none">
  46901. <doc xml:space="preserve">a buffer to
  46902. read data into (which should be at least count bytes long)</doc>
  46903. <array length="1" zero-terminated="0" c:type="void*">
  46904. <type name="guint8"/>
  46905. </array>
  46906. </parameter>
  46907. <parameter name="count" transfer-ownership="none">
  46908. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  46909. <type name="gsize" c:type="gsize"/>
  46910. </parameter>
  46911. <parameter name="io_priority" transfer-ownership="none">
  46912. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  46913. <type name="gint" c:type="int"/>
  46914. </parameter>
  46915. <parameter name="cancellable"
  46916. transfer-ownership="none"
  46917. nullable="1"
  46918. allow-none="1">
  46919. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  46920. <type name="Cancellable" c:type="GCancellable*"/>
  46921. </parameter>
  46922. <parameter name="callback"
  46923. transfer-ownership="none"
  46924. nullable="1"
  46925. allow-none="1"
  46926. scope="async"
  46927. closure="5">
  46928. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  46929. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  46930. </parameter>
  46931. <parameter name="user_data"
  46932. transfer-ownership="none"
  46933. nullable="1"
  46934. allow-none="1">
  46935. <doc xml:space="preserve">the data to pass to callback function</doc>
  46936. <type name="gpointer" c:type="gpointer"/>
  46937. </parameter>
  46938. </parameters>
  46939. </method>
  46940. <method name="read_all_finish"
  46941. c:identifier="g_input_stream_read_all_finish"
  46942. version="2.44"
  46943. throws="1">
  46944. <doc xml:space="preserve">Finishes an asynchronous stream read operation started with
  46945. g_input_stream_read_all_async().
  46946. As a special exception to the normal conventions for functions that
  46947. use #GError, if this function returns %FALSE (and sets @error) then
  46948. @bytes_read will be set to the number of bytes that were successfully
  46949. read before the error was encountered. This functionality is only
  46950. available from C. If you need it from another language then you must
  46951. write your own loop around g_input_stream_read_async().</doc>
  46952. <return-value transfer-ownership="none">
  46953. <doc xml:space="preserve">%TRUE on success, %FALSE if there was an error</doc>
  46954. <type name="gboolean" c:type="gboolean"/>
  46955. </return-value>
  46956. <parameters>
  46957. <instance-parameter name="stream" transfer-ownership="none">
  46958. <doc xml:space="preserve">a #GInputStream</doc>
  46959. <type name="InputStream" c:type="GInputStream*"/>
  46960. </instance-parameter>
  46961. <parameter name="result" transfer-ownership="none">
  46962. <doc xml:space="preserve">a #GAsyncResult</doc>
  46963. <type name="AsyncResult" c:type="GAsyncResult*"/>
  46964. </parameter>
  46965. <parameter name="bytes_read"
  46966. direction="out"
  46967. caller-allocates="0"
  46968. transfer-ownership="full">
  46969. <doc xml:space="preserve">location to store the number of bytes that was read from the stream</doc>
  46970. <type name="gsize" c:type="gsize*"/>
  46971. </parameter>
  46972. </parameters>
  46973. </method>
  46974. <method name="read_async" c:identifier="g_input_stream_read_async">
  46975. <doc xml:space="preserve">Request an asynchronous read of @count bytes from the stream into the buffer
  46976. starting at @buffer. When the operation is finished @callback will be called.
  46977. You can then call g_input_stream_read_finish() to get the result of the
  46978. operation.
  46979. During an async request no other sync and async calls are allowed on @stream, and will
  46980. result in %G_IO_ERROR_PENDING errors.
  46981. A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  46982. On success, the number of bytes read into the buffer will be passed to the
  46983. callback. It is not an error if this is not the same as the requested size, as it
  46984. can happen e.g. near the end of a file, but generally we try to read
  46985. as many bytes as requested. Zero is returned on end of file
  46986. (or if @count is zero), but never otherwise.
  46987. Any outstanding i/o request with higher priority (lower numerical value) will
  46988. be executed before an outstanding request with lower priority. Default
  46989. priority is %G_PRIORITY_DEFAULT.
  46990. The asyncronous methods have a default fallback that uses threads to implement
  46991. asynchronicity, so they are optional for inheriting classes. However, if you
  46992. override one you must override all.</doc>
  46993. <return-value transfer-ownership="none">
  46994. <type name="none" c:type="void"/>
  46995. </return-value>
  46996. <parameters>
  46997. <instance-parameter name="stream" transfer-ownership="none">
  46998. <doc xml:space="preserve">A #GInputStream.</doc>
  46999. <type name="InputStream" c:type="GInputStream*"/>
  47000. </instance-parameter>
  47001. <parameter name="buffer" transfer-ownership="none">
  47002. <doc xml:space="preserve">a buffer to
  47003. read data into (which should be at least count bytes long).</doc>
  47004. <array length="1" zero-terminated="0" c:type="void*">
  47005. <type name="guint8"/>
  47006. </array>
  47007. </parameter>
  47008. <parameter name="count" transfer-ownership="none">
  47009. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  47010. <type name="gsize" c:type="gsize"/>
  47011. </parameter>
  47012. <parameter name="io_priority" transfer-ownership="none">
  47013. <doc xml:space="preserve">the [I/O priority][io-priority]
  47014. of the request.</doc>
  47015. <type name="gint" c:type="int"/>
  47016. </parameter>
  47017. <parameter name="cancellable"
  47018. transfer-ownership="none"
  47019. nullable="1"
  47020. allow-none="1">
  47021. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47022. <type name="Cancellable" c:type="GCancellable*"/>
  47023. </parameter>
  47024. <parameter name="callback"
  47025. transfer-ownership="none"
  47026. nullable="1"
  47027. allow-none="1"
  47028. scope="async"
  47029. closure="5">
  47030. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  47031. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  47032. </parameter>
  47033. <parameter name="user_data"
  47034. transfer-ownership="none"
  47035. nullable="1"
  47036. allow-none="1">
  47037. <doc xml:space="preserve">the data to pass to callback function</doc>
  47038. <type name="gpointer" c:type="gpointer"/>
  47039. </parameter>
  47040. </parameters>
  47041. </method>
  47042. <method name="read_bytes"
  47043. c:identifier="g_input_stream_read_bytes"
  47044. version="2.34"
  47045. throws="1">
  47046. <doc xml:space="preserve">Like g_input_stream_read(), this tries to read @count bytes from
  47047. the stream in a blocking fashion. However, rather than reading into
  47048. a user-supplied buffer, this will create a new #GBytes containing
  47049. the data that was read. This may be easier to use from language
  47050. bindings.
  47051. If count is zero, returns a zero-length #GBytes and does nothing. A
  47052. value of @count larger than %G_MAXSSIZE will cause a
  47053. %G_IO_ERROR_INVALID_ARGUMENT error.
  47054. On success, a new #GBytes is returned. It is not an error if the
  47055. size of this object is not the same as the requested size, as it
  47056. can happen e.g. near the end of a file. A zero-length #GBytes is
  47057. returned on end of file (or if @count is zero), but never
  47058. otherwise.
  47059. If @cancellable is not %NULL, then the operation can be cancelled by
  47060. triggering the cancellable object from another thread. If the operation
  47061. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  47062. operation was partially finished when the operation was cancelled the
  47063. partial result will be returned, without an error.
  47064. On error %NULL is returned and @error is set accordingly.</doc>
  47065. <return-value transfer-ownership="full">
  47066. <doc xml:space="preserve">a new #GBytes, or %NULL on error</doc>
  47067. <type name="GLib.Bytes" c:type="GBytes*"/>
  47068. </return-value>
  47069. <parameters>
  47070. <instance-parameter name="stream" transfer-ownership="none">
  47071. <doc xml:space="preserve">a #GInputStream.</doc>
  47072. <type name="InputStream" c:type="GInputStream*"/>
  47073. </instance-parameter>
  47074. <parameter name="count" transfer-ownership="none">
  47075. <doc xml:space="preserve">maximum number of bytes that will be read from the stream. Common
  47076. values include 4096 and 8192.</doc>
  47077. <type name="gsize" c:type="gsize"/>
  47078. </parameter>
  47079. <parameter name="cancellable"
  47080. transfer-ownership="none"
  47081. nullable="1"
  47082. allow-none="1">
  47083. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47084. <type name="Cancellable" c:type="GCancellable*"/>
  47085. </parameter>
  47086. </parameters>
  47087. </method>
  47088. <method name="read_bytes_async"
  47089. c:identifier="g_input_stream_read_bytes_async"
  47090. version="2.34">
  47091. <doc xml:space="preserve">Request an asynchronous read of @count bytes from the stream into a
  47092. new #GBytes. When the operation is finished @callback will be
  47093. called. You can then call g_input_stream_read_bytes_finish() to get the
  47094. result of the operation.
  47095. During an async request no other sync and async calls are allowed
  47096. on @stream, and will result in %G_IO_ERROR_PENDING errors.
  47097. A value of @count larger than %G_MAXSSIZE will cause a
  47098. %G_IO_ERROR_INVALID_ARGUMENT error.
  47099. On success, the new #GBytes will be passed to the callback. It is
  47100. not an error if this is smaller than the requested size, as it can
  47101. happen e.g. near the end of a file, but generally we try to read as
  47102. many bytes as requested. Zero is returned on end of file (or if
  47103. @count is zero), but never otherwise.
  47104. Any outstanding I/O request with higher priority (lower numerical
  47105. value) will be executed before an outstanding request with lower
  47106. priority. Default priority is %G_PRIORITY_DEFAULT.</doc>
  47107. <return-value transfer-ownership="none">
  47108. <type name="none" c:type="void"/>
  47109. </return-value>
  47110. <parameters>
  47111. <instance-parameter name="stream" transfer-ownership="none">
  47112. <doc xml:space="preserve">A #GInputStream.</doc>
  47113. <type name="InputStream" c:type="GInputStream*"/>
  47114. </instance-parameter>
  47115. <parameter name="count" transfer-ownership="none">
  47116. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  47117. <type name="gsize" c:type="gsize"/>
  47118. </parameter>
  47119. <parameter name="io_priority" transfer-ownership="none">
  47120. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  47121. <type name="gint" c:type="int"/>
  47122. </parameter>
  47123. <parameter name="cancellable"
  47124. transfer-ownership="none"
  47125. nullable="1"
  47126. allow-none="1">
  47127. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47128. <type name="Cancellable" c:type="GCancellable*"/>
  47129. </parameter>
  47130. <parameter name="callback"
  47131. transfer-ownership="none"
  47132. nullable="1"
  47133. allow-none="1"
  47134. scope="async"
  47135. closure="4">
  47136. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  47137. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  47138. </parameter>
  47139. <parameter name="user_data"
  47140. transfer-ownership="none"
  47141. nullable="1"
  47142. allow-none="1">
  47143. <doc xml:space="preserve">the data to pass to callback function</doc>
  47144. <type name="gpointer" c:type="gpointer"/>
  47145. </parameter>
  47146. </parameters>
  47147. </method>
  47148. <method name="read_bytes_finish"
  47149. c:identifier="g_input_stream_read_bytes_finish"
  47150. version="2.34"
  47151. throws="1">
  47152. <doc xml:space="preserve">Finishes an asynchronous stream read-into-#GBytes operation.</doc>
  47153. <return-value transfer-ownership="full">
  47154. <doc xml:space="preserve">the newly-allocated #GBytes, or %NULL on error</doc>
  47155. <type name="GLib.Bytes" c:type="GBytes*"/>
  47156. </return-value>
  47157. <parameters>
  47158. <instance-parameter name="stream" transfer-ownership="none">
  47159. <doc xml:space="preserve">a #GInputStream.</doc>
  47160. <type name="InputStream" c:type="GInputStream*"/>
  47161. </instance-parameter>
  47162. <parameter name="result" transfer-ownership="none">
  47163. <doc xml:space="preserve">a #GAsyncResult.</doc>
  47164. <type name="AsyncResult" c:type="GAsyncResult*"/>
  47165. </parameter>
  47166. </parameters>
  47167. </method>
  47168. <method name="read_finish"
  47169. c:identifier="g_input_stream_read_finish"
  47170. throws="1">
  47171. <doc xml:space="preserve">Finishes an asynchronous stream read operation.</doc>
  47172. <return-value transfer-ownership="none">
  47173. <doc xml:space="preserve">number of bytes read in, or -1 on error, or 0 on end of file.</doc>
  47174. <type name="gssize" c:type="gssize"/>
  47175. </return-value>
  47176. <parameters>
  47177. <instance-parameter name="stream" transfer-ownership="none">
  47178. <doc xml:space="preserve">a #GInputStream.</doc>
  47179. <type name="InputStream" c:type="GInputStream*"/>
  47180. </instance-parameter>
  47181. <parameter name="result" transfer-ownership="none">
  47182. <doc xml:space="preserve">a #GAsyncResult.</doc>
  47183. <type name="AsyncResult" c:type="GAsyncResult*"/>
  47184. </parameter>
  47185. </parameters>
  47186. </method>
  47187. <method name="set_pending"
  47188. c:identifier="g_input_stream_set_pending"
  47189. throws="1">
  47190. <doc xml:space="preserve">Sets @stream to have actions pending. If the pending flag is
  47191. already set or @stream is closed, it will return %FALSE and set
  47192. @error.</doc>
  47193. <return-value transfer-ownership="none">
  47194. <doc xml:space="preserve">%TRUE if pending was previously unset and is now set.</doc>
  47195. <type name="gboolean" c:type="gboolean"/>
  47196. </return-value>
  47197. <parameters>
  47198. <instance-parameter name="stream" transfer-ownership="none">
  47199. <doc xml:space="preserve">input stream</doc>
  47200. <type name="InputStream" c:type="GInputStream*"/>
  47201. </instance-parameter>
  47202. </parameters>
  47203. </method>
  47204. <method name="skip" c:identifier="g_input_stream_skip" throws="1">
  47205. <doc xml:space="preserve">Tries to skip @count bytes from the stream. Will block during the operation.
  47206. This is identical to g_input_stream_read(), from a behaviour standpoint,
  47207. but the bytes that are skipped are not returned to the user. Some
  47208. streams have an implementation that is more efficient than reading the data.
  47209. This function is optional for inherited classes, as the default implementation
  47210. emulates it using read.
  47211. If @cancellable is not %NULL, then the operation can be cancelled by
  47212. triggering the cancellable object from another thread. If the operation
  47213. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  47214. operation was partially finished when the operation was cancelled the
  47215. partial result will be returned, without an error.</doc>
  47216. <return-value transfer-ownership="none">
  47217. <doc xml:space="preserve">Number of bytes skipped, or -1 on error</doc>
  47218. <type name="gssize" c:type="gssize"/>
  47219. </return-value>
  47220. <parameters>
  47221. <instance-parameter name="stream" transfer-ownership="none">
  47222. <doc xml:space="preserve">a #GInputStream.</doc>
  47223. <type name="InputStream" c:type="GInputStream*"/>
  47224. </instance-parameter>
  47225. <parameter name="count" transfer-ownership="none">
  47226. <doc xml:space="preserve">the number of bytes that will be skipped from the stream</doc>
  47227. <type name="gsize" c:type="gsize"/>
  47228. </parameter>
  47229. <parameter name="cancellable"
  47230. transfer-ownership="none"
  47231. nullable="1"
  47232. allow-none="1">
  47233. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47234. <type name="Cancellable" c:type="GCancellable*"/>
  47235. </parameter>
  47236. </parameters>
  47237. </method>
  47238. <method name="skip_async" c:identifier="g_input_stream_skip_async">
  47239. <doc xml:space="preserve">Request an asynchronous skip of @count bytes from the stream.
  47240. When the operation is finished @callback will be called.
  47241. You can then call g_input_stream_skip_finish() to get the result
  47242. of the operation.
  47243. During an async request no other sync and async calls are allowed,
  47244. and will result in %G_IO_ERROR_PENDING errors.
  47245. A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  47246. On success, the number of bytes skipped will be passed to the callback.
  47247. It is not an error if this is not the same as the requested size, as it
  47248. can happen e.g. near the end of a file, but generally we try to skip
  47249. as many bytes as requested. Zero is returned on end of file
  47250. (or if @count is zero), but never otherwise.
  47251. Any outstanding i/o request with higher priority (lower numerical value)
  47252. will be executed before an outstanding request with lower priority.
  47253. Default priority is %G_PRIORITY_DEFAULT.
  47254. The asynchronous methods have a default fallback that uses threads to
  47255. implement asynchronicity, so they are optional for inheriting classes.
  47256. However, if you override one, you must override all.</doc>
  47257. <return-value transfer-ownership="none">
  47258. <type name="none" c:type="void"/>
  47259. </return-value>
  47260. <parameters>
  47261. <instance-parameter name="stream" transfer-ownership="none">
  47262. <doc xml:space="preserve">A #GInputStream.</doc>
  47263. <type name="InputStream" c:type="GInputStream*"/>
  47264. </instance-parameter>
  47265. <parameter name="count" transfer-ownership="none">
  47266. <doc xml:space="preserve">the number of bytes that will be skipped from the stream</doc>
  47267. <type name="gsize" c:type="gsize"/>
  47268. </parameter>
  47269. <parameter name="io_priority" transfer-ownership="none">
  47270. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  47271. <type name="gint" c:type="int"/>
  47272. </parameter>
  47273. <parameter name="cancellable"
  47274. transfer-ownership="none"
  47275. nullable="1"
  47276. allow-none="1">
  47277. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47278. <type name="Cancellable" c:type="GCancellable*"/>
  47279. </parameter>
  47280. <parameter name="callback"
  47281. transfer-ownership="none"
  47282. nullable="1"
  47283. allow-none="1"
  47284. scope="async"
  47285. closure="4">
  47286. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  47287. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  47288. </parameter>
  47289. <parameter name="user_data"
  47290. transfer-ownership="none"
  47291. nullable="1"
  47292. allow-none="1">
  47293. <doc xml:space="preserve">the data to pass to callback function</doc>
  47294. <type name="gpointer" c:type="gpointer"/>
  47295. </parameter>
  47296. </parameters>
  47297. </method>
  47298. <method name="skip_finish"
  47299. c:identifier="g_input_stream_skip_finish"
  47300. throws="1">
  47301. <doc xml:space="preserve">Finishes a stream skip operation.</doc>
  47302. <return-value transfer-ownership="none">
  47303. <doc xml:space="preserve">the size of the bytes skipped, or %-1 on error.</doc>
  47304. <type name="gssize" c:type="gssize"/>
  47305. </return-value>
  47306. <parameters>
  47307. <instance-parameter name="stream" transfer-ownership="none">
  47308. <doc xml:space="preserve">a #GInputStream.</doc>
  47309. <type name="InputStream" c:type="GInputStream*"/>
  47310. </instance-parameter>
  47311. <parameter name="result" transfer-ownership="none">
  47312. <doc xml:space="preserve">a #GAsyncResult.</doc>
  47313. <type name="AsyncResult" c:type="GAsyncResult*"/>
  47314. </parameter>
  47315. </parameters>
  47316. </method>
  47317. <field name="parent_instance">
  47318. <type name="GObject.Object" c:type="GObject"/>
  47319. </field>
  47320. <field name="priv" readable="0" private="1">
  47321. <type name="InputStreamPrivate" c:type="GInputStreamPrivate*"/>
  47322. </field>
  47323. </class>
  47324. <record name="InputStreamClass"
  47325. c:type="GInputStreamClass"
  47326. glib:is-gtype-struct-for="InputStream">
  47327. <field name="parent_class">
  47328. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  47329. </field>
  47330. <field name="read_fn">
  47331. <callback name="read_fn" throws="1">
  47332. <return-value transfer-ownership="none">
  47333. <type name="gssize" c:type="gssize"/>
  47334. </return-value>
  47335. <parameters>
  47336. <parameter name="stream" transfer-ownership="none">
  47337. <type name="InputStream" c:type="GInputStream*"/>
  47338. </parameter>
  47339. <parameter name="buffer"
  47340. transfer-ownership="none"
  47341. nullable="1"
  47342. allow-none="1">
  47343. <type name="gpointer" c:type="void*"/>
  47344. </parameter>
  47345. <parameter name="count" transfer-ownership="none">
  47346. <type name="gsize" c:type="gsize"/>
  47347. </parameter>
  47348. <parameter name="cancellable"
  47349. transfer-ownership="none"
  47350. nullable="1"
  47351. allow-none="1">
  47352. <type name="Cancellable" c:type="GCancellable*"/>
  47353. </parameter>
  47354. </parameters>
  47355. </callback>
  47356. </field>
  47357. <field name="skip">
  47358. <callback name="skip" throws="1">
  47359. <return-value transfer-ownership="none">
  47360. <doc xml:space="preserve">Number of bytes skipped, or -1 on error</doc>
  47361. <type name="gssize" c:type="gssize"/>
  47362. </return-value>
  47363. <parameters>
  47364. <parameter name="stream" transfer-ownership="none">
  47365. <doc xml:space="preserve">a #GInputStream.</doc>
  47366. <type name="InputStream" c:type="GInputStream*"/>
  47367. </parameter>
  47368. <parameter name="count" transfer-ownership="none">
  47369. <doc xml:space="preserve">the number of bytes that will be skipped from the stream</doc>
  47370. <type name="gsize" c:type="gsize"/>
  47371. </parameter>
  47372. <parameter name="cancellable"
  47373. transfer-ownership="none"
  47374. nullable="1"
  47375. allow-none="1">
  47376. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47377. <type name="Cancellable" c:type="GCancellable*"/>
  47378. </parameter>
  47379. </parameters>
  47380. </callback>
  47381. </field>
  47382. <field name="close_fn">
  47383. <callback name="close_fn" throws="1">
  47384. <return-value transfer-ownership="none">
  47385. <type name="gboolean" c:type="gboolean"/>
  47386. </return-value>
  47387. <parameters>
  47388. <parameter name="stream" transfer-ownership="none">
  47389. <type name="InputStream" c:type="GInputStream*"/>
  47390. </parameter>
  47391. <parameter name="cancellable"
  47392. transfer-ownership="none"
  47393. nullable="1"
  47394. allow-none="1">
  47395. <type name="Cancellable" c:type="GCancellable*"/>
  47396. </parameter>
  47397. </parameters>
  47398. </callback>
  47399. </field>
  47400. <field name="read_async">
  47401. <callback name="read_async">
  47402. <return-value transfer-ownership="none">
  47403. <type name="none" c:type="void"/>
  47404. </return-value>
  47405. <parameters>
  47406. <parameter name="stream" transfer-ownership="none">
  47407. <doc xml:space="preserve">A #GInputStream.</doc>
  47408. <type name="InputStream" c:type="GInputStream*"/>
  47409. </parameter>
  47410. <parameter name="buffer"
  47411. transfer-ownership="none"
  47412. nullable="1"
  47413. allow-none="1">
  47414. <doc xml:space="preserve">a buffer to
  47415. read data into (which should be at least count bytes long).</doc>
  47416. <array length="2" zero-terminated="0" c:type="void*">
  47417. <type name="guint8"/>
  47418. </array>
  47419. </parameter>
  47420. <parameter name="count" transfer-ownership="none">
  47421. <doc xml:space="preserve">the number of bytes that will be read from the stream</doc>
  47422. <type name="gsize" c:type="gsize"/>
  47423. </parameter>
  47424. <parameter name="io_priority" transfer-ownership="none">
  47425. <doc xml:space="preserve">the [I/O priority][io-priority]
  47426. of the request.</doc>
  47427. <type name="gint" c:type="int"/>
  47428. </parameter>
  47429. <parameter name="cancellable"
  47430. transfer-ownership="none"
  47431. nullable="1"
  47432. allow-none="1">
  47433. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47434. <type name="Cancellable" c:type="GCancellable*"/>
  47435. </parameter>
  47436. <parameter name="callback"
  47437. transfer-ownership="none"
  47438. nullable="1"
  47439. allow-none="1"
  47440. scope="async"
  47441. closure="6">
  47442. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  47443. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  47444. </parameter>
  47445. <parameter name="user_data"
  47446. transfer-ownership="none"
  47447. nullable="1"
  47448. allow-none="1"
  47449. closure="6">
  47450. <doc xml:space="preserve">the data to pass to callback function</doc>
  47451. <type name="gpointer" c:type="gpointer"/>
  47452. </parameter>
  47453. </parameters>
  47454. </callback>
  47455. </field>
  47456. <field name="read_finish">
  47457. <callback name="read_finish" throws="1">
  47458. <return-value transfer-ownership="none">
  47459. <doc xml:space="preserve">number of bytes read in, or -1 on error, or 0 on end of file.</doc>
  47460. <type name="gssize" c:type="gssize"/>
  47461. </return-value>
  47462. <parameters>
  47463. <parameter name="stream" transfer-ownership="none">
  47464. <doc xml:space="preserve">a #GInputStream.</doc>
  47465. <type name="InputStream" c:type="GInputStream*"/>
  47466. </parameter>
  47467. <parameter name="result" transfer-ownership="none">
  47468. <doc xml:space="preserve">a #GAsyncResult.</doc>
  47469. <type name="AsyncResult" c:type="GAsyncResult*"/>
  47470. </parameter>
  47471. </parameters>
  47472. </callback>
  47473. </field>
  47474. <field name="skip_async">
  47475. <callback name="skip_async">
  47476. <return-value transfer-ownership="none">
  47477. <type name="none" c:type="void"/>
  47478. </return-value>
  47479. <parameters>
  47480. <parameter name="stream" transfer-ownership="none">
  47481. <doc xml:space="preserve">A #GInputStream.</doc>
  47482. <type name="InputStream" c:type="GInputStream*"/>
  47483. </parameter>
  47484. <parameter name="count" transfer-ownership="none">
  47485. <doc xml:space="preserve">the number of bytes that will be skipped from the stream</doc>
  47486. <type name="gsize" c:type="gsize"/>
  47487. </parameter>
  47488. <parameter name="io_priority" transfer-ownership="none">
  47489. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  47490. <type name="gint" c:type="int"/>
  47491. </parameter>
  47492. <parameter name="cancellable"
  47493. transfer-ownership="none"
  47494. nullable="1"
  47495. allow-none="1">
  47496. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  47497. <type name="Cancellable" c:type="GCancellable*"/>
  47498. </parameter>
  47499. <parameter name="callback"
  47500. transfer-ownership="none"
  47501. nullable="1"
  47502. allow-none="1"
  47503. scope="async"
  47504. closure="5">
  47505. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  47506. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  47507. </parameter>
  47508. <parameter name="user_data"
  47509. transfer-ownership="none"
  47510. nullable="1"
  47511. allow-none="1"
  47512. closure="5">
  47513. <doc xml:space="preserve">the data to pass to callback function</doc>
  47514. <type name="gpointer" c:type="gpointer"/>
  47515. </parameter>
  47516. </parameters>
  47517. </callback>
  47518. </field>
  47519. <field name="skip_finish">
  47520. <callback name="skip_finish" throws="1">
  47521. <return-value transfer-ownership="none">
  47522. <doc xml:space="preserve">the size of the bytes skipped, or %-1 on error.</doc>
  47523. <type name="gssize" c:type="gssize"/>
  47524. </return-value>
  47525. <parameters>
  47526. <parameter name="stream" transfer-ownership="none">
  47527. <doc xml:space="preserve">a #GInputStream.</doc>
  47528. <type name="InputStream" c:type="GInputStream*"/>
  47529. </parameter>
  47530. <parameter name="result" transfer-ownership="none">
  47531. <doc xml:space="preserve">a #GAsyncResult.</doc>
  47532. <type name="AsyncResult" c:type="GAsyncResult*"/>
  47533. </parameter>
  47534. </parameters>
  47535. </callback>
  47536. </field>
  47537. <field name="close_async">
  47538. <callback name="close_async">
  47539. <return-value transfer-ownership="none">
  47540. <type name="none" c:type="void"/>
  47541. </return-value>
  47542. <parameters>
  47543. <parameter name="stream" transfer-ownership="none">
  47544. <doc xml:space="preserve">A #GInputStream.</doc>
  47545. <type name="InputStream" c:type="GInputStream*"/>
  47546. </parameter>
  47547. <parameter name="io_priority" transfer-ownership="none">
  47548. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  47549. <type name="gint" c:type="int"/>
  47550. </parameter>
  47551. <parameter name="cancellable"
  47552. transfer-ownership="none"
  47553. nullable="1"
  47554. allow-none="1">
  47555. <doc xml:space="preserve">optional cancellable object</doc>
  47556. <type name="Cancellable" c:type="GCancellable*"/>
  47557. </parameter>
  47558. <parameter name="callback"
  47559. transfer-ownership="none"
  47560. nullable="1"
  47561. allow-none="1"
  47562. scope="async"
  47563. closure="4">
  47564. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  47565. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  47566. </parameter>
  47567. <parameter name="user_data"
  47568. transfer-ownership="none"
  47569. nullable="1"
  47570. allow-none="1"
  47571. closure="4">
  47572. <doc xml:space="preserve">the data to pass to callback function</doc>
  47573. <type name="gpointer" c:type="gpointer"/>
  47574. </parameter>
  47575. </parameters>
  47576. </callback>
  47577. </field>
  47578. <field name="close_finish">
  47579. <callback name="close_finish" throws="1">
  47580. <return-value transfer-ownership="none">
  47581. <doc xml:space="preserve">%TRUE if the stream was closed successfully.</doc>
  47582. <type name="gboolean" c:type="gboolean"/>
  47583. </return-value>
  47584. <parameters>
  47585. <parameter name="stream" transfer-ownership="none">
  47586. <doc xml:space="preserve">a #GInputStream.</doc>
  47587. <type name="InputStream" c:type="GInputStream*"/>
  47588. </parameter>
  47589. <parameter name="result" transfer-ownership="none">
  47590. <doc xml:space="preserve">a #GAsyncResult.</doc>
  47591. <type name="AsyncResult" c:type="GAsyncResult*"/>
  47592. </parameter>
  47593. </parameters>
  47594. </callback>
  47595. </field>
  47596. <field name="_g_reserved1" introspectable="0">
  47597. <callback name="_g_reserved1">
  47598. <return-value transfer-ownership="none">
  47599. <type name="none" c:type="void"/>
  47600. </return-value>
  47601. </callback>
  47602. </field>
  47603. <field name="_g_reserved2" introspectable="0">
  47604. <callback name="_g_reserved2">
  47605. <return-value transfer-ownership="none">
  47606. <type name="none" c:type="void"/>
  47607. </return-value>
  47608. </callback>
  47609. </field>
  47610. <field name="_g_reserved3" introspectable="0">
  47611. <callback name="_g_reserved3">
  47612. <return-value transfer-ownership="none">
  47613. <type name="none" c:type="void"/>
  47614. </return-value>
  47615. </callback>
  47616. </field>
  47617. <field name="_g_reserved4" introspectable="0">
  47618. <callback name="_g_reserved4">
  47619. <return-value transfer-ownership="none">
  47620. <type name="none" c:type="void"/>
  47621. </return-value>
  47622. </callback>
  47623. </field>
  47624. <field name="_g_reserved5" introspectable="0">
  47625. <callback name="_g_reserved5">
  47626. <return-value transfer-ownership="none">
  47627. <type name="none" c:type="void"/>
  47628. </return-value>
  47629. </callback>
  47630. </field>
  47631. </record>
  47632. <record name="InputStreamPrivate"
  47633. c:type="GInputStreamPrivate"
  47634. disguised="1">
  47635. </record>
  47636. <record name="InputVector" c:type="GInputVector" version="2.22">
  47637. <doc xml:space="preserve">Structure used for scatter/gather data input.
  47638. You generally pass in an array of #GInputVectors
  47639. and the operation will store the read data starting in the
  47640. first buffer, switching to the next as needed.</doc>
  47641. <field name="buffer" writable="1">
  47642. <doc xml:space="preserve">Pointer to a buffer where data will be written.</doc>
  47643. <type name="gpointer" c:type="gpointer"/>
  47644. </field>
  47645. <field name="size" writable="1">
  47646. <doc xml:space="preserve">the available size in @buffer.</doc>
  47647. <type name="gsize" c:type="gsize"/>
  47648. </field>
  47649. </record>
  47650. <interface name="ListModel"
  47651. c:symbol-prefix="list_model"
  47652. c:type="GListModel"
  47653. glib:type-name="GListModel"
  47654. glib:get-type="g_list_model_get_type"
  47655. glib:type-struct="ListModelInterface">
  47656. <doc xml:space="preserve">#GListModel is an interface that represents a mutable list of
  47657. #GObjects. Its main intention is as a model for various widgets in
  47658. user interfaces, such as list views, but it can also be used as a
  47659. convenient method of returning lists of data, with support for
  47660. updates.
  47661. Each object in the list may also report changes in itself via some
  47662. mechanism (normally the #GObject::notify signal). Taken together
  47663. with the #GListModel::items-changed signal, this provides for a list
  47664. that can change its membership, and in which the members can change
  47665. their individual properties.
  47666. A good example would be the list of visible wireless network access
  47667. points, where each access point can report dynamic properties such as
  47668. signal strength.
  47669. It is important to note that the #GListModel itself does not report
  47670. changes to the individual items. It only reports changes to the list
  47671. membership. If you want to observe changes to the objects themselves
  47672. then you need to connect signals to the objects that you are
  47673. interested in.
  47674. All items in a #GListModel are of (or derived from) the same type.
  47675. g_list_model_get_item_type() returns that type. The type may be an
  47676. interface, in which case all objects in the list must implement it.
  47677. The semantics are close to that of an array:
  47678. g_list_model_get_n_items() returns the number of items in the list and
  47679. g_list_model_get_item() returns an item at a (0-based) position. In
  47680. order to allow implementations to calculate the list length lazily,
  47681. you can also iterate over items: starting from 0, repeatedly call
  47682. g_list_model_get_item() until it returns %NULL.
  47683. An implementation may create objects lazily, but must take care to
  47684. return the same object for a given position until all references to
  47685. it are gone.
  47686. On the other side, a consumer is expected only to hold references on
  47687. objects that are currently "user visible", in order to faciliate the
  47688. maximum level of laziness in the implementation of the list and to
  47689. reduce the required number of signal connections at a given time.
  47690. This interface is intended only to be used from a single thread. The
  47691. thread in which it is appropriate to use it depends on the particular
  47692. implementation, but typically it will be from the thread that owns
  47693. the [thread-default main context][g-main-context-push-thread-default]
  47694. in effect at the time that the model was created.</doc>
  47695. <virtual-method name="get_item">
  47696. <return-value transfer-ownership="none" nullable="1">
  47697. <type name="gpointer" c:type="gpointer"/>
  47698. </return-value>
  47699. <parameters>
  47700. <instance-parameter name="list" transfer-ownership="none">
  47701. <type name="ListModel" c:type="GListModel*"/>
  47702. </instance-parameter>
  47703. <parameter name="position" transfer-ownership="none">
  47704. <type name="guint" c:type="guint"/>
  47705. </parameter>
  47706. </parameters>
  47707. </virtual-method>
  47708. <virtual-method name="get_item_type"
  47709. invoker="get_item_type"
  47710. version="2.44">
  47711. <doc xml:space="preserve">Gets the type of the items in @list. All items returned from
  47712. g_list_model_get_type() are of that type or a subtype, or are an
  47713. implementation of that interface.
  47714. The item type of a #GListModel can not change during the life of the
  47715. model.</doc>
  47716. <return-value transfer-ownership="none">
  47717. <doc xml:space="preserve">the #GType of the items contained in @list.</doc>
  47718. <type name="GType" c:type="GType"/>
  47719. </return-value>
  47720. <parameters>
  47721. <instance-parameter name="list" transfer-ownership="none">
  47722. <doc xml:space="preserve">a #GListModel</doc>
  47723. <type name="ListModel" c:type="GListModel*"/>
  47724. </instance-parameter>
  47725. </parameters>
  47726. </virtual-method>
  47727. <virtual-method name="get_n_items" invoker="get_n_items" version="2.44">
  47728. <doc xml:space="preserve">Gets the number of items in @list.
  47729. Depending on the model implementation, calling this function may be
  47730. less efficient than iterating the list with increasing values for
  47731. @position until g_list_model_get_item() returns %NULL.</doc>
  47732. <return-value transfer-ownership="none">
  47733. <doc xml:space="preserve">the number of items in @list.</doc>
  47734. <type name="guint" c:type="guint"/>
  47735. </return-value>
  47736. <parameters>
  47737. <instance-parameter name="list" transfer-ownership="none">
  47738. <doc xml:space="preserve">a #GListModel</doc>
  47739. <type name="ListModel" c:type="GListModel*"/>
  47740. </instance-parameter>
  47741. </parameters>
  47742. </virtual-method>
  47743. <method name="get_item"
  47744. c:identifier="g_list_model_get_item"
  47745. shadowed-by="get_object"
  47746. version="2.44"
  47747. introspectable="0">
  47748. <doc xml:space="preserve">Get the item at @position. If @position is greater than the number of
  47749. items in @list, %NULL is returned.
  47750. %NULL is never returned for an index that is smaller than the length
  47751. of the list. See g_list_model_get_n_items().</doc>
  47752. <return-value transfer-ownership="full" nullable="1">
  47753. <doc xml:space="preserve">the item at @position.</doc>
  47754. <type name="GObject.Object" c:type="gpointer"/>
  47755. </return-value>
  47756. <parameters>
  47757. <instance-parameter name="list" transfer-ownership="none">
  47758. <doc xml:space="preserve">a #GListModel</doc>
  47759. <type name="ListModel" c:type="GListModel*"/>
  47760. </instance-parameter>
  47761. <parameter name="position" transfer-ownership="none">
  47762. <doc xml:space="preserve">the position of the item to fetch</doc>
  47763. <type name="guint" c:type="guint"/>
  47764. </parameter>
  47765. </parameters>
  47766. </method>
  47767. <method name="get_item_type"
  47768. c:identifier="g_list_model_get_item_type"
  47769. version="2.44">
  47770. <doc xml:space="preserve">Gets the type of the items in @list. All items returned from
  47771. g_list_model_get_type() are of that type or a subtype, or are an
  47772. implementation of that interface.
  47773. The item type of a #GListModel can not change during the life of the
  47774. model.</doc>
  47775. <return-value transfer-ownership="none">
  47776. <doc xml:space="preserve">the #GType of the items contained in @list.</doc>
  47777. <type name="GType" c:type="GType"/>
  47778. </return-value>
  47779. <parameters>
  47780. <instance-parameter name="list" transfer-ownership="none">
  47781. <doc xml:space="preserve">a #GListModel</doc>
  47782. <type name="ListModel" c:type="GListModel*"/>
  47783. </instance-parameter>
  47784. </parameters>
  47785. </method>
  47786. <method name="get_n_items"
  47787. c:identifier="g_list_model_get_n_items"
  47788. version="2.44">
  47789. <doc xml:space="preserve">Gets the number of items in @list.
  47790. Depending on the model implementation, calling this function may be
  47791. less efficient than iterating the list with increasing values for
  47792. @position until g_list_model_get_item() returns %NULL.</doc>
  47793. <return-value transfer-ownership="none">
  47794. <doc xml:space="preserve">the number of items in @list.</doc>
  47795. <type name="guint" c:type="guint"/>
  47796. </return-value>
  47797. <parameters>
  47798. <instance-parameter name="list" transfer-ownership="none">
  47799. <doc xml:space="preserve">a #GListModel</doc>
  47800. <type name="ListModel" c:type="GListModel*"/>
  47801. </instance-parameter>
  47802. </parameters>
  47803. </method>
  47804. <method name="get_object"
  47805. c:identifier="g_list_model_get_object"
  47806. shadows="get_item"
  47807. version="2.44">
  47808. <doc xml:space="preserve">Get the item at @position. If @position is greater than the number of
  47809. items in @list, %NULL is returned.
  47810. %NULL is never returned for an index that is smaller than the length
  47811. of the list. See g_list_model_get_n_items().</doc>
  47812. <return-value transfer-ownership="full" nullable="1">
  47813. <doc xml:space="preserve">the object at @position.</doc>
  47814. <type name="GObject.Object" c:type="GObject*"/>
  47815. </return-value>
  47816. <parameters>
  47817. <instance-parameter name="list" transfer-ownership="none">
  47818. <doc xml:space="preserve">a #GListModel</doc>
  47819. <type name="ListModel" c:type="GListModel*"/>
  47820. </instance-parameter>
  47821. <parameter name="position" transfer-ownership="none">
  47822. <doc xml:space="preserve">the position of the item to fetch</doc>
  47823. <type name="guint" c:type="guint"/>
  47824. </parameter>
  47825. </parameters>
  47826. </method>
  47827. <method name="items_changed"
  47828. c:identifier="g_list_model_items_changed"
  47829. version="2.44">
  47830. <doc xml:space="preserve">Emits the #GListModel::items-changed signal on @list.
  47831. This function should only be called by classes implementing
  47832. #GListModel. It has to be called after the internal representation
  47833. of @list has been updated, because handlers connected to this signal
  47834. might query the new state of the list.
  47835. Implementations must only make changes to the model (as visible to
  47836. its consumer) in places that will not cause problems for that
  47837. consumer. For models that are driven directly by a write API (such
  47838. as #GListStore), changes can be reported in response to uses of that
  47839. API. For models that represent remote data, changes should only be
  47840. made from a fresh mainloop dispatch. It is particularly not
  47841. permitted to make changes in response to a call to the #GListModel
  47842. consumer API.
  47843. Stated another way: in general, it is assumed that code making a
  47844. series of accesses to the model via the API, without returning to the
  47845. mainloop, and without calling other code, will continue to view the
  47846. same contents of the model.</doc>
  47847. <return-value transfer-ownership="none">
  47848. <type name="none" c:type="void"/>
  47849. </return-value>
  47850. <parameters>
  47851. <instance-parameter name="list" transfer-ownership="none">
  47852. <doc xml:space="preserve">a #GListModel</doc>
  47853. <type name="ListModel" c:type="GListModel*"/>
  47854. </instance-parameter>
  47855. <parameter name="position" transfer-ownership="none">
  47856. <doc xml:space="preserve">the position at which @list changed</doc>
  47857. <type name="guint" c:type="guint"/>
  47858. </parameter>
  47859. <parameter name="removed" transfer-ownership="none">
  47860. <doc xml:space="preserve">the number of items removed</doc>
  47861. <type name="guint" c:type="guint"/>
  47862. </parameter>
  47863. <parameter name="added" transfer-ownership="none">
  47864. <doc xml:space="preserve">the number of items added</doc>
  47865. <type name="guint" c:type="guint"/>
  47866. </parameter>
  47867. </parameters>
  47868. </method>
  47869. <glib:signal name="items-changed" when="last" version="2.44">
  47870. <doc xml:space="preserve">This signal is emitted whenever items were added or removed to
  47871. @list. At @position, @removed items were removed and @added items
  47872. were added in their place.</doc>
  47873. <return-value transfer-ownership="none">
  47874. <type name="none" c:type="void"/>
  47875. </return-value>
  47876. <parameters>
  47877. <parameter name="position" transfer-ownership="none">
  47878. <doc xml:space="preserve">the position at which @list changed</doc>
  47879. <type name="guint" c:type="guint"/>
  47880. </parameter>
  47881. <parameter name="removed" transfer-ownership="none">
  47882. <doc xml:space="preserve">the number of items removed</doc>
  47883. <type name="guint" c:type="guint"/>
  47884. </parameter>
  47885. <parameter name="added" transfer-ownership="none">
  47886. <doc xml:space="preserve">the number of items added</doc>
  47887. <type name="guint" c:type="guint"/>
  47888. </parameter>
  47889. </parameters>
  47890. </glib:signal>
  47891. </interface>
  47892. <record name="ListModelInterface"
  47893. c:type="GListModelInterface"
  47894. glib:is-gtype-struct-for="ListModel"
  47895. version="2.44">
  47896. <doc xml:space="preserve">The virtual function table for #GListModel.</doc>
  47897. <field name="g_iface">
  47898. <doc xml:space="preserve">parent #GTypeInterface</doc>
  47899. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  47900. </field>
  47901. <field name="get_item_type">
  47902. <callback name="get_item_type">
  47903. <return-value transfer-ownership="none">
  47904. <doc xml:space="preserve">the #GType of the items contained in @list.</doc>
  47905. <type name="GType" c:type="GType"/>
  47906. </return-value>
  47907. <parameters>
  47908. <parameter name="list" transfer-ownership="none">
  47909. <doc xml:space="preserve">a #GListModel</doc>
  47910. <type name="ListModel" c:type="GListModel*"/>
  47911. </parameter>
  47912. </parameters>
  47913. </callback>
  47914. </field>
  47915. <field name="get_n_items">
  47916. <callback name="get_n_items">
  47917. <return-value transfer-ownership="none">
  47918. <doc xml:space="preserve">the number of items in @list.</doc>
  47919. <type name="guint" c:type="guint"/>
  47920. </return-value>
  47921. <parameters>
  47922. <parameter name="list" transfer-ownership="none">
  47923. <doc xml:space="preserve">a #GListModel</doc>
  47924. <type name="ListModel" c:type="GListModel*"/>
  47925. </parameter>
  47926. </parameters>
  47927. </callback>
  47928. </field>
  47929. <field name="get_item">
  47930. <callback name="get_item">
  47931. <return-value transfer-ownership="none" nullable="1">
  47932. <type name="gpointer" c:type="gpointer"/>
  47933. </return-value>
  47934. <parameters>
  47935. <parameter name="list" transfer-ownership="none">
  47936. <type name="ListModel" c:type="GListModel*"/>
  47937. </parameter>
  47938. <parameter name="position" transfer-ownership="none">
  47939. <type name="guint" c:type="guint"/>
  47940. </parameter>
  47941. </parameters>
  47942. </callback>
  47943. </field>
  47944. </record>
  47945. <class name="ListStore"
  47946. c:symbol-prefix="list_store"
  47947. c:type="GListStore"
  47948. parent="GObject.Object"
  47949. glib:type-name="GListStore"
  47950. glib:get-type="g_list_store_get_type"
  47951. glib:type-struct="ListStoreClass">
  47952. <doc xml:space="preserve">#GListStore is a simple implementation of #GListModel that stores all
  47953. items in memory.
  47954. It provides insertions, deletions, and lookups in logarithmic time
  47955. with a fast path for the common case of iterating the list linearly.</doc>
  47956. <implements name="ListModel"/>
  47957. <constructor name="new" c:identifier="g_list_store_new" version="2.44">
  47958. <doc xml:space="preserve">Creates a new #GListStore with items of type @item_type. @item_type
  47959. must be a subclass of #GObject.</doc>
  47960. <return-value transfer-ownership="full">
  47961. <doc xml:space="preserve">a new #GListStore</doc>
  47962. <type name="ListStore" c:type="GListStore*"/>
  47963. </return-value>
  47964. <parameters>
  47965. <parameter name="item_type" transfer-ownership="none">
  47966. <doc xml:space="preserve">the #GType of items in the list</doc>
  47967. <type name="GType" c:type="GType"/>
  47968. </parameter>
  47969. </parameters>
  47970. </constructor>
  47971. <method name="append" c:identifier="g_list_store_append" version="2.44">
  47972. <doc xml:space="preserve">Appends @item to @store. @item must be of type #GListStore:item-type.
  47973. This function takes a ref on @item.
  47974. Use g_list_store_splice() to append multiple items at the same time
  47975. efficiently.</doc>
  47976. <return-value transfer-ownership="none">
  47977. <type name="none" c:type="void"/>
  47978. </return-value>
  47979. <parameters>
  47980. <instance-parameter name="store" transfer-ownership="none">
  47981. <doc xml:space="preserve">a #GListStore</doc>
  47982. <type name="ListStore" c:type="GListStore*"/>
  47983. </instance-parameter>
  47984. <parameter name="item" transfer-ownership="none">
  47985. <doc xml:space="preserve">the new item</doc>
  47986. <type name="GObject.Object" c:type="gpointer"/>
  47987. </parameter>
  47988. </parameters>
  47989. </method>
  47990. <method name="insert" c:identifier="g_list_store_insert" version="2.44">
  47991. <doc xml:space="preserve">Inserts @item into @store at @position. @item must be of type
  47992. #GListStore:item-type or derived from it. @position must be smaller
  47993. than the length of the list, or equal to it to append.
  47994. This function takes a ref on @item.
  47995. Use g_list_store_splice() to insert multiple items at the same time
  47996. efficiently.</doc>
  47997. <return-value transfer-ownership="none">
  47998. <type name="none" c:type="void"/>
  47999. </return-value>
  48000. <parameters>
  48001. <instance-parameter name="store" transfer-ownership="none">
  48002. <doc xml:space="preserve">a #GListStore</doc>
  48003. <type name="ListStore" c:type="GListStore*"/>
  48004. </instance-parameter>
  48005. <parameter name="position" transfer-ownership="none">
  48006. <doc xml:space="preserve">the position at which to insert the new item</doc>
  48007. <type name="guint" c:type="guint"/>
  48008. </parameter>
  48009. <parameter name="item" transfer-ownership="none">
  48010. <doc xml:space="preserve">the new item</doc>
  48011. <type name="GObject.Object" c:type="gpointer"/>
  48012. </parameter>
  48013. </parameters>
  48014. </method>
  48015. <method name="insert_sorted"
  48016. c:identifier="g_list_store_insert_sorted"
  48017. version="2.44">
  48018. <doc xml:space="preserve">Inserts @item into @store at a position to be determined by the
  48019. @compare_func.
  48020. The list must already be sorted before calling this function or the
  48021. result is undefined. Usually you would approach this by only ever
  48022. inserting items by way of this function.
  48023. This function takes a ref on @item.</doc>
  48024. <return-value transfer-ownership="none">
  48025. <doc xml:space="preserve">the position at which @item was inserted</doc>
  48026. <type name="guint" c:type="guint"/>
  48027. </return-value>
  48028. <parameters>
  48029. <instance-parameter name="store" transfer-ownership="none">
  48030. <doc xml:space="preserve">a #GListStore</doc>
  48031. <type name="ListStore" c:type="GListStore*"/>
  48032. </instance-parameter>
  48033. <parameter name="item" transfer-ownership="none">
  48034. <doc xml:space="preserve">the new item</doc>
  48035. <type name="GObject.Object" c:type="gpointer"/>
  48036. </parameter>
  48037. <parameter name="compare_func"
  48038. transfer-ownership="none"
  48039. scope="call"
  48040. closure="2">
  48041. <doc xml:space="preserve">pairwise comparison function for sorting</doc>
  48042. <type name="GLib.CompareDataFunc" c:type="GCompareDataFunc"/>
  48043. </parameter>
  48044. <parameter name="user_data"
  48045. transfer-ownership="none"
  48046. nullable="1"
  48047. allow-none="1">
  48048. <doc xml:space="preserve">user data for @compare_func</doc>
  48049. <type name="gpointer" c:type="gpointer"/>
  48050. </parameter>
  48051. </parameters>
  48052. </method>
  48053. <method name="remove" c:identifier="g_list_store_remove" version="2.44">
  48054. <doc xml:space="preserve">Removes the item from @store that is at @position. @position must be
  48055. smaller than the current length of the list.
  48056. Use g_list_store_splice() to remove multiple items at the same time
  48057. efficiently.</doc>
  48058. <return-value transfer-ownership="none">
  48059. <type name="none" c:type="void"/>
  48060. </return-value>
  48061. <parameters>
  48062. <instance-parameter name="store" transfer-ownership="none">
  48063. <doc xml:space="preserve">a #GListStore</doc>
  48064. <type name="ListStore" c:type="GListStore*"/>
  48065. </instance-parameter>
  48066. <parameter name="position" transfer-ownership="none">
  48067. <doc xml:space="preserve">the position of the item that is to be removed</doc>
  48068. <type name="guint" c:type="guint"/>
  48069. </parameter>
  48070. </parameters>
  48071. </method>
  48072. <method name="remove_all"
  48073. c:identifier="g_list_store_remove_all"
  48074. version="2.44">
  48075. <doc xml:space="preserve">Removes all items from @store.</doc>
  48076. <return-value transfer-ownership="none">
  48077. <type name="none" c:type="void"/>
  48078. </return-value>
  48079. <parameters>
  48080. <instance-parameter name="store" transfer-ownership="none">
  48081. <doc xml:space="preserve">a #GListStore</doc>
  48082. <type name="ListStore" c:type="GListStore*"/>
  48083. </instance-parameter>
  48084. </parameters>
  48085. </method>
  48086. <method name="sort" c:identifier="g_list_store_sort" version="2.46">
  48087. <doc xml:space="preserve">Sort the items in @store according to @compare_func.</doc>
  48088. <return-value transfer-ownership="none">
  48089. <type name="none" c:type="void"/>
  48090. </return-value>
  48091. <parameters>
  48092. <instance-parameter name="store" transfer-ownership="none">
  48093. <doc xml:space="preserve">a #GListStore</doc>
  48094. <type name="ListStore" c:type="GListStore*"/>
  48095. </instance-parameter>
  48096. <parameter name="compare_func"
  48097. transfer-ownership="none"
  48098. scope="call"
  48099. closure="1">
  48100. <doc xml:space="preserve">pairwise comparison function for sorting</doc>
  48101. <type name="GLib.CompareDataFunc" c:type="GCompareDataFunc"/>
  48102. </parameter>
  48103. <parameter name="user_data"
  48104. transfer-ownership="none"
  48105. nullable="1"
  48106. allow-none="1">
  48107. <doc xml:space="preserve">user data for @compare_func</doc>
  48108. <type name="gpointer" c:type="gpointer"/>
  48109. </parameter>
  48110. </parameters>
  48111. </method>
  48112. <method name="splice" c:identifier="g_list_store_splice" version="2.44">
  48113. <doc xml:space="preserve">Changes @store by removing @n_removals items and adding @n_additions
  48114. items to it. @additions must contain @n_additions items of type
  48115. #GListStore:item-type. %NULL is not permitted.
  48116. This function is more efficient than g_list_store_insert() and
  48117. g_list_store_remove(), because it only emits
  48118. #GListModel::items-changed once for the change.
  48119. This function takes a ref on each item in @additions.
  48120. The parameters @position and @n_removals must be correct (ie:
  48121. @position + @n_removals must be less than or equal to the length of
  48122. the list at the time this function is called).</doc>
  48123. <return-value transfer-ownership="none">
  48124. <type name="none" c:type="void"/>
  48125. </return-value>
  48126. <parameters>
  48127. <instance-parameter name="store" transfer-ownership="none">
  48128. <doc xml:space="preserve">a #GListStore</doc>
  48129. <type name="ListStore" c:type="GListStore*"/>
  48130. </instance-parameter>
  48131. <parameter name="position" transfer-ownership="none">
  48132. <doc xml:space="preserve">the position at which to make the change</doc>
  48133. <type name="guint" c:type="guint"/>
  48134. </parameter>
  48135. <parameter name="n_removals" transfer-ownership="none">
  48136. <doc xml:space="preserve">the number of items to remove</doc>
  48137. <type name="guint" c:type="guint"/>
  48138. </parameter>
  48139. <parameter name="additions" transfer-ownership="none">
  48140. <doc xml:space="preserve">the items to add</doc>
  48141. <array length="3" zero-terminated="0" c:type="gpointer*">
  48142. <type name="GObject.Object"/>
  48143. </array>
  48144. </parameter>
  48145. <parameter name="n_additions" transfer-ownership="none">
  48146. <doc xml:space="preserve">the number of items to add</doc>
  48147. <type name="guint" c:type="guint"/>
  48148. </parameter>
  48149. </parameters>
  48150. </method>
  48151. <property name="item-type"
  48152. version="2.44"
  48153. writable="1"
  48154. construct-only="1"
  48155. transfer-ownership="none">
  48156. <doc xml:space="preserve">The type of items contained in this list store. Items must be
  48157. subclasses of #GObject.</doc>
  48158. <type name="GType" c:type="GType"/>
  48159. </property>
  48160. </class>
  48161. <record name="ListStoreClass"
  48162. c:type="GListStoreClass"
  48163. glib:is-gtype-struct-for="ListStore">
  48164. <field name="parent_class">
  48165. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  48166. </field>
  48167. </record>
  48168. <interface name="LoadableIcon"
  48169. c:symbol-prefix="loadable_icon"
  48170. c:type="GLoadableIcon"
  48171. glib:type-name="GLoadableIcon"
  48172. glib:get-type="g_loadable_icon_get_type"
  48173. glib:type-struct="LoadableIconIface">
  48174. <doc xml:space="preserve">Extends the #GIcon interface and adds the ability to
  48175. load icons from streams.</doc>
  48176. <prerequisite name="Icon"/>
  48177. <virtual-method name="load" invoker="load" throws="1">
  48178. <doc xml:space="preserve">Loads a loadable icon. For the asynchronous version of this function,
  48179. see g_loadable_icon_load_async().</doc>
  48180. <return-value transfer-ownership="full">
  48181. <doc xml:space="preserve">a #GInputStream to read the icon from.</doc>
  48182. <type name="InputStream" c:type="GInputStream*"/>
  48183. </return-value>
  48184. <parameters>
  48185. <instance-parameter name="icon" transfer-ownership="none">
  48186. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48187. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48188. </instance-parameter>
  48189. <parameter name="size" transfer-ownership="none">
  48190. <doc xml:space="preserve">an integer.</doc>
  48191. <type name="gint" c:type="int"/>
  48192. </parameter>
  48193. <parameter name="type"
  48194. direction="out"
  48195. caller-allocates="0"
  48196. transfer-ownership="full"
  48197. optional="1"
  48198. allow-none="1">
  48199. <doc xml:space="preserve">a location to store the type of the loaded
  48200. icon, %NULL to ignore.</doc>
  48201. <type name="utf8" c:type="char**"/>
  48202. </parameter>
  48203. <parameter name="cancellable"
  48204. transfer-ownership="none"
  48205. nullable="1"
  48206. allow-none="1">
  48207. <doc xml:space="preserve">optional #GCancellable object, %NULL to
  48208. ignore.</doc>
  48209. <type name="Cancellable" c:type="GCancellable*"/>
  48210. </parameter>
  48211. </parameters>
  48212. </virtual-method>
  48213. <virtual-method name="load_async" invoker="load_async">
  48214. <doc xml:space="preserve">Loads an icon asynchronously. To finish this function, see
  48215. g_loadable_icon_load_finish(). For the synchronous, blocking
  48216. version of this function, see g_loadable_icon_load().</doc>
  48217. <return-value transfer-ownership="none">
  48218. <type name="none" c:type="void"/>
  48219. </return-value>
  48220. <parameters>
  48221. <instance-parameter name="icon" transfer-ownership="none">
  48222. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48223. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48224. </instance-parameter>
  48225. <parameter name="size" transfer-ownership="none">
  48226. <doc xml:space="preserve">an integer.</doc>
  48227. <type name="gint" c:type="int"/>
  48228. </parameter>
  48229. <parameter name="cancellable"
  48230. transfer-ownership="none"
  48231. nullable="1"
  48232. allow-none="1">
  48233. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  48234. <type name="Cancellable" c:type="GCancellable*"/>
  48235. </parameter>
  48236. <parameter name="callback"
  48237. transfer-ownership="none"
  48238. nullable="1"
  48239. allow-none="1"
  48240. scope="async"
  48241. closure="3">
  48242. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  48243. request is satisfied</doc>
  48244. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  48245. </parameter>
  48246. <parameter name="user_data"
  48247. transfer-ownership="none"
  48248. nullable="1"
  48249. allow-none="1"
  48250. closure="3">
  48251. <doc xml:space="preserve">the data to pass to callback function</doc>
  48252. <type name="gpointer" c:type="gpointer"/>
  48253. </parameter>
  48254. </parameters>
  48255. </virtual-method>
  48256. <virtual-method name="load_finish" invoker="load_finish" throws="1">
  48257. <doc xml:space="preserve">Finishes an asynchronous icon load started in g_loadable_icon_load_async().</doc>
  48258. <return-value transfer-ownership="full">
  48259. <doc xml:space="preserve">a #GInputStream to read the icon from.</doc>
  48260. <type name="InputStream" c:type="GInputStream*"/>
  48261. </return-value>
  48262. <parameters>
  48263. <instance-parameter name="icon" transfer-ownership="none">
  48264. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48265. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48266. </instance-parameter>
  48267. <parameter name="res" transfer-ownership="none">
  48268. <doc xml:space="preserve">a #GAsyncResult.</doc>
  48269. <type name="AsyncResult" c:type="GAsyncResult*"/>
  48270. </parameter>
  48271. <parameter name="type"
  48272. direction="out"
  48273. caller-allocates="0"
  48274. transfer-ownership="full"
  48275. optional="1"
  48276. allow-none="1">
  48277. <doc xml:space="preserve">a location to store the type of the loaded
  48278. icon, %NULL to ignore.</doc>
  48279. <type name="utf8" c:type="char**"/>
  48280. </parameter>
  48281. </parameters>
  48282. </virtual-method>
  48283. <method name="load" c:identifier="g_loadable_icon_load" throws="1">
  48284. <doc xml:space="preserve">Loads a loadable icon. For the asynchronous version of this function,
  48285. see g_loadable_icon_load_async().</doc>
  48286. <return-value transfer-ownership="full">
  48287. <doc xml:space="preserve">a #GInputStream to read the icon from.</doc>
  48288. <type name="InputStream" c:type="GInputStream*"/>
  48289. </return-value>
  48290. <parameters>
  48291. <instance-parameter name="icon" transfer-ownership="none">
  48292. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48293. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48294. </instance-parameter>
  48295. <parameter name="size" transfer-ownership="none">
  48296. <doc xml:space="preserve">an integer.</doc>
  48297. <type name="gint" c:type="int"/>
  48298. </parameter>
  48299. <parameter name="type"
  48300. direction="out"
  48301. caller-allocates="0"
  48302. transfer-ownership="full"
  48303. optional="1"
  48304. allow-none="1">
  48305. <doc xml:space="preserve">a location to store the type of the loaded
  48306. icon, %NULL to ignore.</doc>
  48307. <type name="utf8" c:type="char**"/>
  48308. </parameter>
  48309. <parameter name="cancellable"
  48310. transfer-ownership="none"
  48311. nullable="1"
  48312. allow-none="1">
  48313. <doc xml:space="preserve">optional #GCancellable object, %NULL to
  48314. ignore.</doc>
  48315. <type name="Cancellable" c:type="GCancellable*"/>
  48316. </parameter>
  48317. </parameters>
  48318. </method>
  48319. <method name="load_async" c:identifier="g_loadable_icon_load_async">
  48320. <doc xml:space="preserve">Loads an icon asynchronously. To finish this function, see
  48321. g_loadable_icon_load_finish(). For the synchronous, blocking
  48322. version of this function, see g_loadable_icon_load().</doc>
  48323. <return-value transfer-ownership="none">
  48324. <type name="none" c:type="void"/>
  48325. </return-value>
  48326. <parameters>
  48327. <instance-parameter name="icon" transfer-ownership="none">
  48328. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48329. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48330. </instance-parameter>
  48331. <parameter name="size" transfer-ownership="none">
  48332. <doc xml:space="preserve">an integer.</doc>
  48333. <type name="gint" c:type="int"/>
  48334. </parameter>
  48335. <parameter name="cancellable"
  48336. transfer-ownership="none"
  48337. nullable="1"
  48338. allow-none="1">
  48339. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  48340. <type name="Cancellable" c:type="GCancellable*"/>
  48341. </parameter>
  48342. <parameter name="callback"
  48343. transfer-ownership="none"
  48344. nullable="1"
  48345. allow-none="1"
  48346. scope="async"
  48347. closure="3">
  48348. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  48349. request is satisfied</doc>
  48350. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  48351. </parameter>
  48352. <parameter name="user_data"
  48353. transfer-ownership="none"
  48354. nullable="1"
  48355. allow-none="1">
  48356. <doc xml:space="preserve">the data to pass to callback function</doc>
  48357. <type name="gpointer" c:type="gpointer"/>
  48358. </parameter>
  48359. </parameters>
  48360. </method>
  48361. <method name="load_finish"
  48362. c:identifier="g_loadable_icon_load_finish"
  48363. throws="1">
  48364. <doc xml:space="preserve">Finishes an asynchronous icon load started in g_loadable_icon_load_async().</doc>
  48365. <return-value transfer-ownership="full">
  48366. <doc xml:space="preserve">a #GInputStream to read the icon from.</doc>
  48367. <type name="InputStream" c:type="GInputStream*"/>
  48368. </return-value>
  48369. <parameters>
  48370. <instance-parameter name="icon" transfer-ownership="none">
  48371. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48372. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48373. </instance-parameter>
  48374. <parameter name="res" transfer-ownership="none">
  48375. <doc xml:space="preserve">a #GAsyncResult.</doc>
  48376. <type name="AsyncResult" c:type="GAsyncResult*"/>
  48377. </parameter>
  48378. <parameter name="type"
  48379. direction="out"
  48380. caller-allocates="0"
  48381. transfer-ownership="full"
  48382. optional="1"
  48383. allow-none="1">
  48384. <doc xml:space="preserve">a location to store the type of the loaded
  48385. icon, %NULL to ignore.</doc>
  48386. <type name="utf8" c:type="char**"/>
  48387. </parameter>
  48388. </parameters>
  48389. </method>
  48390. </interface>
  48391. <record name="LoadableIconIface"
  48392. c:type="GLoadableIconIface"
  48393. glib:is-gtype-struct-for="LoadableIcon">
  48394. <doc xml:space="preserve">Interface for icons that can be loaded as a stream.</doc>
  48395. <field name="g_iface">
  48396. <doc xml:space="preserve">The parent interface.</doc>
  48397. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  48398. </field>
  48399. <field name="load">
  48400. <callback name="load" throws="1">
  48401. <return-value transfer-ownership="full">
  48402. <doc xml:space="preserve">a #GInputStream to read the icon from.</doc>
  48403. <type name="InputStream" c:type="GInputStream*"/>
  48404. </return-value>
  48405. <parameters>
  48406. <parameter name="icon" transfer-ownership="none">
  48407. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48408. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48409. </parameter>
  48410. <parameter name="size" transfer-ownership="none">
  48411. <doc xml:space="preserve">an integer.</doc>
  48412. <type name="gint" c:type="int"/>
  48413. </parameter>
  48414. <parameter name="type"
  48415. direction="out"
  48416. caller-allocates="0"
  48417. transfer-ownership="full"
  48418. optional="1"
  48419. allow-none="1">
  48420. <doc xml:space="preserve">a location to store the type of the loaded
  48421. icon, %NULL to ignore.</doc>
  48422. <type name="utf8" c:type="char**"/>
  48423. </parameter>
  48424. <parameter name="cancellable"
  48425. transfer-ownership="none"
  48426. nullable="1"
  48427. allow-none="1">
  48428. <doc xml:space="preserve">optional #GCancellable object, %NULL to
  48429. ignore.</doc>
  48430. <type name="Cancellable" c:type="GCancellable*"/>
  48431. </parameter>
  48432. </parameters>
  48433. </callback>
  48434. </field>
  48435. <field name="load_async">
  48436. <callback name="load_async">
  48437. <return-value transfer-ownership="none">
  48438. <type name="none" c:type="void"/>
  48439. </return-value>
  48440. <parameters>
  48441. <parameter name="icon" transfer-ownership="none">
  48442. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48443. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48444. </parameter>
  48445. <parameter name="size" transfer-ownership="none">
  48446. <doc xml:space="preserve">an integer.</doc>
  48447. <type name="gint" c:type="int"/>
  48448. </parameter>
  48449. <parameter name="cancellable"
  48450. transfer-ownership="none"
  48451. nullable="1"
  48452. allow-none="1">
  48453. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  48454. <type name="Cancellable" c:type="GCancellable*"/>
  48455. </parameter>
  48456. <parameter name="callback"
  48457. transfer-ownership="none"
  48458. nullable="1"
  48459. allow-none="1"
  48460. scope="async"
  48461. closure="4">
  48462. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  48463. request is satisfied</doc>
  48464. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  48465. </parameter>
  48466. <parameter name="user_data"
  48467. transfer-ownership="none"
  48468. nullable="1"
  48469. allow-none="1"
  48470. closure="4">
  48471. <doc xml:space="preserve">the data to pass to callback function</doc>
  48472. <type name="gpointer" c:type="gpointer"/>
  48473. </parameter>
  48474. </parameters>
  48475. </callback>
  48476. </field>
  48477. <field name="load_finish">
  48478. <callback name="load_finish" throws="1">
  48479. <return-value transfer-ownership="full">
  48480. <doc xml:space="preserve">a #GInputStream to read the icon from.</doc>
  48481. <type name="InputStream" c:type="GInputStream*"/>
  48482. </return-value>
  48483. <parameters>
  48484. <parameter name="icon" transfer-ownership="none">
  48485. <doc xml:space="preserve">a #GLoadableIcon.</doc>
  48486. <type name="LoadableIcon" c:type="GLoadableIcon*"/>
  48487. </parameter>
  48488. <parameter name="res" transfer-ownership="none">
  48489. <doc xml:space="preserve">a #GAsyncResult.</doc>
  48490. <type name="AsyncResult" c:type="GAsyncResult*"/>
  48491. </parameter>
  48492. <parameter name="type"
  48493. direction="out"
  48494. caller-allocates="0"
  48495. transfer-ownership="full"
  48496. optional="1"
  48497. allow-none="1">
  48498. <doc xml:space="preserve">a location to store the type of the loaded
  48499. icon, %NULL to ignore.</doc>
  48500. <type name="utf8" c:type="char**"/>
  48501. </parameter>
  48502. </parameters>
  48503. </callback>
  48504. </field>
  48505. </record>
  48506. <constant name="MENU_ATTRIBUTE_ACTION"
  48507. value="action"
  48508. c:type="G_MENU_ATTRIBUTE_ACTION"
  48509. version="2.32">
  48510. <doc xml:space="preserve">The menu item attribute which holds the action name of the item. Action
  48511. names are namespaced with an identifier for the action group in which the
  48512. action resides. For example, "win." for window-specific actions and "app."
  48513. for application-wide actions.
  48514. See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute().</doc>
  48515. <type name="utf8" c:type="gchar*"/>
  48516. </constant>
  48517. <constant name="MENU_ATTRIBUTE_ACTION_NAMESPACE"
  48518. value="action-namespace"
  48519. c:type="G_MENU_ATTRIBUTE_ACTION_NAMESPACE"
  48520. version="2.36">
  48521. <doc xml:space="preserve">The menu item attribute that holds the namespace for all action names in
  48522. menus that are linked from this item.</doc>
  48523. <type name="utf8" c:type="gchar*"/>
  48524. </constant>
  48525. <constant name="MENU_ATTRIBUTE_ICON"
  48526. value="icon"
  48527. c:type="G_MENU_ATTRIBUTE_ICON"
  48528. version="2.38">
  48529. <doc xml:space="preserve">The menu item attribute which holds the icon of the item.
  48530. The icon is stored in the format returned by g_icon_serialize().
  48531. This attribute is intended only to represent 'noun' icons such as
  48532. favicons for a webpage, or application icons. It should not be used
  48533. for 'verbs' (ie: stock icons).</doc>
  48534. <type name="utf8" c:type="gchar*"/>
  48535. </constant>
  48536. <constant name="MENU_ATTRIBUTE_LABEL"
  48537. value="label"
  48538. c:type="G_MENU_ATTRIBUTE_LABEL"
  48539. version="2.32">
  48540. <doc xml:space="preserve">The menu item attribute which holds the label of the item.</doc>
  48541. <type name="utf8" c:type="gchar*"/>
  48542. </constant>
  48543. <constant name="MENU_ATTRIBUTE_TARGET"
  48544. value="target"
  48545. c:type="G_MENU_ATTRIBUTE_TARGET"
  48546. version="2.32">
  48547. <doc xml:space="preserve">The menu item attribute which holds the target with which the item's action
  48548. will be activated.
  48549. See also g_menu_item_set_action_and_target()</doc>
  48550. <type name="utf8" c:type="gchar*"/>
  48551. </constant>
  48552. <constant name="MENU_LINK_SECTION"
  48553. value="section"
  48554. c:type="G_MENU_LINK_SECTION"
  48555. version="2.32">
  48556. <doc xml:space="preserve">The name of the link that associates a menu item with a section. The linked
  48557. menu will usually be shown in place of the menu item, using the item's label
  48558. as a header.
  48559. See also g_menu_item_set_link().</doc>
  48560. <type name="utf8" c:type="gchar*"/>
  48561. </constant>
  48562. <constant name="MENU_LINK_SUBMENU"
  48563. value="submenu"
  48564. c:type="G_MENU_LINK_SUBMENU"
  48565. version="2.32">
  48566. <doc xml:space="preserve">The name of the link that associates a menu item with a submenu.
  48567. See also g_menu_item_set_link().</doc>
  48568. <type name="utf8" c:type="gchar*"/>
  48569. </constant>
  48570. <class name="MemoryInputStream"
  48571. c:symbol-prefix="memory_input_stream"
  48572. c:type="GMemoryInputStream"
  48573. parent="InputStream"
  48574. glib:type-name="GMemoryInputStream"
  48575. glib:get-type="g_memory_input_stream_get_type"
  48576. glib:type-struct="MemoryInputStreamClass">
  48577. <doc xml:space="preserve">#GMemoryInputStream is a class for using arbitrary
  48578. memory chunks as input for GIO streaming input operations.
  48579. As of GLib 2.34, #GMemoryInputStream implements
  48580. #GPollableInputStream.</doc>
  48581. <implements name="PollableInputStream"/>
  48582. <implements name="Seekable"/>
  48583. <constructor name="new" c:identifier="g_memory_input_stream_new">
  48584. <doc xml:space="preserve">Creates a new empty #GMemoryInputStream.</doc>
  48585. <return-value transfer-ownership="full">
  48586. <doc xml:space="preserve">a new #GInputStream</doc>
  48587. <type name="InputStream" c:type="GInputStream*"/>
  48588. </return-value>
  48589. </constructor>
  48590. <constructor name="new_from_bytes"
  48591. c:identifier="g_memory_input_stream_new_from_bytes"
  48592. version="2.34">
  48593. <doc xml:space="preserve">Creates a new #GMemoryInputStream with data from the given @bytes.</doc>
  48594. <return-value transfer-ownership="full">
  48595. <doc xml:space="preserve">new #GInputStream read from @bytes</doc>
  48596. <type name="InputStream" c:type="GInputStream*"/>
  48597. </return-value>
  48598. <parameters>
  48599. <parameter name="bytes" transfer-ownership="none">
  48600. <doc xml:space="preserve">a #GBytes</doc>
  48601. <type name="GLib.Bytes" c:type="GBytes*"/>
  48602. </parameter>
  48603. </parameters>
  48604. </constructor>
  48605. <constructor name="new_from_data"
  48606. c:identifier="g_memory_input_stream_new_from_data">
  48607. <doc xml:space="preserve">Creates a new #GMemoryInputStream with data in memory of a given size.</doc>
  48608. <return-value transfer-ownership="full">
  48609. <doc xml:space="preserve">new #GInputStream read from @data of @len bytes.</doc>
  48610. <type name="InputStream" c:type="GInputStream*"/>
  48611. </return-value>
  48612. <parameters>
  48613. <parameter name="data" transfer-ownership="full">
  48614. <doc xml:space="preserve">input data</doc>
  48615. <array length="1" zero-terminated="0" c:type="void*">
  48616. <type name="guint8"/>
  48617. </array>
  48618. </parameter>
  48619. <parameter name="len" transfer-ownership="none">
  48620. <doc xml:space="preserve">length of the data, may be -1 if @data is a nul-terminated string</doc>
  48621. <type name="gssize" c:type="gssize"/>
  48622. </parameter>
  48623. <parameter name="destroy"
  48624. transfer-ownership="none"
  48625. nullable="1"
  48626. allow-none="1"
  48627. scope="async">
  48628. <doc xml:space="preserve">function that is called to free @data, or %NULL</doc>
  48629. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  48630. </parameter>
  48631. </parameters>
  48632. </constructor>
  48633. <method name="add_bytes"
  48634. c:identifier="g_memory_input_stream_add_bytes"
  48635. version="2.34">
  48636. <doc xml:space="preserve">Appends @bytes to data that can be read from the input stream.</doc>
  48637. <return-value transfer-ownership="none">
  48638. <type name="none" c:type="void"/>
  48639. </return-value>
  48640. <parameters>
  48641. <instance-parameter name="stream" transfer-ownership="none">
  48642. <doc xml:space="preserve">a #GMemoryInputStream</doc>
  48643. <type name="MemoryInputStream" c:type="GMemoryInputStream*"/>
  48644. </instance-parameter>
  48645. <parameter name="bytes" transfer-ownership="none">
  48646. <doc xml:space="preserve">input data</doc>
  48647. <type name="GLib.Bytes" c:type="GBytes*"/>
  48648. </parameter>
  48649. </parameters>
  48650. </method>
  48651. <method name="add_data" c:identifier="g_memory_input_stream_add_data">
  48652. <doc xml:space="preserve">Appends @data to data that can be read from the input stream</doc>
  48653. <return-value transfer-ownership="none">
  48654. <type name="none" c:type="void"/>
  48655. </return-value>
  48656. <parameters>
  48657. <instance-parameter name="stream" transfer-ownership="none">
  48658. <doc xml:space="preserve">a #GMemoryInputStream</doc>
  48659. <type name="MemoryInputStream" c:type="GMemoryInputStream*"/>
  48660. </instance-parameter>
  48661. <parameter name="data" transfer-ownership="full">
  48662. <doc xml:space="preserve">input data</doc>
  48663. <array length="1" zero-terminated="0" c:type="void*">
  48664. <type name="guint8"/>
  48665. </array>
  48666. </parameter>
  48667. <parameter name="len" transfer-ownership="none">
  48668. <doc xml:space="preserve">length of the data, may be -1 if @data is a nul-terminated string</doc>
  48669. <type name="gssize" c:type="gssize"/>
  48670. </parameter>
  48671. <parameter name="destroy"
  48672. transfer-ownership="none"
  48673. nullable="1"
  48674. allow-none="1"
  48675. scope="async">
  48676. <doc xml:space="preserve">function that is called to free @data, or %NULL</doc>
  48677. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  48678. </parameter>
  48679. </parameters>
  48680. </method>
  48681. <field name="parent_instance">
  48682. <type name="InputStream" c:type="GInputStream"/>
  48683. </field>
  48684. <field name="priv" readable="0" private="1">
  48685. <type name="MemoryInputStreamPrivate"
  48686. c:type="GMemoryInputStreamPrivate*"/>
  48687. </field>
  48688. </class>
  48689. <record name="MemoryInputStreamClass"
  48690. c:type="GMemoryInputStreamClass"
  48691. glib:is-gtype-struct-for="MemoryInputStream">
  48692. <field name="parent_class">
  48693. <type name="InputStreamClass" c:type="GInputStreamClass"/>
  48694. </field>
  48695. <field name="_g_reserved1" introspectable="0">
  48696. <callback name="_g_reserved1">
  48697. <return-value transfer-ownership="none">
  48698. <type name="none" c:type="void"/>
  48699. </return-value>
  48700. </callback>
  48701. </field>
  48702. <field name="_g_reserved2" introspectable="0">
  48703. <callback name="_g_reserved2">
  48704. <return-value transfer-ownership="none">
  48705. <type name="none" c:type="void"/>
  48706. </return-value>
  48707. </callback>
  48708. </field>
  48709. <field name="_g_reserved3" introspectable="0">
  48710. <callback name="_g_reserved3">
  48711. <return-value transfer-ownership="none">
  48712. <type name="none" c:type="void"/>
  48713. </return-value>
  48714. </callback>
  48715. </field>
  48716. <field name="_g_reserved4" introspectable="0">
  48717. <callback name="_g_reserved4">
  48718. <return-value transfer-ownership="none">
  48719. <type name="none" c:type="void"/>
  48720. </return-value>
  48721. </callback>
  48722. </field>
  48723. <field name="_g_reserved5" introspectable="0">
  48724. <callback name="_g_reserved5">
  48725. <return-value transfer-ownership="none">
  48726. <type name="none" c:type="void"/>
  48727. </return-value>
  48728. </callback>
  48729. </field>
  48730. </record>
  48731. <record name="MemoryInputStreamPrivate"
  48732. c:type="GMemoryInputStreamPrivate"
  48733. disguised="1">
  48734. </record>
  48735. <class name="MemoryOutputStream"
  48736. c:symbol-prefix="memory_output_stream"
  48737. c:type="GMemoryOutputStream"
  48738. parent="OutputStream"
  48739. glib:type-name="GMemoryOutputStream"
  48740. glib:get-type="g_memory_output_stream_get_type"
  48741. glib:type-struct="MemoryOutputStreamClass">
  48742. <doc xml:space="preserve">#GMemoryOutputStream is a class for using arbitrary
  48743. memory chunks as output for GIO streaming output operations.
  48744. As of GLib 2.34, #GMemoryOutputStream trivially implements
  48745. #GPollableOutputStream: it always polls as ready.</doc>
  48746. <implements name="PollableOutputStream"/>
  48747. <implements name="Seekable"/>
  48748. <constructor name="new"
  48749. c:identifier="g_memory_output_stream_new"
  48750. introspectable="0">
  48751. <doc xml:space="preserve">Creates a new #GMemoryOutputStream.
  48752. In most cases this is not the function you want. See
  48753. g_memory_output_stream_new_resizable() instead.
  48754. If @data is non-%NULL, the stream will use that for its internal storage.
  48755. If @realloc_fn is non-%NULL, it will be used for resizing the internal
  48756. storage when necessary and the stream will be considered resizable.
  48757. In that case, the stream will start out being (conceptually) empty.
  48758. @size is used only as a hint for how big @data is. Specifically,
  48759. seeking to the end of a newly-created stream will seek to zero, not
  48760. @size. Seeking past the end of the stream and then writing will
  48761. introduce a zero-filled gap.
  48762. If @realloc_fn is %NULL then the stream is fixed-sized. Seeking to
  48763. the end will seek to @size exactly. Writing past the end will give
  48764. an 'out of space' error. Attempting to seek past the end will fail.
  48765. Unlike the resizable case, seeking to an offset within the stream and
  48766. writing will preserve the bytes passed in as @data before that point
  48767. and will return them as part of g_memory_output_stream_steal_data().
  48768. If you intend to seek you should probably therefore ensure that @data
  48769. is properly initialised.
  48770. It is probably only meaningful to provide @data and @size in the case
  48771. that you want a fixed-sized stream. Put another way: if @realloc_fn
  48772. is non-%NULL then it makes most sense to give @data as %NULL and
  48773. @size as 0 (allowing #GMemoryOutputStream to do the initial
  48774. allocation for itself).
  48775. |[&lt;!-- language="C" --&gt;
  48776. // a stream that can grow
  48777. stream = g_memory_output_stream_new (NULL, 0, realloc, free);
  48778. // another stream that can grow
  48779. stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
  48780. // a fixed-size stream
  48781. data = malloc (200);
  48782. stream3 = g_memory_output_stream_new (data, 200, NULL, free);
  48783. ]|</doc>
  48784. <return-value transfer-ownership="full">
  48785. <doc xml:space="preserve">A newly created #GMemoryOutputStream object.</doc>
  48786. <type name="OutputStream" c:type="GOutputStream*"/>
  48787. </return-value>
  48788. <parameters>
  48789. <parameter name="data"
  48790. transfer-ownership="none"
  48791. nullable="1"
  48792. allow-none="1">
  48793. <doc xml:space="preserve">pointer to a chunk of memory to use, or %NULL</doc>
  48794. <type name="gpointer" c:type="gpointer"/>
  48795. </parameter>
  48796. <parameter name="size" transfer-ownership="none">
  48797. <doc xml:space="preserve">the size of @data</doc>
  48798. <type name="gsize" c:type="gsize"/>
  48799. </parameter>
  48800. <parameter name="realloc_function"
  48801. transfer-ownership="none"
  48802. nullable="1"
  48803. allow-none="1"
  48804. scope="notified"
  48805. destroy="3">
  48806. <doc xml:space="preserve">a function with realloc() semantics (like g_realloc())
  48807. to be called when @data needs to be grown, or %NULL</doc>
  48808. <type name="ReallocFunc" c:type="GReallocFunc"/>
  48809. </parameter>
  48810. <parameter name="destroy_function"
  48811. transfer-ownership="none"
  48812. nullable="1"
  48813. allow-none="1"
  48814. scope="async">
  48815. <doc xml:space="preserve">a function to be called on @data when the stream is
  48816. finalized, or %NULL</doc>
  48817. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  48818. </parameter>
  48819. </parameters>
  48820. </constructor>
  48821. <constructor name="new_resizable"
  48822. c:identifier="g_memory_output_stream_new_resizable"
  48823. version="2.36">
  48824. <doc xml:space="preserve">Creates a new #GMemoryOutputStream, using g_realloc() and g_free()
  48825. for memory allocation.</doc>
  48826. <return-value transfer-ownership="full">
  48827. <type name="OutputStream" c:type="GOutputStream*"/>
  48828. </return-value>
  48829. </constructor>
  48830. <method name="get_data" c:identifier="g_memory_output_stream_get_data">
  48831. <doc xml:space="preserve">Gets any loaded data from the @ostream.
  48832. Note that the returned pointer may become invalid on the next
  48833. write or truncate operation on the stream.</doc>
  48834. <return-value transfer-ownership="none" nullable="1">
  48835. <doc xml:space="preserve">pointer to the stream's data, or %NULL if the data
  48836. has been stolen</doc>
  48837. <type name="gpointer" c:type="gpointer"/>
  48838. </return-value>
  48839. <parameters>
  48840. <instance-parameter name="ostream" transfer-ownership="none">
  48841. <doc xml:space="preserve">a #GMemoryOutputStream</doc>
  48842. <type name="MemoryOutputStream" c:type="GMemoryOutputStream*"/>
  48843. </instance-parameter>
  48844. </parameters>
  48845. </method>
  48846. <method name="get_data_size"
  48847. c:identifier="g_memory_output_stream_get_data_size"
  48848. version="2.18">
  48849. <doc xml:space="preserve">Returns the number of bytes from the start up to including the last
  48850. byte written in the stream that has not been truncated away.</doc>
  48851. <return-value transfer-ownership="none">
  48852. <doc xml:space="preserve">the number of bytes written to the stream</doc>
  48853. <type name="gsize" c:type="gsize"/>
  48854. </return-value>
  48855. <parameters>
  48856. <instance-parameter name="ostream" transfer-ownership="none">
  48857. <doc xml:space="preserve">a #GMemoryOutputStream</doc>
  48858. <type name="MemoryOutputStream" c:type="GMemoryOutputStream*"/>
  48859. </instance-parameter>
  48860. </parameters>
  48861. </method>
  48862. <method name="get_size" c:identifier="g_memory_output_stream_get_size">
  48863. <doc xml:space="preserve">Gets the size of the currently allocated data area (available from
  48864. g_memory_output_stream_get_data()).
  48865. You probably don't want to use this function on resizable streams.
  48866. See g_memory_output_stream_get_data_size() instead. For resizable
  48867. streams the size returned by this function is an implementation
  48868. detail and may be change at any time in response to operations on the
  48869. stream.
  48870. If the stream is fixed-sized (ie: no realloc was passed to
  48871. g_memory_output_stream_new()) then this is the maximum size of the
  48872. stream and further writes will return %G_IO_ERROR_NO_SPACE.
  48873. In any case, if you want the number of bytes currently written to the
  48874. stream, use g_memory_output_stream_get_data_size().</doc>
  48875. <return-value transfer-ownership="none">
  48876. <doc xml:space="preserve">the number of bytes allocated for the data buffer</doc>
  48877. <type name="gsize" c:type="gsize"/>
  48878. </return-value>
  48879. <parameters>
  48880. <instance-parameter name="ostream" transfer-ownership="none">
  48881. <doc xml:space="preserve">a #GMemoryOutputStream</doc>
  48882. <type name="MemoryOutputStream" c:type="GMemoryOutputStream*"/>
  48883. </instance-parameter>
  48884. </parameters>
  48885. </method>
  48886. <method name="steal_as_bytes"
  48887. c:identifier="g_memory_output_stream_steal_as_bytes"
  48888. version="2.34">
  48889. <doc xml:space="preserve">Returns data from the @ostream as a #GBytes. @ostream must be
  48890. closed before calling this function.</doc>
  48891. <return-value transfer-ownership="full">
  48892. <doc xml:space="preserve">the stream's data</doc>
  48893. <type name="GLib.Bytes" c:type="GBytes*"/>
  48894. </return-value>
  48895. <parameters>
  48896. <instance-parameter name="ostream" transfer-ownership="none">
  48897. <doc xml:space="preserve">a #GMemoryOutputStream</doc>
  48898. <type name="MemoryOutputStream" c:type="GMemoryOutputStream*"/>
  48899. </instance-parameter>
  48900. </parameters>
  48901. </method>
  48902. <method name="steal_data"
  48903. c:identifier="g_memory_output_stream_steal_data"
  48904. version="2.26">
  48905. <doc xml:space="preserve">Gets any loaded data from the @ostream. Ownership of the data
  48906. is transferred to the caller; when no longer needed it must be
  48907. freed using the free function set in @ostream's
  48908. #GMemoryOutputStream:destroy-function property.
  48909. @ostream must be closed before calling this function.</doc>
  48910. <return-value transfer-ownership="full" nullable="1">
  48911. <doc xml:space="preserve">the stream's data, or %NULL if it has previously
  48912. been stolen</doc>
  48913. <type name="gpointer" c:type="gpointer"/>
  48914. </return-value>
  48915. <parameters>
  48916. <instance-parameter name="ostream" transfer-ownership="none">
  48917. <doc xml:space="preserve">a #GMemoryOutputStream</doc>
  48918. <type name="MemoryOutputStream" c:type="GMemoryOutputStream*"/>
  48919. </instance-parameter>
  48920. </parameters>
  48921. </method>
  48922. <property name="data"
  48923. version="2.24"
  48924. writable="1"
  48925. construct-only="1"
  48926. transfer-ownership="none">
  48927. <doc xml:space="preserve">Pointer to buffer where data will be written.</doc>
  48928. <type name="gpointer" c:type="gpointer"/>
  48929. </property>
  48930. <property name="data-size" version="2.24" transfer-ownership="none">
  48931. <doc xml:space="preserve">Size of data written to the buffer.</doc>
  48932. <type name="gulong" c:type="gulong"/>
  48933. </property>
  48934. <property name="destroy-function"
  48935. version="2.24"
  48936. introspectable="0"
  48937. writable="1"
  48938. construct-only="1"
  48939. transfer-ownership="none">
  48940. <doc xml:space="preserve">Function called with the buffer as argument when the stream is destroyed.</doc>
  48941. <type name="gpointer" c:type="gpointer"/>
  48942. </property>
  48943. <property name="realloc-function"
  48944. version="2.24"
  48945. introspectable="0"
  48946. writable="1"
  48947. construct-only="1"
  48948. transfer-ownership="none">
  48949. <doc xml:space="preserve">Function with realloc semantics called to enlarge the buffer.</doc>
  48950. <type name="gpointer" c:type="gpointer"/>
  48951. </property>
  48952. <property name="size"
  48953. version="2.24"
  48954. writable="1"
  48955. construct-only="1"
  48956. transfer-ownership="none">
  48957. <doc xml:space="preserve">Current size of the data buffer.</doc>
  48958. <type name="gulong" c:type="gulong"/>
  48959. </property>
  48960. <field name="parent_instance">
  48961. <type name="OutputStream" c:type="GOutputStream"/>
  48962. </field>
  48963. <field name="priv" readable="0" private="1">
  48964. <type name="MemoryOutputStreamPrivate"
  48965. c:type="GMemoryOutputStreamPrivate*"/>
  48966. </field>
  48967. </class>
  48968. <record name="MemoryOutputStreamClass"
  48969. c:type="GMemoryOutputStreamClass"
  48970. glib:is-gtype-struct-for="MemoryOutputStream">
  48971. <field name="parent_class">
  48972. <type name="OutputStreamClass" c:type="GOutputStreamClass"/>
  48973. </field>
  48974. <field name="_g_reserved1" introspectable="0">
  48975. <callback name="_g_reserved1">
  48976. <return-value transfer-ownership="none">
  48977. <type name="none" c:type="void"/>
  48978. </return-value>
  48979. </callback>
  48980. </field>
  48981. <field name="_g_reserved2" introspectable="0">
  48982. <callback name="_g_reserved2">
  48983. <return-value transfer-ownership="none">
  48984. <type name="none" c:type="void"/>
  48985. </return-value>
  48986. </callback>
  48987. </field>
  48988. <field name="_g_reserved3" introspectable="0">
  48989. <callback name="_g_reserved3">
  48990. <return-value transfer-ownership="none">
  48991. <type name="none" c:type="void"/>
  48992. </return-value>
  48993. </callback>
  48994. </field>
  48995. <field name="_g_reserved4" introspectable="0">
  48996. <callback name="_g_reserved4">
  48997. <return-value transfer-ownership="none">
  48998. <type name="none" c:type="void"/>
  48999. </return-value>
  49000. </callback>
  49001. </field>
  49002. <field name="_g_reserved5" introspectable="0">
  49003. <callback name="_g_reserved5">
  49004. <return-value transfer-ownership="none">
  49005. <type name="none" c:type="void"/>
  49006. </return-value>
  49007. </callback>
  49008. </field>
  49009. </record>
  49010. <record name="MemoryOutputStreamPrivate"
  49011. c:type="GMemoryOutputStreamPrivate"
  49012. disguised="1">
  49013. </record>
  49014. <class name="Menu"
  49015. c:symbol-prefix="menu"
  49016. c:type="GMenu"
  49017. version="2.32"
  49018. parent="MenuModel"
  49019. glib:type-name="GMenu"
  49020. glib:get-type="g_menu_get_type">
  49021. <doc xml:space="preserve">#GMenu is a simple implementation of #GMenuModel.
  49022. You populate a #GMenu by adding #GMenuItem instances to it.
  49023. There are some convenience functions to allow you to directly
  49024. add items (avoiding #GMenuItem) for the common cases. To add
  49025. a regular item, use g_menu_insert(). To add a section, use
  49026. g_menu_insert_section(). To add a submenu, use
  49027. g_menu_insert_submenu().</doc>
  49028. <constructor name="new" c:identifier="g_menu_new" version="2.32">
  49029. <doc xml:space="preserve">Creates a new #GMenu.
  49030. The new menu has no items.</doc>
  49031. <return-value transfer-ownership="full">
  49032. <doc xml:space="preserve">a new #GMenu</doc>
  49033. <type name="Menu" c:type="GMenu*"/>
  49034. </return-value>
  49035. </constructor>
  49036. <method name="append" c:identifier="g_menu_append" version="2.32">
  49037. <doc xml:space="preserve">Convenience function for appending a normal menu item to the end of
  49038. @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more
  49039. flexible alternative.</doc>
  49040. <return-value transfer-ownership="none">
  49041. <type name="none" c:type="void"/>
  49042. </return-value>
  49043. <parameters>
  49044. <instance-parameter name="menu" transfer-ownership="none">
  49045. <doc xml:space="preserve">a #GMenu</doc>
  49046. <type name="Menu" c:type="GMenu*"/>
  49047. </instance-parameter>
  49048. <parameter name="label"
  49049. transfer-ownership="none"
  49050. nullable="1"
  49051. allow-none="1">
  49052. <doc xml:space="preserve">the section label, or %NULL</doc>
  49053. <type name="utf8" c:type="const gchar*"/>
  49054. </parameter>
  49055. <parameter name="detailed_action"
  49056. transfer-ownership="none"
  49057. nullable="1"
  49058. allow-none="1">
  49059. <doc xml:space="preserve">the detailed action string, or %NULL</doc>
  49060. <type name="utf8" c:type="const gchar*"/>
  49061. </parameter>
  49062. </parameters>
  49063. </method>
  49064. <method name="append_item"
  49065. c:identifier="g_menu_append_item"
  49066. version="2.32">
  49067. <doc xml:space="preserve">Appends @item to the end of @menu.
  49068. See g_menu_insert_item() for more information.</doc>
  49069. <return-value transfer-ownership="none">
  49070. <type name="none" c:type="void"/>
  49071. </return-value>
  49072. <parameters>
  49073. <instance-parameter name="menu" transfer-ownership="none">
  49074. <doc xml:space="preserve">a #GMenu</doc>
  49075. <type name="Menu" c:type="GMenu*"/>
  49076. </instance-parameter>
  49077. <parameter name="item" transfer-ownership="none">
  49078. <doc xml:space="preserve">a #GMenuItem to append</doc>
  49079. <type name="MenuItem" c:type="GMenuItem*"/>
  49080. </parameter>
  49081. </parameters>
  49082. </method>
  49083. <method name="append_section"
  49084. c:identifier="g_menu_append_section"
  49085. version="2.32">
  49086. <doc xml:space="preserve">Convenience function for appending a section menu item to the end of
  49087. @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a
  49088. more flexible alternative.</doc>
  49089. <return-value transfer-ownership="none">
  49090. <type name="none" c:type="void"/>
  49091. </return-value>
  49092. <parameters>
  49093. <instance-parameter name="menu" transfer-ownership="none">
  49094. <doc xml:space="preserve">a #GMenu</doc>
  49095. <type name="Menu" c:type="GMenu*"/>
  49096. </instance-parameter>
  49097. <parameter name="label"
  49098. transfer-ownership="none"
  49099. nullable="1"
  49100. allow-none="1">
  49101. <doc xml:space="preserve">the section label, or %NULL</doc>
  49102. <type name="utf8" c:type="const gchar*"/>
  49103. </parameter>
  49104. <parameter name="section" transfer-ownership="none">
  49105. <doc xml:space="preserve">a #GMenuModel with the items of the section</doc>
  49106. <type name="MenuModel" c:type="GMenuModel*"/>
  49107. </parameter>
  49108. </parameters>
  49109. </method>
  49110. <method name="append_submenu"
  49111. c:identifier="g_menu_append_submenu"
  49112. version="2.32">
  49113. <doc xml:space="preserve">Convenience function for appending a submenu menu item to the end of
  49114. @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a
  49115. more flexible alternative.</doc>
  49116. <return-value transfer-ownership="none">
  49117. <type name="none" c:type="void"/>
  49118. </return-value>
  49119. <parameters>
  49120. <instance-parameter name="menu" transfer-ownership="none">
  49121. <doc xml:space="preserve">a #GMenu</doc>
  49122. <type name="Menu" c:type="GMenu*"/>
  49123. </instance-parameter>
  49124. <parameter name="label"
  49125. transfer-ownership="none"
  49126. nullable="1"
  49127. allow-none="1">
  49128. <doc xml:space="preserve">the section label, or %NULL</doc>
  49129. <type name="utf8" c:type="const gchar*"/>
  49130. </parameter>
  49131. <parameter name="submenu" transfer-ownership="none">
  49132. <doc xml:space="preserve">a #GMenuModel with the items of the submenu</doc>
  49133. <type name="MenuModel" c:type="GMenuModel*"/>
  49134. </parameter>
  49135. </parameters>
  49136. </method>
  49137. <method name="freeze" c:identifier="g_menu_freeze" version="2.32">
  49138. <doc xml:space="preserve">Marks @menu as frozen.
  49139. After the menu is frozen, it is an error to attempt to make any
  49140. changes to it. In effect this means that the #GMenu API must no
  49141. longer be used.
  49142. This function causes g_menu_model_is_mutable() to begin returning
  49143. %FALSE, which has some positive performance implications.</doc>
  49144. <return-value transfer-ownership="none">
  49145. <type name="none" c:type="void"/>
  49146. </return-value>
  49147. <parameters>
  49148. <instance-parameter name="menu" transfer-ownership="none">
  49149. <doc xml:space="preserve">a #GMenu</doc>
  49150. <type name="Menu" c:type="GMenu*"/>
  49151. </instance-parameter>
  49152. </parameters>
  49153. </method>
  49154. <method name="insert" c:identifier="g_menu_insert" version="2.32">
  49155. <doc xml:space="preserve">Convenience function for inserting a normal menu item into @menu.
  49156. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible
  49157. alternative.</doc>
  49158. <return-value transfer-ownership="none">
  49159. <type name="none" c:type="void"/>
  49160. </return-value>
  49161. <parameters>
  49162. <instance-parameter name="menu" transfer-ownership="none">
  49163. <doc xml:space="preserve">a #GMenu</doc>
  49164. <type name="Menu" c:type="GMenu*"/>
  49165. </instance-parameter>
  49166. <parameter name="position" transfer-ownership="none">
  49167. <doc xml:space="preserve">the position at which to insert the item</doc>
  49168. <type name="gint" c:type="gint"/>
  49169. </parameter>
  49170. <parameter name="label"
  49171. transfer-ownership="none"
  49172. nullable="1"
  49173. allow-none="1">
  49174. <doc xml:space="preserve">the section label, or %NULL</doc>
  49175. <type name="utf8" c:type="const gchar*"/>
  49176. </parameter>
  49177. <parameter name="detailed_action"
  49178. transfer-ownership="none"
  49179. nullable="1"
  49180. allow-none="1">
  49181. <doc xml:space="preserve">the detailed action string, or %NULL</doc>
  49182. <type name="utf8" c:type="const gchar*"/>
  49183. </parameter>
  49184. </parameters>
  49185. </method>
  49186. <method name="insert_item"
  49187. c:identifier="g_menu_insert_item"
  49188. version="2.32">
  49189. <doc xml:space="preserve">Inserts @item into @menu.
  49190. The "insertion" is actually done by copying all of the attribute and
  49191. link values of @item and using them to form a new item within @menu.
  49192. As such, @item itself is not really inserted, but rather, a menu item
  49193. that is exactly the same as the one presently described by @item.
  49194. This means that @item is essentially useless after the insertion
  49195. occurs. Any changes you make to it are ignored unless it is inserted
  49196. again (at which point its updated values will be copied).
  49197. You should probably just free @item once you're done.
  49198. There are many convenience functions to take care of common cases.
  49199. See g_menu_insert(), g_menu_insert_section() and
  49200. g_menu_insert_submenu() as well as "prepend" and "append" variants of
  49201. each of these functions.</doc>
  49202. <return-value transfer-ownership="none">
  49203. <type name="none" c:type="void"/>
  49204. </return-value>
  49205. <parameters>
  49206. <instance-parameter name="menu" transfer-ownership="none">
  49207. <doc xml:space="preserve">a #GMenu</doc>
  49208. <type name="Menu" c:type="GMenu*"/>
  49209. </instance-parameter>
  49210. <parameter name="position" transfer-ownership="none">
  49211. <doc xml:space="preserve">the position at which to insert the item</doc>
  49212. <type name="gint" c:type="gint"/>
  49213. </parameter>
  49214. <parameter name="item" transfer-ownership="none">
  49215. <doc xml:space="preserve">the #GMenuItem to insert</doc>
  49216. <type name="MenuItem" c:type="GMenuItem*"/>
  49217. </parameter>
  49218. </parameters>
  49219. </method>
  49220. <method name="insert_section"
  49221. c:identifier="g_menu_insert_section"
  49222. version="2.32">
  49223. <doc xml:space="preserve">Convenience function for inserting a section menu item into @menu.
  49224. Combine g_menu_item_new_section() and g_menu_insert_item() for a more
  49225. flexible alternative.</doc>
  49226. <return-value transfer-ownership="none">
  49227. <type name="none" c:type="void"/>
  49228. </return-value>
  49229. <parameters>
  49230. <instance-parameter name="menu" transfer-ownership="none">
  49231. <doc xml:space="preserve">a #GMenu</doc>
  49232. <type name="Menu" c:type="GMenu*"/>
  49233. </instance-parameter>
  49234. <parameter name="position" transfer-ownership="none">
  49235. <doc xml:space="preserve">the position at which to insert the item</doc>
  49236. <type name="gint" c:type="gint"/>
  49237. </parameter>
  49238. <parameter name="label"
  49239. transfer-ownership="none"
  49240. nullable="1"
  49241. allow-none="1">
  49242. <doc xml:space="preserve">the section label, or %NULL</doc>
  49243. <type name="utf8" c:type="const gchar*"/>
  49244. </parameter>
  49245. <parameter name="section" transfer-ownership="none">
  49246. <doc xml:space="preserve">a #GMenuModel with the items of the section</doc>
  49247. <type name="MenuModel" c:type="GMenuModel*"/>
  49248. </parameter>
  49249. </parameters>
  49250. </method>
  49251. <method name="insert_submenu"
  49252. c:identifier="g_menu_insert_submenu"
  49253. version="2.32">
  49254. <doc xml:space="preserve">Convenience function for inserting a submenu menu item into @menu.
  49255. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more
  49256. flexible alternative.</doc>
  49257. <return-value transfer-ownership="none">
  49258. <type name="none" c:type="void"/>
  49259. </return-value>
  49260. <parameters>
  49261. <instance-parameter name="menu" transfer-ownership="none">
  49262. <doc xml:space="preserve">a #GMenu</doc>
  49263. <type name="Menu" c:type="GMenu*"/>
  49264. </instance-parameter>
  49265. <parameter name="position" transfer-ownership="none">
  49266. <doc xml:space="preserve">the position at which to insert the item</doc>
  49267. <type name="gint" c:type="gint"/>
  49268. </parameter>
  49269. <parameter name="label"
  49270. transfer-ownership="none"
  49271. nullable="1"
  49272. allow-none="1">
  49273. <doc xml:space="preserve">the section label, or %NULL</doc>
  49274. <type name="utf8" c:type="const gchar*"/>
  49275. </parameter>
  49276. <parameter name="submenu" transfer-ownership="none">
  49277. <doc xml:space="preserve">a #GMenuModel with the items of the submenu</doc>
  49278. <type name="MenuModel" c:type="GMenuModel*"/>
  49279. </parameter>
  49280. </parameters>
  49281. </method>
  49282. <method name="prepend" c:identifier="g_menu_prepend" version="2.32">
  49283. <doc xml:space="preserve">Convenience function for prepending a normal menu item to the start
  49284. of @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more
  49285. flexible alternative.</doc>
  49286. <return-value transfer-ownership="none">
  49287. <type name="none" c:type="void"/>
  49288. </return-value>
  49289. <parameters>
  49290. <instance-parameter name="menu" transfer-ownership="none">
  49291. <doc xml:space="preserve">a #GMenu</doc>
  49292. <type name="Menu" c:type="GMenu*"/>
  49293. </instance-parameter>
  49294. <parameter name="label"
  49295. transfer-ownership="none"
  49296. nullable="1"
  49297. allow-none="1">
  49298. <doc xml:space="preserve">the section label, or %NULL</doc>
  49299. <type name="utf8" c:type="const gchar*"/>
  49300. </parameter>
  49301. <parameter name="detailed_action"
  49302. transfer-ownership="none"
  49303. nullable="1"
  49304. allow-none="1">
  49305. <doc xml:space="preserve">the detailed action string, or %NULL</doc>
  49306. <type name="utf8" c:type="const gchar*"/>
  49307. </parameter>
  49308. </parameters>
  49309. </method>
  49310. <method name="prepend_item"
  49311. c:identifier="g_menu_prepend_item"
  49312. version="2.32">
  49313. <doc xml:space="preserve">Prepends @item to the start of @menu.
  49314. See g_menu_insert_item() for more information.</doc>
  49315. <return-value transfer-ownership="none">
  49316. <type name="none" c:type="void"/>
  49317. </return-value>
  49318. <parameters>
  49319. <instance-parameter name="menu" transfer-ownership="none">
  49320. <doc xml:space="preserve">a #GMenu</doc>
  49321. <type name="Menu" c:type="GMenu*"/>
  49322. </instance-parameter>
  49323. <parameter name="item" transfer-ownership="none">
  49324. <doc xml:space="preserve">a #GMenuItem to prepend</doc>
  49325. <type name="MenuItem" c:type="GMenuItem*"/>
  49326. </parameter>
  49327. </parameters>
  49328. </method>
  49329. <method name="prepend_section"
  49330. c:identifier="g_menu_prepend_section"
  49331. version="2.32">
  49332. <doc xml:space="preserve">Convenience function for prepending a section menu item to the start
  49333. of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for
  49334. a more flexible alternative.</doc>
  49335. <return-value transfer-ownership="none">
  49336. <type name="none" c:type="void"/>
  49337. </return-value>
  49338. <parameters>
  49339. <instance-parameter name="menu" transfer-ownership="none">
  49340. <doc xml:space="preserve">a #GMenu</doc>
  49341. <type name="Menu" c:type="GMenu*"/>
  49342. </instance-parameter>
  49343. <parameter name="label"
  49344. transfer-ownership="none"
  49345. nullable="1"
  49346. allow-none="1">
  49347. <doc xml:space="preserve">the section label, or %NULL</doc>
  49348. <type name="utf8" c:type="const gchar*"/>
  49349. </parameter>
  49350. <parameter name="section" transfer-ownership="none">
  49351. <doc xml:space="preserve">a #GMenuModel with the items of the section</doc>
  49352. <type name="MenuModel" c:type="GMenuModel*"/>
  49353. </parameter>
  49354. </parameters>
  49355. </method>
  49356. <method name="prepend_submenu"
  49357. c:identifier="g_menu_prepend_submenu"
  49358. version="2.32">
  49359. <doc xml:space="preserve">Convenience function for prepending a submenu menu item to the start
  49360. of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for
  49361. a more flexible alternative.</doc>
  49362. <return-value transfer-ownership="none">
  49363. <type name="none" c:type="void"/>
  49364. </return-value>
  49365. <parameters>
  49366. <instance-parameter name="menu" transfer-ownership="none">
  49367. <doc xml:space="preserve">a #GMenu</doc>
  49368. <type name="Menu" c:type="GMenu*"/>
  49369. </instance-parameter>
  49370. <parameter name="label"
  49371. transfer-ownership="none"
  49372. nullable="1"
  49373. allow-none="1">
  49374. <doc xml:space="preserve">the section label, or %NULL</doc>
  49375. <type name="utf8" c:type="const gchar*"/>
  49376. </parameter>
  49377. <parameter name="submenu" transfer-ownership="none">
  49378. <doc xml:space="preserve">a #GMenuModel with the items of the submenu</doc>
  49379. <type name="MenuModel" c:type="GMenuModel*"/>
  49380. </parameter>
  49381. </parameters>
  49382. </method>
  49383. <method name="remove" c:identifier="g_menu_remove" version="2.32">
  49384. <doc xml:space="preserve">Removes an item from the menu.
  49385. @position gives the index of the item to remove.
  49386. It is an error if position is not in range the range from 0 to one
  49387. less than the number of items in the menu.
  49388. It is not possible to remove items by identity since items are added
  49389. to the menu simply by copying their links and attributes (ie:
  49390. identity of the item itself is not preserved).</doc>
  49391. <return-value transfer-ownership="none">
  49392. <type name="none" c:type="void"/>
  49393. </return-value>
  49394. <parameters>
  49395. <instance-parameter name="menu" transfer-ownership="none">
  49396. <doc xml:space="preserve">a #GMenu</doc>
  49397. <type name="Menu" c:type="GMenu*"/>
  49398. </instance-parameter>
  49399. <parameter name="position" transfer-ownership="none">
  49400. <doc xml:space="preserve">the position of the item to remove</doc>
  49401. <type name="gint" c:type="gint"/>
  49402. </parameter>
  49403. </parameters>
  49404. </method>
  49405. <method name="remove_all"
  49406. c:identifier="g_menu_remove_all"
  49407. version="2.38">
  49408. <doc xml:space="preserve">Removes all items in the menu.</doc>
  49409. <return-value transfer-ownership="none">
  49410. <type name="none" c:type="void"/>
  49411. </return-value>
  49412. <parameters>
  49413. <instance-parameter name="menu" transfer-ownership="none">
  49414. <doc xml:space="preserve">a #GMenu</doc>
  49415. <type name="Menu" c:type="GMenu*"/>
  49416. </instance-parameter>
  49417. </parameters>
  49418. </method>
  49419. </class>
  49420. <class name="MenuAttributeIter"
  49421. c:symbol-prefix="menu_attribute_iter"
  49422. c:type="GMenuAttributeIter"
  49423. version="2.32"
  49424. parent="GObject.Object"
  49425. abstract="1"
  49426. glib:type-name="GMenuAttributeIter"
  49427. glib:get-type="g_menu_attribute_iter_get_type"
  49428. glib:type-struct="MenuAttributeIterClass">
  49429. <doc xml:space="preserve">#GMenuAttributeIter is an opaque structure type. You must access it
  49430. using the functions below.</doc>
  49431. <virtual-method name="get_next" invoker="get_next" version="2.32">
  49432. <doc xml:space="preserve">This function combines g_menu_attribute_iter_next() with
  49433. g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().
  49434. First the iterator is advanced to the next (possibly first) attribute.
  49435. If that fails, then %FALSE is returned and there are no other
  49436. effects.
  49437. If successful, @name and @value are set to the name and value of the
  49438. attribute that has just been advanced to. At this point,
  49439. g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will
  49440. return the same values again.
  49441. The value returned in @name remains valid for as long as the iterator
  49442. remains at the current position. The value returned in @value must
  49443. be unreffed using g_variant_unref() when it is no longer in use.</doc>
  49444. <return-value transfer-ownership="none">
  49445. <doc xml:space="preserve">%TRUE on success, or %FALSE if there is no additional
  49446. attribute</doc>
  49447. <type name="gboolean" c:type="gboolean"/>
  49448. </return-value>
  49449. <parameters>
  49450. <instance-parameter name="iter" transfer-ownership="none">
  49451. <doc xml:space="preserve">a #GMenuAttributeIter</doc>
  49452. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  49453. </instance-parameter>
  49454. <parameter name="out_name"
  49455. direction="out"
  49456. caller-allocates="0"
  49457. transfer-ownership="none"
  49458. optional="1"
  49459. allow-none="1">
  49460. <doc xml:space="preserve">the type of the attribute</doc>
  49461. <type name="utf8" c:type="const gchar**"/>
  49462. </parameter>
  49463. <parameter name="value"
  49464. direction="out"
  49465. caller-allocates="0"
  49466. transfer-ownership="full"
  49467. optional="1"
  49468. allow-none="1">
  49469. <doc xml:space="preserve">the attribute value</doc>
  49470. <type name="GLib.Variant" c:type="GVariant**"/>
  49471. </parameter>
  49472. </parameters>
  49473. </virtual-method>
  49474. <method name="get_name"
  49475. c:identifier="g_menu_attribute_iter_get_name"
  49476. version="2.32">
  49477. <doc xml:space="preserve">Gets the name of the attribute at the current iterator position, as
  49478. a string.
  49479. The iterator is not advanced.</doc>
  49480. <return-value transfer-ownership="none">
  49481. <doc xml:space="preserve">the name of the attribute</doc>
  49482. <type name="utf8" c:type="const gchar*"/>
  49483. </return-value>
  49484. <parameters>
  49485. <instance-parameter name="iter" transfer-ownership="none">
  49486. <doc xml:space="preserve">a #GMenuAttributeIter</doc>
  49487. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  49488. </instance-parameter>
  49489. </parameters>
  49490. </method>
  49491. <method name="get_next"
  49492. c:identifier="g_menu_attribute_iter_get_next"
  49493. version="2.32">
  49494. <doc xml:space="preserve">This function combines g_menu_attribute_iter_next() with
  49495. g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().
  49496. First the iterator is advanced to the next (possibly first) attribute.
  49497. If that fails, then %FALSE is returned and there are no other
  49498. effects.
  49499. If successful, @name and @value are set to the name and value of the
  49500. attribute that has just been advanced to. At this point,
  49501. g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will
  49502. return the same values again.
  49503. The value returned in @name remains valid for as long as the iterator
  49504. remains at the current position. The value returned in @value must
  49505. be unreffed using g_variant_unref() when it is no longer in use.</doc>
  49506. <return-value transfer-ownership="none">
  49507. <doc xml:space="preserve">%TRUE on success, or %FALSE if there is no additional
  49508. attribute</doc>
  49509. <type name="gboolean" c:type="gboolean"/>
  49510. </return-value>
  49511. <parameters>
  49512. <instance-parameter name="iter" transfer-ownership="none">
  49513. <doc xml:space="preserve">a #GMenuAttributeIter</doc>
  49514. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  49515. </instance-parameter>
  49516. <parameter name="out_name"
  49517. direction="out"
  49518. caller-allocates="0"
  49519. transfer-ownership="none"
  49520. optional="1"
  49521. allow-none="1">
  49522. <doc xml:space="preserve">the type of the attribute</doc>
  49523. <type name="utf8" c:type="const gchar**"/>
  49524. </parameter>
  49525. <parameter name="value"
  49526. direction="out"
  49527. caller-allocates="0"
  49528. transfer-ownership="full"
  49529. optional="1"
  49530. allow-none="1">
  49531. <doc xml:space="preserve">the attribute value</doc>
  49532. <type name="GLib.Variant" c:type="GVariant**"/>
  49533. </parameter>
  49534. </parameters>
  49535. </method>
  49536. <method name="get_value"
  49537. c:identifier="g_menu_attribute_iter_get_value"
  49538. version="2.32">
  49539. <doc xml:space="preserve">Gets the value of the attribute at the current iterator position.
  49540. The iterator is not advanced.</doc>
  49541. <return-value transfer-ownership="full">
  49542. <doc xml:space="preserve">the value of the current attribute</doc>
  49543. <type name="GLib.Variant" c:type="GVariant*"/>
  49544. </return-value>
  49545. <parameters>
  49546. <instance-parameter name="iter" transfer-ownership="none">
  49547. <doc xml:space="preserve">a #GMenuAttributeIter</doc>
  49548. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  49549. </instance-parameter>
  49550. </parameters>
  49551. </method>
  49552. <method name="next"
  49553. c:identifier="g_menu_attribute_iter_next"
  49554. version="2.32">
  49555. <doc xml:space="preserve">Attempts to advance the iterator to the next (possibly first)
  49556. attribute.
  49557. %TRUE is returned on success, or %FALSE if there are no more
  49558. attributes.
  49559. You must call this function when you first acquire the iterator
  49560. to advance it to the first attribute (and determine if the first
  49561. attribute exists at all).</doc>
  49562. <return-value transfer-ownership="none">
  49563. <doc xml:space="preserve">%TRUE on success, or %FALSE when there are no more attributes</doc>
  49564. <type name="gboolean" c:type="gboolean"/>
  49565. </return-value>
  49566. <parameters>
  49567. <instance-parameter name="iter" transfer-ownership="none">
  49568. <doc xml:space="preserve">a #GMenuAttributeIter</doc>
  49569. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  49570. </instance-parameter>
  49571. </parameters>
  49572. </method>
  49573. <field name="parent_instance">
  49574. <type name="GObject.Object" c:type="GObject"/>
  49575. </field>
  49576. <field name="priv">
  49577. <type name="MenuAttributeIterPrivate"
  49578. c:type="GMenuAttributeIterPrivate*"/>
  49579. </field>
  49580. </class>
  49581. <record name="MenuAttributeIterClass"
  49582. c:type="GMenuAttributeIterClass"
  49583. glib:is-gtype-struct-for="MenuAttributeIter">
  49584. <field name="parent_class">
  49585. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  49586. </field>
  49587. <field name="get_next">
  49588. <callback name="get_next">
  49589. <return-value transfer-ownership="none">
  49590. <doc xml:space="preserve">%TRUE on success, or %FALSE if there is no additional
  49591. attribute</doc>
  49592. <type name="gboolean" c:type="gboolean"/>
  49593. </return-value>
  49594. <parameters>
  49595. <parameter name="iter" transfer-ownership="none">
  49596. <doc xml:space="preserve">a #GMenuAttributeIter</doc>
  49597. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  49598. </parameter>
  49599. <parameter name="out_name"
  49600. direction="out"
  49601. caller-allocates="0"
  49602. transfer-ownership="none"
  49603. optional="1"
  49604. allow-none="1">
  49605. <doc xml:space="preserve">the type of the attribute</doc>
  49606. <type name="utf8" c:type="const gchar**"/>
  49607. </parameter>
  49608. <parameter name="value"
  49609. direction="out"
  49610. caller-allocates="0"
  49611. transfer-ownership="full"
  49612. optional="1"
  49613. allow-none="1">
  49614. <doc xml:space="preserve">the attribute value</doc>
  49615. <type name="GLib.Variant" c:type="GVariant**"/>
  49616. </parameter>
  49617. </parameters>
  49618. </callback>
  49619. </field>
  49620. </record>
  49621. <record name="MenuAttributeIterPrivate"
  49622. c:type="GMenuAttributeIterPrivate"
  49623. disguised="1">
  49624. </record>
  49625. <class name="MenuItem"
  49626. c:symbol-prefix="menu_item"
  49627. c:type="GMenuItem"
  49628. version="2.32"
  49629. parent="GObject.Object"
  49630. glib:type-name="GMenuItem"
  49631. glib:get-type="g_menu_item_get_type">
  49632. <doc xml:space="preserve">#GMenuItem is an opaque structure type. You must access it using the
  49633. functions below.</doc>
  49634. <constructor name="new" c:identifier="g_menu_item_new" version="2.32">
  49635. <doc xml:space="preserve">Creates a new #GMenuItem.
  49636. If @label is non-%NULL it is used to set the "label" attribute of the
  49637. new item.
  49638. If @detailed_action is non-%NULL it is used to set the "action" and
  49639. possibly the "target" attribute of the new item. See
  49640. g_menu_item_set_detailed_action() for more information.</doc>
  49641. <return-value transfer-ownership="full">
  49642. <doc xml:space="preserve">a new #GMenuItem</doc>
  49643. <type name="MenuItem" c:type="GMenuItem*"/>
  49644. </return-value>
  49645. <parameters>
  49646. <parameter name="label"
  49647. transfer-ownership="none"
  49648. nullable="1"
  49649. allow-none="1">
  49650. <doc xml:space="preserve">the section label, or %NULL</doc>
  49651. <type name="utf8" c:type="const gchar*"/>
  49652. </parameter>
  49653. <parameter name="detailed_action"
  49654. transfer-ownership="none"
  49655. nullable="1"
  49656. allow-none="1">
  49657. <doc xml:space="preserve">the detailed action string, or %NULL</doc>
  49658. <type name="utf8" c:type="const gchar*"/>
  49659. </parameter>
  49660. </parameters>
  49661. </constructor>
  49662. <constructor name="new_from_model"
  49663. c:identifier="g_menu_item_new_from_model"
  49664. version="2.34">
  49665. <doc xml:space="preserve">Creates a #GMenuItem as an exact copy of an existing menu item in a
  49666. #GMenuModel.
  49667. @item_index must be valid (ie: be sure to call
  49668. g_menu_model_get_n_items() first).</doc>
  49669. <return-value transfer-ownership="full">
  49670. <doc xml:space="preserve">a new #GMenuItem.</doc>
  49671. <type name="MenuItem" c:type="GMenuItem*"/>
  49672. </return-value>
  49673. <parameters>
  49674. <parameter name="model" transfer-ownership="none">
  49675. <doc xml:space="preserve">a #GMenuModel</doc>
  49676. <type name="MenuModel" c:type="GMenuModel*"/>
  49677. </parameter>
  49678. <parameter name="item_index" transfer-ownership="none">
  49679. <doc xml:space="preserve">the index of an item in @model</doc>
  49680. <type name="gint" c:type="gint"/>
  49681. </parameter>
  49682. </parameters>
  49683. </constructor>
  49684. <constructor name="new_section"
  49685. c:identifier="g_menu_item_new_section"
  49686. version="2.32">
  49687. <doc xml:space="preserve">Creates a new #GMenuItem representing a section.
  49688. This is a convenience API around g_menu_item_new() and
  49689. g_menu_item_set_section().
  49690. The effect of having one menu appear as a section of another is
  49691. exactly as it sounds: the items from @section become a direct part of
  49692. the menu that @menu_item is added to.
  49693. Visual separation is typically displayed between two non-empty
  49694. sections. If @label is non-%NULL then it will be encorporated into
  49695. this visual indication. This allows for labeled subsections of a
  49696. menu.
  49697. As a simple example, consider a typical "Edit" menu from a simple
  49698. program. It probably contains an "Undo" and "Redo" item, followed by
  49699. a separator, followed by "Cut", "Copy" and "Paste".
  49700. This would be accomplished by creating three #GMenu instances. The
  49701. first would be populated with the "Undo" and "Redo" items, and the
  49702. second with the "Cut", "Copy" and "Paste" items. The first and
  49703. second menus would then be added as submenus of the third. In XML
  49704. format, this would look something like the following:
  49705. |[
  49706. &lt;menu id='edit-menu'&gt;
  49707. &lt;section&gt;
  49708. &lt;item label='Undo'/&gt;
  49709. &lt;item label='Redo'/&gt;
  49710. &lt;/section&gt;
  49711. &lt;section&gt;
  49712. &lt;item label='Cut'/&gt;
  49713. &lt;item label='Copy'/&gt;
  49714. &lt;item label='Paste'/&gt;
  49715. &lt;/section&gt;
  49716. &lt;/menu&gt;
  49717. ]|
  49718. The following example is exactly equivalent. It is more illustrative
  49719. of the exact relationship between the menus and items (keeping in
  49720. mind that the 'link' element defines a new menu that is linked to the
  49721. containing one). The style of the second example is more verbose and
  49722. difficult to read (and therefore not recommended except for the
  49723. purpose of understanding what is really going on).
  49724. |[
  49725. &lt;menu id='edit-menu'&gt;
  49726. &lt;item&gt;
  49727. &lt;link name='section'&gt;
  49728. &lt;item label='Undo'/&gt;
  49729. &lt;item label='Redo'/&gt;
  49730. &lt;/link&gt;
  49731. &lt;/item&gt;
  49732. &lt;item&gt;
  49733. &lt;link name='section'&gt;
  49734. &lt;item label='Cut'/&gt;
  49735. &lt;item label='Copy'/&gt;
  49736. &lt;item label='Paste'/&gt;
  49737. &lt;/link&gt;
  49738. &lt;/item&gt;
  49739. &lt;/menu&gt;
  49740. ]|</doc>
  49741. <return-value transfer-ownership="full">
  49742. <doc xml:space="preserve">a new #GMenuItem</doc>
  49743. <type name="MenuItem" c:type="GMenuItem*"/>
  49744. </return-value>
  49745. <parameters>
  49746. <parameter name="label"
  49747. transfer-ownership="none"
  49748. nullable="1"
  49749. allow-none="1">
  49750. <doc xml:space="preserve">the section label, or %NULL</doc>
  49751. <type name="utf8" c:type="const gchar*"/>
  49752. </parameter>
  49753. <parameter name="section" transfer-ownership="none">
  49754. <doc xml:space="preserve">a #GMenuModel with the items of the section</doc>
  49755. <type name="MenuModel" c:type="GMenuModel*"/>
  49756. </parameter>
  49757. </parameters>
  49758. </constructor>
  49759. <constructor name="new_submenu"
  49760. c:identifier="g_menu_item_new_submenu"
  49761. version="2.32">
  49762. <doc xml:space="preserve">Creates a new #GMenuItem representing a submenu.
  49763. This is a convenience API around g_menu_item_new() and
  49764. g_menu_item_set_submenu().</doc>
  49765. <return-value transfer-ownership="full">
  49766. <doc xml:space="preserve">a new #GMenuItem</doc>
  49767. <type name="MenuItem" c:type="GMenuItem*"/>
  49768. </return-value>
  49769. <parameters>
  49770. <parameter name="label"
  49771. transfer-ownership="none"
  49772. nullable="1"
  49773. allow-none="1">
  49774. <doc xml:space="preserve">the section label, or %NULL</doc>
  49775. <type name="utf8" c:type="const gchar*"/>
  49776. </parameter>
  49777. <parameter name="submenu" transfer-ownership="none">
  49778. <doc xml:space="preserve">a #GMenuModel with the items of the submenu</doc>
  49779. <type name="MenuModel" c:type="GMenuModel*"/>
  49780. </parameter>
  49781. </parameters>
  49782. </constructor>
  49783. <method name="get_attribute"
  49784. c:identifier="g_menu_item_get_attribute"
  49785. version="2.34"
  49786. introspectable="0">
  49787. <doc xml:space="preserve">Queries the named @attribute on @menu_item.
  49788. If the attribute exists and matches the #GVariantType corresponding
  49789. to @format_string then @format_string is used to deconstruct the
  49790. value into the positional parameters and %TRUE is returned.
  49791. If the attribute does not exist, or it does exist but has the wrong
  49792. type, then the positional parameters are ignored and %FALSE is
  49793. returned.</doc>
  49794. <return-value transfer-ownership="none">
  49795. <doc xml:space="preserve">%TRUE if the named attribute was found with the expected
  49796. type</doc>
  49797. <type name="gboolean" c:type="gboolean"/>
  49798. </return-value>
  49799. <parameters>
  49800. <instance-parameter name="menu_item" transfer-ownership="none">
  49801. <doc xml:space="preserve">a #GMenuItem</doc>
  49802. <type name="MenuItem" c:type="GMenuItem*"/>
  49803. </instance-parameter>
  49804. <parameter name="attribute" transfer-ownership="none">
  49805. <doc xml:space="preserve">the attribute name to query</doc>
  49806. <type name="utf8" c:type="const gchar*"/>
  49807. </parameter>
  49808. <parameter name="format_string" transfer-ownership="none">
  49809. <doc xml:space="preserve">a #GVariant format string</doc>
  49810. <type name="utf8" c:type="const gchar*"/>
  49811. </parameter>
  49812. <parameter name="..." transfer-ownership="none">
  49813. <doc xml:space="preserve">positional parameters, as per @format_string</doc>
  49814. <varargs/>
  49815. </parameter>
  49816. </parameters>
  49817. </method>
  49818. <method name="get_attribute_value"
  49819. c:identifier="g_menu_item_get_attribute_value"
  49820. version="2.34">
  49821. <doc xml:space="preserve">Queries the named @attribute on @menu_item.
  49822. If @expected_type is specified and the attribute does not have this
  49823. type, %NULL is returned. %NULL is also returned if the attribute
  49824. simply does not exist.</doc>
  49825. <return-value transfer-ownership="full">
  49826. <doc xml:space="preserve">the attribute value, or %NULL</doc>
  49827. <type name="GLib.Variant" c:type="GVariant*"/>
  49828. </return-value>
  49829. <parameters>
  49830. <instance-parameter name="menu_item" transfer-ownership="none">
  49831. <doc xml:space="preserve">a #GMenuItem</doc>
  49832. <type name="MenuItem" c:type="GMenuItem*"/>
  49833. </instance-parameter>
  49834. <parameter name="attribute" transfer-ownership="none">
  49835. <doc xml:space="preserve">the attribute name to query</doc>
  49836. <type name="utf8" c:type="const gchar*"/>
  49837. </parameter>
  49838. <parameter name="expected_type"
  49839. transfer-ownership="none"
  49840. nullable="1"
  49841. allow-none="1">
  49842. <doc xml:space="preserve">the expected type of the attribute</doc>
  49843. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  49844. </parameter>
  49845. </parameters>
  49846. </method>
  49847. <method name="get_link"
  49848. c:identifier="g_menu_item_get_link"
  49849. version="2.34">
  49850. <doc xml:space="preserve">Queries the named @link on @menu_item.</doc>
  49851. <return-value transfer-ownership="full">
  49852. <doc xml:space="preserve">the link, or %NULL</doc>
  49853. <type name="MenuModel" c:type="GMenuModel*"/>
  49854. </return-value>
  49855. <parameters>
  49856. <instance-parameter name="menu_item" transfer-ownership="none">
  49857. <doc xml:space="preserve">a #GMenuItem</doc>
  49858. <type name="MenuItem" c:type="GMenuItem*"/>
  49859. </instance-parameter>
  49860. <parameter name="link" transfer-ownership="none">
  49861. <doc xml:space="preserve">the link name to query</doc>
  49862. <type name="utf8" c:type="const gchar*"/>
  49863. </parameter>
  49864. </parameters>
  49865. </method>
  49866. <method name="set_action_and_target"
  49867. c:identifier="g_menu_item_set_action_and_target"
  49868. version="2.32"
  49869. introspectable="0">
  49870. <doc xml:space="preserve">Sets or unsets the "action" and "target" attributes of @menu_item.
  49871. If @action is %NULL then both the "action" and "target" attributes
  49872. are unset (and @format_string is ignored along with the positional
  49873. parameters).
  49874. If @action is non-%NULL then the "action" attribute is set.
  49875. @format_string is then inspected. If it is non-%NULL then the proper
  49876. position parameters are collected to create a #GVariant instance to
  49877. use as the target value. If it is %NULL then the positional
  49878. parameters are ignored and the "target" attribute is unset.
  49879. See also g_menu_item_set_action_and_target_value() for an equivalent
  49880. call that directly accepts a #GVariant. See
  49881. g_menu_item_set_detailed_action() for a more convenient version that
  49882. works with string-typed targets.
  49883. See also g_menu_item_set_action_and_target_value() for a
  49884. description of the semantics of the action and target attributes.</doc>
  49885. <return-value transfer-ownership="none">
  49886. <type name="none" c:type="void"/>
  49887. </return-value>
  49888. <parameters>
  49889. <instance-parameter name="menu_item" transfer-ownership="none">
  49890. <doc xml:space="preserve">a #GMenuItem</doc>
  49891. <type name="MenuItem" c:type="GMenuItem*"/>
  49892. </instance-parameter>
  49893. <parameter name="action"
  49894. transfer-ownership="none"
  49895. nullable="1"
  49896. allow-none="1">
  49897. <doc xml:space="preserve">the name of the action for this item</doc>
  49898. <type name="utf8" c:type="const gchar*"/>
  49899. </parameter>
  49900. <parameter name="format_string"
  49901. transfer-ownership="none"
  49902. nullable="1"
  49903. allow-none="1">
  49904. <doc xml:space="preserve">a GVariant format string</doc>
  49905. <type name="utf8" c:type="const gchar*"/>
  49906. </parameter>
  49907. <parameter name="..." transfer-ownership="none">
  49908. <doc xml:space="preserve">positional parameters, as per @format_string</doc>
  49909. <varargs/>
  49910. </parameter>
  49911. </parameters>
  49912. </method>
  49913. <method name="set_action_and_target_value"
  49914. c:identifier="g_menu_item_set_action_and_target_value"
  49915. version="2.32">
  49916. <doc xml:space="preserve">Sets or unsets the "action" and "target" attributes of @menu_item.
  49917. If @action is %NULL then both the "action" and "target" attributes
  49918. are unset (and @target_value is ignored).
  49919. If @action is non-%NULL then the "action" attribute is set. The
  49920. "target" attribute is then set to the value of @target_value if it is
  49921. non-%NULL or unset otherwise.
  49922. Normal menu items (ie: not submenu, section or other custom item
  49923. types) are expected to have the "action" attribute set to identify
  49924. the action that they are associated with. The state type of the
  49925. action help to determine the disposition of the menu item. See
  49926. #GAction and #GActionGroup for an overview of actions.
  49927. In general, clicking on the menu item will result in activation of
  49928. the named action with the "target" attribute given as the parameter
  49929. to the action invocation. If the "target" attribute is not set then
  49930. the action is invoked with no parameter.
  49931. If the action has no state then the menu item is usually drawn as a
  49932. plain menu item (ie: with no additional decoration).
  49933. If the action has a boolean state then the menu item is usually drawn
  49934. as a toggle menu item (ie: with a checkmark or equivalent
  49935. indication). The item should be marked as 'toggled' or 'checked'
  49936. when the boolean state is %TRUE.
  49937. If the action has a string state then the menu item is usually drawn
  49938. as a radio menu item (ie: with a radio bullet or equivalent
  49939. indication). The item should be marked as 'selected' when the string
  49940. state is equal to the value of the @target property.
  49941. See g_menu_item_set_action_and_target() or
  49942. g_menu_item_set_detailed_action() for two equivalent calls that are
  49943. probably more convenient for most uses.</doc>
  49944. <return-value transfer-ownership="none">
  49945. <type name="none" c:type="void"/>
  49946. </return-value>
  49947. <parameters>
  49948. <instance-parameter name="menu_item" transfer-ownership="none">
  49949. <doc xml:space="preserve">a #GMenuItem</doc>
  49950. <type name="MenuItem" c:type="GMenuItem*"/>
  49951. </instance-parameter>
  49952. <parameter name="action"
  49953. transfer-ownership="none"
  49954. nullable="1"
  49955. allow-none="1">
  49956. <doc xml:space="preserve">the name of the action for this item</doc>
  49957. <type name="utf8" c:type="const gchar*"/>
  49958. </parameter>
  49959. <parameter name="target_value"
  49960. transfer-ownership="none"
  49961. nullable="1"
  49962. allow-none="1">
  49963. <doc xml:space="preserve">a #GVariant to use as the action target</doc>
  49964. <type name="GLib.Variant" c:type="GVariant*"/>
  49965. </parameter>
  49966. </parameters>
  49967. </method>
  49968. <method name="set_attribute"
  49969. c:identifier="g_menu_item_set_attribute"
  49970. version="2.32"
  49971. introspectable="0">
  49972. <doc xml:space="preserve">Sets or unsets an attribute on @menu_item.
  49973. The attribute to set or unset is specified by @attribute. This
  49974. can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
  49975. %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
  49976. attribute name.
  49977. Attribute names are restricted to lowercase characters, numbers
  49978. and '-'. Furthermore, the names must begin with a lowercase character,
  49979. must not end with a '-', and must not contain consecutive dashes.
  49980. If @format_string is non-%NULL then the proper position parameters
  49981. are collected to create a #GVariant instance to use as the attribute
  49982. value. If it is %NULL then the positional parameterrs are ignored
  49983. and the named attribute is unset.
  49984. See also g_menu_item_set_attribute_value() for an equivalent call
  49985. that directly accepts a #GVariant.</doc>
  49986. <return-value transfer-ownership="none">
  49987. <type name="none" c:type="void"/>
  49988. </return-value>
  49989. <parameters>
  49990. <instance-parameter name="menu_item" transfer-ownership="none">
  49991. <doc xml:space="preserve">a #GMenuItem</doc>
  49992. <type name="MenuItem" c:type="GMenuItem*"/>
  49993. </instance-parameter>
  49994. <parameter name="attribute" transfer-ownership="none">
  49995. <doc xml:space="preserve">the attribute to set</doc>
  49996. <type name="utf8" c:type="const gchar*"/>
  49997. </parameter>
  49998. <parameter name="format_string"
  49999. transfer-ownership="none"
  50000. nullable="1"
  50001. allow-none="1">
  50002. <doc xml:space="preserve">a #GVariant format string, or %NULL</doc>
  50003. <type name="utf8" c:type="const gchar*"/>
  50004. </parameter>
  50005. <parameter name="..." transfer-ownership="none">
  50006. <doc xml:space="preserve">positional parameters, as per @format_string</doc>
  50007. <varargs/>
  50008. </parameter>
  50009. </parameters>
  50010. </method>
  50011. <method name="set_attribute_value"
  50012. c:identifier="g_menu_item_set_attribute_value"
  50013. version="2.32">
  50014. <doc xml:space="preserve">Sets or unsets an attribute on @menu_item.
  50015. The attribute to set or unset is specified by @attribute. This
  50016. can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
  50017. %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
  50018. attribute name.
  50019. Attribute names are restricted to lowercase characters, numbers
  50020. and '-'. Furthermore, the names must begin with a lowercase character,
  50021. must not end with a '-', and must not contain consecutive dashes.
  50022. must consist only of lowercase
  50023. ASCII characters, digits and '-'.
  50024. If @value is non-%NULL then it is used as the new value for the
  50025. attribute. If @value is %NULL then the attribute is unset. If
  50026. the @value #GVariant is floating, it is consumed.
  50027. See also g_menu_item_set_attribute() for a more convenient way to do
  50028. the same.</doc>
  50029. <return-value transfer-ownership="none">
  50030. <type name="none" c:type="void"/>
  50031. </return-value>
  50032. <parameters>
  50033. <instance-parameter name="menu_item" transfer-ownership="none">
  50034. <doc xml:space="preserve">a #GMenuItem</doc>
  50035. <type name="MenuItem" c:type="GMenuItem*"/>
  50036. </instance-parameter>
  50037. <parameter name="attribute" transfer-ownership="none">
  50038. <doc xml:space="preserve">the attribute to set</doc>
  50039. <type name="utf8" c:type="const gchar*"/>
  50040. </parameter>
  50041. <parameter name="value"
  50042. transfer-ownership="none"
  50043. nullable="1"
  50044. allow-none="1">
  50045. <doc xml:space="preserve">a #GVariant to use as the value, or %NULL</doc>
  50046. <type name="GLib.Variant" c:type="GVariant*"/>
  50047. </parameter>
  50048. </parameters>
  50049. </method>
  50050. <method name="set_detailed_action"
  50051. c:identifier="g_menu_item_set_detailed_action"
  50052. version="2.32">
  50053. <doc xml:space="preserve">Sets the "action" and possibly the "target" attribute of @menu_item.
  50054. The format of @detailed_action is the same format parsed by
  50055. g_action_parse_detailed_name().
  50056. See g_menu_item_set_action_and_target() or
  50057. g_menu_item_set_action_and_target_value() for more flexible (but
  50058. slightly less convenient) alternatives.
  50059. See also g_menu_item_set_action_and_target_value() for a description of
  50060. the semantics of the action and target attributes.</doc>
  50061. <return-value transfer-ownership="none">
  50062. <type name="none" c:type="void"/>
  50063. </return-value>
  50064. <parameters>
  50065. <instance-parameter name="menu_item" transfer-ownership="none">
  50066. <doc xml:space="preserve">a #GMenuItem</doc>
  50067. <type name="MenuItem" c:type="GMenuItem*"/>
  50068. </instance-parameter>
  50069. <parameter name="detailed_action" transfer-ownership="none">
  50070. <doc xml:space="preserve">the "detailed" action string</doc>
  50071. <type name="utf8" c:type="const gchar*"/>
  50072. </parameter>
  50073. </parameters>
  50074. </method>
  50075. <method name="set_icon"
  50076. c:identifier="g_menu_item_set_icon"
  50077. version="2.38">
  50078. <doc xml:space="preserve">Sets (or unsets) the icon on @menu_item.
  50079. This call is the same as calling g_icon_serialize() and using the
  50080. result as the value to g_menu_item_set_attribute_value() for
  50081. %G_MENU_ATTRIBUTE_ICON.
  50082. This API is only intended for use with "noun" menu items; things like
  50083. bookmarks or applications in an "Open With" menu. Don't use it on
  50084. menu items corresponding to verbs (eg: stock icons for 'Save' or
  50085. 'Quit').
  50086. If @icon is %NULL then the icon is unset.</doc>
  50087. <return-value transfer-ownership="none">
  50088. <type name="none" c:type="void"/>
  50089. </return-value>
  50090. <parameters>
  50091. <instance-parameter name="menu_item" transfer-ownership="none">
  50092. <doc xml:space="preserve">a #GMenuItem</doc>
  50093. <type name="MenuItem" c:type="GMenuItem*"/>
  50094. </instance-parameter>
  50095. <parameter name="icon" transfer-ownership="none">
  50096. <doc xml:space="preserve">a #GIcon, or %NULL</doc>
  50097. <type name="Icon" c:type="GIcon*"/>
  50098. </parameter>
  50099. </parameters>
  50100. </method>
  50101. <method name="set_label"
  50102. c:identifier="g_menu_item_set_label"
  50103. version="2.32">
  50104. <doc xml:space="preserve">Sets or unsets the "label" attribute of @menu_item.
  50105. If @label is non-%NULL it is used as the label for the menu item. If
  50106. it is %NULL then the label attribute is unset.</doc>
  50107. <return-value transfer-ownership="none">
  50108. <type name="none" c:type="void"/>
  50109. </return-value>
  50110. <parameters>
  50111. <instance-parameter name="menu_item" transfer-ownership="none">
  50112. <doc xml:space="preserve">a #GMenuItem</doc>
  50113. <type name="MenuItem" c:type="GMenuItem*"/>
  50114. </instance-parameter>
  50115. <parameter name="label"
  50116. transfer-ownership="none"
  50117. nullable="1"
  50118. allow-none="1">
  50119. <doc xml:space="preserve">the label to set, or %NULL to unset</doc>
  50120. <type name="utf8" c:type="const gchar*"/>
  50121. </parameter>
  50122. </parameters>
  50123. </method>
  50124. <method name="set_link"
  50125. c:identifier="g_menu_item_set_link"
  50126. version="2.32">
  50127. <doc xml:space="preserve">Creates a link from @menu_item to @model if non-%NULL, or unsets it.
  50128. Links are used to establish a relationship between a particular menu
  50129. item and another menu. For example, %G_MENU_LINK_SUBMENU is used to
  50130. associate a submenu with a particular menu item, and %G_MENU_LINK_SECTION
  50131. is used to create a section. Other types of link can be used, but there
  50132. is no guarantee that clients will be able to make sense of them.
  50133. Link types are restricted to lowercase characters, numbers
  50134. and '-'. Furthermore, the names must begin with a lowercase character,
  50135. must not end with a '-', and must not contain consecutive dashes.</doc>
  50136. <return-value transfer-ownership="none">
  50137. <type name="none" c:type="void"/>
  50138. </return-value>
  50139. <parameters>
  50140. <instance-parameter name="menu_item" transfer-ownership="none">
  50141. <doc xml:space="preserve">a #GMenuItem</doc>
  50142. <type name="MenuItem" c:type="GMenuItem*"/>
  50143. </instance-parameter>
  50144. <parameter name="link" transfer-ownership="none">
  50145. <doc xml:space="preserve">type of link to establish or unset</doc>
  50146. <type name="utf8" c:type="const gchar*"/>
  50147. </parameter>
  50148. <parameter name="model"
  50149. transfer-ownership="none"
  50150. nullable="1"
  50151. allow-none="1">
  50152. <doc xml:space="preserve">the #GMenuModel to link to (or %NULL to unset)</doc>
  50153. <type name="MenuModel" c:type="GMenuModel*"/>
  50154. </parameter>
  50155. </parameters>
  50156. </method>
  50157. <method name="set_section"
  50158. c:identifier="g_menu_item_set_section"
  50159. version="2.32">
  50160. <doc xml:space="preserve">Sets or unsets the "section" link of @menu_item to @section.
  50161. The effect of having one menu appear as a section of another is
  50162. exactly as it sounds: the items from @section become a direct part of
  50163. the menu that @menu_item is added to. See g_menu_item_new_section()
  50164. for more information about what it means for a menu item to be a
  50165. section.</doc>
  50166. <return-value transfer-ownership="none">
  50167. <type name="none" c:type="void"/>
  50168. </return-value>
  50169. <parameters>
  50170. <instance-parameter name="menu_item" transfer-ownership="none">
  50171. <doc xml:space="preserve">a #GMenuItem</doc>
  50172. <type name="MenuItem" c:type="GMenuItem*"/>
  50173. </instance-parameter>
  50174. <parameter name="section"
  50175. transfer-ownership="none"
  50176. nullable="1"
  50177. allow-none="1">
  50178. <doc xml:space="preserve">a #GMenuModel, or %NULL</doc>
  50179. <type name="MenuModel" c:type="GMenuModel*"/>
  50180. </parameter>
  50181. </parameters>
  50182. </method>
  50183. <method name="set_submenu"
  50184. c:identifier="g_menu_item_set_submenu"
  50185. version="2.32">
  50186. <doc xml:space="preserve">Sets or unsets the "submenu" link of @menu_item to @submenu.
  50187. If @submenu is non-%NULL, it is linked to. If it is %NULL then the
  50188. link is unset.
  50189. The effect of having one menu appear as a submenu of another is
  50190. exactly as it sounds.</doc>
  50191. <return-value transfer-ownership="none">
  50192. <type name="none" c:type="void"/>
  50193. </return-value>
  50194. <parameters>
  50195. <instance-parameter name="menu_item" transfer-ownership="none">
  50196. <doc xml:space="preserve">a #GMenuItem</doc>
  50197. <type name="MenuItem" c:type="GMenuItem*"/>
  50198. </instance-parameter>
  50199. <parameter name="submenu"
  50200. transfer-ownership="none"
  50201. nullable="1"
  50202. allow-none="1">
  50203. <doc xml:space="preserve">a #GMenuModel, or %NULL</doc>
  50204. <type name="MenuModel" c:type="GMenuModel*"/>
  50205. </parameter>
  50206. </parameters>
  50207. </method>
  50208. </class>
  50209. <class name="MenuLinkIter"
  50210. c:symbol-prefix="menu_link_iter"
  50211. c:type="GMenuLinkIter"
  50212. version="2.32"
  50213. parent="GObject.Object"
  50214. abstract="1"
  50215. glib:type-name="GMenuLinkIter"
  50216. glib:get-type="g_menu_link_iter_get_type"
  50217. glib:type-struct="MenuLinkIterClass">
  50218. <doc xml:space="preserve">#GMenuLinkIter is an opaque structure type. You must access it using
  50219. the functions below.</doc>
  50220. <virtual-method name="get_next" invoker="get_next" version="2.32">
  50221. <doc xml:space="preserve">This function combines g_menu_link_iter_next() with
  50222. g_menu_link_iter_get_name() and g_menu_link_iter_get_value().
  50223. First the iterator is advanced to the next (possibly first) link.
  50224. If that fails, then %FALSE is returned and there are no other effects.
  50225. If successful, @out_link and @value are set to the name and #GMenuModel
  50226. of the link that has just been advanced to. At this point,
  50227. g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the
  50228. same values again.
  50229. The value returned in @out_link remains valid for as long as the iterator
  50230. remains at the current position. The value returned in @value must
  50231. be unreffed using g_object_unref() when it is no longer in use.</doc>
  50232. <return-value transfer-ownership="none">
  50233. <doc xml:space="preserve">%TRUE on success, or %FALSE if there is no additional link</doc>
  50234. <type name="gboolean" c:type="gboolean"/>
  50235. </return-value>
  50236. <parameters>
  50237. <instance-parameter name="iter" transfer-ownership="none">
  50238. <doc xml:space="preserve">a #GMenuLinkIter</doc>
  50239. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50240. </instance-parameter>
  50241. <parameter name="out_link"
  50242. direction="out"
  50243. caller-allocates="0"
  50244. transfer-ownership="none"
  50245. optional="1"
  50246. allow-none="1">
  50247. <doc xml:space="preserve">the name of the link</doc>
  50248. <type name="utf8" c:type="const gchar**"/>
  50249. </parameter>
  50250. <parameter name="value"
  50251. direction="out"
  50252. caller-allocates="0"
  50253. transfer-ownership="full"
  50254. optional="1"
  50255. allow-none="1">
  50256. <doc xml:space="preserve">the linked #GMenuModel</doc>
  50257. <type name="MenuModel" c:type="GMenuModel**"/>
  50258. </parameter>
  50259. </parameters>
  50260. </virtual-method>
  50261. <method name="get_name"
  50262. c:identifier="g_menu_link_iter_get_name"
  50263. version="2.32">
  50264. <doc xml:space="preserve">Gets the name of the link at the current iterator position.
  50265. The iterator is not advanced.</doc>
  50266. <return-value transfer-ownership="none">
  50267. <doc xml:space="preserve">the type of the link</doc>
  50268. <type name="utf8" c:type="const gchar*"/>
  50269. </return-value>
  50270. <parameters>
  50271. <instance-parameter name="iter" transfer-ownership="none">
  50272. <doc xml:space="preserve">a #GMenuLinkIter</doc>
  50273. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50274. </instance-parameter>
  50275. </parameters>
  50276. </method>
  50277. <method name="get_next"
  50278. c:identifier="g_menu_link_iter_get_next"
  50279. version="2.32">
  50280. <doc xml:space="preserve">This function combines g_menu_link_iter_next() with
  50281. g_menu_link_iter_get_name() and g_menu_link_iter_get_value().
  50282. First the iterator is advanced to the next (possibly first) link.
  50283. If that fails, then %FALSE is returned and there are no other effects.
  50284. If successful, @out_link and @value are set to the name and #GMenuModel
  50285. of the link that has just been advanced to. At this point,
  50286. g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the
  50287. same values again.
  50288. The value returned in @out_link remains valid for as long as the iterator
  50289. remains at the current position. The value returned in @value must
  50290. be unreffed using g_object_unref() when it is no longer in use.</doc>
  50291. <return-value transfer-ownership="none">
  50292. <doc xml:space="preserve">%TRUE on success, or %FALSE if there is no additional link</doc>
  50293. <type name="gboolean" c:type="gboolean"/>
  50294. </return-value>
  50295. <parameters>
  50296. <instance-parameter name="iter" transfer-ownership="none">
  50297. <doc xml:space="preserve">a #GMenuLinkIter</doc>
  50298. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50299. </instance-parameter>
  50300. <parameter name="out_link"
  50301. direction="out"
  50302. caller-allocates="0"
  50303. transfer-ownership="none"
  50304. optional="1"
  50305. allow-none="1">
  50306. <doc xml:space="preserve">the name of the link</doc>
  50307. <type name="utf8" c:type="const gchar**"/>
  50308. </parameter>
  50309. <parameter name="value"
  50310. direction="out"
  50311. caller-allocates="0"
  50312. transfer-ownership="full"
  50313. optional="1"
  50314. allow-none="1">
  50315. <doc xml:space="preserve">the linked #GMenuModel</doc>
  50316. <type name="MenuModel" c:type="GMenuModel**"/>
  50317. </parameter>
  50318. </parameters>
  50319. </method>
  50320. <method name="get_value"
  50321. c:identifier="g_menu_link_iter_get_value"
  50322. version="2.32">
  50323. <doc xml:space="preserve">Gets the linked #GMenuModel at the current iterator position.
  50324. The iterator is not advanced.</doc>
  50325. <return-value transfer-ownership="full">
  50326. <doc xml:space="preserve">the #GMenuModel that is linked to</doc>
  50327. <type name="MenuModel" c:type="GMenuModel*"/>
  50328. </return-value>
  50329. <parameters>
  50330. <instance-parameter name="iter" transfer-ownership="none">
  50331. <doc xml:space="preserve">a #GMenuLinkIter</doc>
  50332. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50333. </instance-parameter>
  50334. </parameters>
  50335. </method>
  50336. <method name="next" c:identifier="g_menu_link_iter_next" version="2.32">
  50337. <doc xml:space="preserve">Attempts to advance the iterator to the next (possibly first)
  50338. link.
  50339. %TRUE is returned on success, or %FALSE if there are no more links.
  50340. You must call this function when you first acquire the iterator to
  50341. advance it to the first link (and determine if the first link exists
  50342. at all).</doc>
  50343. <return-value transfer-ownership="none">
  50344. <doc xml:space="preserve">%TRUE on success, or %FALSE when there are no more links</doc>
  50345. <type name="gboolean" c:type="gboolean"/>
  50346. </return-value>
  50347. <parameters>
  50348. <instance-parameter name="iter" transfer-ownership="none">
  50349. <doc xml:space="preserve">a #GMenuLinkIter</doc>
  50350. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50351. </instance-parameter>
  50352. </parameters>
  50353. </method>
  50354. <field name="parent_instance">
  50355. <type name="GObject.Object" c:type="GObject"/>
  50356. </field>
  50357. <field name="priv">
  50358. <type name="MenuLinkIterPrivate" c:type="GMenuLinkIterPrivate*"/>
  50359. </field>
  50360. </class>
  50361. <record name="MenuLinkIterClass"
  50362. c:type="GMenuLinkIterClass"
  50363. glib:is-gtype-struct-for="MenuLinkIter">
  50364. <field name="parent_class">
  50365. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  50366. </field>
  50367. <field name="get_next">
  50368. <callback name="get_next">
  50369. <return-value transfer-ownership="none">
  50370. <doc xml:space="preserve">%TRUE on success, or %FALSE if there is no additional link</doc>
  50371. <type name="gboolean" c:type="gboolean"/>
  50372. </return-value>
  50373. <parameters>
  50374. <parameter name="iter" transfer-ownership="none">
  50375. <doc xml:space="preserve">a #GMenuLinkIter</doc>
  50376. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50377. </parameter>
  50378. <parameter name="out_link"
  50379. direction="out"
  50380. caller-allocates="0"
  50381. transfer-ownership="none"
  50382. optional="1"
  50383. allow-none="1">
  50384. <doc xml:space="preserve">the name of the link</doc>
  50385. <type name="utf8" c:type="const gchar**"/>
  50386. </parameter>
  50387. <parameter name="value"
  50388. direction="out"
  50389. caller-allocates="0"
  50390. transfer-ownership="full"
  50391. optional="1"
  50392. allow-none="1">
  50393. <doc xml:space="preserve">the linked #GMenuModel</doc>
  50394. <type name="MenuModel" c:type="GMenuModel**"/>
  50395. </parameter>
  50396. </parameters>
  50397. </callback>
  50398. </field>
  50399. </record>
  50400. <record name="MenuLinkIterPrivate"
  50401. c:type="GMenuLinkIterPrivate"
  50402. disguised="1">
  50403. </record>
  50404. <class name="MenuModel"
  50405. c:symbol-prefix="menu_model"
  50406. c:type="GMenuModel"
  50407. version="2.32"
  50408. parent="GObject.Object"
  50409. abstract="1"
  50410. glib:type-name="GMenuModel"
  50411. glib:get-type="g_menu_model_get_type"
  50412. glib:type-struct="MenuModelClass">
  50413. <doc xml:space="preserve">#GMenuModel represents the contents of a menu -- an ordered list of
  50414. menu items. The items are associated with actions, which can be
  50415. activated through them. Items can be grouped in sections, and may
  50416. have submenus associated with them. Both items and sections usually
  50417. have some representation data, such as labels or icons. The type of
  50418. the associated action (ie whether it is stateful, and what kind of
  50419. state it has) can influence the representation of the item.
  50420. The conceptual model of menus in #GMenuModel is hierarchical:
  50421. sections and submenus are again represented by #GMenuModels.
  50422. Menus themselves do not define their own roles. Rather, the role
  50423. of a particular #GMenuModel is defined by the item that references
  50424. it (or, in the case of the 'root' menu, is defined by the context
  50425. in which it is used).
  50426. As an example, consider the visible portions of this menu:
  50427. ## An example menu # {#menu-example}
  50428. ![](menu-example.png)
  50429. There are 8 "menus" visible in the screenshot: one menubar, two
  50430. submenus and 5 sections:
  50431. - the toplevel menubar (containing 4 items)
  50432. - the View submenu (containing 3 sections)
  50433. - the first section of the View submenu (containing 2 items)
  50434. - the second section of the View submenu (containing 1 item)
  50435. - the final section of the View submenu (containing 1 item)
  50436. - the Highlight Mode submenu (containing 2 sections)
  50437. - the Sources section (containing 2 items)
  50438. - the Markup section (containing 2 items)
  50439. The [example][menu-model] illustrates the conceptual connection between
  50440. these 8 menus. Each large block in the figure represents a menu and the
  50441. smaller blocks within the large block represent items in that menu. Some
  50442. items contain references to other menus.
  50443. ## A menu example # {#menu-model}
  50444. ![](menu-model.png)
  50445. Notice that the separators visible in the [example][menu-example]
  50446. appear nowhere in the [menu model][menu-model]. This is because
  50447. separators are not explicitly represented in the menu model. Instead,
  50448. a separator is inserted between any two non-empty sections of a menu.
  50449. Section items can have labels just like any other item. In that case,
  50450. a display system may show a section header instead of a separator.
  50451. The motivation for this abstract model of application controls is
  50452. that modern user interfaces tend to make these controls available
  50453. outside the application. Examples include global menus, jumplists,
  50454. dash boards, etc. To support such uses, it is necessary to 'export'
  50455. information about actions and their representation in menus, which
  50456. is exactly what the [GActionGroup exporter][gio-GActionGroup-exporter]
  50457. and the [GMenuModel exporter][gio-GMenuModel-exporter] do for
  50458. #GActionGroup and #GMenuModel. The client-side counterparts to
  50459. make use of the exported information are #GDBusActionGroup and
  50460. #GDBusMenuModel.
  50461. The API of #GMenuModel is very generic, with iterators for the
  50462. attributes and links of an item, see g_menu_model_iterate_item_attributes()
  50463. and g_menu_model_iterate_item_links(). The 'standard' attributes and
  50464. link types have predefined names: %G_MENU_ATTRIBUTE_LABEL,
  50465. %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, %G_MENU_LINK_SECTION
  50466. and %G_MENU_LINK_SUBMENU.
  50467. Items in a #GMenuModel represent active controls if they refer to
  50468. an action that can get activated when the user interacts with the
  50469. menu item. The reference to the action is encoded by the string id
  50470. in the %G_MENU_ATTRIBUTE_ACTION attribute. An action id uniquely
  50471. identifies an action in an action group. Which action group(s) provide
  50472. actions depends on the context in which the menu model is used.
  50473. E.g. when the model is exported as the application menu of a
  50474. #GtkApplication, actions can be application-wide or window-specific
  50475. (and thus come from two different action groups). By convention, the
  50476. application-wide actions have names that start with "app.", while the
  50477. names of window-specific actions start with "win.".
  50478. While a wide variety of stateful actions is possible, the following
  50479. is the minimum that is expected to be supported by all users of exported
  50480. menu information:
  50481. - an action with no parameter type and no state
  50482. - an action with no parameter type and boolean state
  50483. - an action with string parameter type and string state
  50484. ## Stateless
  50485. A stateless action typically corresponds to an ordinary menu item.
  50486. Selecting such a menu item will activate the action (with no parameter).
  50487. ## Boolean State
  50488. An action with a boolean state will most typically be used with a "toggle"
  50489. or "switch" menu item. The state can be set directly, but activating the
  50490. action (with no parameter) results in the state being toggled.
  50491. Selecting a toggle menu item will activate the action. The menu item should
  50492. be rendered as "checked" when the state is true.
  50493. ## String Parameter and State
  50494. Actions with string parameters and state will most typically be used to
  50495. represent an enumerated choice over the items available for a group of
  50496. radio menu items. Activating the action with a string parameter is
  50497. equivalent to setting that parameter as the state.
  50498. Radio menu items, in addition to being associated with the action, will
  50499. have a target value. Selecting that menu item will result in activation
  50500. of the action with the target value as the parameter. The menu item should
  50501. be rendered as "selected" when the state of the action is equal to the
  50502. target value of the menu item.</doc>
  50503. <virtual-method name="get_item_attribute_value"
  50504. invoker="get_item_attribute_value"
  50505. version="2.32">
  50506. <doc xml:space="preserve">Queries the item at position @item_index in @model for the attribute
  50507. specified by @attribute.
  50508. If @expected_type is non-%NULL then it specifies the expected type of
  50509. the attribute. If it is %NULL then any type will be accepted.
  50510. If the attribute exists and matches @expected_type (or if the
  50511. expected type is unspecified) then the value is returned.
  50512. If the attribute does not exist, or does not match the expected type
  50513. then %NULL is returned.</doc>
  50514. <return-value transfer-ownership="full">
  50515. <doc xml:space="preserve">the value of the attribute</doc>
  50516. <type name="GLib.Variant" c:type="GVariant*"/>
  50517. </return-value>
  50518. <parameters>
  50519. <instance-parameter name="model" transfer-ownership="none">
  50520. <doc xml:space="preserve">a #GMenuModel</doc>
  50521. <type name="MenuModel" c:type="GMenuModel*"/>
  50522. </instance-parameter>
  50523. <parameter name="item_index" transfer-ownership="none">
  50524. <doc xml:space="preserve">the index of the item</doc>
  50525. <type name="gint" c:type="gint"/>
  50526. </parameter>
  50527. <parameter name="attribute" transfer-ownership="none">
  50528. <doc xml:space="preserve">the attribute to query</doc>
  50529. <type name="utf8" c:type="const gchar*"/>
  50530. </parameter>
  50531. <parameter name="expected_type"
  50532. transfer-ownership="none"
  50533. nullable="1"
  50534. allow-none="1">
  50535. <doc xml:space="preserve">the expected type of the attribute, or
  50536. %NULL</doc>
  50537. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  50538. </parameter>
  50539. </parameters>
  50540. </virtual-method>
  50541. <virtual-method name="get_item_attributes">
  50542. <doc xml:space="preserve">Gets all the attributes associated with the item in the menu model.</doc>
  50543. <return-value transfer-ownership="none">
  50544. <type name="none" c:type="void"/>
  50545. </return-value>
  50546. <parameters>
  50547. <instance-parameter name="model" transfer-ownership="none">
  50548. <doc xml:space="preserve">the #GMenuModel to query</doc>
  50549. <type name="MenuModel" c:type="GMenuModel*"/>
  50550. </instance-parameter>
  50551. <parameter name="item_index" transfer-ownership="none">
  50552. <doc xml:space="preserve">The #GMenuItem to query</doc>
  50553. <type name="gint" c:type="gint"/>
  50554. </parameter>
  50555. <parameter name="attributes"
  50556. direction="out"
  50557. caller-allocates="0"
  50558. transfer-ownership="full">
  50559. <doc xml:space="preserve">Attributes on the item</doc>
  50560. <type name="GLib.HashTable" c:type="GHashTable**">
  50561. <type name="utf8"/>
  50562. <type name="GLib.Variant"/>
  50563. </type>
  50564. </parameter>
  50565. </parameters>
  50566. </virtual-method>
  50567. <virtual-method name="get_item_link"
  50568. invoker="get_item_link"
  50569. version="2.32">
  50570. <doc xml:space="preserve">Queries the item at position @item_index in @model for the link
  50571. specified by @link.
  50572. If the link exists, the linked #GMenuModel is returned. If the link
  50573. does not exist, %NULL is returned.</doc>
  50574. <return-value transfer-ownership="full">
  50575. <doc xml:space="preserve">the linked #GMenuModel, or %NULL</doc>
  50576. <type name="MenuModel" c:type="GMenuModel*"/>
  50577. </return-value>
  50578. <parameters>
  50579. <instance-parameter name="model" transfer-ownership="none">
  50580. <doc xml:space="preserve">a #GMenuModel</doc>
  50581. <type name="MenuModel" c:type="GMenuModel*"/>
  50582. </instance-parameter>
  50583. <parameter name="item_index" transfer-ownership="none">
  50584. <doc xml:space="preserve">the index of the item</doc>
  50585. <type name="gint" c:type="gint"/>
  50586. </parameter>
  50587. <parameter name="link" transfer-ownership="none">
  50588. <doc xml:space="preserve">the link to query</doc>
  50589. <type name="utf8" c:type="const gchar*"/>
  50590. </parameter>
  50591. </parameters>
  50592. </virtual-method>
  50593. <virtual-method name="get_item_links">
  50594. <doc xml:space="preserve">Gets all the links associated with the item in the menu model.</doc>
  50595. <return-value transfer-ownership="none">
  50596. <type name="none" c:type="void"/>
  50597. </return-value>
  50598. <parameters>
  50599. <instance-parameter name="model" transfer-ownership="none">
  50600. <doc xml:space="preserve">the #GMenuModel to query</doc>
  50601. <type name="MenuModel" c:type="GMenuModel*"/>
  50602. </instance-parameter>
  50603. <parameter name="item_index" transfer-ownership="none">
  50604. <doc xml:space="preserve">The #GMenuItem to query</doc>
  50605. <type name="gint" c:type="gint"/>
  50606. </parameter>
  50607. <parameter name="links"
  50608. direction="out"
  50609. caller-allocates="0"
  50610. transfer-ownership="full">
  50611. <doc xml:space="preserve">Links from the item</doc>
  50612. <type name="GLib.HashTable" c:type="GHashTable**">
  50613. <type name="utf8"/>
  50614. <type name="MenuModel"/>
  50615. </type>
  50616. </parameter>
  50617. </parameters>
  50618. </virtual-method>
  50619. <virtual-method name="get_n_items" invoker="get_n_items" version="2.32">
  50620. <doc xml:space="preserve">Query the number of items in @model.</doc>
  50621. <return-value transfer-ownership="none">
  50622. <doc xml:space="preserve">the number of items</doc>
  50623. <type name="gint" c:type="gint"/>
  50624. </return-value>
  50625. <parameters>
  50626. <instance-parameter name="model" transfer-ownership="none">
  50627. <doc xml:space="preserve">a #GMenuModel</doc>
  50628. <type name="MenuModel" c:type="GMenuModel*"/>
  50629. </instance-parameter>
  50630. </parameters>
  50631. </virtual-method>
  50632. <virtual-method name="is_mutable" invoker="is_mutable" version="2.32">
  50633. <doc xml:space="preserve">Queries if @model is mutable.
  50634. An immutable #GMenuModel will never emit the #GMenuModel::items-changed
  50635. signal. Consumers of the model may make optimisations accordingly.</doc>
  50636. <return-value transfer-ownership="none">
  50637. <doc xml:space="preserve">%TRUE if the model is mutable (ie: "items-changed" may be
  50638. emitted).</doc>
  50639. <type name="gboolean" c:type="gboolean"/>
  50640. </return-value>
  50641. <parameters>
  50642. <instance-parameter name="model" transfer-ownership="none">
  50643. <doc xml:space="preserve">a #GMenuModel</doc>
  50644. <type name="MenuModel" c:type="GMenuModel*"/>
  50645. </instance-parameter>
  50646. </parameters>
  50647. </virtual-method>
  50648. <virtual-method name="iterate_item_attributes"
  50649. invoker="iterate_item_attributes"
  50650. version="2.32">
  50651. <doc xml:space="preserve">Creates a #GMenuAttributeIter to iterate over the attributes of
  50652. the item at position @item_index in @model.
  50653. You must free the iterator with g_object_unref() when you are done.</doc>
  50654. <return-value transfer-ownership="full">
  50655. <doc xml:space="preserve">a new #GMenuAttributeIter</doc>
  50656. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  50657. </return-value>
  50658. <parameters>
  50659. <instance-parameter name="model" transfer-ownership="none">
  50660. <doc xml:space="preserve">a #GMenuModel</doc>
  50661. <type name="MenuModel" c:type="GMenuModel*"/>
  50662. </instance-parameter>
  50663. <parameter name="item_index" transfer-ownership="none">
  50664. <doc xml:space="preserve">the index of the item</doc>
  50665. <type name="gint" c:type="gint"/>
  50666. </parameter>
  50667. </parameters>
  50668. </virtual-method>
  50669. <virtual-method name="iterate_item_links"
  50670. invoker="iterate_item_links"
  50671. version="2.32">
  50672. <doc xml:space="preserve">Creates a #GMenuLinkIter to iterate over the links of the item at
  50673. position @item_index in @model.
  50674. You must free the iterator with g_object_unref() when you are done.</doc>
  50675. <return-value transfer-ownership="full">
  50676. <doc xml:space="preserve">a new #GMenuLinkIter</doc>
  50677. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50678. </return-value>
  50679. <parameters>
  50680. <instance-parameter name="model" transfer-ownership="none">
  50681. <doc xml:space="preserve">a #GMenuModel</doc>
  50682. <type name="MenuModel" c:type="GMenuModel*"/>
  50683. </instance-parameter>
  50684. <parameter name="item_index" transfer-ownership="none">
  50685. <doc xml:space="preserve">the index of the item</doc>
  50686. <type name="gint" c:type="gint"/>
  50687. </parameter>
  50688. </parameters>
  50689. </virtual-method>
  50690. <method name="get_item_attribute"
  50691. c:identifier="g_menu_model_get_item_attribute"
  50692. version="2.32"
  50693. introspectable="0">
  50694. <doc xml:space="preserve">Queries item at position @item_index in @model for the attribute
  50695. specified by @attribute.
  50696. If the attribute exists and matches the #GVariantType corresponding
  50697. to @format_string then @format_string is used to deconstruct the
  50698. value into the positional parameters and %TRUE is returned.
  50699. If the attribute does not exist, or it does exist but has the wrong
  50700. type, then the positional parameters are ignored and %FALSE is
  50701. returned.
  50702. This function is a mix of g_menu_model_get_item_attribute_value() and
  50703. g_variant_get(), followed by a g_variant_unref(). As such,
  50704. @format_string must make a complete copy of the data (since the
  50705. #GVariant may go away after the call to g_variant_unref()). In
  50706. particular, no '&amp;' characters are allowed in @format_string.</doc>
  50707. <return-value transfer-ownership="none">
  50708. <doc xml:space="preserve">%TRUE if the named attribute was found with the expected
  50709. type</doc>
  50710. <type name="gboolean" c:type="gboolean"/>
  50711. </return-value>
  50712. <parameters>
  50713. <instance-parameter name="model" transfer-ownership="none">
  50714. <doc xml:space="preserve">a #GMenuModel</doc>
  50715. <type name="MenuModel" c:type="GMenuModel*"/>
  50716. </instance-parameter>
  50717. <parameter name="item_index" transfer-ownership="none">
  50718. <doc xml:space="preserve">the index of the item</doc>
  50719. <type name="gint" c:type="gint"/>
  50720. </parameter>
  50721. <parameter name="attribute" transfer-ownership="none">
  50722. <doc xml:space="preserve">the attribute to query</doc>
  50723. <type name="utf8" c:type="const gchar*"/>
  50724. </parameter>
  50725. <parameter name="format_string" transfer-ownership="none">
  50726. <doc xml:space="preserve">a #GVariant format string</doc>
  50727. <type name="utf8" c:type="const gchar*"/>
  50728. </parameter>
  50729. <parameter name="..." transfer-ownership="none">
  50730. <doc xml:space="preserve">positional parameters, as per @format_string</doc>
  50731. <varargs/>
  50732. </parameter>
  50733. </parameters>
  50734. </method>
  50735. <method name="get_item_attribute_value"
  50736. c:identifier="g_menu_model_get_item_attribute_value"
  50737. version="2.32">
  50738. <doc xml:space="preserve">Queries the item at position @item_index in @model for the attribute
  50739. specified by @attribute.
  50740. If @expected_type is non-%NULL then it specifies the expected type of
  50741. the attribute. If it is %NULL then any type will be accepted.
  50742. If the attribute exists and matches @expected_type (or if the
  50743. expected type is unspecified) then the value is returned.
  50744. If the attribute does not exist, or does not match the expected type
  50745. then %NULL is returned.</doc>
  50746. <return-value transfer-ownership="full">
  50747. <doc xml:space="preserve">the value of the attribute</doc>
  50748. <type name="GLib.Variant" c:type="GVariant*"/>
  50749. </return-value>
  50750. <parameters>
  50751. <instance-parameter name="model" transfer-ownership="none">
  50752. <doc xml:space="preserve">a #GMenuModel</doc>
  50753. <type name="MenuModel" c:type="GMenuModel*"/>
  50754. </instance-parameter>
  50755. <parameter name="item_index" transfer-ownership="none">
  50756. <doc xml:space="preserve">the index of the item</doc>
  50757. <type name="gint" c:type="gint"/>
  50758. </parameter>
  50759. <parameter name="attribute" transfer-ownership="none">
  50760. <doc xml:space="preserve">the attribute to query</doc>
  50761. <type name="utf8" c:type="const gchar*"/>
  50762. </parameter>
  50763. <parameter name="expected_type"
  50764. transfer-ownership="none"
  50765. nullable="1"
  50766. allow-none="1">
  50767. <doc xml:space="preserve">the expected type of the attribute, or
  50768. %NULL</doc>
  50769. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  50770. </parameter>
  50771. </parameters>
  50772. </method>
  50773. <method name="get_item_link"
  50774. c:identifier="g_menu_model_get_item_link"
  50775. version="2.32">
  50776. <doc xml:space="preserve">Queries the item at position @item_index in @model for the link
  50777. specified by @link.
  50778. If the link exists, the linked #GMenuModel is returned. If the link
  50779. does not exist, %NULL is returned.</doc>
  50780. <return-value transfer-ownership="full">
  50781. <doc xml:space="preserve">the linked #GMenuModel, or %NULL</doc>
  50782. <type name="MenuModel" c:type="GMenuModel*"/>
  50783. </return-value>
  50784. <parameters>
  50785. <instance-parameter name="model" transfer-ownership="none">
  50786. <doc xml:space="preserve">a #GMenuModel</doc>
  50787. <type name="MenuModel" c:type="GMenuModel*"/>
  50788. </instance-parameter>
  50789. <parameter name="item_index" transfer-ownership="none">
  50790. <doc xml:space="preserve">the index of the item</doc>
  50791. <type name="gint" c:type="gint"/>
  50792. </parameter>
  50793. <parameter name="link" transfer-ownership="none">
  50794. <doc xml:space="preserve">the link to query</doc>
  50795. <type name="utf8" c:type="const gchar*"/>
  50796. </parameter>
  50797. </parameters>
  50798. </method>
  50799. <method name="get_n_items"
  50800. c:identifier="g_menu_model_get_n_items"
  50801. version="2.32">
  50802. <doc xml:space="preserve">Query the number of items in @model.</doc>
  50803. <return-value transfer-ownership="none">
  50804. <doc xml:space="preserve">the number of items</doc>
  50805. <type name="gint" c:type="gint"/>
  50806. </return-value>
  50807. <parameters>
  50808. <instance-parameter name="model" transfer-ownership="none">
  50809. <doc xml:space="preserve">a #GMenuModel</doc>
  50810. <type name="MenuModel" c:type="GMenuModel*"/>
  50811. </instance-parameter>
  50812. </parameters>
  50813. </method>
  50814. <method name="is_mutable"
  50815. c:identifier="g_menu_model_is_mutable"
  50816. version="2.32">
  50817. <doc xml:space="preserve">Queries if @model is mutable.
  50818. An immutable #GMenuModel will never emit the #GMenuModel::items-changed
  50819. signal. Consumers of the model may make optimisations accordingly.</doc>
  50820. <return-value transfer-ownership="none">
  50821. <doc xml:space="preserve">%TRUE if the model is mutable (ie: "items-changed" may be
  50822. emitted).</doc>
  50823. <type name="gboolean" c:type="gboolean"/>
  50824. </return-value>
  50825. <parameters>
  50826. <instance-parameter name="model" transfer-ownership="none">
  50827. <doc xml:space="preserve">a #GMenuModel</doc>
  50828. <type name="MenuModel" c:type="GMenuModel*"/>
  50829. </instance-parameter>
  50830. </parameters>
  50831. </method>
  50832. <method name="items_changed"
  50833. c:identifier="g_menu_model_items_changed"
  50834. version="2.32">
  50835. <doc xml:space="preserve">Requests emission of the #GMenuModel::items-changed signal on @model.
  50836. This function should never be called except by #GMenuModel
  50837. subclasses. Any other calls to this function will very likely lead
  50838. to a violation of the interface of the model.
  50839. The implementation should update its internal representation of the
  50840. menu before emitting the signal. The implementation should further
  50841. expect to receive queries about the new state of the menu (and
  50842. particularly added menu items) while signal handlers are running.
  50843. The implementation must dispatch this call directly from a mainloop
  50844. entry and not in response to calls -- particularly those from the
  50845. #GMenuModel API. Said another way: the menu must not change while
  50846. user code is running without returning to the mainloop.</doc>
  50847. <return-value transfer-ownership="none">
  50848. <type name="none" c:type="void"/>
  50849. </return-value>
  50850. <parameters>
  50851. <instance-parameter name="model" transfer-ownership="none">
  50852. <doc xml:space="preserve">a #GMenuModel</doc>
  50853. <type name="MenuModel" c:type="GMenuModel*"/>
  50854. </instance-parameter>
  50855. <parameter name="position" transfer-ownership="none">
  50856. <doc xml:space="preserve">the position of the change</doc>
  50857. <type name="gint" c:type="gint"/>
  50858. </parameter>
  50859. <parameter name="removed" transfer-ownership="none">
  50860. <doc xml:space="preserve">the number of items removed</doc>
  50861. <type name="gint" c:type="gint"/>
  50862. </parameter>
  50863. <parameter name="added" transfer-ownership="none">
  50864. <doc xml:space="preserve">the number of items added</doc>
  50865. <type name="gint" c:type="gint"/>
  50866. </parameter>
  50867. </parameters>
  50868. </method>
  50869. <method name="iterate_item_attributes"
  50870. c:identifier="g_menu_model_iterate_item_attributes"
  50871. version="2.32">
  50872. <doc xml:space="preserve">Creates a #GMenuAttributeIter to iterate over the attributes of
  50873. the item at position @item_index in @model.
  50874. You must free the iterator with g_object_unref() when you are done.</doc>
  50875. <return-value transfer-ownership="full">
  50876. <doc xml:space="preserve">a new #GMenuAttributeIter</doc>
  50877. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  50878. </return-value>
  50879. <parameters>
  50880. <instance-parameter name="model" transfer-ownership="none">
  50881. <doc xml:space="preserve">a #GMenuModel</doc>
  50882. <type name="MenuModel" c:type="GMenuModel*"/>
  50883. </instance-parameter>
  50884. <parameter name="item_index" transfer-ownership="none">
  50885. <doc xml:space="preserve">the index of the item</doc>
  50886. <type name="gint" c:type="gint"/>
  50887. </parameter>
  50888. </parameters>
  50889. </method>
  50890. <method name="iterate_item_links"
  50891. c:identifier="g_menu_model_iterate_item_links"
  50892. version="2.32">
  50893. <doc xml:space="preserve">Creates a #GMenuLinkIter to iterate over the links of the item at
  50894. position @item_index in @model.
  50895. You must free the iterator with g_object_unref() when you are done.</doc>
  50896. <return-value transfer-ownership="full">
  50897. <doc xml:space="preserve">a new #GMenuLinkIter</doc>
  50898. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  50899. </return-value>
  50900. <parameters>
  50901. <instance-parameter name="model" transfer-ownership="none">
  50902. <doc xml:space="preserve">a #GMenuModel</doc>
  50903. <type name="MenuModel" c:type="GMenuModel*"/>
  50904. </instance-parameter>
  50905. <parameter name="item_index" transfer-ownership="none">
  50906. <doc xml:space="preserve">the index of the item</doc>
  50907. <type name="gint" c:type="gint"/>
  50908. </parameter>
  50909. </parameters>
  50910. </method>
  50911. <field name="parent_instance">
  50912. <type name="GObject.Object" c:type="GObject"/>
  50913. </field>
  50914. <field name="priv">
  50915. <type name="MenuModelPrivate" c:type="GMenuModelPrivate*"/>
  50916. </field>
  50917. <glib:signal name="items-changed" when="last">
  50918. <doc xml:space="preserve">Emitted when a change has occured to the menu.
  50919. The only changes that can occur to a menu is that items are removed
  50920. or added. Items may not change (except by being removed and added
  50921. back in the same location). This signal is capable of describing
  50922. both of those changes (at the same time).
  50923. The signal means that starting at the index @position, @removed
  50924. items were removed and @added items were added in their place. If
  50925. @removed is zero then only items were added. If @added is zero
  50926. then only items were removed.
  50927. As an example, if the menu contains items a, b, c, d (in that
  50928. order) and the signal (2, 1, 3) occurs then the new composition of
  50929. the menu will be a, b, _, _, _, d (with each _ representing some
  50930. new item).
  50931. Signal handlers may query the model (particularly the added items)
  50932. and expect to see the results of the modification that is being
  50933. reported. The signal is emitted after the modification.</doc>
  50934. <return-value transfer-ownership="none">
  50935. <type name="none" c:type="void"/>
  50936. </return-value>
  50937. <parameters>
  50938. <parameter name="position" transfer-ownership="none">
  50939. <doc xml:space="preserve">the position of the change</doc>
  50940. <type name="gint" c:type="gint"/>
  50941. </parameter>
  50942. <parameter name="removed" transfer-ownership="none">
  50943. <doc xml:space="preserve">the number of items removed</doc>
  50944. <type name="gint" c:type="gint"/>
  50945. </parameter>
  50946. <parameter name="added" transfer-ownership="none">
  50947. <doc xml:space="preserve">the number of items added</doc>
  50948. <type name="gint" c:type="gint"/>
  50949. </parameter>
  50950. </parameters>
  50951. </glib:signal>
  50952. </class>
  50953. <record name="MenuModelClass"
  50954. c:type="GMenuModelClass"
  50955. glib:is-gtype-struct-for="MenuModel">
  50956. <field name="parent_class">
  50957. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  50958. </field>
  50959. <field name="is_mutable">
  50960. <callback name="is_mutable">
  50961. <return-value transfer-ownership="none">
  50962. <doc xml:space="preserve">%TRUE if the model is mutable (ie: "items-changed" may be
  50963. emitted).</doc>
  50964. <type name="gboolean" c:type="gboolean"/>
  50965. </return-value>
  50966. <parameters>
  50967. <parameter name="model" transfer-ownership="none">
  50968. <doc xml:space="preserve">a #GMenuModel</doc>
  50969. <type name="MenuModel" c:type="GMenuModel*"/>
  50970. </parameter>
  50971. </parameters>
  50972. </callback>
  50973. </field>
  50974. <field name="get_n_items">
  50975. <callback name="get_n_items">
  50976. <return-value transfer-ownership="none">
  50977. <doc xml:space="preserve">the number of items</doc>
  50978. <type name="gint" c:type="gint"/>
  50979. </return-value>
  50980. <parameters>
  50981. <parameter name="model" transfer-ownership="none">
  50982. <doc xml:space="preserve">a #GMenuModel</doc>
  50983. <type name="MenuModel" c:type="GMenuModel*"/>
  50984. </parameter>
  50985. </parameters>
  50986. </callback>
  50987. </field>
  50988. <field name="get_item_attributes">
  50989. <callback name="get_item_attributes">
  50990. <return-value transfer-ownership="none">
  50991. <type name="none" c:type="void"/>
  50992. </return-value>
  50993. <parameters>
  50994. <parameter name="model" transfer-ownership="none">
  50995. <doc xml:space="preserve">the #GMenuModel to query</doc>
  50996. <type name="MenuModel" c:type="GMenuModel*"/>
  50997. </parameter>
  50998. <parameter name="item_index" transfer-ownership="none">
  50999. <doc xml:space="preserve">The #GMenuItem to query</doc>
  51000. <type name="gint" c:type="gint"/>
  51001. </parameter>
  51002. <parameter name="attributes"
  51003. direction="out"
  51004. caller-allocates="0"
  51005. transfer-ownership="full">
  51006. <doc xml:space="preserve">Attributes on the item</doc>
  51007. <type name="GLib.HashTable" c:type="GHashTable**">
  51008. <type name="utf8"/>
  51009. <type name="GLib.Variant"/>
  51010. </type>
  51011. </parameter>
  51012. </parameters>
  51013. </callback>
  51014. </field>
  51015. <field name="iterate_item_attributes">
  51016. <callback name="iterate_item_attributes">
  51017. <return-value transfer-ownership="full">
  51018. <doc xml:space="preserve">a new #GMenuAttributeIter</doc>
  51019. <type name="MenuAttributeIter" c:type="GMenuAttributeIter*"/>
  51020. </return-value>
  51021. <parameters>
  51022. <parameter name="model" transfer-ownership="none">
  51023. <doc xml:space="preserve">a #GMenuModel</doc>
  51024. <type name="MenuModel" c:type="GMenuModel*"/>
  51025. </parameter>
  51026. <parameter name="item_index" transfer-ownership="none">
  51027. <doc xml:space="preserve">the index of the item</doc>
  51028. <type name="gint" c:type="gint"/>
  51029. </parameter>
  51030. </parameters>
  51031. </callback>
  51032. </field>
  51033. <field name="get_item_attribute_value">
  51034. <callback name="get_item_attribute_value">
  51035. <return-value transfer-ownership="full">
  51036. <doc xml:space="preserve">the value of the attribute</doc>
  51037. <type name="GLib.Variant" c:type="GVariant*"/>
  51038. </return-value>
  51039. <parameters>
  51040. <parameter name="model" transfer-ownership="none">
  51041. <doc xml:space="preserve">a #GMenuModel</doc>
  51042. <type name="MenuModel" c:type="GMenuModel*"/>
  51043. </parameter>
  51044. <parameter name="item_index" transfer-ownership="none">
  51045. <doc xml:space="preserve">the index of the item</doc>
  51046. <type name="gint" c:type="gint"/>
  51047. </parameter>
  51048. <parameter name="attribute" transfer-ownership="none">
  51049. <doc xml:space="preserve">the attribute to query</doc>
  51050. <type name="utf8" c:type="const gchar*"/>
  51051. </parameter>
  51052. <parameter name="expected_type"
  51053. transfer-ownership="none"
  51054. nullable="1"
  51055. allow-none="1">
  51056. <doc xml:space="preserve">the expected type of the attribute, or
  51057. %NULL</doc>
  51058. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  51059. </parameter>
  51060. </parameters>
  51061. </callback>
  51062. </field>
  51063. <field name="get_item_links">
  51064. <callback name="get_item_links">
  51065. <return-value transfer-ownership="none">
  51066. <type name="none" c:type="void"/>
  51067. </return-value>
  51068. <parameters>
  51069. <parameter name="model" transfer-ownership="none">
  51070. <doc xml:space="preserve">the #GMenuModel to query</doc>
  51071. <type name="MenuModel" c:type="GMenuModel*"/>
  51072. </parameter>
  51073. <parameter name="item_index" transfer-ownership="none">
  51074. <doc xml:space="preserve">The #GMenuItem to query</doc>
  51075. <type name="gint" c:type="gint"/>
  51076. </parameter>
  51077. <parameter name="links"
  51078. direction="out"
  51079. caller-allocates="0"
  51080. transfer-ownership="full">
  51081. <doc xml:space="preserve">Links from the item</doc>
  51082. <type name="GLib.HashTable" c:type="GHashTable**">
  51083. <type name="utf8"/>
  51084. <type name="MenuModel"/>
  51085. </type>
  51086. </parameter>
  51087. </parameters>
  51088. </callback>
  51089. </field>
  51090. <field name="iterate_item_links">
  51091. <callback name="iterate_item_links">
  51092. <return-value transfer-ownership="full">
  51093. <doc xml:space="preserve">a new #GMenuLinkIter</doc>
  51094. <type name="MenuLinkIter" c:type="GMenuLinkIter*"/>
  51095. </return-value>
  51096. <parameters>
  51097. <parameter name="model" transfer-ownership="none">
  51098. <doc xml:space="preserve">a #GMenuModel</doc>
  51099. <type name="MenuModel" c:type="GMenuModel*"/>
  51100. </parameter>
  51101. <parameter name="item_index" transfer-ownership="none">
  51102. <doc xml:space="preserve">the index of the item</doc>
  51103. <type name="gint" c:type="gint"/>
  51104. </parameter>
  51105. </parameters>
  51106. </callback>
  51107. </field>
  51108. <field name="get_item_link">
  51109. <callback name="get_item_link">
  51110. <return-value transfer-ownership="full">
  51111. <doc xml:space="preserve">the linked #GMenuModel, or %NULL</doc>
  51112. <type name="MenuModel" c:type="GMenuModel*"/>
  51113. </return-value>
  51114. <parameters>
  51115. <parameter name="model" transfer-ownership="none">
  51116. <doc xml:space="preserve">a #GMenuModel</doc>
  51117. <type name="MenuModel" c:type="GMenuModel*"/>
  51118. </parameter>
  51119. <parameter name="item_index" transfer-ownership="none">
  51120. <doc xml:space="preserve">the index of the item</doc>
  51121. <type name="gint" c:type="gint"/>
  51122. </parameter>
  51123. <parameter name="link" transfer-ownership="none">
  51124. <doc xml:space="preserve">the link to query</doc>
  51125. <type name="utf8" c:type="const gchar*"/>
  51126. </parameter>
  51127. </parameters>
  51128. </callback>
  51129. </field>
  51130. </record>
  51131. <record name="MenuModelPrivate" c:type="GMenuModelPrivate" disguised="1">
  51132. </record>
  51133. <interface name="Mount"
  51134. c:symbol-prefix="mount"
  51135. c:type="GMount"
  51136. glib:type-name="GMount"
  51137. glib:get-type="g_mount_get_type"
  51138. glib:type-struct="MountIface">
  51139. <doc xml:space="preserve">The #GMount interface represents user-visible mounts. Note, when
  51140. porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
  51141. #GMount is a "mounted" filesystem that you can access. Mounted is in
  51142. quotes because it's not the same as a unix mount, it might be a gvfs
  51143. mount, but you can still access the files on it if you use GIO. Might or
  51144. might not be related to a volume object.
  51145. Unmounting a #GMount instance is an asynchronous operation. For
  51146. more information about asynchronous operations, see #GAsyncResult
  51147. and #GTask. To unmount a #GMount instance, first call
  51148. g_mount_unmount_with_operation() with (at least) the #GMount instance and a
  51149. #GAsyncReadyCallback. The callback will be fired when the
  51150. operation has resolved (either with success or failure), and a
  51151. #GAsyncReady structure will be passed to the callback. That
  51152. callback should then call g_mount_unmount_with_operation_finish() with the #GMount
  51153. and the #GAsyncReady data to see if the operation was completed
  51154. successfully. If an @error is present when g_mount_unmount_with_operation_finish()
  51155. is called, then it will be filled with any error information.</doc>
  51156. <virtual-method name="can_eject" invoker="can_eject">
  51157. <doc xml:space="preserve">Checks if @mount can be eject.</doc>
  51158. <return-value transfer-ownership="none">
  51159. <doc xml:space="preserve">%TRUE if the @mount can be ejected.</doc>
  51160. <type name="gboolean" c:type="gboolean"/>
  51161. </return-value>
  51162. <parameters>
  51163. <instance-parameter name="mount" transfer-ownership="none">
  51164. <doc xml:space="preserve">a #GMount.</doc>
  51165. <type name="Mount" c:type="GMount*"/>
  51166. </instance-parameter>
  51167. </parameters>
  51168. </virtual-method>
  51169. <virtual-method name="can_unmount" invoker="can_unmount">
  51170. <doc xml:space="preserve">Checks if @mount can be mounted.</doc>
  51171. <return-value transfer-ownership="none">
  51172. <doc xml:space="preserve">%TRUE if the @mount can be unmounted.</doc>
  51173. <type name="gboolean" c:type="gboolean"/>
  51174. </return-value>
  51175. <parameters>
  51176. <instance-parameter name="mount" transfer-ownership="none">
  51177. <doc xml:space="preserve">a #GMount.</doc>
  51178. <type name="Mount" c:type="GMount*"/>
  51179. </instance-parameter>
  51180. </parameters>
  51181. </virtual-method>
  51182. <virtual-method name="changed">
  51183. <return-value transfer-ownership="none">
  51184. <type name="none" c:type="void"/>
  51185. </return-value>
  51186. <parameters>
  51187. <instance-parameter name="mount" transfer-ownership="none">
  51188. <type name="Mount" c:type="GMount*"/>
  51189. </instance-parameter>
  51190. </parameters>
  51191. </virtual-method>
  51192. <virtual-method name="eject"
  51193. invoker="eject"
  51194. deprecated="1"
  51195. deprecated-version="2.22">
  51196. <doc xml:space="preserve">Ejects a mount. This is an asynchronous operation, and is
  51197. finished by calling g_mount_eject_finish() with the @mount
  51198. and #GAsyncResult data returned in the @callback.</doc>
  51199. <doc-deprecated xml:space="preserve">Use g_mount_eject_with_operation() instead.</doc-deprecated>
  51200. <return-value transfer-ownership="none">
  51201. <type name="none" c:type="void"/>
  51202. </return-value>
  51203. <parameters>
  51204. <instance-parameter name="mount" transfer-ownership="none">
  51205. <doc xml:space="preserve">a #GMount.</doc>
  51206. <type name="Mount" c:type="GMount*"/>
  51207. </instance-parameter>
  51208. <parameter name="flags" transfer-ownership="none">
  51209. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  51210. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  51211. </parameter>
  51212. <parameter name="cancellable"
  51213. transfer-ownership="none"
  51214. nullable="1"
  51215. allow-none="1">
  51216. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  51217. <type name="Cancellable" c:type="GCancellable*"/>
  51218. </parameter>
  51219. <parameter name="callback"
  51220. transfer-ownership="none"
  51221. nullable="1"
  51222. allow-none="1"
  51223. scope="async"
  51224. closure="3">
  51225. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  51226. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51227. </parameter>
  51228. <parameter name="user_data"
  51229. transfer-ownership="none"
  51230. nullable="1"
  51231. allow-none="1"
  51232. closure="3">
  51233. <doc xml:space="preserve">user data passed to @callback.</doc>
  51234. <type name="gpointer" c:type="gpointer"/>
  51235. </parameter>
  51236. </parameters>
  51237. </virtual-method>
  51238. <virtual-method name="eject_finish"
  51239. invoker="eject_finish"
  51240. deprecated="1"
  51241. deprecated-version="2.22"
  51242. throws="1">
  51243. <doc xml:space="preserve">Finishes ejecting a mount. If any errors occurred during the operation,
  51244. @error will be set to contain the errors and %FALSE will be returned.</doc>
  51245. <doc-deprecated xml:space="preserve">Use g_mount_eject_with_operation_finish() instead.</doc-deprecated>
  51246. <return-value transfer-ownership="none">
  51247. <doc xml:space="preserve">%TRUE if the mount was successfully ejected. %FALSE otherwise.</doc>
  51248. <type name="gboolean" c:type="gboolean"/>
  51249. </return-value>
  51250. <parameters>
  51251. <instance-parameter name="mount" transfer-ownership="none">
  51252. <doc xml:space="preserve">a #GMount.</doc>
  51253. <type name="Mount" c:type="GMount*"/>
  51254. </instance-parameter>
  51255. <parameter name="result" transfer-ownership="none">
  51256. <doc xml:space="preserve">a #GAsyncResult.</doc>
  51257. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51258. </parameter>
  51259. </parameters>
  51260. </virtual-method>
  51261. <virtual-method name="eject_with_operation"
  51262. invoker="eject_with_operation"
  51263. version="2.22">
  51264. <doc xml:space="preserve">Ejects a mount. This is an asynchronous operation, and is
  51265. finished by calling g_mount_eject_with_operation_finish() with the @mount
  51266. and #GAsyncResult data returned in the @callback.</doc>
  51267. <return-value transfer-ownership="none">
  51268. <type name="none" c:type="void"/>
  51269. </return-value>
  51270. <parameters>
  51271. <instance-parameter name="mount" transfer-ownership="none">
  51272. <doc xml:space="preserve">a #GMount.</doc>
  51273. <type name="Mount" c:type="GMount*"/>
  51274. </instance-parameter>
  51275. <parameter name="flags" transfer-ownership="none">
  51276. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  51277. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  51278. </parameter>
  51279. <parameter name="mount_operation"
  51280. transfer-ownership="none"
  51281. nullable="1"
  51282. allow-none="1">
  51283. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  51284. user interaction.</doc>
  51285. <type name="MountOperation" c:type="GMountOperation*"/>
  51286. </parameter>
  51287. <parameter name="cancellable"
  51288. transfer-ownership="none"
  51289. nullable="1"
  51290. allow-none="1">
  51291. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  51292. <type name="Cancellable" c:type="GCancellable*"/>
  51293. </parameter>
  51294. <parameter name="callback"
  51295. transfer-ownership="none"
  51296. nullable="1"
  51297. allow-none="1"
  51298. scope="async"
  51299. closure="4">
  51300. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  51301. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51302. </parameter>
  51303. <parameter name="user_data"
  51304. transfer-ownership="none"
  51305. nullable="1"
  51306. allow-none="1"
  51307. closure="4">
  51308. <doc xml:space="preserve">user data passed to @callback.</doc>
  51309. <type name="gpointer" c:type="gpointer"/>
  51310. </parameter>
  51311. </parameters>
  51312. </virtual-method>
  51313. <virtual-method name="eject_with_operation_finish"
  51314. invoker="eject_with_operation_finish"
  51315. version="2.22"
  51316. throws="1">
  51317. <doc xml:space="preserve">Finishes ejecting a mount. If any errors occurred during the operation,
  51318. @error will be set to contain the errors and %FALSE will be returned.</doc>
  51319. <return-value transfer-ownership="none">
  51320. <doc xml:space="preserve">%TRUE if the mount was successfully ejected. %FALSE otherwise.</doc>
  51321. <type name="gboolean" c:type="gboolean"/>
  51322. </return-value>
  51323. <parameters>
  51324. <instance-parameter name="mount" transfer-ownership="none">
  51325. <doc xml:space="preserve">a #GMount.</doc>
  51326. <type name="Mount" c:type="GMount*"/>
  51327. </instance-parameter>
  51328. <parameter name="result" transfer-ownership="none">
  51329. <doc xml:space="preserve">a #GAsyncResult.</doc>
  51330. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51331. </parameter>
  51332. </parameters>
  51333. </virtual-method>
  51334. <virtual-method name="get_default_location"
  51335. invoker="get_default_location">
  51336. <doc xml:space="preserve">Gets the default location of @mount. The default location of the given
  51337. @mount is a path that reflects the main entry point for the user (e.g.
  51338. the home directory, or the root of the volume).</doc>
  51339. <return-value transfer-ownership="full">
  51340. <doc xml:space="preserve">a #GFile.
  51341. The returned object should be unreffed with
  51342. g_object_unref() when no longer needed.</doc>
  51343. <type name="File" c:type="GFile*"/>
  51344. </return-value>
  51345. <parameters>
  51346. <instance-parameter name="mount" transfer-ownership="none">
  51347. <doc xml:space="preserve">a #GMount.</doc>
  51348. <type name="Mount" c:type="GMount*"/>
  51349. </instance-parameter>
  51350. </parameters>
  51351. </virtual-method>
  51352. <virtual-method name="get_drive" invoker="get_drive">
  51353. <doc xml:space="preserve">Gets the drive for the @mount.
  51354. This is a convenience method for getting the #GVolume and then
  51355. using that object to get the #GDrive.</doc>
  51356. <return-value transfer-ownership="full">
  51357. <doc xml:space="preserve">a #GDrive or %NULL if @mount is not associated with a volume or a drive.
  51358. The returned object should be unreffed with
  51359. g_object_unref() when no longer needed.</doc>
  51360. <type name="Drive" c:type="GDrive*"/>
  51361. </return-value>
  51362. <parameters>
  51363. <instance-parameter name="mount" transfer-ownership="none">
  51364. <doc xml:space="preserve">a #GMount.</doc>
  51365. <type name="Mount" c:type="GMount*"/>
  51366. </instance-parameter>
  51367. </parameters>
  51368. </virtual-method>
  51369. <virtual-method name="get_icon" invoker="get_icon">
  51370. <doc xml:space="preserve">Gets the icon for @mount.</doc>
  51371. <return-value transfer-ownership="full">
  51372. <doc xml:space="preserve">a #GIcon.
  51373. The returned object should be unreffed with
  51374. g_object_unref() when no longer needed.</doc>
  51375. <type name="Icon" c:type="GIcon*"/>
  51376. </return-value>
  51377. <parameters>
  51378. <instance-parameter name="mount" transfer-ownership="none">
  51379. <doc xml:space="preserve">a #GMount.</doc>
  51380. <type name="Mount" c:type="GMount*"/>
  51381. </instance-parameter>
  51382. </parameters>
  51383. </virtual-method>
  51384. <virtual-method name="get_name" invoker="get_name">
  51385. <doc xml:space="preserve">Gets the name of @mount.</doc>
  51386. <return-value transfer-ownership="full">
  51387. <doc xml:space="preserve">the name for the given @mount.
  51388. The returned string should be freed with g_free()
  51389. when no longer needed.</doc>
  51390. <type name="utf8" c:type="char*"/>
  51391. </return-value>
  51392. <parameters>
  51393. <instance-parameter name="mount" transfer-ownership="none">
  51394. <doc xml:space="preserve">a #GMount.</doc>
  51395. <type name="Mount" c:type="GMount*"/>
  51396. </instance-parameter>
  51397. </parameters>
  51398. </virtual-method>
  51399. <virtual-method name="get_root" invoker="get_root">
  51400. <doc xml:space="preserve">Gets the root directory on @mount.</doc>
  51401. <return-value transfer-ownership="full">
  51402. <doc xml:space="preserve">a #GFile.
  51403. The returned object should be unreffed with
  51404. g_object_unref() when no longer needed.</doc>
  51405. <type name="File" c:type="GFile*"/>
  51406. </return-value>
  51407. <parameters>
  51408. <instance-parameter name="mount" transfer-ownership="none">
  51409. <doc xml:space="preserve">a #GMount.</doc>
  51410. <type name="Mount" c:type="GMount*"/>
  51411. </instance-parameter>
  51412. </parameters>
  51413. </virtual-method>
  51414. <virtual-method name="get_sort_key"
  51415. invoker="get_sort_key"
  51416. version="2.32">
  51417. <doc xml:space="preserve">Gets the sort key for @mount, if any.</doc>
  51418. <return-value transfer-ownership="none">
  51419. <doc xml:space="preserve">Sorting key for @mount or %NULL if no such key is available.</doc>
  51420. <type name="utf8" c:type="const gchar*"/>
  51421. </return-value>
  51422. <parameters>
  51423. <instance-parameter name="mount" transfer-ownership="none">
  51424. <doc xml:space="preserve">A #GMount.</doc>
  51425. <type name="Mount" c:type="GMount*"/>
  51426. </instance-parameter>
  51427. </parameters>
  51428. </virtual-method>
  51429. <virtual-method name="get_symbolic_icon"
  51430. invoker="get_symbolic_icon"
  51431. version="2.34">
  51432. <doc xml:space="preserve">Gets the symbolic icon for @mount.</doc>
  51433. <return-value transfer-ownership="full">
  51434. <doc xml:space="preserve">a #GIcon.
  51435. The returned object should be unreffed with
  51436. g_object_unref() when no longer needed.</doc>
  51437. <type name="Icon" c:type="GIcon*"/>
  51438. </return-value>
  51439. <parameters>
  51440. <instance-parameter name="mount" transfer-ownership="none">
  51441. <doc xml:space="preserve">a #GMount.</doc>
  51442. <type name="Mount" c:type="GMount*"/>
  51443. </instance-parameter>
  51444. </parameters>
  51445. </virtual-method>
  51446. <virtual-method name="get_uuid" invoker="get_uuid">
  51447. <doc xml:space="preserve">Gets the UUID for the @mount. The reference is typically based on
  51448. the file system UUID for the mount in question and should be
  51449. considered an opaque string. Returns %NULL if there is no UUID
  51450. available.</doc>
  51451. <return-value transfer-ownership="full">
  51452. <doc xml:space="preserve">the UUID for @mount or %NULL if no UUID can be computed.
  51453. The returned string should be freed with g_free()
  51454. when no longer needed.</doc>
  51455. <type name="utf8" c:type="char*"/>
  51456. </return-value>
  51457. <parameters>
  51458. <instance-parameter name="mount" transfer-ownership="none">
  51459. <doc xml:space="preserve">a #GMount.</doc>
  51460. <type name="Mount" c:type="GMount*"/>
  51461. </instance-parameter>
  51462. </parameters>
  51463. </virtual-method>
  51464. <virtual-method name="get_volume" invoker="get_volume">
  51465. <doc xml:space="preserve">Gets the volume for the @mount.</doc>
  51466. <return-value transfer-ownership="full">
  51467. <doc xml:space="preserve">a #GVolume or %NULL if @mount is not associated with a volume.
  51468. The returned object should be unreffed with
  51469. g_object_unref() when no longer needed.</doc>
  51470. <type name="Volume" c:type="GVolume*"/>
  51471. </return-value>
  51472. <parameters>
  51473. <instance-parameter name="mount" transfer-ownership="none">
  51474. <doc xml:space="preserve">a #GMount.</doc>
  51475. <type name="Mount" c:type="GMount*"/>
  51476. </instance-parameter>
  51477. </parameters>
  51478. </virtual-method>
  51479. <virtual-method name="guess_content_type"
  51480. invoker="guess_content_type"
  51481. version="2.18">
  51482. <doc xml:space="preserve">Tries to guess the type of content stored on @mount. Returns one or
  51483. more textual identifiers of well-known content types (typically
  51484. prefixed with "x-content/"), e.g. x-content/image-dcf for camera
  51485. memory cards. See the
  51486. [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
  51487. specification for more on x-content types.
  51488. This is an asynchronous operation (see
  51489. g_mount_guess_content_type_sync() for the synchronous version), and
  51490. is finished by calling g_mount_guess_content_type_finish() with the
  51491. @mount and #GAsyncResult data returned in the @callback.</doc>
  51492. <return-value transfer-ownership="none">
  51493. <type name="none" c:type="void"/>
  51494. </return-value>
  51495. <parameters>
  51496. <instance-parameter name="mount" transfer-ownership="none">
  51497. <doc xml:space="preserve">a #GMount</doc>
  51498. <type name="Mount" c:type="GMount*"/>
  51499. </instance-parameter>
  51500. <parameter name="force_rescan" transfer-ownership="none">
  51501. <doc xml:space="preserve">Whether to force a rescan of the content.
  51502. Otherwise a cached result will be used if available</doc>
  51503. <type name="gboolean" c:type="gboolean"/>
  51504. </parameter>
  51505. <parameter name="cancellable"
  51506. transfer-ownership="none"
  51507. nullable="1"
  51508. allow-none="1">
  51509. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  51510. <type name="Cancellable" c:type="GCancellable*"/>
  51511. </parameter>
  51512. <parameter name="callback"
  51513. transfer-ownership="none"
  51514. nullable="1"
  51515. allow-none="1"
  51516. scope="async"
  51517. closure="3">
  51518. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  51519. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51520. </parameter>
  51521. <parameter name="user_data"
  51522. transfer-ownership="none"
  51523. nullable="1"
  51524. allow-none="1"
  51525. closure="3">
  51526. <doc xml:space="preserve">user data passed to @callback</doc>
  51527. <type name="gpointer" c:type="gpointer"/>
  51528. </parameter>
  51529. </parameters>
  51530. </virtual-method>
  51531. <virtual-method name="guess_content_type_finish"
  51532. invoker="guess_content_type_finish"
  51533. version="2.18"
  51534. throws="1">
  51535. <doc xml:space="preserve">Finishes guessing content types of @mount. If any errors occurred
  51536. during the operation, @error will be set to contain the errors and
  51537. %FALSE will be returned. In particular, you may get an
  51538. %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
  51539. guessing.</doc>
  51540. <return-value transfer-ownership="full">
  51541. <doc xml:space="preserve">a %NULL-terminated array of content types or %NULL on error.
  51542. Caller should free this array with g_strfreev() when done with it.</doc>
  51543. <array c:type="gchar**">
  51544. <type name="utf8"/>
  51545. </array>
  51546. </return-value>
  51547. <parameters>
  51548. <instance-parameter name="mount" transfer-ownership="none">
  51549. <doc xml:space="preserve">a #GMount</doc>
  51550. <type name="Mount" c:type="GMount*"/>
  51551. </instance-parameter>
  51552. <parameter name="result" transfer-ownership="none">
  51553. <doc xml:space="preserve">a #GAsyncResult</doc>
  51554. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51555. </parameter>
  51556. </parameters>
  51557. </virtual-method>
  51558. <virtual-method name="guess_content_type_sync"
  51559. invoker="guess_content_type_sync"
  51560. version="2.18"
  51561. throws="1">
  51562. <doc xml:space="preserve">Tries to guess the type of content stored on @mount. Returns one or
  51563. more textual identifiers of well-known content types (typically
  51564. prefixed with "x-content/"), e.g. x-content/image-dcf for camera
  51565. memory cards. See the
  51566. [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
  51567. specification for more on x-content types.
  51568. This is an synchronous operation and as such may block doing IO;
  51569. see g_mount_guess_content_type() for the asynchronous version.</doc>
  51570. <return-value transfer-ownership="full">
  51571. <doc xml:space="preserve">a %NULL-terminated array of content types or %NULL on error.
  51572. Caller should free this array with g_strfreev() when done with it.</doc>
  51573. <array c:type="gchar**">
  51574. <type name="utf8"/>
  51575. </array>
  51576. </return-value>
  51577. <parameters>
  51578. <instance-parameter name="mount" transfer-ownership="none">
  51579. <doc xml:space="preserve">a #GMount</doc>
  51580. <type name="Mount" c:type="GMount*"/>
  51581. </instance-parameter>
  51582. <parameter name="force_rescan" transfer-ownership="none">
  51583. <doc xml:space="preserve">Whether to force a rescan of the content.
  51584. Otherwise a cached result will be used if available</doc>
  51585. <type name="gboolean" c:type="gboolean"/>
  51586. </parameter>
  51587. <parameter name="cancellable"
  51588. transfer-ownership="none"
  51589. nullable="1"
  51590. allow-none="1">
  51591. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  51592. <type name="Cancellable" c:type="GCancellable*"/>
  51593. </parameter>
  51594. </parameters>
  51595. </virtual-method>
  51596. <virtual-method name="pre_unmount">
  51597. <return-value transfer-ownership="none">
  51598. <type name="none" c:type="void"/>
  51599. </return-value>
  51600. <parameters>
  51601. <instance-parameter name="mount" transfer-ownership="none">
  51602. <type name="Mount" c:type="GMount*"/>
  51603. </instance-parameter>
  51604. </parameters>
  51605. </virtual-method>
  51606. <virtual-method name="remount" invoker="remount">
  51607. <doc xml:space="preserve">Remounts a mount. This is an asynchronous operation, and is
  51608. finished by calling g_mount_remount_finish() with the @mount
  51609. and #GAsyncResults data returned in the @callback.
  51610. Remounting is useful when some setting affecting the operation
  51611. of the volume has been changed, as these may need a remount to
  51612. take affect. While this is semantically equivalent with unmounting
  51613. and then remounting not all backends might need to actually be
  51614. unmounted.</doc>
  51615. <return-value transfer-ownership="none">
  51616. <type name="none" c:type="void"/>
  51617. </return-value>
  51618. <parameters>
  51619. <instance-parameter name="mount" transfer-ownership="none">
  51620. <doc xml:space="preserve">a #GMount.</doc>
  51621. <type name="Mount" c:type="GMount*"/>
  51622. </instance-parameter>
  51623. <parameter name="flags" transfer-ownership="none">
  51624. <doc xml:space="preserve">flags affecting the operation</doc>
  51625. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  51626. </parameter>
  51627. <parameter name="mount_operation"
  51628. transfer-ownership="none"
  51629. nullable="1"
  51630. allow-none="1">
  51631. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  51632. user interaction.</doc>
  51633. <type name="MountOperation" c:type="GMountOperation*"/>
  51634. </parameter>
  51635. <parameter name="cancellable"
  51636. transfer-ownership="none"
  51637. nullable="1"
  51638. allow-none="1">
  51639. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  51640. <type name="Cancellable" c:type="GCancellable*"/>
  51641. </parameter>
  51642. <parameter name="callback"
  51643. transfer-ownership="none"
  51644. nullable="1"
  51645. allow-none="1"
  51646. scope="async"
  51647. closure="4">
  51648. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  51649. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51650. </parameter>
  51651. <parameter name="user_data"
  51652. transfer-ownership="none"
  51653. nullable="1"
  51654. allow-none="1"
  51655. closure="4">
  51656. <doc xml:space="preserve">user data passed to @callback.</doc>
  51657. <type name="gpointer" c:type="gpointer"/>
  51658. </parameter>
  51659. </parameters>
  51660. </virtual-method>
  51661. <virtual-method name="remount_finish"
  51662. invoker="remount_finish"
  51663. throws="1">
  51664. <doc xml:space="preserve">Finishes remounting a mount. If any errors occurred during the operation,
  51665. @error will be set to contain the errors and %FALSE will be returned.</doc>
  51666. <return-value transfer-ownership="none">
  51667. <doc xml:space="preserve">%TRUE if the mount was successfully remounted. %FALSE otherwise.</doc>
  51668. <type name="gboolean" c:type="gboolean"/>
  51669. </return-value>
  51670. <parameters>
  51671. <instance-parameter name="mount" transfer-ownership="none">
  51672. <doc xml:space="preserve">a #GMount.</doc>
  51673. <type name="Mount" c:type="GMount*"/>
  51674. </instance-parameter>
  51675. <parameter name="result" transfer-ownership="none">
  51676. <doc xml:space="preserve">a #GAsyncResult.</doc>
  51677. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51678. </parameter>
  51679. </parameters>
  51680. </virtual-method>
  51681. <virtual-method name="unmount"
  51682. invoker="unmount"
  51683. deprecated="1"
  51684. deprecated-version="2.22">
  51685. <doc xml:space="preserve">Unmounts a mount. This is an asynchronous operation, and is
  51686. finished by calling g_mount_unmount_finish() with the @mount
  51687. and #GAsyncResult data returned in the @callback.</doc>
  51688. <doc-deprecated xml:space="preserve">Use g_mount_unmount_with_operation() instead.</doc-deprecated>
  51689. <return-value transfer-ownership="none">
  51690. <type name="none" c:type="void"/>
  51691. </return-value>
  51692. <parameters>
  51693. <instance-parameter name="mount" transfer-ownership="none">
  51694. <doc xml:space="preserve">a #GMount.</doc>
  51695. <type name="Mount" c:type="GMount*"/>
  51696. </instance-parameter>
  51697. <parameter name="flags" transfer-ownership="none">
  51698. <doc xml:space="preserve">flags affecting the operation</doc>
  51699. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  51700. </parameter>
  51701. <parameter name="cancellable"
  51702. transfer-ownership="none"
  51703. nullable="1"
  51704. allow-none="1">
  51705. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  51706. <type name="Cancellable" c:type="GCancellable*"/>
  51707. </parameter>
  51708. <parameter name="callback"
  51709. transfer-ownership="none"
  51710. nullable="1"
  51711. allow-none="1"
  51712. scope="async"
  51713. closure="3">
  51714. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  51715. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51716. </parameter>
  51717. <parameter name="user_data"
  51718. transfer-ownership="none"
  51719. nullable="1"
  51720. allow-none="1"
  51721. closure="3">
  51722. <doc xml:space="preserve">user data passed to @callback.</doc>
  51723. <type name="gpointer" c:type="gpointer"/>
  51724. </parameter>
  51725. </parameters>
  51726. </virtual-method>
  51727. <virtual-method name="unmount_finish"
  51728. invoker="unmount_finish"
  51729. deprecated="1"
  51730. deprecated-version="2.22"
  51731. throws="1">
  51732. <doc xml:space="preserve">Finishes unmounting a mount. If any errors occurred during the operation,
  51733. @error will be set to contain the errors and %FALSE will be returned.</doc>
  51734. <doc-deprecated xml:space="preserve">Use g_mount_unmount_with_operation_finish() instead.</doc-deprecated>
  51735. <return-value transfer-ownership="none">
  51736. <doc xml:space="preserve">%TRUE if the mount was successfully unmounted. %FALSE otherwise.</doc>
  51737. <type name="gboolean" c:type="gboolean"/>
  51738. </return-value>
  51739. <parameters>
  51740. <instance-parameter name="mount" transfer-ownership="none">
  51741. <doc xml:space="preserve">a #GMount.</doc>
  51742. <type name="Mount" c:type="GMount*"/>
  51743. </instance-parameter>
  51744. <parameter name="result" transfer-ownership="none">
  51745. <doc xml:space="preserve">a #GAsyncResult.</doc>
  51746. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51747. </parameter>
  51748. </parameters>
  51749. </virtual-method>
  51750. <virtual-method name="unmount_with_operation"
  51751. invoker="unmount_with_operation"
  51752. version="2.22">
  51753. <doc xml:space="preserve">Unmounts a mount. This is an asynchronous operation, and is
  51754. finished by calling g_mount_unmount_with_operation_finish() with the @mount
  51755. and #GAsyncResult data returned in the @callback.</doc>
  51756. <return-value transfer-ownership="none">
  51757. <type name="none" c:type="void"/>
  51758. </return-value>
  51759. <parameters>
  51760. <instance-parameter name="mount" transfer-ownership="none">
  51761. <doc xml:space="preserve">a #GMount.</doc>
  51762. <type name="Mount" c:type="GMount*"/>
  51763. </instance-parameter>
  51764. <parameter name="flags" transfer-ownership="none">
  51765. <doc xml:space="preserve">flags affecting the operation</doc>
  51766. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  51767. </parameter>
  51768. <parameter name="mount_operation"
  51769. transfer-ownership="none"
  51770. nullable="1"
  51771. allow-none="1">
  51772. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  51773. user interaction.</doc>
  51774. <type name="MountOperation" c:type="GMountOperation*"/>
  51775. </parameter>
  51776. <parameter name="cancellable"
  51777. transfer-ownership="none"
  51778. nullable="1"
  51779. allow-none="1">
  51780. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  51781. <type name="Cancellable" c:type="GCancellable*"/>
  51782. </parameter>
  51783. <parameter name="callback"
  51784. transfer-ownership="none"
  51785. nullable="1"
  51786. allow-none="1"
  51787. scope="async"
  51788. closure="4">
  51789. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  51790. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51791. </parameter>
  51792. <parameter name="user_data"
  51793. transfer-ownership="none"
  51794. nullable="1"
  51795. allow-none="1"
  51796. closure="4">
  51797. <doc xml:space="preserve">user data passed to @callback.</doc>
  51798. <type name="gpointer" c:type="gpointer"/>
  51799. </parameter>
  51800. </parameters>
  51801. </virtual-method>
  51802. <virtual-method name="unmount_with_operation_finish"
  51803. invoker="unmount_with_operation_finish"
  51804. version="2.22"
  51805. throws="1">
  51806. <doc xml:space="preserve">Finishes unmounting a mount. If any errors occurred during the operation,
  51807. @error will be set to contain the errors and %FALSE will be returned.</doc>
  51808. <return-value transfer-ownership="none">
  51809. <doc xml:space="preserve">%TRUE if the mount was successfully unmounted. %FALSE otherwise.</doc>
  51810. <type name="gboolean" c:type="gboolean"/>
  51811. </return-value>
  51812. <parameters>
  51813. <instance-parameter name="mount" transfer-ownership="none">
  51814. <doc xml:space="preserve">a #GMount.</doc>
  51815. <type name="Mount" c:type="GMount*"/>
  51816. </instance-parameter>
  51817. <parameter name="result" transfer-ownership="none">
  51818. <doc xml:space="preserve">a #GAsyncResult.</doc>
  51819. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51820. </parameter>
  51821. </parameters>
  51822. </virtual-method>
  51823. <virtual-method name="unmounted">
  51824. <return-value transfer-ownership="none">
  51825. <type name="none" c:type="void"/>
  51826. </return-value>
  51827. <parameters>
  51828. <instance-parameter name="mount" transfer-ownership="none">
  51829. <type name="Mount" c:type="GMount*"/>
  51830. </instance-parameter>
  51831. </parameters>
  51832. </virtual-method>
  51833. <method name="can_eject" c:identifier="g_mount_can_eject">
  51834. <doc xml:space="preserve">Checks if @mount can be eject.</doc>
  51835. <return-value transfer-ownership="none">
  51836. <doc xml:space="preserve">%TRUE if the @mount can be ejected.</doc>
  51837. <type name="gboolean" c:type="gboolean"/>
  51838. </return-value>
  51839. <parameters>
  51840. <instance-parameter name="mount" transfer-ownership="none">
  51841. <doc xml:space="preserve">a #GMount.</doc>
  51842. <type name="Mount" c:type="GMount*"/>
  51843. </instance-parameter>
  51844. </parameters>
  51845. </method>
  51846. <method name="can_unmount" c:identifier="g_mount_can_unmount">
  51847. <doc xml:space="preserve">Checks if @mount can be mounted.</doc>
  51848. <return-value transfer-ownership="none">
  51849. <doc xml:space="preserve">%TRUE if the @mount can be unmounted.</doc>
  51850. <type name="gboolean" c:type="gboolean"/>
  51851. </return-value>
  51852. <parameters>
  51853. <instance-parameter name="mount" transfer-ownership="none">
  51854. <doc xml:space="preserve">a #GMount.</doc>
  51855. <type name="Mount" c:type="GMount*"/>
  51856. </instance-parameter>
  51857. </parameters>
  51858. </method>
  51859. <method name="eject"
  51860. c:identifier="g_mount_eject"
  51861. deprecated="1"
  51862. deprecated-version="2.22">
  51863. <doc xml:space="preserve">Ejects a mount. This is an asynchronous operation, and is
  51864. finished by calling g_mount_eject_finish() with the @mount
  51865. and #GAsyncResult data returned in the @callback.</doc>
  51866. <doc-deprecated xml:space="preserve">Use g_mount_eject_with_operation() instead.</doc-deprecated>
  51867. <return-value transfer-ownership="none">
  51868. <type name="none" c:type="void"/>
  51869. </return-value>
  51870. <parameters>
  51871. <instance-parameter name="mount" transfer-ownership="none">
  51872. <doc xml:space="preserve">a #GMount.</doc>
  51873. <type name="Mount" c:type="GMount*"/>
  51874. </instance-parameter>
  51875. <parameter name="flags" transfer-ownership="none">
  51876. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  51877. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  51878. </parameter>
  51879. <parameter name="cancellable"
  51880. transfer-ownership="none"
  51881. nullable="1"
  51882. allow-none="1">
  51883. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  51884. <type name="Cancellable" c:type="GCancellable*"/>
  51885. </parameter>
  51886. <parameter name="callback"
  51887. transfer-ownership="none"
  51888. nullable="1"
  51889. allow-none="1"
  51890. scope="async"
  51891. closure="3">
  51892. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  51893. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51894. </parameter>
  51895. <parameter name="user_data"
  51896. transfer-ownership="none"
  51897. nullable="1"
  51898. allow-none="1">
  51899. <doc xml:space="preserve">user data passed to @callback.</doc>
  51900. <type name="gpointer" c:type="gpointer"/>
  51901. </parameter>
  51902. </parameters>
  51903. </method>
  51904. <method name="eject_finish"
  51905. c:identifier="g_mount_eject_finish"
  51906. deprecated="1"
  51907. deprecated-version="2.22"
  51908. throws="1">
  51909. <doc xml:space="preserve">Finishes ejecting a mount. If any errors occurred during the operation,
  51910. @error will be set to contain the errors and %FALSE will be returned.</doc>
  51911. <doc-deprecated xml:space="preserve">Use g_mount_eject_with_operation_finish() instead.</doc-deprecated>
  51912. <return-value transfer-ownership="none">
  51913. <doc xml:space="preserve">%TRUE if the mount was successfully ejected. %FALSE otherwise.</doc>
  51914. <type name="gboolean" c:type="gboolean"/>
  51915. </return-value>
  51916. <parameters>
  51917. <instance-parameter name="mount" transfer-ownership="none">
  51918. <doc xml:space="preserve">a #GMount.</doc>
  51919. <type name="Mount" c:type="GMount*"/>
  51920. </instance-parameter>
  51921. <parameter name="result" transfer-ownership="none">
  51922. <doc xml:space="preserve">a #GAsyncResult.</doc>
  51923. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51924. </parameter>
  51925. </parameters>
  51926. </method>
  51927. <method name="eject_with_operation"
  51928. c:identifier="g_mount_eject_with_operation"
  51929. version="2.22">
  51930. <doc xml:space="preserve">Ejects a mount. This is an asynchronous operation, and is
  51931. finished by calling g_mount_eject_with_operation_finish() with the @mount
  51932. and #GAsyncResult data returned in the @callback.</doc>
  51933. <return-value transfer-ownership="none">
  51934. <type name="none" c:type="void"/>
  51935. </return-value>
  51936. <parameters>
  51937. <instance-parameter name="mount" transfer-ownership="none">
  51938. <doc xml:space="preserve">a #GMount.</doc>
  51939. <type name="Mount" c:type="GMount*"/>
  51940. </instance-parameter>
  51941. <parameter name="flags" transfer-ownership="none">
  51942. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  51943. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  51944. </parameter>
  51945. <parameter name="mount_operation"
  51946. transfer-ownership="none"
  51947. nullable="1"
  51948. allow-none="1">
  51949. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  51950. user interaction.</doc>
  51951. <type name="MountOperation" c:type="GMountOperation*"/>
  51952. </parameter>
  51953. <parameter name="cancellable"
  51954. transfer-ownership="none"
  51955. nullable="1"
  51956. allow-none="1">
  51957. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  51958. <type name="Cancellable" c:type="GCancellable*"/>
  51959. </parameter>
  51960. <parameter name="callback"
  51961. transfer-ownership="none"
  51962. nullable="1"
  51963. allow-none="1"
  51964. scope="async"
  51965. closure="4">
  51966. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  51967. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  51968. </parameter>
  51969. <parameter name="user_data"
  51970. transfer-ownership="none"
  51971. nullable="1"
  51972. allow-none="1">
  51973. <doc xml:space="preserve">user data passed to @callback.</doc>
  51974. <type name="gpointer" c:type="gpointer"/>
  51975. </parameter>
  51976. </parameters>
  51977. </method>
  51978. <method name="eject_with_operation_finish"
  51979. c:identifier="g_mount_eject_with_operation_finish"
  51980. version="2.22"
  51981. throws="1">
  51982. <doc xml:space="preserve">Finishes ejecting a mount. If any errors occurred during the operation,
  51983. @error will be set to contain the errors and %FALSE will be returned.</doc>
  51984. <return-value transfer-ownership="none">
  51985. <doc xml:space="preserve">%TRUE if the mount was successfully ejected. %FALSE otherwise.</doc>
  51986. <type name="gboolean" c:type="gboolean"/>
  51987. </return-value>
  51988. <parameters>
  51989. <instance-parameter name="mount" transfer-ownership="none">
  51990. <doc xml:space="preserve">a #GMount.</doc>
  51991. <type name="Mount" c:type="GMount*"/>
  51992. </instance-parameter>
  51993. <parameter name="result" transfer-ownership="none">
  51994. <doc xml:space="preserve">a #GAsyncResult.</doc>
  51995. <type name="AsyncResult" c:type="GAsyncResult*"/>
  51996. </parameter>
  51997. </parameters>
  51998. </method>
  51999. <method name="get_default_location"
  52000. c:identifier="g_mount_get_default_location">
  52001. <doc xml:space="preserve">Gets the default location of @mount. The default location of the given
  52002. @mount is a path that reflects the main entry point for the user (e.g.
  52003. the home directory, or the root of the volume).</doc>
  52004. <return-value transfer-ownership="full">
  52005. <doc xml:space="preserve">a #GFile.
  52006. The returned object should be unreffed with
  52007. g_object_unref() when no longer needed.</doc>
  52008. <type name="File" c:type="GFile*"/>
  52009. </return-value>
  52010. <parameters>
  52011. <instance-parameter name="mount" transfer-ownership="none">
  52012. <doc xml:space="preserve">a #GMount.</doc>
  52013. <type name="Mount" c:type="GMount*"/>
  52014. </instance-parameter>
  52015. </parameters>
  52016. </method>
  52017. <method name="get_drive" c:identifier="g_mount_get_drive">
  52018. <doc xml:space="preserve">Gets the drive for the @mount.
  52019. This is a convenience method for getting the #GVolume and then
  52020. using that object to get the #GDrive.</doc>
  52021. <return-value transfer-ownership="full">
  52022. <doc xml:space="preserve">a #GDrive or %NULL if @mount is not associated with a volume or a drive.
  52023. The returned object should be unreffed with
  52024. g_object_unref() when no longer needed.</doc>
  52025. <type name="Drive" c:type="GDrive*"/>
  52026. </return-value>
  52027. <parameters>
  52028. <instance-parameter name="mount" transfer-ownership="none">
  52029. <doc xml:space="preserve">a #GMount.</doc>
  52030. <type name="Mount" c:type="GMount*"/>
  52031. </instance-parameter>
  52032. </parameters>
  52033. </method>
  52034. <method name="get_icon" c:identifier="g_mount_get_icon">
  52035. <doc xml:space="preserve">Gets the icon for @mount.</doc>
  52036. <return-value transfer-ownership="full">
  52037. <doc xml:space="preserve">a #GIcon.
  52038. The returned object should be unreffed with
  52039. g_object_unref() when no longer needed.</doc>
  52040. <type name="Icon" c:type="GIcon*"/>
  52041. </return-value>
  52042. <parameters>
  52043. <instance-parameter name="mount" transfer-ownership="none">
  52044. <doc xml:space="preserve">a #GMount.</doc>
  52045. <type name="Mount" c:type="GMount*"/>
  52046. </instance-parameter>
  52047. </parameters>
  52048. </method>
  52049. <method name="get_name" c:identifier="g_mount_get_name">
  52050. <doc xml:space="preserve">Gets the name of @mount.</doc>
  52051. <return-value transfer-ownership="full">
  52052. <doc xml:space="preserve">the name for the given @mount.
  52053. The returned string should be freed with g_free()
  52054. when no longer needed.</doc>
  52055. <type name="utf8" c:type="char*"/>
  52056. </return-value>
  52057. <parameters>
  52058. <instance-parameter name="mount" transfer-ownership="none">
  52059. <doc xml:space="preserve">a #GMount.</doc>
  52060. <type name="Mount" c:type="GMount*"/>
  52061. </instance-parameter>
  52062. </parameters>
  52063. </method>
  52064. <method name="get_root" c:identifier="g_mount_get_root">
  52065. <doc xml:space="preserve">Gets the root directory on @mount.</doc>
  52066. <return-value transfer-ownership="full">
  52067. <doc xml:space="preserve">a #GFile.
  52068. The returned object should be unreffed with
  52069. g_object_unref() when no longer needed.</doc>
  52070. <type name="File" c:type="GFile*"/>
  52071. </return-value>
  52072. <parameters>
  52073. <instance-parameter name="mount" transfer-ownership="none">
  52074. <doc xml:space="preserve">a #GMount.</doc>
  52075. <type name="Mount" c:type="GMount*"/>
  52076. </instance-parameter>
  52077. </parameters>
  52078. </method>
  52079. <method name="get_sort_key"
  52080. c:identifier="g_mount_get_sort_key"
  52081. version="2.32">
  52082. <doc xml:space="preserve">Gets the sort key for @mount, if any.</doc>
  52083. <return-value transfer-ownership="none">
  52084. <doc xml:space="preserve">Sorting key for @mount or %NULL if no such key is available.</doc>
  52085. <type name="utf8" c:type="const gchar*"/>
  52086. </return-value>
  52087. <parameters>
  52088. <instance-parameter name="mount" transfer-ownership="none">
  52089. <doc xml:space="preserve">A #GMount.</doc>
  52090. <type name="Mount" c:type="GMount*"/>
  52091. </instance-parameter>
  52092. </parameters>
  52093. </method>
  52094. <method name="get_symbolic_icon"
  52095. c:identifier="g_mount_get_symbolic_icon"
  52096. version="2.34">
  52097. <doc xml:space="preserve">Gets the symbolic icon for @mount.</doc>
  52098. <return-value transfer-ownership="full">
  52099. <doc xml:space="preserve">a #GIcon.
  52100. The returned object should be unreffed with
  52101. g_object_unref() when no longer needed.</doc>
  52102. <type name="Icon" c:type="GIcon*"/>
  52103. </return-value>
  52104. <parameters>
  52105. <instance-parameter name="mount" transfer-ownership="none">
  52106. <doc xml:space="preserve">a #GMount.</doc>
  52107. <type name="Mount" c:type="GMount*"/>
  52108. </instance-parameter>
  52109. </parameters>
  52110. </method>
  52111. <method name="get_uuid" c:identifier="g_mount_get_uuid">
  52112. <doc xml:space="preserve">Gets the UUID for the @mount. The reference is typically based on
  52113. the file system UUID for the mount in question and should be
  52114. considered an opaque string. Returns %NULL if there is no UUID
  52115. available.</doc>
  52116. <return-value transfer-ownership="full">
  52117. <doc xml:space="preserve">the UUID for @mount or %NULL if no UUID can be computed.
  52118. The returned string should be freed with g_free()
  52119. when no longer needed.</doc>
  52120. <type name="utf8" c:type="char*"/>
  52121. </return-value>
  52122. <parameters>
  52123. <instance-parameter name="mount" transfer-ownership="none">
  52124. <doc xml:space="preserve">a #GMount.</doc>
  52125. <type name="Mount" c:type="GMount*"/>
  52126. </instance-parameter>
  52127. </parameters>
  52128. </method>
  52129. <method name="get_volume" c:identifier="g_mount_get_volume">
  52130. <doc xml:space="preserve">Gets the volume for the @mount.</doc>
  52131. <return-value transfer-ownership="full">
  52132. <doc xml:space="preserve">a #GVolume or %NULL if @mount is not associated with a volume.
  52133. The returned object should be unreffed with
  52134. g_object_unref() when no longer needed.</doc>
  52135. <type name="Volume" c:type="GVolume*"/>
  52136. </return-value>
  52137. <parameters>
  52138. <instance-parameter name="mount" transfer-ownership="none">
  52139. <doc xml:space="preserve">a #GMount.</doc>
  52140. <type name="Mount" c:type="GMount*"/>
  52141. </instance-parameter>
  52142. </parameters>
  52143. </method>
  52144. <method name="guess_content_type"
  52145. c:identifier="g_mount_guess_content_type"
  52146. version="2.18">
  52147. <doc xml:space="preserve">Tries to guess the type of content stored on @mount. Returns one or
  52148. more textual identifiers of well-known content types (typically
  52149. prefixed with "x-content/"), e.g. x-content/image-dcf for camera
  52150. memory cards. See the
  52151. [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
  52152. specification for more on x-content types.
  52153. This is an asynchronous operation (see
  52154. g_mount_guess_content_type_sync() for the synchronous version), and
  52155. is finished by calling g_mount_guess_content_type_finish() with the
  52156. @mount and #GAsyncResult data returned in the @callback.</doc>
  52157. <return-value transfer-ownership="none">
  52158. <type name="none" c:type="void"/>
  52159. </return-value>
  52160. <parameters>
  52161. <instance-parameter name="mount" transfer-ownership="none">
  52162. <doc xml:space="preserve">a #GMount</doc>
  52163. <type name="Mount" c:type="GMount*"/>
  52164. </instance-parameter>
  52165. <parameter name="force_rescan" transfer-ownership="none">
  52166. <doc xml:space="preserve">Whether to force a rescan of the content.
  52167. Otherwise a cached result will be used if available</doc>
  52168. <type name="gboolean" c:type="gboolean"/>
  52169. </parameter>
  52170. <parameter name="cancellable"
  52171. transfer-ownership="none"
  52172. nullable="1"
  52173. allow-none="1">
  52174. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  52175. <type name="Cancellable" c:type="GCancellable*"/>
  52176. </parameter>
  52177. <parameter name="callback"
  52178. transfer-ownership="none"
  52179. nullable="1"
  52180. allow-none="1"
  52181. scope="async"
  52182. closure="3">
  52183. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  52184. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52185. </parameter>
  52186. <parameter name="user_data"
  52187. transfer-ownership="none"
  52188. nullable="1"
  52189. allow-none="1">
  52190. <doc xml:space="preserve">user data passed to @callback</doc>
  52191. <type name="gpointer" c:type="gpointer"/>
  52192. </parameter>
  52193. </parameters>
  52194. </method>
  52195. <method name="guess_content_type_finish"
  52196. c:identifier="g_mount_guess_content_type_finish"
  52197. version="2.18"
  52198. throws="1">
  52199. <doc xml:space="preserve">Finishes guessing content types of @mount. If any errors occurred
  52200. during the operation, @error will be set to contain the errors and
  52201. %FALSE will be returned. In particular, you may get an
  52202. %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
  52203. guessing.</doc>
  52204. <return-value transfer-ownership="full">
  52205. <doc xml:space="preserve">a %NULL-terminated array of content types or %NULL on error.
  52206. Caller should free this array with g_strfreev() when done with it.</doc>
  52207. <array c:type="gchar**">
  52208. <type name="utf8"/>
  52209. </array>
  52210. </return-value>
  52211. <parameters>
  52212. <instance-parameter name="mount" transfer-ownership="none">
  52213. <doc xml:space="preserve">a #GMount</doc>
  52214. <type name="Mount" c:type="GMount*"/>
  52215. </instance-parameter>
  52216. <parameter name="result" transfer-ownership="none">
  52217. <doc xml:space="preserve">a #GAsyncResult</doc>
  52218. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52219. </parameter>
  52220. </parameters>
  52221. </method>
  52222. <method name="guess_content_type_sync"
  52223. c:identifier="g_mount_guess_content_type_sync"
  52224. version="2.18"
  52225. throws="1">
  52226. <doc xml:space="preserve">Tries to guess the type of content stored on @mount. Returns one or
  52227. more textual identifiers of well-known content types (typically
  52228. prefixed with "x-content/"), e.g. x-content/image-dcf for camera
  52229. memory cards. See the
  52230. [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
  52231. specification for more on x-content types.
  52232. This is an synchronous operation and as such may block doing IO;
  52233. see g_mount_guess_content_type() for the asynchronous version.</doc>
  52234. <return-value transfer-ownership="full">
  52235. <doc xml:space="preserve">a %NULL-terminated array of content types or %NULL on error.
  52236. Caller should free this array with g_strfreev() when done with it.</doc>
  52237. <array c:type="gchar**">
  52238. <type name="utf8"/>
  52239. </array>
  52240. </return-value>
  52241. <parameters>
  52242. <instance-parameter name="mount" transfer-ownership="none">
  52243. <doc xml:space="preserve">a #GMount</doc>
  52244. <type name="Mount" c:type="GMount*"/>
  52245. </instance-parameter>
  52246. <parameter name="force_rescan" transfer-ownership="none">
  52247. <doc xml:space="preserve">Whether to force a rescan of the content.
  52248. Otherwise a cached result will be used if available</doc>
  52249. <type name="gboolean" c:type="gboolean"/>
  52250. </parameter>
  52251. <parameter name="cancellable"
  52252. transfer-ownership="none"
  52253. nullable="1"
  52254. allow-none="1">
  52255. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  52256. <type name="Cancellable" c:type="GCancellable*"/>
  52257. </parameter>
  52258. </parameters>
  52259. </method>
  52260. <method name="is_shadowed"
  52261. c:identifier="g_mount_is_shadowed"
  52262. version="2.20">
  52263. <doc xml:space="preserve">Determines if @mount is shadowed. Applications or libraries should
  52264. avoid displaying @mount in the user interface if it is shadowed.
  52265. A mount is said to be shadowed if there exists one or more user
  52266. visible objects (currently #GMount objects) with a root that is
  52267. inside the root of @mount.
  52268. One application of shadow mounts is when exposing a single file
  52269. system that is used to address several logical volumes. In this
  52270. situation, a #GVolumeMonitor implementation would create two
  52271. #GVolume objects (for example, one for the camera functionality of
  52272. the device and one for a SD card reader on the device) with
  52273. activation URIs `gphoto2://[usb:001,002]/store1/`
  52274. and `gphoto2://[usb:001,002]/store2/`. When the
  52275. underlying mount (with root
  52276. `gphoto2://[usb:001,002]/`) is mounted, said
  52277. #GVolumeMonitor implementation would create two #GMount objects
  52278. (each with their root matching the corresponding volume activation
  52279. root) that would shadow the original mount.
  52280. The proxy monitor in GVfs 2.26 and later, automatically creates and
  52281. manage shadow mounts (and shadows the underlying mount) if the
  52282. activation root on a #GVolume is set.</doc>
  52283. <return-value transfer-ownership="none">
  52284. <doc xml:space="preserve">%TRUE if @mount is shadowed.</doc>
  52285. <type name="gboolean" c:type="gboolean"/>
  52286. </return-value>
  52287. <parameters>
  52288. <instance-parameter name="mount" transfer-ownership="none">
  52289. <doc xml:space="preserve">A #GMount.</doc>
  52290. <type name="Mount" c:type="GMount*"/>
  52291. </instance-parameter>
  52292. </parameters>
  52293. </method>
  52294. <method name="remount" c:identifier="g_mount_remount">
  52295. <doc xml:space="preserve">Remounts a mount. This is an asynchronous operation, and is
  52296. finished by calling g_mount_remount_finish() with the @mount
  52297. and #GAsyncResults data returned in the @callback.
  52298. Remounting is useful when some setting affecting the operation
  52299. of the volume has been changed, as these may need a remount to
  52300. take affect. While this is semantically equivalent with unmounting
  52301. and then remounting not all backends might need to actually be
  52302. unmounted.</doc>
  52303. <return-value transfer-ownership="none">
  52304. <type name="none" c:type="void"/>
  52305. </return-value>
  52306. <parameters>
  52307. <instance-parameter name="mount" transfer-ownership="none">
  52308. <doc xml:space="preserve">a #GMount.</doc>
  52309. <type name="Mount" c:type="GMount*"/>
  52310. </instance-parameter>
  52311. <parameter name="flags" transfer-ownership="none">
  52312. <doc xml:space="preserve">flags affecting the operation</doc>
  52313. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  52314. </parameter>
  52315. <parameter name="mount_operation"
  52316. transfer-ownership="none"
  52317. nullable="1"
  52318. allow-none="1">
  52319. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  52320. user interaction.</doc>
  52321. <type name="MountOperation" c:type="GMountOperation*"/>
  52322. </parameter>
  52323. <parameter name="cancellable"
  52324. transfer-ownership="none"
  52325. nullable="1"
  52326. allow-none="1">
  52327. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  52328. <type name="Cancellable" c:type="GCancellable*"/>
  52329. </parameter>
  52330. <parameter name="callback"
  52331. transfer-ownership="none"
  52332. nullable="1"
  52333. allow-none="1"
  52334. scope="async"
  52335. closure="4">
  52336. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  52337. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52338. </parameter>
  52339. <parameter name="user_data"
  52340. transfer-ownership="none"
  52341. nullable="1"
  52342. allow-none="1">
  52343. <doc xml:space="preserve">user data passed to @callback.</doc>
  52344. <type name="gpointer" c:type="gpointer"/>
  52345. </parameter>
  52346. </parameters>
  52347. </method>
  52348. <method name="remount_finish"
  52349. c:identifier="g_mount_remount_finish"
  52350. throws="1">
  52351. <doc xml:space="preserve">Finishes remounting a mount. If any errors occurred during the operation,
  52352. @error will be set to contain the errors and %FALSE will be returned.</doc>
  52353. <return-value transfer-ownership="none">
  52354. <doc xml:space="preserve">%TRUE if the mount was successfully remounted. %FALSE otherwise.</doc>
  52355. <type name="gboolean" c:type="gboolean"/>
  52356. </return-value>
  52357. <parameters>
  52358. <instance-parameter name="mount" transfer-ownership="none">
  52359. <doc xml:space="preserve">a #GMount.</doc>
  52360. <type name="Mount" c:type="GMount*"/>
  52361. </instance-parameter>
  52362. <parameter name="result" transfer-ownership="none">
  52363. <doc xml:space="preserve">a #GAsyncResult.</doc>
  52364. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52365. </parameter>
  52366. </parameters>
  52367. </method>
  52368. <method name="shadow" c:identifier="g_mount_shadow" version="2.20">
  52369. <doc xml:space="preserve">Increments the shadow count on @mount. Usually used by
  52370. #GVolumeMonitor implementations when creating a shadow mount for
  52371. @mount, see g_mount_is_shadowed() for more information. The caller
  52372. will need to emit the #GMount::changed signal on @mount manually.</doc>
  52373. <return-value transfer-ownership="none">
  52374. <type name="none" c:type="void"/>
  52375. </return-value>
  52376. <parameters>
  52377. <instance-parameter name="mount" transfer-ownership="none">
  52378. <doc xml:space="preserve">A #GMount.</doc>
  52379. <type name="Mount" c:type="GMount*"/>
  52380. </instance-parameter>
  52381. </parameters>
  52382. </method>
  52383. <method name="unmount"
  52384. c:identifier="g_mount_unmount"
  52385. deprecated="1"
  52386. deprecated-version="2.22">
  52387. <doc xml:space="preserve">Unmounts a mount. This is an asynchronous operation, and is
  52388. finished by calling g_mount_unmount_finish() with the @mount
  52389. and #GAsyncResult data returned in the @callback.</doc>
  52390. <doc-deprecated xml:space="preserve">Use g_mount_unmount_with_operation() instead.</doc-deprecated>
  52391. <return-value transfer-ownership="none">
  52392. <type name="none" c:type="void"/>
  52393. </return-value>
  52394. <parameters>
  52395. <instance-parameter name="mount" transfer-ownership="none">
  52396. <doc xml:space="preserve">a #GMount.</doc>
  52397. <type name="Mount" c:type="GMount*"/>
  52398. </instance-parameter>
  52399. <parameter name="flags" transfer-ownership="none">
  52400. <doc xml:space="preserve">flags affecting the operation</doc>
  52401. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  52402. </parameter>
  52403. <parameter name="cancellable"
  52404. transfer-ownership="none"
  52405. nullable="1"
  52406. allow-none="1">
  52407. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  52408. <type name="Cancellable" c:type="GCancellable*"/>
  52409. </parameter>
  52410. <parameter name="callback"
  52411. transfer-ownership="none"
  52412. nullable="1"
  52413. allow-none="1"
  52414. scope="async"
  52415. closure="3">
  52416. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  52417. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52418. </parameter>
  52419. <parameter name="user_data"
  52420. transfer-ownership="none"
  52421. nullable="1"
  52422. allow-none="1">
  52423. <doc xml:space="preserve">user data passed to @callback.</doc>
  52424. <type name="gpointer" c:type="gpointer"/>
  52425. </parameter>
  52426. </parameters>
  52427. </method>
  52428. <method name="unmount_finish"
  52429. c:identifier="g_mount_unmount_finish"
  52430. deprecated="1"
  52431. deprecated-version="2.22"
  52432. throws="1">
  52433. <doc xml:space="preserve">Finishes unmounting a mount. If any errors occurred during the operation,
  52434. @error will be set to contain the errors and %FALSE will be returned.</doc>
  52435. <doc-deprecated xml:space="preserve">Use g_mount_unmount_with_operation_finish() instead.</doc-deprecated>
  52436. <return-value transfer-ownership="none">
  52437. <doc xml:space="preserve">%TRUE if the mount was successfully unmounted. %FALSE otherwise.</doc>
  52438. <type name="gboolean" c:type="gboolean"/>
  52439. </return-value>
  52440. <parameters>
  52441. <instance-parameter name="mount" transfer-ownership="none">
  52442. <doc xml:space="preserve">a #GMount.</doc>
  52443. <type name="Mount" c:type="GMount*"/>
  52444. </instance-parameter>
  52445. <parameter name="result" transfer-ownership="none">
  52446. <doc xml:space="preserve">a #GAsyncResult.</doc>
  52447. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52448. </parameter>
  52449. </parameters>
  52450. </method>
  52451. <method name="unmount_with_operation"
  52452. c:identifier="g_mount_unmount_with_operation"
  52453. version="2.22">
  52454. <doc xml:space="preserve">Unmounts a mount. This is an asynchronous operation, and is
  52455. finished by calling g_mount_unmount_with_operation_finish() with the @mount
  52456. and #GAsyncResult data returned in the @callback.</doc>
  52457. <return-value transfer-ownership="none">
  52458. <type name="none" c:type="void"/>
  52459. </return-value>
  52460. <parameters>
  52461. <instance-parameter name="mount" transfer-ownership="none">
  52462. <doc xml:space="preserve">a #GMount.</doc>
  52463. <type name="Mount" c:type="GMount*"/>
  52464. </instance-parameter>
  52465. <parameter name="flags" transfer-ownership="none">
  52466. <doc xml:space="preserve">flags affecting the operation</doc>
  52467. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  52468. </parameter>
  52469. <parameter name="mount_operation"
  52470. transfer-ownership="none"
  52471. nullable="1"
  52472. allow-none="1">
  52473. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  52474. user interaction.</doc>
  52475. <type name="MountOperation" c:type="GMountOperation*"/>
  52476. </parameter>
  52477. <parameter name="cancellable"
  52478. transfer-ownership="none"
  52479. nullable="1"
  52480. allow-none="1">
  52481. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  52482. <type name="Cancellable" c:type="GCancellable*"/>
  52483. </parameter>
  52484. <parameter name="callback"
  52485. transfer-ownership="none"
  52486. nullable="1"
  52487. allow-none="1"
  52488. scope="async"
  52489. closure="4">
  52490. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  52491. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52492. </parameter>
  52493. <parameter name="user_data"
  52494. transfer-ownership="none"
  52495. nullable="1"
  52496. allow-none="1">
  52497. <doc xml:space="preserve">user data passed to @callback.</doc>
  52498. <type name="gpointer" c:type="gpointer"/>
  52499. </parameter>
  52500. </parameters>
  52501. </method>
  52502. <method name="unmount_with_operation_finish"
  52503. c:identifier="g_mount_unmount_with_operation_finish"
  52504. version="2.22"
  52505. throws="1">
  52506. <doc xml:space="preserve">Finishes unmounting a mount. If any errors occurred during the operation,
  52507. @error will be set to contain the errors and %FALSE will be returned.</doc>
  52508. <return-value transfer-ownership="none">
  52509. <doc xml:space="preserve">%TRUE if the mount was successfully unmounted. %FALSE otherwise.</doc>
  52510. <type name="gboolean" c:type="gboolean"/>
  52511. </return-value>
  52512. <parameters>
  52513. <instance-parameter name="mount" transfer-ownership="none">
  52514. <doc xml:space="preserve">a #GMount.</doc>
  52515. <type name="Mount" c:type="GMount*"/>
  52516. </instance-parameter>
  52517. <parameter name="result" transfer-ownership="none">
  52518. <doc xml:space="preserve">a #GAsyncResult.</doc>
  52519. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52520. </parameter>
  52521. </parameters>
  52522. </method>
  52523. <method name="unshadow" c:identifier="g_mount_unshadow" version="2.20">
  52524. <doc xml:space="preserve">Decrements the shadow count on @mount. Usually used by
  52525. #GVolumeMonitor implementations when destroying a shadow mount for
  52526. @mount, see g_mount_is_shadowed() for more information. The caller
  52527. will need to emit the #GMount::changed signal on @mount manually.</doc>
  52528. <return-value transfer-ownership="none">
  52529. <type name="none" c:type="void"/>
  52530. </return-value>
  52531. <parameters>
  52532. <instance-parameter name="mount" transfer-ownership="none">
  52533. <doc xml:space="preserve">A #GMount.</doc>
  52534. <type name="Mount" c:type="GMount*"/>
  52535. </instance-parameter>
  52536. </parameters>
  52537. </method>
  52538. <glib:signal name="changed" when="last">
  52539. <doc xml:space="preserve">Emitted when the mount has been changed.</doc>
  52540. <return-value transfer-ownership="none">
  52541. <type name="none" c:type="void"/>
  52542. </return-value>
  52543. </glib:signal>
  52544. <glib:signal name="pre-unmount" when="last" version="2.22">
  52545. <doc xml:space="preserve">This signal is emitted when the #GMount is about to be
  52546. unmounted.</doc>
  52547. <return-value transfer-ownership="none">
  52548. <type name="none" c:type="void"/>
  52549. </return-value>
  52550. </glib:signal>
  52551. <glib:signal name="unmounted" when="last">
  52552. <doc xml:space="preserve">This signal is emitted when the #GMount have been
  52553. unmounted. If the recipient is holding references to the
  52554. object they should release them so the object can be
  52555. finalized.</doc>
  52556. <return-value transfer-ownership="none">
  52557. <type name="none" c:type="void"/>
  52558. </return-value>
  52559. </glib:signal>
  52560. </interface>
  52561. <record name="MountIface"
  52562. c:type="GMountIface"
  52563. glib:is-gtype-struct-for="Mount">
  52564. <doc xml:space="preserve">Interface for implementing operations for mounts.</doc>
  52565. <field name="g_iface">
  52566. <doc xml:space="preserve">The parent interface.</doc>
  52567. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  52568. </field>
  52569. <field name="changed">
  52570. <callback name="changed">
  52571. <return-value transfer-ownership="none">
  52572. <type name="none" c:type="void"/>
  52573. </return-value>
  52574. <parameters>
  52575. <parameter name="mount" transfer-ownership="none">
  52576. <type name="Mount" c:type="GMount*"/>
  52577. </parameter>
  52578. </parameters>
  52579. </callback>
  52580. </field>
  52581. <field name="unmounted">
  52582. <callback name="unmounted">
  52583. <return-value transfer-ownership="none">
  52584. <type name="none" c:type="void"/>
  52585. </return-value>
  52586. <parameters>
  52587. <parameter name="mount" transfer-ownership="none">
  52588. <type name="Mount" c:type="GMount*"/>
  52589. </parameter>
  52590. </parameters>
  52591. </callback>
  52592. </field>
  52593. <field name="get_root">
  52594. <callback name="get_root">
  52595. <return-value transfer-ownership="full">
  52596. <doc xml:space="preserve">a #GFile.
  52597. The returned object should be unreffed with
  52598. g_object_unref() when no longer needed.</doc>
  52599. <type name="File" c:type="GFile*"/>
  52600. </return-value>
  52601. <parameters>
  52602. <parameter name="mount" transfer-ownership="none">
  52603. <doc xml:space="preserve">a #GMount.</doc>
  52604. <type name="Mount" c:type="GMount*"/>
  52605. </parameter>
  52606. </parameters>
  52607. </callback>
  52608. </field>
  52609. <field name="get_name">
  52610. <callback name="get_name">
  52611. <return-value transfer-ownership="full">
  52612. <doc xml:space="preserve">the name for the given @mount.
  52613. The returned string should be freed with g_free()
  52614. when no longer needed.</doc>
  52615. <type name="utf8" c:type="char*"/>
  52616. </return-value>
  52617. <parameters>
  52618. <parameter name="mount" transfer-ownership="none">
  52619. <doc xml:space="preserve">a #GMount.</doc>
  52620. <type name="Mount" c:type="GMount*"/>
  52621. </parameter>
  52622. </parameters>
  52623. </callback>
  52624. </field>
  52625. <field name="get_icon">
  52626. <callback name="get_icon">
  52627. <return-value transfer-ownership="full">
  52628. <doc xml:space="preserve">a #GIcon.
  52629. The returned object should be unreffed with
  52630. g_object_unref() when no longer needed.</doc>
  52631. <type name="Icon" c:type="GIcon*"/>
  52632. </return-value>
  52633. <parameters>
  52634. <parameter name="mount" transfer-ownership="none">
  52635. <doc xml:space="preserve">a #GMount.</doc>
  52636. <type name="Mount" c:type="GMount*"/>
  52637. </parameter>
  52638. </parameters>
  52639. </callback>
  52640. </field>
  52641. <field name="get_uuid">
  52642. <callback name="get_uuid">
  52643. <return-value transfer-ownership="full">
  52644. <doc xml:space="preserve">the UUID for @mount or %NULL if no UUID can be computed.
  52645. The returned string should be freed with g_free()
  52646. when no longer needed.</doc>
  52647. <type name="utf8" c:type="char*"/>
  52648. </return-value>
  52649. <parameters>
  52650. <parameter name="mount" transfer-ownership="none">
  52651. <doc xml:space="preserve">a #GMount.</doc>
  52652. <type name="Mount" c:type="GMount*"/>
  52653. </parameter>
  52654. </parameters>
  52655. </callback>
  52656. </field>
  52657. <field name="get_volume">
  52658. <callback name="get_volume">
  52659. <return-value transfer-ownership="full">
  52660. <doc xml:space="preserve">a #GVolume or %NULL if @mount is not associated with a volume.
  52661. The returned object should be unreffed with
  52662. g_object_unref() when no longer needed.</doc>
  52663. <type name="Volume" c:type="GVolume*"/>
  52664. </return-value>
  52665. <parameters>
  52666. <parameter name="mount" transfer-ownership="none">
  52667. <doc xml:space="preserve">a #GMount.</doc>
  52668. <type name="Mount" c:type="GMount*"/>
  52669. </parameter>
  52670. </parameters>
  52671. </callback>
  52672. </field>
  52673. <field name="get_drive">
  52674. <callback name="get_drive">
  52675. <return-value transfer-ownership="full">
  52676. <doc xml:space="preserve">a #GDrive or %NULL if @mount is not associated with a volume or a drive.
  52677. The returned object should be unreffed with
  52678. g_object_unref() when no longer needed.</doc>
  52679. <type name="Drive" c:type="GDrive*"/>
  52680. </return-value>
  52681. <parameters>
  52682. <parameter name="mount" transfer-ownership="none">
  52683. <doc xml:space="preserve">a #GMount.</doc>
  52684. <type name="Mount" c:type="GMount*"/>
  52685. </parameter>
  52686. </parameters>
  52687. </callback>
  52688. </field>
  52689. <field name="can_unmount">
  52690. <callback name="can_unmount">
  52691. <return-value transfer-ownership="none">
  52692. <doc xml:space="preserve">%TRUE if the @mount can be unmounted.</doc>
  52693. <type name="gboolean" c:type="gboolean"/>
  52694. </return-value>
  52695. <parameters>
  52696. <parameter name="mount" transfer-ownership="none">
  52697. <doc xml:space="preserve">a #GMount.</doc>
  52698. <type name="Mount" c:type="GMount*"/>
  52699. </parameter>
  52700. </parameters>
  52701. </callback>
  52702. </field>
  52703. <field name="can_eject">
  52704. <callback name="can_eject">
  52705. <return-value transfer-ownership="none">
  52706. <doc xml:space="preserve">%TRUE if the @mount can be ejected.</doc>
  52707. <type name="gboolean" c:type="gboolean"/>
  52708. </return-value>
  52709. <parameters>
  52710. <parameter name="mount" transfer-ownership="none">
  52711. <doc xml:space="preserve">a #GMount.</doc>
  52712. <type name="Mount" c:type="GMount*"/>
  52713. </parameter>
  52714. </parameters>
  52715. </callback>
  52716. </field>
  52717. <field name="unmount">
  52718. <callback name="unmount">
  52719. <return-value transfer-ownership="none">
  52720. <type name="none" c:type="void"/>
  52721. </return-value>
  52722. <parameters>
  52723. <parameter name="mount" transfer-ownership="none">
  52724. <doc xml:space="preserve">a #GMount.</doc>
  52725. <type name="Mount" c:type="GMount*"/>
  52726. </parameter>
  52727. <parameter name="flags" transfer-ownership="none">
  52728. <doc xml:space="preserve">flags affecting the operation</doc>
  52729. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  52730. </parameter>
  52731. <parameter name="cancellable"
  52732. transfer-ownership="none"
  52733. nullable="1"
  52734. allow-none="1">
  52735. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  52736. <type name="Cancellable" c:type="GCancellable*"/>
  52737. </parameter>
  52738. <parameter name="callback"
  52739. transfer-ownership="none"
  52740. nullable="1"
  52741. allow-none="1"
  52742. scope="async"
  52743. closure="4">
  52744. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  52745. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52746. </parameter>
  52747. <parameter name="user_data"
  52748. transfer-ownership="none"
  52749. nullable="1"
  52750. allow-none="1"
  52751. closure="4">
  52752. <doc xml:space="preserve">user data passed to @callback.</doc>
  52753. <type name="gpointer" c:type="gpointer"/>
  52754. </parameter>
  52755. </parameters>
  52756. </callback>
  52757. </field>
  52758. <field name="unmount_finish">
  52759. <callback name="unmount_finish" throws="1">
  52760. <return-value transfer-ownership="none">
  52761. <doc xml:space="preserve">%TRUE if the mount was successfully unmounted. %FALSE otherwise.</doc>
  52762. <type name="gboolean" c:type="gboolean"/>
  52763. </return-value>
  52764. <parameters>
  52765. <parameter name="mount" transfer-ownership="none">
  52766. <doc xml:space="preserve">a #GMount.</doc>
  52767. <type name="Mount" c:type="GMount*"/>
  52768. </parameter>
  52769. <parameter name="result" transfer-ownership="none">
  52770. <doc xml:space="preserve">a #GAsyncResult.</doc>
  52771. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52772. </parameter>
  52773. </parameters>
  52774. </callback>
  52775. </field>
  52776. <field name="eject">
  52777. <callback name="eject">
  52778. <return-value transfer-ownership="none">
  52779. <type name="none" c:type="void"/>
  52780. </return-value>
  52781. <parameters>
  52782. <parameter name="mount" transfer-ownership="none">
  52783. <doc xml:space="preserve">a #GMount.</doc>
  52784. <type name="Mount" c:type="GMount*"/>
  52785. </parameter>
  52786. <parameter name="flags" transfer-ownership="none">
  52787. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  52788. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  52789. </parameter>
  52790. <parameter name="cancellable"
  52791. transfer-ownership="none"
  52792. nullable="1"
  52793. allow-none="1">
  52794. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  52795. <type name="Cancellable" c:type="GCancellable*"/>
  52796. </parameter>
  52797. <parameter name="callback"
  52798. transfer-ownership="none"
  52799. nullable="1"
  52800. allow-none="1"
  52801. scope="async"
  52802. closure="4">
  52803. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  52804. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52805. </parameter>
  52806. <parameter name="user_data"
  52807. transfer-ownership="none"
  52808. nullable="1"
  52809. allow-none="1"
  52810. closure="4">
  52811. <doc xml:space="preserve">user data passed to @callback.</doc>
  52812. <type name="gpointer" c:type="gpointer"/>
  52813. </parameter>
  52814. </parameters>
  52815. </callback>
  52816. </field>
  52817. <field name="eject_finish">
  52818. <callback name="eject_finish" throws="1">
  52819. <return-value transfer-ownership="none">
  52820. <doc xml:space="preserve">%TRUE if the mount was successfully ejected. %FALSE otherwise.</doc>
  52821. <type name="gboolean" c:type="gboolean"/>
  52822. </return-value>
  52823. <parameters>
  52824. <parameter name="mount" transfer-ownership="none">
  52825. <doc xml:space="preserve">a #GMount.</doc>
  52826. <type name="Mount" c:type="GMount*"/>
  52827. </parameter>
  52828. <parameter name="result" transfer-ownership="none">
  52829. <doc xml:space="preserve">a #GAsyncResult.</doc>
  52830. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52831. </parameter>
  52832. </parameters>
  52833. </callback>
  52834. </field>
  52835. <field name="remount">
  52836. <callback name="remount">
  52837. <return-value transfer-ownership="none">
  52838. <type name="none" c:type="void"/>
  52839. </return-value>
  52840. <parameters>
  52841. <parameter name="mount" transfer-ownership="none">
  52842. <doc xml:space="preserve">a #GMount.</doc>
  52843. <type name="Mount" c:type="GMount*"/>
  52844. </parameter>
  52845. <parameter name="flags" transfer-ownership="none">
  52846. <doc xml:space="preserve">flags affecting the operation</doc>
  52847. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  52848. </parameter>
  52849. <parameter name="mount_operation"
  52850. transfer-ownership="none"
  52851. nullable="1"
  52852. allow-none="1">
  52853. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  52854. user interaction.</doc>
  52855. <type name="MountOperation" c:type="GMountOperation*"/>
  52856. </parameter>
  52857. <parameter name="cancellable"
  52858. transfer-ownership="none"
  52859. nullable="1"
  52860. allow-none="1">
  52861. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  52862. <type name="Cancellable" c:type="GCancellable*"/>
  52863. </parameter>
  52864. <parameter name="callback"
  52865. transfer-ownership="none"
  52866. nullable="1"
  52867. allow-none="1"
  52868. scope="async"
  52869. closure="5">
  52870. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  52871. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52872. </parameter>
  52873. <parameter name="user_data"
  52874. transfer-ownership="none"
  52875. nullable="1"
  52876. allow-none="1"
  52877. closure="5">
  52878. <doc xml:space="preserve">user data passed to @callback.</doc>
  52879. <type name="gpointer" c:type="gpointer"/>
  52880. </parameter>
  52881. </parameters>
  52882. </callback>
  52883. </field>
  52884. <field name="remount_finish">
  52885. <callback name="remount_finish" throws="1">
  52886. <return-value transfer-ownership="none">
  52887. <doc xml:space="preserve">%TRUE if the mount was successfully remounted. %FALSE otherwise.</doc>
  52888. <type name="gboolean" c:type="gboolean"/>
  52889. </return-value>
  52890. <parameters>
  52891. <parameter name="mount" transfer-ownership="none">
  52892. <doc xml:space="preserve">a #GMount.</doc>
  52893. <type name="Mount" c:type="GMount*"/>
  52894. </parameter>
  52895. <parameter name="result" transfer-ownership="none">
  52896. <doc xml:space="preserve">a #GAsyncResult.</doc>
  52897. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52898. </parameter>
  52899. </parameters>
  52900. </callback>
  52901. </field>
  52902. <field name="guess_content_type">
  52903. <callback name="guess_content_type">
  52904. <return-value transfer-ownership="none">
  52905. <type name="none" c:type="void"/>
  52906. </return-value>
  52907. <parameters>
  52908. <parameter name="mount" transfer-ownership="none">
  52909. <doc xml:space="preserve">a #GMount</doc>
  52910. <type name="Mount" c:type="GMount*"/>
  52911. </parameter>
  52912. <parameter name="force_rescan" transfer-ownership="none">
  52913. <doc xml:space="preserve">Whether to force a rescan of the content.
  52914. Otherwise a cached result will be used if available</doc>
  52915. <type name="gboolean" c:type="gboolean"/>
  52916. </parameter>
  52917. <parameter name="cancellable"
  52918. transfer-ownership="none"
  52919. nullable="1"
  52920. allow-none="1">
  52921. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  52922. <type name="Cancellable" c:type="GCancellable*"/>
  52923. </parameter>
  52924. <parameter name="callback"
  52925. transfer-ownership="none"
  52926. nullable="1"
  52927. allow-none="1"
  52928. scope="async"
  52929. closure="4">
  52930. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  52931. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  52932. </parameter>
  52933. <parameter name="user_data"
  52934. transfer-ownership="none"
  52935. nullable="1"
  52936. allow-none="1"
  52937. closure="4">
  52938. <doc xml:space="preserve">user data passed to @callback</doc>
  52939. <type name="gpointer" c:type="gpointer"/>
  52940. </parameter>
  52941. </parameters>
  52942. </callback>
  52943. </field>
  52944. <field name="guess_content_type_finish">
  52945. <callback name="guess_content_type_finish" throws="1">
  52946. <return-value transfer-ownership="full">
  52947. <doc xml:space="preserve">a %NULL-terminated array of content types or %NULL on error.
  52948. Caller should free this array with g_strfreev() when done with it.</doc>
  52949. <array c:type="gchar**">
  52950. <type name="utf8"/>
  52951. </array>
  52952. </return-value>
  52953. <parameters>
  52954. <parameter name="mount" transfer-ownership="none">
  52955. <doc xml:space="preserve">a #GMount</doc>
  52956. <type name="Mount" c:type="GMount*"/>
  52957. </parameter>
  52958. <parameter name="result" transfer-ownership="none">
  52959. <doc xml:space="preserve">a #GAsyncResult</doc>
  52960. <type name="AsyncResult" c:type="GAsyncResult*"/>
  52961. </parameter>
  52962. </parameters>
  52963. </callback>
  52964. </field>
  52965. <field name="guess_content_type_sync">
  52966. <callback name="guess_content_type_sync" throws="1">
  52967. <return-value transfer-ownership="full">
  52968. <doc xml:space="preserve">a %NULL-terminated array of content types or %NULL on error.
  52969. Caller should free this array with g_strfreev() when done with it.</doc>
  52970. <array c:type="gchar**">
  52971. <type name="utf8"/>
  52972. </array>
  52973. </return-value>
  52974. <parameters>
  52975. <parameter name="mount" transfer-ownership="none">
  52976. <doc xml:space="preserve">a #GMount</doc>
  52977. <type name="Mount" c:type="GMount*"/>
  52978. </parameter>
  52979. <parameter name="force_rescan" transfer-ownership="none">
  52980. <doc xml:space="preserve">Whether to force a rescan of the content.
  52981. Otherwise a cached result will be used if available</doc>
  52982. <type name="gboolean" c:type="gboolean"/>
  52983. </parameter>
  52984. <parameter name="cancellable"
  52985. transfer-ownership="none"
  52986. nullable="1"
  52987. allow-none="1">
  52988. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  52989. <type name="Cancellable" c:type="GCancellable*"/>
  52990. </parameter>
  52991. </parameters>
  52992. </callback>
  52993. </field>
  52994. <field name="pre_unmount">
  52995. <callback name="pre_unmount">
  52996. <return-value transfer-ownership="none">
  52997. <type name="none" c:type="void"/>
  52998. </return-value>
  52999. <parameters>
  53000. <parameter name="mount" transfer-ownership="none">
  53001. <type name="Mount" c:type="GMount*"/>
  53002. </parameter>
  53003. </parameters>
  53004. </callback>
  53005. </field>
  53006. <field name="unmount_with_operation">
  53007. <callback name="unmount_with_operation">
  53008. <return-value transfer-ownership="none">
  53009. <type name="none" c:type="void"/>
  53010. </return-value>
  53011. <parameters>
  53012. <parameter name="mount" transfer-ownership="none">
  53013. <doc xml:space="preserve">a #GMount.</doc>
  53014. <type name="Mount" c:type="GMount*"/>
  53015. </parameter>
  53016. <parameter name="flags" transfer-ownership="none">
  53017. <doc xml:space="preserve">flags affecting the operation</doc>
  53018. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  53019. </parameter>
  53020. <parameter name="mount_operation"
  53021. transfer-ownership="none"
  53022. nullable="1"
  53023. allow-none="1">
  53024. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  53025. user interaction.</doc>
  53026. <type name="MountOperation" c:type="GMountOperation*"/>
  53027. </parameter>
  53028. <parameter name="cancellable"
  53029. transfer-ownership="none"
  53030. nullable="1"
  53031. allow-none="1">
  53032. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  53033. <type name="Cancellable" c:type="GCancellable*"/>
  53034. </parameter>
  53035. <parameter name="callback"
  53036. transfer-ownership="none"
  53037. nullable="1"
  53038. allow-none="1"
  53039. scope="async"
  53040. closure="5">
  53041. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  53042. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  53043. </parameter>
  53044. <parameter name="user_data"
  53045. transfer-ownership="none"
  53046. nullable="1"
  53047. allow-none="1"
  53048. closure="5">
  53049. <doc xml:space="preserve">user data passed to @callback.</doc>
  53050. <type name="gpointer" c:type="gpointer"/>
  53051. </parameter>
  53052. </parameters>
  53053. </callback>
  53054. </field>
  53055. <field name="unmount_with_operation_finish">
  53056. <callback name="unmount_with_operation_finish" throws="1">
  53057. <return-value transfer-ownership="none">
  53058. <doc xml:space="preserve">%TRUE if the mount was successfully unmounted. %FALSE otherwise.</doc>
  53059. <type name="gboolean" c:type="gboolean"/>
  53060. </return-value>
  53061. <parameters>
  53062. <parameter name="mount" transfer-ownership="none">
  53063. <doc xml:space="preserve">a #GMount.</doc>
  53064. <type name="Mount" c:type="GMount*"/>
  53065. </parameter>
  53066. <parameter name="result" transfer-ownership="none">
  53067. <doc xml:space="preserve">a #GAsyncResult.</doc>
  53068. <type name="AsyncResult" c:type="GAsyncResult*"/>
  53069. </parameter>
  53070. </parameters>
  53071. </callback>
  53072. </field>
  53073. <field name="eject_with_operation">
  53074. <callback name="eject_with_operation">
  53075. <return-value transfer-ownership="none">
  53076. <type name="none" c:type="void"/>
  53077. </return-value>
  53078. <parameters>
  53079. <parameter name="mount" transfer-ownership="none">
  53080. <doc xml:space="preserve">a #GMount.</doc>
  53081. <type name="Mount" c:type="GMount*"/>
  53082. </parameter>
  53083. <parameter name="flags" transfer-ownership="none">
  53084. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  53085. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  53086. </parameter>
  53087. <parameter name="mount_operation"
  53088. transfer-ownership="none"
  53089. nullable="1"
  53090. allow-none="1">
  53091. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid
  53092. user interaction.</doc>
  53093. <type name="MountOperation" c:type="GMountOperation*"/>
  53094. </parameter>
  53095. <parameter name="cancellable"
  53096. transfer-ownership="none"
  53097. nullable="1"
  53098. allow-none="1">
  53099. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  53100. <type name="Cancellable" c:type="GCancellable*"/>
  53101. </parameter>
  53102. <parameter name="callback"
  53103. transfer-ownership="none"
  53104. nullable="1"
  53105. allow-none="1"
  53106. scope="async"
  53107. closure="5">
  53108. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL.</doc>
  53109. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  53110. </parameter>
  53111. <parameter name="user_data"
  53112. transfer-ownership="none"
  53113. nullable="1"
  53114. allow-none="1"
  53115. closure="5">
  53116. <doc xml:space="preserve">user data passed to @callback.</doc>
  53117. <type name="gpointer" c:type="gpointer"/>
  53118. </parameter>
  53119. </parameters>
  53120. </callback>
  53121. </field>
  53122. <field name="eject_with_operation_finish">
  53123. <callback name="eject_with_operation_finish" throws="1">
  53124. <return-value transfer-ownership="none">
  53125. <doc xml:space="preserve">%TRUE if the mount was successfully ejected. %FALSE otherwise.</doc>
  53126. <type name="gboolean" c:type="gboolean"/>
  53127. </return-value>
  53128. <parameters>
  53129. <parameter name="mount" transfer-ownership="none">
  53130. <doc xml:space="preserve">a #GMount.</doc>
  53131. <type name="Mount" c:type="GMount*"/>
  53132. </parameter>
  53133. <parameter name="result" transfer-ownership="none">
  53134. <doc xml:space="preserve">a #GAsyncResult.</doc>
  53135. <type name="AsyncResult" c:type="GAsyncResult*"/>
  53136. </parameter>
  53137. </parameters>
  53138. </callback>
  53139. </field>
  53140. <field name="get_default_location">
  53141. <callback name="get_default_location">
  53142. <return-value transfer-ownership="full">
  53143. <doc xml:space="preserve">a #GFile.
  53144. The returned object should be unreffed with
  53145. g_object_unref() when no longer needed.</doc>
  53146. <type name="File" c:type="GFile*"/>
  53147. </return-value>
  53148. <parameters>
  53149. <parameter name="mount" transfer-ownership="none">
  53150. <doc xml:space="preserve">a #GMount.</doc>
  53151. <type name="Mount" c:type="GMount*"/>
  53152. </parameter>
  53153. </parameters>
  53154. </callback>
  53155. </field>
  53156. <field name="get_sort_key">
  53157. <callback name="get_sort_key">
  53158. <return-value transfer-ownership="none">
  53159. <doc xml:space="preserve">Sorting key for @mount or %NULL if no such key is available.</doc>
  53160. <type name="utf8" c:type="const gchar*"/>
  53161. </return-value>
  53162. <parameters>
  53163. <parameter name="mount" transfer-ownership="none">
  53164. <doc xml:space="preserve">A #GMount.</doc>
  53165. <type name="Mount" c:type="GMount*"/>
  53166. </parameter>
  53167. </parameters>
  53168. </callback>
  53169. </field>
  53170. <field name="get_symbolic_icon">
  53171. <callback name="get_symbolic_icon">
  53172. <return-value transfer-ownership="full">
  53173. <doc xml:space="preserve">a #GIcon.
  53174. The returned object should be unreffed with
  53175. g_object_unref() when no longer needed.</doc>
  53176. <type name="Icon" c:type="GIcon*"/>
  53177. </return-value>
  53178. <parameters>
  53179. <parameter name="mount" transfer-ownership="none">
  53180. <doc xml:space="preserve">a #GMount.</doc>
  53181. <type name="Mount" c:type="GMount*"/>
  53182. </parameter>
  53183. </parameters>
  53184. </callback>
  53185. </field>
  53186. </record>
  53187. <bitfield name="MountMountFlags"
  53188. glib:type-name="GMountMountFlags"
  53189. glib:get-type="g_mount_mount_flags_get_type"
  53190. c:type="GMountMountFlags">
  53191. <doc xml:space="preserve">Flags used when mounting a mount.</doc>
  53192. <member name="none"
  53193. value="0"
  53194. c:identifier="G_MOUNT_MOUNT_NONE"
  53195. glib:nick="none">
  53196. <doc xml:space="preserve">No flags set.</doc>
  53197. </member>
  53198. </bitfield>
  53199. <class name="MountOperation"
  53200. c:symbol-prefix="mount_operation"
  53201. c:type="GMountOperation"
  53202. parent="GObject.Object"
  53203. glib:type-name="GMountOperation"
  53204. glib:get-type="g_mount_operation_get_type"
  53205. glib:type-struct="MountOperationClass">
  53206. <doc xml:space="preserve">#GMountOperation provides a mechanism for interacting with the user.
  53207. It can be used for authenticating mountable operations, such as loop
  53208. mounting files, hard drive partitions or server locations. It can
  53209. also be used to ask the user questions or show a list of applications
  53210. preventing unmount or eject operations from completing.
  53211. Note that #GMountOperation is used for more than just #GMount
  53212. objects – for example it is also used in g_drive_start() and
  53213. g_drive_stop().
  53214. Users should instantiate a subclass of this that implements all the
  53215. various callbacks to show the required dialogs, such as
  53216. #GtkMountOperation. If no user interaction is desired (for example
  53217. when automounting filesystems at login time), usually %NULL can be
  53218. passed, see each method taking a #GMountOperation for details.</doc>
  53219. <constructor name="new" c:identifier="g_mount_operation_new">
  53220. <doc xml:space="preserve">Creates a new mount operation.</doc>
  53221. <return-value transfer-ownership="full">
  53222. <doc xml:space="preserve">a #GMountOperation.</doc>
  53223. <type name="MountOperation" c:type="GMountOperation*"/>
  53224. </return-value>
  53225. </constructor>
  53226. <virtual-method name="aborted">
  53227. <return-value transfer-ownership="none">
  53228. <type name="none" c:type="void"/>
  53229. </return-value>
  53230. <parameters>
  53231. <instance-parameter name="op" transfer-ownership="none">
  53232. <type name="MountOperation" c:type="GMountOperation*"/>
  53233. </instance-parameter>
  53234. </parameters>
  53235. </virtual-method>
  53236. <virtual-method name="ask_password">
  53237. <return-value transfer-ownership="none">
  53238. <type name="none" c:type="void"/>
  53239. </return-value>
  53240. <parameters>
  53241. <instance-parameter name="op" transfer-ownership="none">
  53242. <type name="MountOperation" c:type="GMountOperation*"/>
  53243. </instance-parameter>
  53244. <parameter name="message" transfer-ownership="none">
  53245. <type name="utf8" c:type="const char*"/>
  53246. </parameter>
  53247. <parameter name="default_user" transfer-ownership="none">
  53248. <type name="utf8" c:type="const char*"/>
  53249. </parameter>
  53250. <parameter name="default_domain" transfer-ownership="none">
  53251. <type name="utf8" c:type="const char*"/>
  53252. </parameter>
  53253. <parameter name="flags" transfer-ownership="none">
  53254. <type name="AskPasswordFlags" c:type="GAskPasswordFlags"/>
  53255. </parameter>
  53256. </parameters>
  53257. </virtual-method>
  53258. <virtual-method name="ask_question">
  53259. <return-value transfer-ownership="none">
  53260. <type name="none" c:type="void"/>
  53261. </return-value>
  53262. <parameters>
  53263. <instance-parameter name="op" transfer-ownership="none">
  53264. <type name="MountOperation" c:type="GMountOperation*"/>
  53265. </instance-parameter>
  53266. <parameter name="message" transfer-ownership="none">
  53267. <type name="utf8" c:type="const char*"/>
  53268. </parameter>
  53269. <parameter name="choices" transfer-ownership="none">
  53270. <type name="utf8" c:type="const char*"/>
  53271. </parameter>
  53272. </parameters>
  53273. </virtual-method>
  53274. <virtual-method name="reply" invoker="reply">
  53275. <doc xml:space="preserve">Emits the #GMountOperation::reply signal.</doc>
  53276. <return-value transfer-ownership="none">
  53277. <type name="none" c:type="void"/>
  53278. </return-value>
  53279. <parameters>
  53280. <instance-parameter name="op" transfer-ownership="none">
  53281. <doc xml:space="preserve">a #GMountOperation</doc>
  53282. <type name="MountOperation" c:type="GMountOperation*"/>
  53283. </instance-parameter>
  53284. <parameter name="result" transfer-ownership="none">
  53285. <doc xml:space="preserve">a #GMountOperationResult</doc>
  53286. <type name="MountOperationResult" c:type="GMountOperationResult"/>
  53287. </parameter>
  53288. </parameters>
  53289. </virtual-method>
  53290. <virtual-method name="show_processes" introspectable="0">
  53291. <return-value transfer-ownership="none">
  53292. <type name="none" c:type="void"/>
  53293. </return-value>
  53294. <parameters>
  53295. <instance-parameter name="op" transfer-ownership="none">
  53296. <type name="MountOperation" c:type="GMountOperation*"/>
  53297. </instance-parameter>
  53298. <parameter name="message" transfer-ownership="none">
  53299. <type name="utf8" c:type="const gchar*"/>
  53300. </parameter>
  53301. <parameter name="processes" transfer-ownership="none">
  53302. <array name="GLib.Array" c:type="GArray*">
  53303. <type name="gpointer" c:type="gpointer"/>
  53304. </array>
  53305. </parameter>
  53306. <parameter name="choices" transfer-ownership="none">
  53307. <type name="utf8" c:type="const gchar*"/>
  53308. </parameter>
  53309. </parameters>
  53310. </virtual-method>
  53311. <virtual-method name="show_unmount_progress">
  53312. <return-value transfer-ownership="none">
  53313. <type name="none" c:type="void"/>
  53314. </return-value>
  53315. <parameters>
  53316. <instance-parameter name="op" transfer-ownership="none">
  53317. <type name="MountOperation" c:type="GMountOperation*"/>
  53318. </instance-parameter>
  53319. <parameter name="message" transfer-ownership="none">
  53320. <type name="utf8" c:type="const gchar*"/>
  53321. </parameter>
  53322. <parameter name="time_left" transfer-ownership="none">
  53323. <type name="gint64" c:type="gint64"/>
  53324. </parameter>
  53325. <parameter name="bytes_left" transfer-ownership="none">
  53326. <type name="gint64" c:type="gint64"/>
  53327. </parameter>
  53328. </parameters>
  53329. </virtual-method>
  53330. <method name="get_anonymous"
  53331. c:identifier="g_mount_operation_get_anonymous">
  53332. <doc xml:space="preserve">Check to see whether the mount operation is being used
  53333. for an anonymous user.</doc>
  53334. <return-value transfer-ownership="none">
  53335. <doc xml:space="preserve">%TRUE if mount operation is anonymous.</doc>
  53336. <type name="gboolean" c:type="gboolean"/>
  53337. </return-value>
  53338. <parameters>
  53339. <instance-parameter name="op" transfer-ownership="none">
  53340. <doc xml:space="preserve">a #GMountOperation.</doc>
  53341. <type name="MountOperation" c:type="GMountOperation*"/>
  53342. </instance-parameter>
  53343. </parameters>
  53344. </method>
  53345. <method name="get_choice" c:identifier="g_mount_operation_get_choice">
  53346. <doc xml:space="preserve">Gets a choice from the mount operation.</doc>
  53347. <return-value transfer-ownership="none">
  53348. <doc xml:space="preserve">an integer containing an index of the user's choice from
  53349. the choice's list, or %0.</doc>
  53350. <type name="gint" c:type="int"/>
  53351. </return-value>
  53352. <parameters>
  53353. <instance-parameter name="op" transfer-ownership="none">
  53354. <doc xml:space="preserve">a #GMountOperation.</doc>
  53355. <type name="MountOperation" c:type="GMountOperation*"/>
  53356. </instance-parameter>
  53357. </parameters>
  53358. </method>
  53359. <method name="get_domain" c:identifier="g_mount_operation_get_domain">
  53360. <doc xml:space="preserve">Gets the domain of the mount operation.</doc>
  53361. <return-value transfer-ownership="none">
  53362. <doc xml:space="preserve">a string set to the domain.</doc>
  53363. <type name="utf8" c:type="const char*"/>
  53364. </return-value>
  53365. <parameters>
  53366. <instance-parameter name="op" transfer-ownership="none">
  53367. <doc xml:space="preserve">a #GMountOperation.</doc>
  53368. <type name="MountOperation" c:type="GMountOperation*"/>
  53369. </instance-parameter>
  53370. </parameters>
  53371. </method>
  53372. <method name="get_password"
  53373. c:identifier="g_mount_operation_get_password">
  53374. <doc xml:space="preserve">Gets a password from the mount operation.</doc>
  53375. <return-value transfer-ownership="none">
  53376. <doc xml:space="preserve">a string containing the password within @op.</doc>
  53377. <type name="utf8" c:type="const char*"/>
  53378. </return-value>
  53379. <parameters>
  53380. <instance-parameter name="op" transfer-ownership="none">
  53381. <doc xml:space="preserve">a #GMountOperation.</doc>
  53382. <type name="MountOperation" c:type="GMountOperation*"/>
  53383. </instance-parameter>
  53384. </parameters>
  53385. </method>
  53386. <method name="get_password_save"
  53387. c:identifier="g_mount_operation_get_password_save">
  53388. <doc xml:space="preserve">Gets the state of saving passwords for the mount operation.</doc>
  53389. <return-value transfer-ownership="none">
  53390. <doc xml:space="preserve">a #GPasswordSave flag.</doc>
  53391. <type name="PasswordSave" c:type="GPasswordSave"/>
  53392. </return-value>
  53393. <parameters>
  53394. <instance-parameter name="op" transfer-ownership="none">
  53395. <doc xml:space="preserve">a #GMountOperation.</doc>
  53396. <type name="MountOperation" c:type="GMountOperation*"/>
  53397. </instance-parameter>
  53398. </parameters>
  53399. </method>
  53400. <method name="get_username"
  53401. c:identifier="g_mount_operation_get_username">
  53402. <doc xml:space="preserve">Get the user name from the mount operation.</doc>
  53403. <return-value transfer-ownership="none">
  53404. <doc xml:space="preserve">a string containing the user name.</doc>
  53405. <type name="utf8" c:type="const char*"/>
  53406. </return-value>
  53407. <parameters>
  53408. <instance-parameter name="op" transfer-ownership="none">
  53409. <doc xml:space="preserve">a #GMountOperation.</doc>
  53410. <type name="MountOperation" c:type="GMountOperation*"/>
  53411. </instance-parameter>
  53412. </parameters>
  53413. </method>
  53414. <method name="reply" c:identifier="g_mount_operation_reply">
  53415. <doc xml:space="preserve">Emits the #GMountOperation::reply signal.</doc>
  53416. <return-value transfer-ownership="none">
  53417. <type name="none" c:type="void"/>
  53418. </return-value>
  53419. <parameters>
  53420. <instance-parameter name="op" transfer-ownership="none">
  53421. <doc xml:space="preserve">a #GMountOperation</doc>
  53422. <type name="MountOperation" c:type="GMountOperation*"/>
  53423. </instance-parameter>
  53424. <parameter name="result" transfer-ownership="none">
  53425. <doc xml:space="preserve">a #GMountOperationResult</doc>
  53426. <type name="MountOperationResult" c:type="GMountOperationResult"/>
  53427. </parameter>
  53428. </parameters>
  53429. </method>
  53430. <method name="set_anonymous"
  53431. c:identifier="g_mount_operation_set_anonymous">
  53432. <doc xml:space="preserve">Sets the mount operation to use an anonymous user if @anonymous is %TRUE.</doc>
  53433. <return-value transfer-ownership="none">
  53434. <type name="none" c:type="void"/>
  53435. </return-value>
  53436. <parameters>
  53437. <instance-parameter name="op" transfer-ownership="none">
  53438. <doc xml:space="preserve">a #GMountOperation.</doc>
  53439. <type name="MountOperation" c:type="GMountOperation*"/>
  53440. </instance-parameter>
  53441. <parameter name="anonymous" transfer-ownership="none">
  53442. <doc xml:space="preserve">boolean value.</doc>
  53443. <type name="gboolean" c:type="gboolean"/>
  53444. </parameter>
  53445. </parameters>
  53446. </method>
  53447. <method name="set_choice" c:identifier="g_mount_operation_set_choice">
  53448. <doc xml:space="preserve">Sets a default choice for the mount operation.</doc>
  53449. <return-value transfer-ownership="none">
  53450. <type name="none" c:type="void"/>
  53451. </return-value>
  53452. <parameters>
  53453. <instance-parameter name="op" transfer-ownership="none">
  53454. <doc xml:space="preserve">a #GMountOperation.</doc>
  53455. <type name="MountOperation" c:type="GMountOperation*"/>
  53456. </instance-parameter>
  53457. <parameter name="choice" transfer-ownership="none">
  53458. <doc xml:space="preserve">an integer.</doc>
  53459. <type name="gint" c:type="int"/>
  53460. </parameter>
  53461. </parameters>
  53462. </method>
  53463. <method name="set_domain" c:identifier="g_mount_operation_set_domain">
  53464. <doc xml:space="preserve">Sets the mount operation's domain.</doc>
  53465. <return-value transfer-ownership="none">
  53466. <type name="none" c:type="void"/>
  53467. </return-value>
  53468. <parameters>
  53469. <instance-parameter name="op" transfer-ownership="none">
  53470. <doc xml:space="preserve">a #GMountOperation.</doc>
  53471. <type name="MountOperation" c:type="GMountOperation*"/>
  53472. </instance-parameter>
  53473. <parameter name="domain" transfer-ownership="none">
  53474. <doc xml:space="preserve">the domain to set.</doc>
  53475. <type name="utf8" c:type="const char*"/>
  53476. </parameter>
  53477. </parameters>
  53478. </method>
  53479. <method name="set_password"
  53480. c:identifier="g_mount_operation_set_password">
  53481. <doc xml:space="preserve">Sets the mount operation's password to @password.</doc>
  53482. <return-value transfer-ownership="none">
  53483. <type name="none" c:type="void"/>
  53484. </return-value>
  53485. <parameters>
  53486. <instance-parameter name="op" transfer-ownership="none">
  53487. <doc xml:space="preserve">a #GMountOperation.</doc>
  53488. <type name="MountOperation" c:type="GMountOperation*"/>
  53489. </instance-parameter>
  53490. <parameter name="password" transfer-ownership="none">
  53491. <doc xml:space="preserve">password to set.</doc>
  53492. <type name="utf8" c:type="const char*"/>
  53493. </parameter>
  53494. </parameters>
  53495. </method>
  53496. <method name="set_password_save"
  53497. c:identifier="g_mount_operation_set_password_save">
  53498. <doc xml:space="preserve">Sets the state of saving passwords for the mount operation.</doc>
  53499. <return-value transfer-ownership="none">
  53500. <type name="none" c:type="void"/>
  53501. </return-value>
  53502. <parameters>
  53503. <instance-parameter name="op" transfer-ownership="none">
  53504. <doc xml:space="preserve">a #GMountOperation.</doc>
  53505. <type name="MountOperation" c:type="GMountOperation*"/>
  53506. </instance-parameter>
  53507. <parameter name="save" transfer-ownership="none">
  53508. <doc xml:space="preserve">a set of #GPasswordSave flags.</doc>
  53509. <type name="PasswordSave" c:type="GPasswordSave"/>
  53510. </parameter>
  53511. </parameters>
  53512. </method>
  53513. <method name="set_username"
  53514. c:identifier="g_mount_operation_set_username">
  53515. <doc xml:space="preserve">Sets the user name within @op to @username.</doc>
  53516. <return-value transfer-ownership="none">
  53517. <type name="none" c:type="void"/>
  53518. </return-value>
  53519. <parameters>
  53520. <instance-parameter name="op" transfer-ownership="none">
  53521. <doc xml:space="preserve">a #GMountOperation.</doc>
  53522. <type name="MountOperation" c:type="GMountOperation*"/>
  53523. </instance-parameter>
  53524. <parameter name="username" transfer-ownership="none">
  53525. <doc xml:space="preserve">input username.</doc>
  53526. <type name="utf8" c:type="const char*"/>
  53527. </parameter>
  53528. </parameters>
  53529. </method>
  53530. <property name="anonymous" writable="1" transfer-ownership="none">
  53531. <doc xml:space="preserve">Whether to use an anonymous user when authenticating.</doc>
  53532. <type name="gboolean" c:type="gboolean"/>
  53533. </property>
  53534. <property name="choice" writable="1" transfer-ownership="none">
  53535. <doc xml:space="preserve">The index of the user's choice when a question is asked during the
  53536. mount operation. See the #GMountOperation::ask-question signal.</doc>
  53537. <type name="gint" c:type="gint"/>
  53538. </property>
  53539. <property name="domain" writable="1" transfer-ownership="none">
  53540. <doc xml:space="preserve">The domain to use for the mount operation.</doc>
  53541. <type name="utf8" c:type="gchar*"/>
  53542. </property>
  53543. <property name="password" writable="1" transfer-ownership="none">
  53544. <doc xml:space="preserve">The password that is used for authentication when carrying out
  53545. the mount operation.</doc>
  53546. <type name="utf8" c:type="gchar*"/>
  53547. </property>
  53548. <property name="password-save" writable="1" transfer-ownership="none">
  53549. <doc xml:space="preserve">Determines if and how the password information should be saved.</doc>
  53550. <type name="PasswordSave"/>
  53551. </property>
  53552. <property name="username" writable="1" transfer-ownership="none">
  53553. <doc xml:space="preserve">The user name that is used for authentication when carrying out
  53554. the mount operation.</doc>
  53555. <type name="utf8" c:type="gchar*"/>
  53556. </property>
  53557. <field name="parent_instance">
  53558. <type name="GObject.Object" c:type="GObject"/>
  53559. </field>
  53560. <field name="priv">
  53561. <type name="MountOperationPrivate" c:type="GMountOperationPrivate*"/>
  53562. </field>
  53563. <glib:signal name="aborted" when="last" version="2.20">
  53564. <doc xml:space="preserve">Emitted by the backend when e.g. a device becomes unavailable
  53565. while a mount operation is in progress.
  53566. Implementations of GMountOperation should handle this signal
  53567. by dismissing open password dialogs.</doc>
  53568. <return-value transfer-ownership="none">
  53569. <type name="none" c:type="void"/>
  53570. </return-value>
  53571. </glib:signal>
  53572. <glib:signal name="ask-password" when="last">
  53573. <doc xml:space="preserve">Emitted when a mount operation asks the user for a password.
  53574. If the message contains a line break, the first line should be
  53575. presented as a heading. For example, it may be used as the
  53576. primary text in a #GtkMessageDialog.</doc>
  53577. <return-value transfer-ownership="none">
  53578. <type name="none" c:type="void"/>
  53579. </return-value>
  53580. <parameters>
  53581. <parameter name="message" transfer-ownership="none">
  53582. <doc xml:space="preserve">string containing a message to display to the user.</doc>
  53583. <type name="utf8" c:type="gchar*"/>
  53584. </parameter>
  53585. <parameter name="default_user" transfer-ownership="none">
  53586. <doc xml:space="preserve">string containing the default user name.</doc>
  53587. <type name="utf8" c:type="gchar*"/>
  53588. </parameter>
  53589. <parameter name="default_domain" transfer-ownership="none">
  53590. <doc xml:space="preserve">string containing the default domain.</doc>
  53591. <type name="utf8" c:type="gchar*"/>
  53592. </parameter>
  53593. <parameter name="flags" transfer-ownership="none">
  53594. <doc xml:space="preserve">a set of #GAskPasswordFlags.</doc>
  53595. <type name="AskPasswordFlags"/>
  53596. </parameter>
  53597. </parameters>
  53598. </glib:signal>
  53599. <glib:signal name="ask-question" when="last">
  53600. <doc xml:space="preserve">Emitted when asking the user a question and gives a list of
  53601. choices for the user to choose from.
  53602. If the message contains a line break, the first line should be
  53603. presented as a heading. For example, it may be used as the
  53604. primary text in a #GtkMessageDialog.</doc>
  53605. <return-value transfer-ownership="none">
  53606. <type name="none" c:type="void"/>
  53607. </return-value>
  53608. <parameters>
  53609. <parameter name="message" transfer-ownership="none">
  53610. <doc xml:space="preserve">string containing a message to display to the user.</doc>
  53611. <type name="utf8" c:type="gchar*"/>
  53612. </parameter>
  53613. <parameter name="choices" transfer-ownership="none">
  53614. <doc xml:space="preserve">an array of strings for each possible choice.</doc>
  53615. <array>
  53616. <type name="utf8"/>
  53617. </array>
  53618. </parameter>
  53619. </parameters>
  53620. </glib:signal>
  53621. <glib:signal name="reply" when="last">
  53622. <doc xml:space="preserve">Emitted when the user has replied to the mount operation.</doc>
  53623. <return-value transfer-ownership="none">
  53624. <type name="none" c:type="void"/>
  53625. </return-value>
  53626. <parameters>
  53627. <parameter name="result" transfer-ownership="none">
  53628. <doc xml:space="preserve">a #GMountOperationResult indicating how the request was handled</doc>
  53629. <type name="MountOperationResult"/>
  53630. </parameter>
  53631. </parameters>
  53632. </glib:signal>
  53633. <glib:signal name="show-processes" when="last" version="2.22">
  53634. <doc xml:space="preserve">Emitted when one or more processes are blocking an operation
  53635. e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
  53636. Note that this signal may be emitted several times to update the
  53637. list of blocking processes as processes close files. The
  53638. application should only respond with g_mount_operation_reply() to
  53639. the latest signal (setting #GMountOperation:choice to the choice
  53640. the user made).
  53641. If the message contains a line break, the first line should be
  53642. presented as a heading. For example, it may be used as the
  53643. primary text in a #GtkMessageDialog.</doc>
  53644. <return-value transfer-ownership="none">
  53645. <type name="none" c:type="void"/>
  53646. </return-value>
  53647. <parameters>
  53648. <parameter name="message" transfer-ownership="none">
  53649. <doc xml:space="preserve">string containing a message to display to the user.</doc>
  53650. <type name="utf8" c:type="gchar*"/>
  53651. </parameter>
  53652. <parameter name="processes" transfer-ownership="none">
  53653. <doc xml:space="preserve">an array of #GPid for processes
  53654. blocking the operation.</doc>
  53655. <array name="GLib.Array">
  53656. <type name="GLib.Pid"/>
  53657. </array>
  53658. </parameter>
  53659. <parameter name="choices" transfer-ownership="none">
  53660. <doc xml:space="preserve">an array of strings for each possible choice.</doc>
  53661. <array>
  53662. <type name="utf8"/>
  53663. </array>
  53664. </parameter>
  53665. </parameters>
  53666. </glib:signal>
  53667. <glib:signal name="show-unmount-progress" when="last" version="2.34">
  53668. <doc xml:space="preserve">Emitted when an unmount operation has been busy for more than some time
  53669. (typically 1.5 seconds).
  53670. When unmounting or ejecting a volume, the kernel might need to flush
  53671. pending data in its buffers to the volume stable storage, and this operation
  53672. can take a considerable amount of time. This signal may be emitted several
  53673. times as long as the unmount operation is outstanding, and then one
  53674. last time when the operation is completed, with @bytes_left set to zero.
  53675. Implementations of GMountOperation should handle this signal by
  53676. showing an UI notification, and then dismiss it, or show another notification
  53677. of completion, when @bytes_left reaches zero.
  53678. If the message contains a line break, the first line should be
  53679. presented as a heading. For example, it may be used as the
  53680. primary text in a #GtkMessageDialog.</doc>
  53681. <return-value transfer-ownership="none">
  53682. <type name="none" c:type="void"/>
  53683. </return-value>
  53684. <parameters>
  53685. <parameter name="message" transfer-ownership="none">
  53686. <doc xml:space="preserve">string containing a mesage to display to the user</doc>
  53687. <type name="utf8" c:type="gchar*"/>
  53688. </parameter>
  53689. <parameter name="time_left" transfer-ownership="none">
  53690. <doc xml:space="preserve">the estimated time left before the operation completes,
  53691. in microseconds, or -1</doc>
  53692. <type name="gint64" c:type="gint64"/>
  53693. </parameter>
  53694. <parameter name="bytes_left" transfer-ownership="none">
  53695. <doc xml:space="preserve">the amount of bytes to be written before the operation
  53696. completes (or -1 if such amount is not known), or zero if the operation
  53697. is completed</doc>
  53698. <type name="gint64" c:type="gint64"/>
  53699. </parameter>
  53700. </parameters>
  53701. </glib:signal>
  53702. </class>
  53703. <record name="MountOperationClass"
  53704. c:type="GMountOperationClass"
  53705. glib:is-gtype-struct-for="MountOperation">
  53706. <field name="parent_class">
  53707. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  53708. </field>
  53709. <field name="ask_password">
  53710. <callback name="ask_password">
  53711. <return-value transfer-ownership="none">
  53712. <type name="none" c:type="void"/>
  53713. </return-value>
  53714. <parameters>
  53715. <parameter name="op" transfer-ownership="none">
  53716. <type name="MountOperation" c:type="GMountOperation*"/>
  53717. </parameter>
  53718. <parameter name="message" transfer-ownership="none">
  53719. <type name="utf8" c:type="const char*"/>
  53720. </parameter>
  53721. <parameter name="default_user" transfer-ownership="none">
  53722. <type name="utf8" c:type="const char*"/>
  53723. </parameter>
  53724. <parameter name="default_domain" transfer-ownership="none">
  53725. <type name="utf8" c:type="const char*"/>
  53726. </parameter>
  53727. <parameter name="flags" transfer-ownership="none">
  53728. <type name="AskPasswordFlags" c:type="GAskPasswordFlags"/>
  53729. </parameter>
  53730. </parameters>
  53731. </callback>
  53732. </field>
  53733. <field name="ask_question">
  53734. <callback name="ask_question">
  53735. <return-value transfer-ownership="none">
  53736. <type name="none" c:type="void"/>
  53737. </return-value>
  53738. <parameters>
  53739. <parameter name="op" transfer-ownership="none">
  53740. <type name="MountOperation" c:type="GMountOperation*"/>
  53741. </parameter>
  53742. <parameter name="message" transfer-ownership="none">
  53743. <type name="utf8" c:type="const char*"/>
  53744. </parameter>
  53745. <parameter name="choices" transfer-ownership="none">
  53746. <type name="utf8" c:type="const char*"/>
  53747. </parameter>
  53748. </parameters>
  53749. </callback>
  53750. </field>
  53751. <field name="reply">
  53752. <callback name="reply">
  53753. <return-value transfer-ownership="none">
  53754. <type name="none" c:type="void"/>
  53755. </return-value>
  53756. <parameters>
  53757. <parameter name="op" transfer-ownership="none">
  53758. <doc xml:space="preserve">a #GMountOperation</doc>
  53759. <type name="MountOperation" c:type="GMountOperation*"/>
  53760. </parameter>
  53761. <parameter name="result" transfer-ownership="none">
  53762. <doc xml:space="preserve">a #GMountOperationResult</doc>
  53763. <type name="MountOperationResult"
  53764. c:type="GMountOperationResult"/>
  53765. </parameter>
  53766. </parameters>
  53767. </callback>
  53768. </field>
  53769. <field name="aborted">
  53770. <callback name="aborted">
  53771. <return-value transfer-ownership="none">
  53772. <type name="none" c:type="void"/>
  53773. </return-value>
  53774. <parameters>
  53775. <parameter name="op" transfer-ownership="none">
  53776. <type name="MountOperation" c:type="GMountOperation*"/>
  53777. </parameter>
  53778. </parameters>
  53779. </callback>
  53780. </field>
  53781. <field name="show_processes" introspectable="0">
  53782. <callback name="show_processes" introspectable="0">
  53783. <return-value transfer-ownership="none">
  53784. <type name="none" c:type="void"/>
  53785. </return-value>
  53786. <parameters>
  53787. <parameter name="op" transfer-ownership="none">
  53788. <type name="MountOperation" c:type="GMountOperation*"/>
  53789. </parameter>
  53790. <parameter name="message" transfer-ownership="none">
  53791. <type name="utf8" c:type="const gchar*"/>
  53792. </parameter>
  53793. <parameter name="processes" transfer-ownership="none">
  53794. <array name="GLib.Array" c:type="GArray*">
  53795. <type name="gpointer" c:type="gpointer"/>
  53796. </array>
  53797. </parameter>
  53798. <parameter name="choices" transfer-ownership="none">
  53799. <type name="utf8" c:type="const gchar*"/>
  53800. </parameter>
  53801. </parameters>
  53802. </callback>
  53803. </field>
  53804. <field name="show_unmount_progress">
  53805. <callback name="show_unmount_progress">
  53806. <return-value transfer-ownership="none">
  53807. <type name="none" c:type="void"/>
  53808. </return-value>
  53809. <parameters>
  53810. <parameter name="op" transfer-ownership="none">
  53811. <type name="MountOperation" c:type="GMountOperation*"/>
  53812. </parameter>
  53813. <parameter name="message" transfer-ownership="none">
  53814. <type name="utf8" c:type="const gchar*"/>
  53815. </parameter>
  53816. <parameter name="time_left" transfer-ownership="none">
  53817. <type name="gint64" c:type="gint64"/>
  53818. </parameter>
  53819. <parameter name="bytes_left" transfer-ownership="none">
  53820. <type name="gint64" c:type="gint64"/>
  53821. </parameter>
  53822. </parameters>
  53823. </callback>
  53824. </field>
  53825. <field name="_g_reserved1" introspectable="0">
  53826. <callback name="_g_reserved1">
  53827. <return-value transfer-ownership="none">
  53828. <type name="none" c:type="void"/>
  53829. </return-value>
  53830. </callback>
  53831. </field>
  53832. <field name="_g_reserved2" introspectable="0">
  53833. <callback name="_g_reserved2">
  53834. <return-value transfer-ownership="none">
  53835. <type name="none" c:type="void"/>
  53836. </return-value>
  53837. </callback>
  53838. </field>
  53839. <field name="_g_reserved3" introspectable="0">
  53840. <callback name="_g_reserved3">
  53841. <return-value transfer-ownership="none">
  53842. <type name="none" c:type="void"/>
  53843. </return-value>
  53844. </callback>
  53845. </field>
  53846. <field name="_g_reserved4" introspectable="0">
  53847. <callback name="_g_reserved4">
  53848. <return-value transfer-ownership="none">
  53849. <type name="none" c:type="void"/>
  53850. </return-value>
  53851. </callback>
  53852. </field>
  53853. <field name="_g_reserved5" introspectable="0">
  53854. <callback name="_g_reserved5">
  53855. <return-value transfer-ownership="none">
  53856. <type name="none" c:type="void"/>
  53857. </return-value>
  53858. </callback>
  53859. </field>
  53860. <field name="_g_reserved6" introspectable="0">
  53861. <callback name="_g_reserved6">
  53862. <return-value transfer-ownership="none">
  53863. <type name="none" c:type="void"/>
  53864. </return-value>
  53865. </callback>
  53866. </field>
  53867. <field name="_g_reserved7" introspectable="0">
  53868. <callback name="_g_reserved7">
  53869. <return-value transfer-ownership="none">
  53870. <type name="none" c:type="void"/>
  53871. </return-value>
  53872. </callback>
  53873. </field>
  53874. <field name="_g_reserved8" introspectable="0">
  53875. <callback name="_g_reserved8">
  53876. <return-value transfer-ownership="none">
  53877. <type name="none" c:type="void"/>
  53878. </return-value>
  53879. </callback>
  53880. </field>
  53881. <field name="_g_reserved9" introspectable="0">
  53882. <callback name="_g_reserved9">
  53883. <return-value transfer-ownership="none">
  53884. <type name="none" c:type="void"/>
  53885. </return-value>
  53886. </callback>
  53887. </field>
  53888. </record>
  53889. <record name="MountOperationPrivate"
  53890. c:type="GMountOperationPrivate"
  53891. disguised="1">
  53892. </record>
  53893. <enumeration name="MountOperationResult"
  53894. glib:type-name="GMountOperationResult"
  53895. glib:get-type="g_mount_operation_result_get_type"
  53896. c:type="GMountOperationResult">
  53897. <doc xml:space="preserve">#GMountOperationResult is returned as a result when a request for
  53898. information is send by the mounting operation.</doc>
  53899. <member name="handled"
  53900. value="0"
  53901. c:identifier="G_MOUNT_OPERATION_HANDLED"
  53902. glib:nick="handled">
  53903. <doc xml:space="preserve">The request was fulfilled and the
  53904. user specified data is now available</doc>
  53905. </member>
  53906. <member name="aborted"
  53907. value="1"
  53908. c:identifier="G_MOUNT_OPERATION_ABORTED"
  53909. glib:nick="aborted">
  53910. <doc xml:space="preserve">The user requested the mount operation
  53911. to be aborted</doc>
  53912. </member>
  53913. <member name="unhandled"
  53914. value="2"
  53915. c:identifier="G_MOUNT_OPERATION_UNHANDLED"
  53916. glib:nick="unhandled">
  53917. <doc xml:space="preserve">The request was unhandled (i.e. not
  53918. implemented)</doc>
  53919. </member>
  53920. </enumeration>
  53921. <bitfield name="MountUnmountFlags"
  53922. glib:type-name="GMountUnmountFlags"
  53923. glib:get-type="g_mount_unmount_flags_get_type"
  53924. c:type="GMountUnmountFlags">
  53925. <doc xml:space="preserve">Flags used when an unmounting a mount.</doc>
  53926. <member name="none"
  53927. value="0"
  53928. c:identifier="G_MOUNT_UNMOUNT_NONE"
  53929. glib:nick="none">
  53930. <doc xml:space="preserve">No flags set.</doc>
  53931. </member>
  53932. <member name="force"
  53933. value="1"
  53934. c:identifier="G_MOUNT_UNMOUNT_FORCE"
  53935. glib:nick="force">
  53936. <doc xml:space="preserve">Unmount even if there are outstanding
  53937. file operations on the mount.</doc>
  53938. </member>
  53939. </bitfield>
  53940. <constant name="NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME"
  53941. value="gio-native-volume-monitor"
  53942. c:type="G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME">
  53943. <type name="utf8" c:type="gchar*"/>
  53944. </constant>
  53945. <constant name="NETWORK_MONITOR_EXTENSION_POINT_NAME"
  53946. value="gio-network-monitor"
  53947. c:type="G_NETWORK_MONITOR_EXTENSION_POINT_NAME"
  53948. version="2.30">
  53949. <doc xml:space="preserve">Extension point for network status monitoring functionality.
  53950. See [Extending GIO][extending-gio].</doc>
  53951. <type name="utf8" c:type="gchar*"/>
  53952. </constant>
  53953. <record name="NativeSocketAddress"
  53954. c:type="GNativeSocketAddress"
  53955. disguised="1">
  53956. <doc xml:space="preserve">An socket address of some unknown native type.</doc>
  53957. </record>
  53958. <class name="NativeVolumeMonitor"
  53959. c:symbol-prefix="native_volume_monitor"
  53960. c:type="GNativeVolumeMonitor"
  53961. parent="VolumeMonitor"
  53962. abstract="1"
  53963. glib:type-name="GNativeVolumeMonitor"
  53964. glib:get-type="g_native_volume_monitor_get_type"
  53965. glib:type-struct="NativeVolumeMonitorClass">
  53966. <field name="parent_instance">
  53967. <type name="VolumeMonitor" c:type="GVolumeMonitor"/>
  53968. </field>
  53969. </class>
  53970. <record name="NativeVolumeMonitorClass"
  53971. c:type="GNativeVolumeMonitorClass"
  53972. glib:is-gtype-struct-for="NativeVolumeMonitor">
  53973. <field name="parent_class">
  53974. <type name="VolumeMonitorClass" c:type="GVolumeMonitorClass"/>
  53975. </field>
  53976. <field name="get_mount_for_mount_path" introspectable="0">
  53977. <callback name="get_mount_for_mount_path" introspectable="0">
  53978. <return-value>
  53979. <type name="Mount" c:type="GMount*"/>
  53980. </return-value>
  53981. <parameters>
  53982. <parameter name="mount_path" transfer-ownership="none">
  53983. <type name="utf8" c:type="const char*"/>
  53984. </parameter>
  53985. <parameter name="cancellable" transfer-ownership="none">
  53986. <type name="Cancellable" c:type="GCancellable*"/>
  53987. </parameter>
  53988. </parameters>
  53989. </callback>
  53990. </field>
  53991. </record>
  53992. <class name="NetworkAddress"
  53993. c:symbol-prefix="network_address"
  53994. c:type="GNetworkAddress"
  53995. parent="GObject.Object"
  53996. glib:type-name="GNetworkAddress"
  53997. glib:get-type="g_network_address_get_type"
  53998. glib:type-struct="NetworkAddressClass">
  53999. <doc xml:space="preserve">#GNetworkAddress provides an easy way to resolve a hostname and
  54000. then attempt to connect to that host, handling the possibility of
  54001. multiple IP addresses and multiple address families.
  54002. See #GSocketConnectable for and example of using the connectable
  54003. interface.</doc>
  54004. <implements name="SocketConnectable"/>
  54005. <constructor name="new"
  54006. c:identifier="g_network_address_new"
  54007. version="2.22">
  54008. <doc xml:space="preserve">Creates a new #GSocketConnectable for connecting to the given
  54009. @hostname and @port.
  54010. Note that depending on the configuration of the machine, a
  54011. @hostname of `localhost` may refer to the IPv4 loopback address
  54012. only, or to both IPv4 and IPv6; use
  54013. g_network_address_new_loopback() to create a #GNetworkAddress that
  54014. is guaranteed to resolve to both addresses.</doc>
  54015. <return-value transfer-ownership="full">
  54016. <doc xml:space="preserve">the new #GNetworkAddress</doc>
  54017. <type name="NetworkAddress" c:type="GSocketConnectable*"/>
  54018. </return-value>
  54019. <parameters>
  54020. <parameter name="hostname" transfer-ownership="none">
  54021. <doc xml:space="preserve">the hostname</doc>
  54022. <type name="utf8" c:type="const gchar*"/>
  54023. </parameter>
  54024. <parameter name="port" transfer-ownership="none">
  54025. <doc xml:space="preserve">the port</doc>
  54026. <type name="guint16" c:type="guint16"/>
  54027. </parameter>
  54028. </parameters>
  54029. </constructor>
  54030. <constructor name="new_loopback"
  54031. c:identifier="g_network_address_new_loopback"
  54032. version="2.44">
  54033. <doc xml:space="preserve">Creates a new #GSocketConnectable for connecting to the local host
  54034. over a loopback connection to the given @port. This is intended for
  54035. use in connecting to local services which may be running on IPv4 or
  54036. IPv6.
  54037. The connectable will return IPv4 and IPv6 loopback addresses,
  54038. regardless of how the host resolves `localhost`. By contrast,
  54039. g_network_address_new() will often only return an IPv4 address when
  54040. resolving `localhost`, and an IPv6 address for `localhost6`.
  54041. g_network_address_get_hostname() will always return `localhost` for
  54042. #GNetworkAddresses created with this constructor.</doc>
  54043. <return-value transfer-ownership="full">
  54044. <doc xml:space="preserve">the new #GNetworkAddress</doc>
  54045. <type name="NetworkAddress" c:type="GSocketConnectable*"/>
  54046. </return-value>
  54047. <parameters>
  54048. <parameter name="port" transfer-ownership="none">
  54049. <doc xml:space="preserve">the port</doc>
  54050. <type name="guint16" c:type="guint16"/>
  54051. </parameter>
  54052. </parameters>
  54053. </constructor>
  54054. <function name="parse"
  54055. c:identifier="g_network_address_parse"
  54056. version="2.22"
  54057. throws="1">
  54058. <doc xml:space="preserve">Creates a new #GSocketConnectable for connecting to the given
  54059. @hostname and @port. May fail and return %NULL in case
  54060. parsing @host_and_port fails.
  54061. @host_and_port may be in any of a number of recognised formats; an IPv6
  54062. address, an IPv4 address, or a domain name (in which case a DNS
  54063. lookup is performed). Quoting with [] is supported for all address
  54064. types. A port override may be specified in the usual way with a
  54065. colon.
  54066. If no port is specified in @host_and_port then @default_port will be
  54067. used as the port number to connect to.
  54068. In general, @host_and_port is expected to be provided by the user
  54069. (allowing them to give the hostname, and a port overide if necessary)
  54070. and @default_port is expected to be provided by the application.
  54071. (The port component of @host_and_port can also be specified as a
  54072. service name rather than as a numeric port, but this functionality
  54073. is deprecated, because it depends on the contents of /etc/services,
  54074. which is generally quite sparse on platforms other than Linux.)</doc>
  54075. <return-value transfer-ownership="full">
  54076. <doc xml:space="preserve">the new
  54077. #GNetworkAddress, or %NULL on error</doc>
  54078. <type name="NetworkAddress" c:type="GSocketConnectable*"/>
  54079. </return-value>
  54080. <parameters>
  54081. <parameter name="host_and_port" transfer-ownership="none">
  54082. <doc xml:space="preserve">the hostname and optionally a port</doc>
  54083. <type name="utf8" c:type="const gchar*"/>
  54084. </parameter>
  54085. <parameter name="default_port" transfer-ownership="none">
  54086. <doc xml:space="preserve">the default port if not in @host_and_port</doc>
  54087. <type name="guint16" c:type="guint16"/>
  54088. </parameter>
  54089. </parameters>
  54090. </function>
  54091. <function name="parse_uri"
  54092. c:identifier="g_network_address_parse_uri"
  54093. version="2.26"
  54094. throws="1">
  54095. <doc xml:space="preserve">Creates a new #GSocketConnectable for connecting to the given
  54096. @uri. May fail and return %NULL in case parsing @uri fails.
  54097. Using this rather than g_network_address_new() or
  54098. g_network_address_parse() allows #GSocketClient to determine
  54099. when to use application-specific proxy protocols.</doc>
  54100. <return-value transfer-ownership="full">
  54101. <doc xml:space="preserve">the new
  54102. #GNetworkAddress, or %NULL on error</doc>
  54103. <type name="NetworkAddress" c:type="GSocketConnectable*"/>
  54104. </return-value>
  54105. <parameters>
  54106. <parameter name="uri" transfer-ownership="none">
  54107. <doc xml:space="preserve">the hostname and optionally a port</doc>
  54108. <type name="utf8" c:type="const gchar*"/>
  54109. </parameter>
  54110. <parameter name="default_port" transfer-ownership="none">
  54111. <doc xml:space="preserve">The default port if none is found in the URI</doc>
  54112. <type name="guint16" c:type="guint16"/>
  54113. </parameter>
  54114. </parameters>
  54115. </function>
  54116. <method name="get_hostname"
  54117. c:identifier="g_network_address_get_hostname"
  54118. version="2.22">
  54119. <doc xml:space="preserve">Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
  54120. depending on what @addr was created with.</doc>
  54121. <return-value transfer-ownership="none">
  54122. <doc xml:space="preserve">@addr's hostname</doc>
  54123. <type name="utf8" c:type="const gchar*"/>
  54124. </return-value>
  54125. <parameters>
  54126. <instance-parameter name="addr" transfer-ownership="none">
  54127. <doc xml:space="preserve">a #GNetworkAddress</doc>
  54128. <type name="NetworkAddress" c:type="GNetworkAddress*"/>
  54129. </instance-parameter>
  54130. </parameters>
  54131. </method>
  54132. <method name="get_port"
  54133. c:identifier="g_network_address_get_port"
  54134. version="2.22">
  54135. <doc xml:space="preserve">Gets @addr's port number</doc>
  54136. <return-value transfer-ownership="none">
  54137. <doc xml:space="preserve">@addr's port (which may be 0)</doc>
  54138. <type name="guint16" c:type="guint16"/>
  54139. </return-value>
  54140. <parameters>
  54141. <instance-parameter name="addr" transfer-ownership="none">
  54142. <doc xml:space="preserve">a #GNetworkAddress</doc>
  54143. <type name="NetworkAddress" c:type="GNetworkAddress*"/>
  54144. </instance-parameter>
  54145. </parameters>
  54146. </method>
  54147. <method name="get_scheme"
  54148. c:identifier="g_network_address_get_scheme"
  54149. version="2.26">
  54150. <doc xml:space="preserve">Gets @addr's scheme</doc>
  54151. <return-value transfer-ownership="none">
  54152. <doc xml:space="preserve">@addr's scheme (%NULL if not built from URI)</doc>
  54153. <type name="utf8" c:type="const gchar*"/>
  54154. </return-value>
  54155. <parameters>
  54156. <instance-parameter name="addr" transfer-ownership="none">
  54157. <doc xml:space="preserve">a #GNetworkAddress</doc>
  54158. <type name="NetworkAddress" c:type="GNetworkAddress*"/>
  54159. </instance-parameter>
  54160. </parameters>
  54161. </method>
  54162. <property name="hostname"
  54163. writable="1"
  54164. construct-only="1"
  54165. transfer-ownership="none">
  54166. <type name="utf8" c:type="gchar*"/>
  54167. </property>
  54168. <property name="port"
  54169. writable="1"
  54170. construct-only="1"
  54171. transfer-ownership="none">
  54172. <type name="guint" c:type="guint"/>
  54173. </property>
  54174. <property name="scheme"
  54175. writable="1"
  54176. construct-only="1"
  54177. transfer-ownership="none">
  54178. <type name="utf8" c:type="gchar*"/>
  54179. </property>
  54180. <field name="parent_instance">
  54181. <type name="GObject.Object" c:type="GObject"/>
  54182. </field>
  54183. <field name="priv" readable="0" private="1">
  54184. <type name="NetworkAddressPrivate" c:type="GNetworkAddressPrivate*"/>
  54185. </field>
  54186. </class>
  54187. <record name="NetworkAddressClass"
  54188. c:type="GNetworkAddressClass"
  54189. glib:is-gtype-struct-for="NetworkAddress">
  54190. <field name="parent_class">
  54191. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  54192. </field>
  54193. </record>
  54194. <record name="NetworkAddressPrivate"
  54195. c:type="GNetworkAddressPrivate"
  54196. disguised="1">
  54197. </record>
  54198. <enumeration name="NetworkConnectivity"
  54199. version="2.44"
  54200. glib:type-name="GNetworkConnectivity"
  54201. glib:get-type="g_network_connectivity_get_type"
  54202. c:type="GNetworkConnectivity">
  54203. <doc xml:space="preserve">The host's network connectivity state, as reported by #GNetworkMonitor.</doc>
  54204. <member name="local"
  54205. value="1"
  54206. c:identifier="G_NETWORK_CONNECTIVITY_LOCAL"
  54207. glib:nick="local">
  54208. <doc xml:space="preserve">The host is not configured with a
  54209. route to the Internet; it may or may not be connected to a local
  54210. network.</doc>
  54211. </member>
  54212. <member name="limited"
  54213. value="2"
  54214. c:identifier="G_NETWORK_CONNECTIVITY_LIMITED"
  54215. glib:nick="limited">
  54216. <doc xml:space="preserve">The host is connected to a network, but
  54217. does not appear to be able to reach the full Internet, perhaps
  54218. due to upstream network problems.</doc>
  54219. </member>
  54220. <member name="portal"
  54221. value="3"
  54222. c:identifier="G_NETWORK_CONNECTIVITY_PORTAL"
  54223. glib:nick="portal">
  54224. <doc xml:space="preserve">The host is behind a captive portal and
  54225. cannot reach the full Internet.</doc>
  54226. </member>
  54227. <member name="full"
  54228. value="4"
  54229. c:identifier="G_NETWORK_CONNECTIVITY_FULL"
  54230. glib:nick="full">
  54231. <doc xml:space="preserve">The host is connected to a network, and
  54232. appears to be able to reach the full Internet.</doc>
  54233. </member>
  54234. </enumeration>
  54235. <interface name="NetworkMonitor"
  54236. c:symbol-prefix="network_monitor"
  54237. c:type="GNetworkMonitor"
  54238. version="2.32"
  54239. glib:type-name="GNetworkMonitor"
  54240. glib:get-type="g_network_monitor_get_type"
  54241. glib:type-struct="NetworkMonitorInterface">
  54242. <doc xml:space="preserve">#GNetworkMonitor provides an easy-to-use cross-platform API
  54243. for monitoring network connectivity. On Linux, the implementation
  54244. is based on the kernel's netlink interface.</doc>
  54245. <prerequisite name="Initable"/>
  54246. <function name="get_default"
  54247. c:identifier="g_network_monitor_get_default"
  54248. version="2.32">
  54249. <doc xml:space="preserve">Gets the default #GNetworkMonitor for the system.</doc>
  54250. <return-value transfer-ownership="none">
  54251. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54252. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54253. </return-value>
  54254. </function>
  54255. <virtual-method name="can_reach"
  54256. invoker="can_reach"
  54257. version="2.32"
  54258. throws="1">
  54259. <doc xml:space="preserve">Attempts to determine whether or not the host pointed to by
  54260. @connectable can be reached, without actually trying to connect to
  54261. it.
  54262. This may return %TRUE even when #GNetworkMonitor:network-available
  54263. is %FALSE, if, for example, @monitor can determine that
  54264. @connectable refers to a host on a local network.
  54265. If @monitor believes that an attempt to connect to @connectable
  54266. will succeed, it will return %TRUE. Otherwise, it will return
  54267. %FALSE and set @error to an appropriate error (such as
  54268. %G_IO_ERROR_HOST_UNREACHABLE).
  54269. Note that although this does not attempt to connect to
  54270. @connectable, it may still block for a brief period of time (eg,
  54271. trying to do multicast DNS on the local network), so if you do not
  54272. want to block, you should use g_network_monitor_can_reach_async().</doc>
  54273. <return-value transfer-ownership="none">
  54274. <doc xml:space="preserve">%TRUE if @connectable is reachable, %FALSE if not.</doc>
  54275. <type name="gboolean" c:type="gboolean"/>
  54276. </return-value>
  54277. <parameters>
  54278. <instance-parameter name="monitor" transfer-ownership="none">
  54279. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54280. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54281. </instance-parameter>
  54282. <parameter name="connectable" transfer-ownership="none">
  54283. <doc xml:space="preserve">a #GSocketConnectable</doc>
  54284. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  54285. </parameter>
  54286. <parameter name="cancellable"
  54287. transfer-ownership="none"
  54288. nullable="1"
  54289. allow-none="1">
  54290. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  54291. <type name="Cancellable" c:type="GCancellable*"/>
  54292. </parameter>
  54293. </parameters>
  54294. </virtual-method>
  54295. <virtual-method name="can_reach_async" invoker="can_reach_async">
  54296. <doc xml:space="preserve">Asynchronously attempts to determine whether or not the host
  54297. pointed to by @connectable can be reached, without actually
  54298. trying to connect to it.
  54299. For more details, see g_network_monitor_can_reach().
  54300. When the operation is finished, @callback will be called.
  54301. You can then call g_network_monitor_can_reach_finish()
  54302. to get the result of the operation.</doc>
  54303. <return-value transfer-ownership="none">
  54304. <type name="none" c:type="void"/>
  54305. </return-value>
  54306. <parameters>
  54307. <instance-parameter name="monitor" transfer-ownership="none">
  54308. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54309. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54310. </instance-parameter>
  54311. <parameter name="connectable" transfer-ownership="none">
  54312. <doc xml:space="preserve">a #GSocketConnectable</doc>
  54313. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  54314. </parameter>
  54315. <parameter name="cancellable"
  54316. transfer-ownership="none"
  54317. nullable="1"
  54318. allow-none="1">
  54319. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  54320. <type name="Cancellable" c:type="GCancellable*"/>
  54321. </parameter>
  54322. <parameter name="callback"
  54323. transfer-ownership="none"
  54324. nullable="1"
  54325. allow-none="1"
  54326. scope="async"
  54327. closure="3">
  54328. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  54329. request is satisfied</doc>
  54330. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  54331. </parameter>
  54332. <parameter name="user_data"
  54333. transfer-ownership="none"
  54334. nullable="1"
  54335. allow-none="1"
  54336. closure="3">
  54337. <doc xml:space="preserve">the data to pass to callback function</doc>
  54338. <type name="gpointer" c:type="gpointer"/>
  54339. </parameter>
  54340. </parameters>
  54341. </virtual-method>
  54342. <virtual-method name="can_reach_finish"
  54343. invoker="can_reach_finish"
  54344. throws="1">
  54345. <doc xml:space="preserve">Finishes an async network connectivity test.
  54346. See g_network_monitor_can_reach_async().</doc>
  54347. <return-value transfer-ownership="none">
  54348. <doc xml:space="preserve">%TRUE if network is reachable, %FALSE if not.</doc>
  54349. <type name="gboolean" c:type="gboolean"/>
  54350. </return-value>
  54351. <parameters>
  54352. <instance-parameter name="monitor" transfer-ownership="none">
  54353. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54354. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54355. </instance-parameter>
  54356. <parameter name="result" transfer-ownership="none">
  54357. <doc xml:space="preserve">a #GAsyncResult</doc>
  54358. <type name="AsyncResult" c:type="GAsyncResult*"/>
  54359. </parameter>
  54360. </parameters>
  54361. </virtual-method>
  54362. <virtual-method name="network_changed">
  54363. <return-value transfer-ownership="none">
  54364. <type name="none" c:type="void"/>
  54365. </return-value>
  54366. <parameters>
  54367. <instance-parameter name="monitor" transfer-ownership="none">
  54368. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54369. </instance-parameter>
  54370. <parameter name="available" transfer-ownership="none">
  54371. <type name="gboolean" c:type="gboolean"/>
  54372. </parameter>
  54373. </parameters>
  54374. </virtual-method>
  54375. <method name="can_reach"
  54376. c:identifier="g_network_monitor_can_reach"
  54377. version="2.32"
  54378. throws="1">
  54379. <doc xml:space="preserve">Attempts to determine whether or not the host pointed to by
  54380. @connectable can be reached, without actually trying to connect to
  54381. it.
  54382. This may return %TRUE even when #GNetworkMonitor:network-available
  54383. is %FALSE, if, for example, @monitor can determine that
  54384. @connectable refers to a host on a local network.
  54385. If @monitor believes that an attempt to connect to @connectable
  54386. will succeed, it will return %TRUE. Otherwise, it will return
  54387. %FALSE and set @error to an appropriate error (such as
  54388. %G_IO_ERROR_HOST_UNREACHABLE).
  54389. Note that although this does not attempt to connect to
  54390. @connectable, it may still block for a brief period of time (eg,
  54391. trying to do multicast DNS on the local network), so if you do not
  54392. want to block, you should use g_network_monitor_can_reach_async().</doc>
  54393. <return-value transfer-ownership="none">
  54394. <doc xml:space="preserve">%TRUE if @connectable is reachable, %FALSE if not.</doc>
  54395. <type name="gboolean" c:type="gboolean"/>
  54396. </return-value>
  54397. <parameters>
  54398. <instance-parameter name="monitor" transfer-ownership="none">
  54399. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54400. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54401. </instance-parameter>
  54402. <parameter name="connectable" transfer-ownership="none">
  54403. <doc xml:space="preserve">a #GSocketConnectable</doc>
  54404. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  54405. </parameter>
  54406. <parameter name="cancellable"
  54407. transfer-ownership="none"
  54408. nullable="1"
  54409. allow-none="1">
  54410. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  54411. <type name="Cancellable" c:type="GCancellable*"/>
  54412. </parameter>
  54413. </parameters>
  54414. </method>
  54415. <method name="can_reach_async"
  54416. c:identifier="g_network_monitor_can_reach_async">
  54417. <doc xml:space="preserve">Asynchronously attempts to determine whether or not the host
  54418. pointed to by @connectable can be reached, without actually
  54419. trying to connect to it.
  54420. For more details, see g_network_monitor_can_reach().
  54421. When the operation is finished, @callback will be called.
  54422. You can then call g_network_monitor_can_reach_finish()
  54423. to get the result of the operation.</doc>
  54424. <return-value transfer-ownership="none">
  54425. <type name="none" c:type="void"/>
  54426. </return-value>
  54427. <parameters>
  54428. <instance-parameter name="monitor" transfer-ownership="none">
  54429. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54430. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54431. </instance-parameter>
  54432. <parameter name="connectable" transfer-ownership="none">
  54433. <doc xml:space="preserve">a #GSocketConnectable</doc>
  54434. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  54435. </parameter>
  54436. <parameter name="cancellable"
  54437. transfer-ownership="none"
  54438. nullable="1"
  54439. allow-none="1">
  54440. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  54441. <type name="Cancellable" c:type="GCancellable*"/>
  54442. </parameter>
  54443. <parameter name="callback"
  54444. transfer-ownership="none"
  54445. nullable="1"
  54446. allow-none="1"
  54447. scope="async"
  54448. closure="3">
  54449. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  54450. request is satisfied</doc>
  54451. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  54452. </parameter>
  54453. <parameter name="user_data"
  54454. transfer-ownership="none"
  54455. nullable="1"
  54456. allow-none="1">
  54457. <doc xml:space="preserve">the data to pass to callback function</doc>
  54458. <type name="gpointer" c:type="gpointer"/>
  54459. </parameter>
  54460. </parameters>
  54461. </method>
  54462. <method name="can_reach_finish"
  54463. c:identifier="g_network_monitor_can_reach_finish"
  54464. throws="1">
  54465. <doc xml:space="preserve">Finishes an async network connectivity test.
  54466. See g_network_monitor_can_reach_async().</doc>
  54467. <return-value transfer-ownership="none">
  54468. <doc xml:space="preserve">%TRUE if network is reachable, %FALSE if not.</doc>
  54469. <type name="gboolean" c:type="gboolean"/>
  54470. </return-value>
  54471. <parameters>
  54472. <instance-parameter name="monitor" transfer-ownership="none">
  54473. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54474. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54475. </instance-parameter>
  54476. <parameter name="result" transfer-ownership="none">
  54477. <doc xml:space="preserve">a #GAsyncResult</doc>
  54478. <type name="AsyncResult" c:type="GAsyncResult*"/>
  54479. </parameter>
  54480. </parameters>
  54481. </method>
  54482. <method name="get_connectivity"
  54483. c:identifier="g_network_monitor_get_connectivity"
  54484. version="2.44">
  54485. <doc xml:space="preserve">Gets a more detailed networking state than
  54486. g_network_monitor_get_network_available().
  54487. If #GNetworkMonitor:network-available is %FALSE, then the
  54488. connectivity state will be %G_NETWORK_CONNECTIVITY_LOCAL.
  54489. If #GNetworkMonitor:network-available is %TRUE, then the
  54490. connectivity state will be %G_NETWORK_CONNECTIVITY_FULL (if there
  54491. is full Internet connectivity), %G_NETWORK_CONNECTIVITY_LIMITED (if
  54492. the host has a default route, but appears to be unable to actually
  54493. reach the full Internet), or %G_NETWORK_CONNECTIVITY_PORTAL (if the
  54494. host is trapped behind a "captive portal" that requires some sort
  54495. of login or acknowledgement before allowing full Internet access).
  54496. Note that in the case of %G_NETWORK_CONNECTIVITY_LIMITED and
  54497. %G_NETWORK_CONNECTIVITY_PORTAL, it is possible that some sites are
  54498. reachable but others are not. In this case, applications can
  54499. attempt to connect to remote servers, but should gracefully fall
  54500. back to their "offline" behavior if the connection attempt fails.</doc>
  54501. <return-value transfer-ownership="none">
  54502. <doc xml:space="preserve">the network connectivity state</doc>
  54503. <type name="NetworkConnectivity" c:type="GNetworkConnectivity"/>
  54504. </return-value>
  54505. <parameters>
  54506. <instance-parameter name="monitor" transfer-ownership="none">
  54507. <doc xml:space="preserve">the #GNetworkMonitor</doc>
  54508. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54509. </instance-parameter>
  54510. </parameters>
  54511. </method>
  54512. <method name="get_network_available"
  54513. c:identifier="g_network_monitor_get_network_available"
  54514. version="2.32">
  54515. <doc xml:space="preserve">Checks if the network is available. "Available" here means that the
  54516. system has a default route available for at least one of IPv4 or
  54517. IPv6. It does not necessarily imply that the public Internet is
  54518. reachable. See #GNetworkMonitor:network-available for more details.</doc>
  54519. <return-value transfer-ownership="none">
  54520. <doc xml:space="preserve">whether the network is available</doc>
  54521. <type name="gboolean" c:type="gboolean"/>
  54522. </return-value>
  54523. <parameters>
  54524. <instance-parameter name="monitor" transfer-ownership="none">
  54525. <doc xml:space="preserve">the #GNetworkMonitor</doc>
  54526. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54527. </instance-parameter>
  54528. </parameters>
  54529. </method>
  54530. <method name="get_network_metered"
  54531. c:identifier="g_network_monitor_get_network_metered"
  54532. version="2.46">
  54533. <doc xml:space="preserve">Checks if the network is metered.
  54534. See #GNetworkMonitor:network-metered for more details.</doc>
  54535. <return-value transfer-ownership="none">
  54536. <doc xml:space="preserve">whether the connection is metered</doc>
  54537. <type name="gboolean" c:type="gboolean"/>
  54538. </return-value>
  54539. <parameters>
  54540. <instance-parameter name="monitor" transfer-ownership="none">
  54541. <doc xml:space="preserve">the #GNetworkMonitor</doc>
  54542. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54543. </instance-parameter>
  54544. </parameters>
  54545. </method>
  54546. <property name="connectivity" version="2.44" transfer-ownership="none">
  54547. <doc xml:space="preserve">More detailed information about the host's network connectivity.
  54548. See g_network_monitor_get_connectivity() and
  54549. #GNetworkConnectivity for more details.</doc>
  54550. <type name="NetworkConnectivity"/>
  54551. </property>
  54552. <property name="network-available"
  54553. version="2.32"
  54554. transfer-ownership="none">
  54555. <doc xml:space="preserve">Whether the network is considered available. That is, whether the
  54556. system has a default route for at least one of IPv4 or IPv6.
  54557. Real-world networks are of course much more complicated than
  54558. this; the machine may be connected to a wifi hotspot that
  54559. requires payment before allowing traffic through, or may be
  54560. connected to a functioning router that has lost its own upstream
  54561. connectivity. Some hosts might only be accessible when a VPN is
  54562. active. Other hosts might only be accessible when the VPN is
  54563. not active. Thus, it is best to use g_network_monitor_can_reach()
  54564. or g_network_monitor_can_reach_async() to test for reachability
  54565. on a host-by-host basis. (On the other hand, when the property is
  54566. %FALSE, the application can reasonably expect that no remote
  54567. hosts at all are reachable, and should indicate this to the user
  54568. in its UI.)
  54569. See also #GNetworkMonitor::network-changed.</doc>
  54570. <type name="gboolean" c:type="gboolean"/>
  54571. </property>
  54572. <property name="network-metered"
  54573. version="2.46"
  54574. transfer-ownership="none">
  54575. <doc xml:space="preserve">Whether the network is considered metered. That is, whether the
  54576. system has traffic flowing through the default connection that is
  54577. subject to limitations set by service providers. For example, traffic
  54578. might be billed by the amount of data transmitted, or there might be a
  54579. quota on the amount of traffic per month. This is typical with tethered
  54580. connections (3G and 4G) and in such situations, bandwidth intensive
  54581. applications may wish to avoid network activity where possible if it will
  54582. cost the user money or use up their limited quota.
  54583. If more information is required about specific devices then the
  54584. system network management API should be used instead (for example,
  54585. NetworkManager or ConnMan).
  54586. If this information is not available then no networks will be
  54587. marked as metered.
  54588. See also #GNetworkMonitor:network-available.</doc>
  54589. <type name="gboolean" c:type="gboolean"/>
  54590. </property>
  54591. <glib:signal name="network-changed" when="last" version="2.32">
  54592. <doc xml:space="preserve">Emitted when the network configuration changes. If @available is
  54593. %TRUE, then some hosts may be reachable that were not reachable
  54594. before, while others that were reachable before may no longer be
  54595. reachable. If @available is %FALSE, then no remote hosts are
  54596. reachable.</doc>
  54597. <return-value transfer-ownership="none">
  54598. <type name="none" c:type="void"/>
  54599. </return-value>
  54600. <parameters>
  54601. <parameter name="available" transfer-ownership="none">
  54602. <doc xml:space="preserve">the current value of #GNetworkMonitor:network-available</doc>
  54603. <type name="gboolean" c:type="gboolean"/>
  54604. </parameter>
  54605. </parameters>
  54606. </glib:signal>
  54607. </interface>
  54608. <record name="NetworkMonitorInterface"
  54609. c:type="GNetworkMonitorInterface"
  54610. glib:is-gtype-struct-for="NetworkMonitor"
  54611. version="2.32">
  54612. <doc xml:space="preserve">The virtual function table for #GNetworkMonitor.</doc>
  54613. <field name="g_iface">
  54614. <doc xml:space="preserve">The parent interface.</doc>
  54615. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  54616. </field>
  54617. <field name="network_changed">
  54618. <callback name="network_changed">
  54619. <return-value transfer-ownership="none">
  54620. <type name="none" c:type="void"/>
  54621. </return-value>
  54622. <parameters>
  54623. <parameter name="monitor" transfer-ownership="none">
  54624. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54625. </parameter>
  54626. <parameter name="available" transfer-ownership="none">
  54627. <type name="gboolean" c:type="gboolean"/>
  54628. </parameter>
  54629. </parameters>
  54630. </callback>
  54631. </field>
  54632. <field name="can_reach">
  54633. <callback name="can_reach" throws="1">
  54634. <return-value transfer-ownership="none">
  54635. <doc xml:space="preserve">%TRUE if @connectable is reachable, %FALSE if not.</doc>
  54636. <type name="gboolean" c:type="gboolean"/>
  54637. </return-value>
  54638. <parameters>
  54639. <parameter name="monitor" transfer-ownership="none">
  54640. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54641. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54642. </parameter>
  54643. <parameter name="connectable" transfer-ownership="none">
  54644. <doc xml:space="preserve">a #GSocketConnectable</doc>
  54645. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  54646. </parameter>
  54647. <parameter name="cancellable"
  54648. transfer-ownership="none"
  54649. nullable="1"
  54650. allow-none="1">
  54651. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  54652. <type name="Cancellable" c:type="GCancellable*"/>
  54653. </parameter>
  54654. </parameters>
  54655. </callback>
  54656. </field>
  54657. <field name="can_reach_async">
  54658. <callback name="can_reach_async">
  54659. <return-value transfer-ownership="none">
  54660. <type name="none" c:type="void"/>
  54661. </return-value>
  54662. <parameters>
  54663. <parameter name="monitor" transfer-ownership="none">
  54664. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54665. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54666. </parameter>
  54667. <parameter name="connectable" transfer-ownership="none">
  54668. <doc xml:space="preserve">a #GSocketConnectable</doc>
  54669. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  54670. </parameter>
  54671. <parameter name="cancellable"
  54672. transfer-ownership="none"
  54673. nullable="1"
  54674. allow-none="1">
  54675. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  54676. <type name="Cancellable" c:type="GCancellable*"/>
  54677. </parameter>
  54678. <parameter name="callback"
  54679. transfer-ownership="none"
  54680. nullable="1"
  54681. allow-none="1"
  54682. scope="async"
  54683. closure="4">
  54684. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the
  54685. request is satisfied</doc>
  54686. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  54687. </parameter>
  54688. <parameter name="user_data"
  54689. transfer-ownership="none"
  54690. nullable="1"
  54691. allow-none="1"
  54692. closure="4">
  54693. <doc xml:space="preserve">the data to pass to callback function</doc>
  54694. <type name="gpointer" c:type="gpointer"/>
  54695. </parameter>
  54696. </parameters>
  54697. </callback>
  54698. </field>
  54699. <field name="can_reach_finish">
  54700. <callback name="can_reach_finish" throws="1">
  54701. <return-value transfer-ownership="none">
  54702. <doc xml:space="preserve">%TRUE if network is reachable, %FALSE if not.</doc>
  54703. <type name="gboolean" c:type="gboolean"/>
  54704. </return-value>
  54705. <parameters>
  54706. <parameter name="monitor" transfer-ownership="none">
  54707. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  54708. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  54709. </parameter>
  54710. <parameter name="result" transfer-ownership="none">
  54711. <doc xml:space="preserve">a #GAsyncResult</doc>
  54712. <type name="AsyncResult" c:type="GAsyncResult*"/>
  54713. </parameter>
  54714. </parameters>
  54715. </callback>
  54716. </field>
  54717. </record>
  54718. <class name="NetworkService"
  54719. c:symbol-prefix="network_service"
  54720. c:type="GNetworkService"
  54721. parent="GObject.Object"
  54722. glib:type-name="GNetworkService"
  54723. glib:get-type="g_network_service_get_type"
  54724. glib:type-struct="NetworkServiceClass">
  54725. <doc xml:space="preserve">Like #GNetworkAddress does with hostnames, #GNetworkService
  54726. provides an easy way to resolve a SRV record, and then attempt to
  54727. connect to one of the hosts that implements that service, handling
  54728. service priority/weighting, multiple IP addresses, and multiple
  54729. address families.
  54730. See #GSrvTarget for more information about SRV records, and see
  54731. #GSocketConnectable for and example of using the connectable
  54732. interface.</doc>
  54733. <implements name="SocketConnectable"/>
  54734. <constructor name="new"
  54735. c:identifier="g_network_service_new"
  54736. version="2.22">
  54737. <doc xml:space="preserve">Creates a new #GNetworkService representing the given @service,
  54738. @protocol, and @domain. This will initially be unresolved; use the
  54739. #GSocketConnectable interface to resolve it.</doc>
  54740. <return-value transfer-ownership="full">
  54741. <doc xml:space="preserve">a new #GNetworkService</doc>
  54742. <type name="NetworkService" c:type="GSocketConnectable*"/>
  54743. </return-value>
  54744. <parameters>
  54745. <parameter name="service" transfer-ownership="none">
  54746. <doc xml:space="preserve">the service type to look up (eg, "ldap")</doc>
  54747. <type name="utf8" c:type="const gchar*"/>
  54748. </parameter>
  54749. <parameter name="protocol" transfer-ownership="none">
  54750. <doc xml:space="preserve">the networking protocol to use for @service (eg, "tcp")</doc>
  54751. <type name="utf8" c:type="const gchar*"/>
  54752. </parameter>
  54753. <parameter name="domain" transfer-ownership="none">
  54754. <doc xml:space="preserve">the DNS domain to look up the service in</doc>
  54755. <type name="utf8" c:type="const gchar*"/>
  54756. </parameter>
  54757. </parameters>
  54758. </constructor>
  54759. <method name="get_domain"
  54760. c:identifier="g_network_service_get_domain"
  54761. version="2.22">
  54762. <doc xml:space="preserve">Gets the domain that @srv serves. This might be either UTF-8 or
  54763. ASCII-encoded, depending on what @srv was created with.</doc>
  54764. <return-value transfer-ownership="none">
  54765. <doc xml:space="preserve">@srv's domain name</doc>
  54766. <type name="utf8" c:type="const gchar*"/>
  54767. </return-value>
  54768. <parameters>
  54769. <instance-parameter name="srv" transfer-ownership="none">
  54770. <doc xml:space="preserve">a #GNetworkService</doc>
  54771. <type name="NetworkService" c:type="GNetworkService*"/>
  54772. </instance-parameter>
  54773. </parameters>
  54774. </method>
  54775. <method name="get_protocol"
  54776. c:identifier="g_network_service_get_protocol"
  54777. version="2.22">
  54778. <doc xml:space="preserve">Gets @srv's protocol name (eg, "tcp").</doc>
  54779. <return-value transfer-ownership="none">
  54780. <doc xml:space="preserve">@srv's protocol name</doc>
  54781. <type name="utf8" c:type="const gchar*"/>
  54782. </return-value>
  54783. <parameters>
  54784. <instance-parameter name="srv" transfer-ownership="none">
  54785. <doc xml:space="preserve">a #GNetworkService</doc>
  54786. <type name="NetworkService" c:type="GNetworkService*"/>
  54787. </instance-parameter>
  54788. </parameters>
  54789. </method>
  54790. <method name="get_scheme"
  54791. c:identifier="g_network_service_get_scheme"
  54792. version="2.26">
  54793. <doc xml:space="preserve">Get's the URI scheme used to resolve proxies. By default, the service name
  54794. is used as scheme.</doc>
  54795. <return-value transfer-ownership="none">
  54796. <doc xml:space="preserve">@srv's scheme name</doc>
  54797. <type name="utf8" c:type="const gchar*"/>
  54798. </return-value>
  54799. <parameters>
  54800. <instance-parameter name="srv" transfer-ownership="none">
  54801. <doc xml:space="preserve">a #GNetworkService</doc>
  54802. <type name="NetworkService" c:type="GNetworkService*"/>
  54803. </instance-parameter>
  54804. </parameters>
  54805. </method>
  54806. <method name="get_service"
  54807. c:identifier="g_network_service_get_service"
  54808. version="2.22">
  54809. <doc xml:space="preserve">Gets @srv's service name (eg, "ldap").</doc>
  54810. <return-value transfer-ownership="none">
  54811. <doc xml:space="preserve">@srv's service name</doc>
  54812. <type name="utf8" c:type="const gchar*"/>
  54813. </return-value>
  54814. <parameters>
  54815. <instance-parameter name="srv" transfer-ownership="none">
  54816. <doc xml:space="preserve">a #GNetworkService</doc>
  54817. <type name="NetworkService" c:type="GNetworkService*"/>
  54818. </instance-parameter>
  54819. </parameters>
  54820. </method>
  54821. <method name="set_scheme"
  54822. c:identifier="g_network_service_set_scheme"
  54823. version="2.26">
  54824. <doc xml:space="preserve">Set's the URI scheme used to resolve proxies. By default, the service name
  54825. is used as scheme.</doc>
  54826. <return-value transfer-ownership="none">
  54827. <type name="none" c:type="void"/>
  54828. </return-value>
  54829. <parameters>
  54830. <instance-parameter name="srv" transfer-ownership="none">
  54831. <doc xml:space="preserve">a #GNetworkService</doc>
  54832. <type name="NetworkService" c:type="GNetworkService*"/>
  54833. </instance-parameter>
  54834. <parameter name="scheme" transfer-ownership="none">
  54835. <doc xml:space="preserve">a URI scheme</doc>
  54836. <type name="utf8" c:type="const gchar*"/>
  54837. </parameter>
  54838. </parameters>
  54839. </method>
  54840. <property name="domain"
  54841. writable="1"
  54842. construct-only="1"
  54843. transfer-ownership="none">
  54844. <type name="utf8" c:type="gchar*"/>
  54845. </property>
  54846. <property name="protocol"
  54847. writable="1"
  54848. construct-only="1"
  54849. transfer-ownership="none">
  54850. <type name="utf8" c:type="gchar*"/>
  54851. </property>
  54852. <property name="scheme" writable="1" transfer-ownership="none">
  54853. <type name="utf8" c:type="gchar*"/>
  54854. </property>
  54855. <property name="service"
  54856. writable="1"
  54857. construct-only="1"
  54858. transfer-ownership="none">
  54859. <type name="utf8" c:type="gchar*"/>
  54860. </property>
  54861. <field name="parent_instance">
  54862. <type name="GObject.Object" c:type="GObject"/>
  54863. </field>
  54864. <field name="priv" readable="0" private="1">
  54865. <type name="NetworkServicePrivate" c:type="GNetworkServicePrivate*"/>
  54866. </field>
  54867. </class>
  54868. <record name="NetworkServiceClass"
  54869. c:type="GNetworkServiceClass"
  54870. glib:is-gtype-struct-for="NetworkService">
  54871. <field name="parent_class">
  54872. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  54873. </field>
  54874. </record>
  54875. <record name="NetworkServicePrivate"
  54876. c:type="GNetworkServicePrivate"
  54877. disguised="1">
  54878. </record>
  54879. <class name="Notification"
  54880. c:symbol-prefix="notification"
  54881. c:type="GNotification"
  54882. version="2.40"
  54883. parent="GObject.Object"
  54884. glib:type-name="GNotification"
  54885. glib:get-type="g_notification_get_type">
  54886. <doc xml:space="preserve">#GNotification is a mechanism for creating a notification to be shown
  54887. to the user -- typically as a pop-up notification presented by the
  54888. desktop environment shell.
  54889. The key difference between #GNotification and other similar APIs is
  54890. that, if supported by the desktop environment, notifications sent
  54891. with #GNotification will persist after the application has exited,
  54892. and even across system reboots.
  54893. Since the user may click on a notification while the application is
  54894. not running, applications using #GNotification should be able to be
  54895. started as a D-Bus service, using #GApplication.
  54896. User interaction with a notification (either the default action, or
  54897. buttons) must be associated with actions on the application (ie:
  54898. "app." actions). It is not possible to route user interaction
  54899. through the notification itself, because the object will not exist if
  54900. the application is autostarted as a result of a notification being
  54901. clicked.
  54902. A notification can be sent with g_application_send_notification().</doc>
  54903. <constructor name="new" c:identifier="g_notification_new" version="2.40">
  54904. <doc xml:space="preserve">Creates a new #GNotification with @title as its title.
  54905. After populating @notification with more details, it can be sent to
  54906. the desktop shell with g_application_send_notification(). Changing
  54907. any properties after this call will not have any effect until
  54908. resending @notification.</doc>
  54909. <return-value transfer-ownership="full">
  54910. <doc xml:space="preserve">a new #GNotification instance</doc>
  54911. <type name="Notification" c:type="GNotification*"/>
  54912. </return-value>
  54913. <parameters>
  54914. <parameter name="title" transfer-ownership="none">
  54915. <doc xml:space="preserve">the title of the notification</doc>
  54916. <type name="utf8" c:type="const gchar*"/>
  54917. </parameter>
  54918. </parameters>
  54919. </constructor>
  54920. <method name="add_button"
  54921. c:identifier="g_notification_add_button"
  54922. version="2.40">
  54923. <doc xml:space="preserve">Adds a button to @notification that activates the action in
  54924. @detailed_action when clicked. That action must be an
  54925. application-wide action (starting with "app."). If @detailed_action
  54926. contains a target, the action will be activated with that target as
  54927. its parameter.
  54928. See g_action_parse_detailed_name() for a description of the format
  54929. for @detailed_action.</doc>
  54930. <return-value transfer-ownership="none">
  54931. <type name="none" c:type="void"/>
  54932. </return-value>
  54933. <parameters>
  54934. <instance-parameter name="notification" transfer-ownership="none">
  54935. <doc xml:space="preserve">a #GNotification</doc>
  54936. <type name="Notification" c:type="GNotification*"/>
  54937. </instance-parameter>
  54938. <parameter name="label" transfer-ownership="none">
  54939. <doc xml:space="preserve">label of the button</doc>
  54940. <type name="utf8" c:type="const gchar*"/>
  54941. </parameter>
  54942. <parameter name="detailed_action" transfer-ownership="none">
  54943. <doc xml:space="preserve">a detailed action name</doc>
  54944. <type name="utf8" c:type="const gchar*"/>
  54945. </parameter>
  54946. </parameters>
  54947. </method>
  54948. <method name="add_button_with_target"
  54949. c:identifier="g_notification_add_button_with_target"
  54950. shadowed-by="add_button_with_target_value"
  54951. version="2.40"
  54952. introspectable="0">
  54953. <doc xml:space="preserve">Adds a button to @notification that activates @action when clicked.
  54954. @action must be an application-wide action (it must start with "app.").
  54955. If @target_format is given, it is used to collect remaining
  54956. positional parameters into a #GVariant instance, similar to
  54957. g_variant_new(). @action will be activated with that #GVariant as its
  54958. parameter.</doc>
  54959. <return-value transfer-ownership="none">
  54960. <type name="none" c:type="void"/>
  54961. </return-value>
  54962. <parameters>
  54963. <instance-parameter name="notification" transfer-ownership="none">
  54964. <doc xml:space="preserve">a #GNotification</doc>
  54965. <type name="Notification" c:type="GNotification*"/>
  54966. </instance-parameter>
  54967. <parameter name="label" transfer-ownership="none">
  54968. <doc xml:space="preserve">label of the button</doc>
  54969. <type name="utf8" c:type="const gchar*"/>
  54970. </parameter>
  54971. <parameter name="action" transfer-ownership="none">
  54972. <doc xml:space="preserve">an action name</doc>
  54973. <type name="utf8" c:type="const gchar*"/>
  54974. </parameter>
  54975. <parameter name="target_format"
  54976. transfer-ownership="none"
  54977. nullable="1"
  54978. allow-none="1">
  54979. <doc xml:space="preserve">a #GVariant format string, or %NULL</doc>
  54980. <type name="utf8" c:type="const gchar*"/>
  54981. </parameter>
  54982. <parameter name="..." transfer-ownership="none">
  54983. <doc xml:space="preserve">positional parameters, as determined by @target_format</doc>
  54984. <varargs/>
  54985. </parameter>
  54986. </parameters>
  54987. </method>
  54988. <method name="add_button_with_target_value"
  54989. c:identifier="g_notification_add_button_with_target_value"
  54990. shadows="add_button_with_target"
  54991. version="2.40">
  54992. <doc xml:space="preserve">Adds a button to @notification that activates @action when clicked.
  54993. @action must be an application-wide action (it must start with "app.").
  54994. If @target is non-%NULL, @action will be activated with @target as
  54995. its parameter.</doc>
  54996. <return-value transfer-ownership="none">
  54997. <type name="none" c:type="void"/>
  54998. </return-value>
  54999. <parameters>
  55000. <instance-parameter name="notification" transfer-ownership="none">
  55001. <doc xml:space="preserve">a #GNotification</doc>
  55002. <type name="Notification" c:type="GNotification*"/>
  55003. </instance-parameter>
  55004. <parameter name="label" transfer-ownership="none">
  55005. <doc xml:space="preserve">label of the button</doc>
  55006. <type name="utf8" c:type="const gchar*"/>
  55007. </parameter>
  55008. <parameter name="action" transfer-ownership="none">
  55009. <doc xml:space="preserve">an action name</doc>
  55010. <type name="utf8" c:type="const gchar*"/>
  55011. </parameter>
  55012. <parameter name="target"
  55013. transfer-ownership="none"
  55014. nullable="1"
  55015. allow-none="1">
  55016. <doc xml:space="preserve">a #GVariant to use as @action's parameter, or %NULL</doc>
  55017. <type name="GLib.Variant" c:type="GVariant*"/>
  55018. </parameter>
  55019. </parameters>
  55020. </method>
  55021. <method name="set_body"
  55022. c:identifier="g_notification_set_body"
  55023. version="2.40">
  55024. <doc xml:space="preserve">Sets the body of @notification to @body.</doc>
  55025. <return-value transfer-ownership="none">
  55026. <type name="none" c:type="void"/>
  55027. </return-value>
  55028. <parameters>
  55029. <instance-parameter name="notification" transfer-ownership="none">
  55030. <doc xml:space="preserve">a #GNotification</doc>
  55031. <type name="Notification" c:type="GNotification*"/>
  55032. </instance-parameter>
  55033. <parameter name="body"
  55034. transfer-ownership="none"
  55035. nullable="1"
  55036. allow-none="1">
  55037. <doc xml:space="preserve">the new body for @notification, or %NULL</doc>
  55038. <type name="utf8" c:type="const gchar*"/>
  55039. </parameter>
  55040. </parameters>
  55041. </method>
  55042. <method name="set_default_action"
  55043. c:identifier="g_notification_set_default_action"
  55044. version="2.40">
  55045. <doc xml:space="preserve">Sets the default action of @notification to @detailed_action. This
  55046. action is activated when the notification is clicked on.
  55047. The action in @detailed_action must be an application-wide action (it
  55048. must start with "app."). If @detailed_action contains a target, the
  55049. given action will be activated with that target as its parameter.
  55050. See g_action_parse_detailed_name() for a description of the format
  55051. for @detailed_action.
  55052. When no default action is set, the application that the notification
  55053. was sent on is activated.</doc>
  55054. <return-value transfer-ownership="none">
  55055. <type name="none" c:type="void"/>
  55056. </return-value>
  55057. <parameters>
  55058. <instance-parameter name="notification" transfer-ownership="none">
  55059. <doc xml:space="preserve">a #GNotification</doc>
  55060. <type name="Notification" c:type="GNotification*"/>
  55061. </instance-parameter>
  55062. <parameter name="detailed_action" transfer-ownership="none">
  55063. <doc xml:space="preserve">a detailed action name</doc>
  55064. <type name="utf8" c:type="const gchar*"/>
  55065. </parameter>
  55066. </parameters>
  55067. </method>
  55068. <method name="set_default_action_and_target"
  55069. c:identifier="g_notification_set_default_action_and_target"
  55070. shadowed-by="set_default_action_and_target_value"
  55071. version="2.40"
  55072. introspectable="0">
  55073. <doc xml:space="preserve">Sets the default action of @notification to @action. This action is
  55074. activated when the notification is clicked on. It must be an
  55075. application-wide action (it must start with "app.").
  55076. If @target_format is given, it is used to collect remaining
  55077. positional parameters into a #GVariant instance, similar to
  55078. g_variant_new(). @action will be activated with that #GVariant as its
  55079. parameter.
  55080. When no default action is set, the application that the notification
  55081. was sent on is activated.</doc>
  55082. <return-value transfer-ownership="none">
  55083. <type name="none" c:type="void"/>
  55084. </return-value>
  55085. <parameters>
  55086. <instance-parameter name="notification" transfer-ownership="none">
  55087. <doc xml:space="preserve">a #GNotification</doc>
  55088. <type name="Notification" c:type="GNotification*"/>
  55089. </instance-parameter>
  55090. <parameter name="action" transfer-ownership="none">
  55091. <doc xml:space="preserve">an action name</doc>
  55092. <type name="utf8" c:type="const gchar*"/>
  55093. </parameter>
  55094. <parameter name="target_format"
  55095. transfer-ownership="none"
  55096. nullable="1"
  55097. allow-none="1">
  55098. <doc xml:space="preserve">a #GVariant format string, or %NULL</doc>
  55099. <type name="utf8" c:type="const gchar*"/>
  55100. </parameter>
  55101. <parameter name="..." transfer-ownership="none">
  55102. <doc xml:space="preserve">positional parameters, as determined by @target_format</doc>
  55103. <varargs/>
  55104. </parameter>
  55105. </parameters>
  55106. </method>
  55107. <method name="set_default_action_and_target_value"
  55108. c:identifier="g_notification_set_default_action_and_target_value"
  55109. shadows="set_default_action_and_target"
  55110. version="2.40">
  55111. <doc xml:space="preserve">Sets the default action of @notification to @action. This action is
  55112. activated when the notification is clicked on. It must be an
  55113. application-wide action (start with "app.").
  55114. If @target is non-%NULL, @action will be activated with @target as
  55115. its parameter.
  55116. When no default action is set, the application that the notification
  55117. was sent on is activated.</doc>
  55118. <return-value transfer-ownership="none">
  55119. <type name="none" c:type="void"/>
  55120. </return-value>
  55121. <parameters>
  55122. <instance-parameter name="notification" transfer-ownership="none">
  55123. <doc xml:space="preserve">a #GNotification</doc>
  55124. <type name="Notification" c:type="GNotification*"/>
  55125. </instance-parameter>
  55126. <parameter name="action" transfer-ownership="none">
  55127. <doc xml:space="preserve">an action name</doc>
  55128. <type name="utf8" c:type="const gchar*"/>
  55129. </parameter>
  55130. <parameter name="target"
  55131. transfer-ownership="none"
  55132. nullable="1"
  55133. allow-none="1">
  55134. <doc xml:space="preserve">a #GVariant to use as @action's parameter, or %NULL</doc>
  55135. <type name="GLib.Variant" c:type="GVariant*"/>
  55136. </parameter>
  55137. </parameters>
  55138. </method>
  55139. <method name="set_icon"
  55140. c:identifier="g_notification_set_icon"
  55141. version="2.40">
  55142. <doc xml:space="preserve">Sets the icon of @notification to @icon.</doc>
  55143. <return-value transfer-ownership="none">
  55144. <type name="none" c:type="void"/>
  55145. </return-value>
  55146. <parameters>
  55147. <instance-parameter name="notification" transfer-ownership="none">
  55148. <doc xml:space="preserve">a #GNotification</doc>
  55149. <type name="Notification" c:type="GNotification*"/>
  55150. </instance-parameter>
  55151. <parameter name="icon" transfer-ownership="none">
  55152. <doc xml:space="preserve">the icon to be shown in @notification, as a #GIcon</doc>
  55153. <type name="Icon" c:type="GIcon*"/>
  55154. </parameter>
  55155. </parameters>
  55156. </method>
  55157. <method name="set_priority" c:identifier="g_notification_set_priority">
  55158. <doc xml:space="preserve">Sets the priority of @notification to @priority. See
  55159. #GNotificationPriority for possible values.</doc>
  55160. <return-value transfer-ownership="none">
  55161. <type name="none" c:type="void"/>
  55162. </return-value>
  55163. <parameters>
  55164. <instance-parameter name="notification" transfer-ownership="none">
  55165. <doc xml:space="preserve">a #GNotification</doc>
  55166. <type name="Notification" c:type="GNotification*"/>
  55167. </instance-parameter>
  55168. <parameter name="priority" transfer-ownership="none">
  55169. <doc xml:space="preserve">a #GNotificationPriority</doc>
  55170. <type name="NotificationPriority" c:type="GNotificationPriority"/>
  55171. </parameter>
  55172. </parameters>
  55173. </method>
  55174. <method name="set_title"
  55175. c:identifier="g_notification_set_title"
  55176. version="2.40">
  55177. <doc xml:space="preserve">Sets the title of @notification to @title.</doc>
  55178. <return-value transfer-ownership="none">
  55179. <type name="none" c:type="void"/>
  55180. </return-value>
  55181. <parameters>
  55182. <instance-parameter name="notification" transfer-ownership="none">
  55183. <doc xml:space="preserve">a #GNotification</doc>
  55184. <type name="Notification" c:type="GNotification*"/>
  55185. </instance-parameter>
  55186. <parameter name="title" transfer-ownership="none">
  55187. <doc xml:space="preserve">the new title for @notification</doc>
  55188. <type name="utf8" c:type="const gchar*"/>
  55189. </parameter>
  55190. </parameters>
  55191. </method>
  55192. <method name="set_urgent"
  55193. c:identifier="g_notification_set_urgent"
  55194. version="2.40">
  55195. <doc xml:space="preserve">Deprecated in favor of g_notification_set_priority().</doc>
  55196. <return-value transfer-ownership="none">
  55197. <type name="none" c:type="void"/>
  55198. </return-value>
  55199. <parameters>
  55200. <instance-parameter name="notification" transfer-ownership="none">
  55201. <doc xml:space="preserve">a #GNotification</doc>
  55202. <type name="Notification" c:type="GNotification*"/>
  55203. </instance-parameter>
  55204. <parameter name="urgent" transfer-ownership="none">
  55205. <doc xml:space="preserve">%TRUE if @notification is urgent</doc>
  55206. <type name="gboolean" c:type="gboolean"/>
  55207. </parameter>
  55208. </parameters>
  55209. </method>
  55210. </class>
  55211. <enumeration name="NotificationPriority"
  55212. version="2.42"
  55213. glib:type-name="GNotificationPriority"
  55214. glib:get-type="g_notification_priority_get_type"
  55215. c:type="GNotificationPriority">
  55216. <doc xml:space="preserve">Priority levels for #GNotifications.</doc>
  55217. <member name="normal"
  55218. value="0"
  55219. c:identifier="G_NOTIFICATION_PRIORITY_NORMAL"
  55220. glib:nick="normal">
  55221. <doc xml:space="preserve">the default priority, to be used for the
  55222. majority of notifications (for example email messages, software updates,
  55223. completed download/sync operations)</doc>
  55224. </member>
  55225. <member name="low"
  55226. value="1"
  55227. c:identifier="G_NOTIFICATION_PRIORITY_LOW"
  55228. glib:nick="low">
  55229. <doc xml:space="preserve">for notifications that do not require
  55230. immediate attention - typically used for contextual background
  55231. information, such as contact birthdays or local weather</doc>
  55232. </member>
  55233. <member name="high"
  55234. value="2"
  55235. c:identifier="G_NOTIFICATION_PRIORITY_HIGH"
  55236. glib:nick="high">
  55237. <doc xml:space="preserve">for events that require more attention,
  55238. usually because responses are time-sensitive (for example chat and SMS
  55239. messages or alarms)</doc>
  55240. </member>
  55241. <member name="urgent"
  55242. value="3"
  55243. c:identifier="G_NOTIFICATION_PRIORITY_URGENT"
  55244. glib:nick="urgent">
  55245. <doc xml:space="preserve">for urgent notifications, or notifications
  55246. that require a response in a short space of time (for example phone calls
  55247. or emergency warnings)</doc>
  55248. </member>
  55249. </enumeration>
  55250. <record name="OutputMessage" c:type="GOutputMessage" version="2.44">
  55251. <doc xml:space="preserve">Structure used for scatter/gather data output when sending multiple
  55252. messages or packets in one go. You generally pass in an array of
  55253. #GOutputVectors and the operation will use all the buffers as if they
  55254. were one buffer.
  55255. If @address is %NULL then the message is sent to the default receiver
  55256. (as previously set by g_socket_connect()).</doc>
  55257. <field name="address" writable="1">
  55258. <doc xml:space="preserve">a #GSocketAddress, or %NULL</doc>
  55259. <type name="SocketAddress" c:type="GSocketAddress*"/>
  55260. </field>
  55261. <field name="vectors" writable="1">
  55262. <doc xml:space="preserve">pointer to an array of output vectors</doc>
  55263. <type name="OutputVector" c:type="GOutputVector*"/>
  55264. </field>
  55265. <field name="num_vectors" writable="1">
  55266. <doc xml:space="preserve">the number of output vectors pointed to by @vectors.</doc>
  55267. <type name="guint" c:type="guint"/>
  55268. </field>
  55269. <field name="bytes_sent" writable="1">
  55270. <doc xml:space="preserve">initialize to 0. Will be set to the number of bytes
  55271. that have been sent</doc>
  55272. <type name="guint" c:type="guint"/>
  55273. </field>
  55274. <field name="control_messages" writable="1">
  55275. <doc xml:space="preserve">a pointer
  55276. to an array of #GSocketControlMessages, or %NULL.</doc>
  55277. <array length="5" zero-terminated="0" c:type="GSocketControlMessage**">
  55278. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  55279. </array>
  55280. </field>
  55281. <field name="num_control_messages" writable="1">
  55282. <doc xml:space="preserve">number of elements in @control_messages.</doc>
  55283. <type name="guint" c:type="guint"/>
  55284. </field>
  55285. </record>
  55286. <class name="OutputStream"
  55287. c:symbol-prefix="output_stream"
  55288. c:type="GOutputStream"
  55289. parent="GObject.Object"
  55290. abstract="1"
  55291. glib:type-name="GOutputStream"
  55292. glib:get-type="g_output_stream_get_type"
  55293. glib:type-struct="OutputStreamClass">
  55294. <doc xml:space="preserve">#GOutputStream has functions to write to a stream (g_output_stream_write()),
  55295. to close a stream (g_output_stream_close()) and to flush pending writes
  55296. (g_output_stream_flush()).
  55297. To copy the content of an input stream to an output stream without
  55298. manually handling the reads and writes, use g_output_stream_splice().
  55299. See the documentation for #GIOStream for details of thread safety of
  55300. streaming APIs.
  55301. All of these functions have async variants too.</doc>
  55302. <virtual-method name="close_async" invoker="close_async">
  55303. <doc xml:space="preserve">Requests an asynchronous close of the stream, releasing resources
  55304. related to it. When the operation is finished @callback will be
  55305. called. You can then call g_output_stream_close_finish() to get
  55306. the result of the operation.
  55307. For behaviour details see g_output_stream_close().
  55308. The asyncronous methods have a default fallback that uses threads
  55309. to implement asynchronicity, so they are optional for inheriting
  55310. classes. However, if you override one you must override all.</doc>
  55311. <return-value transfer-ownership="none">
  55312. <type name="none" c:type="void"/>
  55313. </return-value>
  55314. <parameters>
  55315. <instance-parameter name="stream" transfer-ownership="none">
  55316. <doc xml:space="preserve">A #GOutputStream.</doc>
  55317. <type name="OutputStream" c:type="GOutputStream*"/>
  55318. </instance-parameter>
  55319. <parameter name="io_priority" transfer-ownership="none">
  55320. <doc xml:space="preserve">the io priority of the request.</doc>
  55321. <type name="gint" c:type="int"/>
  55322. </parameter>
  55323. <parameter name="cancellable"
  55324. transfer-ownership="none"
  55325. nullable="1"
  55326. allow-none="1">
  55327. <doc xml:space="preserve">optional cancellable object</doc>
  55328. <type name="Cancellable" c:type="GCancellable*"/>
  55329. </parameter>
  55330. <parameter name="callback"
  55331. transfer-ownership="none"
  55332. nullable="1"
  55333. allow-none="1"
  55334. scope="async"
  55335. closure="3">
  55336. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  55337. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  55338. </parameter>
  55339. <parameter name="user_data"
  55340. transfer-ownership="none"
  55341. nullable="1"
  55342. allow-none="1"
  55343. closure="3">
  55344. <doc xml:space="preserve">the data to pass to callback function</doc>
  55345. <type name="gpointer" c:type="gpointer"/>
  55346. </parameter>
  55347. </parameters>
  55348. </virtual-method>
  55349. <virtual-method name="close_finish" invoker="close_finish" throws="1">
  55350. <doc xml:space="preserve">Closes an output stream.</doc>
  55351. <return-value transfer-ownership="none">
  55352. <doc xml:space="preserve">%TRUE if stream was successfully closed, %FALSE otherwise.</doc>
  55353. <type name="gboolean" c:type="gboolean"/>
  55354. </return-value>
  55355. <parameters>
  55356. <instance-parameter name="stream" transfer-ownership="none">
  55357. <doc xml:space="preserve">a #GOutputStream.</doc>
  55358. <type name="OutputStream" c:type="GOutputStream*"/>
  55359. </instance-parameter>
  55360. <parameter name="result" transfer-ownership="none">
  55361. <doc xml:space="preserve">a #GAsyncResult.</doc>
  55362. <type name="AsyncResult" c:type="GAsyncResult*"/>
  55363. </parameter>
  55364. </parameters>
  55365. </virtual-method>
  55366. <virtual-method name="close_fn" throws="1">
  55367. <return-value transfer-ownership="none">
  55368. <type name="gboolean" c:type="gboolean"/>
  55369. </return-value>
  55370. <parameters>
  55371. <instance-parameter name="stream" transfer-ownership="none">
  55372. <type name="OutputStream" c:type="GOutputStream*"/>
  55373. </instance-parameter>
  55374. <parameter name="cancellable"
  55375. transfer-ownership="none"
  55376. nullable="1"
  55377. allow-none="1">
  55378. <type name="Cancellable" c:type="GCancellable*"/>
  55379. </parameter>
  55380. </parameters>
  55381. </virtual-method>
  55382. <virtual-method name="flush" invoker="flush" throws="1">
  55383. <doc xml:space="preserve">Forces a write of all user-space buffered data for the given
  55384. @stream. Will block during the operation. Closing the stream will
  55385. implicitly cause a flush.
  55386. This function is optional for inherited classes.
  55387. If @cancellable is not %NULL, then the operation can be cancelled by
  55388. triggering the cancellable object from another thread. If the operation
  55389. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  55390. <return-value transfer-ownership="none">
  55391. <doc xml:space="preserve">%TRUE on success, %FALSE on error</doc>
  55392. <type name="gboolean" c:type="gboolean"/>
  55393. </return-value>
  55394. <parameters>
  55395. <instance-parameter name="stream" transfer-ownership="none">
  55396. <doc xml:space="preserve">a #GOutputStream.</doc>
  55397. <type name="OutputStream" c:type="GOutputStream*"/>
  55398. </instance-parameter>
  55399. <parameter name="cancellable"
  55400. transfer-ownership="none"
  55401. nullable="1"
  55402. allow-none="1">
  55403. <doc xml:space="preserve">optional cancellable object</doc>
  55404. <type name="Cancellable" c:type="GCancellable*"/>
  55405. </parameter>
  55406. </parameters>
  55407. </virtual-method>
  55408. <virtual-method name="flush_async" invoker="flush_async">
  55409. <doc xml:space="preserve">Forces an asynchronous write of all user-space buffered data for
  55410. the given @stream.
  55411. For behaviour details see g_output_stream_flush().
  55412. When the operation is finished @callback will be
  55413. called. You can then call g_output_stream_flush_finish() to get the
  55414. result of the operation.</doc>
  55415. <return-value transfer-ownership="none">
  55416. <type name="none" c:type="void"/>
  55417. </return-value>
  55418. <parameters>
  55419. <instance-parameter name="stream" transfer-ownership="none">
  55420. <doc xml:space="preserve">a #GOutputStream.</doc>
  55421. <type name="OutputStream" c:type="GOutputStream*"/>
  55422. </instance-parameter>
  55423. <parameter name="io_priority" transfer-ownership="none">
  55424. <doc xml:space="preserve">the io priority of the request.</doc>
  55425. <type name="gint" c:type="int"/>
  55426. </parameter>
  55427. <parameter name="cancellable"
  55428. transfer-ownership="none"
  55429. nullable="1"
  55430. allow-none="1">
  55431. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  55432. <type name="Cancellable" c:type="GCancellable*"/>
  55433. </parameter>
  55434. <parameter name="callback"
  55435. transfer-ownership="none"
  55436. nullable="1"
  55437. allow-none="1"
  55438. scope="async"
  55439. closure="3">
  55440. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  55441. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  55442. </parameter>
  55443. <parameter name="user_data"
  55444. transfer-ownership="none"
  55445. nullable="1"
  55446. allow-none="1"
  55447. closure="3">
  55448. <doc xml:space="preserve">the data to pass to callback function</doc>
  55449. <type name="gpointer" c:type="gpointer"/>
  55450. </parameter>
  55451. </parameters>
  55452. </virtual-method>
  55453. <virtual-method name="flush_finish" invoker="flush_finish" throws="1">
  55454. <doc xml:space="preserve">Finishes flushing an output stream.</doc>
  55455. <return-value transfer-ownership="none">
  55456. <doc xml:space="preserve">%TRUE if flush operation succeeded, %FALSE otherwise.</doc>
  55457. <type name="gboolean" c:type="gboolean"/>
  55458. </return-value>
  55459. <parameters>
  55460. <instance-parameter name="stream" transfer-ownership="none">
  55461. <doc xml:space="preserve">a #GOutputStream.</doc>
  55462. <type name="OutputStream" c:type="GOutputStream*"/>
  55463. </instance-parameter>
  55464. <parameter name="result" transfer-ownership="none">
  55465. <doc xml:space="preserve">a GAsyncResult.</doc>
  55466. <type name="AsyncResult" c:type="GAsyncResult*"/>
  55467. </parameter>
  55468. </parameters>
  55469. </virtual-method>
  55470. <virtual-method name="splice" invoker="splice" throws="1">
  55471. <doc xml:space="preserve">Splices an input stream into an output stream.</doc>
  55472. <return-value transfer-ownership="none">
  55473. <doc xml:space="preserve">a #gssize containing the size of the data spliced, or
  55474. -1 if an error occurred. Note that if the number of bytes
  55475. spliced is greater than %G_MAXSSIZE, then that will be
  55476. returned, and there is no way to determine the actual number
  55477. of bytes spliced.</doc>
  55478. <type name="gssize" c:type="gssize"/>
  55479. </return-value>
  55480. <parameters>
  55481. <instance-parameter name="stream" transfer-ownership="none">
  55482. <doc xml:space="preserve">a #GOutputStream.</doc>
  55483. <type name="OutputStream" c:type="GOutputStream*"/>
  55484. </instance-parameter>
  55485. <parameter name="source" transfer-ownership="none">
  55486. <doc xml:space="preserve">a #GInputStream.</doc>
  55487. <type name="InputStream" c:type="GInputStream*"/>
  55488. </parameter>
  55489. <parameter name="flags" transfer-ownership="none">
  55490. <doc xml:space="preserve">a set of #GOutputStreamSpliceFlags.</doc>
  55491. <type name="OutputStreamSpliceFlags"
  55492. c:type="GOutputStreamSpliceFlags"/>
  55493. </parameter>
  55494. <parameter name="cancellable"
  55495. transfer-ownership="none"
  55496. nullable="1"
  55497. allow-none="1">
  55498. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  55499. <type name="Cancellable" c:type="GCancellable*"/>
  55500. </parameter>
  55501. </parameters>
  55502. </virtual-method>
  55503. <virtual-method name="splice_async" invoker="splice_async">
  55504. <doc xml:space="preserve">Splices a stream asynchronously.
  55505. When the operation is finished @callback will be called.
  55506. You can then call g_output_stream_splice_finish() to get the
  55507. result of the operation.
  55508. For the synchronous, blocking version of this function, see
  55509. g_output_stream_splice().</doc>
  55510. <return-value transfer-ownership="none">
  55511. <type name="none" c:type="void"/>
  55512. </return-value>
  55513. <parameters>
  55514. <instance-parameter name="stream" transfer-ownership="none">
  55515. <doc xml:space="preserve">a #GOutputStream.</doc>
  55516. <type name="OutputStream" c:type="GOutputStream*"/>
  55517. </instance-parameter>
  55518. <parameter name="source" transfer-ownership="none">
  55519. <doc xml:space="preserve">a #GInputStream.</doc>
  55520. <type name="InputStream" c:type="GInputStream*"/>
  55521. </parameter>
  55522. <parameter name="flags" transfer-ownership="none">
  55523. <doc xml:space="preserve">a set of #GOutputStreamSpliceFlags.</doc>
  55524. <type name="OutputStreamSpliceFlags"
  55525. c:type="GOutputStreamSpliceFlags"/>
  55526. </parameter>
  55527. <parameter name="io_priority" transfer-ownership="none">
  55528. <doc xml:space="preserve">the io priority of the request.</doc>
  55529. <type name="gint" c:type="int"/>
  55530. </parameter>
  55531. <parameter name="cancellable"
  55532. transfer-ownership="none"
  55533. nullable="1"
  55534. allow-none="1">
  55535. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  55536. <type name="Cancellable" c:type="GCancellable*"/>
  55537. </parameter>
  55538. <parameter name="callback"
  55539. transfer-ownership="none"
  55540. nullable="1"
  55541. allow-none="1"
  55542. scope="async"
  55543. closure="5">
  55544. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  55545. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  55546. </parameter>
  55547. <parameter name="user_data"
  55548. transfer-ownership="none"
  55549. nullable="1"
  55550. allow-none="1"
  55551. closure="5">
  55552. <doc xml:space="preserve">user data passed to @callback.</doc>
  55553. <type name="gpointer" c:type="gpointer"/>
  55554. </parameter>
  55555. </parameters>
  55556. </virtual-method>
  55557. <virtual-method name="splice_finish" invoker="splice_finish" throws="1">
  55558. <doc xml:space="preserve">Finishes an asynchronous stream splice operation.</doc>
  55559. <return-value transfer-ownership="none">
  55560. <doc xml:space="preserve">a #gssize of the number of bytes spliced. Note that if the
  55561. number of bytes spliced is greater than %G_MAXSSIZE, then that
  55562. will be returned, and there is no way to determine the actual
  55563. number of bytes spliced.</doc>
  55564. <type name="gssize" c:type="gssize"/>
  55565. </return-value>
  55566. <parameters>
  55567. <instance-parameter name="stream" transfer-ownership="none">
  55568. <doc xml:space="preserve">a #GOutputStream.</doc>
  55569. <type name="OutputStream" c:type="GOutputStream*"/>
  55570. </instance-parameter>
  55571. <parameter name="result" transfer-ownership="none">
  55572. <doc xml:space="preserve">a #GAsyncResult.</doc>
  55573. <type name="AsyncResult" c:type="GAsyncResult*"/>
  55574. </parameter>
  55575. </parameters>
  55576. </virtual-method>
  55577. <virtual-method name="write_async" invoker="write_async">
  55578. <doc xml:space="preserve">Request an asynchronous write of @count bytes from @buffer into
  55579. the stream. When the operation is finished @callback will be called.
  55580. You can then call g_output_stream_write_finish() to get the result of the
  55581. operation.
  55582. During an async request no other sync and async calls are allowed,
  55583. and will result in %G_IO_ERROR_PENDING errors.
  55584. A value of @count larger than %G_MAXSSIZE will cause a
  55585. %G_IO_ERROR_INVALID_ARGUMENT error.
  55586. On success, the number of bytes written will be passed to the
  55587. @callback. It is not an error if this is not the same as the
  55588. requested size, as it can happen e.g. on a partial I/O error,
  55589. but generally we try to write as many bytes as requested.
  55590. You are guaranteed that this method will never fail with
  55591. %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
  55592. method will just wait until this changes.
  55593. Any outstanding I/O request with higher priority (lower numerical
  55594. value) will be executed before an outstanding request with lower
  55595. priority. Default priority is %G_PRIORITY_DEFAULT.
  55596. The asyncronous methods have a default fallback that uses threads
  55597. to implement asynchronicity, so they are optional for inheriting
  55598. classes. However, if you override one you must override all.
  55599. For the synchronous, blocking version of this function, see
  55600. g_output_stream_write().
  55601. Note that no copy of @buffer will be made, so it must stay valid
  55602. until @callback is called. See g_output_stream_write_bytes_async()
  55603. for a #GBytes version that will automatically hold a reference to
  55604. the contents (without copying) for the duration of the call.</doc>
  55605. <return-value transfer-ownership="none">
  55606. <type name="none" c:type="void"/>
  55607. </return-value>
  55608. <parameters>
  55609. <instance-parameter name="stream" transfer-ownership="none">
  55610. <doc xml:space="preserve">A #GOutputStream.</doc>
  55611. <type name="OutputStream" c:type="GOutputStream*"/>
  55612. </instance-parameter>
  55613. <parameter name="buffer"
  55614. transfer-ownership="none"
  55615. nullable="1"
  55616. allow-none="1">
  55617. <doc xml:space="preserve">the buffer containing the data to write.</doc>
  55618. <array length="1" zero-terminated="0" c:type="void*">
  55619. <type name="guint8"/>
  55620. </array>
  55621. </parameter>
  55622. <parameter name="count" transfer-ownership="none">
  55623. <doc xml:space="preserve">the number of bytes to write</doc>
  55624. <type name="gsize" c:type="gsize"/>
  55625. </parameter>
  55626. <parameter name="io_priority" transfer-ownership="none">
  55627. <doc xml:space="preserve">the io priority of the request.</doc>
  55628. <type name="gint" c:type="int"/>
  55629. </parameter>
  55630. <parameter name="cancellable"
  55631. transfer-ownership="none"
  55632. nullable="1"
  55633. allow-none="1">
  55634. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  55635. <type name="Cancellable" c:type="GCancellable*"/>
  55636. </parameter>
  55637. <parameter name="callback"
  55638. transfer-ownership="none"
  55639. nullable="1"
  55640. allow-none="1"
  55641. scope="async"
  55642. closure="5">
  55643. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  55644. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  55645. </parameter>
  55646. <parameter name="user_data"
  55647. transfer-ownership="none"
  55648. nullable="1"
  55649. allow-none="1"
  55650. closure="5">
  55651. <doc xml:space="preserve">the data to pass to callback function</doc>
  55652. <type name="gpointer" c:type="gpointer"/>
  55653. </parameter>
  55654. </parameters>
  55655. </virtual-method>
  55656. <virtual-method name="write_finish" invoker="write_finish" throws="1">
  55657. <doc xml:space="preserve">Finishes a stream write operation.</doc>
  55658. <return-value transfer-ownership="none">
  55659. <doc xml:space="preserve">a #gssize containing the number of bytes written to the stream.</doc>
  55660. <type name="gssize" c:type="gssize"/>
  55661. </return-value>
  55662. <parameters>
  55663. <instance-parameter name="stream" transfer-ownership="none">
  55664. <doc xml:space="preserve">a #GOutputStream.</doc>
  55665. <type name="OutputStream" c:type="GOutputStream*"/>
  55666. </instance-parameter>
  55667. <parameter name="result" transfer-ownership="none">
  55668. <doc xml:space="preserve">a #GAsyncResult.</doc>
  55669. <type name="AsyncResult" c:type="GAsyncResult*"/>
  55670. </parameter>
  55671. </parameters>
  55672. </virtual-method>
  55673. <virtual-method name="write_fn" invoker="write" throws="1">
  55674. <doc xml:space="preserve">Tries to write @count bytes from @buffer into the stream. Will block
  55675. during the operation.
  55676. If count is 0, returns 0 and does nothing. A value of @count
  55677. larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  55678. On success, the number of bytes written to the stream is returned.
  55679. It is not an error if this is not the same as the requested size, as it
  55680. can happen e.g. on a partial I/O error, or if there is not enough
  55681. storage in the stream. All writes block until at least one byte
  55682. is written or an error occurs; 0 is never returned (unless
  55683. @count is 0).
  55684. If @cancellable is not %NULL, then the operation can be cancelled by
  55685. triggering the cancellable object from another thread. If the operation
  55686. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  55687. operation was partially finished when the operation was cancelled the
  55688. partial result will be returned, without an error.
  55689. On error -1 is returned and @error is set accordingly.</doc>
  55690. <return-value transfer-ownership="none">
  55691. <doc xml:space="preserve">Number of bytes written, or -1 on error</doc>
  55692. <type name="gssize" c:type="gssize"/>
  55693. </return-value>
  55694. <parameters>
  55695. <instance-parameter name="stream" transfer-ownership="none">
  55696. <doc xml:space="preserve">a #GOutputStream.</doc>
  55697. <type name="OutputStream" c:type="GOutputStream*"/>
  55698. </instance-parameter>
  55699. <parameter name="buffer"
  55700. transfer-ownership="none"
  55701. nullable="1"
  55702. allow-none="1">
  55703. <doc xml:space="preserve">the buffer containing the data to write.</doc>
  55704. <array length="1" zero-terminated="0" c:type="void*">
  55705. <type name="guint8"/>
  55706. </array>
  55707. </parameter>
  55708. <parameter name="count" transfer-ownership="none">
  55709. <doc xml:space="preserve">the number of bytes to write</doc>
  55710. <type name="gsize" c:type="gsize"/>
  55711. </parameter>
  55712. <parameter name="cancellable"
  55713. transfer-ownership="none"
  55714. nullable="1"
  55715. allow-none="1">
  55716. <doc xml:space="preserve">optional cancellable object</doc>
  55717. <type name="Cancellable" c:type="GCancellable*"/>
  55718. </parameter>
  55719. </parameters>
  55720. </virtual-method>
  55721. <method name="clear_pending"
  55722. c:identifier="g_output_stream_clear_pending">
  55723. <doc xml:space="preserve">Clears the pending flag on @stream.</doc>
  55724. <return-value transfer-ownership="none">
  55725. <type name="none" c:type="void"/>
  55726. </return-value>
  55727. <parameters>
  55728. <instance-parameter name="stream" transfer-ownership="none">
  55729. <doc xml:space="preserve">output stream</doc>
  55730. <type name="OutputStream" c:type="GOutputStream*"/>
  55731. </instance-parameter>
  55732. </parameters>
  55733. </method>
  55734. <method name="close" c:identifier="g_output_stream_close" throws="1">
  55735. <doc xml:space="preserve">Closes the stream, releasing resources related to it.
  55736. Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
  55737. Closing a stream multiple times will not return an error.
  55738. Closing a stream will automatically flush any outstanding buffers in the
  55739. stream.
  55740. Streams will be automatically closed when the last reference
  55741. is dropped, but you might want to call this function to make sure
  55742. resources are released as early as possible.
  55743. Some streams might keep the backing store of the stream (e.g. a file descriptor)
  55744. open after the stream is closed. See the documentation for the individual
  55745. stream for details.
  55746. On failure the first error that happened will be reported, but the close
  55747. operation will finish as much as possible. A stream that failed to
  55748. close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
  55749. is important to check and report the error to the user, otherwise
  55750. there might be a loss of data as all data might not be written.
  55751. If @cancellable is not %NULL, then the operation can be cancelled by
  55752. triggering the cancellable object from another thread. If the operation
  55753. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
  55754. Cancelling a close will still leave the stream closed, but there some streams
  55755. can use a faster close that doesn't block to e.g. check errors. On
  55756. cancellation (as with any error) there is no guarantee that all written
  55757. data will reach the target.</doc>
  55758. <return-value transfer-ownership="none">
  55759. <doc xml:space="preserve">%TRUE on success, %FALSE on failure</doc>
  55760. <type name="gboolean" c:type="gboolean"/>
  55761. </return-value>
  55762. <parameters>
  55763. <instance-parameter name="stream" transfer-ownership="none">
  55764. <doc xml:space="preserve">A #GOutputStream.</doc>
  55765. <type name="OutputStream" c:type="GOutputStream*"/>
  55766. </instance-parameter>
  55767. <parameter name="cancellable"
  55768. transfer-ownership="none"
  55769. nullable="1"
  55770. allow-none="1">
  55771. <doc xml:space="preserve">optional cancellable object</doc>
  55772. <type name="Cancellable" c:type="GCancellable*"/>
  55773. </parameter>
  55774. </parameters>
  55775. </method>
  55776. <method name="close_async" c:identifier="g_output_stream_close_async">
  55777. <doc xml:space="preserve">Requests an asynchronous close of the stream, releasing resources
  55778. related to it. When the operation is finished @callback will be
  55779. called. You can then call g_output_stream_close_finish() to get
  55780. the result of the operation.
  55781. For behaviour details see g_output_stream_close().
  55782. The asyncronous methods have a default fallback that uses threads
  55783. to implement asynchronicity, so they are optional for inheriting
  55784. classes. However, if you override one you must override all.</doc>
  55785. <return-value transfer-ownership="none">
  55786. <type name="none" c:type="void"/>
  55787. </return-value>
  55788. <parameters>
  55789. <instance-parameter name="stream" transfer-ownership="none">
  55790. <doc xml:space="preserve">A #GOutputStream.</doc>
  55791. <type name="OutputStream" c:type="GOutputStream*"/>
  55792. </instance-parameter>
  55793. <parameter name="io_priority" transfer-ownership="none">
  55794. <doc xml:space="preserve">the io priority of the request.</doc>
  55795. <type name="gint" c:type="int"/>
  55796. </parameter>
  55797. <parameter name="cancellable"
  55798. transfer-ownership="none"
  55799. nullable="1"
  55800. allow-none="1">
  55801. <doc xml:space="preserve">optional cancellable object</doc>
  55802. <type name="Cancellable" c:type="GCancellable*"/>
  55803. </parameter>
  55804. <parameter name="callback"
  55805. transfer-ownership="none"
  55806. nullable="1"
  55807. allow-none="1"
  55808. scope="async"
  55809. closure="3">
  55810. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  55811. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  55812. </parameter>
  55813. <parameter name="user_data"
  55814. transfer-ownership="none"
  55815. nullable="1"
  55816. allow-none="1">
  55817. <doc xml:space="preserve">the data to pass to callback function</doc>
  55818. <type name="gpointer" c:type="gpointer"/>
  55819. </parameter>
  55820. </parameters>
  55821. </method>
  55822. <method name="close_finish"
  55823. c:identifier="g_output_stream_close_finish"
  55824. throws="1">
  55825. <doc xml:space="preserve">Closes an output stream.</doc>
  55826. <return-value transfer-ownership="none">
  55827. <doc xml:space="preserve">%TRUE if stream was successfully closed, %FALSE otherwise.</doc>
  55828. <type name="gboolean" c:type="gboolean"/>
  55829. </return-value>
  55830. <parameters>
  55831. <instance-parameter name="stream" transfer-ownership="none">
  55832. <doc xml:space="preserve">a #GOutputStream.</doc>
  55833. <type name="OutputStream" c:type="GOutputStream*"/>
  55834. </instance-parameter>
  55835. <parameter name="result" transfer-ownership="none">
  55836. <doc xml:space="preserve">a #GAsyncResult.</doc>
  55837. <type name="AsyncResult" c:type="GAsyncResult*"/>
  55838. </parameter>
  55839. </parameters>
  55840. </method>
  55841. <method name="flush" c:identifier="g_output_stream_flush" throws="1">
  55842. <doc xml:space="preserve">Forces a write of all user-space buffered data for the given
  55843. @stream. Will block during the operation. Closing the stream will
  55844. implicitly cause a flush.
  55845. This function is optional for inherited classes.
  55846. If @cancellable is not %NULL, then the operation can be cancelled by
  55847. triggering the cancellable object from another thread. If the operation
  55848. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  55849. <return-value transfer-ownership="none">
  55850. <doc xml:space="preserve">%TRUE on success, %FALSE on error</doc>
  55851. <type name="gboolean" c:type="gboolean"/>
  55852. </return-value>
  55853. <parameters>
  55854. <instance-parameter name="stream" transfer-ownership="none">
  55855. <doc xml:space="preserve">a #GOutputStream.</doc>
  55856. <type name="OutputStream" c:type="GOutputStream*"/>
  55857. </instance-parameter>
  55858. <parameter name="cancellable"
  55859. transfer-ownership="none"
  55860. nullable="1"
  55861. allow-none="1">
  55862. <doc xml:space="preserve">optional cancellable object</doc>
  55863. <type name="Cancellable" c:type="GCancellable*"/>
  55864. </parameter>
  55865. </parameters>
  55866. </method>
  55867. <method name="flush_async" c:identifier="g_output_stream_flush_async">
  55868. <doc xml:space="preserve">Forces an asynchronous write of all user-space buffered data for
  55869. the given @stream.
  55870. For behaviour details see g_output_stream_flush().
  55871. When the operation is finished @callback will be
  55872. called. You can then call g_output_stream_flush_finish() to get the
  55873. result of the operation.</doc>
  55874. <return-value transfer-ownership="none">
  55875. <type name="none" c:type="void"/>
  55876. </return-value>
  55877. <parameters>
  55878. <instance-parameter name="stream" transfer-ownership="none">
  55879. <doc xml:space="preserve">a #GOutputStream.</doc>
  55880. <type name="OutputStream" c:type="GOutputStream*"/>
  55881. </instance-parameter>
  55882. <parameter name="io_priority" transfer-ownership="none">
  55883. <doc xml:space="preserve">the io priority of the request.</doc>
  55884. <type name="gint" c:type="int"/>
  55885. </parameter>
  55886. <parameter name="cancellable"
  55887. transfer-ownership="none"
  55888. nullable="1"
  55889. allow-none="1">
  55890. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  55891. <type name="Cancellable" c:type="GCancellable*"/>
  55892. </parameter>
  55893. <parameter name="callback"
  55894. transfer-ownership="none"
  55895. nullable="1"
  55896. allow-none="1"
  55897. scope="async"
  55898. closure="3">
  55899. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  55900. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  55901. </parameter>
  55902. <parameter name="user_data"
  55903. transfer-ownership="none"
  55904. nullable="1"
  55905. allow-none="1">
  55906. <doc xml:space="preserve">the data to pass to callback function</doc>
  55907. <type name="gpointer" c:type="gpointer"/>
  55908. </parameter>
  55909. </parameters>
  55910. </method>
  55911. <method name="flush_finish"
  55912. c:identifier="g_output_stream_flush_finish"
  55913. throws="1">
  55914. <doc xml:space="preserve">Finishes flushing an output stream.</doc>
  55915. <return-value transfer-ownership="none">
  55916. <doc xml:space="preserve">%TRUE if flush operation succeeded, %FALSE otherwise.</doc>
  55917. <type name="gboolean" c:type="gboolean"/>
  55918. </return-value>
  55919. <parameters>
  55920. <instance-parameter name="stream" transfer-ownership="none">
  55921. <doc xml:space="preserve">a #GOutputStream.</doc>
  55922. <type name="OutputStream" c:type="GOutputStream*"/>
  55923. </instance-parameter>
  55924. <parameter name="result" transfer-ownership="none">
  55925. <doc xml:space="preserve">a GAsyncResult.</doc>
  55926. <type name="AsyncResult" c:type="GAsyncResult*"/>
  55927. </parameter>
  55928. </parameters>
  55929. </method>
  55930. <method name="has_pending" c:identifier="g_output_stream_has_pending">
  55931. <doc xml:space="preserve">Checks if an ouput stream has pending actions.</doc>
  55932. <return-value transfer-ownership="none">
  55933. <doc xml:space="preserve">%TRUE if @stream has pending actions.</doc>
  55934. <type name="gboolean" c:type="gboolean"/>
  55935. </return-value>
  55936. <parameters>
  55937. <instance-parameter name="stream" transfer-ownership="none">
  55938. <doc xml:space="preserve">a #GOutputStream.</doc>
  55939. <type name="OutputStream" c:type="GOutputStream*"/>
  55940. </instance-parameter>
  55941. </parameters>
  55942. </method>
  55943. <method name="is_closed" c:identifier="g_output_stream_is_closed">
  55944. <doc xml:space="preserve">Checks if an output stream has already been closed.</doc>
  55945. <return-value transfer-ownership="none">
  55946. <doc xml:space="preserve">%TRUE if @stream is closed. %FALSE otherwise.</doc>
  55947. <type name="gboolean" c:type="gboolean"/>
  55948. </return-value>
  55949. <parameters>
  55950. <instance-parameter name="stream" transfer-ownership="none">
  55951. <doc xml:space="preserve">a #GOutputStream.</doc>
  55952. <type name="OutputStream" c:type="GOutputStream*"/>
  55953. </instance-parameter>
  55954. </parameters>
  55955. </method>
  55956. <method name="is_closing"
  55957. c:identifier="g_output_stream_is_closing"
  55958. version="2.24">
  55959. <doc xml:space="preserve">Checks if an output stream is being closed. This can be
  55960. used inside e.g. a flush implementation to see if the
  55961. flush (or other i/o operation) is called from within
  55962. the closing operation.</doc>
  55963. <return-value transfer-ownership="none">
  55964. <doc xml:space="preserve">%TRUE if @stream is being closed. %FALSE otherwise.</doc>
  55965. <type name="gboolean" c:type="gboolean"/>
  55966. </return-value>
  55967. <parameters>
  55968. <instance-parameter name="stream" transfer-ownership="none">
  55969. <doc xml:space="preserve">a #GOutputStream.</doc>
  55970. <type name="OutputStream" c:type="GOutputStream*"/>
  55971. </instance-parameter>
  55972. </parameters>
  55973. </method>
  55974. <method name="printf"
  55975. c:identifier="g_output_stream_printf"
  55976. version="2.40"
  55977. introspectable="0">
  55978. <doc xml:space="preserve">This is a utility function around g_output_stream_write_all(). It
  55979. uses g_strdup_vprintf() to turn @format and @... into a string that
  55980. is then written to @stream.
  55981. See the documentation of g_output_stream_write_all() about the
  55982. behavior of the actual write operation.
  55983. Note that partial writes cannot be properly checked with this
  55984. function due to the variable length of the written string, if you
  55985. need precise control over partial write failures, you need to
  55986. create you own printf()-like wrapper around g_output_stream_write()
  55987. or g_output_stream_write_all().</doc>
  55988. <return-value transfer-ownership="none">
  55989. <doc xml:space="preserve">%TRUE on success, %FALSE if there was an error</doc>
  55990. <type name="gboolean" c:type="gboolean"/>
  55991. </return-value>
  55992. <parameters>
  55993. <instance-parameter name="stream" transfer-ownership="none">
  55994. <doc xml:space="preserve">a #GOutputStream.</doc>
  55995. <type name="OutputStream" c:type="GOutputStream*"/>
  55996. </instance-parameter>
  55997. <parameter name="bytes_written"
  55998. direction="out"
  55999. caller-allocates="0"
  56000. transfer-ownership="full">
  56001. <doc xml:space="preserve">location to store the number of bytes that was
  56002. written to the stream</doc>
  56003. <type name="gsize" c:type="gsize*"/>
  56004. </parameter>
  56005. <parameter name="cancellable"
  56006. transfer-ownership="none"
  56007. nullable="1"
  56008. allow-none="1">
  56009. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56010. <type name="Cancellable" c:type="GCancellable*"/>
  56011. </parameter>
  56012. <parameter name="error" transfer-ownership="none">
  56013. <doc xml:space="preserve">location to store the error occurring, or %NULL to ignore</doc>
  56014. <type name="GLib.Error" c:type="GError**"/>
  56015. </parameter>
  56016. <parameter name="format" transfer-ownership="none">
  56017. <doc xml:space="preserve">the format string. See the printf() documentation</doc>
  56018. <type name="utf8" c:type="const gchar*"/>
  56019. </parameter>
  56020. <parameter name="..." transfer-ownership="none">
  56021. <doc xml:space="preserve">the parameters to insert into the format string</doc>
  56022. <varargs/>
  56023. </parameter>
  56024. </parameters>
  56025. </method>
  56026. <method name="set_pending"
  56027. c:identifier="g_output_stream_set_pending"
  56028. throws="1">
  56029. <doc xml:space="preserve">Sets @stream to have actions pending. If the pending flag is
  56030. already set or @stream is closed, it will return %FALSE and set
  56031. @error.</doc>
  56032. <return-value transfer-ownership="none">
  56033. <doc xml:space="preserve">%TRUE if pending was previously unset and is now set.</doc>
  56034. <type name="gboolean" c:type="gboolean"/>
  56035. </return-value>
  56036. <parameters>
  56037. <instance-parameter name="stream" transfer-ownership="none">
  56038. <doc xml:space="preserve">a #GOutputStream.</doc>
  56039. <type name="OutputStream" c:type="GOutputStream*"/>
  56040. </instance-parameter>
  56041. </parameters>
  56042. </method>
  56043. <method name="splice" c:identifier="g_output_stream_splice" throws="1">
  56044. <doc xml:space="preserve">Splices an input stream into an output stream.</doc>
  56045. <return-value transfer-ownership="none">
  56046. <doc xml:space="preserve">a #gssize containing the size of the data spliced, or
  56047. -1 if an error occurred. Note that if the number of bytes
  56048. spliced is greater than %G_MAXSSIZE, then that will be
  56049. returned, and there is no way to determine the actual number
  56050. of bytes spliced.</doc>
  56051. <type name="gssize" c:type="gssize"/>
  56052. </return-value>
  56053. <parameters>
  56054. <instance-parameter name="stream" transfer-ownership="none">
  56055. <doc xml:space="preserve">a #GOutputStream.</doc>
  56056. <type name="OutputStream" c:type="GOutputStream*"/>
  56057. </instance-parameter>
  56058. <parameter name="source" transfer-ownership="none">
  56059. <doc xml:space="preserve">a #GInputStream.</doc>
  56060. <type name="InputStream" c:type="GInputStream*"/>
  56061. </parameter>
  56062. <parameter name="flags" transfer-ownership="none">
  56063. <doc xml:space="preserve">a set of #GOutputStreamSpliceFlags.</doc>
  56064. <type name="OutputStreamSpliceFlags"
  56065. c:type="GOutputStreamSpliceFlags"/>
  56066. </parameter>
  56067. <parameter name="cancellable"
  56068. transfer-ownership="none"
  56069. nullable="1"
  56070. allow-none="1">
  56071. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56072. <type name="Cancellable" c:type="GCancellable*"/>
  56073. </parameter>
  56074. </parameters>
  56075. </method>
  56076. <method name="splice_async" c:identifier="g_output_stream_splice_async">
  56077. <doc xml:space="preserve">Splices a stream asynchronously.
  56078. When the operation is finished @callback will be called.
  56079. You can then call g_output_stream_splice_finish() to get the
  56080. result of the operation.
  56081. For the synchronous, blocking version of this function, see
  56082. g_output_stream_splice().</doc>
  56083. <return-value transfer-ownership="none">
  56084. <type name="none" c:type="void"/>
  56085. </return-value>
  56086. <parameters>
  56087. <instance-parameter name="stream" transfer-ownership="none">
  56088. <doc xml:space="preserve">a #GOutputStream.</doc>
  56089. <type name="OutputStream" c:type="GOutputStream*"/>
  56090. </instance-parameter>
  56091. <parameter name="source" transfer-ownership="none">
  56092. <doc xml:space="preserve">a #GInputStream.</doc>
  56093. <type name="InputStream" c:type="GInputStream*"/>
  56094. </parameter>
  56095. <parameter name="flags" transfer-ownership="none">
  56096. <doc xml:space="preserve">a set of #GOutputStreamSpliceFlags.</doc>
  56097. <type name="OutputStreamSpliceFlags"
  56098. c:type="GOutputStreamSpliceFlags"/>
  56099. </parameter>
  56100. <parameter name="io_priority" transfer-ownership="none">
  56101. <doc xml:space="preserve">the io priority of the request.</doc>
  56102. <type name="gint" c:type="int"/>
  56103. </parameter>
  56104. <parameter name="cancellable"
  56105. transfer-ownership="none"
  56106. nullable="1"
  56107. allow-none="1">
  56108. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56109. <type name="Cancellable" c:type="GCancellable*"/>
  56110. </parameter>
  56111. <parameter name="callback"
  56112. transfer-ownership="none"
  56113. nullable="1"
  56114. allow-none="1"
  56115. scope="async"
  56116. closure="5">
  56117. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  56118. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56119. </parameter>
  56120. <parameter name="user_data"
  56121. transfer-ownership="none"
  56122. nullable="1"
  56123. allow-none="1">
  56124. <doc xml:space="preserve">user data passed to @callback.</doc>
  56125. <type name="gpointer" c:type="gpointer"/>
  56126. </parameter>
  56127. </parameters>
  56128. </method>
  56129. <method name="splice_finish"
  56130. c:identifier="g_output_stream_splice_finish"
  56131. throws="1">
  56132. <doc xml:space="preserve">Finishes an asynchronous stream splice operation.</doc>
  56133. <return-value transfer-ownership="none">
  56134. <doc xml:space="preserve">a #gssize of the number of bytes spliced. Note that if the
  56135. number of bytes spliced is greater than %G_MAXSSIZE, then that
  56136. will be returned, and there is no way to determine the actual
  56137. number of bytes spliced.</doc>
  56138. <type name="gssize" c:type="gssize"/>
  56139. </return-value>
  56140. <parameters>
  56141. <instance-parameter name="stream" transfer-ownership="none">
  56142. <doc xml:space="preserve">a #GOutputStream.</doc>
  56143. <type name="OutputStream" c:type="GOutputStream*"/>
  56144. </instance-parameter>
  56145. <parameter name="result" transfer-ownership="none">
  56146. <doc xml:space="preserve">a #GAsyncResult.</doc>
  56147. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56148. </parameter>
  56149. </parameters>
  56150. </method>
  56151. <method name="vprintf"
  56152. c:identifier="g_output_stream_vprintf"
  56153. version="2.40"
  56154. introspectable="0">
  56155. <doc xml:space="preserve">This is a utility function around g_output_stream_write_all(). It
  56156. uses g_strdup_vprintf() to turn @format and @args into a string that
  56157. is then written to @stream.
  56158. See the documentation of g_output_stream_write_all() about the
  56159. behavior of the actual write operation.
  56160. Note that partial writes cannot be properly checked with this
  56161. function due to the variable length of the written string, if you
  56162. need precise control over partial write failures, you need to
  56163. create you own printf()-like wrapper around g_output_stream_write()
  56164. or g_output_stream_write_all().</doc>
  56165. <return-value transfer-ownership="none">
  56166. <doc xml:space="preserve">%TRUE on success, %FALSE if there was an error</doc>
  56167. <type name="gboolean" c:type="gboolean"/>
  56168. </return-value>
  56169. <parameters>
  56170. <instance-parameter name="stream" transfer-ownership="none">
  56171. <doc xml:space="preserve">a #GOutputStream.</doc>
  56172. <type name="OutputStream" c:type="GOutputStream*"/>
  56173. </instance-parameter>
  56174. <parameter name="bytes_written"
  56175. direction="out"
  56176. caller-allocates="0"
  56177. transfer-ownership="full">
  56178. <doc xml:space="preserve">location to store the number of bytes that was
  56179. written to the stream</doc>
  56180. <type name="gsize" c:type="gsize*"/>
  56181. </parameter>
  56182. <parameter name="cancellable"
  56183. transfer-ownership="none"
  56184. nullable="1"
  56185. allow-none="1">
  56186. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56187. <type name="Cancellable" c:type="GCancellable*"/>
  56188. </parameter>
  56189. <parameter name="error" transfer-ownership="none">
  56190. <doc xml:space="preserve">location to store the error occurring, or %NULL to ignore</doc>
  56191. <type name="GLib.Error" c:type="GError**"/>
  56192. </parameter>
  56193. <parameter name="format" transfer-ownership="none">
  56194. <doc xml:space="preserve">the format string. See the printf() documentation</doc>
  56195. <type name="utf8" c:type="const gchar*"/>
  56196. </parameter>
  56197. <parameter name="args" transfer-ownership="none">
  56198. <doc xml:space="preserve">the parameters to insert into the format string</doc>
  56199. <type name="va_list" c:type="va_list"/>
  56200. </parameter>
  56201. </parameters>
  56202. </method>
  56203. <method name="write" c:identifier="g_output_stream_write" throws="1">
  56204. <doc xml:space="preserve">Tries to write @count bytes from @buffer into the stream. Will block
  56205. during the operation.
  56206. If count is 0, returns 0 and does nothing. A value of @count
  56207. larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
  56208. On success, the number of bytes written to the stream is returned.
  56209. It is not an error if this is not the same as the requested size, as it
  56210. can happen e.g. on a partial I/O error, or if there is not enough
  56211. storage in the stream. All writes block until at least one byte
  56212. is written or an error occurs; 0 is never returned (unless
  56213. @count is 0).
  56214. If @cancellable is not %NULL, then the operation can be cancelled by
  56215. triggering the cancellable object from another thread. If the operation
  56216. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  56217. operation was partially finished when the operation was cancelled the
  56218. partial result will be returned, without an error.
  56219. On error -1 is returned and @error is set accordingly.</doc>
  56220. <return-value transfer-ownership="none">
  56221. <doc xml:space="preserve">Number of bytes written, or -1 on error</doc>
  56222. <type name="gssize" c:type="gssize"/>
  56223. </return-value>
  56224. <parameters>
  56225. <instance-parameter name="stream" transfer-ownership="none">
  56226. <doc xml:space="preserve">a #GOutputStream.</doc>
  56227. <type name="OutputStream" c:type="GOutputStream*"/>
  56228. </instance-parameter>
  56229. <parameter name="buffer" transfer-ownership="none">
  56230. <doc xml:space="preserve">the buffer containing the data to write.</doc>
  56231. <array length="1" zero-terminated="0" c:type="void*">
  56232. <type name="guint8"/>
  56233. </array>
  56234. </parameter>
  56235. <parameter name="count" transfer-ownership="none">
  56236. <doc xml:space="preserve">the number of bytes to write</doc>
  56237. <type name="gsize" c:type="gsize"/>
  56238. </parameter>
  56239. <parameter name="cancellable"
  56240. transfer-ownership="none"
  56241. nullable="1"
  56242. allow-none="1">
  56243. <doc xml:space="preserve">optional cancellable object</doc>
  56244. <type name="Cancellable" c:type="GCancellable*"/>
  56245. </parameter>
  56246. </parameters>
  56247. </method>
  56248. <method name="write_all"
  56249. c:identifier="g_output_stream_write_all"
  56250. throws="1">
  56251. <doc xml:space="preserve">Tries to write @count bytes from @buffer into the stream. Will block
  56252. during the operation.
  56253. This function is similar to g_output_stream_write(), except it tries to
  56254. write as many bytes as requested, only stopping on an error.
  56255. On a successful write of @count bytes, %TRUE is returned, and @bytes_written
  56256. is set to @count.
  56257. If there is an error during the operation %FALSE is returned and @error
  56258. is set to indicate the error status.
  56259. As a special exception to the normal conventions for functions that
  56260. use #GError, if this function returns %FALSE (and sets @error) then
  56261. @bytes_written will be set to the number of bytes that were
  56262. successfully written before the error was encountered. This
  56263. functionality is only available from C. If you need it from another
  56264. language then you must write your own loop around
  56265. g_output_stream_write().</doc>
  56266. <return-value transfer-ownership="none">
  56267. <doc xml:space="preserve">%TRUE on success, %FALSE if there was an error</doc>
  56268. <type name="gboolean" c:type="gboolean"/>
  56269. </return-value>
  56270. <parameters>
  56271. <instance-parameter name="stream" transfer-ownership="none">
  56272. <doc xml:space="preserve">a #GOutputStream.</doc>
  56273. <type name="OutputStream" c:type="GOutputStream*"/>
  56274. </instance-parameter>
  56275. <parameter name="buffer" transfer-ownership="none">
  56276. <doc xml:space="preserve">the buffer containing the data to write.</doc>
  56277. <array length="1" zero-terminated="0" c:type="void*">
  56278. <type name="guint8"/>
  56279. </array>
  56280. </parameter>
  56281. <parameter name="count" transfer-ownership="none">
  56282. <doc xml:space="preserve">the number of bytes to write</doc>
  56283. <type name="gsize" c:type="gsize"/>
  56284. </parameter>
  56285. <parameter name="bytes_written"
  56286. direction="out"
  56287. caller-allocates="0"
  56288. transfer-ownership="full">
  56289. <doc xml:space="preserve">location to store the number of bytes that was
  56290. written to the stream</doc>
  56291. <type name="gsize" c:type="gsize*"/>
  56292. </parameter>
  56293. <parameter name="cancellable"
  56294. transfer-ownership="none"
  56295. nullable="1"
  56296. allow-none="1">
  56297. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56298. <type name="Cancellable" c:type="GCancellable*"/>
  56299. </parameter>
  56300. </parameters>
  56301. </method>
  56302. <method name="write_all_async"
  56303. c:identifier="g_output_stream_write_all_async"
  56304. version="2.44">
  56305. <doc xml:space="preserve">Request an asynchronous write of @count bytes from @buffer into
  56306. the stream. When the operation is finished @callback will be called.
  56307. You can then call g_output_stream_write_all_finish() to get the result of the
  56308. operation.
  56309. This is the asynchronous version of g_output_stream_write_all().
  56310. Call g_output_stream_write_all_finish() to collect the result.
  56311. Any outstanding I/O request with higher priority (lower numerical
  56312. value) will be executed before an outstanding request with lower
  56313. priority. Default priority is %G_PRIORITY_DEFAULT.
  56314. Note that no copy of @buffer will be made, so it must stay valid
  56315. until @callback is called.</doc>
  56316. <return-value transfer-ownership="none">
  56317. <type name="none" c:type="void"/>
  56318. </return-value>
  56319. <parameters>
  56320. <instance-parameter name="stream" transfer-ownership="none">
  56321. <doc xml:space="preserve">A #GOutputStream</doc>
  56322. <type name="OutputStream" c:type="GOutputStream*"/>
  56323. </instance-parameter>
  56324. <parameter name="buffer" transfer-ownership="none">
  56325. <doc xml:space="preserve">the buffer containing the data to write</doc>
  56326. <array length="1" zero-terminated="0" c:type="void*">
  56327. <type name="guint8"/>
  56328. </array>
  56329. </parameter>
  56330. <parameter name="count" transfer-ownership="none">
  56331. <doc xml:space="preserve">the number of bytes to write</doc>
  56332. <type name="gsize" c:type="gsize"/>
  56333. </parameter>
  56334. <parameter name="io_priority" transfer-ownership="none">
  56335. <doc xml:space="preserve">the io priority of the request</doc>
  56336. <type name="gint" c:type="int"/>
  56337. </parameter>
  56338. <parameter name="cancellable"
  56339. transfer-ownership="none"
  56340. nullable="1"
  56341. allow-none="1">
  56342. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  56343. <type name="Cancellable" c:type="GCancellable*"/>
  56344. </parameter>
  56345. <parameter name="callback"
  56346. transfer-ownership="none"
  56347. nullable="1"
  56348. allow-none="1"
  56349. scope="async"
  56350. closure="5">
  56351. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  56352. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56353. </parameter>
  56354. <parameter name="user_data"
  56355. transfer-ownership="none"
  56356. nullable="1"
  56357. allow-none="1">
  56358. <doc xml:space="preserve">the data to pass to callback function</doc>
  56359. <type name="gpointer" c:type="gpointer"/>
  56360. </parameter>
  56361. </parameters>
  56362. </method>
  56363. <method name="write_all_finish"
  56364. c:identifier="g_output_stream_write_all_finish"
  56365. version="2.44"
  56366. throws="1">
  56367. <doc xml:space="preserve">Finishes an asynchronous stream write operation started with
  56368. g_output_stream_write_all_async().
  56369. As a special exception to the normal conventions for functions that
  56370. use #GError, if this function returns %FALSE (and sets @error) then
  56371. @bytes_written will be set to the number of bytes that were
  56372. successfully written before the error was encountered. This
  56373. functionality is only available from C. If you need it from another
  56374. language then you must write your own loop around
  56375. g_output_stream_write_async().</doc>
  56376. <return-value transfer-ownership="none">
  56377. <doc xml:space="preserve">%TRUE on success, %FALSE if there was an error</doc>
  56378. <type name="gboolean" c:type="gboolean"/>
  56379. </return-value>
  56380. <parameters>
  56381. <instance-parameter name="stream" transfer-ownership="none">
  56382. <doc xml:space="preserve">a #GOutputStream</doc>
  56383. <type name="OutputStream" c:type="GOutputStream*"/>
  56384. </instance-parameter>
  56385. <parameter name="result" transfer-ownership="none">
  56386. <doc xml:space="preserve">a #GAsyncResult</doc>
  56387. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56388. </parameter>
  56389. <parameter name="bytes_written"
  56390. direction="out"
  56391. caller-allocates="0"
  56392. transfer-ownership="full">
  56393. <doc xml:space="preserve">location to store the number of bytes that was written to the stream</doc>
  56394. <type name="gsize" c:type="gsize*"/>
  56395. </parameter>
  56396. </parameters>
  56397. </method>
  56398. <method name="write_async" c:identifier="g_output_stream_write_async">
  56399. <doc xml:space="preserve">Request an asynchronous write of @count bytes from @buffer into
  56400. the stream. When the operation is finished @callback will be called.
  56401. You can then call g_output_stream_write_finish() to get the result of the
  56402. operation.
  56403. During an async request no other sync and async calls are allowed,
  56404. and will result in %G_IO_ERROR_PENDING errors.
  56405. A value of @count larger than %G_MAXSSIZE will cause a
  56406. %G_IO_ERROR_INVALID_ARGUMENT error.
  56407. On success, the number of bytes written will be passed to the
  56408. @callback. It is not an error if this is not the same as the
  56409. requested size, as it can happen e.g. on a partial I/O error,
  56410. but generally we try to write as many bytes as requested.
  56411. You are guaranteed that this method will never fail with
  56412. %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
  56413. method will just wait until this changes.
  56414. Any outstanding I/O request with higher priority (lower numerical
  56415. value) will be executed before an outstanding request with lower
  56416. priority. Default priority is %G_PRIORITY_DEFAULT.
  56417. The asyncronous methods have a default fallback that uses threads
  56418. to implement asynchronicity, so they are optional for inheriting
  56419. classes. However, if you override one you must override all.
  56420. For the synchronous, blocking version of this function, see
  56421. g_output_stream_write().
  56422. Note that no copy of @buffer will be made, so it must stay valid
  56423. until @callback is called. See g_output_stream_write_bytes_async()
  56424. for a #GBytes version that will automatically hold a reference to
  56425. the contents (without copying) for the duration of the call.</doc>
  56426. <return-value transfer-ownership="none">
  56427. <type name="none" c:type="void"/>
  56428. </return-value>
  56429. <parameters>
  56430. <instance-parameter name="stream" transfer-ownership="none">
  56431. <doc xml:space="preserve">A #GOutputStream.</doc>
  56432. <type name="OutputStream" c:type="GOutputStream*"/>
  56433. </instance-parameter>
  56434. <parameter name="buffer" transfer-ownership="none">
  56435. <doc xml:space="preserve">the buffer containing the data to write.</doc>
  56436. <array length="1" zero-terminated="0" c:type="void*">
  56437. <type name="guint8"/>
  56438. </array>
  56439. </parameter>
  56440. <parameter name="count" transfer-ownership="none">
  56441. <doc xml:space="preserve">the number of bytes to write</doc>
  56442. <type name="gsize" c:type="gsize"/>
  56443. </parameter>
  56444. <parameter name="io_priority" transfer-ownership="none">
  56445. <doc xml:space="preserve">the io priority of the request.</doc>
  56446. <type name="gint" c:type="int"/>
  56447. </parameter>
  56448. <parameter name="cancellable"
  56449. transfer-ownership="none"
  56450. nullable="1"
  56451. allow-none="1">
  56452. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56453. <type name="Cancellable" c:type="GCancellable*"/>
  56454. </parameter>
  56455. <parameter name="callback"
  56456. transfer-ownership="none"
  56457. nullable="1"
  56458. allow-none="1"
  56459. scope="async"
  56460. closure="5">
  56461. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  56462. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56463. </parameter>
  56464. <parameter name="user_data"
  56465. transfer-ownership="none"
  56466. nullable="1"
  56467. allow-none="1">
  56468. <doc xml:space="preserve">the data to pass to callback function</doc>
  56469. <type name="gpointer" c:type="gpointer"/>
  56470. </parameter>
  56471. </parameters>
  56472. </method>
  56473. <method name="write_bytes"
  56474. c:identifier="g_output_stream_write_bytes"
  56475. throws="1">
  56476. <doc xml:space="preserve">A wrapper function for g_output_stream_write() which takes a
  56477. #GBytes as input. This can be more convenient for use by language
  56478. bindings or in other cases where the refcounted nature of #GBytes
  56479. is helpful over a bare pointer interface.
  56480. However, note that this function may still perform partial writes,
  56481. just like g_output_stream_write(). If that occurs, to continue
  56482. writing, you will need to create a new #GBytes containing just the
  56483. remaining bytes, using g_bytes_new_from_bytes(). Passing the same
  56484. #GBytes instance multiple times potentially can result in duplicated
  56485. data in the output stream.</doc>
  56486. <return-value transfer-ownership="none">
  56487. <doc xml:space="preserve">Number of bytes written, or -1 on error</doc>
  56488. <type name="gssize" c:type="gssize"/>
  56489. </return-value>
  56490. <parameters>
  56491. <instance-parameter name="stream" transfer-ownership="none">
  56492. <doc xml:space="preserve">a #GOutputStream.</doc>
  56493. <type name="OutputStream" c:type="GOutputStream*"/>
  56494. </instance-parameter>
  56495. <parameter name="bytes" transfer-ownership="none">
  56496. <doc xml:space="preserve">the #GBytes to write</doc>
  56497. <type name="GLib.Bytes" c:type="GBytes*"/>
  56498. </parameter>
  56499. <parameter name="cancellable"
  56500. transfer-ownership="none"
  56501. nullable="1"
  56502. allow-none="1">
  56503. <doc xml:space="preserve">optional cancellable object</doc>
  56504. <type name="Cancellable" c:type="GCancellable*"/>
  56505. </parameter>
  56506. </parameters>
  56507. </method>
  56508. <method name="write_bytes_async"
  56509. c:identifier="g_output_stream_write_bytes_async">
  56510. <doc xml:space="preserve">This function is similar to g_output_stream_write_async(), but
  56511. takes a #GBytes as input. Due to the refcounted nature of #GBytes,
  56512. this allows the stream to avoid taking a copy of the data.
  56513. However, note that this function may still perform partial writes,
  56514. just like g_output_stream_write_async(). If that occurs, to continue
  56515. writing, you will need to create a new #GBytes containing just the
  56516. remaining bytes, using g_bytes_new_from_bytes(). Passing the same
  56517. #GBytes instance multiple times potentially can result in duplicated
  56518. data in the output stream.
  56519. For the synchronous, blocking version of this function, see
  56520. g_output_stream_write_bytes().</doc>
  56521. <return-value transfer-ownership="none">
  56522. <type name="none" c:type="void"/>
  56523. </return-value>
  56524. <parameters>
  56525. <instance-parameter name="stream" transfer-ownership="none">
  56526. <doc xml:space="preserve">A #GOutputStream.</doc>
  56527. <type name="OutputStream" c:type="GOutputStream*"/>
  56528. </instance-parameter>
  56529. <parameter name="bytes" transfer-ownership="none">
  56530. <doc xml:space="preserve">The bytes to write</doc>
  56531. <type name="GLib.Bytes" c:type="GBytes*"/>
  56532. </parameter>
  56533. <parameter name="io_priority" transfer-ownership="none">
  56534. <doc xml:space="preserve">the io priority of the request.</doc>
  56535. <type name="gint" c:type="int"/>
  56536. </parameter>
  56537. <parameter name="cancellable"
  56538. transfer-ownership="none"
  56539. nullable="1"
  56540. allow-none="1">
  56541. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56542. <type name="Cancellable" c:type="GCancellable*"/>
  56543. </parameter>
  56544. <parameter name="callback"
  56545. transfer-ownership="none"
  56546. nullable="1"
  56547. allow-none="1"
  56548. scope="async"
  56549. closure="4">
  56550. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  56551. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56552. </parameter>
  56553. <parameter name="user_data"
  56554. transfer-ownership="none"
  56555. nullable="1"
  56556. allow-none="1">
  56557. <doc xml:space="preserve">the data to pass to callback function</doc>
  56558. <type name="gpointer" c:type="gpointer"/>
  56559. </parameter>
  56560. </parameters>
  56561. </method>
  56562. <method name="write_bytes_finish"
  56563. c:identifier="g_output_stream_write_bytes_finish"
  56564. throws="1">
  56565. <doc xml:space="preserve">Finishes a stream write-from-#GBytes operation.</doc>
  56566. <return-value transfer-ownership="none">
  56567. <doc xml:space="preserve">a #gssize containing the number of bytes written to the stream.</doc>
  56568. <type name="gssize" c:type="gssize"/>
  56569. </return-value>
  56570. <parameters>
  56571. <instance-parameter name="stream" transfer-ownership="none">
  56572. <doc xml:space="preserve">a #GOutputStream.</doc>
  56573. <type name="OutputStream" c:type="GOutputStream*"/>
  56574. </instance-parameter>
  56575. <parameter name="result" transfer-ownership="none">
  56576. <doc xml:space="preserve">a #GAsyncResult.</doc>
  56577. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56578. </parameter>
  56579. </parameters>
  56580. </method>
  56581. <method name="write_finish"
  56582. c:identifier="g_output_stream_write_finish"
  56583. throws="1">
  56584. <doc xml:space="preserve">Finishes a stream write operation.</doc>
  56585. <return-value transfer-ownership="none">
  56586. <doc xml:space="preserve">a #gssize containing the number of bytes written to the stream.</doc>
  56587. <type name="gssize" c:type="gssize"/>
  56588. </return-value>
  56589. <parameters>
  56590. <instance-parameter name="stream" transfer-ownership="none">
  56591. <doc xml:space="preserve">a #GOutputStream.</doc>
  56592. <type name="OutputStream" c:type="GOutputStream*"/>
  56593. </instance-parameter>
  56594. <parameter name="result" transfer-ownership="none">
  56595. <doc xml:space="preserve">a #GAsyncResult.</doc>
  56596. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56597. </parameter>
  56598. </parameters>
  56599. </method>
  56600. <field name="parent_instance">
  56601. <type name="GObject.Object" c:type="GObject"/>
  56602. </field>
  56603. <field name="priv" readable="0" private="1">
  56604. <type name="OutputStreamPrivate" c:type="GOutputStreamPrivate*"/>
  56605. </field>
  56606. </class>
  56607. <record name="OutputStreamClass"
  56608. c:type="GOutputStreamClass"
  56609. glib:is-gtype-struct-for="OutputStream">
  56610. <field name="parent_class">
  56611. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  56612. </field>
  56613. <field name="write_fn">
  56614. <callback name="write_fn" throws="1">
  56615. <return-value transfer-ownership="none">
  56616. <doc xml:space="preserve">Number of bytes written, or -1 on error</doc>
  56617. <type name="gssize" c:type="gssize"/>
  56618. </return-value>
  56619. <parameters>
  56620. <parameter name="stream" transfer-ownership="none">
  56621. <doc xml:space="preserve">a #GOutputStream.</doc>
  56622. <type name="OutputStream" c:type="GOutputStream*"/>
  56623. </parameter>
  56624. <parameter name="buffer"
  56625. transfer-ownership="none"
  56626. nullable="1"
  56627. allow-none="1">
  56628. <doc xml:space="preserve">the buffer containing the data to write.</doc>
  56629. <array length="2" zero-terminated="0" c:type="void*">
  56630. <type name="guint8"/>
  56631. </array>
  56632. </parameter>
  56633. <parameter name="count" transfer-ownership="none">
  56634. <doc xml:space="preserve">the number of bytes to write</doc>
  56635. <type name="gsize" c:type="gsize"/>
  56636. </parameter>
  56637. <parameter name="cancellable"
  56638. transfer-ownership="none"
  56639. nullable="1"
  56640. allow-none="1">
  56641. <doc xml:space="preserve">optional cancellable object</doc>
  56642. <type name="Cancellable" c:type="GCancellable*"/>
  56643. </parameter>
  56644. </parameters>
  56645. </callback>
  56646. </field>
  56647. <field name="splice">
  56648. <callback name="splice" throws="1">
  56649. <return-value transfer-ownership="none">
  56650. <doc xml:space="preserve">a #gssize containing the size of the data spliced, or
  56651. -1 if an error occurred. Note that if the number of bytes
  56652. spliced is greater than %G_MAXSSIZE, then that will be
  56653. returned, and there is no way to determine the actual number
  56654. of bytes spliced.</doc>
  56655. <type name="gssize" c:type="gssize"/>
  56656. </return-value>
  56657. <parameters>
  56658. <parameter name="stream" transfer-ownership="none">
  56659. <doc xml:space="preserve">a #GOutputStream.</doc>
  56660. <type name="OutputStream" c:type="GOutputStream*"/>
  56661. </parameter>
  56662. <parameter name="source" transfer-ownership="none">
  56663. <doc xml:space="preserve">a #GInputStream.</doc>
  56664. <type name="InputStream" c:type="GInputStream*"/>
  56665. </parameter>
  56666. <parameter name="flags" transfer-ownership="none">
  56667. <doc xml:space="preserve">a set of #GOutputStreamSpliceFlags.</doc>
  56668. <type name="OutputStreamSpliceFlags"
  56669. c:type="GOutputStreamSpliceFlags"/>
  56670. </parameter>
  56671. <parameter name="cancellable"
  56672. transfer-ownership="none"
  56673. nullable="1"
  56674. allow-none="1">
  56675. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56676. <type name="Cancellable" c:type="GCancellable*"/>
  56677. </parameter>
  56678. </parameters>
  56679. </callback>
  56680. </field>
  56681. <field name="flush">
  56682. <callback name="flush" throws="1">
  56683. <return-value transfer-ownership="none">
  56684. <doc xml:space="preserve">%TRUE on success, %FALSE on error</doc>
  56685. <type name="gboolean" c:type="gboolean"/>
  56686. </return-value>
  56687. <parameters>
  56688. <parameter name="stream" transfer-ownership="none">
  56689. <doc xml:space="preserve">a #GOutputStream.</doc>
  56690. <type name="OutputStream" c:type="GOutputStream*"/>
  56691. </parameter>
  56692. <parameter name="cancellable"
  56693. transfer-ownership="none"
  56694. nullable="1"
  56695. allow-none="1">
  56696. <doc xml:space="preserve">optional cancellable object</doc>
  56697. <type name="Cancellable" c:type="GCancellable*"/>
  56698. </parameter>
  56699. </parameters>
  56700. </callback>
  56701. </field>
  56702. <field name="close_fn">
  56703. <callback name="close_fn" throws="1">
  56704. <return-value transfer-ownership="none">
  56705. <type name="gboolean" c:type="gboolean"/>
  56706. </return-value>
  56707. <parameters>
  56708. <parameter name="stream" transfer-ownership="none">
  56709. <type name="OutputStream" c:type="GOutputStream*"/>
  56710. </parameter>
  56711. <parameter name="cancellable"
  56712. transfer-ownership="none"
  56713. nullable="1"
  56714. allow-none="1">
  56715. <type name="Cancellable" c:type="GCancellable*"/>
  56716. </parameter>
  56717. </parameters>
  56718. </callback>
  56719. </field>
  56720. <field name="write_async">
  56721. <callback name="write_async">
  56722. <return-value transfer-ownership="none">
  56723. <type name="none" c:type="void"/>
  56724. </return-value>
  56725. <parameters>
  56726. <parameter name="stream" transfer-ownership="none">
  56727. <doc xml:space="preserve">A #GOutputStream.</doc>
  56728. <type name="OutputStream" c:type="GOutputStream*"/>
  56729. </parameter>
  56730. <parameter name="buffer"
  56731. transfer-ownership="none"
  56732. nullable="1"
  56733. allow-none="1">
  56734. <doc xml:space="preserve">the buffer containing the data to write.</doc>
  56735. <array length="2" zero-terminated="0" c:type="void*">
  56736. <type name="guint8"/>
  56737. </array>
  56738. </parameter>
  56739. <parameter name="count" transfer-ownership="none">
  56740. <doc xml:space="preserve">the number of bytes to write</doc>
  56741. <type name="gsize" c:type="gsize"/>
  56742. </parameter>
  56743. <parameter name="io_priority" transfer-ownership="none">
  56744. <doc xml:space="preserve">the io priority of the request.</doc>
  56745. <type name="gint" c:type="int"/>
  56746. </parameter>
  56747. <parameter name="cancellable"
  56748. transfer-ownership="none"
  56749. nullable="1"
  56750. allow-none="1">
  56751. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56752. <type name="Cancellable" c:type="GCancellable*"/>
  56753. </parameter>
  56754. <parameter name="callback"
  56755. transfer-ownership="none"
  56756. nullable="1"
  56757. allow-none="1"
  56758. scope="async"
  56759. closure="6">
  56760. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  56761. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56762. </parameter>
  56763. <parameter name="user_data"
  56764. transfer-ownership="none"
  56765. nullable="1"
  56766. allow-none="1"
  56767. closure="6">
  56768. <doc xml:space="preserve">the data to pass to callback function</doc>
  56769. <type name="gpointer" c:type="gpointer"/>
  56770. </parameter>
  56771. </parameters>
  56772. </callback>
  56773. </field>
  56774. <field name="write_finish">
  56775. <callback name="write_finish" throws="1">
  56776. <return-value transfer-ownership="none">
  56777. <doc xml:space="preserve">a #gssize containing the number of bytes written to the stream.</doc>
  56778. <type name="gssize" c:type="gssize"/>
  56779. </return-value>
  56780. <parameters>
  56781. <parameter name="stream" transfer-ownership="none">
  56782. <doc xml:space="preserve">a #GOutputStream.</doc>
  56783. <type name="OutputStream" c:type="GOutputStream*"/>
  56784. </parameter>
  56785. <parameter name="result" transfer-ownership="none">
  56786. <doc xml:space="preserve">a #GAsyncResult.</doc>
  56787. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56788. </parameter>
  56789. </parameters>
  56790. </callback>
  56791. </field>
  56792. <field name="splice_async">
  56793. <callback name="splice_async">
  56794. <return-value transfer-ownership="none">
  56795. <type name="none" c:type="void"/>
  56796. </return-value>
  56797. <parameters>
  56798. <parameter name="stream" transfer-ownership="none">
  56799. <doc xml:space="preserve">a #GOutputStream.</doc>
  56800. <type name="OutputStream" c:type="GOutputStream*"/>
  56801. </parameter>
  56802. <parameter name="source" transfer-ownership="none">
  56803. <doc xml:space="preserve">a #GInputStream.</doc>
  56804. <type name="InputStream" c:type="GInputStream*"/>
  56805. </parameter>
  56806. <parameter name="flags" transfer-ownership="none">
  56807. <doc xml:space="preserve">a set of #GOutputStreamSpliceFlags.</doc>
  56808. <type name="OutputStreamSpliceFlags"
  56809. c:type="GOutputStreamSpliceFlags"/>
  56810. </parameter>
  56811. <parameter name="io_priority" transfer-ownership="none">
  56812. <doc xml:space="preserve">the io priority of the request.</doc>
  56813. <type name="gint" c:type="int"/>
  56814. </parameter>
  56815. <parameter name="cancellable"
  56816. transfer-ownership="none"
  56817. nullable="1"
  56818. allow-none="1">
  56819. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56820. <type name="Cancellable" c:type="GCancellable*"/>
  56821. </parameter>
  56822. <parameter name="callback"
  56823. transfer-ownership="none"
  56824. nullable="1"
  56825. allow-none="1"
  56826. scope="async"
  56827. closure="6">
  56828. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  56829. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56830. </parameter>
  56831. <parameter name="user_data"
  56832. transfer-ownership="none"
  56833. nullable="1"
  56834. allow-none="1"
  56835. closure="6">
  56836. <doc xml:space="preserve">user data passed to @callback.</doc>
  56837. <type name="gpointer" c:type="gpointer"/>
  56838. </parameter>
  56839. </parameters>
  56840. </callback>
  56841. </field>
  56842. <field name="splice_finish">
  56843. <callback name="splice_finish" throws="1">
  56844. <return-value transfer-ownership="none">
  56845. <doc xml:space="preserve">a #gssize of the number of bytes spliced. Note that if the
  56846. number of bytes spliced is greater than %G_MAXSSIZE, then that
  56847. will be returned, and there is no way to determine the actual
  56848. number of bytes spliced.</doc>
  56849. <type name="gssize" c:type="gssize"/>
  56850. </return-value>
  56851. <parameters>
  56852. <parameter name="stream" transfer-ownership="none">
  56853. <doc xml:space="preserve">a #GOutputStream.</doc>
  56854. <type name="OutputStream" c:type="GOutputStream*"/>
  56855. </parameter>
  56856. <parameter name="result" transfer-ownership="none">
  56857. <doc xml:space="preserve">a #GAsyncResult.</doc>
  56858. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56859. </parameter>
  56860. </parameters>
  56861. </callback>
  56862. </field>
  56863. <field name="flush_async">
  56864. <callback name="flush_async">
  56865. <return-value transfer-ownership="none">
  56866. <type name="none" c:type="void"/>
  56867. </return-value>
  56868. <parameters>
  56869. <parameter name="stream" transfer-ownership="none">
  56870. <doc xml:space="preserve">a #GOutputStream.</doc>
  56871. <type name="OutputStream" c:type="GOutputStream*"/>
  56872. </parameter>
  56873. <parameter name="io_priority" transfer-ownership="none">
  56874. <doc xml:space="preserve">the io priority of the request.</doc>
  56875. <type name="gint" c:type="int"/>
  56876. </parameter>
  56877. <parameter name="cancellable"
  56878. transfer-ownership="none"
  56879. nullable="1"
  56880. allow-none="1">
  56881. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  56882. <type name="Cancellable" c:type="GCancellable*"/>
  56883. </parameter>
  56884. <parameter name="callback"
  56885. transfer-ownership="none"
  56886. nullable="1"
  56887. allow-none="1"
  56888. scope="async"
  56889. closure="4">
  56890. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  56891. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56892. </parameter>
  56893. <parameter name="user_data"
  56894. transfer-ownership="none"
  56895. nullable="1"
  56896. allow-none="1"
  56897. closure="4">
  56898. <doc xml:space="preserve">the data to pass to callback function</doc>
  56899. <type name="gpointer" c:type="gpointer"/>
  56900. </parameter>
  56901. </parameters>
  56902. </callback>
  56903. </field>
  56904. <field name="flush_finish">
  56905. <callback name="flush_finish" throws="1">
  56906. <return-value transfer-ownership="none">
  56907. <doc xml:space="preserve">%TRUE if flush operation succeeded, %FALSE otherwise.</doc>
  56908. <type name="gboolean" c:type="gboolean"/>
  56909. </return-value>
  56910. <parameters>
  56911. <parameter name="stream" transfer-ownership="none">
  56912. <doc xml:space="preserve">a #GOutputStream.</doc>
  56913. <type name="OutputStream" c:type="GOutputStream*"/>
  56914. </parameter>
  56915. <parameter name="result" transfer-ownership="none">
  56916. <doc xml:space="preserve">a GAsyncResult.</doc>
  56917. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56918. </parameter>
  56919. </parameters>
  56920. </callback>
  56921. </field>
  56922. <field name="close_async">
  56923. <callback name="close_async">
  56924. <return-value transfer-ownership="none">
  56925. <type name="none" c:type="void"/>
  56926. </return-value>
  56927. <parameters>
  56928. <parameter name="stream" transfer-ownership="none">
  56929. <doc xml:space="preserve">A #GOutputStream.</doc>
  56930. <type name="OutputStream" c:type="GOutputStream*"/>
  56931. </parameter>
  56932. <parameter name="io_priority" transfer-ownership="none">
  56933. <doc xml:space="preserve">the io priority of the request.</doc>
  56934. <type name="gint" c:type="int"/>
  56935. </parameter>
  56936. <parameter name="cancellable"
  56937. transfer-ownership="none"
  56938. nullable="1"
  56939. allow-none="1">
  56940. <doc xml:space="preserve">optional cancellable object</doc>
  56941. <type name="Cancellable" c:type="GCancellable*"/>
  56942. </parameter>
  56943. <parameter name="callback"
  56944. transfer-ownership="none"
  56945. nullable="1"
  56946. allow-none="1"
  56947. scope="async"
  56948. closure="4">
  56949. <doc xml:space="preserve">callback to call when the request is satisfied</doc>
  56950. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  56951. </parameter>
  56952. <parameter name="user_data"
  56953. transfer-ownership="none"
  56954. nullable="1"
  56955. allow-none="1"
  56956. closure="4">
  56957. <doc xml:space="preserve">the data to pass to callback function</doc>
  56958. <type name="gpointer" c:type="gpointer"/>
  56959. </parameter>
  56960. </parameters>
  56961. </callback>
  56962. </field>
  56963. <field name="close_finish">
  56964. <callback name="close_finish" throws="1">
  56965. <return-value transfer-ownership="none">
  56966. <doc xml:space="preserve">%TRUE if stream was successfully closed, %FALSE otherwise.</doc>
  56967. <type name="gboolean" c:type="gboolean"/>
  56968. </return-value>
  56969. <parameters>
  56970. <parameter name="stream" transfer-ownership="none">
  56971. <doc xml:space="preserve">a #GOutputStream.</doc>
  56972. <type name="OutputStream" c:type="GOutputStream*"/>
  56973. </parameter>
  56974. <parameter name="result" transfer-ownership="none">
  56975. <doc xml:space="preserve">a #GAsyncResult.</doc>
  56976. <type name="AsyncResult" c:type="GAsyncResult*"/>
  56977. </parameter>
  56978. </parameters>
  56979. </callback>
  56980. </field>
  56981. <field name="_g_reserved1" introspectable="0">
  56982. <callback name="_g_reserved1">
  56983. <return-value transfer-ownership="none">
  56984. <type name="none" c:type="void"/>
  56985. </return-value>
  56986. </callback>
  56987. </field>
  56988. <field name="_g_reserved2" introspectable="0">
  56989. <callback name="_g_reserved2">
  56990. <return-value transfer-ownership="none">
  56991. <type name="none" c:type="void"/>
  56992. </return-value>
  56993. </callback>
  56994. </field>
  56995. <field name="_g_reserved3" introspectable="0">
  56996. <callback name="_g_reserved3">
  56997. <return-value transfer-ownership="none">
  56998. <type name="none" c:type="void"/>
  56999. </return-value>
  57000. </callback>
  57001. </field>
  57002. <field name="_g_reserved4" introspectable="0">
  57003. <callback name="_g_reserved4">
  57004. <return-value transfer-ownership="none">
  57005. <type name="none" c:type="void"/>
  57006. </return-value>
  57007. </callback>
  57008. </field>
  57009. <field name="_g_reserved5" introspectable="0">
  57010. <callback name="_g_reserved5">
  57011. <return-value transfer-ownership="none">
  57012. <type name="none" c:type="void"/>
  57013. </return-value>
  57014. </callback>
  57015. </field>
  57016. <field name="_g_reserved6" introspectable="0">
  57017. <callback name="_g_reserved6">
  57018. <return-value transfer-ownership="none">
  57019. <type name="none" c:type="void"/>
  57020. </return-value>
  57021. </callback>
  57022. </field>
  57023. <field name="_g_reserved7" introspectable="0">
  57024. <callback name="_g_reserved7">
  57025. <return-value transfer-ownership="none">
  57026. <type name="none" c:type="void"/>
  57027. </return-value>
  57028. </callback>
  57029. </field>
  57030. <field name="_g_reserved8" introspectable="0">
  57031. <callback name="_g_reserved8">
  57032. <return-value transfer-ownership="none">
  57033. <type name="none" c:type="void"/>
  57034. </return-value>
  57035. </callback>
  57036. </field>
  57037. </record>
  57038. <record name="OutputStreamPrivate"
  57039. c:type="GOutputStreamPrivate"
  57040. disguised="1">
  57041. </record>
  57042. <bitfield name="OutputStreamSpliceFlags"
  57043. glib:type-name="GOutputStreamSpliceFlags"
  57044. glib:get-type="g_output_stream_splice_flags_get_type"
  57045. c:type="GOutputStreamSpliceFlags">
  57046. <doc xml:space="preserve">GOutputStreamSpliceFlags determine how streams should be spliced.</doc>
  57047. <member name="none"
  57048. value="0"
  57049. c:identifier="G_OUTPUT_STREAM_SPLICE_NONE"
  57050. glib:nick="none">
  57051. <doc xml:space="preserve">Do not close either stream.</doc>
  57052. </member>
  57053. <member name="close_source"
  57054. value="1"
  57055. c:identifier="G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE"
  57056. glib:nick="close-source">
  57057. <doc xml:space="preserve">Close the source stream after
  57058. the splice.</doc>
  57059. </member>
  57060. <member name="close_target"
  57061. value="2"
  57062. c:identifier="G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET"
  57063. glib:nick="close-target">
  57064. <doc xml:space="preserve">Close the target stream after
  57065. the splice.</doc>
  57066. </member>
  57067. </bitfield>
  57068. <record name="OutputVector" c:type="GOutputVector" version="2.22">
  57069. <doc xml:space="preserve">Structure used for scatter/gather data output.
  57070. You generally pass in an array of #GOutputVectors
  57071. and the operation will use all the buffers as if they were
  57072. one buffer.</doc>
  57073. <field name="buffer" writable="1">
  57074. <doc xml:space="preserve">Pointer to a buffer of data to read.</doc>
  57075. <type name="gpointer" c:type="gconstpointer"/>
  57076. </field>
  57077. <field name="size" writable="1">
  57078. <doc xml:space="preserve">the size of @buffer.</doc>
  57079. <type name="gsize" c:type="gsize"/>
  57080. </field>
  57081. </record>
  57082. <constant name="PROXY_EXTENSION_POINT_NAME"
  57083. value="gio-proxy"
  57084. c:type="G_PROXY_EXTENSION_POINT_NAME"
  57085. version="2.26">
  57086. <doc xml:space="preserve">Extension point for proxy functionality.
  57087. See [Extending GIO][extending-gio].</doc>
  57088. <type name="utf8" c:type="gchar*"/>
  57089. </constant>
  57090. <constant name="PROXY_RESOLVER_EXTENSION_POINT_NAME"
  57091. value="gio-proxy-resolver"
  57092. c:type="G_PROXY_RESOLVER_EXTENSION_POINT_NAME">
  57093. <doc xml:space="preserve">Extension point for proxy resolving functionality.
  57094. See [Extending GIO][extending-gio].</doc>
  57095. <type name="utf8" c:type="gchar*"/>
  57096. </constant>
  57097. <enumeration name="PasswordSave"
  57098. glib:type-name="GPasswordSave"
  57099. glib:get-type="g_password_save_get_type"
  57100. c:type="GPasswordSave">
  57101. <doc xml:space="preserve">#GPasswordSave is used to indicate the lifespan of a saved password.
  57102. #Gvfs stores passwords in the Gnome keyring when this flag allows it
  57103. to, and later retrieves it again from there.</doc>
  57104. <member name="never"
  57105. value="0"
  57106. c:identifier="G_PASSWORD_SAVE_NEVER"
  57107. glib:nick="never">
  57108. <doc xml:space="preserve">never save a password.</doc>
  57109. </member>
  57110. <member name="for_session"
  57111. value="1"
  57112. c:identifier="G_PASSWORD_SAVE_FOR_SESSION"
  57113. glib:nick="for-session">
  57114. <doc xml:space="preserve">save a password for the session.</doc>
  57115. </member>
  57116. <member name="permanently"
  57117. value="2"
  57118. c:identifier="G_PASSWORD_SAVE_PERMANENTLY"
  57119. glib:nick="permanently">
  57120. <doc xml:space="preserve">save a password permanently.</doc>
  57121. </member>
  57122. </enumeration>
  57123. <class name="Permission"
  57124. c:symbol-prefix="permission"
  57125. c:type="GPermission"
  57126. parent="GObject.Object"
  57127. abstract="1"
  57128. glib:type-name="GPermission"
  57129. glib:get-type="g_permission_get_type"
  57130. glib:type-struct="PermissionClass">
  57131. <doc xml:space="preserve">A #GPermission represents the status of the caller's permission to
  57132. perform a certain action.
  57133. You can query if the action is currently allowed and if it is
  57134. possible to acquire the permission so that the action will be allowed
  57135. in the future.
  57136. There is also an API to actually acquire the permission and one to
  57137. release it.
  57138. As an example, a #GPermission might represent the ability for the
  57139. user to write to a #GSettings object. This #GPermission object could
  57140. then be used to decide if it is appropriate to show a "Click here to
  57141. unlock" button in a dialog and to provide the mechanism to invoke
  57142. when that button is clicked.</doc>
  57143. <virtual-method name="acquire"
  57144. invoker="acquire"
  57145. version="2.26"
  57146. throws="1">
  57147. <doc xml:space="preserve">Attempts to acquire the permission represented by @permission.
  57148. The precise method by which this happens depends on the permission
  57149. and the underlying authentication mechanism. A simple example is
  57150. that a dialog may appear asking the user to enter their password.
  57151. You should check with g_permission_get_can_acquire() before calling
  57152. this function.
  57153. If the permission is acquired then %TRUE is returned. Otherwise,
  57154. %FALSE is returned and @error is set appropriately.
  57155. This call is blocking, likely for a very long time (in the case that
  57156. user interaction is required). See g_permission_acquire_async() for
  57157. the non-blocking version.</doc>
  57158. <return-value transfer-ownership="none">
  57159. <doc xml:space="preserve">%TRUE if the permission was successfully acquired</doc>
  57160. <type name="gboolean" c:type="gboolean"/>
  57161. </return-value>
  57162. <parameters>
  57163. <instance-parameter name="permission" transfer-ownership="none">
  57164. <doc xml:space="preserve">a #GPermission instance</doc>
  57165. <type name="Permission" c:type="GPermission*"/>
  57166. </instance-parameter>
  57167. <parameter name="cancellable"
  57168. transfer-ownership="none"
  57169. nullable="1"
  57170. allow-none="1">
  57171. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57172. <type name="Cancellable" c:type="GCancellable*"/>
  57173. </parameter>
  57174. </parameters>
  57175. </virtual-method>
  57176. <virtual-method name="acquire_async"
  57177. invoker="acquire_async"
  57178. version="2.26">
  57179. <doc xml:space="preserve">Attempts to acquire the permission represented by @permission.
  57180. This is the first half of the asynchronous version of
  57181. g_permission_acquire().</doc>
  57182. <return-value transfer-ownership="none">
  57183. <type name="none" c:type="void"/>
  57184. </return-value>
  57185. <parameters>
  57186. <instance-parameter name="permission" transfer-ownership="none">
  57187. <doc xml:space="preserve">a #GPermission instance</doc>
  57188. <type name="Permission" c:type="GPermission*"/>
  57189. </instance-parameter>
  57190. <parameter name="cancellable"
  57191. transfer-ownership="none"
  57192. nullable="1"
  57193. allow-none="1">
  57194. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57195. <type name="Cancellable" c:type="GCancellable*"/>
  57196. </parameter>
  57197. <parameter name="callback"
  57198. transfer-ownership="none"
  57199. nullable="1"
  57200. allow-none="1"
  57201. scope="async"
  57202. closure="2">
  57203. <doc xml:space="preserve">the #GAsyncReadyCallback to call when done</doc>
  57204. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  57205. </parameter>
  57206. <parameter name="user_data"
  57207. transfer-ownership="none"
  57208. nullable="1"
  57209. allow-none="1"
  57210. closure="2">
  57211. <doc xml:space="preserve">the user data to pass to @callback</doc>
  57212. <type name="gpointer" c:type="gpointer"/>
  57213. </parameter>
  57214. </parameters>
  57215. </virtual-method>
  57216. <virtual-method name="acquire_finish"
  57217. invoker="acquire_finish"
  57218. version="2.26"
  57219. throws="1">
  57220. <doc xml:space="preserve">Collects the result of attempting to acquire the permission
  57221. represented by @permission.
  57222. This is the second half of the asynchronous version of
  57223. g_permission_acquire().</doc>
  57224. <return-value transfer-ownership="none">
  57225. <doc xml:space="preserve">%TRUE if the permission was successfully acquired</doc>
  57226. <type name="gboolean" c:type="gboolean"/>
  57227. </return-value>
  57228. <parameters>
  57229. <instance-parameter name="permission" transfer-ownership="none">
  57230. <doc xml:space="preserve">a #GPermission instance</doc>
  57231. <type name="Permission" c:type="GPermission*"/>
  57232. </instance-parameter>
  57233. <parameter name="result" transfer-ownership="none">
  57234. <doc xml:space="preserve">the #GAsyncResult given to the #GAsyncReadyCallback</doc>
  57235. <type name="AsyncResult" c:type="GAsyncResult*"/>
  57236. </parameter>
  57237. </parameters>
  57238. </virtual-method>
  57239. <virtual-method name="release"
  57240. invoker="release"
  57241. version="2.26"
  57242. throws="1">
  57243. <doc xml:space="preserve">Attempts to release the permission represented by @permission.
  57244. The precise method by which this happens depends on the permission
  57245. and the underlying authentication mechanism. In most cases the
  57246. permission will be dropped immediately without further action.
  57247. You should check with g_permission_get_can_release() before calling
  57248. this function.
  57249. If the permission is released then %TRUE is returned. Otherwise,
  57250. %FALSE is returned and @error is set appropriately.
  57251. This call is blocking, likely for a very long time (in the case that
  57252. user interaction is required). See g_permission_release_async() for
  57253. the non-blocking version.</doc>
  57254. <return-value transfer-ownership="none">
  57255. <doc xml:space="preserve">%TRUE if the permission was successfully released</doc>
  57256. <type name="gboolean" c:type="gboolean"/>
  57257. </return-value>
  57258. <parameters>
  57259. <instance-parameter name="permission" transfer-ownership="none">
  57260. <doc xml:space="preserve">a #GPermission instance</doc>
  57261. <type name="Permission" c:type="GPermission*"/>
  57262. </instance-parameter>
  57263. <parameter name="cancellable"
  57264. transfer-ownership="none"
  57265. nullable="1"
  57266. allow-none="1">
  57267. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57268. <type name="Cancellable" c:type="GCancellable*"/>
  57269. </parameter>
  57270. </parameters>
  57271. </virtual-method>
  57272. <virtual-method name="release_async"
  57273. invoker="release_async"
  57274. version="2.26">
  57275. <doc xml:space="preserve">Attempts to release the permission represented by @permission.
  57276. This is the first half of the asynchronous version of
  57277. g_permission_release().</doc>
  57278. <return-value transfer-ownership="none">
  57279. <type name="none" c:type="void"/>
  57280. </return-value>
  57281. <parameters>
  57282. <instance-parameter name="permission" transfer-ownership="none">
  57283. <doc xml:space="preserve">a #GPermission instance</doc>
  57284. <type name="Permission" c:type="GPermission*"/>
  57285. </instance-parameter>
  57286. <parameter name="cancellable"
  57287. transfer-ownership="none"
  57288. nullable="1"
  57289. allow-none="1">
  57290. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57291. <type name="Cancellable" c:type="GCancellable*"/>
  57292. </parameter>
  57293. <parameter name="callback"
  57294. transfer-ownership="none"
  57295. nullable="1"
  57296. allow-none="1"
  57297. scope="async"
  57298. closure="2">
  57299. <doc xml:space="preserve">the #GAsyncReadyCallback to call when done</doc>
  57300. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  57301. </parameter>
  57302. <parameter name="user_data"
  57303. transfer-ownership="none"
  57304. nullable="1"
  57305. allow-none="1"
  57306. closure="2">
  57307. <doc xml:space="preserve">the user data to pass to @callback</doc>
  57308. <type name="gpointer" c:type="gpointer"/>
  57309. </parameter>
  57310. </parameters>
  57311. </virtual-method>
  57312. <virtual-method name="release_finish"
  57313. invoker="release_finish"
  57314. version="2.26"
  57315. throws="1">
  57316. <doc xml:space="preserve">Collects the result of attempting to release the permission
  57317. represented by @permission.
  57318. This is the second half of the asynchronous version of
  57319. g_permission_release().</doc>
  57320. <return-value transfer-ownership="none">
  57321. <doc xml:space="preserve">%TRUE if the permission was successfully released</doc>
  57322. <type name="gboolean" c:type="gboolean"/>
  57323. </return-value>
  57324. <parameters>
  57325. <instance-parameter name="permission" transfer-ownership="none">
  57326. <doc xml:space="preserve">a #GPermission instance</doc>
  57327. <type name="Permission" c:type="GPermission*"/>
  57328. </instance-parameter>
  57329. <parameter name="result" transfer-ownership="none">
  57330. <doc xml:space="preserve">the #GAsyncResult given to the #GAsyncReadyCallback</doc>
  57331. <type name="AsyncResult" c:type="GAsyncResult*"/>
  57332. </parameter>
  57333. </parameters>
  57334. </virtual-method>
  57335. <method name="acquire"
  57336. c:identifier="g_permission_acquire"
  57337. version="2.26"
  57338. throws="1">
  57339. <doc xml:space="preserve">Attempts to acquire the permission represented by @permission.
  57340. The precise method by which this happens depends on the permission
  57341. and the underlying authentication mechanism. A simple example is
  57342. that a dialog may appear asking the user to enter their password.
  57343. You should check with g_permission_get_can_acquire() before calling
  57344. this function.
  57345. If the permission is acquired then %TRUE is returned. Otherwise,
  57346. %FALSE is returned and @error is set appropriately.
  57347. This call is blocking, likely for a very long time (in the case that
  57348. user interaction is required). See g_permission_acquire_async() for
  57349. the non-blocking version.</doc>
  57350. <return-value transfer-ownership="none">
  57351. <doc xml:space="preserve">%TRUE if the permission was successfully acquired</doc>
  57352. <type name="gboolean" c:type="gboolean"/>
  57353. </return-value>
  57354. <parameters>
  57355. <instance-parameter name="permission" transfer-ownership="none">
  57356. <doc xml:space="preserve">a #GPermission instance</doc>
  57357. <type name="Permission" c:type="GPermission*"/>
  57358. </instance-parameter>
  57359. <parameter name="cancellable"
  57360. transfer-ownership="none"
  57361. nullable="1"
  57362. allow-none="1">
  57363. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57364. <type name="Cancellable" c:type="GCancellable*"/>
  57365. </parameter>
  57366. </parameters>
  57367. </method>
  57368. <method name="acquire_async"
  57369. c:identifier="g_permission_acquire_async"
  57370. version="2.26">
  57371. <doc xml:space="preserve">Attempts to acquire the permission represented by @permission.
  57372. This is the first half of the asynchronous version of
  57373. g_permission_acquire().</doc>
  57374. <return-value transfer-ownership="none">
  57375. <type name="none" c:type="void"/>
  57376. </return-value>
  57377. <parameters>
  57378. <instance-parameter name="permission" transfer-ownership="none">
  57379. <doc xml:space="preserve">a #GPermission instance</doc>
  57380. <type name="Permission" c:type="GPermission*"/>
  57381. </instance-parameter>
  57382. <parameter name="cancellable"
  57383. transfer-ownership="none"
  57384. nullable="1"
  57385. allow-none="1">
  57386. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57387. <type name="Cancellable" c:type="GCancellable*"/>
  57388. </parameter>
  57389. <parameter name="callback"
  57390. transfer-ownership="none"
  57391. nullable="1"
  57392. allow-none="1"
  57393. scope="async"
  57394. closure="2">
  57395. <doc xml:space="preserve">the #GAsyncReadyCallback to call when done</doc>
  57396. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  57397. </parameter>
  57398. <parameter name="user_data"
  57399. transfer-ownership="none"
  57400. nullable="1"
  57401. allow-none="1">
  57402. <doc xml:space="preserve">the user data to pass to @callback</doc>
  57403. <type name="gpointer" c:type="gpointer"/>
  57404. </parameter>
  57405. </parameters>
  57406. </method>
  57407. <method name="acquire_finish"
  57408. c:identifier="g_permission_acquire_finish"
  57409. version="2.26"
  57410. throws="1">
  57411. <doc xml:space="preserve">Collects the result of attempting to acquire the permission
  57412. represented by @permission.
  57413. This is the second half of the asynchronous version of
  57414. g_permission_acquire().</doc>
  57415. <return-value transfer-ownership="none">
  57416. <doc xml:space="preserve">%TRUE if the permission was successfully acquired</doc>
  57417. <type name="gboolean" c:type="gboolean"/>
  57418. </return-value>
  57419. <parameters>
  57420. <instance-parameter name="permission" transfer-ownership="none">
  57421. <doc xml:space="preserve">a #GPermission instance</doc>
  57422. <type name="Permission" c:type="GPermission*"/>
  57423. </instance-parameter>
  57424. <parameter name="result" transfer-ownership="none">
  57425. <doc xml:space="preserve">the #GAsyncResult given to the #GAsyncReadyCallback</doc>
  57426. <type name="AsyncResult" c:type="GAsyncResult*"/>
  57427. </parameter>
  57428. </parameters>
  57429. </method>
  57430. <method name="get_allowed"
  57431. c:identifier="g_permission_get_allowed"
  57432. version="2.26">
  57433. <doc xml:space="preserve">Gets the value of the 'allowed' property. This property is %TRUE if
  57434. the caller currently has permission to perform the action that
  57435. @permission represents the permission to perform.</doc>
  57436. <return-value transfer-ownership="none">
  57437. <doc xml:space="preserve">the value of the 'allowed' property</doc>
  57438. <type name="gboolean" c:type="gboolean"/>
  57439. </return-value>
  57440. <parameters>
  57441. <instance-parameter name="permission" transfer-ownership="none">
  57442. <doc xml:space="preserve">a #GPermission instance</doc>
  57443. <type name="Permission" c:type="GPermission*"/>
  57444. </instance-parameter>
  57445. </parameters>
  57446. </method>
  57447. <method name="get_can_acquire"
  57448. c:identifier="g_permission_get_can_acquire"
  57449. version="2.26">
  57450. <doc xml:space="preserve">Gets the value of the 'can-acquire' property. This property is %TRUE
  57451. if it is generally possible to acquire the permission by calling
  57452. g_permission_acquire().</doc>
  57453. <return-value transfer-ownership="none">
  57454. <doc xml:space="preserve">the value of the 'can-acquire' property</doc>
  57455. <type name="gboolean" c:type="gboolean"/>
  57456. </return-value>
  57457. <parameters>
  57458. <instance-parameter name="permission" transfer-ownership="none">
  57459. <doc xml:space="preserve">a #GPermission instance</doc>
  57460. <type name="Permission" c:type="GPermission*"/>
  57461. </instance-parameter>
  57462. </parameters>
  57463. </method>
  57464. <method name="get_can_release"
  57465. c:identifier="g_permission_get_can_release"
  57466. version="2.26">
  57467. <doc xml:space="preserve">Gets the value of the 'can-release' property. This property is %TRUE
  57468. if it is generally possible to release the permission by calling
  57469. g_permission_release().</doc>
  57470. <return-value transfer-ownership="none">
  57471. <doc xml:space="preserve">the value of the 'can-release' property</doc>
  57472. <type name="gboolean" c:type="gboolean"/>
  57473. </return-value>
  57474. <parameters>
  57475. <instance-parameter name="permission" transfer-ownership="none">
  57476. <doc xml:space="preserve">a #GPermission instance</doc>
  57477. <type name="Permission" c:type="GPermission*"/>
  57478. </instance-parameter>
  57479. </parameters>
  57480. </method>
  57481. <method name="impl_update"
  57482. c:identifier="g_permission_impl_update"
  57483. version="2.26">
  57484. <doc xml:space="preserve">This function is called by the #GPermission implementation to update
  57485. the properties of the permission. You should never call this
  57486. function except from a #GPermission implementation.
  57487. GObject notify signals are generated, as appropriate.</doc>
  57488. <return-value transfer-ownership="none">
  57489. <type name="none" c:type="void"/>
  57490. </return-value>
  57491. <parameters>
  57492. <instance-parameter name="permission" transfer-ownership="none">
  57493. <doc xml:space="preserve">a #GPermission instance</doc>
  57494. <type name="Permission" c:type="GPermission*"/>
  57495. </instance-parameter>
  57496. <parameter name="allowed" transfer-ownership="none">
  57497. <doc xml:space="preserve">the new value for the 'allowed' property</doc>
  57498. <type name="gboolean" c:type="gboolean"/>
  57499. </parameter>
  57500. <parameter name="can_acquire" transfer-ownership="none">
  57501. <doc xml:space="preserve">the new value for the 'can-acquire' property</doc>
  57502. <type name="gboolean" c:type="gboolean"/>
  57503. </parameter>
  57504. <parameter name="can_release" transfer-ownership="none">
  57505. <doc xml:space="preserve">the new value for the 'can-release' property</doc>
  57506. <type name="gboolean" c:type="gboolean"/>
  57507. </parameter>
  57508. </parameters>
  57509. </method>
  57510. <method name="release"
  57511. c:identifier="g_permission_release"
  57512. version="2.26"
  57513. throws="1">
  57514. <doc xml:space="preserve">Attempts to release the permission represented by @permission.
  57515. The precise method by which this happens depends on the permission
  57516. and the underlying authentication mechanism. In most cases the
  57517. permission will be dropped immediately without further action.
  57518. You should check with g_permission_get_can_release() before calling
  57519. this function.
  57520. If the permission is released then %TRUE is returned. Otherwise,
  57521. %FALSE is returned and @error is set appropriately.
  57522. This call is blocking, likely for a very long time (in the case that
  57523. user interaction is required). See g_permission_release_async() for
  57524. the non-blocking version.</doc>
  57525. <return-value transfer-ownership="none">
  57526. <doc xml:space="preserve">%TRUE if the permission was successfully released</doc>
  57527. <type name="gboolean" c:type="gboolean"/>
  57528. </return-value>
  57529. <parameters>
  57530. <instance-parameter name="permission" transfer-ownership="none">
  57531. <doc xml:space="preserve">a #GPermission instance</doc>
  57532. <type name="Permission" c:type="GPermission*"/>
  57533. </instance-parameter>
  57534. <parameter name="cancellable"
  57535. transfer-ownership="none"
  57536. nullable="1"
  57537. allow-none="1">
  57538. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57539. <type name="Cancellable" c:type="GCancellable*"/>
  57540. </parameter>
  57541. </parameters>
  57542. </method>
  57543. <method name="release_async"
  57544. c:identifier="g_permission_release_async"
  57545. version="2.26">
  57546. <doc xml:space="preserve">Attempts to release the permission represented by @permission.
  57547. This is the first half of the asynchronous version of
  57548. g_permission_release().</doc>
  57549. <return-value transfer-ownership="none">
  57550. <type name="none" c:type="void"/>
  57551. </return-value>
  57552. <parameters>
  57553. <instance-parameter name="permission" transfer-ownership="none">
  57554. <doc xml:space="preserve">a #GPermission instance</doc>
  57555. <type name="Permission" c:type="GPermission*"/>
  57556. </instance-parameter>
  57557. <parameter name="cancellable"
  57558. transfer-ownership="none"
  57559. nullable="1"
  57560. allow-none="1">
  57561. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57562. <type name="Cancellable" c:type="GCancellable*"/>
  57563. </parameter>
  57564. <parameter name="callback"
  57565. transfer-ownership="none"
  57566. nullable="1"
  57567. allow-none="1"
  57568. scope="async"
  57569. closure="2">
  57570. <doc xml:space="preserve">the #GAsyncReadyCallback to call when done</doc>
  57571. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  57572. </parameter>
  57573. <parameter name="user_data"
  57574. transfer-ownership="none"
  57575. nullable="1"
  57576. allow-none="1">
  57577. <doc xml:space="preserve">the user data to pass to @callback</doc>
  57578. <type name="gpointer" c:type="gpointer"/>
  57579. </parameter>
  57580. </parameters>
  57581. </method>
  57582. <method name="release_finish"
  57583. c:identifier="g_permission_release_finish"
  57584. version="2.26"
  57585. throws="1">
  57586. <doc xml:space="preserve">Collects the result of attempting to release the permission
  57587. represented by @permission.
  57588. This is the second half of the asynchronous version of
  57589. g_permission_release().</doc>
  57590. <return-value transfer-ownership="none">
  57591. <doc xml:space="preserve">%TRUE if the permission was successfully released</doc>
  57592. <type name="gboolean" c:type="gboolean"/>
  57593. </return-value>
  57594. <parameters>
  57595. <instance-parameter name="permission" transfer-ownership="none">
  57596. <doc xml:space="preserve">a #GPermission instance</doc>
  57597. <type name="Permission" c:type="GPermission*"/>
  57598. </instance-parameter>
  57599. <parameter name="result" transfer-ownership="none">
  57600. <doc xml:space="preserve">the #GAsyncResult given to the #GAsyncReadyCallback</doc>
  57601. <type name="AsyncResult" c:type="GAsyncResult*"/>
  57602. </parameter>
  57603. </parameters>
  57604. </method>
  57605. <property name="allowed" transfer-ownership="none">
  57606. <doc xml:space="preserve">%TRUE if the caller currently has permission to perform the action that
  57607. @permission represents the permission to perform.</doc>
  57608. <type name="gboolean" c:type="gboolean"/>
  57609. </property>
  57610. <property name="can-acquire" transfer-ownership="none">
  57611. <doc xml:space="preserve">%TRUE if it is generally possible to acquire the permission by calling
  57612. g_permission_acquire().</doc>
  57613. <type name="gboolean" c:type="gboolean"/>
  57614. </property>
  57615. <property name="can-release" transfer-ownership="none">
  57616. <doc xml:space="preserve">%TRUE if it is generally possible to release the permission by calling
  57617. g_permission_release().</doc>
  57618. <type name="gboolean" c:type="gboolean"/>
  57619. </property>
  57620. <field name="parent_instance">
  57621. <type name="GObject.Object" c:type="GObject"/>
  57622. </field>
  57623. <field name="priv" readable="0" private="1">
  57624. <type name="PermissionPrivate" c:type="GPermissionPrivate*"/>
  57625. </field>
  57626. </class>
  57627. <record name="PermissionClass"
  57628. c:type="GPermissionClass"
  57629. glib:is-gtype-struct-for="Permission">
  57630. <field name="parent_class">
  57631. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  57632. </field>
  57633. <field name="acquire">
  57634. <callback name="acquire" throws="1">
  57635. <return-value transfer-ownership="none">
  57636. <doc xml:space="preserve">%TRUE if the permission was successfully acquired</doc>
  57637. <type name="gboolean" c:type="gboolean"/>
  57638. </return-value>
  57639. <parameters>
  57640. <parameter name="permission" transfer-ownership="none">
  57641. <doc xml:space="preserve">a #GPermission instance</doc>
  57642. <type name="Permission" c:type="GPermission*"/>
  57643. </parameter>
  57644. <parameter name="cancellable"
  57645. transfer-ownership="none"
  57646. nullable="1"
  57647. allow-none="1">
  57648. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57649. <type name="Cancellable" c:type="GCancellable*"/>
  57650. </parameter>
  57651. </parameters>
  57652. </callback>
  57653. </field>
  57654. <field name="acquire_async">
  57655. <callback name="acquire_async">
  57656. <return-value transfer-ownership="none">
  57657. <type name="none" c:type="void"/>
  57658. </return-value>
  57659. <parameters>
  57660. <parameter name="permission" transfer-ownership="none">
  57661. <doc xml:space="preserve">a #GPermission instance</doc>
  57662. <type name="Permission" c:type="GPermission*"/>
  57663. </parameter>
  57664. <parameter name="cancellable"
  57665. transfer-ownership="none"
  57666. nullable="1"
  57667. allow-none="1">
  57668. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57669. <type name="Cancellable" c:type="GCancellable*"/>
  57670. </parameter>
  57671. <parameter name="callback"
  57672. transfer-ownership="none"
  57673. nullable="1"
  57674. allow-none="1"
  57675. scope="async"
  57676. closure="3">
  57677. <doc xml:space="preserve">the #GAsyncReadyCallback to call when done</doc>
  57678. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  57679. </parameter>
  57680. <parameter name="user_data"
  57681. transfer-ownership="none"
  57682. nullable="1"
  57683. allow-none="1"
  57684. closure="3">
  57685. <doc xml:space="preserve">the user data to pass to @callback</doc>
  57686. <type name="gpointer" c:type="gpointer"/>
  57687. </parameter>
  57688. </parameters>
  57689. </callback>
  57690. </field>
  57691. <field name="acquire_finish">
  57692. <callback name="acquire_finish" throws="1">
  57693. <return-value transfer-ownership="none">
  57694. <doc xml:space="preserve">%TRUE if the permission was successfully acquired</doc>
  57695. <type name="gboolean" c:type="gboolean"/>
  57696. </return-value>
  57697. <parameters>
  57698. <parameter name="permission" transfer-ownership="none">
  57699. <doc xml:space="preserve">a #GPermission instance</doc>
  57700. <type name="Permission" c:type="GPermission*"/>
  57701. </parameter>
  57702. <parameter name="result" transfer-ownership="none">
  57703. <doc xml:space="preserve">the #GAsyncResult given to the #GAsyncReadyCallback</doc>
  57704. <type name="AsyncResult" c:type="GAsyncResult*"/>
  57705. </parameter>
  57706. </parameters>
  57707. </callback>
  57708. </field>
  57709. <field name="release">
  57710. <callback name="release" throws="1">
  57711. <return-value transfer-ownership="none">
  57712. <doc xml:space="preserve">%TRUE if the permission was successfully released</doc>
  57713. <type name="gboolean" c:type="gboolean"/>
  57714. </return-value>
  57715. <parameters>
  57716. <parameter name="permission" transfer-ownership="none">
  57717. <doc xml:space="preserve">a #GPermission instance</doc>
  57718. <type name="Permission" c:type="GPermission*"/>
  57719. </parameter>
  57720. <parameter name="cancellable"
  57721. transfer-ownership="none"
  57722. nullable="1"
  57723. allow-none="1">
  57724. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57725. <type name="Cancellable" c:type="GCancellable*"/>
  57726. </parameter>
  57727. </parameters>
  57728. </callback>
  57729. </field>
  57730. <field name="release_async">
  57731. <callback name="release_async">
  57732. <return-value transfer-ownership="none">
  57733. <type name="none" c:type="void"/>
  57734. </return-value>
  57735. <parameters>
  57736. <parameter name="permission" transfer-ownership="none">
  57737. <doc xml:space="preserve">a #GPermission instance</doc>
  57738. <type name="Permission" c:type="GPermission*"/>
  57739. </parameter>
  57740. <parameter name="cancellable"
  57741. transfer-ownership="none"
  57742. nullable="1"
  57743. allow-none="1">
  57744. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57745. <type name="Cancellable" c:type="GCancellable*"/>
  57746. </parameter>
  57747. <parameter name="callback"
  57748. transfer-ownership="none"
  57749. nullable="1"
  57750. allow-none="1"
  57751. scope="async"
  57752. closure="3">
  57753. <doc xml:space="preserve">the #GAsyncReadyCallback to call when done</doc>
  57754. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  57755. </parameter>
  57756. <parameter name="user_data"
  57757. transfer-ownership="none"
  57758. nullable="1"
  57759. allow-none="1"
  57760. closure="3">
  57761. <doc xml:space="preserve">the user data to pass to @callback</doc>
  57762. <type name="gpointer" c:type="gpointer"/>
  57763. </parameter>
  57764. </parameters>
  57765. </callback>
  57766. </field>
  57767. <field name="release_finish">
  57768. <callback name="release_finish" throws="1">
  57769. <return-value transfer-ownership="none">
  57770. <doc xml:space="preserve">%TRUE if the permission was successfully released</doc>
  57771. <type name="gboolean" c:type="gboolean"/>
  57772. </return-value>
  57773. <parameters>
  57774. <parameter name="permission" transfer-ownership="none">
  57775. <doc xml:space="preserve">a #GPermission instance</doc>
  57776. <type name="Permission" c:type="GPermission*"/>
  57777. </parameter>
  57778. <parameter name="result" transfer-ownership="none">
  57779. <doc xml:space="preserve">the #GAsyncResult given to the #GAsyncReadyCallback</doc>
  57780. <type name="AsyncResult" c:type="GAsyncResult*"/>
  57781. </parameter>
  57782. </parameters>
  57783. </callback>
  57784. </field>
  57785. <field name="reserved">
  57786. <array zero-terminated="0" c:type="gpointer" fixed-size="16">
  57787. <type name="gpointer" c:type="gpointer"/>
  57788. </array>
  57789. </field>
  57790. </record>
  57791. <record name="PermissionPrivate" c:type="GPermissionPrivate" disguised="1">
  57792. </record>
  57793. <interface name="PollableInputStream"
  57794. c:symbol-prefix="pollable_input_stream"
  57795. c:type="GPollableInputStream"
  57796. version="2.28"
  57797. glib:type-name="GPollableInputStream"
  57798. glib:get-type="g_pollable_input_stream_get_type"
  57799. glib:type-struct="PollableInputStreamInterface">
  57800. <doc xml:space="preserve">#GPollableInputStream is implemented by #GInputStreams that
  57801. can be polled for readiness to read. This can be used when
  57802. interfacing with a non-GIO API that expects
  57803. UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.</doc>
  57804. <prerequisite name="InputStream"/>
  57805. <virtual-method name="can_poll" invoker="can_poll" version="2.28">
  57806. <doc xml:space="preserve">Checks if @stream is actually pollable. Some classes may implement
  57807. #GPollableInputStream but have only certain instances of that class
  57808. be pollable. If this method returns %FALSE, then the behavior of
  57809. other #GPollableInputStream methods is undefined.
  57810. For any given stream, the value returned by this method is constant;
  57811. a stream cannot switch from pollable to non-pollable or vice versa.</doc>
  57812. <return-value transfer-ownership="none">
  57813. <doc xml:space="preserve">%TRUE if @stream is pollable, %FALSE if not.</doc>
  57814. <type name="gboolean" c:type="gboolean"/>
  57815. </return-value>
  57816. <parameters>
  57817. <instance-parameter name="stream" transfer-ownership="none">
  57818. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  57819. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  57820. </instance-parameter>
  57821. </parameters>
  57822. </virtual-method>
  57823. <virtual-method name="create_source"
  57824. invoker="create_source"
  57825. version="2.28">
  57826. <doc xml:space="preserve">Creates a #GSource that triggers when @stream can be read, or
  57827. @cancellable is triggered or an error occurs. The callback on the
  57828. source is of the #GPollableSourceFunc type.
  57829. As with g_pollable_input_stream_is_readable(), it is possible that
  57830. the stream may not actually be readable even after the source
  57831. triggers, so you should use g_pollable_input_stream_read_nonblocking()
  57832. rather than g_input_stream_read() from the callback.</doc>
  57833. <return-value transfer-ownership="full">
  57834. <doc xml:space="preserve">a new #GSource</doc>
  57835. <type name="GLib.Source" c:type="GSource*"/>
  57836. </return-value>
  57837. <parameters>
  57838. <instance-parameter name="stream" transfer-ownership="none">
  57839. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  57840. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  57841. </instance-parameter>
  57842. <parameter name="cancellable"
  57843. transfer-ownership="none"
  57844. nullable="1"
  57845. allow-none="1">
  57846. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57847. <type name="Cancellable" c:type="GCancellable*"/>
  57848. </parameter>
  57849. </parameters>
  57850. </virtual-method>
  57851. <virtual-method name="is_readable" invoker="is_readable" version="2.28">
  57852. <doc xml:space="preserve">Checks if @stream can be read.
  57853. Note that some stream types may not be able to implement this 100%
  57854. reliably, and it is possible that a call to g_input_stream_read()
  57855. after this returns %TRUE would still block. To guarantee
  57856. non-blocking behavior, you should always use
  57857. g_pollable_input_stream_read_nonblocking(), which will return a
  57858. %G_IO_ERROR_WOULD_BLOCK error rather than blocking.</doc>
  57859. <return-value transfer-ownership="none">
  57860. <doc xml:space="preserve">%TRUE if @stream is readable, %FALSE if not. If an error
  57861. has occurred on @stream, this will result in
  57862. g_pollable_input_stream_is_readable() returning %TRUE, and the
  57863. next attempt to read will return the error.</doc>
  57864. <type name="gboolean" c:type="gboolean"/>
  57865. </return-value>
  57866. <parameters>
  57867. <instance-parameter name="stream" transfer-ownership="none">
  57868. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  57869. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  57870. </instance-parameter>
  57871. </parameters>
  57872. </virtual-method>
  57873. <virtual-method name="read_nonblocking"
  57874. invoker="read_nonblocking"
  57875. throws="1">
  57876. <doc xml:space="preserve">Attempts to read up to @count bytes from @stream into @buffer, as
  57877. with g_input_stream_read(). If @stream is not currently readable,
  57878. this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
  57879. use g_pollable_input_stream_create_source() to create a #GSource
  57880. that will be triggered when @stream is readable.
  57881. Note that since this method never blocks, you cannot actually
  57882. use @cancellable to cancel it. However, it will return an error
  57883. if @cancellable has already been cancelled when you call, which
  57884. may happen if you call this method after a source triggers due
  57885. to having been cancelled.</doc>
  57886. <return-value transfer-ownership="none">
  57887. <doc xml:space="preserve">the number of bytes read, or -1 on error (including
  57888. %G_IO_ERROR_WOULD_BLOCK).</doc>
  57889. <type name="gssize" c:type="gssize"/>
  57890. </return-value>
  57891. <parameters>
  57892. <instance-parameter name="stream" transfer-ownership="none">
  57893. <doc xml:space="preserve">a #GPollableInputStream</doc>
  57894. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  57895. </instance-parameter>
  57896. <parameter name="buffer"
  57897. transfer-ownership="none"
  57898. nullable="1"
  57899. allow-none="1">
  57900. <doc xml:space="preserve">a buffer to
  57901. read data into (which should be at least @count bytes long).</doc>
  57902. <array length="1" zero-terminated="0" c:type="void*">
  57903. <type name="guint8"/>
  57904. </array>
  57905. </parameter>
  57906. <parameter name="count" transfer-ownership="none">
  57907. <doc xml:space="preserve">the number of bytes you want to read</doc>
  57908. <type name="gsize" c:type="gsize"/>
  57909. </parameter>
  57910. </parameters>
  57911. </virtual-method>
  57912. <method name="can_poll"
  57913. c:identifier="g_pollable_input_stream_can_poll"
  57914. version="2.28">
  57915. <doc xml:space="preserve">Checks if @stream is actually pollable. Some classes may implement
  57916. #GPollableInputStream but have only certain instances of that class
  57917. be pollable. If this method returns %FALSE, then the behavior of
  57918. other #GPollableInputStream methods is undefined.
  57919. For any given stream, the value returned by this method is constant;
  57920. a stream cannot switch from pollable to non-pollable or vice versa.</doc>
  57921. <return-value transfer-ownership="none">
  57922. <doc xml:space="preserve">%TRUE if @stream is pollable, %FALSE if not.</doc>
  57923. <type name="gboolean" c:type="gboolean"/>
  57924. </return-value>
  57925. <parameters>
  57926. <instance-parameter name="stream" transfer-ownership="none">
  57927. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  57928. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  57929. </instance-parameter>
  57930. </parameters>
  57931. </method>
  57932. <method name="create_source"
  57933. c:identifier="g_pollable_input_stream_create_source"
  57934. version="2.28">
  57935. <doc xml:space="preserve">Creates a #GSource that triggers when @stream can be read, or
  57936. @cancellable is triggered or an error occurs. The callback on the
  57937. source is of the #GPollableSourceFunc type.
  57938. As with g_pollable_input_stream_is_readable(), it is possible that
  57939. the stream may not actually be readable even after the source
  57940. triggers, so you should use g_pollable_input_stream_read_nonblocking()
  57941. rather than g_input_stream_read() from the callback.</doc>
  57942. <return-value transfer-ownership="full">
  57943. <doc xml:space="preserve">a new #GSource</doc>
  57944. <type name="GLib.Source" c:type="GSource*"/>
  57945. </return-value>
  57946. <parameters>
  57947. <instance-parameter name="stream" transfer-ownership="none">
  57948. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  57949. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  57950. </instance-parameter>
  57951. <parameter name="cancellable"
  57952. transfer-ownership="none"
  57953. nullable="1"
  57954. allow-none="1">
  57955. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  57956. <type name="Cancellable" c:type="GCancellable*"/>
  57957. </parameter>
  57958. </parameters>
  57959. </method>
  57960. <method name="is_readable"
  57961. c:identifier="g_pollable_input_stream_is_readable"
  57962. version="2.28">
  57963. <doc xml:space="preserve">Checks if @stream can be read.
  57964. Note that some stream types may not be able to implement this 100%
  57965. reliably, and it is possible that a call to g_input_stream_read()
  57966. after this returns %TRUE would still block. To guarantee
  57967. non-blocking behavior, you should always use
  57968. g_pollable_input_stream_read_nonblocking(), which will return a
  57969. %G_IO_ERROR_WOULD_BLOCK error rather than blocking.</doc>
  57970. <return-value transfer-ownership="none">
  57971. <doc xml:space="preserve">%TRUE if @stream is readable, %FALSE if not. If an error
  57972. has occurred on @stream, this will result in
  57973. g_pollable_input_stream_is_readable() returning %TRUE, and the
  57974. next attempt to read will return the error.</doc>
  57975. <type name="gboolean" c:type="gboolean"/>
  57976. </return-value>
  57977. <parameters>
  57978. <instance-parameter name="stream" transfer-ownership="none">
  57979. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  57980. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  57981. </instance-parameter>
  57982. </parameters>
  57983. </method>
  57984. <method name="read_nonblocking"
  57985. c:identifier="g_pollable_input_stream_read_nonblocking"
  57986. throws="1">
  57987. <doc xml:space="preserve">Attempts to read up to @count bytes from @stream into @buffer, as
  57988. with g_input_stream_read(). If @stream is not currently readable,
  57989. this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
  57990. use g_pollable_input_stream_create_source() to create a #GSource
  57991. that will be triggered when @stream is readable.
  57992. Note that since this method never blocks, you cannot actually
  57993. use @cancellable to cancel it. However, it will return an error
  57994. if @cancellable has already been cancelled when you call, which
  57995. may happen if you call this method after a source triggers due
  57996. to having been cancelled.</doc>
  57997. <return-value transfer-ownership="none">
  57998. <doc xml:space="preserve">the number of bytes read, or -1 on error (including
  57999. %G_IO_ERROR_WOULD_BLOCK).</doc>
  58000. <type name="gssize" c:type="gssize"/>
  58001. </return-value>
  58002. <parameters>
  58003. <instance-parameter name="stream" transfer-ownership="none">
  58004. <doc xml:space="preserve">a #GPollableInputStream</doc>
  58005. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  58006. </instance-parameter>
  58007. <parameter name="buffer" transfer-ownership="none">
  58008. <doc xml:space="preserve">a buffer to
  58009. read data into (which should be at least @count bytes long).</doc>
  58010. <array length="1" zero-terminated="0" c:type="void*">
  58011. <type name="guint8"/>
  58012. </array>
  58013. </parameter>
  58014. <parameter name="count" transfer-ownership="none">
  58015. <doc xml:space="preserve">the number of bytes you want to read</doc>
  58016. <type name="gsize" c:type="gsize"/>
  58017. </parameter>
  58018. <parameter name="cancellable"
  58019. transfer-ownership="none"
  58020. nullable="1"
  58021. allow-none="1">
  58022. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  58023. <type name="Cancellable" c:type="GCancellable*"/>
  58024. </parameter>
  58025. </parameters>
  58026. </method>
  58027. </interface>
  58028. <record name="PollableInputStreamInterface"
  58029. c:type="GPollableInputStreamInterface"
  58030. glib:is-gtype-struct-for="PollableInputStream"
  58031. version="2.28">
  58032. <doc xml:space="preserve">The interface for pollable input streams.
  58033. The default implementation of @can_poll always returns %TRUE.
  58034. The default implementation of @read_nonblocking calls
  58035. g_pollable_input_stream_is_readable(), and then calls
  58036. g_input_stream_read() if it returns %TRUE. This means you only need
  58037. to override it if it is possible that your @is_readable
  58038. implementation may return %TRUE when the stream is not actually
  58039. readable.</doc>
  58040. <field name="g_iface">
  58041. <doc xml:space="preserve">The parent interface.</doc>
  58042. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  58043. </field>
  58044. <field name="can_poll">
  58045. <callback name="can_poll">
  58046. <return-value transfer-ownership="none">
  58047. <doc xml:space="preserve">%TRUE if @stream is pollable, %FALSE if not.</doc>
  58048. <type name="gboolean" c:type="gboolean"/>
  58049. </return-value>
  58050. <parameters>
  58051. <parameter name="stream" transfer-ownership="none">
  58052. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  58053. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  58054. </parameter>
  58055. </parameters>
  58056. </callback>
  58057. </field>
  58058. <field name="is_readable">
  58059. <callback name="is_readable">
  58060. <return-value transfer-ownership="none">
  58061. <doc xml:space="preserve">%TRUE if @stream is readable, %FALSE if not. If an error
  58062. has occurred on @stream, this will result in
  58063. g_pollable_input_stream_is_readable() returning %TRUE, and the
  58064. next attempt to read will return the error.</doc>
  58065. <type name="gboolean" c:type="gboolean"/>
  58066. </return-value>
  58067. <parameters>
  58068. <parameter name="stream" transfer-ownership="none">
  58069. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  58070. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  58071. </parameter>
  58072. </parameters>
  58073. </callback>
  58074. </field>
  58075. <field name="create_source">
  58076. <callback name="create_source">
  58077. <return-value transfer-ownership="full">
  58078. <doc xml:space="preserve">a new #GSource</doc>
  58079. <type name="GLib.Source" c:type="GSource*"/>
  58080. </return-value>
  58081. <parameters>
  58082. <parameter name="stream" transfer-ownership="none">
  58083. <doc xml:space="preserve">a #GPollableInputStream.</doc>
  58084. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  58085. </parameter>
  58086. <parameter name="cancellable"
  58087. transfer-ownership="none"
  58088. nullable="1"
  58089. allow-none="1">
  58090. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  58091. <type name="Cancellable" c:type="GCancellable*"/>
  58092. </parameter>
  58093. </parameters>
  58094. </callback>
  58095. </field>
  58096. <field name="read_nonblocking">
  58097. <callback name="read_nonblocking" throws="1">
  58098. <return-value transfer-ownership="none">
  58099. <doc xml:space="preserve">the number of bytes read, or -1 on error (including
  58100. %G_IO_ERROR_WOULD_BLOCK).</doc>
  58101. <type name="gssize" c:type="gssize"/>
  58102. </return-value>
  58103. <parameters>
  58104. <parameter name="stream" transfer-ownership="none">
  58105. <doc xml:space="preserve">a #GPollableInputStream</doc>
  58106. <type name="PollableInputStream" c:type="GPollableInputStream*"/>
  58107. </parameter>
  58108. <parameter name="buffer"
  58109. transfer-ownership="none"
  58110. nullable="1"
  58111. allow-none="1">
  58112. <doc xml:space="preserve">a buffer to
  58113. read data into (which should be at least @count bytes long).</doc>
  58114. <array length="2" zero-terminated="0" c:type="void*">
  58115. <type name="guint8"/>
  58116. </array>
  58117. </parameter>
  58118. <parameter name="count" transfer-ownership="none">
  58119. <doc xml:space="preserve">the number of bytes you want to read</doc>
  58120. <type name="gsize" c:type="gsize"/>
  58121. </parameter>
  58122. </parameters>
  58123. </callback>
  58124. </field>
  58125. </record>
  58126. <interface name="PollableOutputStream"
  58127. c:symbol-prefix="pollable_output_stream"
  58128. c:type="GPollableOutputStream"
  58129. version="2.28"
  58130. glib:type-name="GPollableOutputStream"
  58131. glib:get-type="g_pollable_output_stream_get_type"
  58132. glib:type-struct="PollableOutputStreamInterface">
  58133. <doc xml:space="preserve">#GPollableOutputStream is implemented by #GOutputStreams that
  58134. can be polled for readiness to write. This can be used when
  58135. interfacing with a non-GIO API that expects
  58136. UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.</doc>
  58137. <prerequisite name="OutputStream"/>
  58138. <virtual-method name="can_poll" invoker="can_poll" version="2.28">
  58139. <doc xml:space="preserve">Checks if @stream is actually pollable. Some classes may implement
  58140. #GPollableOutputStream but have only certain instances of that
  58141. class be pollable. If this method returns %FALSE, then the behavior
  58142. of other #GPollableOutputStream methods is undefined.
  58143. For any given stream, the value returned by this method is constant;
  58144. a stream cannot switch from pollable to non-pollable or vice versa.</doc>
  58145. <return-value transfer-ownership="none">
  58146. <doc xml:space="preserve">%TRUE if @stream is pollable, %FALSE if not.</doc>
  58147. <type name="gboolean" c:type="gboolean"/>
  58148. </return-value>
  58149. <parameters>
  58150. <instance-parameter name="stream" transfer-ownership="none">
  58151. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58152. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58153. </instance-parameter>
  58154. </parameters>
  58155. </virtual-method>
  58156. <virtual-method name="create_source"
  58157. invoker="create_source"
  58158. version="2.28">
  58159. <doc xml:space="preserve">Creates a #GSource that triggers when @stream can be written, or
  58160. @cancellable is triggered or an error occurs. The callback on the
  58161. source is of the #GPollableSourceFunc type.
  58162. As with g_pollable_output_stream_is_writable(), it is possible that
  58163. the stream may not actually be writable even after the source
  58164. triggers, so you should use g_pollable_output_stream_write_nonblocking()
  58165. rather than g_output_stream_write() from the callback.</doc>
  58166. <return-value transfer-ownership="full">
  58167. <doc xml:space="preserve">a new #GSource</doc>
  58168. <type name="GLib.Source" c:type="GSource*"/>
  58169. </return-value>
  58170. <parameters>
  58171. <instance-parameter name="stream" transfer-ownership="none">
  58172. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58173. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58174. </instance-parameter>
  58175. <parameter name="cancellable"
  58176. transfer-ownership="none"
  58177. nullable="1"
  58178. allow-none="1">
  58179. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  58180. <type name="Cancellable" c:type="GCancellable*"/>
  58181. </parameter>
  58182. </parameters>
  58183. </virtual-method>
  58184. <virtual-method name="is_writable" invoker="is_writable" version="2.28">
  58185. <doc xml:space="preserve">Checks if @stream can be written.
  58186. Note that some stream types may not be able to implement this 100%
  58187. reliably, and it is possible that a call to g_output_stream_write()
  58188. after this returns %TRUE would still block. To guarantee
  58189. non-blocking behavior, you should always use
  58190. g_pollable_output_stream_write_nonblocking(), which will return a
  58191. %G_IO_ERROR_WOULD_BLOCK error rather than blocking.</doc>
  58192. <return-value transfer-ownership="none">
  58193. <doc xml:space="preserve">%TRUE if @stream is writable, %FALSE if not. If an error
  58194. has occurred on @stream, this will result in
  58195. g_pollable_output_stream_is_writable() returning %TRUE, and the
  58196. next attempt to write will return the error.</doc>
  58197. <type name="gboolean" c:type="gboolean"/>
  58198. </return-value>
  58199. <parameters>
  58200. <instance-parameter name="stream" transfer-ownership="none">
  58201. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58202. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58203. </instance-parameter>
  58204. </parameters>
  58205. </virtual-method>
  58206. <virtual-method name="write_nonblocking"
  58207. invoker="write_nonblocking"
  58208. throws="1">
  58209. <doc xml:space="preserve">Attempts to write up to @count bytes from @buffer to @stream, as
  58210. with g_output_stream_write(). If @stream is not currently writable,
  58211. this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
  58212. use g_pollable_output_stream_create_source() to create a #GSource
  58213. that will be triggered when @stream is writable.
  58214. Note that since this method never blocks, you cannot actually
  58215. use @cancellable to cancel it. However, it will return an error
  58216. if @cancellable has already been cancelled when you call, which
  58217. may happen if you call this method after a source triggers due
  58218. to having been cancelled.</doc>
  58219. <return-value transfer-ownership="none">
  58220. <doc xml:space="preserve">the number of bytes written, or -1 on error (including
  58221. %G_IO_ERROR_WOULD_BLOCK).</doc>
  58222. <type name="gssize" c:type="gssize"/>
  58223. </return-value>
  58224. <parameters>
  58225. <instance-parameter name="stream" transfer-ownership="none">
  58226. <doc xml:space="preserve">a #GPollableOutputStream</doc>
  58227. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58228. </instance-parameter>
  58229. <parameter name="buffer"
  58230. transfer-ownership="none"
  58231. nullable="1"
  58232. allow-none="1">
  58233. <doc xml:space="preserve">a buffer to write
  58234. data from</doc>
  58235. <array length="1" zero-terminated="0" c:type="void*">
  58236. <type name="guint8"/>
  58237. </array>
  58238. </parameter>
  58239. <parameter name="count" transfer-ownership="none">
  58240. <doc xml:space="preserve">the number of bytes you want to write</doc>
  58241. <type name="gsize" c:type="gsize"/>
  58242. </parameter>
  58243. </parameters>
  58244. </virtual-method>
  58245. <method name="can_poll"
  58246. c:identifier="g_pollable_output_stream_can_poll"
  58247. version="2.28">
  58248. <doc xml:space="preserve">Checks if @stream is actually pollable. Some classes may implement
  58249. #GPollableOutputStream but have only certain instances of that
  58250. class be pollable. If this method returns %FALSE, then the behavior
  58251. of other #GPollableOutputStream methods is undefined.
  58252. For any given stream, the value returned by this method is constant;
  58253. a stream cannot switch from pollable to non-pollable or vice versa.</doc>
  58254. <return-value transfer-ownership="none">
  58255. <doc xml:space="preserve">%TRUE if @stream is pollable, %FALSE if not.</doc>
  58256. <type name="gboolean" c:type="gboolean"/>
  58257. </return-value>
  58258. <parameters>
  58259. <instance-parameter name="stream" transfer-ownership="none">
  58260. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58261. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58262. </instance-parameter>
  58263. </parameters>
  58264. </method>
  58265. <method name="create_source"
  58266. c:identifier="g_pollable_output_stream_create_source"
  58267. version="2.28">
  58268. <doc xml:space="preserve">Creates a #GSource that triggers when @stream can be written, or
  58269. @cancellable is triggered or an error occurs. The callback on the
  58270. source is of the #GPollableSourceFunc type.
  58271. As with g_pollable_output_stream_is_writable(), it is possible that
  58272. the stream may not actually be writable even after the source
  58273. triggers, so you should use g_pollable_output_stream_write_nonblocking()
  58274. rather than g_output_stream_write() from the callback.</doc>
  58275. <return-value transfer-ownership="full">
  58276. <doc xml:space="preserve">a new #GSource</doc>
  58277. <type name="GLib.Source" c:type="GSource*"/>
  58278. </return-value>
  58279. <parameters>
  58280. <instance-parameter name="stream" transfer-ownership="none">
  58281. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58282. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58283. </instance-parameter>
  58284. <parameter name="cancellable"
  58285. transfer-ownership="none"
  58286. nullable="1"
  58287. allow-none="1">
  58288. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  58289. <type name="Cancellable" c:type="GCancellable*"/>
  58290. </parameter>
  58291. </parameters>
  58292. </method>
  58293. <method name="is_writable"
  58294. c:identifier="g_pollable_output_stream_is_writable"
  58295. version="2.28">
  58296. <doc xml:space="preserve">Checks if @stream can be written.
  58297. Note that some stream types may not be able to implement this 100%
  58298. reliably, and it is possible that a call to g_output_stream_write()
  58299. after this returns %TRUE would still block. To guarantee
  58300. non-blocking behavior, you should always use
  58301. g_pollable_output_stream_write_nonblocking(), which will return a
  58302. %G_IO_ERROR_WOULD_BLOCK error rather than blocking.</doc>
  58303. <return-value transfer-ownership="none">
  58304. <doc xml:space="preserve">%TRUE if @stream is writable, %FALSE if not. If an error
  58305. has occurred on @stream, this will result in
  58306. g_pollable_output_stream_is_writable() returning %TRUE, and the
  58307. next attempt to write will return the error.</doc>
  58308. <type name="gboolean" c:type="gboolean"/>
  58309. </return-value>
  58310. <parameters>
  58311. <instance-parameter name="stream" transfer-ownership="none">
  58312. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58313. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58314. </instance-parameter>
  58315. </parameters>
  58316. </method>
  58317. <method name="write_nonblocking"
  58318. c:identifier="g_pollable_output_stream_write_nonblocking"
  58319. throws="1">
  58320. <doc xml:space="preserve">Attempts to write up to @count bytes from @buffer to @stream, as
  58321. with g_output_stream_write(). If @stream is not currently writable,
  58322. this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
  58323. use g_pollable_output_stream_create_source() to create a #GSource
  58324. that will be triggered when @stream is writable.
  58325. Note that since this method never blocks, you cannot actually
  58326. use @cancellable to cancel it. However, it will return an error
  58327. if @cancellable has already been cancelled when you call, which
  58328. may happen if you call this method after a source triggers due
  58329. to having been cancelled.</doc>
  58330. <return-value transfer-ownership="none">
  58331. <doc xml:space="preserve">the number of bytes written, or -1 on error (including
  58332. %G_IO_ERROR_WOULD_BLOCK).</doc>
  58333. <type name="gssize" c:type="gssize"/>
  58334. </return-value>
  58335. <parameters>
  58336. <instance-parameter name="stream" transfer-ownership="none">
  58337. <doc xml:space="preserve">a #GPollableOutputStream</doc>
  58338. <type name="PollableOutputStream" c:type="GPollableOutputStream*"/>
  58339. </instance-parameter>
  58340. <parameter name="buffer" transfer-ownership="none">
  58341. <doc xml:space="preserve">a buffer to write
  58342. data from</doc>
  58343. <array length="1" zero-terminated="0" c:type="void*">
  58344. <type name="guint8"/>
  58345. </array>
  58346. </parameter>
  58347. <parameter name="count" transfer-ownership="none">
  58348. <doc xml:space="preserve">the number of bytes you want to write</doc>
  58349. <type name="gsize" c:type="gsize"/>
  58350. </parameter>
  58351. <parameter name="cancellable"
  58352. transfer-ownership="none"
  58353. nullable="1"
  58354. allow-none="1">
  58355. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  58356. <type name="Cancellable" c:type="GCancellable*"/>
  58357. </parameter>
  58358. </parameters>
  58359. </method>
  58360. </interface>
  58361. <record name="PollableOutputStreamInterface"
  58362. c:type="GPollableOutputStreamInterface"
  58363. glib:is-gtype-struct-for="PollableOutputStream"
  58364. version="2.28">
  58365. <doc xml:space="preserve">The interface for pollable output streams.
  58366. The default implementation of @can_poll always returns %TRUE.
  58367. The default implementation of @write_nonblocking calls
  58368. g_pollable_output_stream_is_writable(), and then calls
  58369. g_output_stream_write() if it returns %TRUE. This means you only
  58370. need to override it if it is possible that your @is_writable
  58371. implementation may return %TRUE when the stream is not actually
  58372. writable.</doc>
  58373. <field name="g_iface">
  58374. <doc xml:space="preserve">The parent interface.</doc>
  58375. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  58376. </field>
  58377. <field name="can_poll">
  58378. <callback name="can_poll">
  58379. <return-value transfer-ownership="none">
  58380. <doc xml:space="preserve">%TRUE if @stream is pollable, %FALSE if not.</doc>
  58381. <type name="gboolean" c:type="gboolean"/>
  58382. </return-value>
  58383. <parameters>
  58384. <parameter name="stream" transfer-ownership="none">
  58385. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58386. <type name="PollableOutputStream"
  58387. c:type="GPollableOutputStream*"/>
  58388. </parameter>
  58389. </parameters>
  58390. </callback>
  58391. </field>
  58392. <field name="is_writable">
  58393. <callback name="is_writable">
  58394. <return-value transfer-ownership="none">
  58395. <doc xml:space="preserve">%TRUE if @stream is writable, %FALSE if not. If an error
  58396. has occurred on @stream, this will result in
  58397. g_pollable_output_stream_is_writable() returning %TRUE, and the
  58398. next attempt to write will return the error.</doc>
  58399. <type name="gboolean" c:type="gboolean"/>
  58400. </return-value>
  58401. <parameters>
  58402. <parameter name="stream" transfer-ownership="none">
  58403. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58404. <type name="PollableOutputStream"
  58405. c:type="GPollableOutputStream*"/>
  58406. </parameter>
  58407. </parameters>
  58408. </callback>
  58409. </field>
  58410. <field name="create_source">
  58411. <callback name="create_source">
  58412. <return-value transfer-ownership="full">
  58413. <doc xml:space="preserve">a new #GSource</doc>
  58414. <type name="GLib.Source" c:type="GSource*"/>
  58415. </return-value>
  58416. <parameters>
  58417. <parameter name="stream" transfer-ownership="none">
  58418. <doc xml:space="preserve">a #GPollableOutputStream.</doc>
  58419. <type name="PollableOutputStream"
  58420. c:type="GPollableOutputStream*"/>
  58421. </parameter>
  58422. <parameter name="cancellable"
  58423. transfer-ownership="none"
  58424. nullable="1"
  58425. allow-none="1">
  58426. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  58427. <type name="Cancellable" c:type="GCancellable*"/>
  58428. </parameter>
  58429. </parameters>
  58430. </callback>
  58431. </field>
  58432. <field name="write_nonblocking">
  58433. <callback name="write_nonblocking" throws="1">
  58434. <return-value transfer-ownership="none">
  58435. <doc xml:space="preserve">the number of bytes written, or -1 on error (including
  58436. %G_IO_ERROR_WOULD_BLOCK).</doc>
  58437. <type name="gssize" c:type="gssize"/>
  58438. </return-value>
  58439. <parameters>
  58440. <parameter name="stream" transfer-ownership="none">
  58441. <doc xml:space="preserve">a #GPollableOutputStream</doc>
  58442. <type name="PollableOutputStream"
  58443. c:type="GPollableOutputStream*"/>
  58444. </parameter>
  58445. <parameter name="buffer"
  58446. transfer-ownership="none"
  58447. nullable="1"
  58448. allow-none="1">
  58449. <doc xml:space="preserve">a buffer to write
  58450. data from</doc>
  58451. <array length="2" zero-terminated="0" c:type="void*">
  58452. <type name="guint8"/>
  58453. </array>
  58454. </parameter>
  58455. <parameter name="count" transfer-ownership="none">
  58456. <doc xml:space="preserve">the number of bytes you want to write</doc>
  58457. <type name="gsize" c:type="gsize"/>
  58458. </parameter>
  58459. </parameters>
  58460. </callback>
  58461. </field>
  58462. </record>
  58463. <callback name="PollableSourceFunc"
  58464. c:type="GPollableSourceFunc"
  58465. version="2.28">
  58466. <doc xml:space="preserve">This is the function type of the callback used for the #GSource
  58467. returned by g_pollable_input_stream_create_source() and
  58468. g_pollable_output_stream_create_source().</doc>
  58469. <return-value transfer-ownership="none">
  58470. <doc xml:space="preserve">it should return %FALSE if the source should be removed.</doc>
  58471. <type name="gboolean" c:type="gboolean"/>
  58472. </return-value>
  58473. <parameters>
  58474. <parameter name="pollable_stream" transfer-ownership="none">
  58475. <doc xml:space="preserve">the #GPollableInputStream or #GPollableOutputStream</doc>
  58476. <type name="GObject.Object" c:type="GObject*"/>
  58477. </parameter>
  58478. <parameter name="user_data"
  58479. transfer-ownership="none"
  58480. nullable="1"
  58481. allow-none="1"
  58482. closure="1">
  58483. <doc xml:space="preserve">data passed in by the user.</doc>
  58484. <type name="gpointer" c:type="gpointer"/>
  58485. </parameter>
  58486. </parameters>
  58487. </callback>
  58488. <class name="PropertyAction"
  58489. c:symbol-prefix="property_action"
  58490. c:type="GPropertyAction"
  58491. version="2.38"
  58492. parent="GObject.Object"
  58493. glib:type-name="GPropertyAction"
  58494. glib:get-type="g_property_action_get_type">
  58495. <doc xml:space="preserve">A #GPropertyAction is a way to get a #GAction with a state value
  58496. reflecting and controlling the value of a #GObject property.
  58497. The state of the action will correspond to the value of the property.
  58498. Changing it will change the property (assuming the requested value
  58499. matches the requirements as specified in the #GParamSpec).
  58500. Only the most common types are presently supported. Booleans are
  58501. mapped to booleans, strings to strings, signed/unsigned integers to
  58502. int32/uint32 and floats and doubles to doubles.
  58503. If the property is an enum then the state will be string-typed and
  58504. conversion will automatically be performed between the enum value and
  58505. "nick" string as per the #GEnumValue table.
  58506. Flags types are not currently supported.
  58507. Properties of object types, boxed types and pointer types are not
  58508. supported and probably never will be.
  58509. Properties of #GVariant types are not currently supported.
  58510. If the property is boolean-valued then the action will have a NULL
  58511. parameter type, and activating the action (with no parameter) will
  58512. toggle the value of the property.
  58513. In all other cases, the parameter type will correspond to the type of
  58514. the property.
  58515. The general idea here is to reduce the number of locations where a
  58516. particular piece of state is kept (and therefore has to be synchronised
  58517. between). #GPropertyAction does not have a separate state that is kept
  58518. in sync with the property value -- its state is the property value.
  58519. For example, it might be useful to create a #GAction corresponding to
  58520. the "visible-child-name" property of a #GtkStack so that the current
  58521. page can be switched from a menu. The active radio indication in the
  58522. menu is then directly determined from the active page of the
  58523. #GtkStack.
  58524. An anti-example would be binding the "active-id" property on a
  58525. #GtkComboBox. This is because the state of the combobox itself is
  58526. probably uninteresting and is actually being used to control
  58527. something else.
  58528. Another anti-example would be to bind to the "visible-child-name"
  58529. property of a #GtkStack if this value is actually stored in
  58530. #GSettings. In that case, the real source of the value is
  58531. #GSettings. If you want a #GAction to control a setting stored in
  58532. #GSettings, see g_settings_create_action() instead, and possibly
  58533. combine its use with g_settings_bind().</doc>
  58534. <implements name="Action"/>
  58535. <constructor name="new"
  58536. c:identifier="g_property_action_new"
  58537. version="2.38">
  58538. <doc xml:space="preserve">Creates a #GAction corresponding to the value of property
  58539. @property_name on @object.
  58540. The property must be existent and readable and writable (and not
  58541. construct-only).
  58542. This function takes a reference on @object and doesn't release it
  58543. until the action is destroyed.</doc>
  58544. <return-value transfer-ownership="full">
  58545. <doc xml:space="preserve">a new #GPropertyAction</doc>
  58546. <type name="PropertyAction" c:type="GPropertyAction*"/>
  58547. </return-value>
  58548. <parameters>
  58549. <parameter name="name" transfer-ownership="none">
  58550. <doc xml:space="preserve">the name of the action to create</doc>
  58551. <type name="utf8" c:type="const gchar*"/>
  58552. </parameter>
  58553. <parameter name="object" transfer-ownership="none">
  58554. <doc xml:space="preserve">the object that has the property
  58555. to wrap</doc>
  58556. <type name="GObject.Object" c:type="gpointer"/>
  58557. </parameter>
  58558. <parameter name="property_name" transfer-ownership="none">
  58559. <doc xml:space="preserve">the name of the property</doc>
  58560. <type name="utf8" c:type="const gchar*"/>
  58561. </parameter>
  58562. </parameters>
  58563. </constructor>
  58564. <property name="enabled" version="2.38" transfer-ownership="none">
  58565. <doc xml:space="preserve">If @action is currently enabled.
  58566. If the action is disabled then calls to g_action_activate() and
  58567. g_action_change_state() have no effect.</doc>
  58568. <type name="gboolean" c:type="gboolean"/>
  58569. </property>
  58570. <property name="invert-boolean"
  58571. version="2.46"
  58572. writable="1"
  58573. construct-only="1"
  58574. transfer-ownership="none">
  58575. <doc xml:space="preserve">If %TRUE, the state of the action will be the negation of the
  58576. property value, provided the property is boolean.</doc>
  58577. <type name="gboolean" c:type="gboolean"/>
  58578. </property>
  58579. <property name="name"
  58580. version="2.38"
  58581. writable="1"
  58582. construct-only="1"
  58583. transfer-ownership="none">
  58584. <doc xml:space="preserve">The name of the action. This is mostly meaningful for identifying
  58585. the action once it has been added to a #GActionMap.</doc>
  58586. <type name="utf8" c:type="gchar*"/>
  58587. </property>
  58588. <property name="object"
  58589. version="2.38"
  58590. readable="0"
  58591. writable="1"
  58592. construct-only="1"
  58593. transfer-ownership="none">
  58594. <doc xml:space="preserve">The object to wrap a property on.
  58595. The object must be a non-%NULL #GObject with properties.</doc>
  58596. <type name="GObject.Object"/>
  58597. </property>
  58598. <property name="parameter-type" version="2.38" transfer-ownership="none">
  58599. <doc xml:space="preserve">The type of the parameter that must be given when activating the
  58600. action.</doc>
  58601. <type name="GLib.VariantType"/>
  58602. </property>
  58603. <property name="property-name"
  58604. version="2.38"
  58605. readable="0"
  58606. writable="1"
  58607. construct-only="1"
  58608. transfer-ownership="none">
  58609. <doc xml:space="preserve">The name of the property to wrap on the object.
  58610. The property must exist on the passed-in object and it must be
  58611. readable and writable (and not construct-only).</doc>
  58612. <type name="utf8" c:type="gchar*"/>
  58613. </property>
  58614. <property name="state" version="2.38" transfer-ownership="none">
  58615. <doc xml:space="preserve">The state of the action, or %NULL if the action is stateless.</doc>
  58616. <type name="GLib.Variant"/>
  58617. </property>
  58618. <property name="state-type" version="2.38" transfer-ownership="none">
  58619. <doc xml:space="preserve">The #GVariantType of the state that the action has, or %NULL if the
  58620. action is stateless.</doc>
  58621. <type name="GLib.VariantType"/>
  58622. </property>
  58623. </class>
  58624. <interface name="Proxy"
  58625. c:symbol-prefix="proxy"
  58626. c:type="GProxy"
  58627. version="2.26"
  58628. glib:type-name="GProxy"
  58629. glib:get-type="g_proxy_get_type"
  58630. glib:type-struct="ProxyInterface">
  58631. <doc xml:space="preserve">A #GProxy handles connecting to a remote host via a given type of
  58632. proxy server. It is implemented by the 'gio-proxy' extension point.
  58633. The extensions are named after their proxy protocol name. As an
  58634. example, a SOCKS5 proxy implementation can be retrieved with the
  58635. name 'socks5' using the function
  58636. g_io_extension_point_get_extension_by_name().</doc>
  58637. <function name="get_default_for_protocol"
  58638. c:identifier="g_proxy_get_default_for_protocol"
  58639. version="2.26">
  58640. <doc xml:space="preserve">Lookup "gio-proxy" extension point for a proxy implementation that supports
  58641. specified protocol.</doc>
  58642. <return-value transfer-ownership="full">
  58643. <doc xml:space="preserve">return a #GProxy or NULL if protocol
  58644. is not supported.</doc>
  58645. <type name="Proxy" c:type="GProxy*"/>
  58646. </return-value>
  58647. <parameters>
  58648. <parameter name="protocol" transfer-ownership="none">
  58649. <doc xml:space="preserve">the proxy protocol name (e.g. http, socks, etc)</doc>
  58650. <type name="utf8" c:type="const gchar*"/>
  58651. </parameter>
  58652. </parameters>
  58653. </function>
  58654. <virtual-method name="connect"
  58655. invoker="connect"
  58656. version="2.26"
  58657. throws="1">
  58658. <doc xml:space="preserve">Given @connection to communicate with a proxy (eg, a
  58659. #GSocketConnection that is connected to the proxy server), this
  58660. does the necessary handshake to connect to @proxy_address, and if
  58661. required, wraps the #GIOStream to handle proxy payload.</doc>
  58662. <return-value transfer-ownership="full">
  58663. <doc xml:space="preserve">a #GIOStream that will replace @connection. This might
  58664. be the same as @connection, in which case a reference
  58665. will be added.</doc>
  58666. <type name="IOStream" c:type="GIOStream*"/>
  58667. </return-value>
  58668. <parameters>
  58669. <instance-parameter name="proxy" transfer-ownership="none">
  58670. <doc xml:space="preserve">a #GProxy</doc>
  58671. <type name="Proxy" c:type="GProxy*"/>
  58672. </instance-parameter>
  58673. <parameter name="connection" transfer-ownership="none">
  58674. <doc xml:space="preserve">a #GIOStream</doc>
  58675. <type name="IOStream" c:type="GIOStream*"/>
  58676. </parameter>
  58677. <parameter name="proxy_address" transfer-ownership="none">
  58678. <doc xml:space="preserve">a #GProxyAddress</doc>
  58679. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  58680. </parameter>
  58681. <parameter name="cancellable"
  58682. transfer-ownership="none"
  58683. nullable="1"
  58684. allow-none="1">
  58685. <doc xml:space="preserve">a #GCancellable</doc>
  58686. <type name="Cancellable" c:type="GCancellable*"/>
  58687. </parameter>
  58688. </parameters>
  58689. </virtual-method>
  58690. <virtual-method name="connect_async"
  58691. invoker="connect_async"
  58692. version="2.26">
  58693. <doc xml:space="preserve">Asynchronous version of g_proxy_connect().</doc>
  58694. <return-value transfer-ownership="none">
  58695. <type name="none" c:type="void"/>
  58696. </return-value>
  58697. <parameters>
  58698. <instance-parameter name="proxy" transfer-ownership="none">
  58699. <doc xml:space="preserve">a #GProxy</doc>
  58700. <type name="Proxy" c:type="GProxy*"/>
  58701. </instance-parameter>
  58702. <parameter name="connection" transfer-ownership="none">
  58703. <doc xml:space="preserve">a #GIOStream</doc>
  58704. <type name="IOStream" c:type="GIOStream*"/>
  58705. </parameter>
  58706. <parameter name="proxy_address" transfer-ownership="none">
  58707. <doc xml:space="preserve">a #GProxyAddress</doc>
  58708. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  58709. </parameter>
  58710. <parameter name="cancellable"
  58711. transfer-ownership="none"
  58712. nullable="1"
  58713. allow-none="1">
  58714. <doc xml:space="preserve">a #GCancellable</doc>
  58715. <type name="Cancellable" c:type="GCancellable*"/>
  58716. </parameter>
  58717. <parameter name="callback"
  58718. transfer-ownership="none"
  58719. nullable="1"
  58720. allow-none="1"
  58721. scope="async"
  58722. closure="4">
  58723. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  58724. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  58725. </parameter>
  58726. <parameter name="user_data"
  58727. transfer-ownership="none"
  58728. nullable="1"
  58729. allow-none="1"
  58730. closure="4">
  58731. <doc xml:space="preserve">callback data</doc>
  58732. <type name="gpointer" c:type="gpointer"/>
  58733. </parameter>
  58734. </parameters>
  58735. </virtual-method>
  58736. <virtual-method name="connect_finish"
  58737. invoker="connect_finish"
  58738. version="2.26"
  58739. throws="1">
  58740. <doc xml:space="preserve">See g_proxy_connect().</doc>
  58741. <return-value transfer-ownership="full">
  58742. <doc xml:space="preserve">a #GIOStream.</doc>
  58743. <type name="IOStream" c:type="GIOStream*"/>
  58744. </return-value>
  58745. <parameters>
  58746. <instance-parameter name="proxy" transfer-ownership="none">
  58747. <doc xml:space="preserve">a #GProxy</doc>
  58748. <type name="Proxy" c:type="GProxy*"/>
  58749. </instance-parameter>
  58750. <parameter name="result" transfer-ownership="none">
  58751. <doc xml:space="preserve">a #GAsyncResult</doc>
  58752. <type name="AsyncResult" c:type="GAsyncResult*"/>
  58753. </parameter>
  58754. </parameters>
  58755. </virtual-method>
  58756. <virtual-method name="supports_hostname"
  58757. invoker="supports_hostname"
  58758. version="2.26">
  58759. <doc xml:space="preserve">Some proxy protocols expect to be passed a hostname, which they
  58760. will resolve to an IP address themselves. Others, like SOCKS4, do
  58761. not allow this. This function will return %FALSE if @proxy is
  58762. implementing such a protocol. When %FALSE is returned, the caller
  58763. should resolve the destination hostname first, and then pass a
  58764. #GProxyAddress containing the stringified IP address to
  58765. g_proxy_connect() or g_proxy_connect_async().</doc>
  58766. <return-value transfer-ownership="none">
  58767. <doc xml:space="preserve">%TRUE if hostname resolution is supported.</doc>
  58768. <type name="gboolean" c:type="gboolean"/>
  58769. </return-value>
  58770. <parameters>
  58771. <instance-parameter name="proxy" transfer-ownership="none">
  58772. <doc xml:space="preserve">a #GProxy</doc>
  58773. <type name="Proxy" c:type="GProxy*"/>
  58774. </instance-parameter>
  58775. </parameters>
  58776. </virtual-method>
  58777. <method name="connect"
  58778. c:identifier="g_proxy_connect"
  58779. version="2.26"
  58780. throws="1">
  58781. <doc xml:space="preserve">Given @connection to communicate with a proxy (eg, a
  58782. #GSocketConnection that is connected to the proxy server), this
  58783. does the necessary handshake to connect to @proxy_address, and if
  58784. required, wraps the #GIOStream to handle proxy payload.</doc>
  58785. <return-value transfer-ownership="full">
  58786. <doc xml:space="preserve">a #GIOStream that will replace @connection. This might
  58787. be the same as @connection, in which case a reference
  58788. will be added.</doc>
  58789. <type name="IOStream" c:type="GIOStream*"/>
  58790. </return-value>
  58791. <parameters>
  58792. <instance-parameter name="proxy" transfer-ownership="none">
  58793. <doc xml:space="preserve">a #GProxy</doc>
  58794. <type name="Proxy" c:type="GProxy*"/>
  58795. </instance-parameter>
  58796. <parameter name="connection" transfer-ownership="none">
  58797. <doc xml:space="preserve">a #GIOStream</doc>
  58798. <type name="IOStream" c:type="GIOStream*"/>
  58799. </parameter>
  58800. <parameter name="proxy_address" transfer-ownership="none">
  58801. <doc xml:space="preserve">a #GProxyAddress</doc>
  58802. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  58803. </parameter>
  58804. <parameter name="cancellable"
  58805. transfer-ownership="none"
  58806. nullable="1"
  58807. allow-none="1">
  58808. <doc xml:space="preserve">a #GCancellable</doc>
  58809. <type name="Cancellable" c:type="GCancellable*"/>
  58810. </parameter>
  58811. </parameters>
  58812. </method>
  58813. <method name="connect_async"
  58814. c:identifier="g_proxy_connect_async"
  58815. version="2.26">
  58816. <doc xml:space="preserve">Asynchronous version of g_proxy_connect().</doc>
  58817. <return-value transfer-ownership="none">
  58818. <type name="none" c:type="void"/>
  58819. </return-value>
  58820. <parameters>
  58821. <instance-parameter name="proxy" transfer-ownership="none">
  58822. <doc xml:space="preserve">a #GProxy</doc>
  58823. <type name="Proxy" c:type="GProxy*"/>
  58824. </instance-parameter>
  58825. <parameter name="connection" transfer-ownership="none">
  58826. <doc xml:space="preserve">a #GIOStream</doc>
  58827. <type name="IOStream" c:type="GIOStream*"/>
  58828. </parameter>
  58829. <parameter name="proxy_address" transfer-ownership="none">
  58830. <doc xml:space="preserve">a #GProxyAddress</doc>
  58831. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  58832. </parameter>
  58833. <parameter name="cancellable"
  58834. transfer-ownership="none"
  58835. nullable="1"
  58836. allow-none="1">
  58837. <doc xml:space="preserve">a #GCancellable</doc>
  58838. <type name="Cancellable" c:type="GCancellable*"/>
  58839. </parameter>
  58840. <parameter name="callback"
  58841. transfer-ownership="none"
  58842. nullable="1"
  58843. allow-none="1"
  58844. scope="async"
  58845. closure="4">
  58846. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  58847. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  58848. </parameter>
  58849. <parameter name="user_data"
  58850. transfer-ownership="none"
  58851. nullable="1"
  58852. allow-none="1">
  58853. <doc xml:space="preserve">callback data</doc>
  58854. <type name="gpointer" c:type="gpointer"/>
  58855. </parameter>
  58856. </parameters>
  58857. </method>
  58858. <method name="connect_finish"
  58859. c:identifier="g_proxy_connect_finish"
  58860. version="2.26"
  58861. throws="1">
  58862. <doc xml:space="preserve">See g_proxy_connect().</doc>
  58863. <return-value transfer-ownership="full">
  58864. <doc xml:space="preserve">a #GIOStream.</doc>
  58865. <type name="IOStream" c:type="GIOStream*"/>
  58866. </return-value>
  58867. <parameters>
  58868. <instance-parameter name="proxy" transfer-ownership="none">
  58869. <doc xml:space="preserve">a #GProxy</doc>
  58870. <type name="Proxy" c:type="GProxy*"/>
  58871. </instance-parameter>
  58872. <parameter name="result" transfer-ownership="none">
  58873. <doc xml:space="preserve">a #GAsyncResult</doc>
  58874. <type name="AsyncResult" c:type="GAsyncResult*"/>
  58875. </parameter>
  58876. </parameters>
  58877. </method>
  58878. <method name="supports_hostname"
  58879. c:identifier="g_proxy_supports_hostname"
  58880. version="2.26">
  58881. <doc xml:space="preserve">Some proxy protocols expect to be passed a hostname, which they
  58882. will resolve to an IP address themselves. Others, like SOCKS4, do
  58883. not allow this. This function will return %FALSE if @proxy is
  58884. implementing such a protocol. When %FALSE is returned, the caller
  58885. should resolve the destination hostname first, and then pass a
  58886. #GProxyAddress containing the stringified IP address to
  58887. g_proxy_connect() or g_proxy_connect_async().</doc>
  58888. <return-value transfer-ownership="none">
  58889. <doc xml:space="preserve">%TRUE if hostname resolution is supported.</doc>
  58890. <type name="gboolean" c:type="gboolean"/>
  58891. </return-value>
  58892. <parameters>
  58893. <instance-parameter name="proxy" transfer-ownership="none">
  58894. <doc xml:space="preserve">a #GProxy</doc>
  58895. <type name="Proxy" c:type="GProxy*"/>
  58896. </instance-parameter>
  58897. </parameters>
  58898. </method>
  58899. </interface>
  58900. <class name="ProxyAddress"
  58901. c:symbol-prefix="proxy_address"
  58902. c:type="GProxyAddress"
  58903. version="2.26"
  58904. parent="InetSocketAddress"
  58905. glib:type-name="GProxyAddress"
  58906. glib:get-type="g_proxy_address_get_type"
  58907. glib:type-struct="ProxyAddressClass">
  58908. <doc xml:space="preserve">Support for proxied #GInetSocketAddress.</doc>
  58909. <implements name="SocketConnectable"/>
  58910. <constructor name="new"
  58911. c:identifier="g_proxy_address_new"
  58912. version="2.26">
  58913. <doc xml:space="preserve">Creates a new #GProxyAddress for @inetaddr with @protocol that should
  58914. tunnel through @dest_hostname and @dest_port.
  58915. (Note that this method doesn't set the #GProxyAddress:uri or
  58916. #GProxyAddress:destination-protocol fields; use g_object_new()
  58917. directly if you want to set those.)</doc>
  58918. <return-value transfer-ownership="full">
  58919. <doc xml:space="preserve">a new #GProxyAddress</doc>
  58920. <type name="SocketAddress" c:type="GSocketAddress*"/>
  58921. </return-value>
  58922. <parameters>
  58923. <parameter name="inetaddr" transfer-ownership="none">
  58924. <doc xml:space="preserve">The proxy server #GInetAddress.</doc>
  58925. <type name="InetAddress" c:type="GInetAddress*"/>
  58926. </parameter>
  58927. <parameter name="port" transfer-ownership="none">
  58928. <doc xml:space="preserve">The proxy server port.</doc>
  58929. <type name="guint16" c:type="guint16"/>
  58930. </parameter>
  58931. <parameter name="protocol" transfer-ownership="none">
  58932. <doc xml:space="preserve">The proxy protocol to support, in lower case (e.g. socks, http).</doc>
  58933. <type name="utf8" c:type="const gchar*"/>
  58934. </parameter>
  58935. <parameter name="dest_hostname" transfer-ownership="none">
  58936. <doc xml:space="preserve">The destination hostname the proxy should tunnel to.</doc>
  58937. <type name="utf8" c:type="const gchar*"/>
  58938. </parameter>
  58939. <parameter name="dest_port" transfer-ownership="none">
  58940. <doc xml:space="preserve">The destination port to tunnel to.</doc>
  58941. <type name="guint16" c:type="guint16"/>
  58942. </parameter>
  58943. <parameter name="username"
  58944. transfer-ownership="none"
  58945. nullable="1"
  58946. allow-none="1">
  58947. <doc xml:space="preserve">The username to authenticate to the proxy server
  58948. (or %NULL).</doc>
  58949. <type name="utf8" c:type="const gchar*"/>
  58950. </parameter>
  58951. <parameter name="password"
  58952. transfer-ownership="none"
  58953. nullable="1"
  58954. allow-none="1">
  58955. <doc xml:space="preserve">The password to authenticate to the proxy server
  58956. (or %NULL).</doc>
  58957. <type name="utf8" c:type="const gchar*"/>
  58958. </parameter>
  58959. </parameters>
  58960. </constructor>
  58961. <method name="get_destination_hostname"
  58962. c:identifier="g_proxy_address_get_destination_hostname"
  58963. version="2.26">
  58964. <doc xml:space="preserve">Gets @proxy's destination hostname; that is, the name of the host
  58965. that will be connected to via the proxy, not the name of the proxy
  58966. itself.</doc>
  58967. <return-value transfer-ownership="none">
  58968. <doc xml:space="preserve">the @proxy's destination hostname</doc>
  58969. <type name="utf8" c:type="const gchar*"/>
  58970. </return-value>
  58971. <parameters>
  58972. <instance-parameter name="proxy" transfer-ownership="none">
  58973. <doc xml:space="preserve">a #GProxyAddress</doc>
  58974. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  58975. </instance-parameter>
  58976. </parameters>
  58977. </method>
  58978. <method name="get_destination_port"
  58979. c:identifier="g_proxy_address_get_destination_port"
  58980. version="2.26">
  58981. <doc xml:space="preserve">Gets @proxy's destination port; that is, the port on the
  58982. destination host that will be connected to via the proxy, not the
  58983. port number of the proxy itself.</doc>
  58984. <return-value transfer-ownership="none">
  58985. <doc xml:space="preserve">the @proxy's destination port</doc>
  58986. <type name="guint16" c:type="guint16"/>
  58987. </return-value>
  58988. <parameters>
  58989. <instance-parameter name="proxy" transfer-ownership="none">
  58990. <doc xml:space="preserve">a #GProxyAddress</doc>
  58991. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  58992. </instance-parameter>
  58993. </parameters>
  58994. </method>
  58995. <method name="get_destination_protocol"
  58996. c:identifier="g_proxy_address_get_destination_protocol"
  58997. version="2.34">
  58998. <doc xml:space="preserve">Gets the protocol that is being spoken to the destination
  58999. server; eg, "http" or "ftp".</doc>
  59000. <return-value transfer-ownership="none">
  59001. <doc xml:space="preserve">the @proxy's destination protocol</doc>
  59002. <type name="utf8" c:type="const gchar*"/>
  59003. </return-value>
  59004. <parameters>
  59005. <instance-parameter name="proxy" transfer-ownership="none">
  59006. <doc xml:space="preserve">a #GProxyAddress</doc>
  59007. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  59008. </instance-parameter>
  59009. </parameters>
  59010. </method>
  59011. <method name="get_password"
  59012. c:identifier="g_proxy_address_get_password"
  59013. version="2.26">
  59014. <doc xml:space="preserve">Gets @proxy's password.</doc>
  59015. <return-value transfer-ownership="none">
  59016. <doc xml:space="preserve">the @proxy's password</doc>
  59017. <type name="utf8" c:type="const gchar*"/>
  59018. </return-value>
  59019. <parameters>
  59020. <instance-parameter name="proxy" transfer-ownership="none">
  59021. <doc xml:space="preserve">a #GProxyAddress</doc>
  59022. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  59023. </instance-parameter>
  59024. </parameters>
  59025. </method>
  59026. <method name="get_protocol"
  59027. c:identifier="g_proxy_address_get_protocol"
  59028. version="2.26">
  59029. <doc xml:space="preserve">Gets @proxy's protocol. eg, "socks" or "http"</doc>
  59030. <return-value transfer-ownership="none">
  59031. <doc xml:space="preserve">the @proxy's protocol</doc>
  59032. <type name="utf8" c:type="const gchar*"/>
  59033. </return-value>
  59034. <parameters>
  59035. <instance-parameter name="proxy" transfer-ownership="none">
  59036. <doc xml:space="preserve">a #GProxyAddress</doc>
  59037. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  59038. </instance-parameter>
  59039. </parameters>
  59040. </method>
  59041. <method name="get_uri"
  59042. c:identifier="g_proxy_address_get_uri"
  59043. version="2.34">
  59044. <doc xml:space="preserve">Gets the proxy URI that @proxy was constructed from.</doc>
  59045. <return-value transfer-ownership="none">
  59046. <doc xml:space="preserve">the @proxy's URI, or %NULL if unknown</doc>
  59047. <type name="utf8" c:type="const gchar*"/>
  59048. </return-value>
  59049. <parameters>
  59050. <instance-parameter name="proxy" transfer-ownership="none">
  59051. <doc xml:space="preserve">a #GProxyAddress</doc>
  59052. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  59053. </instance-parameter>
  59054. </parameters>
  59055. </method>
  59056. <method name="get_username"
  59057. c:identifier="g_proxy_address_get_username"
  59058. version="2.26">
  59059. <doc xml:space="preserve">Gets @proxy's username.</doc>
  59060. <return-value transfer-ownership="none">
  59061. <doc xml:space="preserve">the @proxy's username</doc>
  59062. <type name="utf8" c:type="const gchar*"/>
  59063. </return-value>
  59064. <parameters>
  59065. <instance-parameter name="proxy" transfer-ownership="none">
  59066. <doc xml:space="preserve">a #GProxyAddress</doc>
  59067. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  59068. </instance-parameter>
  59069. </parameters>
  59070. </method>
  59071. <property name="destination-hostname"
  59072. writable="1"
  59073. construct-only="1"
  59074. transfer-ownership="none">
  59075. <type name="utf8" c:type="gchar*"/>
  59076. </property>
  59077. <property name="destination-port"
  59078. writable="1"
  59079. construct-only="1"
  59080. transfer-ownership="none">
  59081. <type name="guint" c:type="guint"/>
  59082. </property>
  59083. <property name="destination-protocol"
  59084. version="2.34"
  59085. writable="1"
  59086. construct-only="1"
  59087. transfer-ownership="none">
  59088. <doc xml:space="preserve">The protocol being spoke to the destination host, or %NULL if
  59089. the #GProxyAddress doesn't know.</doc>
  59090. <type name="utf8" c:type="gchar*"/>
  59091. </property>
  59092. <property name="password"
  59093. writable="1"
  59094. construct-only="1"
  59095. transfer-ownership="none">
  59096. <type name="utf8" c:type="gchar*"/>
  59097. </property>
  59098. <property name="protocol"
  59099. writable="1"
  59100. construct-only="1"
  59101. transfer-ownership="none">
  59102. <type name="utf8" c:type="gchar*"/>
  59103. </property>
  59104. <property name="uri"
  59105. version="2.34"
  59106. writable="1"
  59107. construct-only="1"
  59108. transfer-ownership="none">
  59109. <doc xml:space="preserve">The URI string that the proxy was constructed from (or %NULL
  59110. if the creator didn't specify this).</doc>
  59111. <type name="utf8" c:type="gchar*"/>
  59112. </property>
  59113. <property name="username"
  59114. writable="1"
  59115. construct-only="1"
  59116. transfer-ownership="none">
  59117. <type name="utf8" c:type="gchar*"/>
  59118. </property>
  59119. <field name="parent_instance">
  59120. <type name="InetSocketAddress" c:type="GInetSocketAddress"/>
  59121. </field>
  59122. <field name="priv" readable="0" private="1">
  59123. <type name="ProxyAddressPrivate" c:type="GProxyAddressPrivate*"/>
  59124. </field>
  59125. </class>
  59126. <record name="ProxyAddressClass"
  59127. c:type="GProxyAddressClass"
  59128. glib:is-gtype-struct-for="ProxyAddress"
  59129. version="2.26">
  59130. <doc xml:space="preserve">Class structure for #GProxyAddress.</doc>
  59131. <field name="parent_class">
  59132. <type name="InetSocketAddressClass" c:type="GInetSocketAddressClass"/>
  59133. </field>
  59134. </record>
  59135. <class name="ProxyAddressEnumerator"
  59136. c:symbol-prefix="proxy_address_enumerator"
  59137. c:type="GProxyAddressEnumerator"
  59138. parent="SocketAddressEnumerator"
  59139. glib:type-name="GProxyAddressEnumerator"
  59140. glib:get-type="g_proxy_address_enumerator_get_type"
  59141. glib:type-struct="ProxyAddressEnumeratorClass">
  59142. <doc xml:space="preserve">A subclass of #GSocketAddressEnumerator that takes another address
  59143. enumerator and wraps its results in #GProxyAddress&lt;!-- --&gt;es as
  59144. directed by the default #GProxyResolver.</doc>
  59145. <property name="connectable"
  59146. writable="1"
  59147. construct-only="1"
  59148. transfer-ownership="none">
  59149. <type name="SocketConnectable"/>
  59150. </property>
  59151. <property name="default-port"
  59152. version="2.38"
  59153. writable="1"
  59154. construct-only="1"
  59155. transfer-ownership="none">
  59156. <doc xml:space="preserve">The default port to use if #GProxyAddressEnumerator:uri does not
  59157. specify one.</doc>
  59158. <type name="guint" c:type="guint"/>
  59159. </property>
  59160. <property name="proxy-resolver"
  59161. version="2.36"
  59162. writable="1"
  59163. construct="1"
  59164. transfer-ownership="none">
  59165. <doc xml:space="preserve">The proxy resolver to use.</doc>
  59166. <type name="ProxyResolver"/>
  59167. </property>
  59168. <property name="uri"
  59169. writable="1"
  59170. construct-only="1"
  59171. transfer-ownership="none">
  59172. <type name="utf8" c:type="gchar*"/>
  59173. </property>
  59174. <field name="parent_instance">
  59175. <type name="SocketAddressEnumerator"
  59176. c:type="GSocketAddressEnumerator"/>
  59177. </field>
  59178. <field name="priv">
  59179. <type name="ProxyAddressEnumeratorPrivate"
  59180. c:type="GProxyAddressEnumeratorPrivate*"/>
  59181. </field>
  59182. </class>
  59183. <record name="ProxyAddressEnumeratorClass"
  59184. c:type="GProxyAddressEnumeratorClass"
  59185. glib:is-gtype-struct-for="ProxyAddressEnumerator">
  59186. <field name="parent_class">
  59187. <type name="SocketAddressEnumeratorClass"
  59188. c:type="GSocketAddressEnumeratorClass"/>
  59189. </field>
  59190. <field name="_g_reserved1" introspectable="0">
  59191. <callback name="_g_reserved1">
  59192. <return-value transfer-ownership="none">
  59193. <type name="none" c:type="void"/>
  59194. </return-value>
  59195. </callback>
  59196. </field>
  59197. <field name="_g_reserved2" introspectable="0">
  59198. <callback name="_g_reserved2">
  59199. <return-value transfer-ownership="none">
  59200. <type name="none" c:type="void"/>
  59201. </return-value>
  59202. </callback>
  59203. </field>
  59204. <field name="_g_reserved3" introspectable="0">
  59205. <callback name="_g_reserved3">
  59206. <return-value transfer-ownership="none">
  59207. <type name="none" c:type="void"/>
  59208. </return-value>
  59209. </callback>
  59210. </field>
  59211. <field name="_g_reserved4" introspectable="0">
  59212. <callback name="_g_reserved4">
  59213. <return-value transfer-ownership="none">
  59214. <type name="none" c:type="void"/>
  59215. </return-value>
  59216. </callback>
  59217. </field>
  59218. <field name="_g_reserved5" introspectable="0">
  59219. <callback name="_g_reserved5">
  59220. <return-value transfer-ownership="none">
  59221. <type name="none" c:type="void"/>
  59222. </return-value>
  59223. </callback>
  59224. </field>
  59225. <field name="_g_reserved6" introspectable="0">
  59226. <callback name="_g_reserved6">
  59227. <return-value transfer-ownership="none">
  59228. <type name="none" c:type="void"/>
  59229. </return-value>
  59230. </callback>
  59231. </field>
  59232. <field name="_g_reserved7" introspectable="0">
  59233. <callback name="_g_reserved7">
  59234. <return-value transfer-ownership="none">
  59235. <type name="none" c:type="void"/>
  59236. </return-value>
  59237. </callback>
  59238. </field>
  59239. </record>
  59240. <record name="ProxyAddressEnumeratorPrivate"
  59241. c:type="GProxyAddressEnumeratorPrivate"
  59242. disguised="1">
  59243. </record>
  59244. <record name="ProxyAddressPrivate"
  59245. c:type="GProxyAddressPrivate"
  59246. disguised="1">
  59247. </record>
  59248. <record name="ProxyInterface"
  59249. c:type="GProxyInterface"
  59250. glib:is-gtype-struct-for="Proxy"
  59251. version="2.26">
  59252. <doc xml:space="preserve">Provides an interface for handling proxy connection and payload.</doc>
  59253. <field name="g_iface">
  59254. <doc xml:space="preserve">The parent interface.</doc>
  59255. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  59256. </field>
  59257. <field name="connect">
  59258. <callback name="connect" throws="1">
  59259. <return-value transfer-ownership="full">
  59260. <doc xml:space="preserve">a #GIOStream that will replace @connection. This might
  59261. be the same as @connection, in which case a reference
  59262. will be added.</doc>
  59263. <type name="IOStream" c:type="GIOStream*"/>
  59264. </return-value>
  59265. <parameters>
  59266. <parameter name="proxy" transfer-ownership="none">
  59267. <doc xml:space="preserve">a #GProxy</doc>
  59268. <type name="Proxy" c:type="GProxy*"/>
  59269. </parameter>
  59270. <parameter name="connection" transfer-ownership="none">
  59271. <doc xml:space="preserve">a #GIOStream</doc>
  59272. <type name="IOStream" c:type="GIOStream*"/>
  59273. </parameter>
  59274. <parameter name="proxy_address" transfer-ownership="none">
  59275. <doc xml:space="preserve">a #GProxyAddress</doc>
  59276. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  59277. </parameter>
  59278. <parameter name="cancellable"
  59279. transfer-ownership="none"
  59280. nullable="1"
  59281. allow-none="1">
  59282. <doc xml:space="preserve">a #GCancellable</doc>
  59283. <type name="Cancellable" c:type="GCancellable*"/>
  59284. </parameter>
  59285. </parameters>
  59286. </callback>
  59287. </field>
  59288. <field name="connect_async">
  59289. <callback name="connect_async">
  59290. <return-value transfer-ownership="none">
  59291. <type name="none" c:type="void"/>
  59292. </return-value>
  59293. <parameters>
  59294. <parameter name="proxy" transfer-ownership="none">
  59295. <doc xml:space="preserve">a #GProxy</doc>
  59296. <type name="Proxy" c:type="GProxy*"/>
  59297. </parameter>
  59298. <parameter name="connection" transfer-ownership="none">
  59299. <doc xml:space="preserve">a #GIOStream</doc>
  59300. <type name="IOStream" c:type="GIOStream*"/>
  59301. </parameter>
  59302. <parameter name="proxy_address" transfer-ownership="none">
  59303. <doc xml:space="preserve">a #GProxyAddress</doc>
  59304. <type name="ProxyAddress" c:type="GProxyAddress*"/>
  59305. </parameter>
  59306. <parameter name="cancellable"
  59307. transfer-ownership="none"
  59308. nullable="1"
  59309. allow-none="1">
  59310. <doc xml:space="preserve">a #GCancellable</doc>
  59311. <type name="Cancellable" c:type="GCancellable*"/>
  59312. </parameter>
  59313. <parameter name="callback"
  59314. transfer-ownership="none"
  59315. nullable="1"
  59316. allow-none="1"
  59317. scope="async"
  59318. closure="5">
  59319. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  59320. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  59321. </parameter>
  59322. <parameter name="user_data"
  59323. transfer-ownership="none"
  59324. nullable="1"
  59325. allow-none="1"
  59326. closure="5">
  59327. <doc xml:space="preserve">callback data</doc>
  59328. <type name="gpointer" c:type="gpointer"/>
  59329. </parameter>
  59330. </parameters>
  59331. </callback>
  59332. </field>
  59333. <field name="connect_finish">
  59334. <callback name="connect_finish" throws="1">
  59335. <return-value transfer-ownership="full">
  59336. <doc xml:space="preserve">a #GIOStream.</doc>
  59337. <type name="IOStream" c:type="GIOStream*"/>
  59338. </return-value>
  59339. <parameters>
  59340. <parameter name="proxy" transfer-ownership="none">
  59341. <doc xml:space="preserve">a #GProxy</doc>
  59342. <type name="Proxy" c:type="GProxy*"/>
  59343. </parameter>
  59344. <parameter name="result" transfer-ownership="none">
  59345. <doc xml:space="preserve">a #GAsyncResult</doc>
  59346. <type name="AsyncResult" c:type="GAsyncResult*"/>
  59347. </parameter>
  59348. </parameters>
  59349. </callback>
  59350. </field>
  59351. <field name="supports_hostname">
  59352. <callback name="supports_hostname">
  59353. <return-value transfer-ownership="none">
  59354. <doc xml:space="preserve">%TRUE if hostname resolution is supported.</doc>
  59355. <type name="gboolean" c:type="gboolean"/>
  59356. </return-value>
  59357. <parameters>
  59358. <parameter name="proxy" transfer-ownership="none">
  59359. <doc xml:space="preserve">a #GProxy</doc>
  59360. <type name="Proxy" c:type="GProxy*"/>
  59361. </parameter>
  59362. </parameters>
  59363. </callback>
  59364. </field>
  59365. </record>
  59366. <interface name="ProxyResolver"
  59367. c:symbol-prefix="proxy_resolver"
  59368. c:type="GProxyResolver"
  59369. version="2.26"
  59370. glib:type-name="GProxyResolver"
  59371. glib:get-type="g_proxy_resolver_get_type"
  59372. glib:type-struct="ProxyResolverInterface">
  59373. <doc xml:space="preserve">#GProxyResolver provides synchronous and asynchronous network proxy
  59374. resolution. #GProxyResolver is used within #GSocketClient through
  59375. the method g_socket_connectable_proxy_enumerate().</doc>
  59376. <function name="get_default"
  59377. c:identifier="g_proxy_resolver_get_default"
  59378. version="2.26">
  59379. <doc xml:space="preserve">Gets the default #GProxyResolver for the system.</doc>
  59380. <return-value transfer-ownership="none">
  59381. <doc xml:space="preserve">the default #GProxyResolver.</doc>
  59382. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59383. </return-value>
  59384. </function>
  59385. <virtual-method name="is_supported"
  59386. invoker="is_supported"
  59387. version="2.26">
  59388. <doc xml:space="preserve">Checks if @resolver can be used on this system. (This is used
  59389. internally; g_proxy_resolver_get_default() will only return a proxy
  59390. resolver that returns %TRUE for this method.)</doc>
  59391. <return-value transfer-ownership="none">
  59392. <doc xml:space="preserve">%TRUE if @resolver is supported.</doc>
  59393. <type name="gboolean" c:type="gboolean"/>
  59394. </return-value>
  59395. <parameters>
  59396. <instance-parameter name="resolver" transfer-ownership="none">
  59397. <doc xml:space="preserve">a #GProxyResolver</doc>
  59398. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59399. </instance-parameter>
  59400. </parameters>
  59401. </virtual-method>
  59402. <virtual-method name="lookup" invoker="lookup" version="2.26" throws="1">
  59403. <doc xml:space="preserve">Looks into the system proxy configuration to determine what proxy,
  59404. if any, to use to connect to @uri. The returned proxy URIs are of
  59405. the form `&lt;protocol&gt;://[user[:password]@]host:port` or
  59406. `direct://`, where &lt;protocol&gt; could be http, rtsp, socks
  59407. or other proxying protocol.
  59408. If you don't know what network protocol is being used on the
  59409. socket, you should use `none` as the URI protocol.
  59410. In this case, the resolver might still return a generic proxy type
  59411. (such as SOCKS), but would not return protocol-specific proxy types
  59412. (such as http).
  59413. `direct://` is used when no proxy is needed.
  59414. Direct connection should not be attempted unless it is part of the
  59415. returned array of proxies.</doc>
  59416. <return-value transfer-ownership="full">
  59417. <doc xml:space="preserve">A
  59418. NULL-terminated array of proxy URIs. Must be freed
  59419. with g_strfreev().</doc>
  59420. <array c:type="gchar**">
  59421. <type name="utf8"/>
  59422. </array>
  59423. </return-value>
  59424. <parameters>
  59425. <instance-parameter name="resolver" transfer-ownership="none">
  59426. <doc xml:space="preserve">a #GProxyResolver</doc>
  59427. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59428. </instance-parameter>
  59429. <parameter name="uri" transfer-ownership="none">
  59430. <doc xml:space="preserve">a URI representing the destination to connect to</doc>
  59431. <type name="utf8" c:type="const gchar*"/>
  59432. </parameter>
  59433. <parameter name="cancellable"
  59434. transfer-ownership="none"
  59435. nullable="1"
  59436. allow-none="1">
  59437. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  59438. <type name="Cancellable" c:type="GCancellable*"/>
  59439. </parameter>
  59440. </parameters>
  59441. </virtual-method>
  59442. <virtual-method name="lookup_async"
  59443. invoker="lookup_async"
  59444. version="2.26">
  59445. <doc xml:space="preserve">Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
  59446. details.</doc>
  59447. <return-value transfer-ownership="none">
  59448. <type name="none" c:type="void"/>
  59449. </return-value>
  59450. <parameters>
  59451. <instance-parameter name="resolver" transfer-ownership="none">
  59452. <doc xml:space="preserve">a #GProxyResolver</doc>
  59453. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59454. </instance-parameter>
  59455. <parameter name="uri" transfer-ownership="none">
  59456. <doc xml:space="preserve">a URI representing the destination to connect to</doc>
  59457. <type name="utf8" c:type="const gchar*"/>
  59458. </parameter>
  59459. <parameter name="cancellable"
  59460. transfer-ownership="none"
  59461. nullable="1"
  59462. allow-none="1">
  59463. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  59464. <type name="Cancellable" c:type="GCancellable*"/>
  59465. </parameter>
  59466. <parameter name="callback"
  59467. transfer-ownership="none"
  59468. nullable="1"
  59469. allow-none="1"
  59470. scope="async"
  59471. closure="3">
  59472. <doc xml:space="preserve">callback to call after resolution completes</doc>
  59473. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  59474. </parameter>
  59475. <parameter name="user_data"
  59476. transfer-ownership="none"
  59477. nullable="1"
  59478. allow-none="1"
  59479. closure="3">
  59480. <doc xml:space="preserve">data for @callback</doc>
  59481. <type name="gpointer" c:type="gpointer"/>
  59482. </parameter>
  59483. </parameters>
  59484. </virtual-method>
  59485. <virtual-method name="lookup_finish"
  59486. invoker="lookup_finish"
  59487. version="2.26"
  59488. throws="1">
  59489. <doc xml:space="preserve">Call this function to obtain the array of proxy URIs when
  59490. g_proxy_resolver_lookup_async() is complete. See
  59491. g_proxy_resolver_lookup() for more details.</doc>
  59492. <return-value transfer-ownership="full">
  59493. <doc xml:space="preserve">A
  59494. NULL-terminated array of proxy URIs. Must be freed
  59495. with g_strfreev().</doc>
  59496. <array c:type="gchar**">
  59497. <type name="utf8"/>
  59498. </array>
  59499. </return-value>
  59500. <parameters>
  59501. <instance-parameter name="resolver" transfer-ownership="none">
  59502. <doc xml:space="preserve">a #GProxyResolver</doc>
  59503. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59504. </instance-parameter>
  59505. <parameter name="result" transfer-ownership="none">
  59506. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  59507. <type name="AsyncResult" c:type="GAsyncResult*"/>
  59508. </parameter>
  59509. </parameters>
  59510. </virtual-method>
  59511. <method name="is_supported"
  59512. c:identifier="g_proxy_resolver_is_supported"
  59513. version="2.26">
  59514. <doc xml:space="preserve">Checks if @resolver can be used on this system. (This is used
  59515. internally; g_proxy_resolver_get_default() will only return a proxy
  59516. resolver that returns %TRUE for this method.)</doc>
  59517. <return-value transfer-ownership="none">
  59518. <doc xml:space="preserve">%TRUE if @resolver is supported.</doc>
  59519. <type name="gboolean" c:type="gboolean"/>
  59520. </return-value>
  59521. <parameters>
  59522. <instance-parameter name="resolver" transfer-ownership="none">
  59523. <doc xml:space="preserve">a #GProxyResolver</doc>
  59524. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59525. </instance-parameter>
  59526. </parameters>
  59527. </method>
  59528. <method name="lookup"
  59529. c:identifier="g_proxy_resolver_lookup"
  59530. version="2.26"
  59531. throws="1">
  59532. <doc xml:space="preserve">Looks into the system proxy configuration to determine what proxy,
  59533. if any, to use to connect to @uri. The returned proxy URIs are of
  59534. the form `&lt;protocol&gt;://[user[:password]@]host:port` or
  59535. `direct://`, where &lt;protocol&gt; could be http, rtsp, socks
  59536. or other proxying protocol.
  59537. If you don't know what network protocol is being used on the
  59538. socket, you should use `none` as the URI protocol.
  59539. In this case, the resolver might still return a generic proxy type
  59540. (such as SOCKS), but would not return protocol-specific proxy types
  59541. (such as http).
  59542. `direct://` is used when no proxy is needed.
  59543. Direct connection should not be attempted unless it is part of the
  59544. returned array of proxies.</doc>
  59545. <return-value transfer-ownership="full">
  59546. <doc xml:space="preserve">A
  59547. NULL-terminated array of proxy URIs. Must be freed
  59548. with g_strfreev().</doc>
  59549. <array c:type="gchar**">
  59550. <type name="utf8"/>
  59551. </array>
  59552. </return-value>
  59553. <parameters>
  59554. <instance-parameter name="resolver" transfer-ownership="none">
  59555. <doc xml:space="preserve">a #GProxyResolver</doc>
  59556. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59557. </instance-parameter>
  59558. <parameter name="uri" transfer-ownership="none">
  59559. <doc xml:space="preserve">a URI representing the destination to connect to</doc>
  59560. <type name="utf8" c:type="const gchar*"/>
  59561. </parameter>
  59562. <parameter name="cancellable"
  59563. transfer-ownership="none"
  59564. nullable="1"
  59565. allow-none="1">
  59566. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  59567. <type name="Cancellable" c:type="GCancellable*"/>
  59568. </parameter>
  59569. </parameters>
  59570. </method>
  59571. <method name="lookup_async"
  59572. c:identifier="g_proxy_resolver_lookup_async"
  59573. version="2.26">
  59574. <doc xml:space="preserve">Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
  59575. details.</doc>
  59576. <return-value transfer-ownership="none">
  59577. <type name="none" c:type="void"/>
  59578. </return-value>
  59579. <parameters>
  59580. <instance-parameter name="resolver" transfer-ownership="none">
  59581. <doc xml:space="preserve">a #GProxyResolver</doc>
  59582. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59583. </instance-parameter>
  59584. <parameter name="uri" transfer-ownership="none">
  59585. <doc xml:space="preserve">a URI representing the destination to connect to</doc>
  59586. <type name="utf8" c:type="const gchar*"/>
  59587. </parameter>
  59588. <parameter name="cancellable"
  59589. transfer-ownership="none"
  59590. nullable="1"
  59591. allow-none="1">
  59592. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  59593. <type name="Cancellable" c:type="GCancellable*"/>
  59594. </parameter>
  59595. <parameter name="callback"
  59596. transfer-ownership="none"
  59597. nullable="1"
  59598. allow-none="1"
  59599. scope="async"
  59600. closure="3">
  59601. <doc xml:space="preserve">callback to call after resolution completes</doc>
  59602. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  59603. </parameter>
  59604. <parameter name="user_data"
  59605. transfer-ownership="none"
  59606. nullable="1"
  59607. allow-none="1">
  59608. <doc xml:space="preserve">data for @callback</doc>
  59609. <type name="gpointer" c:type="gpointer"/>
  59610. </parameter>
  59611. </parameters>
  59612. </method>
  59613. <method name="lookup_finish"
  59614. c:identifier="g_proxy_resolver_lookup_finish"
  59615. version="2.26"
  59616. throws="1">
  59617. <doc xml:space="preserve">Call this function to obtain the array of proxy URIs when
  59618. g_proxy_resolver_lookup_async() is complete. See
  59619. g_proxy_resolver_lookup() for more details.</doc>
  59620. <return-value transfer-ownership="full">
  59621. <doc xml:space="preserve">A
  59622. NULL-terminated array of proxy URIs. Must be freed
  59623. with g_strfreev().</doc>
  59624. <array c:type="gchar**">
  59625. <type name="utf8"/>
  59626. </array>
  59627. </return-value>
  59628. <parameters>
  59629. <instance-parameter name="resolver" transfer-ownership="none">
  59630. <doc xml:space="preserve">a #GProxyResolver</doc>
  59631. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59632. </instance-parameter>
  59633. <parameter name="result" transfer-ownership="none">
  59634. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  59635. <type name="AsyncResult" c:type="GAsyncResult*"/>
  59636. </parameter>
  59637. </parameters>
  59638. </method>
  59639. </interface>
  59640. <record name="ProxyResolverInterface"
  59641. c:type="GProxyResolverInterface"
  59642. glib:is-gtype-struct-for="ProxyResolver">
  59643. <doc xml:space="preserve">The virtual function table for #GProxyResolver.</doc>
  59644. <field name="g_iface">
  59645. <doc xml:space="preserve">The parent interface.</doc>
  59646. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  59647. </field>
  59648. <field name="is_supported">
  59649. <callback name="is_supported">
  59650. <return-value transfer-ownership="none">
  59651. <doc xml:space="preserve">%TRUE if @resolver is supported.</doc>
  59652. <type name="gboolean" c:type="gboolean"/>
  59653. </return-value>
  59654. <parameters>
  59655. <parameter name="resolver" transfer-ownership="none">
  59656. <doc xml:space="preserve">a #GProxyResolver</doc>
  59657. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59658. </parameter>
  59659. </parameters>
  59660. </callback>
  59661. </field>
  59662. <field name="lookup">
  59663. <callback name="lookup" throws="1">
  59664. <return-value transfer-ownership="full">
  59665. <doc xml:space="preserve">A
  59666. NULL-terminated array of proxy URIs. Must be freed
  59667. with g_strfreev().</doc>
  59668. <array c:type="gchar**">
  59669. <type name="utf8"/>
  59670. </array>
  59671. </return-value>
  59672. <parameters>
  59673. <parameter name="resolver" transfer-ownership="none">
  59674. <doc xml:space="preserve">a #GProxyResolver</doc>
  59675. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59676. </parameter>
  59677. <parameter name="uri" transfer-ownership="none">
  59678. <doc xml:space="preserve">a URI representing the destination to connect to</doc>
  59679. <type name="utf8" c:type="const gchar*"/>
  59680. </parameter>
  59681. <parameter name="cancellable"
  59682. transfer-ownership="none"
  59683. nullable="1"
  59684. allow-none="1">
  59685. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  59686. <type name="Cancellable" c:type="GCancellable*"/>
  59687. </parameter>
  59688. </parameters>
  59689. </callback>
  59690. </field>
  59691. <field name="lookup_async">
  59692. <callback name="lookup_async">
  59693. <return-value transfer-ownership="none">
  59694. <type name="none" c:type="void"/>
  59695. </return-value>
  59696. <parameters>
  59697. <parameter name="resolver" transfer-ownership="none">
  59698. <doc xml:space="preserve">a #GProxyResolver</doc>
  59699. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59700. </parameter>
  59701. <parameter name="uri" transfer-ownership="none">
  59702. <doc xml:space="preserve">a URI representing the destination to connect to</doc>
  59703. <type name="utf8" c:type="const gchar*"/>
  59704. </parameter>
  59705. <parameter name="cancellable"
  59706. transfer-ownership="none"
  59707. nullable="1"
  59708. allow-none="1">
  59709. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  59710. <type name="Cancellable" c:type="GCancellable*"/>
  59711. </parameter>
  59712. <parameter name="callback"
  59713. transfer-ownership="none"
  59714. nullable="1"
  59715. allow-none="1"
  59716. scope="async"
  59717. closure="4">
  59718. <doc xml:space="preserve">callback to call after resolution completes</doc>
  59719. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  59720. </parameter>
  59721. <parameter name="user_data"
  59722. transfer-ownership="none"
  59723. nullable="1"
  59724. allow-none="1"
  59725. closure="4">
  59726. <doc xml:space="preserve">data for @callback</doc>
  59727. <type name="gpointer" c:type="gpointer"/>
  59728. </parameter>
  59729. </parameters>
  59730. </callback>
  59731. </field>
  59732. <field name="lookup_finish">
  59733. <callback name="lookup_finish" throws="1">
  59734. <return-value transfer-ownership="full">
  59735. <doc xml:space="preserve">A
  59736. NULL-terminated array of proxy URIs. Must be freed
  59737. with g_strfreev().</doc>
  59738. <array c:type="gchar**">
  59739. <type name="utf8"/>
  59740. </array>
  59741. </return-value>
  59742. <parameters>
  59743. <parameter name="resolver" transfer-ownership="none">
  59744. <doc xml:space="preserve">a #GProxyResolver</doc>
  59745. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  59746. </parameter>
  59747. <parameter name="result" transfer-ownership="none">
  59748. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  59749. <type name="AsyncResult" c:type="GAsyncResult*"/>
  59750. </parameter>
  59751. </parameters>
  59752. </callback>
  59753. </field>
  59754. </record>
  59755. <callback name="ReallocFunc" c:type="GReallocFunc">
  59756. <doc xml:space="preserve">Changes the size of the memory block pointed to by @data to
  59757. @size bytes.
  59758. The function should have the same semantics as realloc().</doc>
  59759. <return-value transfer-ownership="none" nullable="1">
  59760. <doc xml:space="preserve">a pointer to the reallocated memory</doc>
  59761. <type name="gpointer" c:type="gpointer"/>
  59762. </return-value>
  59763. <parameters>
  59764. <parameter name="data"
  59765. transfer-ownership="none"
  59766. nullable="1"
  59767. allow-none="1">
  59768. <doc xml:space="preserve">memory block to reallocate</doc>
  59769. <type name="gpointer" c:type="gpointer"/>
  59770. </parameter>
  59771. <parameter name="size" transfer-ownership="none">
  59772. <doc xml:space="preserve">size to reallocate @data to</doc>
  59773. <type name="gsize" c:type="gsize"/>
  59774. </parameter>
  59775. </parameters>
  59776. </callback>
  59777. <interface name="RemoteActionGroup"
  59778. c:symbol-prefix="remote_action_group"
  59779. c:type="GRemoteActionGroup"
  59780. glib:type-name="GRemoteActionGroup"
  59781. glib:get-type="g_remote_action_group_get_type"
  59782. glib:type-struct="RemoteActionGroupInterface">
  59783. <doc xml:space="preserve">The GRemoteActionGroup interface is implemented by #GActionGroup
  59784. instances that either transmit action invocations to other processes
  59785. or receive action invocations in the local process from other
  59786. processes.
  59787. The interface has `_full` variants of the two
  59788. methods on #GActionGroup used to activate actions:
  59789. g_action_group_activate_action() and
  59790. g_action_group_change_action_state(). These variants allow a
  59791. "platform data" #GVariant to be specified: a dictionary providing
  59792. context for the action invocation (for example: timestamps, startup
  59793. notification IDs, etc).
  59794. #GDBusActionGroup implements #GRemoteActionGroup. This provides a
  59795. mechanism to send platform data for action invocations over D-Bus.
  59796. Additionally, g_dbus_connection_export_action_group() will check if
  59797. the exported #GActionGroup implements #GRemoteActionGroup and use the
  59798. `_full` variants of the calls if available. This
  59799. provides a mechanism by which to receive platform data for action
  59800. invocations that arrive by way of D-Bus.</doc>
  59801. <prerequisite name="ActionGroup"/>
  59802. <virtual-method name="activate_action_full"
  59803. invoker="activate_action_full"
  59804. version="2.32">
  59805. <doc xml:space="preserve">Activates the remote action.
  59806. This is the same as g_action_group_activate_action() except that it
  59807. allows for provision of "platform data" to be sent along with the
  59808. activation request. This typically contains details such as the user
  59809. interaction timestamp or startup notification information.
  59810. @platform_data must be non-%NULL and must have the type
  59811. %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.</doc>
  59812. <return-value transfer-ownership="none">
  59813. <type name="none" c:type="void"/>
  59814. </return-value>
  59815. <parameters>
  59816. <instance-parameter name="remote" transfer-ownership="none">
  59817. <doc xml:space="preserve">a #GDBusActionGroup</doc>
  59818. <type name="RemoteActionGroup" c:type="GRemoteActionGroup*"/>
  59819. </instance-parameter>
  59820. <parameter name="action_name" transfer-ownership="none">
  59821. <doc xml:space="preserve">the name of the action to activate</doc>
  59822. <type name="utf8" c:type="const gchar*"/>
  59823. </parameter>
  59824. <parameter name="parameter"
  59825. transfer-ownership="none"
  59826. nullable="1"
  59827. allow-none="1">
  59828. <doc xml:space="preserve">the optional parameter to the activation</doc>
  59829. <type name="GLib.Variant" c:type="GVariant*"/>
  59830. </parameter>
  59831. <parameter name="platform_data" transfer-ownership="none">
  59832. <doc xml:space="preserve">the platform data to send</doc>
  59833. <type name="GLib.Variant" c:type="GVariant*"/>
  59834. </parameter>
  59835. </parameters>
  59836. </virtual-method>
  59837. <virtual-method name="change_action_state_full"
  59838. invoker="change_action_state_full"
  59839. version="2.32">
  59840. <doc xml:space="preserve">Changes the state of a remote action.
  59841. This is the same as g_action_group_change_action_state() except that
  59842. it allows for provision of "platform data" to be sent along with the
  59843. state change request. This typically contains details such as the
  59844. user interaction timestamp or startup notification information.
  59845. @platform_data must be non-%NULL and must have the type
  59846. %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.</doc>
  59847. <return-value transfer-ownership="none">
  59848. <type name="none" c:type="void"/>
  59849. </return-value>
  59850. <parameters>
  59851. <instance-parameter name="remote" transfer-ownership="none">
  59852. <doc xml:space="preserve">a #GRemoteActionGroup</doc>
  59853. <type name="RemoteActionGroup" c:type="GRemoteActionGroup*"/>
  59854. </instance-parameter>
  59855. <parameter name="action_name" transfer-ownership="none">
  59856. <doc xml:space="preserve">the name of the action to change the state of</doc>
  59857. <type name="utf8" c:type="const gchar*"/>
  59858. </parameter>
  59859. <parameter name="value" transfer-ownership="none">
  59860. <doc xml:space="preserve">the new requested value for the state</doc>
  59861. <type name="GLib.Variant" c:type="GVariant*"/>
  59862. </parameter>
  59863. <parameter name="platform_data" transfer-ownership="none">
  59864. <doc xml:space="preserve">the platform data to send</doc>
  59865. <type name="GLib.Variant" c:type="GVariant*"/>
  59866. </parameter>
  59867. </parameters>
  59868. </virtual-method>
  59869. <method name="activate_action_full"
  59870. c:identifier="g_remote_action_group_activate_action_full"
  59871. version="2.32">
  59872. <doc xml:space="preserve">Activates the remote action.
  59873. This is the same as g_action_group_activate_action() except that it
  59874. allows for provision of "platform data" to be sent along with the
  59875. activation request. This typically contains details such as the user
  59876. interaction timestamp or startup notification information.
  59877. @platform_data must be non-%NULL and must have the type
  59878. %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.</doc>
  59879. <return-value transfer-ownership="none">
  59880. <type name="none" c:type="void"/>
  59881. </return-value>
  59882. <parameters>
  59883. <instance-parameter name="remote" transfer-ownership="none">
  59884. <doc xml:space="preserve">a #GDBusActionGroup</doc>
  59885. <type name="RemoteActionGroup" c:type="GRemoteActionGroup*"/>
  59886. </instance-parameter>
  59887. <parameter name="action_name" transfer-ownership="none">
  59888. <doc xml:space="preserve">the name of the action to activate</doc>
  59889. <type name="utf8" c:type="const gchar*"/>
  59890. </parameter>
  59891. <parameter name="parameter"
  59892. transfer-ownership="none"
  59893. nullable="1"
  59894. allow-none="1">
  59895. <doc xml:space="preserve">the optional parameter to the activation</doc>
  59896. <type name="GLib.Variant" c:type="GVariant*"/>
  59897. </parameter>
  59898. <parameter name="platform_data" transfer-ownership="none">
  59899. <doc xml:space="preserve">the platform data to send</doc>
  59900. <type name="GLib.Variant" c:type="GVariant*"/>
  59901. </parameter>
  59902. </parameters>
  59903. </method>
  59904. <method name="change_action_state_full"
  59905. c:identifier="g_remote_action_group_change_action_state_full"
  59906. version="2.32">
  59907. <doc xml:space="preserve">Changes the state of a remote action.
  59908. This is the same as g_action_group_change_action_state() except that
  59909. it allows for provision of "platform data" to be sent along with the
  59910. state change request. This typically contains details such as the
  59911. user interaction timestamp or startup notification information.
  59912. @platform_data must be non-%NULL and must have the type
  59913. %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.</doc>
  59914. <return-value transfer-ownership="none">
  59915. <type name="none" c:type="void"/>
  59916. </return-value>
  59917. <parameters>
  59918. <instance-parameter name="remote" transfer-ownership="none">
  59919. <doc xml:space="preserve">a #GRemoteActionGroup</doc>
  59920. <type name="RemoteActionGroup" c:type="GRemoteActionGroup*"/>
  59921. </instance-parameter>
  59922. <parameter name="action_name" transfer-ownership="none">
  59923. <doc xml:space="preserve">the name of the action to change the state of</doc>
  59924. <type name="utf8" c:type="const gchar*"/>
  59925. </parameter>
  59926. <parameter name="value" transfer-ownership="none">
  59927. <doc xml:space="preserve">the new requested value for the state</doc>
  59928. <type name="GLib.Variant" c:type="GVariant*"/>
  59929. </parameter>
  59930. <parameter name="platform_data" transfer-ownership="none">
  59931. <doc xml:space="preserve">the platform data to send</doc>
  59932. <type name="GLib.Variant" c:type="GVariant*"/>
  59933. </parameter>
  59934. </parameters>
  59935. </method>
  59936. </interface>
  59937. <record name="RemoteActionGroupInterface"
  59938. c:type="GRemoteActionGroupInterface"
  59939. glib:is-gtype-struct-for="RemoteActionGroup"
  59940. version="2.32">
  59941. <doc xml:space="preserve">The virtual function table for #GRemoteActionGroup.</doc>
  59942. <field name="g_iface">
  59943. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  59944. </field>
  59945. <field name="activate_action_full">
  59946. <callback name="activate_action_full">
  59947. <return-value transfer-ownership="none">
  59948. <type name="none" c:type="void"/>
  59949. </return-value>
  59950. <parameters>
  59951. <parameter name="remote" transfer-ownership="none">
  59952. <doc xml:space="preserve">a #GDBusActionGroup</doc>
  59953. <type name="RemoteActionGroup" c:type="GRemoteActionGroup*"/>
  59954. </parameter>
  59955. <parameter name="action_name" transfer-ownership="none">
  59956. <doc xml:space="preserve">the name of the action to activate</doc>
  59957. <type name="utf8" c:type="const gchar*"/>
  59958. </parameter>
  59959. <parameter name="parameter"
  59960. transfer-ownership="none"
  59961. nullable="1"
  59962. allow-none="1">
  59963. <doc xml:space="preserve">the optional parameter to the activation</doc>
  59964. <type name="GLib.Variant" c:type="GVariant*"/>
  59965. </parameter>
  59966. <parameter name="platform_data" transfer-ownership="none">
  59967. <doc xml:space="preserve">the platform data to send</doc>
  59968. <type name="GLib.Variant" c:type="GVariant*"/>
  59969. </parameter>
  59970. </parameters>
  59971. </callback>
  59972. </field>
  59973. <field name="change_action_state_full">
  59974. <callback name="change_action_state_full">
  59975. <return-value transfer-ownership="none">
  59976. <type name="none" c:type="void"/>
  59977. </return-value>
  59978. <parameters>
  59979. <parameter name="remote" transfer-ownership="none">
  59980. <doc xml:space="preserve">a #GRemoteActionGroup</doc>
  59981. <type name="RemoteActionGroup" c:type="GRemoteActionGroup*"/>
  59982. </parameter>
  59983. <parameter name="action_name" transfer-ownership="none">
  59984. <doc xml:space="preserve">the name of the action to change the state of</doc>
  59985. <type name="utf8" c:type="const gchar*"/>
  59986. </parameter>
  59987. <parameter name="value" transfer-ownership="none">
  59988. <doc xml:space="preserve">the new requested value for the state</doc>
  59989. <type name="GLib.Variant" c:type="GVariant*"/>
  59990. </parameter>
  59991. <parameter name="platform_data" transfer-ownership="none">
  59992. <doc xml:space="preserve">the platform data to send</doc>
  59993. <type name="GLib.Variant" c:type="GVariant*"/>
  59994. </parameter>
  59995. </parameters>
  59996. </callback>
  59997. </field>
  59998. </record>
  59999. <class name="Resolver"
  60000. c:symbol-prefix="resolver"
  60001. c:type="GResolver"
  60002. parent="GObject.Object"
  60003. glib:type-name="GResolver"
  60004. glib:get-type="g_resolver_get_type"
  60005. glib:type-struct="ResolverClass">
  60006. <doc xml:space="preserve">#GResolver provides cancellable synchronous and asynchronous DNS
  60007. resolution, for hostnames (g_resolver_lookup_by_address(),
  60008. g_resolver_lookup_by_name() and their async variants) and SRV
  60009. (service) records (g_resolver_lookup_service()).
  60010. #GNetworkAddress and #GNetworkService provide wrappers around
  60011. #GResolver functionality that also implement #GSocketConnectable,
  60012. making it easy to connect to a remote host/service.</doc>
  60013. <function name="free_addresses"
  60014. c:identifier="g_resolver_free_addresses"
  60015. version="2.22"
  60016. introspectable="0">
  60017. <doc xml:space="preserve">Frees @addresses (which should be the return value from
  60018. g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
  60019. (This is a convenience method; you can also simply free the results
  60020. by hand.)</doc>
  60021. <return-value transfer-ownership="none">
  60022. <type name="none" c:type="void"/>
  60023. </return-value>
  60024. <parameters>
  60025. <parameter name="addresses" transfer-ownership="none">
  60026. <doc xml:space="preserve">a #GList of #GInetAddress</doc>
  60027. <type name="GLib.List" c:type="GList*">
  60028. <type name="gpointer" c:type="gpointer"/>
  60029. </type>
  60030. </parameter>
  60031. </parameters>
  60032. </function>
  60033. <function name="free_targets"
  60034. c:identifier="g_resolver_free_targets"
  60035. version="2.22"
  60036. introspectable="0">
  60037. <doc xml:space="preserve">Frees @targets (which should be the return value from
  60038. g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
  60039. (This is a convenience method; you can also simply free the
  60040. results by hand.)</doc>
  60041. <return-value transfer-ownership="none">
  60042. <type name="none" c:type="void"/>
  60043. </return-value>
  60044. <parameters>
  60045. <parameter name="targets" transfer-ownership="none">
  60046. <doc xml:space="preserve">a #GList of #GSrvTarget</doc>
  60047. <type name="GLib.List" c:type="GList*">
  60048. <type name="gpointer" c:type="gpointer"/>
  60049. </type>
  60050. </parameter>
  60051. </parameters>
  60052. </function>
  60053. <function name="get_default"
  60054. c:identifier="g_resolver_get_default"
  60055. version="2.22">
  60056. <doc xml:space="preserve">Gets the default #GResolver. You should unref it when you are done
  60057. with it. #GResolver may use its reference count as a hint about how
  60058. many threads it should allocate for concurrent DNS resolutions.</doc>
  60059. <return-value transfer-ownership="full">
  60060. <doc xml:space="preserve">the default #GResolver.</doc>
  60061. <type name="Resolver" c:type="GResolver*"/>
  60062. </return-value>
  60063. </function>
  60064. <virtual-method name="lookup_by_address"
  60065. invoker="lookup_by_address"
  60066. version="2.22"
  60067. throws="1">
  60068. <doc xml:space="preserve">Synchronously reverse-resolves @address to determine its
  60069. associated hostname.
  60070. If the DNS resolution fails, @error (if non-%NULL) will be set to
  60071. a value from #GResolverError.
  60072. If @cancellable is non-%NULL, it can be used to cancel the
  60073. operation, in which case @error (if non-%NULL) will be set to
  60074. %G_IO_ERROR_CANCELLED.</doc>
  60075. <return-value transfer-ownership="full">
  60076. <doc xml:space="preserve">a hostname (either ASCII-only, or in ASCII-encoded
  60077. form), or %NULL on error.</doc>
  60078. <type name="utf8" c:type="gchar*"/>
  60079. </return-value>
  60080. <parameters>
  60081. <instance-parameter name="resolver" transfer-ownership="none">
  60082. <doc xml:space="preserve">a #GResolver</doc>
  60083. <type name="Resolver" c:type="GResolver*"/>
  60084. </instance-parameter>
  60085. <parameter name="address" transfer-ownership="none">
  60086. <doc xml:space="preserve">the address to reverse-resolve</doc>
  60087. <type name="InetAddress" c:type="GInetAddress*"/>
  60088. </parameter>
  60089. <parameter name="cancellable"
  60090. transfer-ownership="none"
  60091. nullable="1"
  60092. allow-none="1">
  60093. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60094. <type name="Cancellable" c:type="GCancellable*"/>
  60095. </parameter>
  60096. </parameters>
  60097. </virtual-method>
  60098. <virtual-method name="lookup_by_address_async"
  60099. invoker="lookup_by_address_async"
  60100. version="2.22">
  60101. <doc xml:space="preserve">Begins asynchronously reverse-resolving @address to determine its
  60102. associated hostname, and eventually calls @callback, which must
  60103. call g_resolver_lookup_by_address_finish() to get the final result.</doc>
  60104. <return-value transfer-ownership="none">
  60105. <type name="none" c:type="void"/>
  60106. </return-value>
  60107. <parameters>
  60108. <instance-parameter name="resolver" transfer-ownership="none">
  60109. <doc xml:space="preserve">a #GResolver</doc>
  60110. <type name="Resolver" c:type="GResolver*"/>
  60111. </instance-parameter>
  60112. <parameter name="address" transfer-ownership="none">
  60113. <doc xml:space="preserve">the address to reverse-resolve</doc>
  60114. <type name="InetAddress" c:type="GInetAddress*"/>
  60115. </parameter>
  60116. <parameter name="cancellable"
  60117. transfer-ownership="none"
  60118. nullable="1"
  60119. allow-none="1">
  60120. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60121. <type name="Cancellable" c:type="GCancellable*"/>
  60122. </parameter>
  60123. <parameter name="callback"
  60124. transfer-ownership="none"
  60125. nullable="1"
  60126. allow-none="1"
  60127. scope="async"
  60128. closure="3">
  60129. <doc xml:space="preserve">callback to call after resolution completes</doc>
  60130. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60131. </parameter>
  60132. <parameter name="user_data"
  60133. transfer-ownership="none"
  60134. nullable="1"
  60135. allow-none="1"
  60136. closure="3">
  60137. <doc xml:space="preserve">data for @callback</doc>
  60138. <type name="gpointer" c:type="gpointer"/>
  60139. </parameter>
  60140. </parameters>
  60141. </virtual-method>
  60142. <virtual-method name="lookup_by_address_finish"
  60143. invoker="lookup_by_address_finish"
  60144. version="2.22"
  60145. throws="1">
  60146. <doc xml:space="preserve">Retrieves the result of a previous call to
  60147. g_resolver_lookup_by_address_async().
  60148. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60149. a value from #GResolverError. If the operation was cancelled,
  60150. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60151. <return-value transfer-ownership="full">
  60152. <doc xml:space="preserve">a hostname (either ASCII-only, or in ASCII-encoded
  60153. form), or %NULL on error.</doc>
  60154. <type name="utf8" c:type="gchar*"/>
  60155. </return-value>
  60156. <parameters>
  60157. <instance-parameter name="resolver" transfer-ownership="none">
  60158. <doc xml:space="preserve">a #GResolver</doc>
  60159. <type name="Resolver" c:type="GResolver*"/>
  60160. </instance-parameter>
  60161. <parameter name="result" transfer-ownership="none">
  60162. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60163. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60164. </parameter>
  60165. </parameters>
  60166. </virtual-method>
  60167. <virtual-method name="lookup_by_name"
  60168. invoker="lookup_by_name"
  60169. version="2.22"
  60170. throws="1">
  60171. <doc xml:space="preserve">Synchronously resolves @hostname to determine its associated IP
  60172. address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
  60173. the textual form of an IP address (in which case this just becomes
  60174. a wrapper around g_inet_address_new_from_string()).
  60175. On success, g_resolver_lookup_by_name() will return a non-empty #GList of
  60176. #GInetAddress, sorted in order of preference and guaranteed to not
  60177. contain duplicates. That is, if using the result to connect to
  60178. @hostname, you should attempt to connect to the first address
  60179. first, then the second if the first fails, etc. If you are using
  60180. the result to listen on a socket, it is appropriate to add each
  60181. result using e.g. g_socket_listener_add_address().
  60182. If the DNS resolution fails, @error (if non-%NULL) will be set to a
  60183. value from #GResolverError and %NULL will be returned.
  60184. If @cancellable is non-%NULL, it can be used to cancel the
  60185. operation, in which case @error (if non-%NULL) will be set to
  60186. %G_IO_ERROR_CANCELLED.
  60187. If you are planning to connect to a socket on the resolved IP
  60188. address, it may be easier to create a #GNetworkAddress and use its
  60189. #GSocketConnectable interface.</doc>
  60190. <return-value transfer-ownership="full">
  60191. <doc xml:space="preserve">a non-empty #GList
  60192. of #GInetAddress, or %NULL on error. You
  60193. must unref each of the addresses and free the list when you are
  60194. done with it. (You can use g_resolver_free_addresses() to do this.)</doc>
  60195. <type name="GLib.List" c:type="GList*">
  60196. <type name="InetAddress"/>
  60197. </type>
  60198. </return-value>
  60199. <parameters>
  60200. <instance-parameter name="resolver" transfer-ownership="none">
  60201. <doc xml:space="preserve">a #GResolver</doc>
  60202. <type name="Resolver" c:type="GResolver*"/>
  60203. </instance-parameter>
  60204. <parameter name="hostname" transfer-ownership="none">
  60205. <doc xml:space="preserve">the hostname to look up</doc>
  60206. <type name="utf8" c:type="const gchar*"/>
  60207. </parameter>
  60208. <parameter name="cancellable"
  60209. transfer-ownership="none"
  60210. nullable="1"
  60211. allow-none="1">
  60212. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60213. <type name="Cancellable" c:type="GCancellable*"/>
  60214. </parameter>
  60215. </parameters>
  60216. </virtual-method>
  60217. <virtual-method name="lookup_by_name_async"
  60218. invoker="lookup_by_name_async"
  60219. version="2.22">
  60220. <doc xml:space="preserve">Begins asynchronously resolving @hostname to determine its
  60221. associated IP address(es), and eventually calls @callback, which
  60222. must call g_resolver_lookup_by_name_finish() to get the result.
  60223. See g_resolver_lookup_by_name() for more details.</doc>
  60224. <return-value transfer-ownership="none">
  60225. <type name="none" c:type="void"/>
  60226. </return-value>
  60227. <parameters>
  60228. <instance-parameter name="resolver" transfer-ownership="none">
  60229. <doc xml:space="preserve">a #GResolver</doc>
  60230. <type name="Resolver" c:type="GResolver*"/>
  60231. </instance-parameter>
  60232. <parameter name="hostname" transfer-ownership="none">
  60233. <doc xml:space="preserve">the hostname to look up the address of</doc>
  60234. <type name="utf8" c:type="const gchar*"/>
  60235. </parameter>
  60236. <parameter name="cancellable"
  60237. transfer-ownership="none"
  60238. nullable="1"
  60239. allow-none="1">
  60240. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60241. <type name="Cancellable" c:type="GCancellable*"/>
  60242. </parameter>
  60243. <parameter name="callback"
  60244. transfer-ownership="none"
  60245. nullable="1"
  60246. allow-none="1"
  60247. scope="async"
  60248. closure="3">
  60249. <doc xml:space="preserve">callback to call after resolution completes</doc>
  60250. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60251. </parameter>
  60252. <parameter name="user_data"
  60253. transfer-ownership="none"
  60254. nullable="1"
  60255. allow-none="1"
  60256. closure="3">
  60257. <doc xml:space="preserve">data for @callback</doc>
  60258. <type name="gpointer" c:type="gpointer"/>
  60259. </parameter>
  60260. </parameters>
  60261. </virtual-method>
  60262. <virtual-method name="lookup_by_name_finish"
  60263. invoker="lookup_by_name_finish"
  60264. version="2.22"
  60265. throws="1">
  60266. <doc xml:space="preserve">Retrieves the result of a call to
  60267. g_resolver_lookup_by_name_async().
  60268. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60269. a value from #GResolverError. If the operation was cancelled,
  60270. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60271. <return-value transfer-ownership="full">
  60272. <doc xml:space="preserve">a #GList
  60273. of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
  60274. for more details.</doc>
  60275. <type name="GLib.List" c:type="GList*">
  60276. <type name="InetAddress"/>
  60277. </type>
  60278. </return-value>
  60279. <parameters>
  60280. <instance-parameter name="resolver" transfer-ownership="none">
  60281. <doc xml:space="preserve">a #GResolver</doc>
  60282. <type name="Resolver" c:type="GResolver*"/>
  60283. </instance-parameter>
  60284. <parameter name="result" transfer-ownership="none">
  60285. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60286. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60287. </parameter>
  60288. </parameters>
  60289. </virtual-method>
  60290. <virtual-method name="lookup_records"
  60291. invoker="lookup_records"
  60292. version="2.34"
  60293. throws="1">
  60294. <doc xml:space="preserve">Synchronously performs a DNS record lookup for the given @rrname and returns
  60295. a list of records as #GVariant tuples. See #GResolverRecordType for
  60296. information on what the records contain for each @record_type.
  60297. If the DNS resolution fails, @error (if non-%NULL) will be set to
  60298. a value from #GResolverError and %NULL will be returned.
  60299. If @cancellable is non-%NULL, it can be used to cancel the
  60300. operation, in which case @error (if non-%NULL) will be set to
  60301. %G_IO_ERROR_CANCELLED.</doc>
  60302. <return-value transfer-ownership="full">
  60303. <doc xml:space="preserve">a non-empty #GList of
  60304. #GVariant, or %NULL on error. You must free each of the records and the list
  60305. when you are done with it. (You can use g_list_free_full() with
  60306. g_variant_unref() to do this.)</doc>
  60307. <type name="GLib.List" c:type="GList*">
  60308. <type name="GLib.Variant"/>
  60309. </type>
  60310. </return-value>
  60311. <parameters>
  60312. <instance-parameter name="resolver" transfer-ownership="none">
  60313. <doc xml:space="preserve">a #GResolver</doc>
  60314. <type name="Resolver" c:type="GResolver*"/>
  60315. </instance-parameter>
  60316. <parameter name="rrname" transfer-ownership="none">
  60317. <doc xml:space="preserve">the DNS name to lookup the record for</doc>
  60318. <type name="utf8" c:type="const gchar*"/>
  60319. </parameter>
  60320. <parameter name="record_type" transfer-ownership="none">
  60321. <doc xml:space="preserve">the type of DNS record to lookup</doc>
  60322. <type name="ResolverRecordType" c:type="GResolverRecordType"/>
  60323. </parameter>
  60324. <parameter name="cancellable"
  60325. transfer-ownership="none"
  60326. nullable="1"
  60327. allow-none="1">
  60328. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60329. <type name="Cancellable" c:type="GCancellable*"/>
  60330. </parameter>
  60331. </parameters>
  60332. </virtual-method>
  60333. <virtual-method name="lookup_records_async"
  60334. invoker="lookup_records_async"
  60335. version="2.34">
  60336. <doc xml:space="preserve">Begins asynchronously performing a DNS lookup for the given
  60337. @rrname, and eventually calls @callback, which must call
  60338. g_resolver_lookup_records_finish() to get the final result. See
  60339. g_resolver_lookup_records() for more details.</doc>
  60340. <return-value transfer-ownership="none">
  60341. <type name="none" c:type="void"/>
  60342. </return-value>
  60343. <parameters>
  60344. <instance-parameter name="resolver" transfer-ownership="none">
  60345. <doc xml:space="preserve">a #GResolver</doc>
  60346. <type name="Resolver" c:type="GResolver*"/>
  60347. </instance-parameter>
  60348. <parameter name="rrname" transfer-ownership="none">
  60349. <doc xml:space="preserve">the DNS name to lookup the record for</doc>
  60350. <type name="utf8" c:type="const gchar*"/>
  60351. </parameter>
  60352. <parameter name="record_type" transfer-ownership="none">
  60353. <doc xml:space="preserve">the type of DNS record to lookup</doc>
  60354. <type name="ResolverRecordType" c:type="GResolverRecordType"/>
  60355. </parameter>
  60356. <parameter name="cancellable"
  60357. transfer-ownership="none"
  60358. nullable="1"
  60359. allow-none="1">
  60360. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60361. <type name="Cancellable" c:type="GCancellable*"/>
  60362. </parameter>
  60363. <parameter name="callback"
  60364. transfer-ownership="none"
  60365. nullable="1"
  60366. allow-none="1"
  60367. scope="async"
  60368. closure="4">
  60369. <doc xml:space="preserve">callback to call after resolution completes</doc>
  60370. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60371. </parameter>
  60372. <parameter name="user_data"
  60373. transfer-ownership="none"
  60374. nullable="1"
  60375. allow-none="1"
  60376. closure="4">
  60377. <doc xml:space="preserve">data for @callback</doc>
  60378. <type name="gpointer" c:type="gpointer"/>
  60379. </parameter>
  60380. </parameters>
  60381. </virtual-method>
  60382. <virtual-method name="lookup_records_finish"
  60383. invoker="lookup_records_finish"
  60384. version="2.34"
  60385. throws="1">
  60386. <doc xml:space="preserve">Retrieves the result of a previous call to
  60387. g_resolver_lookup_records_async(). Returns a non-empty list of records as
  60388. #GVariant tuples. See #GResolverRecordType for information on what the
  60389. records contain.
  60390. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60391. a value from #GResolverError. If the operation was cancelled,
  60392. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60393. <return-value transfer-ownership="full">
  60394. <doc xml:space="preserve">a non-empty #GList of
  60395. #GVariant, or %NULL on error. You must free each of the records and the list
  60396. when you are done with it. (You can use g_list_free_full() with
  60397. g_variant_unref() to do this.)</doc>
  60398. <type name="GLib.List" c:type="GList*">
  60399. <type name="GLib.Variant"/>
  60400. </type>
  60401. </return-value>
  60402. <parameters>
  60403. <instance-parameter name="resolver" transfer-ownership="none">
  60404. <doc xml:space="preserve">a #GResolver</doc>
  60405. <type name="Resolver" c:type="GResolver*"/>
  60406. </instance-parameter>
  60407. <parameter name="result" transfer-ownership="none">
  60408. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60409. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60410. </parameter>
  60411. </parameters>
  60412. </virtual-method>
  60413. <virtual-method name="lookup_service" introspectable="0" throws="1">
  60414. <return-value>
  60415. <type name="GLib.List" c:type="GList*">
  60416. <type name="gpointer" c:type="gpointer"/>
  60417. </type>
  60418. </return-value>
  60419. <parameters>
  60420. <instance-parameter name="resolver" transfer-ownership="none">
  60421. <type name="Resolver" c:type="GResolver*"/>
  60422. </instance-parameter>
  60423. <parameter name="rrname" transfer-ownership="none">
  60424. <type name="utf8" c:type="const gchar*"/>
  60425. </parameter>
  60426. <parameter name="cancellable"
  60427. transfer-ownership="none"
  60428. nullable="1"
  60429. allow-none="1">
  60430. <type name="Cancellable" c:type="GCancellable*"/>
  60431. </parameter>
  60432. </parameters>
  60433. </virtual-method>
  60434. <virtual-method name="lookup_service_async">
  60435. <return-value transfer-ownership="none">
  60436. <type name="none" c:type="void"/>
  60437. </return-value>
  60438. <parameters>
  60439. <instance-parameter name="resolver" transfer-ownership="none">
  60440. <type name="Resolver" c:type="GResolver*"/>
  60441. </instance-parameter>
  60442. <parameter name="rrname" transfer-ownership="none">
  60443. <type name="utf8" c:type="const gchar*"/>
  60444. </parameter>
  60445. <parameter name="cancellable"
  60446. transfer-ownership="none"
  60447. nullable="1"
  60448. allow-none="1">
  60449. <type name="Cancellable" c:type="GCancellable*"/>
  60450. </parameter>
  60451. <parameter name="callback"
  60452. transfer-ownership="none"
  60453. nullable="1"
  60454. allow-none="1"
  60455. scope="async"
  60456. closure="3">
  60457. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60458. </parameter>
  60459. <parameter name="user_data"
  60460. transfer-ownership="none"
  60461. nullable="1"
  60462. allow-none="1"
  60463. closure="3">
  60464. <type name="gpointer" c:type="gpointer"/>
  60465. </parameter>
  60466. </parameters>
  60467. </virtual-method>
  60468. <virtual-method name="lookup_service_finish"
  60469. invoker="lookup_service_finish"
  60470. version="2.22"
  60471. throws="1">
  60472. <doc xml:space="preserve">Retrieves the result of a previous call to
  60473. g_resolver_lookup_service_async().
  60474. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60475. a value from #GResolverError. If the operation was cancelled,
  60476. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60477. <return-value transfer-ownership="full">
  60478. <doc xml:space="preserve">a non-empty #GList of
  60479. #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more
  60480. details.</doc>
  60481. <type name="GLib.List" c:type="GList*">
  60482. <type name="SrvTarget"/>
  60483. </type>
  60484. </return-value>
  60485. <parameters>
  60486. <instance-parameter name="resolver" transfer-ownership="none">
  60487. <doc xml:space="preserve">a #GResolver</doc>
  60488. <type name="Resolver" c:type="GResolver*"/>
  60489. </instance-parameter>
  60490. <parameter name="result" transfer-ownership="none">
  60491. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60492. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60493. </parameter>
  60494. </parameters>
  60495. </virtual-method>
  60496. <virtual-method name="reload">
  60497. <return-value transfer-ownership="none">
  60498. <type name="none" c:type="void"/>
  60499. </return-value>
  60500. <parameters>
  60501. <instance-parameter name="resolver" transfer-ownership="none">
  60502. <type name="Resolver" c:type="GResolver*"/>
  60503. </instance-parameter>
  60504. </parameters>
  60505. </virtual-method>
  60506. <method name="lookup_by_address"
  60507. c:identifier="g_resolver_lookup_by_address"
  60508. version="2.22"
  60509. throws="1">
  60510. <doc xml:space="preserve">Synchronously reverse-resolves @address to determine its
  60511. associated hostname.
  60512. If the DNS resolution fails, @error (if non-%NULL) will be set to
  60513. a value from #GResolverError.
  60514. If @cancellable is non-%NULL, it can be used to cancel the
  60515. operation, in which case @error (if non-%NULL) will be set to
  60516. %G_IO_ERROR_CANCELLED.</doc>
  60517. <return-value transfer-ownership="full">
  60518. <doc xml:space="preserve">a hostname (either ASCII-only, or in ASCII-encoded
  60519. form), or %NULL on error.</doc>
  60520. <type name="utf8" c:type="gchar*"/>
  60521. </return-value>
  60522. <parameters>
  60523. <instance-parameter name="resolver" transfer-ownership="none">
  60524. <doc xml:space="preserve">a #GResolver</doc>
  60525. <type name="Resolver" c:type="GResolver*"/>
  60526. </instance-parameter>
  60527. <parameter name="address" transfer-ownership="none">
  60528. <doc xml:space="preserve">the address to reverse-resolve</doc>
  60529. <type name="InetAddress" c:type="GInetAddress*"/>
  60530. </parameter>
  60531. <parameter name="cancellable"
  60532. transfer-ownership="none"
  60533. nullable="1"
  60534. allow-none="1">
  60535. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60536. <type name="Cancellable" c:type="GCancellable*"/>
  60537. </parameter>
  60538. </parameters>
  60539. </method>
  60540. <method name="lookup_by_address_async"
  60541. c:identifier="g_resolver_lookup_by_address_async"
  60542. version="2.22">
  60543. <doc xml:space="preserve">Begins asynchronously reverse-resolving @address to determine its
  60544. associated hostname, and eventually calls @callback, which must
  60545. call g_resolver_lookup_by_address_finish() to get the final result.</doc>
  60546. <return-value transfer-ownership="none">
  60547. <type name="none" c:type="void"/>
  60548. </return-value>
  60549. <parameters>
  60550. <instance-parameter name="resolver" transfer-ownership="none">
  60551. <doc xml:space="preserve">a #GResolver</doc>
  60552. <type name="Resolver" c:type="GResolver*"/>
  60553. </instance-parameter>
  60554. <parameter name="address" transfer-ownership="none">
  60555. <doc xml:space="preserve">the address to reverse-resolve</doc>
  60556. <type name="InetAddress" c:type="GInetAddress*"/>
  60557. </parameter>
  60558. <parameter name="cancellable"
  60559. transfer-ownership="none"
  60560. nullable="1"
  60561. allow-none="1">
  60562. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60563. <type name="Cancellable" c:type="GCancellable*"/>
  60564. </parameter>
  60565. <parameter name="callback"
  60566. transfer-ownership="none"
  60567. nullable="1"
  60568. allow-none="1"
  60569. scope="async"
  60570. closure="3">
  60571. <doc xml:space="preserve">callback to call after resolution completes</doc>
  60572. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60573. </parameter>
  60574. <parameter name="user_data"
  60575. transfer-ownership="none"
  60576. nullable="1"
  60577. allow-none="1">
  60578. <doc xml:space="preserve">data for @callback</doc>
  60579. <type name="gpointer" c:type="gpointer"/>
  60580. </parameter>
  60581. </parameters>
  60582. </method>
  60583. <method name="lookup_by_address_finish"
  60584. c:identifier="g_resolver_lookup_by_address_finish"
  60585. version="2.22"
  60586. throws="1">
  60587. <doc xml:space="preserve">Retrieves the result of a previous call to
  60588. g_resolver_lookup_by_address_async().
  60589. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60590. a value from #GResolverError. If the operation was cancelled,
  60591. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60592. <return-value transfer-ownership="full">
  60593. <doc xml:space="preserve">a hostname (either ASCII-only, or in ASCII-encoded
  60594. form), or %NULL on error.</doc>
  60595. <type name="utf8" c:type="gchar*"/>
  60596. </return-value>
  60597. <parameters>
  60598. <instance-parameter name="resolver" transfer-ownership="none">
  60599. <doc xml:space="preserve">a #GResolver</doc>
  60600. <type name="Resolver" c:type="GResolver*"/>
  60601. </instance-parameter>
  60602. <parameter name="result" transfer-ownership="none">
  60603. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60604. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60605. </parameter>
  60606. </parameters>
  60607. </method>
  60608. <method name="lookup_by_name"
  60609. c:identifier="g_resolver_lookup_by_name"
  60610. version="2.22"
  60611. throws="1">
  60612. <doc xml:space="preserve">Synchronously resolves @hostname to determine its associated IP
  60613. address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
  60614. the textual form of an IP address (in which case this just becomes
  60615. a wrapper around g_inet_address_new_from_string()).
  60616. On success, g_resolver_lookup_by_name() will return a non-empty #GList of
  60617. #GInetAddress, sorted in order of preference and guaranteed to not
  60618. contain duplicates. That is, if using the result to connect to
  60619. @hostname, you should attempt to connect to the first address
  60620. first, then the second if the first fails, etc. If you are using
  60621. the result to listen on a socket, it is appropriate to add each
  60622. result using e.g. g_socket_listener_add_address().
  60623. If the DNS resolution fails, @error (if non-%NULL) will be set to a
  60624. value from #GResolverError and %NULL will be returned.
  60625. If @cancellable is non-%NULL, it can be used to cancel the
  60626. operation, in which case @error (if non-%NULL) will be set to
  60627. %G_IO_ERROR_CANCELLED.
  60628. If you are planning to connect to a socket on the resolved IP
  60629. address, it may be easier to create a #GNetworkAddress and use its
  60630. #GSocketConnectable interface.</doc>
  60631. <return-value transfer-ownership="full">
  60632. <doc xml:space="preserve">a non-empty #GList
  60633. of #GInetAddress, or %NULL on error. You
  60634. must unref each of the addresses and free the list when you are
  60635. done with it. (You can use g_resolver_free_addresses() to do this.)</doc>
  60636. <type name="GLib.List" c:type="GList*">
  60637. <type name="InetAddress"/>
  60638. </type>
  60639. </return-value>
  60640. <parameters>
  60641. <instance-parameter name="resolver" transfer-ownership="none">
  60642. <doc xml:space="preserve">a #GResolver</doc>
  60643. <type name="Resolver" c:type="GResolver*"/>
  60644. </instance-parameter>
  60645. <parameter name="hostname" transfer-ownership="none">
  60646. <doc xml:space="preserve">the hostname to look up</doc>
  60647. <type name="utf8" c:type="const gchar*"/>
  60648. </parameter>
  60649. <parameter name="cancellable"
  60650. transfer-ownership="none"
  60651. nullable="1"
  60652. allow-none="1">
  60653. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60654. <type name="Cancellable" c:type="GCancellable*"/>
  60655. </parameter>
  60656. </parameters>
  60657. </method>
  60658. <method name="lookup_by_name_async"
  60659. c:identifier="g_resolver_lookup_by_name_async"
  60660. version="2.22">
  60661. <doc xml:space="preserve">Begins asynchronously resolving @hostname to determine its
  60662. associated IP address(es), and eventually calls @callback, which
  60663. must call g_resolver_lookup_by_name_finish() to get the result.
  60664. See g_resolver_lookup_by_name() for more details.</doc>
  60665. <return-value transfer-ownership="none">
  60666. <type name="none" c:type="void"/>
  60667. </return-value>
  60668. <parameters>
  60669. <instance-parameter name="resolver" transfer-ownership="none">
  60670. <doc xml:space="preserve">a #GResolver</doc>
  60671. <type name="Resolver" c:type="GResolver*"/>
  60672. </instance-parameter>
  60673. <parameter name="hostname" transfer-ownership="none">
  60674. <doc xml:space="preserve">the hostname to look up the address of</doc>
  60675. <type name="utf8" c:type="const gchar*"/>
  60676. </parameter>
  60677. <parameter name="cancellable"
  60678. transfer-ownership="none"
  60679. nullable="1"
  60680. allow-none="1">
  60681. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60682. <type name="Cancellable" c:type="GCancellable*"/>
  60683. </parameter>
  60684. <parameter name="callback"
  60685. transfer-ownership="none"
  60686. nullable="1"
  60687. allow-none="1"
  60688. scope="async"
  60689. closure="3">
  60690. <doc xml:space="preserve">callback to call after resolution completes</doc>
  60691. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60692. </parameter>
  60693. <parameter name="user_data"
  60694. transfer-ownership="none"
  60695. nullable="1"
  60696. allow-none="1">
  60697. <doc xml:space="preserve">data for @callback</doc>
  60698. <type name="gpointer" c:type="gpointer"/>
  60699. </parameter>
  60700. </parameters>
  60701. </method>
  60702. <method name="lookup_by_name_finish"
  60703. c:identifier="g_resolver_lookup_by_name_finish"
  60704. version="2.22"
  60705. throws="1">
  60706. <doc xml:space="preserve">Retrieves the result of a call to
  60707. g_resolver_lookup_by_name_async().
  60708. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60709. a value from #GResolverError. If the operation was cancelled,
  60710. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60711. <return-value transfer-ownership="full">
  60712. <doc xml:space="preserve">a #GList
  60713. of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
  60714. for more details.</doc>
  60715. <type name="GLib.List" c:type="GList*">
  60716. <type name="InetAddress"/>
  60717. </type>
  60718. </return-value>
  60719. <parameters>
  60720. <instance-parameter name="resolver" transfer-ownership="none">
  60721. <doc xml:space="preserve">a #GResolver</doc>
  60722. <type name="Resolver" c:type="GResolver*"/>
  60723. </instance-parameter>
  60724. <parameter name="result" transfer-ownership="none">
  60725. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60726. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60727. </parameter>
  60728. </parameters>
  60729. </method>
  60730. <method name="lookup_records"
  60731. c:identifier="g_resolver_lookup_records"
  60732. version="2.34"
  60733. throws="1">
  60734. <doc xml:space="preserve">Synchronously performs a DNS record lookup for the given @rrname and returns
  60735. a list of records as #GVariant tuples. See #GResolverRecordType for
  60736. information on what the records contain for each @record_type.
  60737. If the DNS resolution fails, @error (if non-%NULL) will be set to
  60738. a value from #GResolverError and %NULL will be returned.
  60739. If @cancellable is non-%NULL, it can be used to cancel the
  60740. operation, in which case @error (if non-%NULL) will be set to
  60741. %G_IO_ERROR_CANCELLED.</doc>
  60742. <return-value transfer-ownership="full">
  60743. <doc xml:space="preserve">a non-empty #GList of
  60744. #GVariant, or %NULL on error. You must free each of the records and the list
  60745. when you are done with it. (You can use g_list_free_full() with
  60746. g_variant_unref() to do this.)</doc>
  60747. <type name="GLib.List" c:type="GList*">
  60748. <type name="GLib.Variant"/>
  60749. </type>
  60750. </return-value>
  60751. <parameters>
  60752. <instance-parameter name="resolver" transfer-ownership="none">
  60753. <doc xml:space="preserve">a #GResolver</doc>
  60754. <type name="Resolver" c:type="GResolver*"/>
  60755. </instance-parameter>
  60756. <parameter name="rrname" transfer-ownership="none">
  60757. <doc xml:space="preserve">the DNS name to lookup the record for</doc>
  60758. <type name="utf8" c:type="const gchar*"/>
  60759. </parameter>
  60760. <parameter name="record_type" transfer-ownership="none">
  60761. <doc xml:space="preserve">the type of DNS record to lookup</doc>
  60762. <type name="ResolverRecordType" c:type="GResolverRecordType"/>
  60763. </parameter>
  60764. <parameter name="cancellable"
  60765. transfer-ownership="none"
  60766. nullable="1"
  60767. allow-none="1">
  60768. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60769. <type name="Cancellable" c:type="GCancellable*"/>
  60770. </parameter>
  60771. </parameters>
  60772. </method>
  60773. <method name="lookup_records_async"
  60774. c:identifier="g_resolver_lookup_records_async"
  60775. version="2.34">
  60776. <doc xml:space="preserve">Begins asynchronously performing a DNS lookup for the given
  60777. @rrname, and eventually calls @callback, which must call
  60778. g_resolver_lookup_records_finish() to get the final result. See
  60779. g_resolver_lookup_records() for more details.</doc>
  60780. <return-value transfer-ownership="none">
  60781. <type name="none" c:type="void"/>
  60782. </return-value>
  60783. <parameters>
  60784. <instance-parameter name="resolver" transfer-ownership="none">
  60785. <doc xml:space="preserve">a #GResolver</doc>
  60786. <type name="Resolver" c:type="GResolver*"/>
  60787. </instance-parameter>
  60788. <parameter name="rrname" transfer-ownership="none">
  60789. <doc xml:space="preserve">the DNS name to lookup the record for</doc>
  60790. <type name="utf8" c:type="const gchar*"/>
  60791. </parameter>
  60792. <parameter name="record_type" transfer-ownership="none">
  60793. <doc xml:space="preserve">the type of DNS record to lookup</doc>
  60794. <type name="ResolverRecordType" c:type="GResolverRecordType"/>
  60795. </parameter>
  60796. <parameter name="cancellable"
  60797. transfer-ownership="none"
  60798. nullable="1"
  60799. allow-none="1">
  60800. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60801. <type name="Cancellable" c:type="GCancellable*"/>
  60802. </parameter>
  60803. <parameter name="callback"
  60804. transfer-ownership="none"
  60805. nullable="1"
  60806. allow-none="1"
  60807. scope="async"
  60808. closure="4">
  60809. <doc xml:space="preserve">callback to call after resolution completes</doc>
  60810. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60811. </parameter>
  60812. <parameter name="user_data"
  60813. transfer-ownership="none"
  60814. nullable="1"
  60815. allow-none="1">
  60816. <doc xml:space="preserve">data for @callback</doc>
  60817. <type name="gpointer" c:type="gpointer"/>
  60818. </parameter>
  60819. </parameters>
  60820. </method>
  60821. <method name="lookup_records_finish"
  60822. c:identifier="g_resolver_lookup_records_finish"
  60823. version="2.34"
  60824. throws="1">
  60825. <doc xml:space="preserve">Retrieves the result of a previous call to
  60826. g_resolver_lookup_records_async(). Returns a non-empty list of records as
  60827. #GVariant tuples. See #GResolverRecordType for information on what the
  60828. records contain.
  60829. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60830. a value from #GResolverError. If the operation was cancelled,
  60831. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60832. <return-value transfer-ownership="full">
  60833. <doc xml:space="preserve">a non-empty #GList of
  60834. #GVariant, or %NULL on error. You must free each of the records and the list
  60835. when you are done with it. (You can use g_list_free_full() with
  60836. g_variant_unref() to do this.)</doc>
  60837. <type name="GLib.List" c:type="GList*">
  60838. <type name="GLib.Variant"/>
  60839. </type>
  60840. </return-value>
  60841. <parameters>
  60842. <instance-parameter name="resolver" transfer-ownership="none">
  60843. <doc xml:space="preserve">a #GResolver</doc>
  60844. <type name="Resolver" c:type="GResolver*"/>
  60845. </instance-parameter>
  60846. <parameter name="result" transfer-ownership="none">
  60847. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60848. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60849. </parameter>
  60850. </parameters>
  60851. </method>
  60852. <method name="lookup_service"
  60853. c:identifier="g_resolver_lookup_service"
  60854. version="2.22"
  60855. throws="1">
  60856. <doc xml:space="preserve">Synchronously performs a DNS SRV lookup for the given @service and
  60857. @protocol in the given @domain and returns an array of #GSrvTarget.
  60858. @domain may be an ASCII-only or UTF-8 hostname. Note also that the
  60859. @service and @protocol arguments do not include the leading underscore
  60860. that appears in the actual DNS entry.
  60861. On success, g_resolver_lookup_service() will return a non-empty #GList of
  60862. #GSrvTarget, sorted in order of preference. (That is, you should
  60863. attempt to connect to the first target first, then the second if
  60864. the first fails, etc.)
  60865. If the DNS resolution fails, @error (if non-%NULL) will be set to
  60866. a value from #GResolverError and %NULL will be returned.
  60867. If @cancellable is non-%NULL, it can be used to cancel the
  60868. operation, in which case @error (if non-%NULL) will be set to
  60869. %G_IO_ERROR_CANCELLED.
  60870. If you are planning to connect to the service, it is usually easier
  60871. to create a #GNetworkService and use its #GSocketConnectable
  60872. interface.</doc>
  60873. <return-value transfer-ownership="full">
  60874. <doc xml:space="preserve">a non-empty #GList of
  60875. #GSrvTarget, or %NULL on error. You must free each of the targets and the
  60876. list when you are done with it. (You can use g_resolver_free_targets() to do
  60877. this.)</doc>
  60878. <type name="GLib.List" c:type="GList*">
  60879. <type name="SrvTarget"/>
  60880. </type>
  60881. </return-value>
  60882. <parameters>
  60883. <instance-parameter name="resolver" transfer-ownership="none">
  60884. <doc xml:space="preserve">a #GResolver</doc>
  60885. <type name="Resolver" c:type="GResolver*"/>
  60886. </instance-parameter>
  60887. <parameter name="service" transfer-ownership="none">
  60888. <doc xml:space="preserve">the service type to look up (eg, "ldap")</doc>
  60889. <type name="utf8" c:type="const gchar*"/>
  60890. </parameter>
  60891. <parameter name="protocol" transfer-ownership="none">
  60892. <doc xml:space="preserve">the networking protocol to use for @service (eg, "tcp")</doc>
  60893. <type name="utf8" c:type="const gchar*"/>
  60894. </parameter>
  60895. <parameter name="domain" transfer-ownership="none">
  60896. <doc xml:space="preserve">the DNS domain to look up the service in</doc>
  60897. <type name="utf8" c:type="const gchar*"/>
  60898. </parameter>
  60899. <parameter name="cancellable"
  60900. transfer-ownership="none"
  60901. nullable="1"
  60902. allow-none="1">
  60903. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60904. <type name="Cancellable" c:type="GCancellable*"/>
  60905. </parameter>
  60906. </parameters>
  60907. </method>
  60908. <method name="lookup_service_async"
  60909. c:identifier="g_resolver_lookup_service_async"
  60910. version="2.22">
  60911. <doc xml:space="preserve">Begins asynchronously performing a DNS SRV lookup for the given
  60912. @service and @protocol in the given @domain, and eventually calls
  60913. @callback, which must call g_resolver_lookup_service_finish() to
  60914. get the final result. See g_resolver_lookup_service() for more
  60915. details.</doc>
  60916. <return-value transfer-ownership="none">
  60917. <type name="none" c:type="void"/>
  60918. </return-value>
  60919. <parameters>
  60920. <instance-parameter name="resolver" transfer-ownership="none">
  60921. <doc xml:space="preserve">a #GResolver</doc>
  60922. <type name="Resolver" c:type="GResolver*"/>
  60923. </instance-parameter>
  60924. <parameter name="service" transfer-ownership="none">
  60925. <doc xml:space="preserve">the service type to look up (eg, "ldap")</doc>
  60926. <type name="utf8" c:type="const gchar*"/>
  60927. </parameter>
  60928. <parameter name="protocol" transfer-ownership="none">
  60929. <doc xml:space="preserve">the networking protocol to use for @service (eg, "tcp")</doc>
  60930. <type name="utf8" c:type="const gchar*"/>
  60931. </parameter>
  60932. <parameter name="domain" transfer-ownership="none">
  60933. <doc xml:space="preserve">the DNS domain to look up the service in</doc>
  60934. <type name="utf8" c:type="const gchar*"/>
  60935. </parameter>
  60936. <parameter name="cancellable"
  60937. transfer-ownership="none"
  60938. nullable="1"
  60939. allow-none="1">
  60940. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  60941. <type name="Cancellable" c:type="GCancellable*"/>
  60942. </parameter>
  60943. <parameter name="callback"
  60944. transfer-ownership="none"
  60945. nullable="1"
  60946. allow-none="1"
  60947. scope="async"
  60948. closure="5">
  60949. <doc xml:space="preserve">callback to call after resolution completes</doc>
  60950. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  60951. </parameter>
  60952. <parameter name="user_data"
  60953. transfer-ownership="none"
  60954. nullable="1"
  60955. allow-none="1">
  60956. <doc xml:space="preserve">data for @callback</doc>
  60957. <type name="gpointer" c:type="gpointer"/>
  60958. </parameter>
  60959. </parameters>
  60960. </method>
  60961. <method name="lookup_service_finish"
  60962. c:identifier="g_resolver_lookup_service_finish"
  60963. version="2.22"
  60964. throws="1">
  60965. <doc xml:space="preserve">Retrieves the result of a previous call to
  60966. g_resolver_lookup_service_async().
  60967. If the DNS resolution failed, @error (if non-%NULL) will be set to
  60968. a value from #GResolverError. If the operation was cancelled,
  60969. @error will be set to %G_IO_ERROR_CANCELLED.</doc>
  60970. <return-value transfer-ownership="full">
  60971. <doc xml:space="preserve">a non-empty #GList of
  60972. #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more
  60973. details.</doc>
  60974. <type name="GLib.List" c:type="GList*">
  60975. <type name="SrvTarget"/>
  60976. </type>
  60977. </return-value>
  60978. <parameters>
  60979. <instance-parameter name="resolver" transfer-ownership="none">
  60980. <doc xml:space="preserve">a #GResolver</doc>
  60981. <type name="Resolver" c:type="GResolver*"/>
  60982. </instance-parameter>
  60983. <parameter name="result" transfer-ownership="none">
  60984. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  60985. <type name="AsyncResult" c:type="GAsyncResult*"/>
  60986. </parameter>
  60987. </parameters>
  60988. </method>
  60989. <method name="set_default"
  60990. c:identifier="g_resolver_set_default"
  60991. version="2.22">
  60992. <doc xml:space="preserve">Sets @resolver to be the application's default resolver (reffing
  60993. @resolver, and unreffing the previous default resolver, if any).
  60994. Future calls to g_resolver_get_default() will return this resolver.
  60995. This can be used if an application wants to perform any sort of DNS
  60996. caching or "pinning"; it can implement its own #GResolver that
  60997. calls the original default resolver for DNS operations, and
  60998. implements its own cache policies on top of that, and then set
  60999. itself as the default resolver for all later code to use.</doc>
  61000. <return-value transfer-ownership="none">
  61001. <type name="none" c:type="void"/>
  61002. </return-value>
  61003. <parameters>
  61004. <instance-parameter name="resolver" transfer-ownership="none">
  61005. <doc xml:space="preserve">the new default #GResolver</doc>
  61006. <type name="Resolver" c:type="GResolver*"/>
  61007. </instance-parameter>
  61008. </parameters>
  61009. </method>
  61010. <field name="parent_instance">
  61011. <type name="GObject.Object" c:type="GObject"/>
  61012. </field>
  61013. <field name="priv">
  61014. <type name="ResolverPrivate" c:type="GResolverPrivate*"/>
  61015. </field>
  61016. <glib:signal name="reload" when="last">
  61017. <doc xml:space="preserve">Emitted when the resolver notices that the system resolver
  61018. configuration has changed.</doc>
  61019. <return-value transfer-ownership="none">
  61020. <type name="none" c:type="void"/>
  61021. </return-value>
  61022. </glib:signal>
  61023. </class>
  61024. <record name="ResolverClass"
  61025. c:type="GResolverClass"
  61026. glib:is-gtype-struct-for="Resolver">
  61027. <field name="parent_class">
  61028. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  61029. </field>
  61030. <field name="reload">
  61031. <callback name="reload">
  61032. <return-value transfer-ownership="none">
  61033. <type name="none" c:type="void"/>
  61034. </return-value>
  61035. <parameters>
  61036. <parameter name="resolver" transfer-ownership="none">
  61037. <type name="Resolver" c:type="GResolver*"/>
  61038. </parameter>
  61039. </parameters>
  61040. </callback>
  61041. </field>
  61042. <field name="lookup_by_name">
  61043. <callback name="lookup_by_name" throws="1">
  61044. <return-value transfer-ownership="full">
  61045. <doc xml:space="preserve">a non-empty #GList
  61046. of #GInetAddress, or %NULL on error. You
  61047. must unref each of the addresses and free the list when you are
  61048. done with it. (You can use g_resolver_free_addresses() to do this.)</doc>
  61049. <type name="GLib.List" c:type="GList*">
  61050. <type name="InetAddress"/>
  61051. </type>
  61052. </return-value>
  61053. <parameters>
  61054. <parameter name="resolver" transfer-ownership="none">
  61055. <doc xml:space="preserve">a #GResolver</doc>
  61056. <type name="Resolver" c:type="GResolver*"/>
  61057. </parameter>
  61058. <parameter name="hostname" transfer-ownership="none">
  61059. <doc xml:space="preserve">the hostname to look up</doc>
  61060. <type name="utf8" c:type="const gchar*"/>
  61061. </parameter>
  61062. <parameter name="cancellable"
  61063. transfer-ownership="none"
  61064. nullable="1"
  61065. allow-none="1">
  61066. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  61067. <type name="Cancellable" c:type="GCancellable*"/>
  61068. </parameter>
  61069. </parameters>
  61070. </callback>
  61071. </field>
  61072. <field name="lookup_by_name_async">
  61073. <callback name="lookup_by_name_async">
  61074. <return-value transfer-ownership="none">
  61075. <type name="none" c:type="void"/>
  61076. </return-value>
  61077. <parameters>
  61078. <parameter name="resolver" transfer-ownership="none">
  61079. <doc xml:space="preserve">a #GResolver</doc>
  61080. <type name="Resolver" c:type="GResolver*"/>
  61081. </parameter>
  61082. <parameter name="hostname" transfer-ownership="none">
  61083. <doc xml:space="preserve">the hostname to look up the address of</doc>
  61084. <type name="utf8" c:type="const gchar*"/>
  61085. </parameter>
  61086. <parameter name="cancellable"
  61087. transfer-ownership="none"
  61088. nullable="1"
  61089. allow-none="1">
  61090. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  61091. <type name="Cancellable" c:type="GCancellable*"/>
  61092. </parameter>
  61093. <parameter name="callback"
  61094. transfer-ownership="none"
  61095. nullable="1"
  61096. allow-none="1"
  61097. scope="async"
  61098. closure="4">
  61099. <doc xml:space="preserve">callback to call after resolution completes</doc>
  61100. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  61101. </parameter>
  61102. <parameter name="user_data"
  61103. transfer-ownership="none"
  61104. nullable="1"
  61105. allow-none="1"
  61106. closure="4">
  61107. <doc xml:space="preserve">data for @callback</doc>
  61108. <type name="gpointer" c:type="gpointer"/>
  61109. </parameter>
  61110. </parameters>
  61111. </callback>
  61112. </field>
  61113. <field name="lookup_by_name_finish">
  61114. <callback name="lookup_by_name_finish" throws="1">
  61115. <return-value transfer-ownership="full">
  61116. <doc xml:space="preserve">a #GList
  61117. of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
  61118. for more details.</doc>
  61119. <type name="GLib.List" c:type="GList*">
  61120. <type name="InetAddress"/>
  61121. </type>
  61122. </return-value>
  61123. <parameters>
  61124. <parameter name="resolver" transfer-ownership="none">
  61125. <doc xml:space="preserve">a #GResolver</doc>
  61126. <type name="Resolver" c:type="GResolver*"/>
  61127. </parameter>
  61128. <parameter name="result" transfer-ownership="none">
  61129. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  61130. <type name="AsyncResult" c:type="GAsyncResult*"/>
  61131. </parameter>
  61132. </parameters>
  61133. </callback>
  61134. </field>
  61135. <field name="lookup_by_address">
  61136. <callback name="lookup_by_address" throws="1">
  61137. <return-value transfer-ownership="full">
  61138. <doc xml:space="preserve">a hostname (either ASCII-only, or in ASCII-encoded
  61139. form), or %NULL on error.</doc>
  61140. <type name="utf8" c:type="gchar*"/>
  61141. </return-value>
  61142. <parameters>
  61143. <parameter name="resolver" transfer-ownership="none">
  61144. <doc xml:space="preserve">a #GResolver</doc>
  61145. <type name="Resolver" c:type="GResolver*"/>
  61146. </parameter>
  61147. <parameter name="address" transfer-ownership="none">
  61148. <doc xml:space="preserve">the address to reverse-resolve</doc>
  61149. <type name="InetAddress" c:type="GInetAddress*"/>
  61150. </parameter>
  61151. <parameter name="cancellable"
  61152. transfer-ownership="none"
  61153. nullable="1"
  61154. allow-none="1">
  61155. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  61156. <type name="Cancellable" c:type="GCancellable*"/>
  61157. </parameter>
  61158. </parameters>
  61159. </callback>
  61160. </field>
  61161. <field name="lookup_by_address_async">
  61162. <callback name="lookup_by_address_async">
  61163. <return-value transfer-ownership="none">
  61164. <type name="none" c:type="void"/>
  61165. </return-value>
  61166. <parameters>
  61167. <parameter name="resolver" transfer-ownership="none">
  61168. <doc xml:space="preserve">a #GResolver</doc>
  61169. <type name="Resolver" c:type="GResolver*"/>
  61170. </parameter>
  61171. <parameter name="address" transfer-ownership="none">
  61172. <doc xml:space="preserve">the address to reverse-resolve</doc>
  61173. <type name="InetAddress" c:type="GInetAddress*"/>
  61174. </parameter>
  61175. <parameter name="cancellable"
  61176. transfer-ownership="none"
  61177. nullable="1"
  61178. allow-none="1">
  61179. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  61180. <type name="Cancellable" c:type="GCancellable*"/>
  61181. </parameter>
  61182. <parameter name="callback"
  61183. transfer-ownership="none"
  61184. nullable="1"
  61185. allow-none="1"
  61186. scope="async"
  61187. closure="4">
  61188. <doc xml:space="preserve">callback to call after resolution completes</doc>
  61189. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  61190. </parameter>
  61191. <parameter name="user_data"
  61192. transfer-ownership="none"
  61193. nullable="1"
  61194. allow-none="1"
  61195. closure="4">
  61196. <doc xml:space="preserve">data for @callback</doc>
  61197. <type name="gpointer" c:type="gpointer"/>
  61198. </parameter>
  61199. </parameters>
  61200. </callback>
  61201. </field>
  61202. <field name="lookup_by_address_finish">
  61203. <callback name="lookup_by_address_finish" throws="1">
  61204. <return-value transfer-ownership="full">
  61205. <doc xml:space="preserve">a hostname (either ASCII-only, or in ASCII-encoded
  61206. form), or %NULL on error.</doc>
  61207. <type name="utf8" c:type="gchar*"/>
  61208. </return-value>
  61209. <parameters>
  61210. <parameter name="resolver" transfer-ownership="none">
  61211. <doc xml:space="preserve">a #GResolver</doc>
  61212. <type name="Resolver" c:type="GResolver*"/>
  61213. </parameter>
  61214. <parameter name="result" transfer-ownership="none">
  61215. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  61216. <type name="AsyncResult" c:type="GAsyncResult*"/>
  61217. </parameter>
  61218. </parameters>
  61219. </callback>
  61220. </field>
  61221. <field name="lookup_service" introspectable="0">
  61222. <callback name="lookup_service" introspectable="0" throws="1">
  61223. <return-value>
  61224. <type name="GLib.List" c:type="GList*">
  61225. <type name="gpointer" c:type="gpointer"/>
  61226. </type>
  61227. </return-value>
  61228. <parameters>
  61229. <parameter name="resolver" transfer-ownership="none">
  61230. <type name="Resolver" c:type="GResolver*"/>
  61231. </parameter>
  61232. <parameter name="rrname" transfer-ownership="none">
  61233. <type name="utf8" c:type="const gchar*"/>
  61234. </parameter>
  61235. <parameter name="cancellable"
  61236. transfer-ownership="none"
  61237. nullable="1"
  61238. allow-none="1">
  61239. <type name="Cancellable" c:type="GCancellable*"/>
  61240. </parameter>
  61241. </parameters>
  61242. </callback>
  61243. </field>
  61244. <field name="lookup_service_async">
  61245. <callback name="lookup_service_async">
  61246. <return-value transfer-ownership="none">
  61247. <type name="none" c:type="void"/>
  61248. </return-value>
  61249. <parameters>
  61250. <parameter name="resolver" transfer-ownership="none">
  61251. <type name="Resolver" c:type="GResolver*"/>
  61252. </parameter>
  61253. <parameter name="rrname" transfer-ownership="none">
  61254. <type name="utf8" c:type="const gchar*"/>
  61255. </parameter>
  61256. <parameter name="cancellable"
  61257. transfer-ownership="none"
  61258. nullable="1"
  61259. allow-none="1">
  61260. <type name="Cancellable" c:type="GCancellable*"/>
  61261. </parameter>
  61262. <parameter name="callback"
  61263. transfer-ownership="none"
  61264. nullable="1"
  61265. allow-none="1"
  61266. scope="async"
  61267. closure="4">
  61268. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  61269. </parameter>
  61270. <parameter name="user_data"
  61271. transfer-ownership="none"
  61272. nullable="1"
  61273. allow-none="1"
  61274. closure="4">
  61275. <type name="gpointer" c:type="gpointer"/>
  61276. </parameter>
  61277. </parameters>
  61278. </callback>
  61279. </field>
  61280. <field name="lookup_service_finish">
  61281. <callback name="lookup_service_finish" throws="1">
  61282. <return-value transfer-ownership="full">
  61283. <doc xml:space="preserve">a non-empty #GList of
  61284. #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more
  61285. details.</doc>
  61286. <type name="GLib.List" c:type="GList*">
  61287. <type name="SrvTarget"/>
  61288. </type>
  61289. </return-value>
  61290. <parameters>
  61291. <parameter name="resolver" transfer-ownership="none">
  61292. <doc xml:space="preserve">a #GResolver</doc>
  61293. <type name="Resolver" c:type="GResolver*"/>
  61294. </parameter>
  61295. <parameter name="result" transfer-ownership="none">
  61296. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  61297. <type name="AsyncResult" c:type="GAsyncResult*"/>
  61298. </parameter>
  61299. </parameters>
  61300. </callback>
  61301. </field>
  61302. <field name="lookup_records">
  61303. <callback name="lookup_records" throws="1">
  61304. <return-value transfer-ownership="full">
  61305. <doc xml:space="preserve">a non-empty #GList of
  61306. #GVariant, or %NULL on error. You must free each of the records and the list
  61307. when you are done with it. (You can use g_list_free_full() with
  61308. g_variant_unref() to do this.)</doc>
  61309. <type name="GLib.List" c:type="GList*">
  61310. <type name="GLib.Variant"/>
  61311. </type>
  61312. </return-value>
  61313. <parameters>
  61314. <parameter name="resolver" transfer-ownership="none">
  61315. <doc xml:space="preserve">a #GResolver</doc>
  61316. <type name="Resolver" c:type="GResolver*"/>
  61317. </parameter>
  61318. <parameter name="rrname" transfer-ownership="none">
  61319. <doc xml:space="preserve">the DNS name to lookup the record for</doc>
  61320. <type name="utf8" c:type="const gchar*"/>
  61321. </parameter>
  61322. <parameter name="record_type" transfer-ownership="none">
  61323. <doc xml:space="preserve">the type of DNS record to lookup</doc>
  61324. <type name="ResolverRecordType" c:type="GResolverRecordType"/>
  61325. </parameter>
  61326. <parameter name="cancellable"
  61327. transfer-ownership="none"
  61328. nullable="1"
  61329. allow-none="1">
  61330. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  61331. <type name="Cancellable" c:type="GCancellable*"/>
  61332. </parameter>
  61333. </parameters>
  61334. </callback>
  61335. </field>
  61336. <field name="lookup_records_async">
  61337. <callback name="lookup_records_async">
  61338. <return-value transfer-ownership="none">
  61339. <type name="none" c:type="void"/>
  61340. </return-value>
  61341. <parameters>
  61342. <parameter name="resolver" transfer-ownership="none">
  61343. <doc xml:space="preserve">a #GResolver</doc>
  61344. <type name="Resolver" c:type="GResolver*"/>
  61345. </parameter>
  61346. <parameter name="rrname" transfer-ownership="none">
  61347. <doc xml:space="preserve">the DNS name to lookup the record for</doc>
  61348. <type name="utf8" c:type="const gchar*"/>
  61349. </parameter>
  61350. <parameter name="record_type" transfer-ownership="none">
  61351. <doc xml:space="preserve">the type of DNS record to lookup</doc>
  61352. <type name="ResolverRecordType" c:type="GResolverRecordType"/>
  61353. </parameter>
  61354. <parameter name="cancellable"
  61355. transfer-ownership="none"
  61356. nullable="1"
  61357. allow-none="1">
  61358. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  61359. <type name="Cancellable" c:type="GCancellable*"/>
  61360. </parameter>
  61361. <parameter name="callback"
  61362. transfer-ownership="none"
  61363. nullable="1"
  61364. allow-none="1"
  61365. scope="async"
  61366. closure="5">
  61367. <doc xml:space="preserve">callback to call after resolution completes</doc>
  61368. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  61369. </parameter>
  61370. <parameter name="user_data"
  61371. transfer-ownership="none"
  61372. nullable="1"
  61373. allow-none="1"
  61374. closure="5">
  61375. <doc xml:space="preserve">data for @callback</doc>
  61376. <type name="gpointer" c:type="gpointer"/>
  61377. </parameter>
  61378. </parameters>
  61379. </callback>
  61380. </field>
  61381. <field name="lookup_records_finish">
  61382. <callback name="lookup_records_finish" throws="1">
  61383. <return-value transfer-ownership="full">
  61384. <doc xml:space="preserve">a non-empty #GList of
  61385. #GVariant, or %NULL on error. You must free each of the records and the list
  61386. when you are done with it. (You can use g_list_free_full() with
  61387. g_variant_unref() to do this.)</doc>
  61388. <type name="GLib.List" c:type="GList*">
  61389. <type name="GLib.Variant"/>
  61390. </type>
  61391. </return-value>
  61392. <parameters>
  61393. <parameter name="resolver" transfer-ownership="none">
  61394. <doc xml:space="preserve">a #GResolver</doc>
  61395. <type name="Resolver" c:type="GResolver*"/>
  61396. </parameter>
  61397. <parameter name="result" transfer-ownership="none">
  61398. <doc xml:space="preserve">the result passed to your #GAsyncReadyCallback</doc>
  61399. <type name="AsyncResult" c:type="GAsyncResult*"/>
  61400. </parameter>
  61401. </parameters>
  61402. </callback>
  61403. </field>
  61404. <field name="_g_reserved4" introspectable="0">
  61405. <callback name="_g_reserved4">
  61406. <return-value transfer-ownership="none">
  61407. <type name="none" c:type="void"/>
  61408. </return-value>
  61409. </callback>
  61410. </field>
  61411. <field name="_g_reserved5" introspectable="0">
  61412. <callback name="_g_reserved5">
  61413. <return-value transfer-ownership="none">
  61414. <type name="none" c:type="void"/>
  61415. </return-value>
  61416. </callback>
  61417. </field>
  61418. <field name="_g_reserved6" introspectable="0">
  61419. <callback name="_g_reserved6">
  61420. <return-value transfer-ownership="none">
  61421. <type name="none" c:type="void"/>
  61422. </return-value>
  61423. </callback>
  61424. </field>
  61425. </record>
  61426. <enumeration name="ResolverError"
  61427. version="2.22"
  61428. glib:type-name="GResolverError"
  61429. glib:get-type="g_resolver_error_get_type"
  61430. c:type="GResolverError"
  61431. glib:error-domain="g-resolver-error-quark">
  61432. <doc xml:space="preserve">An error code used with %G_RESOLVER_ERROR in a #GError returned
  61433. from a #GResolver routine.</doc>
  61434. <member name="not_found"
  61435. value="0"
  61436. c:identifier="G_RESOLVER_ERROR_NOT_FOUND"
  61437. glib:nick="not-found">
  61438. <doc xml:space="preserve">the requested name/address/service was not
  61439. found</doc>
  61440. </member>
  61441. <member name="temporary_failure"
  61442. value="1"
  61443. c:identifier="G_RESOLVER_ERROR_TEMPORARY_FAILURE"
  61444. glib:nick="temporary-failure">
  61445. <doc xml:space="preserve">the requested information could not
  61446. be looked up due to a network error or similar problem</doc>
  61447. </member>
  61448. <member name="internal"
  61449. value="2"
  61450. c:identifier="G_RESOLVER_ERROR_INTERNAL"
  61451. glib:nick="internal">
  61452. <doc xml:space="preserve">unknown error</doc>
  61453. </member>
  61454. <function name="quark"
  61455. c:identifier="g_resolver_error_quark"
  61456. version="2.22">
  61457. <doc xml:space="preserve">Gets the #GResolver Error Quark.</doc>
  61458. <return-value transfer-ownership="none">
  61459. <doc xml:space="preserve">a #GQuark.</doc>
  61460. <type name="GLib.Quark" c:type="GQuark"/>
  61461. </return-value>
  61462. </function>
  61463. </enumeration>
  61464. <record name="ResolverPrivate" c:type="GResolverPrivate" disguised="1">
  61465. </record>
  61466. <enumeration name="ResolverRecordType"
  61467. version="2.34"
  61468. glib:type-name="GResolverRecordType"
  61469. glib:get-type="g_resolver_record_type_get_type"
  61470. c:type="GResolverRecordType">
  61471. <doc xml:space="preserve">The type of record that g_resolver_lookup_records() or
  61472. g_resolver_lookup_records_async() should retrieve. The records are returned
  61473. as lists of #GVariant tuples. Each record type has different values in
  61474. the variant tuples returned.
  61475. %G_RESOLVER_RECORD_SRV records are returned as variants with the signature
  61476. '(qqqs)', containing a guint16 with the priority, a guint16 with the
  61477. weight, a guint16 with the port, and a string of the hostname.
  61478. %G_RESOLVER_RECORD_MX records are returned as variants with the signature
  61479. '(qs)', representing a guint16 with the preference, and a string containing
  61480. the mail exchanger hostname.
  61481. %G_RESOLVER_RECORD_TXT records are returned as variants with the signature
  61482. '(as)', representing an array of the strings in the text record.
  61483. %G_RESOLVER_RECORD_SOA records are returned as variants with the signature
  61484. '(ssuuuuu)', representing a string containing the primary name server, a
  61485. string containing the administrator, the serial as a guint32, the refresh
  61486. interval as guint32, the retry interval as a guint32, the expire timeout
  61487. as a guint32, and the ttl as a guint32.
  61488. %G_RESOLVER_RECORD_NS records are returned as variants with the signature
  61489. '(s)', representing a string of the hostname of the name server.</doc>
  61490. <member name="srv"
  61491. value="1"
  61492. c:identifier="G_RESOLVER_RECORD_SRV"
  61493. glib:nick="srv">
  61494. <doc xml:space="preserve">lookup DNS SRV records for a domain</doc>
  61495. </member>
  61496. <member name="mx"
  61497. value="2"
  61498. c:identifier="G_RESOLVER_RECORD_MX"
  61499. glib:nick="mx">
  61500. <doc xml:space="preserve">lookup DNS MX records for a domain</doc>
  61501. </member>
  61502. <member name="txt"
  61503. value="3"
  61504. c:identifier="G_RESOLVER_RECORD_TXT"
  61505. glib:nick="txt">
  61506. <doc xml:space="preserve">lookup DNS TXT records for a name</doc>
  61507. </member>
  61508. <member name="soa"
  61509. value="4"
  61510. c:identifier="G_RESOLVER_RECORD_SOA"
  61511. glib:nick="soa">
  61512. <doc xml:space="preserve">lookup DNS SOA records for a zone</doc>
  61513. </member>
  61514. <member name="ns"
  61515. value="5"
  61516. c:identifier="G_RESOLVER_RECORD_NS"
  61517. glib:nick="ns">
  61518. <doc xml:space="preserve">lookup DNS NS records for a domain</doc>
  61519. </member>
  61520. </enumeration>
  61521. <record name="Resource"
  61522. c:type="GResource"
  61523. version="2.32"
  61524. glib:type-name="GResource"
  61525. glib:get-type="g_resource_get_type"
  61526. c:symbol-prefix="resource">
  61527. <doc xml:space="preserve">Applications and libraries often contain binary or textual data that is
  61528. really part of the application, rather than user data. For instance
  61529. #GtkBuilder .ui files, splashscreen images, GMenu markup XML, CSS files,
  61530. icons, etc. These are often shipped as files in `$datadir/appname`, or
  61531. manually included as literal strings in the code.
  61532. The #GResource API and the [glib-compile-resources][glib-compile-resources] program
  61533. provide a convenient and efficient alternative to this which has some nice properties. You
  61534. maintain the files as normal files, so its easy to edit them, but during the build the files
  61535. are combined into a binary bundle that is linked into the executable. This means that loading
  61536. the resource files are efficient (as they are already in memory, shared with other instances) and
  61537. simple (no need to check for things like I/O errors or locate the files in the filesystem). It
  61538. also makes it easier to create relocatable applications.
  61539. Resource files can also be marked as compressed. Such files will be included in the resource bundle
  61540. in a compressed form, but will be automatically uncompressed when the resource is used. This
  61541. is very useful e.g. for larger text files that are parsed once (or rarely) and then thrown away.
  61542. Resource files can also be marked to be preprocessed, by setting the value of the
  61543. `preprocess` attribute to a comma-separated list of preprocessing options.
  61544. The only options currently supported are:
  61545. `xml-stripblanks` which will use the xmllint command
  61546. to strip ignorable whitespace from the XML file. For this to work,
  61547. the `XMLLINT` environment variable must be set to the full path to
  61548. the xmllint executable, or xmllint must be in the `PATH`; otherwise
  61549. the preprocessing step is skipped.
  61550. `to-pixdata` which will use the gdk-pixbuf-pixdata command to convert
  61551. images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside
  61552. the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata
  61553. program must be in the PATH, or the `GDK_PIXBUF_PIXDATA` environment variable must be
  61554. set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will
  61555. abort.
  61556. Resource bundles are created by the [glib-compile-resources][glib-compile-resources] program
  61557. which takes an XML file that describes the bundle, and a set of files that the XML references. These
  61558. are combined into a binary resource bundle.
  61559. An example resource description:
  61560. |[
  61561. &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  61562. &lt;gresources&gt;
  61563. &lt;gresource prefix="/org/gtk/Example"&gt;
  61564. &lt;file&gt;data/splashscreen.png&lt;/file&gt;
  61565. &lt;file compressed="true"&gt;dialog.ui&lt;/file&gt;
  61566. &lt;file preprocess="xml-stripblanks"&gt;menumarkup.xml&lt;/file&gt;
  61567. &lt;/gresource&gt;
  61568. &lt;/gresources&gt;
  61569. ]|
  61570. This will create a resource bundle with the following files:
  61571. |[
  61572. /org/gtk/Example/data/splashscreen.png
  61573. /org/gtk/Example/dialog.ui
  61574. /org/gtk/Example/menumarkup.xml
  61575. ]|
  61576. Note that all resources in the process share the same namespace, so use Java-style
  61577. path prefixes (like in the above example) to avoid conflicts.
  61578. You can then use [glib-compile-resources][glib-compile-resources] to compile the XML to a
  61579. binary bundle that you can load with g_resource_load(). However, its more common to use the --generate-source and
  61580. --generate-header arguments to create a source file and header to link directly into your application.
  61581. This will generate `get_resource()`, `register_resource()` and
  61582. `unregister_resource()` functions, prefixed by the `--c-name` argument passed
  61583. to [glib-compile-resources][glib-compile-resources]. `get_resource()` returns
  61584. the generated #GResource object. The register and unregister functions
  61585. register the resource so its files can be accessed using
  61586. g_resources_lookup_data().
  61587. Once a #GResource has been created and registered all the data in it can be accessed globally in the process by
  61588. using API calls like g_resources_open_stream() to stream the data or g_resources_lookup_data() to get a direct pointer
  61589. to the data. You can also use URIs like "resource:///org/gtk/Example/data/splashscreen.png" with #GFile to access
  61590. the resource data.
  61591. There are two forms of the generated source, the default version uses the compiler support for constructor
  61592. and destructor functions (where available) to automatically create and register the #GResource on startup
  61593. or library load time. If you pass --manual-register two functions to register/unregister the resource is instead
  61594. created. This requires an explicit initialization call in your application/library, but it works on all platforms,
  61595. even on the minor ones where this is not available. (Constructor support is available for at least Win32, Mac OS and Linux.)
  61596. Note that resource data can point directly into the data segment of e.g. a library, so if you are unloading libraries
  61597. during runtime you need to be very careful with keeping around pointers to data from a resource, as this goes away
  61598. when the library is unloaded. However, in practice this is not generally a problem, since most resource accesses
  61599. is for your own resources, and resource data is often used once, during parsing, and then released.</doc>
  61600. <constructor name="new_from_data"
  61601. c:identifier="g_resource_new_from_data"
  61602. version="2.32"
  61603. throws="1">
  61604. <doc xml:space="preserve">Creates a GResource from a reference to the binary resource bundle.
  61605. This will keep a reference to @data while the resource lives, so
  61606. the data should not be modified or freed.
  61607. If you want to use this resource in the global resource namespace you need
  61608. to register it with g_resources_register().</doc>
  61609. <return-value transfer-ownership="full">
  61610. <doc xml:space="preserve">a new #GResource, or %NULL on error</doc>
  61611. <type name="Resource" c:type="GResource*"/>
  61612. </return-value>
  61613. <parameters>
  61614. <parameter name="data" transfer-ownership="none">
  61615. <doc xml:space="preserve">A #GBytes</doc>
  61616. <type name="GLib.Bytes" c:type="GBytes*"/>
  61617. </parameter>
  61618. </parameters>
  61619. </constructor>
  61620. <method name="_register"
  61621. c:identifier="g_resources_register"
  61622. moved-to="resources_register"
  61623. version="2.32">
  61624. <doc xml:space="preserve">Registers the resource with the process-global set of resources.
  61625. Once a resource is registered the files in it can be accessed
  61626. with the global resource lookup functions like g_resources_lookup_data().</doc>
  61627. <return-value transfer-ownership="none">
  61628. <type name="none" c:type="void"/>
  61629. </return-value>
  61630. <parameters>
  61631. <instance-parameter name="resource" transfer-ownership="none">
  61632. <doc xml:space="preserve">A #GResource</doc>
  61633. <type name="Resource" c:type="GResource*"/>
  61634. </instance-parameter>
  61635. </parameters>
  61636. </method>
  61637. <method name="_unregister"
  61638. c:identifier="g_resources_unregister"
  61639. moved-to="resources_unregister"
  61640. version="2.32">
  61641. <doc xml:space="preserve">Unregisters the resource from the process-global set of resources.</doc>
  61642. <return-value transfer-ownership="none">
  61643. <type name="none" c:type="void"/>
  61644. </return-value>
  61645. <parameters>
  61646. <instance-parameter name="resource" transfer-ownership="none">
  61647. <doc xml:space="preserve">A #GResource</doc>
  61648. <type name="Resource" c:type="GResource*"/>
  61649. </instance-parameter>
  61650. </parameters>
  61651. </method>
  61652. <method name="enumerate_children"
  61653. c:identifier="g_resource_enumerate_children"
  61654. version="2.32"
  61655. throws="1">
  61656. <doc xml:space="preserve">Returns all the names of children at the specified @path in the resource.
  61657. The return result is a %NULL terminated list of strings which should
  61658. be released with g_strfreev().
  61659. If @path is invalid or does not exist in the #GResource,
  61660. %G_RESOURCE_ERROR_NOT_FOUND will be returned.
  61661. @lookup_flags controls the behaviour of the lookup.</doc>
  61662. <return-value transfer-ownership="full">
  61663. <doc xml:space="preserve">an array of constant strings</doc>
  61664. <array c:type="char**">
  61665. <type name="utf8"/>
  61666. </array>
  61667. </return-value>
  61668. <parameters>
  61669. <instance-parameter name="resource" transfer-ownership="none">
  61670. <doc xml:space="preserve">A #GResource</doc>
  61671. <type name="Resource" c:type="GResource*"/>
  61672. </instance-parameter>
  61673. <parameter name="path" transfer-ownership="none">
  61674. <doc xml:space="preserve">A pathname inside the resource</doc>
  61675. <type name="utf8" c:type="const char*"/>
  61676. </parameter>
  61677. <parameter name="lookup_flags" transfer-ownership="none">
  61678. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  61679. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  61680. </parameter>
  61681. </parameters>
  61682. </method>
  61683. <method name="get_info"
  61684. c:identifier="g_resource_get_info"
  61685. version="2.32"
  61686. throws="1">
  61687. <doc xml:space="preserve">Looks for a file at the specified @path in the resource and
  61688. if found returns information about it.
  61689. @lookup_flags controls the behaviour of the lookup.</doc>
  61690. <return-value transfer-ownership="none">
  61691. <doc xml:space="preserve">%TRUE if the file was found. %FALSE if there were errors</doc>
  61692. <type name="gboolean" c:type="gboolean"/>
  61693. </return-value>
  61694. <parameters>
  61695. <instance-parameter name="resource" transfer-ownership="none">
  61696. <doc xml:space="preserve">A #GResource</doc>
  61697. <type name="Resource" c:type="GResource*"/>
  61698. </instance-parameter>
  61699. <parameter name="path" transfer-ownership="none">
  61700. <doc xml:space="preserve">A pathname inside the resource</doc>
  61701. <type name="utf8" c:type="const char*"/>
  61702. </parameter>
  61703. <parameter name="lookup_flags" transfer-ownership="none">
  61704. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  61705. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  61706. </parameter>
  61707. <parameter name="size"
  61708. direction="out"
  61709. caller-allocates="0"
  61710. transfer-ownership="full"
  61711. optional="1"
  61712. allow-none="1">
  61713. <doc xml:space="preserve">a location to place the length of the contents of the file,
  61714. or %NULL if the length is not needed</doc>
  61715. <type name="gsize" c:type="gsize*"/>
  61716. </parameter>
  61717. <parameter name="flags"
  61718. direction="out"
  61719. caller-allocates="0"
  61720. transfer-ownership="full"
  61721. optional="1"
  61722. allow-none="1">
  61723. <doc xml:space="preserve">a location to place the flags about the file,
  61724. or %NULL if the length is not needed</doc>
  61725. <type name="guint32" c:type="guint32*"/>
  61726. </parameter>
  61727. </parameters>
  61728. </method>
  61729. <method name="lookup_data"
  61730. c:identifier="g_resource_lookup_data"
  61731. version="2.32"
  61732. throws="1">
  61733. <doc xml:space="preserve">Looks for a file at the specified @path in the resource and
  61734. returns a #GBytes that lets you directly access the data in
  61735. memory.
  61736. The data is always followed by a zero byte, so you
  61737. can safely use the data as a C string. However, that byte
  61738. is not included in the size of the GBytes.
  61739. For uncompressed resource files this is a pointer directly into
  61740. the resource bundle, which is typically in some readonly data section
  61741. in the program binary. For compressed files we allocate memory on
  61742. the heap and automatically uncompress the data.
  61743. @lookup_flags controls the behaviour of the lookup.</doc>
  61744. <return-value transfer-ownership="full">
  61745. <doc xml:space="preserve">#GBytes or %NULL on error.
  61746. Free the returned object with g_bytes_unref()</doc>
  61747. <type name="GLib.Bytes" c:type="GBytes*"/>
  61748. </return-value>
  61749. <parameters>
  61750. <instance-parameter name="resource" transfer-ownership="none">
  61751. <doc xml:space="preserve">A #GResource</doc>
  61752. <type name="Resource" c:type="GResource*"/>
  61753. </instance-parameter>
  61754. <parameter name="path" transfer-ownership="none">
  61755. <doc xml:space="preserve">A pathname inside the resource</doc>
  61756. <type name="utf8" c:type="const char*"/>
  61757. </parameter>
  61758. <parameter name="lookup_flags" transfer-ownership="none">
  61759. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  61760. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  61761. </parameter>
  61762. </parameters>
  61763. </method>
  61764. <method name="open_stream"
  61765. c:identifier="g_resource_open_stream"
  61766. version="2.32"
  61767. throws="1">
  61768. <doc xml:space="preserve">Looks for a file at the specified @path in the resource and
  61769. returns a #GInputStream that lets you read the data.
  61770. @lookup_flags controls the behaviour of the lookup.</doc>
  61771. <return-value transfer-ownership="full">
  61772. <doc xml:space="preserve">#GInputStream or %NULL on error.
  61773. Free the returned object with g_object_unref()</doc>
  61774. <type name="InputStream" c:type="GInputStream*"/>
  61775. </return-value>
  61776. <parameters>
  61777. <instance-parameter name="resource" transfer-ownership="none">
  61778. <doc xml:space="preserve">A #GResource</doc>
  61779. <type name="Resource" c:type="GResource*"/>
  61780. </instance-parameter>
  61781. <parameter name="path" transfer-ownership="none">
  61782. <doc xml:space="preserve">A pathname inside the resource</doc>
  61783. <type name="utf8" c:type="const char*"/>
  61784. </parameter>
  61785. <parameter name="lookup_flags" transfer-ownership="none">
  61786. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  61787. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  61788. </parameter>
  61789. </parameters>
  61790. </method>
  61791. <method name="ref" c:identifier="g_resource_ref" version="2.32">
  61792. <doc xml:space="preserve">Atomically increments the reference count of @resource by one. This
  61793. function is MT-safe and may be called from any thread.</doc>
  61794. <return-value transfer-ownership="full">
  61795. <doc xml:space="preserve">The passed in #GResource</doc>
  61796. <type name="Resource" c:type="GResource*"/>
  61797. </return-value>
  61798. <parameters>
  61799. <instance-parameter name="resource" transfer-ownership="none">
  61800. <doc xml:space="preserve">A #GResource</doc>
  61801. <type name="Resource" c:type="GResource*"/>
  61802. </instance-parameter>
  61803. </parameters>
  61804. </method>
  61805. <method name="unref" c:identifier="g_resource_unref" version="2.32">
  61806. <doc xml:space="preserve">Atomically decrements the reference count of @resource by one. If the
  61807. reference count drops to 0, all memory allocated by the resource is
  61808. released. This function is MT-safe and may be called from any
  61809. thread.</doc>
  61810. <return-value transfer-ownership="none">
  61811. <type name="none" c:type="void"/>
  61812. </return-value>
  61813. <parameters>
  61814. <instance-parameter name="resource" transfer-ownership="none">
  61815. <doc xml:space="preserve">A #GResource</doc>
  61816. <type name="Resource" c:type="GResource*"/>
  61817. </instance-parameter>
  61818. </parameters>
  61819. </method>
  61820. <function name="load"
  61821. c:identifier="g_resource_load"
  61822. version="2.32"
  61823. throws="1">
  61824. <doc xml:space="preserve">Loads a binary resource bundle and creates a #GResource representation of it, allowing
  61825. you to query it for data.
  61826. If you want to use this resource in the global resource namespace you need
  61827. to register it with g_resources_register().</doc>
  61828. <return-value transfer-ownership="full">
  61829. <doc xml:space="preserve">a new #GResource, or %NULL on error</doc>
  61830. <type name="Resource" c:type="GResource*"/>
  61831. </return-value>
  61832. <parameters>
  61833. <parameter name="filename" transfer-ownership="none">
  61834. <doc xml:space="preserve">the path of a filename to load, in the GLib filename encoding</doc>
  61835. <type name="filename" c:type="gchar*"/>
  61836. </parameter>
  61837. </parameters>
  61838. </function>
  61839. </record>
  61840. <enumeration name="ResourceError"
  61841. version="2.32"
  61842. glib:type-name="GResourceError"
  61843. glib:get-type="g_resource_error_get_type"
  61844. c:type="GResourceError"
  61845. glib:error-domain="g-resource-error-quark">
  61846. <doc xml:space="preserve">An error code used with %G_RESOURCE_ERROR in a #GError returned
  61847. from a #GResource routine.</doc>
  61848. <member name="not_found"
  61849. value="0"
  61850. c:identifier="G_RESOURCE_ERROR_NOT_FOUND"
  61851. glib:nick="not-found">
  61852. <doc xml:space="preserve">no file was found at the requested path</doc>
  61853. </member>
  61854. <member name="internal"
  61855. value="1"
  61856. c:identifier="G_RESOURCE_ERROR_INTERNAL"
  61857. glib:nick="internal">
  61858. <doc xml:space="preserve">unknown error</doc>
  61859. </member>
  61860. <function name="quark"
  61861. c:identifier="g_resource_error_quark"
  61862. version="2.32">
  61863. <doc xml:space="preserve">Gets the #GResource Error Quark.</doc>
  61864. <return-value transfer-ownership="none">
  61865. <doc xml:space="preserve">a #GQuark</doc>
  61866. <type name="GLib.Quark" c:type="GQuark"/>
  61867. </return-value>
  61868. </function>
  61869. </enumeration>
  61870. <bitfield name="ResourceFlags"
  61871. version="2.32"
  61872. glib:type-name="GResourceFlags"
  61873. glib:get-type="g_resource_flags_get_type"
  61874. c:type="GResourceFlags">
  61875. <doc xml:space="preserve">GResourceFlags give information about a particular file inside a resource
  61876. bundle.</doc>
  61877. <member name="none"
  61878. value="0"
  61879. c:identifier="G_RESOURCE_FLAGS_NONE"
  61880. glib:nick="none">
  61881. <doc xml:space="preserve">No flags set.</doc>
  61882. </member>
  61883. <member name="compressed"
  61884. value="1"
  61885. c:identifier="G_RESOURCE_FLAGS_COMPRESSED"
  61886. glib:nick="compressed">
  61887. <doc xml:space="preserve">The file is compressed.</doc>
  61888. </member>
  61889. </bitfield>
  61890. <bitfield name="ResourceLookupFlags"
  61891. version="2.32"
  61892. glib:type-name="GResourceLookupFlags"
  61893. glib:get-type="g_resource_lookup_flags_get_type"
  61894. c:type="GResourceLookupFlags">
  61895. <doc xml:space="preserve">GResourceLookupFlags determine how resource path lookups are handled.</doc>
  61896. <member name="none"
  61897. value="0"
  61898. c:identifier="G_RESOURCE_LOOKUP_FLAGS_NONE"
  61899. glib:nick="none">
  61900. <doc xml:space="preserve">No flags set.</doc>
  61901. </member>
  61902. </bitfield>
  61903. <interface name="Seekable"
  61904. c:symbol-prefix="seekable"
  61905. c:type="GSeekable"
  61906. glib:type-name="GSeekable"
  61907. glib:get-type="g_seekable_get_type"
  61908. glib:type-struct="SeekableIface">
  61909. <doc xml:space="preserve">#GSeekable is implemented by streams (implementations of
  61910. #GInputStream or #GOutputStream) that support seeking.
  61911. Seekable streams largely fall into two categories: resizable and
  61912. fixed-size.
  61913. #GSeekable on fixed-sized streams is approximately the same as POSIX
  61914. lseek() on a block device (for example: attmepting to seek past the
  61915. end of the device is an error). Fixed streams typically cannot be
  61916. truncated.
  61917. #GSeekable on resizable streams is approximately the same as POSIX
  61918. lseek() on a normal file. Seeking past the end and writing data will
  61919. usually cause the stream to resize by introducing zero bytes.</doc>
  61920. <virtual-method name="can_seek" invoker="can_seek">
  61921. <doc xml:space="preserve">Tests if the stream supports the #GSeekableIface.</doc>
  61922. <return-value transfer-ownership="none">
  61923. <doc xml:space="preserve">%TRUE if @seekable can be seeked. %FALSE otherwise.</doc>
  61924. <type name="gboolean" c:type="gboolean"/>
  61925. </return-value>
  61926. <parameters>
  61927. <instance-parameter name="seekable" transfer-ownership="none">
  61928. <doc xml:space="preserve">a #GSeekable.</doc>
  61929. <type name="Seekable" c:type="GSeekable*"/>
  61930. </instance-parameter>
  61931. </parameters>
  61932. </virtual-method>
  61933. <virtual-method name="can_truncate" invoker="can_truncate">
  61934. <doc xml:space="preserve">Tests if the stream can be truncated.</doc>
  61935. <return-value transfer-ownership="none">
  61936. <doc xml:space="preserve">%TRUE if the stream can be truncated, %FALSE otherwise.</doc>
  61937. <type name="gboolean" c:type="gboolean"/>
  61938. </return-value>
  61939. <parameters>
  61940. <instance-parameter name="seekable" transfer-ownership="none">
  61941. <doc xml:space="preserve">a #GSeekable.</doc>
  61942. <type name="Seekable" c:type="GSeekable*"/>
  61943. </instance-parameter>
  61944. </parameters>
  61945. </virtual-method>
  61946. <virtual-method name="seek" invoker="seek" throws="1">
  61947. <doc xml:space="preserve">Seeks in the stream by the given @offset, modified by @type.
  61948. Attempting to seek past the end of the stream will have different
  61949. results depending on if the stream is fixed-sized or resizable. If
  61950. the stream is resizable then seeking past the end and then writing
  61951. will result in zeros filling the empty space. Seeking past the end
  61952. of a resizable stream and reading will result in EOF. Seeking past
  61953. the end of a fixed-sized stream will fail.
  61954. Any operation that would result in a negative offset will fail.
  61955. If @cancellable is not %NULL, then the operation can be cancelled by
  61956. triggering the cancellable object from another thread. If the operation
  61957. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  61958. <return-value transfer-ownership="none">
  61959. <doc xml:space="preserve">%TRUE if successful. If an error
  61960. has occurred, this function will return %FALSE and set @error
  61961. appropriately if present.</doc>
  61962. <type name="gboolean" c:type="gboolean"/>
  61963. </return-value>
  61964. <parameters>
  61965. <instance-parameter name="seekable" transfer-ownership="none">
  61966. <doc xml:space="preserve">a #GSeekable.</doc>
  61967. <type name="Seekable" c:type="GSeekable*"/>
  61968. </instance-parameter>
  61969. <parameter name="offset" transfer-ownership="none">
  61970. <doc xml:space="preserve">a #goffset.</doc>
  61971. <type name="gint64" c:type="goffset"/>
  61972. </parameter>
  61973. <parameter name="type" transfer-ownership="none">
  61974. <doc xml:space="preserve">a #GSeekType.</doc>
  61975. <type name="GLib.SeekType" c:type="GSeekType"/>
  61976. </parameter>
  61977. <parameter name="cancellable"
  61978. transfer-ownership="none"
  61979. nullable="1"
  61980. allow-none="1">
  61981. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  61982. <type name="Cancellable" c:type="GCancellable*"/>
  61983. </parameter>
  61984. </parameters>
  61985. </virtual-method>
  61986. <virtual-method name="tell" invoker="tell">
  61987. <doc xml:space="preserve">Tells the current position within the stream.</doc>
  61988. <return-value transfer-ownership="none">
  61989. <doc xml:space="preserve">the offset from the beginning of the buffer.</doc>
  61990. <type name="gint64" c:type="goffset"/>
  61991. </return-value>
  61992. <parameters>
  61993. <instance-parameter name="seekable" transfer-ownership="none">
  61994. <doc xml:space="preserve">a #GSeekable.</doc>
  61995. <type name="Seekable" c:type="GSeekable*"/>
  61996. </instance-parameter>
  61997. </parameters>
  61998. </virtual-method>
  61999. <virtual-method name="truncate_fn" invoker="truncate" throws="1">
  62000. <doc xml:space="preserve">Truncates a stream with a given #offset.
  62001. If @cancellable is not %NULL, then the operation can be cancelled by
  62002. triggering the cancellable object from another thread. If the operation
  62003. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  62004. operation was partially finished when the operation was cancelled the
  62005. partial result will be returned, without an error.</doc>
  62006. <return-value transfer-ownership="none">
  62007. <doc xml:space="preserve">%TRUE if successful. If an error
  62008. has occurred, this function will return %FALSE and set @error
  62009. appropriately if present.</doc>
  62010. <type name="gboolean" c:type="gboolean"/>
  62011. </return-value>
  62012. <parameters>
  62013. <instance-parameter name="seekable" transfer-ownership="none">
  62014. <doc xml:space="preserve">a #GSeekable.</doc>
  62015. <type name="Seekable" c:type="GSeekable*"/>
  62016. </instance-parameter>
  62017. <parameter name="offset" transfer-ownership="none">
  62018. <doc xml:space="preserve">a #goffset.</doc>
  62019. <type name="gint64" c:type="goffset"/>
  62020. </parameter>
  62021. <parameter name="cancellable"
  62022. transfer-ownership="none"
  62023. nullable="1"
  62024. allow-none="1">
  62025. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  62026. <type name="Cancellable" c:type="GCancellable*"/>
  62027. </parameter>
  62028. </parameters>
  62029. </virtual-method>
  62030. <method name="can_seek" c:identifier="g_seekable_can_seek">
  62031. <doc xml:space="preserve">Tests if the stream supports the #GSeekableIface.</doc>
  62032. <return-value transfer-ownership="none">
  62033. <doc xml:space="preserve">%TRUE if @seekable can be seeked. %FALSE otherwise.</doc>
  62034. <type name="gboolean" c:type="gboolean"/>
  62035. </return-value>
  62036. <parameters>
  62037. <instance-parameter name="seekable" transfer-ownership="none">
  62038. <doc xml:space="preserve">a #GSeekable.</doc>
  62039. <type name="Seekable" c:type="GSeekable*"/>
  62040. </instance-parameter>
  62041. </parameters>
  62042. </method>
  62043. <method name="can_truncate" c:identifier="g_seekable_can_truncate">
  62044. <doc xml:space="preserve">Tests if the stream can be truncated.</doc>
  62045. <return-value transfer-ownership="none">
  62046. <doc xml:space="preserve">%TRUE if the stream can be truncated, %FALSE otherwise.</doc>
  62047. <type name="gboolean" c:type="gboolean"/>
  62048. </return-value>
  62049. <parameters>
  62050. <instance-parameter name="seekable" transfer-ownership="none">
  62051. <doc xml:space="preserve">a #GSeekable.</doc>
  62052. <type name="Seekable" c:type="GSeekable*"/>
  62053. </instance-parameter>
  62054. </parameters>
  62055. </method>
  62056. <method name="seek" c:identifier="g_seekable_seek" throws="1">
  62057. <doc xml:space="preserve">Seeks in the stream by the given @offset, modified by @type.
  62058. Attempting to seek past the end of the stream will have different
  62059. results depending on if the stream is fixed-sized or resizable. If
  62060. the stream is resizable then seeking past the end and then writing
  62061. will result in zeros filling the empty space. Seeking past the end
  62062. of a resizable stream and reading will result in EOF. Seeking past
  62063. the end of a fixed-sized stream will fail.
  62064. Any operation that would result in a negative offset will fail.
  62065. If @cancellable is not %NULL, then the operation can be cancelled by
  62066. triggering the cancellable object from another thread. If the operation
  62067. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  62068. <return-value transfer-ownership="none">
  62069. <doc xml:space="preserve">%TRUE if successful. If an error
  62070. has occurred, this function will return %FALSE and set @error
  62071. appropriately if present.</doc>
  62072. <type name="gboolean" c:type="gboolean"/>
  62073. </return-value>
  62074. <parameters>
  62075. <instance-parameter name="seekable" transfer-ownership="none">
  62076. <doc xml:space="preserve">a #GSeekable.</doc>
  62077. <type name="Seekable" c:type="GSeekable*"/>
  62078. </instance-parameter>
  62079. <parameter name="offset" transfer-ownership="none">
  62080. <doc xml:space="preserve">a #goffset.</doc>
  62081. <type name="gint64" c:type="goffset"/>
  62082. </parameter>
  62083. <parameter name="type" transfer-ownership="none">
  62084. <doc xml:space="preserve">a #GSeekType.</doc>
  62085. <type name="GLib.SeekType" c:type="GSeekType"/>
  62086. </parameter>
  62087. <parameter name="cancellable"
  62088. transfer-ownership="none"
  62089. nullable="1"
  62090. allow-none="1">
  62091. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  62092. <type name="Cancellable" c:type="GCancellable*"/>
  62093. </parameter>
  62094. </parameters>
  62095. </method>
  62096. <method name="tell" c:identifier="g_seekable_tell">
  62097. <doc xml:space="preserve">Tells the current position within the stream.</doc>
  62098. <return-value transfer-ownership="none">
  62099. <doc xml:space="preserve">the offset from the beginning of the buffer.</doc>
  62100. <type name="gint64" c:type="goffset"/>
  62101. </return-value>
  62102. <parameters>
  62103. <instance-parameter name="seekable" transfer-ownership="none">
  62104. <doc xml:space="preserve">a #GSeekable.</doc>
  62105. <type name="Seekable" c:type="GSeekable*"/>
  62106. </instance-parameter>
  62107. </parameters>
  62108. </method>
  62109. <method name="truncate" c:identifier="g_seekable_truncate" throws="1">
  62110. <doc xml:space="preserve">Truncates a stream with a given #offset.
  62111. If @cancellable is not %NULL, then the operation can be cancelled by
  62112. triggering the cancellable object from another thread. If the operation
  62113. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
  62114. operation was partially finished when the operation was cancelled the
  62115. partial result will be returned, without an error.</doc>
  62116. <return-value transfer-ownership="none">
  62117. <doc xml:space="preserve">%TRUE if successful. If an error
  62118. has occurred, this function will return %FALSE and set @error
  62119. appropriately if present.</doc>
  62120. <type name="gboolean" c:type="gboolean"/>
  62121. </return-value>
  62122. <parameters>
  62123. <instance-parameter name="seekable" transfer-ownership="none">
  62124. <doc xml:space="preserve">a #GSeekable.</doc>
  62125. <type name="Seekable" c:type="GSeekable*"/>
  62126. </instance-parameter>
  62127. <parameter name="offset" transfer-ownership="none">
  62128. <doc xml:space="preserve">a #goffset.</doc>
  62129. <type name="gint64" c:type="goffset"/>
  62130. </parameter>
  62131. <parameter name="cancellable"
  62132. transfer-ownership="none"
  62133. nullable="1"
  62134. allow-none="1">
  62135. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  62136. <type name="Cancellable" c:type="GCancellable*"/>
  62137. </parameter>
  62138. </parameters>
  62139. </method>
  62140. </interface>
  62141. <record name="SeekableIface"
  62142. c:type="GSeekableIface"
  62143. glib:is-gtype-struct-for="Seekable">
  62144. <doc xml:space="preserve">Provides an interface for implementing seekable functionality on I/O Streams.</doc>
  62145. <field name="g_iface">
  62146. <doc xml:space="preserve">The parent interface.</doc>
  62147. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  62148. </field>
  62149. <field name="tell">
  62150. <callback name="tell">
  62151. <return-value transfer-ownership="none">
  62152. <doc xml:space="preserve">the offset from the beginning of the buffer.</doc>
  62153. <type name="gint64" c:type="goffset"/>
  62154. </return-value>
  62155. <parameters>
  62156. <parameter name="seekable" transfer-ownership="none">
  62157. <doc xml:space="preserve">a #GSeekable.</doc>
  62158. <type name="Seekable" c:type="GSeekable*"/>
  62159. </parameter>
  62160. </parameters>
  62161. </callback>
  62162. </field>
  62163. <field name="can_seek">
  62164. <callback name="can_seek">
  62165. <return-value transfer-ownership="none">
  62166. <doc xml:space="preserve">%TRUE if @seekable can be seeked. %FALSE otherwise.</doc>
  62167. <type name="gboolean" c:type="gboolean"/>
  62168. </return-value>
  62169. <parameters>
  62170. <parameter name="seekable" transfer-ownership="none">
  62171. <doc xml:space="preserve">a #GSeekable.</doc>
  62172. <type name="Seekable" c:type="GSeekable*"/>
  62173. </parameter>
  62174. </parameters>
  62175. </callback>
  62176. </field>
  62177. <field name="seek">
  62178. <callback name="seek" throws="1">
  62179. <return-value transfer-ownership="none">
  62180. <doc xml:space="preserve">%TRUE if successful. If an error
  62181. has occurred, this function will return %FALSE and set @error
  62182. appropriately if present.</doc>
  62183. <type name="gboolean" c:type="gboolean"/>
  62184. </return-value>
  62185. <parameters>
  62186. <parameter name="seekable" transfer-ownership="none">
  62187. <doc xml:space="preserve">a #GSeekable.</doc>
  62188. <type name="Seekable" c:type="GSeekable*"/>
  62189. </parameter>
  62190. <parameter name="offset" transfer-ownership="none">
  62191. <doc xml:space="preserve">a #goffset.</doc>
  62192. <type name="gint64" c:type="goffset"/>
  62193. </parameter>
  62194. <parameter name="type" transfer-ownership="none">
  62195. <doc xml:space="preserve">a #GSeekType.</doc>
  62196. <type name="GLib.SeekType" c:type="GSeekType"/>
  62197. </parameter>
  62198. <parameter name="cancellable"
  62199. transfer-ownership="none"
  62200. nullable="1"
  62201. allow-none="1">
  62202. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  62203. <type name="Cancellable" c:type="GCancellable*"/>
  62204. </parameter>
  62205. </parameters>
  62206. </callback>
  62207. </field>
  62208. <field name="can_truncate">
  62209. <callback name="can_truncate">
  62210. <return-value transfer-ownership="none">
  62211. <doc xml:space="preserve">%TRUE if the stream can be truncated, %FALSE otherwise.</doc>
  62212. <type name="gboolean" c:type="gboolean"/>
  62213. </return-value>
  62214. <parameters>
  62215. <parameter name="seekable" transfer-ownership="none">
  62216. <doc xml:space="preserve">a #GSeekable.</doc>
  62217. <type name="Seekable" c:type="GSeekable*"/>
  62218. </parameter>
  62219. </parameters>
  62220. </callback>
  62221. </field>
  62222. <field name="truncate_fn">
  62223. <callback name="truncate_fn" throws="1">
  62224. <return-value transfer-ownership="none">
  62225. <doc xml:space="preserve">%TRUE if successful. If an error
  62226. has occurred, this function will return %FALSE and set @error
  62227. appropriately if present.</doc>
  62228. <type name="gboolean" c:type="gboolean"/>
  62229. </return-value>
  62230. <parameters>
  62231. <parameter name="seekable" transfer-ownership="none">
  62232. <doc xml:space="preserve">a #GSeekable.</doc>
  62233. <type name="Seekable" c:type="GSeekable*"/>
  62234. </parameter>
  62235. <parameter name="offset" transfer-ownership="none">
  62236. <doc xml:space="preserve">a #goffset.</doc>
  62237. <type name="gint64" c:type="goffset"/>
  62238. </parameter>
  62239. <parameter name="cancellable"
  62240. transfer-ownership="none"
  62241. nullable="1"
  62242. allow-none="1">
  62243. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  62244. <type name="Cancellable" c:type="GCancellable*"/>
  62245. </parameter>
  62246. </parameters>
  62247. </callback>
  62248. </field>
  62249. </record>
  62250. <class name="Settings"
  62251. c:symbol-prefix="settings"
  62252. c:type="GSettings"
  62253. parent="GObject.Object"
  62254. glib:type-name="GSettings"
  62255. glib:get-type="g_settings_get_type"
  62256. glib:type-struct="SettingsClass">
  62257. <doc xml:space="preserve">The #GSettings class provides a convenient API for storing and retrieving
  62258. application settings.
  62259. Reads and writes can be considered to be non-blocking. Reading
  62260. settings with #GSettings is typically extremely fast: on
  62261. approximately the same order of magnitude (but slower than) a
  62262. #GHashTable lookup. Writing settings is also extremely fast in terms
  62263. of time to return to your application, but can be extremely expensive
  62264. for other threads and other processes. Many settings backends
  62265. (including dconf) have lazy initialisation which means in the common
  62266. case of the user using their computer without modifying any settings
  62267. a lot of work can be avoided. For dconf, the D-Bus service doesn't
  62268. even need to be started in this case. For this reason, you should
  62269. only ever modify #GSettings keys in response to explicit user action.
  62270. Particular care should be paid to ensure that modifications are not
  62271. made during startup -- for example, when setting the initial value
  62272. of preferences widgets. The built-in g_settings_bind() functionality
  62273. is careful not to write settings in response to notify signals as a
  62274. result of modifications that it makes to widgets.
  62275. When creating a GSettings instance, you have to specify a schema
  62276. that describes the keys in your settings and their types and default
  62277. values, as well as some other information.
  62278. Normally, a schema has as fixed path that determines where the settings
  62279. are stored in the conceptual global tree of settings. However, schemas
  62280. can also be '[relocatable][gsettings-relocatable]', i.e. not equipped with
  62281. a fixed path. This is
  62282. useful e.g. when the schema describes an 'account', and you want to be
  62283. able to store a arbitrary number of accounts.
  62284. Paths must start with and end with a forward slash character ('/')
  62285. and must not contain two sequential slash characters. Paths should
  62286. be chosen based on a domain name associated with the program or
  62287. library to which the settings belong. Examples of paths are
  62288. "/org/gtk/settings/file-chooser/" and "/ca/desrt/dconf-editor/".
  62289. Paths should not start with "/apps/", "/desktop/" or "/system/" as
  62290. they often did in GConf.
  62291. Unlike other configuration systems (like GConf), GSettings does not
  62292. restrict keys to basic types like strings and numbers. GSettings stores
  62293. values as #GVariant, and allows any #GVariantType for keys. Key names
  62294. are restricted to lowercase characters, numbers and '-'. Furthermore,
  62295. the names must begin with a lowercase character, must not end
  62296. with a '-', and must not contain consecutive dashes.
  62297. Similar to GConf, the default values in GSettings schemas can be
  62298. localized, but the localized values are stored in gettext catalogs
  62299. and looked up with the domain that is specified in the
  62300. `gettext-domain` attribute of the &lt;schemalist&gt; or &lt;schema&gt;
  62301. elements and the category that is specified in the `l10n` attribute of
  62302. the &lt;default&gt; element. The string which is translated includes all text in
  62303. the &lt;default&gt; element, including any surrounding quotation marks.
  62304. The `l10n` attribute must be set to `messages` or `time`, and sets the
  62305. [locale category for
  62306. translation](https://www.gnu.org/software/gettext/manual/html_node/Aspects.html#index-locale-categories-1).
  62307. The `messages` category should be used by default; use `time` for
  62308. translatable date or time formats. A translation comment can be added as an
  62309. XML comment immediately above the &lt;default&gt; element — it is recommended to
  62310. add these comments to aid translators understand the meaning and
  62311. implications of the default value. An optional translation `context`
  62312. attribute can be set on the &lt;default&gt; element to disambiguate multiple
  62313. defaults which use the same string.
  62314. For example:
  62315. |[
  62316. &lt;!-- Translators: A list of words which are not allowed to be typed, in
  62317. GVariant serialization syntax.
  62318. See: https://developer.gnome.org/glib/stable/gvariant-text.html --&gt;
  62319. &lt;default l10n='messages' context='Banned words'&gt;['bad', 'words']&lt;/default&gt;
  62320. ]|
  62321. Translations of default values must remain syntactically valid serialized
  62322. #GVariants (e.g. retaining any surrounding quotation marks) or runtime
  62323. errors will occur.
  62324. GSettings uses schemas in a compact binary form that is created
  62325. by the [glib-compile-schemas][glib-compile-schemas]
  62326. utility. The input is a schema description in an XML format.
  62327. A DTD for the gschema XML format can be found here:
  62328. [gschema.dtd](https://git.gnome.org/browse/glib/tree/gio/gschema.dtd)
  62329. The [glib-compile-schemas][glib-compile-schemas] tool expects schema
  62330. files to have the extension `.gschema.xml`.
  62331. At runtime, schemas are identified by their id (as specified in the
  62332. id attribute of the &lt;schema&gt; element). The convention for schema
  62333. ids is to use a dotted name, similar in style to a D-Bus bus name,
  62334. e.g. "org.gnome.SessionManager". In particular, if the settings are
  62335. for a specific service that owns a D-Bus bus name, the D-Bus bus name
  62336. and schema id should match. For schemas which deal with settings not
  62337. associated with one named application, the id should not use
  62338. StudlyCaps, e.g. "org.gnome.font-rendering".
  62339. In addition to #GVariant types, keys can have types that have
  62340. enumerated types. These can be described by a &lt;choice&gt;,
  62341. &lt;enum&gt; or &lt;flags&gt; element, as seen in the
  62342. [example][schema-enumerated]. The underlying type of such a key
  62343. is string, but you can use g_settings_get_enum(), g_settings_set_enum(),
  62344. g_settings_get_flags(), g_settings_set_flags() access the numeric values
  62345. corresponding to the string value of enum and flags keys.
  62346. An example for default value:
  62347. |[
  62348. &lt;schemalist&gt;
  62349. &lt;schema id="org.gtk.Test" path="/org/gtk/Test/" gettext-domain="test"&gt;
  62350. &lt;key name="greeting" type="s"&gt;
  62351. &lt;default l10n="messages"&gt;"Hello, earthlings"&lt;/default&gt;
  62352. &lt;summary&gt;A greeting&lt;/summary&gt;
  62353. &lt;description&gt;
  62354. Greeting of the invading martians
  62355. &lt;/description&gt;
  62356. &lt;/key&gt;
  62357. &lt;key name="box" type="(ii)"&gt;
  62358. &lt;default&gt;(20,30)&lt;/default&gt;
  62359. &lt;/key&gt;
  62360. &lt;/schema&gt;
  62361. &lt;/schemalist&gt;
  62362. ]|
  62363. An example for ranges, choices and enumerated types:
  62364. |[
  62365. &lt;schemalist&gt;
  62366. &lt;enum id="org.gtk.Test.myenum"&gt;
  62367. &lt;value nick="first" value="1"/&gt;
  62368. &lt;value nick="second" value="2"/&gt;
  62369. &lt;/enum&gt;
  62370. &lt;flags id="org.gtk.Test.myflags"&gt;
  62371. &lt;value nick="flag1" value="1"/&gt;
  62372. &lt;value nick="flag2" value="2"/&gt;
  62373. &lt;value nick="flag3" value="4"/&gt;
  62374. &lt;/flags&gt;
  62375. &lt;schema id="org.gtk.Test"&gt;
  62376. &lt;key name="key-with-range" type="i"&gt;
  62377. &lt;range min="1" max="100"/&gt;
  62378. &lt;default&gt;10&lt;/default&gt;
  62379. &lt;/key&gt;
  62380. &lt;key name="key-with-choices" type="s"&gt;
  62381. &lt;choices&gt;
  62382. &lt;choice value='Elisabeth'/&gt;
  62383. &lt;choice value='Annabeth'/&gt;
  62384. &lt;choice value='Joe'/&gt;
  62385. &lt;/choices&gt;
  62386. &lt;aliases&gt;
  62387. &lt;alias value='Anna' target='Annabeth'/&gt;
  62388. &lt;alias value='Beth' target='Elisabeth'/&gt;
  62389. &lt;/aliases&gt;
  62390. &lt;default&gt;'Joe'&lt;/default&gt;
  62391. &lt;/key&gt;
  62392. &lt;key name='enumerated-key' enum='org.gtk.Test.myenum'&gt;
  62393. &lt;default&gt;'first'&lt;/default&gt;
  62394. &lt;/key&gt;
  62395. &lt;key name='flags-key' flags='org.gtk.Test.myflags'&gt;
  62396. &lt;default&gt;["flag1","flag2"]&lt;/default&gt;
  62397. &lt;/key&gt;
  62398. &lt;/schema&gt;
  62399. &lt;/schemalist&gt;
  62400. ]|
  62401. ## Vendor overrides
  62402. Default values are defined in the schemas that get installed by
  62403. an application. Sometimes, it is necessary for a vendor or distributor
  62404. to adjust these defaults. Since patching the XML source for the schema
  62405. is inconvenient and error-prone,
  62406. [glib-compile-schemas][glib-compile-schemas] reads so-called vendor
  62407. override' files. These are keyfiles in the same directory as the XML
  62408. schema sources which can override default values. The schema id serves
  62409. as the group name in the key file, and the values are expected in
  62410. serialized GVariant form, as in the following example:
  62411. |[
  62412. [org.gtk.Example]
  62413. key1='string'
  62414. key2=1.5
  62415. ]|
  62416. glib-compile-schemas expects schema files to have the extension
  62417. `.gschema.override`.
  62418. ## Binding
  62419. A very convenient feature of GSettings lets you bind #GObject properties
  62420. directly to settings, using g_settings_bind(). Once a GObject property
  62421. has been bound to a setting, changes on either side are automatically
  62422. propagated to the other side. GSettings handles details like mapping
  62423. between GObject and GVariant types, and preventing infinite cycles.
  62424. This makes it very easy to hook up a preferences dialog to the
  62425. underlying settings. To make this even more convenient, GSettings
  62426. looks for a boolean property with the name "sensitivity" and
  62427. automatically binds it to the writability of the bound setting.
  62428. If this 'magic' gets in the way, it can be suppressed with the
  62429. #G_SETTINGS_BIND_NO_SENSITIVITY flag.
  62430. ## Relocatable schemas # {#gsettings-relocatable}
  62431. A relocatable schema is one with no `path` attribute specified on its
  62432. &lt;schema&gt; element. By using g_settings_new_with_path(), a #GSettings object
  62433. can be instantiated for a relocatable schema, assigning a path to the
  62434. instance. Paths passed to g_settings_new_with_path() will typically be
  62435. constructed dynamically from a constant prefix plus some form of instance
  62436. identifier; but they must still be valid GSettings paths. Paths could also
  62437. be constant and used with a globally installed schema originating from a
  62438. dependency library.
  62439. For example, a relocatable schema could be used to store geometry information
  62440. for different windows in an application. If the schema ID was
  62441. `org.foo.MyApp.Window`, it could be instantiated for paths
  62442. `/org/foo/MyApp/main/`, `/org/foo/MyApp/document-1/`,
  62443. `/org/foo/MyApp/document-2/`, etc. If any of the paths are well-known
  62444. they can be specified as &lt;child&gt; elements in the parent schema, e.g.:
  62445. |[
  62446. &lt;schema id="org.foo.MyApp" path="/org/foo/MyApp/"&gt;
  62447. &lt;child name="main" schema="org.foo.MyApp.Window"/&gt;
  62448. &lt;/schema&gt;
  62449. ]|
  62450. ## Build system integration # {#gsettings-build-system}
  62451. GSettings comes with autotools integration to simplify compiling and
  62452. installing schemas. To add GSettings support to an application, add the
  62453. following to your `configure.ac`:
  62454. |[
  62455. GLIB_GSETTINGS
  62456. ]|
  62457. In the appropriate `Makefile.am`, use the following snippet to compile and
  62458. install the named schema:
  62459. |[
  62460. gsettings_SCHEMAS = org.foo.MyApp.gschema.xml
  62461. EXTRA_DIST = $(gsettings_SCHEMAS)
  62462. @GSETTINGS_RULES@
  62463. ]|
  62464. No changes are needed to the build system to mark a schema XML file for
  62465. translation. Assuming it sets the `gettext-domain` attribute, a schema may
  62466. be marked for translation by adding it to `POTFILES.in`, assuming gettext
  62467. 0.19 is in use (the preferred method for translation):
  62468. |[
  62469. data/org.foo.MyApp.gschema.xml
  62470. ]|
  62471. Alternatively, if intltool 0.50.1 is in use:
  62472. |[
  62473. [type: gettext/gsettings]data/org.foo.MyApp.gschema.xml
  62474. ]|
  62475. GSettings will use gettext to look up translations for the &lt;summary&gt; and
  62476. &lt;description&gt; elements, and also any &lt;default&gt; elements which have a `l10n`
  62477. attribute set. Translations must not be included in the `.gschema.xml` file
  62478. by the build system, for example by using intltool XML rules with a
  62479. `.gschema.xml.in` template.
  62480. If an enumerated type defined in a C header file is to be used in a GSettings
  62481. schema, it can either be defined manually using an &lt;enum&gt; element in the
  62482. schema XML, or it can be extracted automatically from the C header. This
  62483. approach is preferred, as it ensures the two representations are always
  62484. synchronised. To do so, add the following to the relevant `Makefile.am`:
  62485. |[
  62486. gsettings_ENUM_NAMESPACE = org.foo.MyApp
  62487. gsettings_ENUM_FILES = my-app-enums.h my-app-misc.h
  62488. ]|
  62489. `gsettings_ENUM_NAMESPACE` specifies the schema namespace for the enum files,
  62490. which are specified in `gsettings_ENUM_FILES`. This will generate a
  62491. `org.foo.MyApp.enums.xml` file containing the extracted enums, which will be
  62492. automatically included in the schema compilation, install and uninstall
  62493. rules. It should not be committed to version control or included in
  62494. `EXTRA_DIST`.</doc>
  62495. <constructor name="new" c:identifier="g_settings_new" version="2.26">
  62496. <doc xml:space="preserve">Creates a new #GSettings object with the schema specified by
  62497. @schema_id.
  62498. Signals on the newly created #GSettings object will be dispatched
  62499. via the thread-default #GMainContext in effect at the time of the
  62500. call to g_settings_new(). The new #GSettings will hold a reference
  62501. on the context. See g_main_context_push_thread_default().</doc>
  62502. <return-value transfer-ownership="full">
  62503. <doc xml:space="preserve">a new #GSettings object</doc>
  62504. <type name="Settings" c:type="GSettings*"/>
  62505. </return-value>
  62506. <parameters>
  62507. <parameter name="schema_id" transfer-ownership="none">
  62508. <doc xml:space="preserve">the id of the schema</doc>
  62509. <type name="utf8" c:type="const gchar*"/>
  62510. </parameter>
  62511. </parameters>
  62512. </constructor>
  62513. <constructor name="new_full"
  62514. c:identifier="g_settings_new_full"
  62515. version="2.32">
  62516. <doc xml:space="preserve">Creates a new #GSettings object with a given schema, backend and
  62517. path.
  62518. It should be extremely rare that you ever want to use this function.
  62519. It is made available for advanced use-cases (such as plugin systems
  62520. that want to provide access to schemas loaded from custom locations,
  62521. etc).
  62522. At the most basic level, a #GSettings object is a pure composition of
  62523. 4 things: a #GSettingsSchema, a #GSettingsBackend, a path within that
  62524. backend, and a #GMainContext to which signals are dispatched.
  62525. This constructor therefore gives you full control over constructing
  62526. #GSettings instances. The first 3 parameters are given directly as
  62527. @schema, @backend and @path, and the main context is taken from the
  62528. thread-default (as per g_settings_new()).
  62529. If @backend is %NULL then the default backend is used.
  62530. If @path is %NULL then the path from the schema is used. It is an
  62531. error if @path is %NULL and the schema has no path of its own or if
  62532. @path is non-%NULL and not equal to the path that the schema does
  62533. have.</doc>
  62534. <return-value transfer-ownership="full">
  62535. <doc xml:space="preserve">a new #GSettings object</doc>
  62536. <type name="Settings" c:type="GSettings*"/>
  62537. </return-value>
  62538. <parameters>
  62539. <parameter name="schema" transfer-ownership="none">
  62540. <doc xml:space="preserve">a #GSettingsSchema</doc>
  62541. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  62542. </parameter>
  62543. <parameter name="backend"
  62544. transfer-ownership="none"
  62545. nullable="1"
  62546. allow-none="1">
  62547. <doc xml:space="preserve">a #GSettingsBackend</doc>
  62548. <type name="SettingsBackend" c:type="GSettingsBackend*"/>
  62549. </parameter>
  62550. <parameter name="path"
  62551. transfer-ownership="none"
  62552. nullable="1"
  62553. allow-none="1">
  62554. <doc xml:space="preserve">the path to use</doc>
  62555. <type name="utf8" c:type="const gchar*"/>
  62556. </parameter>
  62557. </parameters>
  62558. </constructor>
  62559. <constructor name="new_with_backend"
  62560. c:identifier="g_settings_new_with_backend"
  62561. version="2.26">
  62562. <doc xml:space="preserve">Creates a new #GSettings object with the schema specified by
  62563. @schema_id and a given #GSettingsBackend.
  62564. Creating a #GSettings object with a different backend allows accessing
  62565. settings from a database other than the usual one. For example, it may make
  62566. sense to pass a backend corresponding to the "defaults" settings database on
  62567. the system to get a settings object that modifies the system default
  62568. settings instead of the settings for this user.</doc>
  62569. <return-value transfer-ownership="full">
  62570. <doc xml:space="preserve">a new #GSettings object</doc>
  62571. <type name="Settings" c:type="GSettings*"/>
  62572. </return-value>
  62573. <parameters>
  62574. <parameter name="schema_id" transfer-ownership="none">
  62575. <doc xml:space="preserve">the id of the schema</doc>
  62576. <type name="utf8" c:type="const gchar*"/>
  62577. </parameter>
  62578. <parameter name="backend" transfer-ownership="none">
  62579. <doc xml:space="preserve">the #GSettingsBackend to use</doc>
  62580. <type name="SettingsBackend" c:type="GSettingsBackend*"/>
  62581. </parameter>
  62582. </parameters>
  62583. </constructor>
  62584. <constructor name="new_with_backend_and_path"
  62585. c:identifier="g_settings_new_with_backend_and_path"
  62586. version="2.26">
  62587. <doc xml:space="preserve">Creates a new #GSettings object with the schema specified by
  62588. @schema_id and a given #GSettingsBackend and path.
  62589. This is a mix of g_settings_new_with_backend() and
  62590. g_settings_new_with_path().</doc>
  62591. <return-value transfer-ownership="full">
  62592. <doc xml:space="preserve">a new #GSettings object</doc>
  62593. <type name="Settings" c:type="GSettings*"/>
  62594. </return-value>
  62595. <parameters>
  62596. <parameter name="schema_id" transfer-ownership="none">
  62597. <doc xml:space="preserve">the id of the schema</doc>
  62598. <type name="utf8" c:type="const gchar*"/>
  62599. </parameter>
  62600. <parameter name="backend" transfer-ownership="none">
  62601. <doc xml:space="preserve">the #GSettingsBackend to use</doc>
  62602. <type name="SettingsBackend" c:type="GSettingsBackend*"/>
  62603. </parameter>
  62604. <parameter name="path" transfer-ownership="none">
  62605. <doc xml:space="preserve">the path to use</doc>
  62606. <type name="utf8" c:type="const gchar*"/>
  62607. </parameter>
  62608. </parameters>
  62609. </constructor>
  62610. <constructor name="new_with_path"
  62611. c:identifier="g_settings_new_with_path"
  62612. version="2.26">
  62613. <doc xml:space="preserve">Creates a new #GSettings object with the relocatable schema specified
  62614. by @schema_id and a given path.
  62615. You only need to do this if you want to directly create a settings
  62616. object with a schema that doesn't have a specified path of its own.
  62617. That's quite rare.
  62618. It is a programmer error to call this function for a schema that
  62619. has an explicitly specified path.
  62620. It is a programmer error if @path is not a valid path. A valid path
  62621. begins and ends with '/' and does not contain two consecutive '/'
  62622. characters.</doc>
  62623. <return-value transfer-ownership="full">
  62624. <doc xml:space="preserve">a new #GSettings object</doc>
  62625. <type name="Settings" c:type="GSettings*"/>
  62626. </return-value>
  62627. <parameters>
  62628. <parameter name="schema_id" transfer-ownership="none">
  62629. <doc xml:space="preserve">the id of the schema</doc>
  62630. <type name="utf8" c:type="const gchar*"/>
  62631. </parameter>
  62632. <parameter name="path" transfer-ownership="none">
  62633. <doc xml:space="preserve">the path to use</doc>
  62634. <type name="utf8" c:type="const gchar*"/>
  62635. </parameter>
  62636. </parameters>
  62637. </constructor>
  62638. <function name="list_relocatable_schemas"
  62639. c:identifier="g_settings_list_relocatable_schemas"
  62640. version="2.28"
  62641. deprecated="1"
  62642. deprecated-version="2.40">
  62643. <doc xml:space="preserve">&lt;!-- --&gt;</doc>
  62644. <doc-deprecated xml:space="preserve">Use g_settings_schema_source_list_schemas() instead</doc-deprecated>
  62645. <return-value transfer-ownership="none">
  62646. <doc xml:space="preserve">a list of relocatable
  62647. #GSettings schemas that are available. The list must not be
  62648. modified or freed.</doc>
  62649. <array c:type="const gchar* const*">
  62650. <type name="utf8"/>
  62651. </array>
  62652. </return-value>
  62653. </function>
  62654. <function name="list_schemas"
  62655. c:identifier="g_settings_list_schemas"
  62656. version="2.26"
  62657. deprecated="1"
  62658. deprecated-version="2.40">
  62659. <doc xml:space="preserve">&lt;!-- --&gt;</doc>
  62660. <doc-deprecated xml:space="preserve">Use g_settings_schema_source_list_schemas() instead.
  62661. If you used g_settings_list_schemas() to check for the presence of
  62662. a particular schema, use g_settings_schema_source_lookup() instead
  62663. of your whole loop.</doc-deprecated>
  62664. <return-value transfer-ownership="none">
  62665. <doc xml:space="preserve">a list of #GSettings
  62666. schemas that are available. The list must not be modified or
  62667. freed.</doc>
  62668. <array c:type="const gchar* const*">
  62669. <type name="utf8"/>
  62670. </array>
  62671. </return-value>
  62672. </function>
  62673. <function name="sync" c:identifier="g_settings_sync">
  62674. <doc xml:space="preserve">Ensures that all pending operations for the given are complete for
  62675. the default backend.
  62676. Writes made to a #GSettings are handled asynchronously. For this
  62677. reason, it is very unlikely that the changes have it to disk by the
  62678. time g_settings_set() returns.
  62679. This call will block until all of the writes have made it to the
  62680. backend. Since the mainloop is not running, no change notifications
  62681. will be dispatched during this call (but some may be queued by the
  62682. time the call is done).</doc>
  62683. <return-value transfer-ownership="none">
  62684. <type name="none" c:type="void"/>
  62685. </return-value>
  62686. </function>
  62687. <function name="unbind" c:identifier="g_settings_unbind" version="2.26">
  62688. <doc xml:space="preserve">Removes an existing binding for @property on @object.
  62689. Note that bindings are automatically removed when the
  62690. object is finalized, so it is rarely necessary to call this
  62691. function.</doc>
  62692. <return-value transfer-ownership="none">
  62693. <type name="none" c:type="void"/>
  62694. </return-value>
  62695. <parameters>
  62696. <parameter name="object" transfer-ownership="none">
  62697. <doc xml:space="preserve">the object</doc>
  62698. <type name="GObject.Object" c:type="gpointer"/>
  62699. </parameter>
  62700. <parameter name="property" transfer-ownership="none">
  62701. <doc xml:space="preserve">the property whose binding is removed</doc>
  62702. <type name="utf8" c:type="const gchar*"/>
  62703. </parameter>
  62704. </parameters>
  62705. </function>
  62706. <virtual-method name="change_event">
  62707. <return-value transfer-ownership="none">
  62708. <type name="gboolean" c:type="gboolean"/>
  62709. </return-value>
  62710. <parameters>
  62711. <instance-parameter name="settings" transfer-ownership="none">
  62712. <type name="Settings" c:type="GSettings*"/>
  62713. </instance-parameter>
  62714. <parameter name="keys" transfer-ownership="none">
  62715. <type name="GLib.Quark" c:type="const GQuark*"/>
  62716. </parameter>
  62717. <parameter name="n_keys" transfer-ownership="none">
  62718. <type name="gint" c:type="gint"/>
  62719. </parameter>
  62720. </parameters>
  62721. </virtual-method>
  62722. <virtual-method name="changed">
  62723. <return-value transfer-ownership="none">
  62724. <type name="none" c:type="void"/>
  62725. </return-value>
  62726. <parameters>
  62727. <instance-parameter name="settings" transfer-ownership="none">
  62728. <type name="Settings" c:type="GSettings*"/>
  62729. </instance-parameter>
  62730. <parameter name="key" transfer-ownership="none">
  62731. <type name="utf8" c:type="const gchar*"/>
  62732. </parameter>
  62733. </parameters>
  62734. </virtual-method>
  62735. <virtual-method name="writable_change_event">
  62736. <return-value transfer-ownership="none">
  62737. <type name="gboolean" c:type="gboolean"/>
  62738. </return-value>
  62739. <parameters>
  62740. <instance-parameter name="settings" transfer-ownership="none">
  62741. <type name="Settings" c:type="GSettings*"/>
  62742. </instance-parameter>
  62743. <parameter name="key" transfer-ownership="none">
  62744. <type name="GLib.Quark" c:type="GQuark"/>
  62745. </parameter>
  62746. </parameters>
  62747. </virtual-method>
  62748. <virtual-method name="writable_changed">
  62749. <return-value transfer-ownership="none">
  62750. <type name="none" c:type="void"/>
  62751. </return-value>
  62752. <parameters>
  62753. <instance-parameter name="settings" transfer-ownership="none">
  62754. <type name="Settings" c:type="GSettings*"/>
  62755. </instance-parameter>
  62756. <parameter name="key" transfer-ownership="none">
  62757. <type name="utf8" c:type="const gchar*"/>
  62758. </parameter>
  62759. </parameters>
  62760. </virtual-method>
  62761. <method name="apply" c:identifier="g_settings_apply">
  62762. <doc xml:space="preserve">Applies any changes that have been made to the settings. This
  62763. function does nothing unless @settings is in 'delay-apply' mode;
  62764. see g_settings_delay(). In the normal case settings are always
  62765. applied immediately.</doc>
  62766. <return-value transfer-ownership="none">
  62767. <type name="none" c:type="void"/>
  62768. </return-value>
  62769. <parameters>
  62770. <instance-parameter name="settings" transfer-ownership="none">
  62771. <doc xml:space="preserve">a #GSettings instance</doc>
  62772. <type name="Settings" c:type="GSettings*"/>
  62773. </instance-parameter>
  62774. </parameters>
  62775. </method>
  62776. <method name="bind" c:identifier="g_settings_bind" version="2.26">
  62777. <doc xml:space="preserve">Create a binding between the @key in the @settings object
  62778. and the property @property of @object.
  62779. The binding uses the default GIO mapping functions to map
  62780. between the settings and property values. These functions
  62781. handle booleans, numeric types and string types in a
  62782. straightforward way. Use g_settings_bind_with_mapping() if
  62783. you need a custom mapping, or map between types that are not
  62784. supported by the default mapping functions.
  62785. Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
  62786. function also establishes a binding between the writability of
  62787. @key and the "sensitive" property of @object (if @object has
  62788. a boolean property by that name). See g_settings_bind_writable()
  62789. for more details about writable bindings.
  62790. Note that the lifecycle of the binding is tied to the object,
  62791. and that you can have only one binding per object property.
  62792. If you bind the same property twice on the same object, the second
  62793. binding overrides the first one.</doc>
  62794. <return-value transfer-ownership="none">
  62795. <type name="none" c:type="void"/>
  62796. </return-value>
  62797. <parameters>
  62798. <instance-parameter name="settings" transfer-ownership="none">
  62799. <doc xml:space="preserve">a #GSettings object</doc>
  62800. <type name="Settings" c:type="GSettings*"/>
  62801. </instance-parameter>
  62802. <parameter name="key" transfer-ownership="none">
  62803. <doc xml:space="preserve">the key to bind</doc>
  62804. <type name="utf8" c:type="const gchar*"/>
  62805. </parameter>
  62806. <parameter name="object" transfer-ownership="none">
  62807. <doc xml:space="preserve">a #GObject</doc>
  62808. <type name="GObject.Object" c:type="gpointer"/>
  62809. </parameter>
  62810. <parameter name="property" transfer-ownership="none">
  62811. <doc xml:space="preserve">the name of the property to bind</doc>
  62812. <type name="utf8" c:type="const gchar*"/>
  62813. </parameter>
  62814. <parameter name="flags" transfer-ownership="none">
  62815. <doc xml:space="preserve">flags for the binding</doc>
  62816. <type name="SettingsBindFlags" c:type="GSettingsBindFlags"/>
  62817. </parameter>
  62818. </parameters>
  62819. </method>
  62820. <method name="bind_with_mapping"
  62821. c:identifier="g_settings_bind_with_mapping"
  62822. version="2.26"
  62823. introspectable="0">
  62824. <doc xml:space="preserve">Create a binding between the @key in the @settings object
  62825. and the property @property of @object.
  62826. The binding uses the provided mapping functions to map between
  62827. settings and property values.
  62828. Note that the lifecycle of the binding is tied to the object,
  62829. and that you can have only one binding per object property.
  62830. If you bind the same property twice on the same object, the second
  62831. binding overrides the first one.</doc>
  62832. <return-value transfer-ownership="none">
  62833. <type name="none" c:type="void"/>
  62834. </return-value>
  62835. <parameters>
  62836. <instance-parameter name="settings" transfer-ownership="none">
  62837. <doc xml:space="preserve">a #GSettings object</doc>
  62838. <type name="Settings" c:type="GSettings*"/>
  62839. </instance-parameter>
  62840. <parameter name="key" transfer-ownership="none">
  62841. <doc xml:space="preserve">the key to bind</doc>
  62842. <type name="utf8" c:type="const gchar*"/>
  62843. </parameter>
  62844. <parameter name="object" transfer-ownership="none">
  62845. <doc xml:space="preserve">a #GObject</doc>
  62846. <type name="GObject.Object" c:type="gpointer"/>
  62847. </parameter>
  62848. <parameter name="property" transfer-ownership="none">
  62849. <doc xml:space="preserve">the name of the property to bind</doc>
  62850. <type name="utf8" c:type="const gchar*"/>
  62851. </parameter>
  62852. <parameter name="flags" transfer-ownership="none">
  62853. <doc xml:space="preserve">flags for the binding</doc>
  62854. <type name="SettingsBindFlags" c:type="GSettingsBindFlags"/>
  62855. </parameter>
  62856. <parameter name="get_mapping" transfer-ownership="none">
  62857. <doc xml:space="preserve">a function that gets called to convert values
  62858. from @settings to @object, or %NULL to use the default GIO mapping</doc>
  62859. <type name="SettingsBindGetMapping"
  62860. c:type="GSettingsBindGetMapping"/>
  62861. </parameter>
  62862. <parameter name="set_mapping"
  62863. transfer-ownership="none"
  62864. scope="notified"
  62865. closure="6"
  62866. destroy="7">
  62867. <doc xml:space="preserve">a function that gets called to convert values
  62868. from @object to @settings, or %NULL to use the default GIO mapping</doc>
  62869. <type name="SettingsBindSetMapping"
  62870. c:type="GSettingsBindSetMapping"/>
  62871. </parameter>
  62872. <parameter name="user_data"
  62873. transfer-ownership="none"
  62874. nullable="1"
  62875. allow-none="1">
  62876. <doc xml:space="preserve">data that gets passed to @get_mapping and @set_mapping</doc>
  62877. <type name="gpointer" c:type="gpointer"/>
  62878. </parameter>
  62879. <parameter name="destroy" transfer-ownership="none" scope="async">
  62880. <doc xml:space="preserve">#GDestroyNotify function for @user_data</doc>
  62881. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  62882. </parameter>
  62883. </parameters>
  62884. </method>
  62885. <method name="bind_writable"
  62886. c:identifier="g_settings_bind_writable"
  62887. version="2.26">
  62888. <doc xml:space="preserve">Create a binding between the writability of @key in the
  62889. @settings object and the property @property of @object.
  62890. The property must be boolean; "sensitive" or "visible"
  62891. properties of widgets are the most likely candidates.
  62892. Writable bindings are always uni-directional; changes of the
  62893. writability of the setting will be propagated to the object
  62894. property, not the other way.
  62895. When the @inverted argument is %TRUE, the binding inverts the
  62896. value as it passes from the setting to the object, i.e. @property
  62897. will be set to %TRUE if the key is not writable.
  62898. Note that the lifecycle of the binding is tied to the object,
  62899. and that you can have only one binding per object property.
  62900. If you bind the same property twice on the same object, the second
  62901. binding overrides the first one.</doc>
  62902. <return-value transfer-ownership="none">
  62903. <type name="none" c:type="void"/>
  62904. </return-value>
  62905. <parameters>
  62906. <instance-parameter name="settings" transfer-ownership="none">
  62907. <doc xml:space="preserve">a #GSettings object</doc>
  62908. <type name="Settings" c:type="GSettings*"/>
  62909. </instance-parameter>
  62910. <parameter name="key" transfer-ownership="none">
  62911. <doc xml:space="preserve">the key to bind</doc>
  62912. <type name="utf8" c:type="const gchar*"/>
  62913. </parameter>
  62914. <parameter name="object" transfer-ownership="none">
  62915. <doc xml:space="preserve">a #GObject</doc>
  62916. <type name="GObject.Object" c:type="gpointer"/>
  62917. </parameter>
  62918. <parameter name="property" transfer-ownership="none">
  62919. <doc xml:space="preserve">the name of a boolean property to bind</doc>
  62920. <type name="utf8" c:type="const gchar*"/>
  62921. </parameter>
  62922. <parameter name="inverted" transfer-ownership="none">
  62923. <doc xml:space="preserve">whether to 'invert' the value</doc>
  62924. <type name="gboolean" c:type="gboolean"/>
  62925. </parameter>
  62926. </parameters>
  62927. </method>
  62928. <method name="create_action"
  62929. c:identifier="g_settings_create_action"
  62930. version="2.32">
  62931. <doc xml:space="preserve">Creates a #GAction corresponding to a given #GSettings key.
  62932. The action has the same name as the key.
  62933. The value of the key becomes the state of the action and the action
  62934. is enabled when the key is writable. Changing the state of the
  62935. action results in the key being written to. Changes to the value or
  62936. writability of the key cause appropriate change notifications to be
  62937. emitted for the action.
  62938. For boolean-valued keys, action activations take no parameter and
  62939. result in the toggling of the value. For all other types,
  62940. activations take the new value for the key (which must have the
  62941. correct type).</doc>
  62942. <return-value transfer-ownership="full">
  62943. <doc xml:space="preserve">a new #GAction</doc>
  62944. <type name="Action" c:type="GAction*"/>
  62945. </return-value>
  62946. <parameters>
  62947. <instance-parameter name="settings" transfer-ownership="none">
  62948. <doc xml:space="preserve">a #GSettings</doc>
  62949. <type name="Settings" c:type="GSettings*"/>
  62950. </instance-parameter>
  62951. <parameter name="key" transfer-ownership="none">
  62952. <doc xml:space="preserve">the name of a key in @settings</doc>
  62953. <type name="utf8" c:type="const gchar*"/>
  62954. </parameter>
  62955. </parameters>
  62956. </method>
  62957. <method name="delay" c:identifier="g_settings_delay" version="2.26">
  62958. <doc xml:space="preserve">Changes the #GSettings object into 'delay-apply' mode. In this
  62959. mode, changes to @settings are not immediately propagated to the
  62960. backend, but kept locally until g_settings_apply() is called.</doc>
  62961. <return-value transfer-ownership="none">
  62962. <type name="none" c:type="void"/>
  62963. </return-value>
  62964. <parameters>
  62965. <instance-parameter name="settings" transfer-ownership="none">
  62966. <doc xml:space="preserve">a #GSettings object</doc>
  62967. <type name="Settings" c:type="GSettings*"/>
  62968. </instance-parameter>
  62969. </parameters>
  62970. </method>
  62971. <method name="get"
  62972. c:identifier="g_settings_get"
  62973. version="2.26"
  62974. introspectable="0">
  62975. <doc xml:space="preserve">Gets the value that is stored at @key in @settings.
  62976. A convenience function that combines g_settings_get_value() with
  62977. g_variant_get().
  62978. It is a programmer error to give a @key that isn't contained in the
  62979. schema for @settings or for the #GVariantType of @format to mismatch
  62980. the type given in the schema.</doc>
  62981. <return-value transfer-ownership="none">
  62982. <type name="none" c:type="void"/>
  62983. </return-value>
  62984. <parameters>
  62985. <instance-parameter name="settings" transfer-ownership="none">
  62986. <doc xml:space="preserve">a #GSettings object</doc>
  62987. <type name="Settings" c:type="GSettings*"/>
  62988. </instance-parameter>
  62989. <parameter name="key" transfer-ownership="none">
  62990. <doc xml:space="preserve">the key to get the value for</doc>
  62991. <type name="utf8" c:type="const gchar*"/>
  62992. </parameter>
  62993. <parameter name="format" transfer-ownership="none">
  62994. <doc xml:space="preserve">a #GVariant format string</doc>
  62995. <type name="utf8" c:type="const gchar*"/>
  62996. </parameter>
  62997. <parameter name="..." transfer-ownership="none">
  62998. <doc xml:space="preserve">arguments as per @format</doc>
  62999. <varargs/>
  63000. </parameter>
  63001. </parameters>
  63002. </method>
  63003. <method name="get_boolean"
  63004. c:identifier="g_settings_get_boolean"
  63005. version="2.26">
  63006. <doc xml:space="preserve">Gets the value that is stored at @key in @settings.
  63007. A convenience variant of g_settings_get() for booleans.
  63008. It is a programmer error to give a @key that isn't specified as
  63009. having a boolean type in the schema for @settings.</doc>
  63010. <return-value transfer-ownership="none">
  63011. <doc xml:space="preserve">a boolean</doc>
  63012. <type name="gboolean" c:type="gboolean"/>
  63013. </return-value>
  63014. <parameters>
  63015. <instance-parameter name="settings" transfer-ownership="none">
  63016. <doc xml:space="preserve">a #GSettings object</doc>
  63017. <type name="Settings" c:type="GSettings*"/>
  63018. </instance-parameter>
  63019. <parameter name="key" transfer-ownership="none">
  63020. <doc xml:space="preserve">the key to get the value for</doc>
  63021. <type name="utf8" c:type="const gchar*"/>
  63022. </parameter>
  63023. </parameters>
  63024. </method>
  63025. <method name="get_child"
  63026. c:identifier="g_settings_get_child"
  63027. version="2.26">
  63028. <doc xml:space="preserve">Creates a child settings object which has a base path of
  63029. `base-path/@name`, where `base-path` is the base path of
  63030. @settings.
  63031. The schema for the child settings object must have been declared
  63032. in the schema of @settings using a &lt;child&gt; element.</doc>
  63033. <return-value transfer-ownership="full">
  63034. <doc xml:space="preserve">a 'child' settings object</doc>
  63035. <type name="Settings" c:type="GSettings*"/>
  63036. </return-value>
  63037. <parameters>
  63038. <instance-parameter name="settings" transfer-ownership="none">
  63039. <doc xml:space="preserve">a #GSettings object</doc>
  63040. <type name="Settings" c:type="GSettings*"/>
  63041. </instance-parameter>
  63042. <parameter name="name" transfer-ownership="none">
  63043. <doc xml:space="preserve">the name of the child schema</doc>
  63044. <type name="utf8" c:type="const gchar*"/>
  63045. </parameter>
  63046. </parameters>
  63047. </method>
  63048. <method name="get_default_value"
  63049. c:identifier="g_settings_get_default_value"
  63050. version="2.40">
  63051. <doc xml:space="preserve">Gets the "default value" of a key.
  63052. This is the value that would be read if g_settings_reset() were to be
  63053. called on the key.
  63054. Note that this may be a different value than returned by
  63055. g_settings_schema_key_get_default_value() if the system administrator
  63056. has provided a default value.
  63057. Comparing the return values of g_settings_get_default_value() and
  63058. g_settings_get_value() is not sufficient for determining if a value
  63059. has been set because the user may have explicitly set the value to
  63060. something that happens to be equal to the default. The difference
  63061. here is that if the default changes in the future, the user's key
  63062. will still be set.
  63063. This function may be useful for adding an indication to a UI of what
  63064. the default value was before the user set it.
  63065. It is a programmer error to give a @key that isn't contained in the
  63066. schema for @settings.</doc>
  63067. <return-value transfer-ownership="full" nullable="1">
  63068. <doc xml:space="preserve">the default value</doc>
  63069. <type name="GLib.Variant" c:type="GVariant*"/>
  63070. </return-value>
  63071. <parameters>
  63072. <instance-parameter name="settings" transfer-ownership="none">
  63073. <doc xml:space="preserve">a #GSettings object</doc>
  63074. <type name="Settings" c:type="GSettings*"/>
  63075. </instance-parameter>
  63076. <parameter name="key" transfer-ownership="none">
  63077. <doc xml:space="preserve">the key to get the default value for</doc>
  63078. <type name="utf8" c:type="const gchar*"/>
  63079. </parameter>
  63080. </parameters>
  63081. </method>
  63082. <method name="get_double"
  63083. c:identifier="g_settings_get_double"
  63084. version="2.26">
  63085. <doc xml:space="preserve">Gets the value that is stored at @key in @settings.
  63086. A convenience variant of g_settings_get() for doubles.
  63087. It is a programmer error to give a @key that isn't specified as
  63088. having a 'double' type in the schema for @settings.</doc>
  63089. <return-value transfer-ownership="none">
  63090. <doc xml:space="preserve">a double</doc>
  63091. <type name="gdouble" c:type="gdouble"/>
  63092. </return-value>
  63093. <parameters>
  63094. <instance-parameter name="settings" transfer-ownership="none">
  63095. <doc xml:space="preserve">a #GSettings object</doc>
  63096. <type name="Settings" c:type="GSettings*"/>
  63097. </instance-parameter>
  63098. <parameter name="key" transfer-ownership="none">
  63099. <doc xml:space="preserve">the key to get the value for</doc>
  63100. <type name="utf8" c:type="const gchar*"/>
  63101. </parameter>
  63102. </parameters>
  63103. </method>
  63104. <method name="get_enum"
  63105. c:identifier="g_settings_get_enum"
  63106. version="2.26">
  63107. <doc xml:space="preserve">Gets the value that is stored in @settings for @key and converts it
  63108. to the enum value that it represents.
  63109. In order to use this function the type of the value must be a string
  63110. and it must be marked in the schema file as an enumerated type.
  63111. It is a programmer error to give a @key that isn't contained in the
  63112. schema for @settings or is not marked as an enumerated type.
  63113. If the value stored in the configuration database is not a valid
  63114. value for the enumerated type then this function will return the
  63115. default value.</doc>
  63116. <return-value transfer-ownership="none">
  63117. <doc xml:space="preserve">the enum value</doc>
  63118. <type name="gint" c:type="gint"/>
  63119. </return-value>
  63120. <parameters>
  63121. <instance-parameter name="settings" transfer-ownership="none">
  63122. <doc xml:space="preserve">a #GSettings object</doc>
  63123. <type name="Settings" c:type="GSettings*"/>
  63124. </instance-parameter>
  63125. <parameter name="key" transfer-ownership="none">
  63126. <doc xml:space="preserve">the key to get the value for</doc>
  63127. <type name="utf8" c:type="const gchar*"/>
  63128. </parameter>
  63129. </parameters>
  63130. </method>
  63131. <method name="get_flags"
  63132. c:identifier="g_settings_get_flags"
  63133. version="2.26">
  63134. <doc xml:space="preserve">Gets the value that is stored in @settings for @key and converts it
  63135. to the flags value that it represents.
  63136. In order to use this function the type of the value must be an array
  63137. of strings and it must be marked in the schema file as an flags type.
  63138. It is a programmer error to give a @key that isn't contained in the
  63139. schema for @settings or is not marked as a flags type.
  63140. If the value stored in the configuration database is not a valid
  63141. value for the flags type then this function will return the default
  63142. value.</doc>
  63143. <return-value transfer-ownership="none">
  63144. <doc xml:space="preserve">the flags value</doc>
  63145. <type name="guint" c:type="guint"/>
  63146. </return-value>
  63147. <parameters>
  63148. <instance-parameter name="settings" transfer-ownership="none">
  63149. <doc xml:space="preserve">a #GSettings object</doc>
  63150. <type name="Settings" c:type="GSettings*"/>
  63151. </instance-parameter>
  63152. <parameter name="key" transfer-ownership="none">
  63153. <doc xml:space="preserve">the key to get the value for</doc>
  63154. <type name="utf8" c:type="const gchar*"/>
  63155. </parameter>
  63156. </parameters>
  63157. </method>
  63158. <method name="get_has_unapplied"
  63159. c:identifier="g_settings_get_has_unapplied"
  63160. version="2.26">
  63161. <doc xml:space="preserve">Returns whether the #GSettings object has any unapplied
  63162. changes. This can only be the case if it is in 'delayed-apply' mode.</doc>
  63163. <return-value transfer-ownership="none">
  63164. <doc xml:space="preserve">%TRUE if @settings has unapplied changes</doc>
  63165. <type name="gboolean" c:type="gboolean"/>
  63166. </return-value>
  63167. <parameters>
  63168. <instance-parameter name="settings" transfer-ownership="none">
  63169. <doc xml:space="preserve">a #GSettings object</doc>
  63170. <type name="Settings" c:type="GSettings*"/>
  63171. </instance-parameter>
  63172. </parameters>
  63173. </method>
  63174. <method name="get_int" c:identifier="g_settings_get_int" version="2.26">
  63175. <doc xml:space="preserve">Gets the value that is stored at @key in @settings.
  63176. A convenience variant of g_settings_get() for 32-bit integers.
  63177. It is a programmer error to give a @key that isn't specified as
  63178. having a int32 type in the schema for @settings.</doc>
  63179. <return-value transfer-ownership="none">
  63180. <doc xml:space="preserve">an integer</doc>
  63181. <type name="gint" c:type="gint"/>
  63182. </return-value>
  63183. <parameters>
  63184. <instance-parameter name="settings" transfer-ownership="none">
  63185. <doc xml:space="preserve">a #GSettings object</doc>
  63186. <type name="Settings" c:type="GSettings*"/>
  63187. </instance-parameter>
  63188. <parameter name="key" transfer-ownership="none">
  63189. <doc xml:space="preserve">the key to get the value for</doc>
  63190. <type name="utf8" c:type="const gchar*"/>
  63191. </parameter>
  63192. </parameters>
  63193. </method>
  63194. <method name="get_mapped" c:identifier="g_settings_get_mapped">
  63195. <doc xml:space="preserve">Gets the value that is stored at @key in @settings, subject to
  63196. application-level validation/mapping.
  63197. You should use this function when the application needs to perform
  63198. some processing on the value of the key (for example, parsing). The
  63199. @mapping function performs that processing. If the function
  63200. indicates that the processing was unsuccessful (due to a parse error,
  63201. for example) then the mapping is tried again with another value.
  63202. This allows a robust 'fall back to defaults' behaviour to be
  63203. implemented somewhat automatically.
  63204. The first value that is tried is the user's setting for the key. If
  63205. the mapping function fails to map this value, other values may be
  63206. tried in an unspecified order (system or site defaults, translated
  63207. schema default values, untranslated schema default values, etc).
  63208. If the mapping function fails for all possible values, one additional
  63209. attempt is made: the mapping function is called with a %NULL value.
  63210. If the mapping function still indicates failure at this point then
  63211. the application will be aborted.
  63212. The result parameter for the @mapping function is pointed to a
  63213. #gpointer which is initially set to %NULL. The same pointer is given
  63214. to each invocation of @mapping. The final value of that #gpointer is
  63215. what is returned by this function. %NULL is valid; it is returned
  63216. just as any other value would be.</doc>
  63217. <return-value transfer-ownership="full" nullable="1">
  63218. <doc xml:space="preserve">the result, which may be %NULL</doc>
  63219. <type name="gpointer" c:type="gpointer"/>
  63220. </return-value>
  63221. <parameters>
  63222. <instance-parameter name="settings" transfer-ownership="none">
  63223. <doc xml:space="preserve">a #GSettings object</doc>
  63224. <type name="Settings" c:type="GSettings*"/>
  63225. </instance-parameter>
  63226. <parameter name="key" transfer-ownership="none">
  63227. <doc xml:space="preserve">the key to get the value for</doc>
  63228. <type name="utf8" c:type="const gchar*"/>
  63229. </parameter>
  63230. <parameter name="mapping"
  63231. transfer-ownership="none"
  63232. scope="call"
  63233. closure="2">
  63234. <doc xml:space="preserve">the function to map the value in the
  63235. settings database to the value used by the application</doc>
  63236. <type name="SettingsGetMapping" c:type="GSettingsGetMapping"/>
  63237. </parameter>
  63238. <parameter name="user_data"
  63239. transfer-ownership="none"
  63240. nullable="1"
  63241. allow-none="1">
  63242. <doc xml:space="preserve">user data for @mapping</doc>
  63243. <type name="gpointer" c:type="gpointer"/>
  63244. </parameter>
  63245. </parameters>
  63246. </method>
  63247. <method name="get_range"
  63248. c:identifier="g_settings_get_range"
  63249. version="2.28"
  63250. deprecated="1"
  63251. deprecated-version="2.40">
  63252. <doc xml:space="preserve">Queries the range of a key.</doc>
  63253. <doc-deprecated xml:space="preserve">Use g_settings_schema_key_get_range() instead.</doc-deprecated>
  63254. <return-value transfer-ownership="full">
  63255. <type name="GLib.Variant" c:type="GVariant*"/>
  63256. </return-value>
  63257. <parameters>
  63258. <instance-parameter name="settings" transfer-ownership="none">
  63259. <doc xml:space="preserve">a #GSettings</doc>
  63260. <type name="Settings" c:type="GSettings*"/>
  63261. </instance-parameter>
  63262. <parameter name="key" transfer-ownership="none">
  63263. <doc xml:space="preserve">the key to query the range of</doc>
  63264. <type name="utf8" c:type="const gchar*"/>
  63265. </parameter>
  63266. </parameters>
  63267. </method>
  63268. <method name="get_string"
  63269. c:identifier="g_settings_get_string"
  63270. version="2.26">
  63271. <doc xml:space="preserve">Gets the value that is stored at @key in @settings.
  63272. A convenience variant of g_settings_get() for strings.
  63273. It is a programmer error to give a @key that isn't specified as
  63274. having a string type in the schema for @settings.</doc>
  63275. <return-value transfer-ownership="full">
  63276. <doc xml:space="preserve">a newly-allocated string</doc>
  63277. <type name="utf8" c:type="gchar*"/>
  63278. </return-value>
  63279. <parameters>
  63280. <instance-parameter name="settings" transfer-ownership="none">
  63281. <doc xml:space="preserve">a #GSettings object</doc>
  63282. <type name="Settings" c:type="GSettings*"/>
  63283. </instance-parameter>
  63284. <parameter name="key" transfer-ownership="none">
  63285. <doc xml:space="preserve">the key to get the value for</doc>
  63286. <type name="utf8" c:type="const gchar*"/>
  63287. </parameter>
  63288. </parameters>
  63289. </method>
  63290. <method name="get_strv"
  63291. c:identifier="g_settings_get_strv"
  63292. version="2.26">
  63293. <doc xml:space="preserve">A convenience variant of g_settings_get() for string arrays.
  63294. It is a programmer error to give a @key that isn't specified as
  63295. having an array of strings type in the schema for @settings.</doc>
  63296. <return-value transfer-ownership="full">
  63297. <doc xml:space="preserve">a
  63298. newly-allocated, %NULL-terminated array of strings, the value that
  63299. is stored at @key in @settings.</doc>
  63300. <array c:type="gchar**">
  63301. <type name="utf8"/>
  63302. </array>
  63303. </return-value>
  63304. <parameters>
  63305. <instance-parameter name="settings" transfer-ownership="none">
  63306. <doc xml:space="preserve">a #GSettings object</doc>
  63307. <type name="Settings" c:type="GSettings*"/>
  63308. </instance-parameter>
  63309. <parameter name="key" transfer-ownership="none">
  63310. <doc xml:space="preserve">the key to get the value for</doc>
  63311. <type name="utf8" c:type="const gchar*"/>
  63312. </parameter>
  63313. </parameters>
  63314. </method>
  63315. <method name="get_uint"
  63316. c:identifier="g_settings_get_uint"
  63317. version="2.30">
  63318. <doc xml:space="preserve">Gets the value that is stored at @key in @settings.
  63319. A convenience variant of g_settings_get() for 32-bit unsigned
  63320. integers.
  63321. It is a programmer error to give a @key that isn't specified as
  63322. having a uint32 type in the schema for @settings.</doc>
  63323. <return-value transfer-ownership="none">
  63324. <doc xml:space="preserve">an unsigned integer</doc>
  63325. <type name="guint" c:type="guint"/>
  63326. </return-value>
  63327. <parameters>
  63328. <instance-parameter name="settings" transfer-ownership="none">
  63329. <doc xml:space="preserve">a #GSettings object</doc>
  63330. <type name="Settings" c:type="GSettings*"/>
  63331. </instance-parameter>
  63332. <parameter name="key" transfer-ownership="none">
  63333. <doc xml:space="preserve">the key to get the value for</doc>
  63334. <type name="utf8" c:type="const gchar*"/>
  63335. </parameter>
  63336. </parameters>
  63337. </method>
  63338. <method name="get_user_value"
  63339. c:identifier="g_settings_get_user_value"
  63340. version="2.40">
  63341. <doc xml:space="preserve">Checks the "user value" of a key, if there is one.
  63342. The user value of a key is the last value that was set by the user.
  63343. After calling g_settings_reset() this function should always return
  63344. %NULL (assuming something is not wrong with the system
  63345. configuration).
  63346. It is possible that g_settings_get_value() will return a different
  63347. value than this function. This can happen in the case that the user
  63348. set a value for a key that was subsequently locked down by the system
  63349. administrator -- this function will return the user's old value.
  63350. This function may be useful for adding a "reset" option to a UI or
  63351. for providing indication that a particular value has been changed.
  63352. It is a programmer error to give a @key that isn't contained in the
  63353. schema for @settings.</doc>
  63354. <return-value transfer-ownership="full" nullable="1">
  63355. <doc xml:space="preserve">the user's value, if set</doc>
  63356. <type name="GLib.Variant" c:type="GVariant*"/>
  63357. </return-value>
  63358. <parameters>
  63359. <instance-parameter name="settings" transfer-ownership="none">
  63360. <doc xml:space="preserve">a #GSettings object</doc>
  63361. <type name="Settings" c:type="GSettings*"/>
  63362. </instance-parameter>
  63363. <parameter name="key" transfer-ownership="none">
  63364. <doc xml:space="preserve">the key to get the user value for</doc>
  63365. <type name="utf8" c:type="const gchar*"/>
  63366. </parameter>
  63367. </parameters>
  63368. </method>
  63369. <method name="get_value"
  63370. c:identifier="g_settings_get_value"
  63371. version="2.26">
  63372. <doc xml:space="preserve">Gets the value that is stored in @settings for @key.
  63373. It is a programmer error to give a @key that isn't contained in the
  63374. schema for @settings.</doc>
  63375. <return-value transfer-ownership="full">
  63376. <doc xml:space="preserve">a new #GVariant</doc>
  63377. <type name="GLib.Variant" c:type="GVariant*"/>
  63378. </return-value>
  63379. <parameters>
  63380. <instance-parameter name="settings" transfer-ownership="none">
  63381. <doc xml:space="preserve">a #GSettings object</doc>
  63382. <type name="Settings" c:type="GSettings*"/>
  63383. </instance-parameter>
  63384. <parameter name="key" transfer-ownership="none">
  63385. <doc xml:space="preserve">the key to get the value for</doc>
  63386. <type name="utf8" c:type="const gchar*"/>
  63387. </parameter>
  63388. </parameters>
  63389. </method>
  63390. <method name="is_writable"
  63391. c:identifier="g_settings_is_writable"
  63392. version="2.26">
  63393. <doc xml:space="preserve">Finds out if a key can be written or not</doc>
  63394. <return-value transfer-ownership="none">
  63395. <doc xml:space="preserve">%TRUE if the key @name is writable</doc>
  63396. <type name="gboolean" c:type="gboolean"/>
  63397. </return-value>
  63398. <parameters>
  63399. <instance-parameter name="settings" transfer-ownership="none">
  63400. <doc xml:space="preserve">a #GSettings object</doc>
  63401. <type name="Settings" c:type="GSettings*"/>
  63402. </instance-parameter>
  63403. <parameter name="name" transfer-ownership="none">
  63404. <doc xml:space="preserve">the name of a key</doc>
  63405. <type name="utf8" c:type="const gchar*"/>
  63406. </parameter>
  63407. </parameters>
  63408. </method>
  63409. <method name="list_children" c:identifier="g_settings_list_children">
  63410. <doc xml:space="preserve">Gets the list of children on @settings.
  63411. The list is exactly the list of strings for which it is not an error
  63412. to call g_settings_get_child().
  63413. For GSettings objects that are lists, this value can change at any
  63414. time and you should connect to the "children-changed" signal to watch
  63415. for those changes. Note that there is a race condition here: you may
  63416. request a child after listing it only for it to have been destroyed
  63417. in the meantime. For this reason, g_settings_get_child() may return
  63418. %NULL even for a child that was listed by this function.
  63419. For GSettings objects that are not lists, you should probably not be
  63420. calling this function from "normal" code (since you should already
  63421. know what children are in your schema). This function may still be
  63422. useful there for introspection reasons, however.
  63423. You should free the return value with g_strfreev() when you are done
  63424. with it.</doc>
  63425. <return-value transfer-ownership="full">
  63426. <doc xml:space="preserve">a list of the children on @settings</doc>
  63427. <array c:type="gchar**">
  63428. <type name="utf8"/>
  63429. </array>
  63430. </return-value>
  63431. <parameters>
  63432. <instance-parameter name="settings" transfer-ownership="none">
  63433. <doc xml:space="preserve">a #GSettings object</doc>
  63434. <type name="Settings" c:type="GSettings*"/>
  63435. </instance-parameter>
  63436. </parameters>
  63437. </method>
  63438. <method name="list_keys" c:identifier="g_settings_list_keys">
  63439. <doc xml:space="preserve">Introspects the list of keys on @settings.
  63440. You should probably not be calling this function from "normal" code
  63441. (since you should already know what keys are in your schema). This
  63442. function is intended for introspection reasons.
  63443. You should free the return value with g_strfreev() when you are done
  63444. with it.</doc>
  63445. <return-value transfer-ownership="full">
  63446. <doc xml:space="preserve">a list of the keys on @settings</doc>
  63447. <array c:type="gchar**">
  63448. <type name="utf8"/>
  63449. </array>
  63450. </return-value>
  63451. <parameters>
  63452. <instance-parameter name="settings" transfer-ownership="none">
  63453. <doc xml:space="preserve">a #GSettings object</doc>
  63454. <type name="Settings" c:type="GSettings*"/>
  63455. </instance-parameter>
  63456. </parameters>
  63457. </method>
  63458. <method name="range_check"
  63459. c:identifier="g_settings_range_check"
  63460. version="2.28"
  63461. deprecated="1"
  63462. deprecated-version="2.40">
  63463. <doc xml:space="preserve">Checks if the given @value is of the correct type and within the
  63464. permitted range for @key.</doc>
  63465. <doc-deprecated xml:space="preserve">Use g_settings_schema_key_range_check() instead.</doc-deprecated>
  63466. <return-value transfer-ownership="none">
  63467. <doc xml:space="preserve">%TRUE if @value is valid for @key</doc>
  63468. <type name="gboolean" c:type="gboolean"/>
  63469. </return-value>
  63470. <parameters>
  63471. <instance-parameter name="settings" transfer-ownership="none">
  63472. <doc xml:space="preserve">a #GSettings</doc>
  63473. <type name="Settings" c:type="GSettings*"/>
  63474. </instance-parameter>
  63475. <parameter name="key" transfer-ownership="none">
  63476. <doc xml:space="preserve">the key to check</doc>
  63477. <type name="utf8" c:type="const gchar*"/>
  63478. </parameter>
  63479. <parameter name="value" transfer-ownership="none">
  63480. <doc xml:space="preserve">the value to check</doc>
  63481. <type name="GLib.Variant" c:type="GVariant*"/>
  63482. </parameter>
  63483. </parameters>
  63484. </method>
  63485. <method name="reset" c:identifier="g_settings_reset">
  63486. <doc xml:space="preserve">Resets @key to its default value.
  63487. This call resets the key, as much as possible, to its default value.
  63488. That might the value specified in the schema or the one set by the
  63489. administrator.</doc>
  63490. <return-value transfer-ownership="none">
  63491. <type name="none" c:type="void"/>
  63492. </return-value>
  63493. <parameters>
  63494. <instance-parameter name="settings" transfer-ownership="none">
  63495. <doc xml:space="preserve">a #GSettings object</doc>
  63496. <type name="Settings" c:type="GSettings*"/>
  63497. </instance-parameter>
  63498. <parameter name="key" transfer-ownership="none">
  63499. <doc xml:space="preserve">the name of a key</doc>
  63500. <type name="utf8" c:type="const gchar*"/>
  63501. </parameter>
  63502. </parameters>
  63503. </method>
  63504. <method name="revert" c:identifier="g_settings_revert">
  63505. <doc xml:space="preserve">Reverts all non-applied changes to the settings. This function
  63506. does nothing unless @settings is in 'delay-apply' mode; see
  63507. g_settings_delay(). In the normal case settings are always applied
  63508. immediately.
  63509. Change notifications will be emitted for affected keys.</doc>
  63510. <return-value transfer-ownership="none">
  63511. <type name="none" c:type="void"/>
  63512. </return-value>
  63513. <parameters>
  63514. <instance-parameter name="settings" transfer-ownership="none">
  63515. <doc xml:space="preserve">a #GSettings instance</doc>
  63516. <type name="Settings" c:type="GSettings*"/>
  63517. </instance-parameter>
  63518. </parameters>
  63519. </method>
  63520. <method name="set"
  63521. c:identifier="g_settings_set"
  63522. version="2.26"
  63523. introspectable="0">
  63524. <doc xml:space="preserve">Sets @key in @settings to @value.
  63525. A convenience function that combines g_settings_set_value() with
  63526. g_variant_new().
  63527. It is a programmer error to give a @key that isn't contained in the
  63528. schema for @settings or for the #GVariantType of @format to mismatch
  63529. the type given in the schema.</doc>
  63530. <return-value transfer-ownership="none">
  63531. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63532. %FALSE if the key was not writable</doc>
  63533. <type name="gboolean" c:type="gboolean"/>
  63534. </return-value>
  63535. <parameters>
  63536. <instance-parameter name="settings" transfer-ownership="none">
  63537. <doc xml:space="preserve">a #GSettings object</doc>
  63538. <type name="Settings" c:type="GSettings*"/>
  63539. </instance-parameter>
  63540. <parameter name="key" transfer-ownership="none">
  63541. <doc xml:space="preserve">the name of the key to set</doc>
  63542. <type name="utf8" c:type="const gchar*"/>
  63543. </parameter>
  63544. <parameter name="format" transfer-ownership="none">
  63545. <doc xml:space="preserve">a #GVariant format string</doc>
  63546. <type name="utf8" c:type="const gchar*"/>
  63547. </parameter>
  63548. <parameter name="..." transfer-ownership="none">
  63549. <doc xml:space="preserve">arguments as per @format</doc>
  63550. <varargs/>
  63551. </parameter>
  63552. </parameters>
  63553. </method>
  63554. <method name="set_boolean"
  63555. c:identifier="g_settings_set_boolean"
  63556. version="2.26">
  63557. <doc xml:space="preserve">Sets @key in @settings to @value.
  63558. A convenience variant of g_settings_set() for booleans.
  63559. It is a programmer error to give a @key that isn't specified as
  63560. having a boolean type in the schema for @settings.</doc>
  63561. <return-value transfer-ownership="none">
  63562. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63563. %FALSE if the key was not writable</doc>
  63564. <type name="gboolean" c:type="gboolean"/>
  63565. </return-value>
  63566. <parameters>
  63567. <instance-parameter name="settings" transfer-ownership="none">
  63568. <doc xml:space="preserve">a #GSettings object</doc>
  63569. <type name="Settings" c:type="GSettings*"/>
  63570. </instance-parameter>
  63571. <parameter name="key" transfer-ownership="none">
  63572. <doc xml:space="preserve">the name of the key to set</doc>
  63573. <type name="utf8" c:type="const gchar*"/>
  63574. </parameter>
  63575. <parameter name="value" transfer-ownership="none">
  63576. <doc xml:space="preserve">the value to set it to</doc>
  63577. <type name="gboolean" c:type="gboolean"/>
  63578. </parameter>
  63579. </parameters>
  63580. </method>
  63581. <method name="set_double"
  63582. c:identifier="g_settings_set_double"
  63583. version="2.26">
  63584. <doc xml:space="preserve">Sets @key in @settings to @value.
  63585. A convenience variant of g_settings_set() for doubles.
  63586. It is a programmer error to give a @key that isn't specified as
  63587. having a 'double' type in the schema for @settings.</doc>
  63588. <return-value transfer-ownership="none">
  63589. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63590. %FALSE if the key was not writable</doc>
  63591. <type name="gboolean" c:type="gboolean"/>
  63592. </return-value>
  63593. <parameters>
  63594. <instance-parameter name="settings" transfer-ownership="none">
  63595. <doc xml:space="preserve">a #GSettings object</doc>
  63596. <type name="Settings" c:type="GSettings*"/>
  63597. </instance-parameter>
  63598. <parameter name="key" transfer-ownership="none">
  63599. <doc xml:space="preserve">the name of the key to set</doc>
  63600. <type name="utf8" c:type="const gchar*"/>
  63601. </parameter>
  63602. <parameter name="value" transfer-ownership="none">
  63603. <doc xml:space="preserve">the value to set it to</doc>
  63604. <type name="gdouble" c:type="gdouble"/>
  63605. </parameter>
  63606. </parameters>
  63607. </method>
  63608. <method name="set_enum" c:identifier="g_settings_set_enum">
  63609. <doc xml:space="preserve">Looks up the enumerated type nick for @value and writes it to @key,
  63610. within @settings.
  63611. It is a programmer error to give a @key that isn't contained in the
  63612. schema for @settings or is not marked as an enumerated type, or for
  63613. @value not to be a valid value for the named type.
  63614. After performing the write, accessing @key directly with
  63615. g_settings_get_string() will return the 'nick' associated with
  63616. @value.</doc>
  63617. <return-value transfer-ownership="none">
  63618. <doc xml:space="preserve">%TRUE, if the set succeeds</doc>
  63619. <type name="gboolean" c:type="gboolean"/>
  63620. </return-value>
  63621. <parameters>
  63622. <instance-parameter name="settings" transfer-ownership="none">
  63623. <doc xml:space="preserve">a #GSettings object</doc>
  63624. <type name="Settings" c:type="GSettings*"/>
  63625. </instance-parameter>
  63626. <parameter name="key" transfer-ownership="none">
  63627. <doc xml:space="preserve">a key, within @settings</doc>
  63628. <type name="utf8" c:type="const gchar*"/>
  63629. </parameter>
  63630. <parameter name="value" transfer-ownership="none">
  63631. <doc xml:space="preserve">an enumerated value</doc>
  63632. <type name="gint" c:type="gint"/>
  63633. </parameter>
  63634. </parameters>
  63635. </method>
  63636. <method name="set_flags" c:identifier="g_settings_set_flags">
  63637. <doc xml:space="preserve">Looks up the flags type nicks for the bits specified by @value, puts
  63638. them in an array of strings and writes the array to @key, within
  63639. @settings.
  63640. It is a programmer error to give a @key that isn't contained in the
  63641. schema for @settings or is not marked as a flags type, or for @value
  63642. to contain any bits that are not value for the named type.
  63643. After performing the write, accessing @key directly with
  63644. g_settings_get_strv() will return an array of 'nicks'; one for each
  63645. bit in @value.</doc>
  63646. <return-value transfer-ownership="none">
  63647. <doc xml:space="preserve">%TRUE, if the set succeeds</doc>
  63648. <type name="gboolean" c:type="gboolean"/>
  63649. </return-value>
  63650. <parameters>
  63651. <instance-parameter name="settings" transfer-ownership="none">
  63652. <doc xml:space="preserve">a #GSettings object</doc>
  63653. <type name="Settings" c:type="GSettings*"/>
  63654. </instance-parameter>
  63655. <parameter name="key" transfer-ownership="none">
  63656. <doc xml:space="preserve">a key, within @settings</doc>
  63657. <type name="utf8" c:type="const gchar*"/>
  63658. </parameter>
  63659. <parameter name="value" transfer-ownership="none">
  63660. <doc xml:space="preserve">a flags value</doc>
  63661. <type name="guint" c:type="guint"/>
  63662. </parameter>
  63663. </parameters>
  63664. </method>
  63665. <method name="set_int" c:identifier="g_settings_set_int" version="2.26">
  63666. <doc xml:space="preserve">Sets @key in @settings to @value.
  63667. A convenience variant of g_settings_set() for 32-bit integers.
  63668. It is a programmer error to give a @key that isn't specified as
  63669. having a int32 type in the schema for @settings.</doc>
  63670. <return-value transfer-ownership="none">
  63671. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63672. %FALSE if the key was not writable</doc>
  63673. <type name="gboolean" c:type="gboolean"/>
  63674. </return-value>
  63675. <parameters>
  63676. <instance-parameter name="settings" transfer-ownership="none">
  63677. <doc xml:space="preserve">a #GSettings object</doc>
  63678. <type name="Settings" c:type="GSettings*"/>
  63679. </instance-parameter>
  63680. <parameter name="key" transfer-ownership="none">
  63681. <doc xml:space="preserve">the name of the key to set</doc>
  63682. <type name="utf8" c:type="const gchar*"/>
  63683. </parameter>
  63684. <parameter name="value" transfer-ownership="none">
  63685. <doc xml:space="preserve">the value to set it to</doc>
  63686. <type name="gint" c:type="gint"/>
  63687. </parameter>
  63688. </parameters>
  63689. </method>
  63690. <method name="set_string"
  63691. c:identifier="g_settings_set_string"
  63692. version="2.26">
  63693. <doc xml:space="preserve">Sets @key in @settings to @value.
  63694. A convenience variant of g_settings_set() for strings.
  63695. It is a programmer error to give a @key that isn't specified as
  63696. having a string type in the schema for @settings.</doc>
  63697. <return-value transfer-ownership="none">
  63698. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63699. %FALSE if the key was not writable</doc>
  63700. <type name="gboolean" c:type="gboolean"/>
  63701. </return-value>
  63702. <parameters>
  63703. <instance-parameter name="settings" transfer-ownership="none">
  63704. <doc xml:space="preserve">a #GSettings object</doc>
  63705. <type name="Settings" c:type="GSettings*"/>
  63706. </instance-parameter>
  63707. <parameter name="key" transfer-ownership="none">
  63708. <doc xml:space="preserve">the name of the key to set</doc>
  63709. <type name="utf8" c:type="const gchar*"/>
  63710. </parameter>
  63711. <parameter name="value" transfer-ownership="none">
  63712. <doc xml:space="preserve">the value to set it to</doc>
  63713. <type name="utf8" c:type="const gchar*"/>
  63714. </parameter>
  63715. </parameters>
  63716. </method>
  63717. <method name="set_strv"
  63718. c:identifier="g_settings_set_strv"
  63719. version="2.26">
  63720. <doc xml:space="preserve">Sets @key in @settings to @value.
  63721. A convenience variant of g_settings_set() for string arrays. If
  63722. @value is %NULL, then @key is set to be the empty array.
  63723. It is a programmer error to give a @key that isn't specified as
  63724. having an array of strings type in the schema for @settings.</doc>
  63725. <return-value transfer-ownership="none">
  63726. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63727. %FALSE if the key was not writable</doc>
  63728. <type name="gboolean" c:type="gboolean"/>
  63729. </return-value>
  63730. <parameters>
  63731. <instance-parameter name="settings" transfer-ownership="none">
  63732. <doc xml:space="preserve">a #GSettings object</doc>
  63733. <type name="Settings" c:type="GSettings*"/>
  63734. </instance-parameter>
  63735. <parameter name="key" transfer-ownership="none">
  63736. <doc xml:space="preserve">the name of the key to set</doc>
  63737. <type name="utf8" c:type="const gchar*"/>
  63738. </parameter>
  63739. <parameter name="value"
  63740. transfer-ownership="none"
  63741. nullable="1"
  63742. allow-none="1">
  63743. <doc xml:space="preserve">the value to set it to, or %NULL</doc>
  63744. <array c:type="gchar**">
  63745. <type name="utf8" c:type="gchar*"/>
  63746. </array>
  63747. </parameter>
  63748. </parameters>
  63749. </method>
  63750. <method name="set_uint"
  63751. c:identifier="g_settings_set_uint"
  63752. version="2.30">
  63753. <doc xml:space="preserve">Sets @key in @settings to @value.
  63754. A convenience variant of g_settings_set() for 32-bit unsigned
  63755. integers.
  63756. It is a programmer error to give a @key that isn't specified as
  63757. having a uint32 type in the schema for @settings.</doc>
  63758. <return-value transfer-ownership="none">
  63759. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63760. %FALSE if the key was not writable</doc>
  63761. <type name="gboolean" c:type="gboolean"/>
  63762. </return-value>
  63763. <parameters>
  63764. <instance-parameter name="settings" transfer-ownership="none">
  63765. <doc xml:space="preserve">a #GSettings object</doc>
  63766. <type name="Settings" c:type="GSettings*"/>
  63767. </instance-parameter>
  63768. <parameter name="key" transfer-ownership="none">
  63769. <doc xml:space="preserve">the name of the key to set</doc>
  63770. <type name="utf8" c:type="const gchar*"/>
  63771. </parameter>
  63772. <parameter name="value" transfer-ownership="none">
  63773. <doc xml:space="preserve">the value to set it to</doc>
  63774. <type name="guint" c:type="guint"/>
  63775. </parameter>
  63776. </parameters>
  63777. </method>
  63778. <method name="set_value"
  63779. c:identifier="g_settings_set_value"
  63780. version="2.26">
  63781. <doc xml:space="preserve">Sets @key in @settings to @value.
  63782. It is a programmer error to give a @key that isn't contained in the
  63783. schema for @settings or for @value to have the incorrect type, per
  63784. the schema.
  63785. If @value is floating then this function consumes the reference.</doc>
  63786. <return-value transfer-ownership="none">
  63787. <doc xml:space="preserve">%TRUE if setting the key succeeded,
  63788. %FALSE if the key was not writable</doc>
  63789. <type name="gboolean" c:type="gboolean"/>
  63790. </return-value>
  63791. <parameters>
  63792. <instance-parameter name="settings" transfer-ownership="none">
  63793. <doc xml:space="preserve">a #GSettings object</doc>
  63794. <type name="Settings" c:type="GSettings*"/>
  63795. </instance-parameter>
  63796. <parameter name="key" transfer-ownership="none">
  63797. <doc xml:space="preserve">the name of the key to set</doc>
  63798. <type name="utf8" c:type="const gchar*"/>
  63799. </parameter>
  63800. <parameter name="value" transfer-ownership="none">
  63801. <doc xml:space="preserve">a #GVariant of the correct type</doc>
  63802. <type name="GLib.Variant" c:type="GVariant*"/>
  63803. </parameter>
  63804. </parameters>
  63805. </method>
  63806. <property name="backend"
  63807. introspectable="0"
  63808. writable="1"
  63809. construct-only="1"
  63810. transfer-ownership="none">
  63811. <type/>
  63812. </property>
  63813. <property name="delay-apply" version="2.28" transfer-ownership="none">
  63814. <doc xml:space="preserve">Whether the #GSettings object is in 'delay-apply' mode. See
  63815. g_settings_delay() for details.</doc>
  63816. <type name="gboolean" c:type="gboolean"/>
  63817. </property>
  63818. <property name="has-unapplied" transfer-ownership="none">
  63819. <doc xml:space="preserve">If this property is %TRUE, the #GSettings object has outstanding
  63820. changes that will be applied when g_settings_apply() is called.</doc>
  63821. <type name="gboolean" c:type="gboolean"/>
  63822. </property>
  63823. <property name="path"
  63824. writable="1"
  63825. construct-only="1"
  63826. transfer-ownership="none">
  63827. <doc xml:space="preserve">The path within the backend where the settings are stored.</doc>
  63828. <type name="utf8" c:type="gchar*"/>
  63829. </property>
  63830. <property name="schema"
  63831. deprecated="1"
  63832. deprecated-version="2.32"
  63833. writable="1"
  63834. construct-only="1"
  63835. transfer-ownership="none">
  63836. <doc xml:space="preserve">The name of the schema that describes the types of keys
  63837. for this #GSettings object.
  63838. The type of this property is *not* #GSettingsSchema.
  63839. #GSettingsSchema has only existed since version 2.32 and
  63840. unfortunately this name was used in previous versions to refer to
  63841. the schema ID rather than the schema itself. Take care to use the
  63842. 'settings-schema' property if you wish to pass in a
  63843. #GSettingsSchema.</doc>
  63844. <doc-deprecated xml:space="preserve">Use the 'schema-id' property instead. In a future
  63845. version, this property may instead refer to a #GSettingsSchema.</doc-deprecated>
  63846. <type name="utf8" c:type="gchar*"/>
  63847. </property>
  63848. <property name="schema-id"
  63849. writable="1"
  63850. construct-only="1"
  63851. transfer-ownership="none">
  63852. <doc xml:space="preserve">The name of the schema that describes the types of keys
  63853. for this #GSettings object.</doc>
  63854. <type name="utf8" c:type="gchar*"/>
  63855. </property>
  63856. <property name="settings-schema"
  63857. writable="1"
  63858. construct-only="1"
  63859. transfer-ownership="none">
  63860. <doc xml:space="preserve">The #GSettingsSchema describing the types of keys for this
  63861. #GSettings object.
  63862. Ideally, this property would be called 'schema'. #GSettingsSchema
  63863. has only existed since version 2.32, however, and before then the
  63864. 'schema' property was used to refer to the ID of the schema rather
  63865. than the schema itself. Take care.</doc>
  63866. <type name="SettingsSchema"/>
  63867. </property>
  63868. <field name="parent_instance">
  63869. <type name="GObject.Object" c:type="GObject"/>
  63870. </field>
  63871. <field name="priv">
  63872. <type name="SettingsPrivate" c:type="GSettingsPrivate*"/>
  63873. </field>
  63874. <glib:signal name="change-event" when="last">
  63875. <doc xml:space="preserve">The "change-event" signal is emitted once per change event that
  63876. affects this settings object. You should connect to this signal
  63877. only if you are interested in viewing groups of changes before they
  63878. are split out into multiple emissions of the "changed" signal.
  63879. For most use cases it is more appropriate to use the "changed" signal.
  63880. In the event that the change event applies to one or more specified
  63881. keys, @keys will be an array of #GQuark of length @n_keys. In the
  63882. event that the change event applies to the #GSettings object as a
  63883. whole (ie: potentially every key has been changed) then @keys will
  63884. be %NULL and @n_keys will be 0.
  63885. The default handler for this signal invokes the "changed" signal
  63886. for each affected key. If any other connected handler returns
  63887. %TRUE then this default functionality will be suppressed.</doc>
  63888. <return-value transfer-ownership="none">
  63889. <doc xml:space="preserve">%TRUE to stop other handlers from being invoked for the
  63890. event. FALSE to propagate the event further.</doc>
  63891. <type name="gboolean" c:type="gboolean"/>
  63892. </return-value>
  63893. <parameters>
  63894. <parameter name="keys"
  63895. transfer-ownership="none"
  63896. nullable="1"
  63897. allow-none="1">
  63898. <doc xml:space="preserve">
  63899. an array of #GQuarks for the changed keys, or %NULL</doc>
  63900. <array length="1" zero-terminated="0" c:type="gpointer">
  63901. <type name="GLib.Quark"/>
  63902. </array>
  63903. </parameter>
  63904. <parameter name="n_keys" transfer-ownership="none">
  63905. <doc xml:space="preserve">the length of the @keys array, or 0</doc>
  63906. <type name="gint" c:type="gint"/>
  63907. </parameter>
  63908. </parameters>
  63909. </glib:signal>
  63910. <glib:signal name="changed" when="last" detailed="1">
  63911. <doc xml:space="preserve">The "changed" signal is emitted when a key has potentially changed.
  63912. You should call one of the g_settings_get() calls to check the new
  63913. value.
  63914. This signal supports detailed connections. You can connect to the
  63915. detailed signal "changed::x" in order to only receive callbacks
  63916. when key "x" changes.</doc>
  63917. <return-value transfer-ownership="none">
  63918. <type name="none" c:type="void"/>
  63919. </return-value>
  63920. <parameters>
  63921. <parameter name="key" transfer-ownership="none">
  63922. <doc xml:space="preserve">the name of the key that changed</doc>
  63923. <type name="utf8" c:type="gchar*"/>
  63924. </parameter>
  63925. </parameters>
  63926. </glib:signal>
  63927. <glib:signal name="writable-change-event" when="last">
  63928. <doc xml:space="preserve">The "writable-change-event" signal is emitted once per writability
  63929. change event that affects this settings object. You should connect
  63930. to this signal if you are interested in viewing groups of changes
  63931. before they are split out into multiple emissions of the
  63932. "writable-changed" signal. For most use cases it is more
  63933. appropriate to use the "writable-changed" signal.
  63934. In the event that the writability change applies only to a single
  63935. key, @key will be set to the #GQuark for that key. In the event
  63936. that the writability change affects the entire settings object,
  63937. @key will be 0.
  63938. The default handler for this signal invokes the "writable-changed"
  63939. and "changed" signals for each affected key. This is done because
  63940. changes in writability might also imply changes in value (if for
  63941. example, a new mandatory setting is introduced). If any other
  63942. connected handler returns %TRUE then this default functionality
  63943. will be suppressed.</doc>
  63944. <return-value transfer-ownership="none">
  63945. <doc xml:space="preserve">%TRUE to stop other handlers from being invoked for the
  63946. event. FALSE to propagate the event further.</doc>
  63947. <type name="gboolean" c:type="gboolean"/>
  63948. </return-value>
  63949. <parameters>
  63950. <parameter name="key" transfer-ownership="none">
  63951. <doc xml:space="preserve">the quark of the key, or 0</doc>
  63952. <type name="guint" c:type="guint"/>
  63953. </parameter>
  63954. </parameters>
  63955. </glib:signal>
  63956. <glib:signal name="writable-changed" when="last" detailed="1">
  63957. <doc xml:space="preserve">The "writable-changed" signal is emitted when the writability of a
  63958. key has potentially changed. You should call
  63959. g_settings_is_writable() in order to determine the new status.
  63960. This signal supports detailed connections. You can connect to the
  63961. detailed signal "writable-changed::x" in order to only receive
  63962. callbacks when the writability of "x" changes.</doc>
  63963. <return-value transfer-ownership="none">
  63964. <type name="none" c:type="void"/>
  63965. </return-value>
  63966. <parameters>
  63967. <parameter name="key" transfer-ownership="none">
  63968. <doc xml:space="preserve">the key</doc>
  63969. <type name="utf8" c:type="gchar*"/>
  63970. </parameter>
  63971. </parameters>
  63972. </glib:signal>
  63973. </class>
  63974. <record name="SettingsBackend" c:type="GSettingsBackend" disguised="1">
  63975. <doc xml:space="preserve">The #GSettingsBackend interface defines a generic interface for
  63976. non-strictly-typed data that is stored in a hierarchy. To implement
  63977. an alternative storage backend for #GSettings, you need to implement
  63978. the #GSettingsBackend interface and then make it implement the
  63979. extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
  63980. The interface defines methods for reading and writing values, a
  63981. method for determining if writing of certain values will fail
  63982. (lockdown) and a change notification mechanism.
  63983. The semantics of the interface are very precisely defined and
  63984. implementations must carefully adhere to the expectations of
  63985. callers that are documented on each of the interface methods.
  63986. Some of the GSettingsBackend functions accept or return a #GTree.
  63987. These trees always have strings as keys and #GVariant as values.
  63988. g_settings_backend_create_tree() is a convenience function to create
  63989. suitable trees.
  63990. The GSettingsBackend API is exported to allow third-party
  63991. implementations, but does not carry the same stability guarantees
  63992. as the public GIO API. For this reason, you have to define the
  63993. C preprocessor symbol %G_SETTINGS_ENABLE_BACKEND before including
  63994. `gio/gsettingsbackend.h`.</doc>
  63995. </record>
  63996. <bitfield name="SettingsBindFlags"
  63997. glib:type-name="GSettingsBindFlags"
  63998. glib:get-type="g_settings_bind_flags_get_type"
  63999. c:type="GSettingsBindFlags">
  64000. <doc xml:space="preserve">Flags used when creating a binding. These flags determine in which
  64001. direction the binding works. The default is to synchronize in both
  64002. directions.</doc>
  64003. <member name="default"
  64004. value="0"
  64005. c:identifier="G_SETTINGS_BIND_DEFAULT"
  64006. glib:nick="default">
  64007. <doc xml:space="preserve">Equivalent to `G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET`</doc>
  64008. </member>
  64009. <member name="get"
  64010. value="1"
  64011. c:identifier="G_SETTINGS_BIND_GET"
  64012. glib:nick="get">
  64013. <doc xml:space="preserve">Update the #GObject property when the setting changes.
  64014. It is an error to use this flag if the property is not writable.</doc>
  64015. </member>
  64016. <member name="set"
  64017. value="2"
  64018. c:identifier="G_SETTINGS_BIND_SET"
  64019. glib:nick="set">
  64020. <doc xml:space="preserve">Update the setting when the #GObject property changes.
  64021. It is an error to use this flag if the property is not readable.</doc>
  64022. </member>
  64023. <member name="no_sensitivity"
  64024. value="4"
  64025. c:identifier="G_SETTINGS_BIND_NO_SENSITIVITY"
  64026. glib:nick="no-sensitivity">
  64027. <doc xml:space="preserve">Do not try to bind a "sensitivity" property to the writability of the setting</doc>
  64028. </member>
  64029. <member name="get_no_changes"
  64030. value="8"
  64031. c:identifier="G_SETTINGS_BIND_GET_NO_CHANGES"
  64032. glib:nick="get-no-changes">
  64033. <doc xml:space="preserve">When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property
  64034. value initially from the setting, but do not listen for changes of the setting</doc>
  64035. </member>
  64036. <member name="invert_boolean"
  64037. value="16"
  64038. c:identifier="G_SETTINGS_BIND_INVERT_BOOLEAN"
  64039. glib:nick="invert-boolean">
  64040. <doc xml:space="preserve">When passed to g_settings_bind(), uses a pair of mapping functions that invert
  64041. the boolean value when mapping between the setting and the property. The setting and property must both
  64042. be booleans. You cannot pass this flag to g_settings_bind_with_mapping().</doc>
  64043. </member>
  64044. </bitfield>
  64045. <callback name="SettingsBindGetMapping" c:type="GSettingsBindGetMapping">
  64046. <doc xml:space="preserve">The type for the function that is used to convert from #GSettings to
  64047. an object property. The @value is already initialized to hold values
  64048. of the appropriate type.</doc>
  64049. <return-value transfer-ownership="none">
  64050. <doc xml:space="preserve">%TRUE if the conversion succeeded, %FALSE in case of an error</doc>
  64051. <type name="gboolean" c:type="gboolean"/>
  64052. </return-value>
  64053. <parameters>
  64054. <parameter name="value" transfer-ownership="none">
  64055. <doc xml:space="preserve">return location for the property value</doc>
  64056. <type name="GObject.Value" c:type="GValue*"/>
  64057. </parameter>
  64058. <parameter name="variant" transfer-ownership="none">
  64059. <doc xml:space="preserve">the #GVariant</doc>
  64060. <type name="GLib.Variant" c:type="GVariant*"/>
  64061. </parameter>
  64062. <parameter name="user_data"
  64063. transfer-ownership="none"
  64064. nullable="1"
  64065. allow-none="1"
  64066. closure="2">
  64067. <doc xml:space="preserve">user data that was specified when the binding was created</doc>
  64068. <type name="gpointer" c:type="gpointer"/>
  64069. </parameter>
  64070. </parameters>
  64071. </callback>
  64072. <callback name="SettingsBindSetMapping" c:type="GSettingsBindSetMapping">
  64073. <doc xml:space="preserve">The type for the function that is used to convert an object property
  64074. value to a #GVariant for storing it in #GSettings.</doc>
  64075. <return-value transfer-ownership="full">
  64076. <doc xml:space="preserve">a new #GVariant holding the data from @value,
  64077. or %NULL in case of an error</doc>
  64078. <type name="GLib.Variant" c:type="GVariant*"/>
  64079. </return-value>
  64080. <parameters>
  64081. <parameter name="value" transfer-ownership="none">
  64082. <doc xml:space="preserve">a #GValue containing the property value to map</doc>
  64083. <type name="GObject.Value" c:type="const GValue*"/>
  64084. </parameter>
  64085. <parameter name="expected_type" transfer-ownership="none">
  64086. <doc xml:space="preserve">the #GVariantType to create</doc>
  64087. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  64088. </parameter>
  64089. <parameter name="user_data"
  64090. transfer-ownership="none"
  64091. nullable="1"
  64092. allow-none="1"
  64093. closure="2">
  64094. <doc xml:space="preserve">user data that was specified when the binding was created</doc>
  64095. <type name="gpointer" c:type="gpointer"/>
  64096. </parameter>
  64097. </parameters>
  64098. </callback>
  64099. <record name="SettingsClass"
  64100. c:type="GSettingsClass"
  64101. glib:is-gtype-struct-for="Settings">
  64102. <field name="parent_class">
  64103. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  64104. </field>
  64105. <field name="writable_changed">
  64106. <callback name="writable_changed">
  64107. <return-value transfer-ownership="none">
  64108. <type name="none" c:type="void"/>
  64109. </return-value>
  64110. <parameters>
  64111. <parameter name="settings" transfer-ownership="none">
  64112. <type name="Settings" c:type="GSettings*"/>
  64113. </parameter>
  64114. <parameter name="key" transfer-ownership="none">
  64115. <type name="utf8" c:type="const gchar*"/>
  64116. </parameter>
  64117. </parameters>
  64118. </callback>
  64119. </field>
  64120. <field name="changed">
  64121. <callback name="changed">
  64122. <return-value transfer-ownership="none">
  64123. <type name="none" c:type="void"/>
  64124. </return-value>
  64125. <parameters>
  64126. <parameter name="settings" transfer-ownership="none">
  64127. <type name="Settings" c:type="GSettings*"/>
  64128. </parameter>
  64129. <parameter name="key" transfer-ownership="none">
  64130. <type name="utf8" c:type="const gchar*"/>
  64131. </parameter>
  64132. </parameters>
  64133. </callback>
  64134. </field>
  64135. <field name="writable_change_event">
  64136. <callback name="writable_change_event">
  64137. <return-value transfer-ownership="none">
  64138. <type name="gboolean" c:type="gboolean"/>
  64139. </return-value>
  64140. <parameters>
  64141. <parameter name="settings" transfer-ownership="none">
  64142. <type name="Settings" c:type="GSettings*"/>
  64143. </parameter>
  64144. <parameter name="key" transfer-ownership="none">
  64145. <type name="GLib.Quark" c:type="GQuark"/>
  64146. </parameter>
  64147. </parameters>
  64148. </callback>
  64149. </field>
  64150. <field name="change_event">
  64151. <callback name="change_event">
  64152. <return-value transfer-ownership="none">
  64153. <type name="gboolean" c:type="gboolean"/>
  64154. </return-value>
  64155. <parameters>
  64156. <parameter name="settings" transfer-ownership="none">
  64157. <type name="Settings" c:type="GSettings*"/>
  64158. </parameter>
  64159. <parameter name="keys" transfer-ownership="none">
  64160. <type name="GLib.Quark" c:type="const GQuark*"/>
  64161. </parameter>
  64162. <parameter name="n_keys" transfer-ownership="none">
  64163. <type name="gint" c:type="gint"/>
  64164. </parameter>
  64165. </parameters>
  64166. </callback>
  64167. </field>
  64168. <field name="padding">
  64169. <array zero-terminated="0" c:type="gpointer" fixed-size="20">
  64170. <type name="gpointer" c:type="gpointer"/>
  64171. </array>
  64172. </field>
  64173. </record>
  64174. <callback name="SettingsGetMapping" c:type="GSettingsGetMapping">
  64175. <doc xml:space="preserve">The type of the function that is used to convert from a value stored
  64176. in a #GSettings to a value that is useful to the application.
  64177. If the value is successfully mapped, the result should be stored at
  64178. @result and %TRUE returned. If mapping fails (for example, if @value
  64179. is not in the right format) then %FALSE should be returned.
  64180. If @value is %NULL then it means that the mapping function is being
  64181. given a "last chance" to successfully return a valid value. %TRUE
  64182. must be returned in this case.</doc>
  64183. <return-value transfer-ownership="none">
  64184. <doc xml:space="preserve">%TRUE if the conversion succeeded, %FALSE in case of an error</doc>
  64185. <type name="gboolean" c:type="gboolean"/>
  64186. </return-value>
  64187. <parameters>
  64188. <parameter name="value" transfer-ownership="none">
  64189. <doc xml:space="preserve">the #GVariant to map, or %NULL</doc>
  64190. <type name="GLib.Variant" c:type="GVariant*"/>
  64191. </parameter>
  64192. <parameter name="result"
  64193. direction="out"
  64194. caller-allocates="0"
  64195. transfer-ownership="full"
  64196. nullable="1">
  64197. <doc xml:space="preserve">the result of the mapping</doc>
  64198. <type name="gpointer" c:type="gpointer*"/>
  64199. </parameter>
  64200. <parameter name="user_data"
  64201. transfer-ownership="none"
  64202. nullable="1"
  64203. allow-none="1"
  64204. closure="2">
  64205. <doc xml:space="preserve">the user data that was passed to
  64206. g_settings_get_mapped()</doc>
  64207. <type name="gpointer" c:type="gpointer"/>
  64208. </parameter>
  64209. </parameters>
  64210. </callback>
  64211. <record name="SettingsPrivate" c:type="GSettingsPrivate" disguised="1">
  64212. </record>
  64213. <record name="SettingsSchema"
  64214. c:type="GSettingsSchema"
  64215. version="2.32"
  64216. glib:type-name="GSettingsSchema"
  64217. glib:get-type="g_settings_schema_get_type"
  64218. c:symbol-prefix="settings_schema">
  64219. <doc xml:space="preserve">The #GSettingsSchemaSource and #GSettingsSchema APIs provide a
  64220. mechanism for advanced control over the loading of schemas and a
  64221. mechanism for introspecting their content.
  64222. Plugin loading systems that wish to provide plugins a way to access
  64223. settings face the problem of how to make the schemas for these
  64224. settings visible to GSettings. Typically, a plugin will want to ship
  64225. the schema along with itself and it won't be installed into the
  64226. standard system directories for schemas.
  64227. #GSettingsSchemaSource provides a mechanism for dealing with this by
  64228. allowing the creation of a new 'schema source' from which schemas can
  64229. be acquired. This schema source can then become part of the metadata
  64230. associated with the plugin and queried whenever the plugin requires
  64231. access to some settings.
  64232. Consider the following example:
  64233. |[&lt;!-- language="C" --&gt;
  64234. typedef struct
  64235. {
  64236. ...
  64237. GSettingsSchemaSource *schema_source;
  64238. ...
  64239. } Plugin;
  64240. Plugin *
  64241. initialise_plugin (const gchar *dir)
  64242. {
  64243. Plugin *plugin;
  64244. ...
  64245. plugin-&gt;schema_source =
  64246. g_settings_new_schema_source_from_directory (dir,
  64247. g_settings_schema_source_get_default (), FALSE, NULL);
  64248. ...
  64249. return plugin;
  64250. }
  64251. ...
  64252. GSettings *
  64253. plugin_get_settings (Plugin *plugin,
  64254. const gchar *schema_id)
  64255. {
  64256. GSettingsSchema *schema;
  64257. if (schema_id == NULL)
  64258. schema_id = plugin-&gt;identifier;
  64259. schema = g_settings_schema_source_lookup (plugin-&gt;schema_source,
  64260. schema_id, FALSE);
  64261. if (schema == NULL)
  64262. {
  64263. ... disable the plugin or abort, etc ...
  64264. }
  64265. return g_settings_new_full (schema, NULL, NULL);
  64266. }
  64267. ]|
  64268. The code above shows how hooks should be added to the code that
  64269. initialises (or enables) the plugin to create the schema source and
  64270. how an API can be added to the plugin system to provide a convenient
  64271. way for the plugin to access its settings, using the schemas that it
  64272. ships.
  64273. From the standpoint of the plugin, it would need to ensure that it
  64274. ships a gschemas.compiled file as part of itself, and then simply do
  64275. the following:
  64276. |[&lt;!-- language="C" --&gt;
  64277. {
  64278. GSettings *settings;
  64279. gint some_value;
  64280. settings = plugin_get_settings (self, NULL);
  64281. some_value = g_settings_get_int (settings, "some-value");
  64282. ...
  64283. }
  64284. ]|
  64285. It's also possible that the plugin system expects the schema source
  64286. files (ie: .gschema.xml files) instead of a gschemas.compiled file.
  64287. In that case, the plugin loading system must compile the schemas for
  64288. itself before attempting to create the settings source.</doc>
  64289. <method name="get_id" c:identifier="g_settings_schema_get_id">
  64290. <doc xml:space="preserve">Get the ID of @schema.</doc>
  64291. <return-value transfer-ownership="none">
  64292. <doc xml:space="preserve">the ID</doc>
  64293. <type name="utf8" c:type="const gchar*"/>
  64294. </return-value>
  64295. <parameters>
  64296. <instance-parameter name="schema" transfer-ownership="none">
  64297. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64298. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64299. </instance-parameter>
  64300. </parameters>
  64301. </method>
  64302. <method name="get_key"
  64303. c:identifier="g_settings_schema_get_key"
  64304. version="2.40">
  64305. <doc xml:space="preserve">Gets the key named @name from @schema.
  64306. It is a programmer error to request a key that does not exist. See
  64307. g_settings_schema_list_keys().</doc>
  64308. <return-value transfer-ownership="full">
  64309. <doc xml:space="preserve">the #GSettingsSchemaKey for @name</doc>
  64310. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64311. </return-value>
  64312. <parameters>
  64313. <instance-parameter name="schema" transfer-ownership="none">
  64314. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64315. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64316. </instance-parameter>
  64317. <parameter name="name" transfer-ownership="none">
  64318. <doc xml:space="preserve">the name of a key</doc>
  64319. <type name="utf8" c:type="const gchar*"/>
  64320. </parameter>
  64321. </parameters>
  64322. </method>
  64323. <method name="get_path"
  64324. c:identifier="g_settings_schema_get_path"
  64325. version="2.32">
  64326. <doc xml:space="preserve">Gets the path associated with @schema, or %NULL.
  64327. Schemas may be single-instance or relocatable. Single-instance
  64328. schemas correspond to exactly one set of keys in the backend
  64329. database: those located at the path returned by this function.
  64330. Relocatable schemas can be referenced by other schemas and can
  64331. threfore describe multiple sets of keys at different locations. For
  64332. relocatable schemas, this function will return %NULL.</doc>
  64333. <return-value transfer-ownership="none">
  64334. <doc xml:space="preserve">the path of the schema, or %NULL</doc>
  64335. <type name="utf8" c:type="const gchar*"/>
  64336. </return-value>
  64337. <parameters>
  64338. <instance-parameter name="schema" transfer-ownership="none">
  64339. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64340. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64341. </instance-parameter>
  64342. </parameters>
  64343. </method>
  64344. <method name="has_key"
  64345. c:identifier="g_settings_schema_has_key"
  64346. version="2.40">
  64347. <doc xml:space="preserve">Checks if @schema has a key named @name.</doc>
  64348. <return-value transfer-ownership="none">
  64349. <doc xml:space="preserve">%TRUE if such a key exists</doc>
  64350. <type name="gboolean" c:type="gboolean"/>
  64351. </return-value>
  64352. <parameters>
  64353. <instance-parameter name="schema" transfer-ownership="none">
  64354. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64355. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64356. </instance-parameter>
  64357. <parameter name="name" transfer-ownership="none">
  64358. <doc xml:space="preserve">the name of a key</doc>
  64359. <type name="utf8" c:type="const gchar*"/>
  64360. </parameter>
  64361. </parameters>
  64362. </method>
  64363. <method name="list_children"
  64364. c:identifier="g_settings_schema_list_children"
  64365. version="2.44">
  64366. <doc xml:space="preserve">Gets the list of children in @schema.
  64367. You should free the return value with g_strfreev() when you are done
  64368. with it.</doc>
  64369. <return-value transfer-ownership="full">
  64370. <doc xml:space="preserve">a list of the children on @settings</doc>
  64371. <array c:type="gchar**">
  64372. <type name="utf8"/>
  64373. </array>
  64374. </return-value>
  64375. <parameters>
  64376. <instance-parameter name="schema" transfer-ownership="none">
  64377. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64378. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64379. </instance-parameter>
  64380. </parameters>
  64381. </method>
  64382. <method name="list_keys"
  64383. c:identifier="g_settings_schema_list_keys"
  64384. version="2.46">
  64385. <doc xml:space="preserve">Introspects the list of keys on @schema.
  64386. You should probably not be calling this function from "normal" code
  64387. (since you should already know what keys are in your schema). This
  64388. function is intended for introspection reasons.</doc>
  64389. <return-value transfer-ownership="full">
  64390. <doc xml:space="preserve">a list of the keys on
  64391. @schema</doc>
  64392. <array c:type="gchar**">
  64393. <type name="utf8"/>
  64394. </array>
  64395. </return-value>
  64396. <parameters>
  64397. <instance-parameter name="schema" transfer-ownership="none">
  64398. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64399. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64400. </instance-parameter>
  64401. </parameters>
  64402. </method>
  64403. <method name="ref" c:identifier="g_settings_schema_ref" version="2.32">
  64404. <doc xml:space="preserve">Increase the reference count of @schema, returning a new reference.</doc>
  64405. <return-value transfer-ownership="full">
  64406. <doc xml:space="preserve">a new reference to @schema</doc>
  64407. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64408. </return-value>
  64409. <parameters>
  64410. <instance-parameter name="schema" transfer-ownership="none">
  64411. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64412. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64413. </instance-parameter>
  64414. </parameters>
  64415. </method>
  64416. <method name="unref"
  64417. c:identifier="g_settings_schema_unref"
  64418. version="2.32">
  64419. <doc xml:space="preserve">Decrease the reference count of @schema, possibly freeing it.</doc>
  64420. <return-value transfer-ownership="none">
  64421. <type name="none" c:type="void"/>
  64422. </return-value>
  64423. <parameters>
  64424. <instance-parameter name="schema" transfer-ownership="none">
  64425. <doc xml:space="preserve">a #GSettingsSchema</doc>
  64426. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64427. </instance-parameter>
  64428. </parameters>
  64429. </method>
  64430. </record>
  64431. <record name="SettingsSchemaKey"
  64432. c:type="GSettingsSchemaKey"
  64433. glib:type-name="GSettingsSchemaKey"
  64434. glib:get-type="g_settings_schema_key_get_type"
  64435. c:symbol-prefix="settings_schema_key">
  64436. <doc xml:space="preserve">#GSettingsSchemaKey is an opaque data structure and can only be accessed
  64437. using the following functions.</doc>
  64438. <method name="get_default_value"
  64439. c:identifier="g_settings_schema_key_get_default_value"
  64440. version="2.40">
  64441. <doc xml:space="preserve">Gets the default value for @key.
  64442. Note that this is the default value according to the schema. System
  64443. administrator defaults and lockdown are not visible via this API.</doc>
  64444. <return-value transfer-ownership="full">
  64445. <doc xml:space="preserve">the default value for the key</doc>
  64446. <type name="GLib.Variant" c:type="GVariant*"/>
  64447. </return-value>
  64448. <parameters>
  64449. <instance-parameter name="key" transfer-ownership="none">
  64450. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64451. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64452. </instance-parameter>
  64453. </parameters>
  64454. </method>
  64455. <method name="get_description"
  64456. c:identifier="g_settings_schema_key_get_description"
  64457. version="2.34">
  64458. <doc xml:space="preserve">Gets the description for @key.
  64459. If no description has been provided in the schema for @key, returns
  64460. %NULL.
  64461. The description can be one sentence to several paragraphs in length.
  64462. Paragraphs are delimited with a double newline. Descriptions can be
  64463. translated and the value returned from this function is is the
  64464. current locale.
  64465. This function is slow. The summary and description information for
  64466. the schemas is not stored in the compiled schema database so this
  64467. function has to parse all of the source XML files in the schema
  64468. directory.</doc>
  64469. <return-value transfer-ownership="none">
  64470. <doc xml:space="preserve">the description for @key, or %NULL</doc>
  64471. <type name="utf8" c:type="const gchar*"/>
  64472. </return-value>
  64473. <parameters>
  64474. <instance-parameter name="key" transfer-ownership="none">
  64475. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64476. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64477. </instance-parameter>
  64478. </parameters>
  64479. </method>
  64480. <method name="get_name"
  64481. c:identifier="g_settings_schema_key_get_name"
  64482. version="2.44">
  64483. <doc xml:space="preserve">Gets the name of @key.</doc>
  64484. <return-value transfer-ownership="none">
  64485. <doc xml:space="preserve">the name of @key.</doc>
  64486. <type name="utf8" c:type="const gchar*"/>
  64487. </return-value>
  64488. <parameters>
  64489. <instance-parameter name="key" transfer-ownership="none">
  64490. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64491. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64492. </instance-parameter>
  64493. </parameters>
  64494. </method>
  64495. <method name="get_range"
  64496. c:identifier="g_settings_schema_key_get_range"
  64497. version="2.40">
  64498. <doc xml:space="preserve">Queries the range of a key.
  64499. This function will return a #GVariant that fully describes the range
  64500. of values that are valid for @key.
  64501. The type of #GVariant returned is `(sv)`. The string describes
  64502. the type of range restriction in effect. The type and meaning of
  64503. the value contained in the variant depends on the string.
  64504. If the string is `'type'` then the variant contains an empty array.
  64505. The element type of that empty array is the expected type of value
  64506. and all values of that type are valid.
  64507. If the string is `'enum'` then the variant contains an array
  64508. enumerating the possible values. Each item in the array is
  64509. a possible valid value and no other values are valid.
  64510. If the string is `'flags'` then the variant contains an array. Each
  64511. item in the array is a value that may appear zero or one times in an
  64512. array to be used as the value for this key. For example, if the
  64513. variant contained the array `['x', 'y']` then the valid values for
  64514. the key would be `[]`, `['x']`, `['y']`, `['x', 'y']` and
  64515. `['y', 'x']`.
  64516. Finally, if the string is `'range'` then the variant contains a pair
  64517. of like-typed values -- the minimum and maximum permissible values
  64518. for this key.
  64519. This information should not be used by normal programs. It is
  64520. considered to be a hint for introspection purposes. Normal programs
  64521. should already know what is permitted by their own schema. The
  64522. format may change in any way in the future -- but particularly, new
  64523. forms may be added to the possibilities described above.
  64524. You should free the returned value with g_variant_unref() when it is
  64525. no longer needed.</doc>
  64526. <return-value transfer-ownership="full">
  64527. <doc xml:space="preserve">a #GVariant describing the range</doc>
  64528. <type name="GLib.Variant" c:type="GVariant*"/>
  64529. </return-value>
  64530. <parameters>
  64531. <instance-parameter name="key" transfer-ownership="none">
  64532. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64533. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64534. </instance-parameter>
  64535. </parameters>
  64536. </method>
  64537. <method name="get_summary"
  64538. c:identifier="g_settings_schema_key_get_summary"
  64539. version="2.34">
  64540. <doc xml:space="preserve">Gets the summary for @key.
  64541. If no summary has been provided in the schema for @key, returns
  64542. %NULL.
  64543. The summary is a short description of the purpose of the key; usually
  64544. one short sentence. Summaries can be translated and the value
  64545. returned from this function is is the current locale.
  64546. This function is slow. The summary and description information for
  64547. the schemas is not stored in the compiled schema database so this
  64548. function has to parse all of the source XML files in the schema
  64549. directory.</doc>
  64550. <return-value transfer-ownership="none">
  64551. <doc xml:space="preserve">the summary for @key, or %NULL</doc>
  64552. <type name="utf8" c:type="const gchar*"/>
  64553. </return-value>
  64554. <parameters>
  64555. <instance-parameter name="key" transfer-ownership="none">
  64556. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64557. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64558. </instance-parameter>
  64559. </parameters>
  64560. </method>
  64561. <method name="get_value_type"
  64562. c:identifier="g_settings_schema_key_get_value_type"
  64563. version="2.40">
  64564. <doc xml:space="preserve">Gets the #GVariantType of @key.</doc>
  64565. <return-value transfer-ownership="none">
  64566. <doc xml:space="preserve">the type of @key</doc>
  64567. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  64568. </return-value>
  64569. <parameters>
  64570. <instance-parameter name="key" transfer-ownership="none">
  64571. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64572. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64573. </instance-parameter>
  64574. </parameters>
  64575. </method>
  64576. <method name="range_check"
  64577. c:identifier="g_settings_schema_key_range_check"
  64578. version="2.40">
  64579. <doc xml:space="preserve">Checks if the given @value is of the correct type and within the
  64580. permitted range for @key.
  64581. It is a programmer error if @value is not of the correct type -- you
  64582. must check for this first.</doc>
  64583. <return-value transfer-ownership="none">
  64584. <doc xml:space="preserve">%TRUE if @value is valid for @key</doc>
  64585. <type name="gboolean" c:type="gboolean"/>
  64586. </return-value>
  64587. <parameters>
  64588. <instance-parameter name="key" transfer-ownership="none">
  64589. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64590. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64591. </instance-parameter>
  64592. <parameter name="value" transfer-ownership="none">
  64593. <doc xml:space="preserve">the value to check</doc>
  64594. <type name="GLib.Variant" c:type="GVariant*"/>
  64595. </parameter>
  64596. </parameters>
  64597. </method>
  64598. <method name="ref"
  64599. c:identifier="g_settings_schema_key_ref"
  64600. version="2.40">
  64601. <doc xml:space="preserve">Increase the reference count of @key, returning a new reference.</doc>
  64602. <return-value transfer-ownership="full">
  64603. <doc xml:space="preserve">a new reference to @key</doc>
  64604. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64605. </return-value>
  64606. <parameters>
  64607. <instance-parameter name="key" transfer-ownership="none">
  64608. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64609. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64610. </instance-parameter>
  64611. </parameters>
  64612. </method>
  64613. <method name="unref"
  64614. c:identifier="g_settings_schema_key_unref"
  64615. version="2.40">
  64616. <doc xml:space="preserve">Decrease the reference count of @key, possibly freeing it.</doc>
  64617. <return-value transfer-ownership="none">
  64618. <type name="none" c:type="void"/>
  64619. </return-value>
  64620. <parameters>
  64621. <instance-parameter name="key" transfer-ownership="none">
  64622. <doc xml:space="preserve">a #GSettingsSchemaKey</doc>
  64623. <type name="SettingsSchemaKey" c:type="GSettingsSchemaKey*"/>
  64624. </instance-parameter>
  64625. </parameters>
  64626. </method>
  64627. </record>
  64628. <record name="SettingsSchemaSource"
  64629. c:type="GSettingsSchemaSource"
  64630. version="2.32"
  64631. glib:type-name="GSettingsSchemaSource"
  64632. glib:get-type="g_settings_schema_source_get_type"
  64633. c:symbol-prefix="settings_schema_source">
  64634. <doc xml:space="preserve">This is an opaque structure type. You may not access it directly.</doc>
  64635. <constructor name="new_from_directory"
  64636. c:identifier="g_settings_schema_source_new_from_directory"
  64637. version="2.32"
  64638. throws="1">
  64639. <doc xml:space="preserve">Attempts to create a new schema source corresponding to the contents
  64640. of the given directory.
  64641. This function is not required for normal uses of #GSettings but it
  64642. may be useful to authors of plugin management systems.
  64643. The directory should contain a file called `gschemas.compiled` as
  64644. produced by the [glib-compile-schemas][glib-compile-schemas] tool.
  64645. If @trusted is %TRUE then `gschemas.compiled` is trusted not to be
  64646. corrupted. This assumption has a performance advantage, but can result
  64647. in crashes or inconsistent behaviour in the case of a corrupted file.
  64648. Generally, you should set @trusted to %TRUE for files installed by the
  64649. system and to %FALSE for files in the home directory.
  64650. If @parent is non-%NULL then there are two effects.
  64651. First, if g_settings_schema_source_lookup() is called with the
  64652. @recursive flag set to %TRUE and the schema can not be found in the
  64653. source, the lookup will recurse to the parent.
  64654. Second, any references to other schemas specified within this
  64655. source (ie: `child` or `extends`) references may be resolved
  64656. from the @parent.
  64657. For this second reason, except in very unusual situations, the
  64658. @parent should probably be given as the default schema source, as
  64659. returned by g_settings_schema_source_get_default().</doc>
  64660. <return-value transfer-ownership="full">
  64661. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64662. </return-value>
  64663. <parameters>
  64664. <parameter name="directory" transfer-ownership="none">
  64665. <doc xml:space="preserve">the filename of a directory</doc>
  64666. <type name="utf8" c:type="const gchar*"/>
  64667. </parameter>
  64668. <parameter name="parent"
  64669. transfer-ownership="none"
  64670. nullable="1"
  64671. allow-none="1">
  64672. <doc xml:space="preserve">a #GSettingsSchemaSource, or %NULL</doc>
  64673. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64674. </parameter>
  64675. <parameter name="trusted" transfer-ownership="none">
  64676. <doc xml:space="preserve">%TRUE, if the directory is trusted</doc>
  64677. <type name="gboolean" c:type="gboolean"/>
  64678. </parameter>
  64679. </parameters>
  64680. </constructor>
  64681. <method name="list_schemas"
  64682. c:identifier="g_settings_schema_source_list_schemas"
  64683. version="2.40">
  64684. <doc xml:space="preserve">Lists the schemas in a given source.
  64685. If @recursive is %TRUE then include parent sources. If %FALSE then
  64686. only include the schemas from one source (ie: one directory). You
  64687. probably want %TRUE.
  64688. Non-relocatable schemas are those for which you can call
  64689. g_settings_new(). Relocatable schemas are those for which you must
  64690. use g_settings_new_with_path().
  64691. Do not call this function from normal programs. This is designed for
  64692. use by database editors, commandline tools, etc.</doc>
  64693. <return-value transfer-ownership="none">
  64694. <type name="none" c:type="void"/>
  64695. </return-value>
  64696. <parameters>
  64697. <instance-parameter name="source" transfer-ownership="none">
  64698. <doc xml:space="preserve">a #GSettingsSchemaSource</doc>
  64699. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64700. </instance-parameter>
  64701. <parameter name="recursive" transfer-ownership="none">
  64702. <doc xml:space="preserve">if we should recurse</doc>
  64703. <type name="gboolean" c:type="gboolean"/>
  64704. </parameter>
  64705. <parameter name="non_relocatable"
  64706. direction="out"
  64707. caller-allocates="0"
  64708. transfer-ownership="full">
  64709. <doc xml:space="preserve">the
  64710. list of non-relocatable schemas</doc>
  64711. <array c:type="gchar***">
  64712. <type name="utf8" c:type="gchar**"/>
  64713. </array>
  64714. </parameter>
  64715. <parameter name="relocatable"
  64716. direction="out"
  64717. caller-allocates="0"
  64718. transfer-ownership="full">
  64719. <doc xml:space="preserve">the list
  64720. of relocatable schemas</doc>
  64721. <array c:type="gchar***">
  64722. <type name="utf8" c:type="gchar**"/>
  64723. </array>
  64724. </parameter>
  64725. </parameters>
  64726. </method>
  64727. <method name="lookup"
  64728. c:identifier="g_settings_schema_source_lookup"
  64729. version="2.32">
  64730. <doc xml:space="preserve">Looks up a schema with the identifier @schema_id in @source.
  64731. This function is not required for normal uses of #GSettings but it
  64732. may be useful to authors of plugin management systems or to those who
  64733. want to introspect the content of schemas.
  64734. If the schema isn't found directly in @source and @recursive is %TRUE
  64735. then the parent sources will also be checked.
  64736. If the schema isn't found, %NULL is returned.</doc>
  64737. <return-value transfer-ownership="full" nullable="1">
  64738. <doc xml:space="preserve">a new #GSettingsSchema</doc>
  64739. <type name="SettingsSchema" c:type="GSettingsSchema*"/>
  64740. </return-value>
  64741. <parameters>
  64742. <instance-parameter name="source" transfer-ownership="none">
  64743. <doc xml:space="preserve">a #GSettingsSchemaSource</doc>
  64744. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64745. </instance-parameter>
  64746. <parameter name="schema_id" transfer-ownership="none">
  64747. <doc xml:space="preserve">a schema ID</doc>
  64748. <type name="utf8" c:type="const gchar*"/>
  64749. </parameter>
  64750. <parameter name="recursive" transfer-ownership="none">
  64751. <doc xml:space="preserve">%TRUE if the lookup should be recursive</doc>
  64752. <type name="gboolean" c:type="gboolean"/>
  64753. </parameter>
  64754. </parameters>
  64755. </method>
  64756. <method name="ref"
  64757. c:identifier="g_settings_schema_source_ref"
  64758. version="2.32">
  64759. <doc xml:space="preserve">Increase the reference count of @source, returning a new reference.</doc>
  64760. <return-value transfer-ownership="full">
  64761. <doc xml:space="preserve">a new reference to @source</doc>
  64762. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64763. </return-value>
  64764. <parameters>
  64765. <instance-parameter name="source" transfer-ownership="none">
  64766. <doc xml:space="preserve">a #GSettingsSchemaSource</doc>
  64767. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64768. </instance-parameter>
  64769. </parameters>
  64770. </method>
  64771. <method name="unref"
  64772. c:identifier="g_settings_schema_source_unref"
  64773. version="2.32">
  64774. <doc xml:space="preserve">Decrease the reference count of @source, possibly freeing it.</doc>
  64775. <return-value transfer-ownership="none">
  64776. <type name="none" c:type="void"/>
  64777. </return-value>
  64778. <parameters>
  64779. <instance-parameter name="source" transfer-ownership="none">
  64780. <doc xml:space="preserve">a #GSettingsSchemaSource</doc>
  64781. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64782. </instance-parameter>
  64783. </parameters>
  64784. </method>
  64785. <function name="get_default"
  64786. c:identifier="g_settings_schema_source_get_default"
  64787. version="2.32">
  64788. <doc xml:space="preserve">Gets the default system schema source.
  64789. This function is not required for normal uses of #GSettings but it
  64790. may be useful to authors of plugin management systems or to those who
  64791. want to introspect the content of schemas.
  64792. If no schemas are installed, %NULL will be returned.
  64793. The returned source may actually consist of multiple schema sources
  64794. from different directories, depending on which directories were given
  64795. in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all
  64796. lookups performed against the default source should probably be done
  64797. recursively.</doc>
  64798. <return-value transfer-ownership="none">
  64799. <doc xml:space="preserve">the default schema source</doc>
  64800. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  64801. </return-value>
  64802. </function>
  64803. </record>
  64804. <class name="SimpleAction"
  64805. c:symbol-prefix="simple_action"
  64806. c:type="GSimpleAction"
  64807. parent="GObject.Object"
  64808. glib:type-name="GSimpleAction"
  64809. glib:get-type="g_simple_action_get_type">
  64810. <doc xml:space="preserve">A #GSimpleAction is the obvious simple implementation of the #GAction
  64811. interface. This is the easiest way to create an action for purposes of
  64812. adding it to a #GSimpleActionGroup.
  64813. See also #GtkAction.</doc>
  64814. <implements name="Action"/>
  64815. <constructor name="new"
  64816. c:identifier="g_simple_action_new"
  64817. version="2.28">
  64818. <doc xml:space="preserve">Creates a new action.
  64819. The created action is stateless. See g_simple_action_new_stateful().</doc>
  64820. <return-value transfer-ownership="full">
  64821. <doc xml:space="preserve">a new #GSimpleAction</doc>
  64822. <type name="SimpleAction" c:type="GSimpleAction*"/>
  64823. </return-value>
  64824. <parameters>
  64825. <parameter name="name" transfer-ownership="none">
  64826. <doc xml:space="preserve">the name of the action</doc>
  64827. <type name="utf8" c:type="const gchar*"/>
  64828. </parameter>
  64829. <parameter name="parameter_type"
  64830. transfer-ownership="none"
  64831. nullable="1"
  64832. allow-none="1">
  64833. <doc xml:space="preserve">the type of parameter to the activate function</doc>
  64834. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  64835. </parameter>
  64836. </parameters>
  64837. </constructor>
  64838. <constructor name="new_stateful"
  64839. c:identifier="g_simple_action_new_stateful"
  64840. version="2.28">
  64841. <doc xml:space="preserve">Creates a new stateful action.
  64842. @state is the initial state of the action. All future state values
  64843. must have the same #GVariantType as the initial state.
  64844. If the @state GVariant is floating, it is consumed.</doc>
  64845. <return-value transfer-ownership="full">
  64846. <doc xml:space="preserve">a new #GSimpleAction</doc>
  64847. <type name="SimpleAction" c:type="GSimpleAction*"/>
  64848. </return-value>
  64849. <parameters>
  64850. <parameter name="name" transfer-ownership="none">
  64851. <doc xml:space="preserve">the name of the action</doc>
  64852. <type name="utf8" c:type="const gchar*"/>
  64853. </parameter>
  64854. <parameter name="parameter_type"
  64855. transfer-ownership="none"
  64856. nullable="1"
  64857. allow-none="1">
  64858. <doc xml:space="preserve">the type of the parameter to the activate function</doc>
  64859. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  64860. </parameter>
  64861. <parameter name="state" transfer-ownership="none">
  64862. <doc xml:space="preserve">the initial state of the action</doc>
  64863. <type name="GLib.Variant" c:type="GVariant*"/>
  64864. </parameter>
  64865. </parameters>
  64866. </constructor>
  64867. <method name="set_enabled"
  64868. c:identifier="g_simple_action_set_enabled"
  64869. version="2.28">
  64870. <doc xml:space="preserve">Sets the action as enabled or not.
  64871. An action must be enabled in order to be activated or in order to
  64872. have its state changed from outside callers.
  64873. This should only be called by the implementor of the action. Users
  64874. of the action should not attempt to modify its enabled flag.</doc>
  64875. <return-value transfer-ownership="none">
  64876. <type name="none" c:type="void"/>
  64877. </return-value>
  64878. <parameters>
  64879. <instance-parameter name="simple" transfer-ownership="none">
  64880. <doc xml:space="preserve">a #GSimpleAction</doc>
  64881. <type name="SimpleAction" c:type="GSimpleAction*"/>
  64882. </instance-parameter>
  64883. <parameter name="enabled" transfer-ownership="none">
  64884. <doc xml:space="preserve">whether the action is enabled</doc>
  64885. <type name="gboolean" c:type="gboolean"/>
  64886. </parameter>
  64887. </parameters>
  64888. </method>
  64889. <method name="set_state"
  64890. c:identifier="g_simple_action_set_state"
  64891. version="2.30">
  64892. <doc xml:space="preserve">Sets the state of the action.
  64893. This directly updates the 'state' property to the given value.
  64894. This should only be called by the implementor of the action. Users
  64895. of the action should not attempt to directly modify the 'state'
  64896. property. Instead, they should call g_action_change_state() to
  64897. request the change.
  64898. If the @value GVariant is floating, it is consumed.</doc>
  64899. <return-value transfer-ownership="none">
  64900. <type name="none" c:type="void"/>
  64901. </return-value>
  64902. <parameters>
  64903. <instance-parameter name="simple" transfer-ownership="none">
  64904. <doc xml:space="preserve">a #GSimpleAction</doc>
  64905. <type name="SimpleAction" c:type="GSimpleAction*"/>
  64906. </instance-parameter>
  64907. <parameter name="value" transfer-ownership="none">
  64908. <doc xml:space="preserve">the new #GVariant for the state</doc>
  64909. <type name="GLib.Variant" c:type="GVariant*"/>
  64910. </parameter>
  64911. </parameters>
  64912. </method>
  64913. <method name="set_state_hint"
  64914. c:identifier="g_simple_action_set_state_hint"
  64915. version="2.44">
  64916. <doc xml:space="preserve">Sets the state hint for the action.
  64917. See g_action_get_state_hint() for more information about
  64918. action state hints.</doc>
  64919. <return-value transfer-ownership="none">
  64920. <type name="none" c:type="void"/>
  64921. </return-value>
  64922. <parameters>
  64923. <instance-parameter name="simple" transfer-ownership="none">
  64924. <doc xml:space="preserve">a #GSimpleAction</doc>
  64925. <type name="SimpleAction" c:type="GSimpleAction*"/>
  64926. </instance-parameter>
  64927. <parameter name="state_hint"
  64928. transfer-ownership="none"
  64929. nullable="1"
  64930. allow-none="1">
  64931. <doc xml:space="preserve">a #GVariant representing the state hint</doc>
  64932. <type name="GLib.Variant" c:type="GVariant*"/>
  64933. </parameter>
  64934. </parameters>
  64935. </method>
  64936. <property name="enabled"
  64937. version="2.28"
  64938. writable="1"
  64939. transfer-ownership="none">
  64940. <doc xml:space="preserve">If @action is currently enabled.
  64941. If the action is disabled then calls to g_action_activate() and
  64942. g_action_change_state() have no effect.</doc>
  64943. <type name="gboolean" c:type="gboolean"/>
  64944. </property>
  64945. <property name="name"
  64946. version="2.28"
  64947. writable="1"
  64948. construct-only="1"
  64949. transfer-ownership="none">
  64950. <doc xml:space="preserve">The name of the action. This is mostly meaningful for identifying
  64951. the action once it has been added to a #GSimpleActionGroup.</doc>
  64952. <type name="utf8" c:type="gchar*"/>
  64953. </property>
  64954. <property name="parameter-type"
  64955. version="2.28"
  64956. writable="1"
  64957. construct-only="1"
  64958. transfer-ownership="none">
  64959. <doc xml:space="preserve">The type of the parameter that must be given when activating the
  64960. action.</doc>
  64961. <type name="GLib.VariantType"/>
  64962. </property>
  64963. <property name="state"
  64964. version="2.28"
  64965. writable="1"
  64966. construct="1"
  64967. transfer-ownership="none">
  64968. <doc xml:space="preserve">The state of the action, or %NULL if the action is stateless.</doc>
  64969. <type name="GLib.Variant"/>
  64970. </property>
  64971. <property name="state-type" version="2.28" transfer-ownership="none">
  64972. <doc xml:space="preserve">The #GVariantType of the state that the action has, or %NULL if the
  64973. action is stateless.</doc>
  64974. <type name="GLib.VariantType"/>
  64975. </property>
  64976. <glib:signal name="activate" when="last" version="2.28">
  64977. <doc xml:space="preserve">Indicates that the action was just activated.
  64978. @parameter will always be of the expected type. In the event that
  64979. an incorrect type was given, no signal will be emitted.
  64980. Since GLib 2.40, if no handler is connected to this signal then the
  64981. default behaviour for boolean-stated actions with a %NULL parameter
  64982. type is to toggle them via the #GSimpleAction::change-state signal.
  64983. For stateful actions where the state type is equal to the parameter
  64984. type, the default is to forward them directly to
  64985. #GSimpleAction::change-state. This should allow almost all users
  64986. of #GSimpleAction to connect only one handler or the other.</doc>
  64987. <return-value transfer-ownership="none">
  64988. <type name="none" c:type="void"/>
  64989. </return-value>
  64990. <parameters>
  64991. <parameter name="parameter"
  64992. transfer-ownership="none"
  64993. nullable="1"
  64994. allow-none="1">
  64995. <doc xml:space="preserve">the parameter to the activation</doc>
  64996. <type name="GLib.Variant"/>
  64997. </parameter>
  64998. </parameters>
  64999. </glib:signal>
  65000. <glib:signal name="change-state" when="last" version="2.30">
  65001. <doc xml:space="preserve">Indicates that the action just received a request to change its
  65002. state.
  65003. @value will always be of the correct state type. In the event that
  65004. an incorrect type was given, no signal will be emitted.
  65005. If no handler is connected to this signal then the default
  65006. behaviour is to call g_simple_action_set_state() to set the state
  65007. to the requested value. If you connect a signal handler then no
  65008. default action is taken. If the state should change then you must
  65009. call g_simple_action_set_state() from the handler.
  65010. An example of a 'change-state' handler:
  65011. |[&lt;!-- language="C" --&gt;
  65012. static void
  65013. change_volume_state (GSimpleAction *action,
  65014. GVariant *value,
  65015. gpointer user_data)
  65016. {
  65017. gint requested;
  65018. requested = g_variant_get_int32 (value);
  65019. // Volume only goes from 0 to 10
  65020. if (0 &lt;= requested &amp;&amp; requested &lt;= 10)
  65021. g_simple_action_set_state (action, value);
  65022. }
  65023. ]|
  65024. The handler need not set the state to the requested value.
  65025. It could set it to any value at all, or take some other action.</doc>
  65026. <return-value transfer-ownership="none">
  65027. <type name="none" c:type="void"/>
  65028. </return-value>
  65029. <parameters>
  65030. <parameter name="value"
  65031. transfer-ownership="none"
  65032. nullable="1"
  65033. allow-none="1">
  65034. <doc xml:space="preserve">the requested value for the state</doc>
  65035. <type name="GLib.Variant"/>
  65036. </parameter>
  65037. </parameters>
  65038. </glib:signal>
  65039. </class>
  65040. <class name="SimpleActionGroup"
  65041. c:symbol-prefix="simple_action_group"
  65042. c:type="GSimpleActionGroup"
  65043. version="2.28"
  65044. parent="GObject.Object"
  65045. glib:type-name="GSimpleActionGroup"
  65046. glib:get-type="g_simple_action_group_get_type"
  65047. glib:type-struct="SimpleActionGroupClass">
  65048. <doc xml:space="preserve">#GSimpleActionGroup is a hash table filled with #GAction objects,
  65049. implementing the #GActionGroup and #GActionMap interfaces.</doc>
  65050. <implements name="ActionGroup"/>
  65051. <implements name="ActionMap"/>
  65052. <constructor name="new"
  65053. c:identifier="g_simple_action_group_new"
  65054. version="2.28">
  65055. <doc xml:space="preserve">Creates a new, empty, #GSimpleActionGroup.</doc>
  65056. <return-value transfer-ownership="full">
  65057. <doc xml:space="preserve">a new #GSimpleActionGroup</doc>
  65058. <type name="SimpleActionGroup" c:type="GSimpleActionGroup*"/>
  65059. </return-value>
  65060. </constructor>
  65061. <method name="add_entries"
  65062. c:identifier="g_simple_action_group_add_entries"
  65063. version="2.30"
  65064. deprecated="1"
  65065. deprecated-version="2.38">
  65066. <doc xml:space="preserve">A convenience function for creating multiple #GSimpleAction instances
  65067. and adding them to the action group.</doc>
  65068. <doc-deprecated xml:space="preserve">Use g_action_map_add_action_entries()</doc-deprecated>
  65069. <return-value transfer-ownership="none">
  65070. <type name="none" c:type="void"/>
  65071. </return-value>
  65072. <parameters>
  65073. <instance-parameter name="simple" transfer-ownership="none">
  65074. <doc xml:space="preserve">a #GSimpleActionGroup</doc>
  65075. <type name="SimpleActionGroup" c:type="GSimpleActionGroup*"/>
  65076. </instance-parameter>
  65077. <parameter name="entries" transfer-ownership="none">
  65078. <doc xml:space="preserve">a pointer to the first item in
  65079. an array of #GActionEntry structs</doc>
  65080. <array length="1" zero-terminated="0" c:type="GActionEntry*">
  65081. <type name="ActionEntry" c:type="GActionEntry"/>
  65082. </array>
  65083. </parameter>
  65084. <parameter name="n_entries" transfer-ownership="none">
  65085. <doc xml:space="preserve">the length of @entries, or -1</doc>
  65086. <type name="gint" c:type="gint"/>
  65087. </parameter>
  65088. <parameter name="user_data"
  65089. transfer-ownership="none"
  65090. nullable="1"
  65091. allow-none="1">
  65092. <doc xml:space="preserve">the user data for signal connections</doc>
  65093. <type name="gpointer" c:type="gpointer"/>
  65094. </parameter>
  65095. </parameters>
  65096. </method>
  65097. <method name="insert"
  65098. c:identifier="g_simple_action_group_insert"
  65099. version="2.28"
  65100. deprecated="1"
  65101. deprecated-version="2.38">
  65102. <doc xml:space="preserve">Adds an action to the action group.
  65103. If the action group already contains an action with the same name as
  65104. @action then the old action is dropped from the group.
  65105. The action group takes its own reference on @action.</doc>
  65106. <doc-deprecated xml:space="preserve">Use g_action_map_add_action()</doc-deprecated>
  65107. <return-value transfer-ownership="none">
  65108. <type name="none" c:type="void"/>
  65109. </return-value>
  65110. <parameters>
  65111. <instance-parameter name="simple" transfer-ownership="none">
  65112. <doc xml:space="preserve">a #GSimpleActionGroup</doc>
  65113. <type name="SimpleActionGroup" c:type="GSimpleActionGroup*"/>
  65114. </instance-parameter>
  65115. <parameter name="action" transfer-ownership="none">
  65116. <doc xml:space="preserve">a #GAction</doc>
  65117. <type name="Action" c:type="GAction*"/>
  65118. </parameter>
  65119. </parameters>
  65120. </method>
  65121. <method name="lookup"
  65122. c:identifier="g_simple_action_group_lookup"
  65123. version="2.28"
  65124. deprecated="1"
  65125. deprecated-version="2.38">
  65126. <doc xml:space="preserve">Looks up the action with the name @action_name in the group.
  65127. If no such action exists, returns %NULL.</doc>
  65128. <doc-deprecated xml:space="preserve">Use g_action_map_lookup_action()</doc-deprecated>
  65129. <return-value transfer-ownership="none">
  65130. <doc xml:space="preserve">a #GAction, or %NULL</doc>
  65131. <type name="Action" c:type="GAction*"/>
  65132. </return-value>
  65133. <parameters>
  65134. <instance-parameter name="simple" transfer-ownership="none">
  65135. <doc xml:space="preserve">a #GSimpleActionGroup</doc>
  65136. <type name="SimpleActionGroup" c:type="GSimpleActionGroup*"/>
  65137. </instance-parameter>
  65138. <parameter name="action_name" transfer-ownership="none">
  65139. <doc xml:space="preserve">the name of an action</doc>
  65140. <type name="utf8" c:type="const gchar*"/>
  65141. </parameter>
  65142. </parameters>
  65143. </method>
  65144. <method name="remove"
  65145. c:identifier="g_simple_action_group_remove"
  65146. version="2.28"
  65147. deprecated="1"
  65148. deprecated-version="2.38">
  65149. <doc xml:space="preserve">Removes the named action from the action group.
  65150. If no action of this name is in the group then nothing happens.</doc>
  65151. <doc-deprecated xml:space="preserve">Use g_action_map_remove_action()</doc-deprecated>
  65152. <return-value transfer-ownership="none">
  65153. <type name="none" c:type="void"/>
  65154. </return-value>
  65155. <parameters>
  65156. <instance-parameter name="simple" transfer-ownership="none">
  65157. <doc xml:space="preserve">a #GSimpleActionGroup</doc>
  65158. <type name="SimpleActionGroup" c:type="GSimpleActionGroup*"/>
  65159. </instance-parameter>
  65160. <parameter name="action_name" transfer-ownership="none">
  65161. <doc xml:space="preserve">the name of the action</doc>
  65162. <type name="utf8" c:type="const gchar*"/>
  65163. </parameter>
  65164. </parameters>
  65165. </method>
  65166. <field name="parent_instance" readable="0" private="1">
  65167. <type name="GObject.Object" c:type="GObject"/>
  65168. </field>
  65169. <field name="priv" readable="0" private="1">
  65170. <type name="SimpleActionGroupPrivate"
  65171. c:type="GSimpleActionGroupPrivate*"/>
  65172. </field>
  65173. </class>
  65174. <record name="SimpleActionGroupClass"
  65175. c:type="GSimpleActionGroupClass"
  65176. glib:is-gtype-struct-for="SimpleActionGroup">
  65177. <field name="parent_class" readable="0" private="1">
  65178. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  65179. </field>
  65180. <field name="padding" readable="0" private="1">
  65181. <array zero-terminated="0" c:type="gpointer" fixed-size="12">
  65182. <type name="gpointer" c:type="gpointer"/>
  65183. </array>
  65184. </field>
  65185. </record>
  65186. <record name="SimpleActionGroupPrivate"
  65187. c:type="GSimpleActionGroupPrivate"
  65188. disguised="1">
  65189. </record>
  65190. <class name="SimpleAsyncResult"
  65191. c:symbol-prefix="simple_async_result"
  65192. c:type="GSimpleAsyncResult"
  65193. parent="GObject.Object"
  65194. glib:type-name="GSimpleAsyncResult"
  65195. glib:get-type="g_simple_async_result_get_type"
  65196. glib:type-struct="SimpleAsyncResultClass">
  65197. <doc xml:space="preserve">As of GLib 2.46, #GSimpleAsyncResult is deprecated in favor of
  65198. #GTask, which provides a simpler API.
  65199. #GSimpleAsyncResult implements #GAsyncResult.
  65200. GSimpleAsyncResult handles #GAsyncReadyCallbacks, error
  65201. reporting, operation cancellation and the final state of an operation,
  65202. completely transparent to the application. Results can be returned
  65203. as a pointer e.g. for functions that return data that is collected
  65204. asynchronously, a boolean value for checking the success or failure
  65205. of an operation, or a #gssize for operations which return the number
  65206. of bytes modified by the operation; all of the simple return cases
  65207. are covered.
  65208. Most of the time, an application will not need to know of the details
  65209. of this API; it is handled transparently, and any necessary operations
  65210. are handled by #GAsyncResult's interface. However, if implementing a
  65211. new GIO module, for writing language bindings, or for complex
  65212. applications that need better control of how asynchronous operations
  65213. are completed, it is important to understand this functionality.
  65214. GSimpleAsyncResults are tagged with the calling function to ensure
  65215. that asynchronous functions and their finishing functions are used
  65216. together correctly.
  65217. To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
  65218. If the result needs to be created for a #GError, use
  65219. g_simple_async_result_new_from_error() or
  65220. g_simple_async_result_new_take_error(). If a #GError is not available
  65221. (e.g. the asynchronous operation's doesn't take a #GError argument),
  65222. but the result still needs to be created for an error condition, use
  65223. g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
  65224. if your application or binding requires passing a variable argument list
  65225. directly), and the error can then be propagated through the use of
  65226. g_simple_async_result_propagate_error().
  65227. An asynchronous operation can be made to ignore a cancellation event by
  65228. calling g_simple_async_result_set_handle_cancellation() with a
  65229. #GSimpleAsyncResult for the operation and %FALSE. This is useful for
  65230. operations that are dangerous to cancel, such as close (which would
  65231. cause a leak if cancelled before being run).
  65232. GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
  65233. or it can use #GThreads.
  65234. g_simple_async_result_complete() will finish an I/O task directly
  65235. from the point where it is called. g_simple_async_result_complete_in_idle()
  65236. will finish it from an idle handler in the
  65237. [thread-default main context][g-main-context-push-thread-default]
  65238. . g_simple_async_result_run_in_thread() will run the
  65239. job in a separate thread and then deliver the result to the
  65240. thread-default main context.
  65241. To set the results of an asynchronous function,
  65242. g_simple_async_result_set_op_res_gpointer(),
  65243. g_simple_async_result_set_op_res_gboolean(), and
  65244. g_simple_async_result_set_op_res_gssize()
  65245. are provided, setting the operation's result to a gpointer, gboolean, or
  65246. gssize, respectively.
  65247. Likewise, to get the result of an asynchronous function,
  65248. g_simple_async_result_get_op_res_gpointer(),
  65249. g_simple_async_result_get_op_res_gboolean(), and
  65250. g_simple_async_result_get_op_res_gssize() are
  65251. provided, getting the operation's result as a gpointer, gboolean, and
  65252. gssize, respectively.
  65253. For the details of the requirements implementations must respect, see
  65254. #GAsyncResult. A typical implementation of an asynchronous operation
  65255. using GSimpleAsyncResult looks something like this:
  65256. |[&lt;!-- language="C" --&gt;
  65257. static void
  65258. baked_cb (Cake *cake,
  65259. gpointer user_data)
  65260. {
  65261. // In this example, this callback is not given a reference to the cake,
  65262. // so the GSimpleAsyncResult has to take a reference to it.
  65263. GSimpleAsyncResult *result = user_data;
  65264. if (cake == NULL)
  65265. g_simple_async_result_set_error (result,
  65266. BAKER_ERRORS,
  65267. BAKER_ERROR_NO_FLOUR,
  65268. "Go to the supermarket");
  65269. else
  65270. g_simple_async_result_set_op_res_gpointer (result,
  65271. g_object_ref (cake),
  65272. g_object_unref);
  65273. // In this example, we assume that baked_cb is called as a callback from
  65274. // the mainloop, so it's safe to complete the operation synchronously here.
  65275. // If, however, _baker_prepare_cake () might call its callback without
  65276. // first returning to the mainloop — inadvisable, but some APIs do so —
  65277. // we would need to use g_simple_async_result_complete_in_idle().
  65278. g_simple_async_result_complete (result);
  65279. g_object_unref (result);
  65280. }
  65281. void
  65282. baker_bake_cake_async (Baker *self,
  65283. guint radius,
  65284. GAsyncReadyCallback callback,
  65285. gpointer user_data)
  65286. {
  65287. GSimpleAsyncResult *simple;
  65288. Cake *cake;
  65289. if (radius &lt; 3)
  65290. {
  65291. g_simple_async_report_error_in_idle (G_OBJECT (self),
  65292. callback,
  65293. user_data,
  65294. BAKER_ERRORS,
  65295. BAKER_ERROR_TOO_SMALL,
  65296. "%ucm radius cakes are silly",
  65297. radius);
  65298. return;
  65299. }
  65300. simple = g_simple_async_result_new (G_OBJECT (self),
  65301. callback,
  65302. user_data,
  65303. baker_bake_cake_async);
  65304. cake = _baker_get_cached_cake (self, radius);
  65305. if (cake != NULL)
  65306. {
  65307. g_simple_async_result_set_op_res_gpointer (simple,
  65308. g_object_ref (cake),
  65309. g_object_unref);
  65310. g_simple_async_result_complete_in_idle (simple);
  65311. g_object_unref (simple);
  65312. // Drop the reference returned by _baker_get_cached_cake();
  65313. // the GSimpleAsyncResult has taken its own reference.
  65314. g_object_unref (cake);
  65315. return;
  65316. }
  65317. _baker_prepare_cake (self, radius, baked_cb, simple);
  65318. }
  65319. Cake *
  65320. baker_bake_cake_finish (Baker *self,
  65321. GAsyncResult *result,
  65322. GError **error)
  65323. {
  65324. GSimpleAsyncResult *simple;
  65325. Cake *cake;
  65326. g_return_val_if_fail (g_simple_async_result_is_valid (result,
  65327. G_OBJECT (self),
  65328. baker_bake_cake_async),
  65329. NULL);
  65330. simple = (GSimpleAsyncResult *) result;
  65331. if (g_simple_async_result_propagate_error (simple, error))
  65332. return NULL;
  65333. cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
  65334. return g_object_ref (cake);
  65335. }
  65336. ]|</doc>
  65337. <implements name="AsyncResult"/>
  65338. <constructor name="new"
  65339. c:identifier="g_simple_async_result_new"
  65340. deprecated="1"
  65341. deprecated-version="2.46">
  65342. <doc xml:space="preserve">Creates a #GSimpleAsyncResult.
  65343. The common convention is to create the #GSimpleAsyncResult in the
  65344. function that starts the asynchronous operation and use that same
  65345. function as the @source_tag.
  65346. If your operation supports cancellation with #GCancellable (which it
  65347. probably should) then you should provide the user's cancellable to
  65348. g_simple_async_result_set_check_cancellable() immediately after
  65349. this function returns.</doc>
  65350. <doc-deprecated xml:space="preserve">Use g_task_new() instead.</doc-deprecated>
  65351. <return-value transfer-ownership="full">
  65352. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65353. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65354. </return-value>
  65355. <parameters>
  65356. <parameter name="source_object"
  65357. transfer-ownership="none"
  65358. nullable="1"
  65359. allow-none="1">
  65360. <doc xml:space="preserve">a #GObject, or %NULL.</doc>
  65361. <type name="GObject.Object" c:type="GObject*"/>
  65362. </parameter>
  65363. <parameter name="callback"
  65364. transfer-ownership="none"
  65365. nullable="1"
  65366. allow-none="1"
  65367. scope="async"
  65368. closure="2">
  65369. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  65370. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  65371. </parameter>
  65372. <parameter name="user_data"
  65373. transfer-ownership="none"
  65374. nullable="1"
  65375. allow-none="1">
  65376. <doc xml:space="preserve">user data passed to @callback.</doc>
  65377. <type name="gpointer" c:type="gpointer"/>
  65378. </parameter>
  65379. <parameter name="source_tag"
  65380. transfer-ownership="none"
  65381. nullable="1"
  65382. allow-none="1">
  65383. <doc xml:space="preserve">the asynchronous function.</doc>
  65384. <type name="gpointer" c:type="gpointer"/>
  65385. </parameter>
  65386. </parameters>
  65387. </constructor>
  65388. <constructor name="new_error"
  65389. c:identifier="g_simple_async_result_new_error"
  65390. introspectable="0"
  65391. deprecated="1"
  65392. deprecated-version="2.46">
  65393. <doc xml:space="preserve">Creates a new #GSimpleAsyncResult with a set error.</doc>
  65394. <doc-deprecated xml:space="preserve">Use g_task_new() and g_task_return_new_error() instead.</doc-deprecated>
  65395. <return-value transfer-ownership="full">
  65396. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65397. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65398. </return-value>
  65399. <parameters>
  65400. <parameter name="source_object"
  65401. transfer-ownership="none"
  65402. nullable="1"
  65403. allow-none="1">
  65404. <doc xml:space="preserve">a #GObject, or %NULL.</doc>
  65405. <type name="GObject.Object" c:type="GObject*"/>
  65406. </parameter>
  65407. <parameter name="callback"
  65408. transfer-ownership="none"
  65409. nullable="1"
  65410. allow-none="1"
  65411. scope="async"
  65412. closure="2">
  65413. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  65414. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  65415. </parameter>
  65416. <parameter name="user_data"
  65417. transfer-ownership="none"
  65418. nullable="1"
  65419. allow-none="1">
  65420. <doc xml:space="preserve">user data passed to @callback.</doc>
  65421. <type name="gpointer" c:type="gpointer"/>
  65422. </parameter>
  65423. <parameter name="domain" transfer-ownership="none">
  65424. <doc xml:space="preserve">a #GQuark.</doc>
  65425. <type name="GLib.Quark" c:type="GQuark"/>
  65426. </parameter>
  65427. <parameter name="code" transfer-ownership="none">
  65428. <doc xml:space="preserve">an error code.</doc>
  65429. <type name="gint" c:type="gint"/>
  65430. </parameter>
  65431. <parameter name="format" transfer-ownership="none">
  65432. <doc xml:space="preserve">a string with format characters.</doc>
  65433. <type name="utf8" c:type="const char*"/>
  65434. </parameter>
  65435. <parameter name="..." transfer-ownership="none">
  65436. <doc xml:space="preserve">a list of values to insert into @format.</doc>
  65437. <varargs/>
  65438. </parameter>
  65439. </parameters>
  65440. </constructor>
  65441. <constructor name="new_from_error"
  65442. c:identifier="g_simple_async_result_new_from_error"
  65443. deprecated="1"
  65444. deprecated-version="2.46">
  65445. <doc xml:space="preserve">Creates a #GSimpleAsyncResult from an error condition.</doc>
  65446. <doc-deprecated xml:space="preserve">Use g_task_new() and g_task_return_error() instead.</doc-deprecated>
  65447. <return-value transfer-ownership="full">
  65448. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65449. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65450. </return-value>
  65451. <parameters>
  65452. <parameter name="source_object"
  65453. transfer-ownership="none"
  65454. nullable="1"
  65455. allow-none="1">
  65456. <doc xml:space="preserve">a #GObject, or %NULL.</doc>
  65457. <type name="GObject.Object" c:type="GObject*"/>
  65458. </parameter>
  65459. <parameter name="callback"
  65460. transfer-ownership="none"
  65461. nullable="1"
  65462. allow-none="1"
  65463. scope="async"
  65464. closure="2">
  65465. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  65466. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  65467. </parameter>
  65468. <parameter name="user_data"
  65469. transfer-ownership="none"
  65470. nullable="1"
  65471. allow-none="1">
  65472. <doc xml:space="preserve">user data passed to @callback.</doc>
  65473. <type name="gpointer" c:type="gpointer"/>
  65474. </parameter>
  65475. <parameter name="error" transfer-ownership="none">
  65476. <doc xml:space="preserve">a #GError</doc>
  65477. <type name="GLib.Error" c:type="const GError*"/>
  65478. </parameter>
  65479. </parameters>
  65480. </constructor>
  65481. <constructor name="new_take_error"
  65482. c:identifier="g_simple_async_result_new_take_error"
  65483. version="2.28"
  65484. introspectable="0"
  65485. deprecated="1"
  65486. deprecated-version="2.46">
  65487. <doc xml:space="preserve">Creates a #GSimpleAsyncResult from an error condition, and takes over the
  65488. caller's ownership of @error, so the caller does not need to free it anymore.</doc>
  65489. <doc-deprecated xml:space="preserve">Use g_task_new() and g_task_return_error() instead.</doc-deprecated>
  65490. <return-value transfer-ownership="full">
  65491. <doc xml:space="preserve">a #GSimpleAsyncResult</doc>
  65492. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65493. </return-value>
  65494. <parameters>
  65495. <parameter name="source_object"
  65496. transfer-ownership="none"
  65497. nullable="1"
  65498. allow-none="1">
  65499. <doc xml:space="preserve">a #GObject, or %NULL</doc>
  65500. <type name="GObject.Object" c:type="GObject*"/>
  65501. </parameter>
  65502. <parameter name="callback"
  65503. transfer-ownership="none"
  65504. nullable="1"
  65505. allow-none="1"
  65506. scope="async"
  65507. closure="2">
  65508. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  65509. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  65510. </parameter>
  65511. <parameter name="user_data"
  65512. transfer-ownership="none"
  65513. nullable="1"
  65514. allow-none="1">
  65515. <doc xml:space="preserve">user data passed to @callback</doc>
  65516. <type name="gpointer" c:type="gpointer"/>
  65517. </parameter>
  65518. <parameter name="error" transfer-ownership="none">
  65519. <doc xml:space="preserve">a #GError</doc>
  65520. <type name="GLib.Error" c:type="GError*"/>
  65521. </parameter>
  65522. </parameters>
  65523. </constructor>
  65524. <function name="is_valid"
  65525. c:identifier="g_simple_async_result_is_valid"
  65526. version="2.20"
  65527. deprecated="1"
  65528. deprecated-version="2.46">
  65529. <doc xml:space="preserve">Ensures that the data passed to the _finish function of an async
  65530. operation is consistent. Three checks are performed.
  65531. First, @result is checked to ensure that it is really a
  65532. #GSimpleAsyncResult. Second, @source is checked to ensure that it
  65533. matches the source object of @result. Third, @source_tag is
  65534. checked to ensure that it is equal to the @source_tag argument given
  65535. to g_simple_async_result_new() (which, by convention, is a pointer
  65536. to the _async function corresponding to the _finish function from
  65537. which this function is called). (Alternatively, if either
  65538. @source_tag or @result's source tag is %NULL, then the source tag
  65539. check is skipped.)</doc>
  65540. <doc-deprecated xml:space="preserve">Use #GTask and g_task_is_valid() instead.</doc-deprecated>
  65541. <return-value transfer-ownership="none">
  65542. <doc xml:space="preserve">#TRUE if all checks passed or #FALSE if any failed.</doc>
  65543. <type name="gboolean" c:type="gboolean"/>
  65544. </return-value>
  65545. <parameters>
  65546. <parameter name="result" transfer-ownership="none">
  65547. <doc xml:space="preserve">the #GAsyncResult passed to the _finish function.</doc>
  65548. <type name="AsyncResult" c:type="GAsyncResult*"/>
  65549. </parameter>
  65550. <parameter name="source"
  65551. transfer-ownership="none"
  65552. nullable="1"
  65553. allow-none="1">
  65554. <doc xml:space="preserve">the #GObject passed to the _finish function.</doc>
  65555. <type name="GObject.Object" c:type="GObject*"/>
  65556. </parameter>
  65557. <parameter name="source_tag"
  65558. transfer-ownership="none"
  65559. nullable="1"
  65560. allow-none="1">
  65561. <doc xml:space="preserve">the asynchronous function.</doc>
  65562. <type name="gpointer" c:type="gpointer"/>
  65563. </parameter>
  65564. </parameters>
  65565. </function>
  65566. <method name="complete"
  65567. c:identifier="g_simple_async_result_complete"
  65568. deprecated="1"
  65569. deprecated-version="2.46">
  65570. <doc xml:space="preserve">Completes an asynchronous I/O job immediately. Must be called in
  65571. the thread where the asynchronous result was to be delivered, as it
  65572. invokes the callback directly. If you are in a different thread use
  65573. g_simple_async_result_complete_in_idle().
  65574. Calling this function takes a reference to @simple for as long as
  65575. is needed to complete the call.</doc>
  65576. <doc-deprecated xml:space="preserve">Use #GTask instead.</doc-deprecated>
  65577. <return-value transfer-ownership="none">
  65578. <type name="none" c:type="void"/>
  65579. </return-value>
  65580. <parameters>
  65581. <instance-parameter name="simple" transfer-ownership="none">
  65582. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65583. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65584. </instance-parameter>
  65585. </parameters>
  65586. </method>
  65587. <method name="complete_in_idle"
  65588. c:identifier="g_simple_async_result_complete_in_idle"
  65589. deprecated="1"
  65590. deprecated-version="2.46">
  65591. <doc xml:space="preserve">Completes an asynchronous function in an idle handler in the
  65592. [thread-default main context][g-main-context-push-thread-default]
  65593. of the thread that @simple was initially created in
  65594. (and re-pushes that context around the invocation of the callback).
  65595. Calling this function takes a reference to @simple for as long as
  65596. is needed to complete the call.</doc>
  65597. <doc-deprecated xml:space="preserve">Use #GTask instead.</doc-deprecated>
  65598. <return-value transfer-ownership="none">
  65599. <type name="none" c:type="void"/>
  65600. </return-value>
  65601. <parameters>
  65602. <instance-parameter name="simple" transfer-ownership="none">
  65603. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65604. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65605. </instance-parameter>
  65606. </parameters>
  65607. </method>
  65608. <method name="get_op_res_gboolean"
  65609. c:identifier="g_simple_async_result_get_op_res_gboolean"
  65610. deprecated="1"
  65611. deprecated-version="2.46">
  65612. <doc xml:space="preserve">Gets the operation result boolean from within the asynchronous result.</doc>
  65613. <doc-deprecated xml:space="preserve">Use #GTask and g_task_propagate_boolean() instead.</doc-deprecated>
  65614. <return-value transfer-ownership="none">
  65615. <doc xml:space="preserve">%TRUE if the operation's result was %TRUE, %FALSE
  65616. if the operation's result was %FALSE.</doc>
  65617. <type name="gboolean" c:type="gboolean"/>
  65618. </return-value>
  65619. <parameters>
  65620. <instance-parameter name="simple" transfer-ownership="none">
  65621. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65622. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65623. </instance-parameter>
  65624. </parameters>
  65625. </method>
  65626. <method name="get_op_res_gpointer"
  65627. c:identifier="g_simple_async_result_get_op_res_gpointer"
  65628. introspectable="0"
  65629. deprecated="1"
  65630. deprecated-version="2.46">
  65631. <doc xml:space="preserve">Gets a pointer result as returned by the asynchronous function.</doc>
  65632. <doc-deprecated xml:space="preserve">Use #GTask and g_task_propagate_pointer() instead.</doc-deprecated>
  65633. <return-value transfer-ownership="none" nullable="1">
  65634. <doc xml:space="preserve">a pointer from the result.</doc>
  65635. <type name="gpointer" c:type="gpointer"/>
  65636. </return-value>
  65637. <parameters>
  65638. <instance-parameter name="simple" transfer-ownership="none">
  65639. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65640. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65641. </instance-parameter>
  65642. </parameters>
  65643. </method>
  65644. <method name="get_op_res_gssize"
  65645. c:identifier="g_simple_async_result_get_op_res_gssize"
  65646. deprecated="1"
  65647. deprecated-version="2.46">
  65648. <doc xml:space="preserve">Gets a gssize from the asynchronous result.</doc>
  65649. <doc-deprecated xml:space="preserve">Use #GTask and g_task_propagate_int() instead.</doc-deprecated>
  65650. <return-value transfer-ownership="none">
  65651. <doc xml:space="preserve">a gssize returned from the asynchronous function.</doc>
  65652. <type name="gssize" c:type="gssize"/>
  65653. </return-value>
  65654. <parameters>
  65655. <instance-parameter name="simple" transfer-ownership="none">
  65656. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65657. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65658. </instance-parameter>
  65659. </parameters>
  65660. </method>
  65661. <method name="get_source_tag"
  65662. c:identifier="g_simple_async_result_get_source_tag"
  65663. introspectable="0"
  65664. deprecated="1"
  65665. deprecated-version="2.46.">
  65666. <doc xml:space="preserve">Gets the source tag for the #GSimpleAsyncResult.</doc>
  65667. <doc-deprecated xml:space="preserve">Use #GTask and g_task_get_source_tag() instead.</doc-deprecated>
  65668. <return-value transfer-ownership="none" nullable="1">
  65669. <doc xml:space="preserve">a #gpointer to the source object for the #GSimpleAsyncResult.</doc>
  65670. <type name="gpointer" c:type="gpointer"/>
  65671. </return-value>
  65672. <parameters>
  65673. <instance-parameter name="simple" transfer-ownership="none">
  65674. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65675. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65676. </instance-parameter>
  65677. </parameters>
  65678. </method>
  65679. <method name="propagate_error"
  65680. c:identifier="g_simple_async_result_propagate_error"
  65681. deprecated="1"
  65682. deprecated-version="2.46"
  65683. throws="1">
  65684. <doc xml:space="preserve">Propagates an error from within the simple asynchronous result to
  65685. a given destination.
  65686. If the #GCancellable given to a prior call to
  65687. g_simple_async_result_set_check_cancellable() is cancelled then this
  65688. function will return %TRUE with @dest set appropriately.</doc>
  65689. <doc-deprecated xml:space="preserve">Use #GTask instead.</doc-deprecated>
  65690. <return-value transfer-ownership="none">
  65691. <doc xml:space="preserve">%TRUE if the error was propagated to @dest. %FALSE otherwise.</doc>
  65692. <type name="gboolean" c:type="gboolean"/>
  65693. </return-value>
  65694. <parameters>
  65695. <instance-parameter name="simple" transfer-ownership="none">
  65696. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65697. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65698. </instance-parameter>
  65699. </parameters>
  65700. </method>
  65701. <method name="run_in_thread"
  65702. c:identifier="g_simple_async_result_run_in_thread"
  65703. introspectable="0"
  65704. deprecated="1"
  65705. deprecated-version="2.46">
  65706. <doc xml:space="preserve">Runs the asynchronous job in a separate thread and then calls
  65707. g_simple_async_result_complete_in_idle() on @simple to return
  65708. the result to the appropriate main loop.
  65709. Calling this function takes a reference to @simple for as long as
  65710. is needed to run the job and report its completion.</doc>
  65711. <doc-deprecated xml:space="preserve">Use #GTask and g_task_run_in_thread() instead.</doc-deprecated>
  65712. <return-value transfer-ownership="none">
  65713. <type name="none" c:type="void"/>
  65714. </return-value>
  65715. <parameters>
  65716. <instance-parameter name="simple" transfer-ownership="none">
  65717. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65718. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65719. </instance-parameter>
  65720. <parameter name="func" transfer-ownership="none">
  65721. <doc xml:space="preserve">a #GSimpleAsyncThreadFunc.</doc>
  65722. <type name="SimpleAsyncThreadFunc"
  65723. c:type="GSimpleAsyncThreadFunc"/>
  65724. </parameter>
  65725. <parameter name="io_priority" transfer-ownership="none">
  65726. <doc xml:space="preserve">the io priority of the request.</doc>
  65727. <type name="gint" c:type="int"/>
  65728. </parameter>
  65729. <parameter name="cancellable"
  65730. transfer-ownership="none"
  65731. nullable="1"
  65732. allow-none="1">
  65733. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  65734. <type name="Cancellable" c:type="GCancellable*"/>
  65735. </parameter>
  65736. </parameters>
  65737. </method>
  65738. <method name="set_check_cancellable"
  65739. c:identifier="g_simple_async_result_set_check_cancellable"
  65740. version="2.32"
  65741. deprecated="1"
  65742. deprecated-version="2.46">
  65743. <doc xml:space="preserve">Sets a #GCancellable to check before dispatching results.
  65744. This function has one very specific purpose: the provided cancellable
  65745. is checked at the time of g_simple_async_result_propagate_error() If
  65746. it is cancelled, these functions will return an "Operation was
  65747. cancelled" error (%G_IO_ERROR_CANCELLED).
  65748. Implementors of cancellable asynchronous functions should use this in
  65749. order to provide a guarantee to their callers that cancelling an
  65750. async operation will reliably result in an error being returned for
  65751. that operation (even if a positive result for the operation has
  65752. already been sent as an idle to the main context to be dispatched).
  65753. The checking described above is done regardless of any call to the
  65754. unrelated g_simple_async_result_set_handle_cancellation() function.</doc>
  65755. <doc-deprecated xml:space="preserve">Use #GTask instead.</doc-deprecated>
  65756. <return-value transfer-ownership="none">
  65757. <type name="none" c:type="void"/>
  65758. </return-value>
  65759. <parameters>
  65760. <instance-parameter name="simple" transfer-ownership="none">
  65761. <doc xml:space="preserve">a #GSimpleAsyncResult</doc>
  65762. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65763. </instance-parameter>
  65764. <parameter name="check_cancellable"
  65765. transfer-ownership="none"
  65766. nullable="1"
  65767. allow-none="1">
  65768. <doc xml:space="preserve">a #GCancellable to check, or %NULL to unset</doc>
  65769. <type name="Cancellable" c:type="GCancellable*"/>
  65770. </parameter>
  65771. </parameters>
  65772. </method>
  65773. <method name="set_error"
  65774. c:identifier="g_simple_async_result_set_error"
  65775. introspectable="0"
  65776. deprecated="1"
  65777. deprecated-version="2.46">
  65778. <doc xml:space="preserve">Sets an error within the asynchronous result without a #GError.</doc>
  65779. <doc-deprecated xml:space="preserve">Use #GTask and g_task_return_new_error() instead.</doc-deprecated>
  65780. <return-value transfer-ownership="none">
  65781. <type name="none" c:type="void"/>
  65782. </return-value>
  65783. <parameters>
  65784. <instance-parameter name="simple" transfer-ownership="none">
  65785. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65786. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65787. </instance-parameter>
  65788. <parameter name="domain" transfer-ownership="none">
  65789. <doc xml:space="preserve">a #GQuark (usually #G_IO_ERROR).</doc>
  65790. <type name="GLib.Quark" c:type="GQuark"/>
  65791. </parameter>
  65792. <parameter name="code" transfer-ownership="none">
  65793. <doc xml:space="preserve">an error code.</doc>
  65794. <type name="gint" c:type="gint"/>
  65795. </parameter>
  65796. <parameter name="format" transfer-ownership="none">
  65797. <doc xml:space="preserve">a formatted error reporting string.</doc>
  65798. <type name="utf8" c:type="const char*"/>
  65799. </parameter>
  65800. <parameter name="..." transfer-ownership="none">
  65801. <doc xml:space="preserve">a list of variables to fill in @format.</doc>
  65802. <varargs/>
  65803. </parameter>
  65804. </parameters>
  65805. </method>
  65806. <method name="set_error_va"
  65807. c:identifier="g_simple_async_result_set_error_va"
  65808. introspectable="0"
  65809. deprecated="1"
  65810. deprecated-version="2.46">
  65811. <doc xml:space="preserve">Sets an error within the asynchronous result without a #GError.
  65812. Unless writing a binding, see g_simple_async_result_set_error().</doc>
  65813. <doc-deprecated xml:space="preserve">Use #GTask and g_task_return_error() instead.</doc-deprecated>
  65814. <return-value transfer-ownership="none">
  65815. <type name="none" c:type="void"/>
  65816. </return-value>
  65817. <parameters>
  65818. <instance-parameter name="simple" transfer-ownership="none">
  65819. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65820. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65821. </instance-parameter>
  65822. <parameter name="domain" transfer-ownership="none">
  65823. <doc xml:space="preserve">a #GQuark (usually #G_IO_ERROR).</doc>
  65824. <type name="GLib.Quark" c:type="GQuark"/>
  65825. </parameter>
  65826. <parameter name="code" transfer-ownership="none">
  65827. <doc xml:space="preserve">an error code.</doc>
  65828. <type name="gint" c:type="gint"/>
  65829. </parameter>
  65830. <parameter name="format" transfer-ownership="none">
  65831. <doc xml:space="preserve">a formatted error reporting string.</doc>
  65832. <type name="utf8" c:type="const char*"/>
  65833. </parameter>
  65834. <parameter name="args" transfer-ownership="none">
  65835. <doc xml:space="preserve">va_list of arguments.</doc>
  65836. <type name="va_list" c:type="va_list"/>
  65837. </parameter>
  65838. </parameters>
  65839. </method>
  65840. <method name="set_from_error"
  65841. c:identifier="g_simple_async_result_set_from_error"
  65842. deprecated="1"
  65843. deprecated-version="2.46">
  65844. <doc xml:space="preserve">Sets the result from a #GError.</doc>
  65845. <doc-deprecated xml:space="preserve">Use #GTask and g_task_return_error() instead.</doc-deprecated>
  65846. <return-value transfer-ownership="none">
  65847. <type name="none" c:type="void"/>
  65848. </return-value>
  65849. <parameters>
  65850. <instance-parameter name="simple" transfer-ownership="none">
  65851. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65852. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65853. </instance-parameter>
  65854. <parameter name="error" transfer-ownership="none">
  65855. <doc xml:space="preserve">#GError.</doc>
  65856. <type name="GLib.Error" c:type="const GError*"/>
  65857. </parameter>
  65858. </parameters>
  65859. </method>
  65860. <method name="set_handle_cancellation"
  65861. c:identifier="g_simple_async_result_set_handle_cancellation"
  65862. deprecated="1"
  65863. deprecated-version="2.46">
  65864. <doc xml:space="preserve">Sets whether to handle cancellation within the asynchronous operation.
  65865. This function has nothing to do with
  65866. g_simple_async_result_set_check_cancellable(). It only refers to the
  65867. #GCancellable passed to g_simple_async_result_run_in_thread().</doc>
  65868. <return-value transfer-ownership="none">
  65869. <type name="none" c:type="void"/>
  65870. </return-value>
  65871. <parameters>
  65872. <instance-parameter name="simple" transfer-ownership="none">
  65873. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65874. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65875. </instance-parameter>
  65876. <parameter name="handle_cancellation" transfer-ownership="none">
  65877. <doc xml:space="preserve">a #gboolean.</doc>
  65878. <type name="gboolean" c:type="gboolean"/>
  65879. </parameter>
  65880. </parameters>
  65881. </method>
  65882. <method name="set_op_res_gboolean"
  65883. c:identifier="g_simple_async_result_set_op_res_gboolean"
  65884. deprecated="1"
  65885. deprecated-version="2.46">
  65886. <doc xml:space="preserve">Sets the operation result to a boolean within the asynchronous result.</doc>
  65887. <doc-deprecated xml:space="preserve">Use #GTask and g_task_return_boolean() instead.</doc-deprecated>
  65888. <return-value transfer-ownership="none">
  65889. <type name="none" c:type="void"/>
  65890. </return-value>
  65891. <parameters>
  65892. <instance-parameter name="simple" transfer-ownership="none">
  65893. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65894. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65895. </instance-parameter>
  65896. <parameter name="op_res" transfer-ownership="none">
  65897. <doc xml:space="preserve">a #gboolean.</doc>
  65898. <type name="gboolean" c:type="gboolean"/>
  65899. </parameter>
  65900. </parameters>
  65901. </method>
  65902. <method name="set_op_res_gpointer"
  65903. c:identifier="g_simple_async_result_set_op_res_gpointer"
  65904. introspectable="0"
  65905. deprecated="1"
  65906. deprecated-version="2.46">
  65907. <doc xml:space="preserve">Sets the operation result within the asynchronous result to a pointer.</doc>
  65908. <doc-deprecated xml:space="preserve">Use #GTask and g_task_return_pointer() instead.</doc-deprecated>
  65909. <return-value transfer-ownership="none">
  65910. <type name="none" c:type="void"/>
  65911. </return-value>
  65912. <parameters>
  65913. <instance-parameter name="simple" transfer-ownership="none">
  65914. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65915. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65916. </instance-parameter>
  65917. <parameter name="op_res"
  65918. transfer-ownership="none"
  65919. nullable="1"
  65920. allow-none="1">
  65921. <doc xml:space="preserve">a pointer result from an asynchronous function.</doc>
  65922. <type name="gpointer" c:type="gpointer"/>
  65923. </parameter>
  65924. <parameter name="destroy_op_res"
  65925. transfer-ownership="none"
  65926. scope="async">
  65927. <doc xml:space="preserve">a #GDestroyNotify function.</doc>
  65928. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  65929. </parameter>
  65930. </parameters>
  65931. </method>
  65932. <method name="set_op_res_gssize"
  65933. c:identifier="g_simple_async_result_set_op_res_gssize"
  65934. deprecated="1"
  65935. deprecated-version="2.46">
  65936. <doc xml:space="preserve">Sets the operation result within the asynchronous result to
  65937. the given @op_res.</doc>
  65938. <doc-deprecated xml:space="preserve">Use #GTask and g_task_return_int() instead.</doc-deprecated>
  65939. <return-value transfer-ownership="none">
  65940. <type name="none" c:type="void"/>
  65941. </return-value>
  65942. <parameters>
  65943. <instance-parameter name="simple" transfer-ownership="none">
  65944. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65945. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65946. </instance-parameter>
  65947. <parameter name="op_res" transfer-ownership="none">
  65948. <doc xml:space="preserve">a #gssize.</doc>
  65949. <type name="gssize" c:type="gssize"/>
  65950. </parameter>
  65951. </parameters>
  65952. </method>
  65953. <method name="take_error"
  65954. c:identifier="g_simple_async_result_take_error"
  65955. version="2.28"
  65956. introspectable="0"
  65957. deprecated="1"
  65958. deprecated-version="2.46">
  65959. <doc xml:space="preserve">Sets the result from @error, and takes over the caller's ownership
  65960. of @error, so the caller does not need to free it any more.</doc>
  65961. <doc-deprecated xml:space="preserve">Use #GTask and g_task_return_error() instead.</doc-deprecated>
  65962. <return-value transfer-ownership="none">
  65963. <type name="none" c:type="void"/>
  65964. </return-value>
  65965. <parameters>
  65966. <instance-parameter name="simple" transfer-ownership="none">
  65967. <doc xml:space="preserve">a #GSimpleAsyncResult</doc>
  65968. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65969. </instance-parameter>
  65970. <parameter name="error" transfer-ownership="none">
  65971. <doc xml:space="preserve">a #GError</doc>
  65972. <type name="GLib.Error" c:type="GError*"/>
  65973. </parameter>
  65974. </parameters>
  65975. </method>
  65976. </class>
  65977. <record name="SimpleAsyncResultClass"
  65978. c:type="GSimpleAsyncResultClass"
  65979. disguised="1"
  65980. glib:is-gtype-struct-for="SimpleAsyncResult">
  65981. </record>
  65982. <callback name="SimpleAsyncThreadFunc" c:type="GSimpleAsyncThreadFunc">
  65983. <doc xml:space="preserve">Simple thread function that runs an asynchronous operation and
  65984. checks for cancellation.</doc>
  65985. <return-value transfer-ownership="none">
  65986. <type name="none" c:type="void"/>
  65987. </return-value>
  65988. <parameters>
  65989. <parameter name="res" transfer-ownership="none">
  65990. <doc xml:space="preserve">a #GSimpleAsyncResult.</doc>
  65991. <type name="SimpleAsyncResult" c:type="GSimpleAsyncResult*"/>
  65992. </parameter>
  65993. <parameter name="object" transfer-ownership="none">
  65994. <doc xml:space="preserve">a #GObject.</doc>
  65995. <type name="GObject.Object" c:type="GObject*"/>
  65996. </parameter>
  65997. <parameter name="cancellable"
  65998. transfer-ownership="none"
  65999. nullable="1"
  66000. allow-none="1">
  66001. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  66002. <type name="Cancellable" c:type="GCancellable*"/>
  66003. </parameter>
  66004. </parameters>
  66005. </callback>
  66006. <class name="SimpleIOStream"
  66007. c:symbol-prefix="simple_io_stream"
  66008. c:type="GSimpleIOStream"
  66009. version="2.44"
  66010. parent="IOStream"
  66011. glib:type-name="GSimpleIOStream"
  66012. glib:get-type="g_simple_io_stream_get_type">
  66013. <doc xml:space="preserve">GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and
  66014. #GOutputStream. This allows any pair of input and output streams to be used
  66015. with #GIOStream methods.
  66016. This is useful when you obtained a #GInputStream and a #GOutputStream
  66017. by other means, for instance creating them with platform specific methods as
  66018. g_unix_input_stream_new() or g_win32_input_stream_new(), and you want
  66019. to take advantage of the methods provided by #GIOStream.</doc>
  66020. <constructor name="new"
  66021. c:identifier="g_simple_io_stream_new"
  66022. version="2.44">
  66023. <doc xml:space="preserve">Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream.
  66024. See also #GIOStream.</doc>
  66025. <return-value transfer-ownership="full">
  66026. <doc xml:space="preserve">a new #GSimpleIOStream instance.</doc>
  66027. <type name="IOStream" c:type="GIOStream*"/>
  66028. </return-value>
  66029. <parameters>
  66030. <parameter name="input_stream" transfer-ownership="none">
  66031. <doc xml:space="preserve">a #GInputStream.</doc>
  66032. <type name="InputStream" c:type="GInputStream*"/>
  66033. </parameter>
  66034. <parameter name="output_stream" transfer-ownership="none">
  66035. <doc xml:space="preserve">a #GOutputStream.</doc>
  66036. <type name="OutputStream" c:type="GOutputStream*"/>
  66037. </parameter>
  66038. </parameters>
  66039. </constructor>
  66040. <property name="input-stream"
  66041. version="2.44"
  66042. writable="1"
  66043. construct-only="1"
  66044. transfer-ownership="none">
  66045. <type name="InputStream"/>
  66046. </property>
  66047. <property name="output-stream"
  66048. version="2.44"
  66049. writable="1"
  66050. construct-only="1"
  66051. transfer-ownership="none">
  66052. <type name="OutputStream"/>
  66053. </property>
  66054. </class>
  66055. <class name="SimplePermission"
  66056. c:symbol-prefix="simple_permission"
  66057. c:type="GSimplePermission"
  66058. parent="Permission"
  66059. glib:type-name="GSimplePermission"
  66060. glib:get-type="g_simple_permission_get_type">
  66061. <doc xml:space="preserve">#GSimplePermission is a trivial implementation of #GPermission that
  66062. represents a permission that is either always or never allowed. The
  66063. value is given at construction and doesn't change.
  66064. Calling request or release will result in errors.</doc>
  66065. <constructor name="new"
  66066. c:identifier="g_simple_permission_new"
  66067. version="2.26">
  66068. <doc xml:space="preserve">Creates a new #GPermission instance that represents an action that is
  66069. either always or never allowed.</doc>
  66070. <return-value transfer-ownership="full">
  66071. <doc xml:space="preserve">the #GSimplePermission, as a #GPermission</doc>
  66072. <type name="Permission" c:type="GPermission*"/>
  66073. </return-value>
  66074. <parameters>
  66075. <parameter name="allowed" transfer-ownership="none">
  66076. <doc xml:space="preserve">%TRUE if the action is allowed</doc>
  66077. <type name="gboolean" c:type="gboolean"/>
  66078. </parameter>
  66079. </parameters>
  66080. </constructor>
  66081. </class>
  66082. <class name="SimpleProxyResolver"
  66083. c:symbol-prefix="simple_proxy_resolver"
  66084. c:type="GSimpleProxyResolver"
  66085. parent="GObject.Object"
  66086. glib:type-name="GSimpleProxyResolver"
  66087. glib:get-type="g_simple_proxy_resolver_get_type"
  66088. glib:type-struct="SimpleProxyResolverClass">
  66089. <doc xml:space="preserve">#GSimpleProxyResolver is a simple #GProxyResolver implementation
  66090. that handles a single default proxy, multiple URI-scheme-specific
  66091. proxies, and a list of hosts that proxies should not be used for.
  66092. #GSimpleProxyResolver is never the default proxy resolver, but it
  66093. can be used as the base class for another proxy resolver
  66094. implementation, or it can be created and used manually, such as
  66095. with g_socket_client_set_proxy_resolver().</doc>
  66096. <implements name="ProxyResolver"/>
  66097. <function name="new"
  66098. c:identifier="g_simple_proxy_resolver_new"
  66099. version="2.36">
  66100. <doc xml:space="preserve">Creates a new #GSimpleProxyResolver. See
  66101. #GSimpleProxyResolver:default-proxy and
  66102. #GSimpleProxyResolver:ignore-hosts for more details on how the
  66103. arguments are interpreted.</doc>
  66104. <return-value transfer-ownership="full">
  66105. <doc xml:space="preserve">a new #GSimpleProxyResolver</doc>
  66106. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  66107. </return-value>
  66108. <parameters>
  66109. <parameter name="default_proxy"
  66110. transfer-ownership="none"
  66111. nullable="1"
  66112. allow-none="1">
  66113. <doc xml:space="preserve">the default proxy to use, eg
  66114. "socks://192.168.1.1"</doc>
  66115. <type name="utf8" c:type="const gchar*"/>
  66116. </parameter>
  66117. <parameter name="ignore_hosts"
  66118. transfer-ownership="none"
  66119. nullable="1"
  66120. allow-none="1">
  66121. <doc xml:space="preserve">an optional list of hosts/IP addresses
  66122. to not use a proxy for.</doc>
  66123. <type name="utf8" c:type="gchar**"/>
  66124. </parameter>
  66125. </parameters>
  66126. </function>
  66127. <method name="set_default_proxy"
  66128. c:identifier="g_simple_proxy_resolver_set_default_proxy"
  66129. version="2.36">
  66130. <doc xml:space="preserve">Sets the default proxy on @resolver, to be used for any URIs that
  66131. don't match #GSimpleProxyResolver:ignore-hosts or a proxy set
  66132. via g_simple_proxy_resolver_set_uri_proxy().
  66133. If @default_proxy starts with "socks://",
  66134. #GSimpleProxyResolver will treat it as referring to all three of
  66135. the socks5, socks4a, and socks4 proxy types.</doc>
  66136. <return-value transfer-ownership="none">
  66137. <type name="none" c:type="void"/>
  66138. </return-value>
  66139. <parameters>
  66140. <instance-parameter name="resolver" transfer-ownership="none">
  66141. <doc xml:space="preserve">a #GSimpleProxyResolver</doc>
  66142. <type name="SimpleProxyResolver" c:type="GSimpleProxyResolver*"/>
  66143. </instance-parameter>
  66144. <parameter name="default_proxy" transfer-ownership="none">
  66145. <doc xml:space="preserve">the default proxy to use</doc>
  66146. <type name="utf8" c:type="const gchar*"/>
  66147. </parameter>
  66148. </parameters>
  66149. </method>
  66150. <method name="set_ignore_hosts"
  66151. c:identifier="g_simple_proxy_resolver_set_ignore_hosts"
  66152. version="2.36">
  66153. <doc xml:space="preserve">Sets the list of ignored hosts.
  66154. See #GSimpleProxyResolver:ignore-hosts for more details on how the
  66155. @ignore_hosts argument is interpreted.</doc>
  66156. <return-value transfer-ownership="none">
  66157. <type name="none" c:type="void"/>
  66158. </return-value>
  66159. <parameters>
  66160. <instance-parameter name="resolver" transfer-ownership="none">
  66161. <doc xml:space="preserve">a #GSimpleProxyResolver</doc>
  66162. <type name="SimpleProxyResolver" c:type="GSimpleProxyResolver*"/>
  66163. </instance-parameter>
  66164. <parameter name="ignore_hosts" transfer-ownership="none">
  66165. <doc xml:space="preserve">%NULL-terminated list of hosts/IP addresses
  66166. to not use a proxy for</doc>
  66167. <type name="utf8" c:type="gchar**"/>
  66168. </parameter>
  66169. </parameters>
  66170. </method>
  66171. <method name="set_uri_proxy"
  66172. c:identifier="g_simple_proxy_resolver_set_uri_proxy"
  66173. version="2.36">
  66174. <doc xml:space="preserve">Adds a URI-scheme-specific proxy to @resolver; URIs whose scheme
  66175. matches @uri_scheme (and which don't match
  66176. #GSimpleProxyResolver:ignore-hosts) will be proxied via @proxy.
  66177. As with #GSimpleProxyResolver:default-proxy, if @proxy starts with
  66178. "socks://", #GSimpleProxyResolver will treat it
  66179. as referring to all three of the socks5, socks4a, and socks4 proxy
  66180. types.</doc>
  66181. <return-value transfer-ownership="none">
  66182. <type name="none" c:type="void"/>
  66183. </return-value>
  66184. <parameters>
  66185. <instance-parameter name="resolver" transfer-ownership="none">
  66186. <doc xml:space="preserve">a #GSimpleProxyResolver</doc>
  66187. <type name="SimpleProxyResolver" c:type="GSimpleProxyResolver*"/>
  66188. </instance-parameter>
  66189. <parameter name="uri_scheme" transfer-ownership="none">
  66190. <doc xml:space="preserve">the URI scheme to add a proxy for</doc>
  66191. <type name="utf8" c:type="const gchar*"/>
  66192. </parameter>
  66193. <parameter name="proxy" transfer-ownership="none">
  66194. <doc xml:space="preserve">the proxy to use for @uri_scheme</doc>
  66195. <type name="utf8" c:type="const gchar*"/>
  66196. </parameter>
  66197. </parameters>
  66198. </method>
  66199. <property name="default-proxy" writable="1" transfer-ownership="none">
  66200. <doc xml:space="preserve">The default proxy URI that will be used for any URI that doesn't
  66201. match #GSimpleProxyResolver:ignore-hosts, and doesn't match any
  66202. of the schemes set with g_simple_proxy_resolver_set_uri_proxy().
  66203. Note that as a special case, if this URI starts with
  66204. "socks://", #GSimpleProxyResolver will treat it as referring
  66205. to all three of the socks5, socks4a, and socks4 proxy types.</doc>
  66206. <type name="utf8" c:type="gchar*"/>
  66207. </property>
  66208. <property name="ignore-hosts" writable="1" transfer-ownership="none">
  66209. <doc xml:space="preserve">A list of hostnames and IP addresses that the resolver should
  66210. allow direct connections to.
  66211. Entries can be in one of 4 formats:
  66212. - A hostname, such as "example.com", ".example.com", or
  66213. "*.example.com", any of which match "example.com" or
  66214. any subdomain of it.
  66215. - An IPv4 or IPv6 address, such as "192.168.1.1",
  66216. which matches only that address.
  66217. - A hostname or IP address followed by a port, such as
  66218. "example.com:80", which matches whatever the hostname or IP
  66219. address would match, but only for URLs with the (explicitly)
  66220. indicated port. In the case of an IPv6 address, the address
  66221. part must appear in brackets: "[::1]:443"
  66222. - An IP address range, given by a base address and prefix length,
  66223. such as "fe80::/10", which matches any address in that range.
  66224. Note that when dealing with Unicode hostnames, the matching is
  66225. done against the ASCII form of the name.
  66226. Also note that hostname exclusions apply only to connections made
  66227. to hosts identified by name, and IP address exclusions apply only
  66228. to connections made to hosts identified by address. That is, if
  66229. example.com has an address of 192.168.1.1, and the :ignore-hosts list
  66230. contains only "192.168.1.1", then a connection to "example.com"
  66231. (eg, via a #GNetworkAddress) will use the proxy, and a connection to
  66232. "192.168.1.1" (eg, via a #GInetSocketAddress) will not.
  66233. These rules match the "ignore-hosts"/"noproxy" rules most
  66234. commonly used by other applications.</doc>
  66235. <array>
  66236. <type name="utf8"/>
  66237. </array>
  66238. </property>
  66239. <field name="parent_instance">
  66240. <type name="GObject.Object" c:type="GObject"/>
  66241. </field>
  66242. <field name="priv" readable="0" private="1">
  66243. <type name="SimpleProxyResolverPrivate"
  66244. c:type="GSimpleProxyResolverPrivate*"/>
  66245. </field>
  66246. </class>
  66247. <record name="SimpleProxyResolverClass"
  66248. c:type="GSimpleProxyResolverClass"
  66249. glib:is-gtype-struct-for="SimpleProxyResolver">
  66250. <field name="parent_class">
  66251. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  66252. </field>
  66253. <field name="_g_reserved1" introspectable="0">
  66254. <callback name="_g_reserved1">
  66255. <return-value transfer-ownership="none">
  66256. <type name="none" c:type="void"/>
  66257. </return-value>
  66258. </callback>
  66259. </field>
  66260. <field name="_g_reserved2" introspectable="0">
  66261. <callback name="_g_reserved2">
  66262. <return-value transfer-ownership="none">
  66263. <type name="none" c:type="void"/>
  66264. </return-value>
  66265. </callback>
  66266. </field>
  66267. <field name="_g_reserved3" introspectable="0">
  66268. <callback name="_g_reserved3">
  66269. <return-value transfer-ownership="none">
  66270. <type name="none" c:type="void"/>
  66271. </return-value>
  66272. </callback>
  66273. </field>
  66274. <field name="_g_reserved4" introspectable="0">
  66275. <callback name="_g_reserved4">
  66276. <return-value transfer-ownership="none">
  66277. <type name="none" c:type="void"/>
  66278. </return-value>
  66279. </callback>
  66280. </field>
  66281. <field name="_g_reserved5" introspectable="0">
  66282. <callback name="_g_reserved5">
  66283. <return-value transfer-ownership="none">
  66284. <type name="none" c:type="void"/>
  66285. </return-value>
  66286. </callback>
  66287. </field>
  66288. </record>
  66289. <record name="SimpleProxyResolverPrivate"
  66290. c:type="GSimpleProxyResolverPrivate"
  66291. disguised="1">
  66292. </record>
  66293. <class name="Socket"
  66294. c:symbol-prefix="socket"
  66295. c:type="GSocket"
  66296. version="2.22"
  66297. parent="GObject.Object"
  66298. glib:type-name="GSocket"
  66299. glib:get-type="g_socket_get_type"
  66300. glib:type-struct="SocketClass">
  66301. <doc xml:space="preserve">A #GSocket is a low-level networking primitive. It is a more or less
  66302. direct mapping of the BSD socket API in a portable GObject based API.
  66303. It supports both the UNIX socket implementations and winsock2 on Windows.
  66304. #GSocket is the platform independent base upon which the higher level
  66305. network primitives are based. Applications are not typically meant to
  66306. use it directly, but rather through classes like #GSocketClient,
  66307. #GSocketService and #GSocketConnection. However there may be cases where
  66308. direct use of #GSocket is useful.
  66309. #GSocket implements the #GInitable interface, so if it is manually constructed
  66310. by e.g. g_object_new() you must call g_initable_init() and check the
  66311. results before using the object. This is done automatically in
  66312. g_socket_new() and g_socket_new_from_fd(), so these functions can return
  66313. %NULL.
  66314. Sockets operate in two general modes, blocking or non-blocking. When
  66315. in blocking mode all operations (which don’t take an explicit blocking
  66316. parameter) block until the requested operation
  66317. is finished or there is an error. In non-blocking mode all calls that
  66318. would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
  66319. To know when a call would successfully run you can call g_socket_condition_check(),
  66320. or g_socket_condition_wait(). You can also use g_socket_create_source() and
  66321. attach it to a #GMainContext to get callbacks when I/O is possible.
  66322. Note that all sockets are always set to non blocking mode in the system, and
  66323. blocking mode is emulated in GSocket.
  66324. When working in non-blocking mode applications should always be able to
  66325. handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
  66326. function said that I/O was possible. This can easily happen in case
  66327. of a race condition in the application, but it can also happen for other
  66328. reasons. For instance, on Windows a socket is always seen as writable
  66329. until a write returns %G_IO_ERROR_WOULD_BLOCK.
  66330. #GSockets can be either connection oriented or datagram based.
  66331. For connection oriented types you must first establish a connection by
  66332. either connecting to an address or accepting a connection from another
  66333. address. For connectionless socket types the target/source address is
  66334. specified or received in each I/O operation.
  66335. All socket file descriptors are set to be close-on-exec.
  66336. Note that creating a #GSocket causes the signal %SIGPIPE to be
  66337. ignored for the remainder of the program. If you are writing a
  66338. command-line utility that uses #GSocket, you may need to take into
  66339. account the fact that your program will not automatically be killed
  66340. if it tries to write to %stdout after it has been closed.
  66341. Like most other APIs in GLib, #GSocket is not inherently thread safe. To use
  66342. a #GSocket concurrently from multiple threads, you must implement your own
  66343. locking.</doc>
  66344. <implements name="DatagramBased"/>
  66345. <implements name="Initable"/>
  66346. <constructor name="new"
  66347. c:identifier="g_socket_new"
  66348. version="2.22"
  66349. throws="1">
  66350. <doc xml:space="preserve">Creates a new #GSocket with the defined family, type and protocol.
  66351. If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
  66352. for the family and type is used.
  66353. The @protocol is a family and type specific int that specifies what
  66354. kind of protocol to use. #GSocketProtocol lists several common ones.
  66355. Many families only support one protocol, and use 0 for this, others
  66356. support several and using 0 means to use the default protocol for
  66357. the family and type.
  66358. The protocol id is passed directly to the operating
  66359. system, so you can use protocols not listed in #GSocketProtocol if you
  66360. know the protocol number used for it.</doc>
  66361. <return-value transfer-ownership="full">
  66362. <doc xml:space="preserve">a #GSocket or %NULL on error.
  66363. Free the returned object with g_object_unref().</doc>
  66364. <type name="Socket" c:type="GSocket*"/>
  66365. </return-value>
  66366. <parameters>
  66367. <parameter name="family" transfer-ownership="none">
  66368. <doc xml:space="preserve">the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.</doc>
  66369. <type name="SocketFamily" c:type="GSocketFamily"/>
  66370. </parameter>
  66371. <parameter name="type" transfer-ownership="none">
  66372. <doc xml:space="preserve">the socket type to use.</doc>
  66373. <type name="SocketType" c:type="GSocketType"/>
  66374. </parameter>
  66375. <parameter name="protocol" transfer-ownership="none">
  66376. <doc xml:space="preserve">the id of the protocol to use, or 0 for default.</doc>
  66377. <type name="SocketProtocol" c:type="GSocketProtocol"/>
  66378. </parameter>
  66379. </parameters>
  66380. </constructor>
  66381. <constructor name="new_from_fd"
  66382. c:identifier="g_socket_new_from_fd"
  66383. version="2.22"
  66384. throws="1">
  66385. <doc xml:space="preserve">Creates a new #GSocket from a native file descriptor
  66386. or winsock SOCKET handle.
  66387. This reads all the settings from the file descriptor so that
  66388. all properties should work. Note that the file descriptor
  66389. will be set to non-blocking mode, independent on the blocking
  66390. mode of the #GSocket.
  66391. On success, the returned #GSocket takes ownership of @fd. On failure, the
  66392. caller must close @fd themselves.
  66393. Since GLib 2.46, it is no longer a fatal error to call this on a non-socket
  66394. descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED</doc>
  66395. <return-value transfer-ownership="full">
  66396. <doc xml:space="preserve">a #GSocket or %NULL on error.
  66397. Free the returned object with g_object_unref().</doc>
  66398. <type name="Socket" c:type="GSocket*"/>
  66399. </return-value>
  66400. <parameters>
  66401. <parameter name="fd" transfer-ownership="none">
  66402. <doc xml:space="preserve">a native socket file descriptor.</doc>
  66403. <type name="gint" c:type="gint"/>
  66404. </parameter>
  66405. </parameters>
  66406. </constructor>
  66407. <method name="accept"
  66408. c:identifier="g_socket_accept"
  66409. version="2.22"
  66410. throws="1">
  66411. <doc xml:space="preserve">Accept incoming connections on a connection-based socket. This removes
  66412. the first outstanding connection request from the listening socket and
  66413. creates a #GSocket object for it.
  66414. The @socket must be bound to a local address with g_socket_bind() and
  66415. must be listening for incoming connections (g_socket_listen()).
  66416. If there are no outstanding connections then the operation will block
  66417. or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
  66418. To be notified of an incoming connection, wait for the %G_IO_IN condition.</doc>
  66419. <return-value transfer-ownership="full">
  66420. <doc xml:space="preserve">a new #GSocket, or %NULL on error.
  66421. Free the returned object with g_object_unref().</doc>
  66422. <type name="Socket" c:type="GSocket*"/>
  66423. </return-value>
  66424. <parameters>
  66425. <instance-parameter name="socket" transfer-ownership="none">
  66426. <doc xml:space="preserve">a #GSocket.</doc>
  66427. <type name="Socket" c:type="GSocket*"/>
  66428. </instance-parameter>
  66429. <parameter name="cancellable"
  66430. transfer-ownership="none"
  66431. nullable="1"
  66432. allow-none="1">
  66433. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  66434. <type name="Cancellable" c:type="GCancellable*"/>
  66435. </parameter>
  66436. </parameters>
  66437. </method>
  66438. <method name="bind"
  66439. c:identifier="g_socket_bind"
  66440. version="2.22"
  66441. throws="1">
  66442. <doc xml:space="preserve">When a socket is created it is attached to an address family, but it
  66443. doesn't have an address in this family. g_socket_bind() assigns the
  66444. address (sometimes called name) of the socket.
  66445. It is generally required to bind to a local address before you can
  66446. receive connections. (See g_socket_listen() and g_socket_accept() ).
  66447. In certain situations, you may also want to bind a socket that will be
  66448. used to initiate connections, though this is not normally required.
  66449. If @socket is a TCP socket, then @allow_reuse controls the setting
  66450. of the `SO_REUSEADDR` socket option; normally it should be %TRUE for
  66451. server sockets (sockets that you will eventually call
  66452. g_socket_accept() on), and %FALSE for client sockets. (Failing to
  66453. set this flag on a server socket may cause g_socket_bind() to return
  66454. %G_IO_ERROR_ADDRESS_IN_USE if the server program is stopped and then
  66455. immediately restarted.)
  66456. If @socket is a UDP socket, then @allow_reuse determines whether or
  66457. not other UDP sockets can be bound to the same address at the same
  66458. time. In particular, you can have several UDP sockets bound to the
  66459. same address, and they will all receive all of the multicast and
  66460. broadcast packets sent to that address. (The behavior of unicast
  66461. UDP packets to an address with multiple listeners is not defined.)</doc>
  66462. <return-value transfer-ownership="none">
  66463. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  66464. <type name="gboolean" c:type="gboolean"/>
  66465. </return-value>
  66466. <parameters>
  66467. <instance-parameter name="socket" transfer-ownership="none">
  66468. <doc xml:space="preserve">a #GSocket.</doc>
  66469. <type name="Socket" c:type="GSocket*"/>
  66470. </instance-parameter>
  66471. <parameter name="address" transfer-ownership="none">
  66472. <doc xml:space="preserve">a #GSocketAddress specifying the local address.</doc>
  66473. <type name="SocketAddress" c:type="GSocketAddress*"/>
  66474. </parameter>
  66475. <parameter name="allow_reuse" transfer-ownership="none">
  66476. <doc xml:space="preserve">whether to allow reusing this address</doc>
  66477. <type name="gboolean" c:type="gboolean"/>
  66478. </parameter>
  66479. </parameters>
  66480. </method>
  66481. <method name="check_connect_result"
  66482. c:identifier="g_socket_check_connect_result"
  66483. version="2.22"
  66484. throws="1">
  66485. <doc xml:space="preserve">Checks and resets the pending connect error for the socket.
  66486. This is used to check for errors when g_socket_connect() is
  66487. used in non-blocking mode.</doc>
  66488. <return-value transfer-ownership="none">
  66489. <doc xml:space="preserve">%TRUE if no error, %FALSE otherwise, setting @error to the error</doc>
  66490. <type name="gboolean" c:type="gboolean"/>
  66491. </return-value>
  66492. <parameters>
  66493. <instance-parameter name="socket" transfer-ownership="none">
  66494. <doc xml:space="preserve">a #GSocket</doc>
  66495. <type name="Socket" c:type="GSocket*"/>
  66496. </instance-parameter>
  66497. </parameters>
  66498. </method>
  66499. <method name="close"
  66500. c:identifier="g_socket_close"
  66501. version="2.22"
  66502. throws="1">
  66503. <doc xml:space="preserve">Closes the socket, shutting down any active connection.
  66504. Closing a socket does not wait for all outstanding I/O operations
  66505. to finish, so the caller should not rely on them to be guaranteed
  66506. to complete even if the close returns with no error.
  66507. Once the socket is closed, all other operations will return
  66508. %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
  66509. return an error.
  66510. Sockets will be automatically closed when the last reference
  66511. is dropped, but you might want to call this function to make sure
  66512. resources are released as early as possible.
  66513. Beware that due to the way that TCP works, it is possible for
  66514. recently-sent data to be lost if either you close a socket while the
  66515. %G_IO_IN condition is set, or else if the remote connection tries to
  66516. send something to you after you close the socket but before it has
  66517. finished reading all of the data you sent. There is no easy generic
  66518. way to avoid this problem; the easiest fix is to design the network
  66519. protocol such that the client will never send data "out of turn".
  66520. Another solution is for the server to half-close the connection by
  66521. calling g_socket_shutdown() with only the @shutdown_write flag set,
  66522. and then wait for the client to notice this and close its side of the
  66523. connection, after which the server can safely call g_socket_close().
  66524. (This is what #GTcpConnection does if you call
  66525. g_tcp_connection_set_graceful_disconnect(). But of course, this
  66526. only works if the client will close its connection after the server
  66527. does.)</doc>
  66528. <return-value transfer-ownership="none">
  66529. <doc xml:space="preserve">%TRUE on success, %FALSE on error</doc>
  66530. <type name="gboolean" c:type="gboolean"/>
  66531. </return-value>
  66532. <parameters>
  66533. <instance-parameter name="socket" transfer-ownership="none">
  66534. <doc xml:space="preserve">a #GSocket</doc>
  66535. <type name="Socket" c:type="GSocket*"/>
  66536. </instance-parameter>
  66537. </parameters>
  66538. </method>
  66539. <method name="condition_check"
  66540. c:identifier="g_socket_condition_check"
  66541. version="2.22">
  66542. <doc xml:space="preserve">Checks on the readiness of @socket to perform operations.
  66543. The operations specified in @condition are checked for and masked
  66544. against the currently-satisfied conditions on @socket. The result
  66545. is returned.
  66546. Note that on Windows, it is possible for an operation to return
  66547. %G_IO_ERROR_WOULD_BLOCK even immediately after
  66548. g_socket_condition_check() has claimed that the socket is ready for
  66549. writing. Rather than calling g_socket_condition_check() and then
  66550. writing to the socket if it succeeds, it is generally better to
  66551. simply try writing to the socket right away, and try again later if
  66552. the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
  66553. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
  66554. these conditions will always be set in the output if they are true.
  66555. This call never blocks.</doc>
  66556. <return-value transfer-ownership="none">
  66557. <doc xml:space="preserve">the @GIOCondition mask of the current state</doc>
  66558. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  66559. </return-value>
  66560. <parameters>
  66561. <instance-parameter name="socket" transfer-ownership="none">
  66562. <doc xml:space="preserve">a #GSocket</doc>
  66563. <type name="Socket" c:type="GSocket*"/>
  66564. </instance-parameter>
  66565. <parameter name="condition" transfer-ownership="none">
  66566. <doc xml:space="preserve">a #GIOCondition mask to check</doc>
  66567. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  66568. </parameter>
  66569. </parameters>
  66570. </method>
  66571. <method name="condition_timed_wait"
  66572. c:identifier="g_socket_condition_timed_wait"
  66573. version="2.32"
  66574. throws="1">
  66575. <doc xml:space="preserve">Waits for up to @timeout microseconds for @condition to become true
  66576. on @socket. If the condition is met, %TRUE is returned.
  66577. If @cancellable is cancelled before the condition is met, or if
  66578. @timeout (or the socket's #GSocket:timeout) is reached before the
  66579. condition is met, then %FALSE is returned and @error, if non-%NULL,
  66580. is set to the appropriate value (%G_IO_ERROR_CANCELLED or
  66581. %G_IO_ERROR_TIMED_OUT).
  66582. If you don't want a timeout, use g_socket_condition_wait().
  66583. (Alternatively, you can pass -1 for @timeout.)
  66584. Note that although @timeout is in microseconds for consistency with
  66585. other GLib APIs, this function actually only has millisecond
  66586. resolution, and the behavior is undefined if @timeout is not an
  66587. exact number of milliseconds.</doc>
  66588. <return-value transfer-ownership="none">
  66589. <doc xml:space="preserve">%TRUE if the condition was met, %FALSE otherwise</doc>
  66590. <type name="gboolean" c:type="gboolean"/>
  66591. </return-value>
  66592. <parameters>
  66593. <instance-parameter name="socket" transfer-ownership="none">
  66594. <doc xml:space="preserve">a #GSocket</doc>
  66595. <type name="Socket" c:type="GSocket*"/>
  66596. </instance-parameter>
  66597. <parameter name="condition" transfer-ownership="none">
  66598. <doc xml:space="preserve">a #GIOCondition mask to wait for</doc>
  66599. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  66600. </parameter>
  66601. <parameter name="timeout" transfer-ownership="none">
  66602. <doc xml:space="preserve">the maximum time (in microseconds) to wait, or -1</doc>
  66603. <type name="gint64" c:type="gint64"/>
  66604. </parameter>
  66605. <parameter name="cancellable"
  66606. transfer-ownership="none"
  66607. nullable="1"
  66608. allow-none="1">
  66609. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  66610. <type name="Cancellable" c:type="GCancellable*"/>
  66611. </parameter>
  66612. </parameters>
  66613. </method>
  66614. <method name="condition_wait"
  66615. c:identifier="g_socket_condition_wait"
  66616. version="2.22"
  66617. throws="1">
  66618. <doc xml:space="preserve">Waits for @condition to become true on @socket. When the condition
  66619. is met, %TRUE is returned.
  66620. If @cancellable is cancelled before the condition is met, or if the
  66621. socket has a timeout set and it is reached before the condition is
  66622. met, then %FALSE is returned and @error, if non-%NULL, is set to
  66623. the appropriate value (%G_IO_ERROR_CANCELLED or
  66624. %G_IO_ERROR_TIMED_OUT).
  66625. See also g_socket_condition_timed_wait().</doc>
  66626. <return-value transfer-ownership="none">
  66627. <doc xml:space="preserve">%TRUE if the condition was met, %FALSE otherwise</doc>
  66628. <type name="gboolean" c:type="gboolean"/>
  66629. </return-value>
  66630. <parameters>
  66631. <instance-parameter name="socket" transfer-ownership="none">
  66632. <doc xml:space="preserve">a #GSocket</doc>
  66633. <type name="Socket" c:type="GSocket*"/>
  66634. </instance-parameter>
  66635. <parameter name="condition" transfer-ownership="none">
  66636. <doc xml:space="preserve">a #GIOCondition mask to wait for</doc>
  66637. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  66638. </parameter>
  66639. <parameter name="cancellable"
  66640. transfer-ownership="none"
  66641. nullable="1"
  66642. allow-none="1">
  66643. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  66644. <type name="Cancellable" c:type="GCancellable*"/>
  66645. </parameter>
  66646. </parameters>
  66647. </method>
  66648. <method name="connect"
  66649. c:identifier="g_socket_connect"
  66650. version="2.22"
  66651. throws="1">
  66652. <doc xml:space="preserve">Connect the socket to the specified remote address.
  66653. For connection oriented socket this generally means we attempt to make
  66654. a connection to the @address. For a connection-less socket it sets
  66655. the default address for g_socket_send() and discards all incoming datagrams
  66656. from other sources.
  66657. Generally connection oriented sockets can only connect once, but
  66658. connection-less sockets can connect multiple times to change the
  66659. default address.
  66660. If the connect call needs to do network I/O it will block, unless
  66661. non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
  66662. and the user can be notified of the connection finishing by waiting
  66663. for the G_IO_OUT condition. The result of the connection must then be
  66664. checked with g_socket_check_connect_result().</doc>
  66665. <return-value transfer-ownership="none">
  66666. <doc xml:space="preserve">%TRUE if connected, %FALSE on error.</doc>
  66667. <type name="gboolean" c:type="gboolean"/>
  66668. </return-value>
  66669. <parameters>
  66670. <instance-parameter name="socket" transfer-ownership="none">
  66671. <doc xml:space="preserve">a #GSocket.</doc>
  66672. <type name="Socket" c:type="GSocket*"/>
  66673. </instance-parameter>
  66674. <parameter name="address" transfer-ownership="none">
  66675. <doc xml:space="preserve">a #GSocketAddress specifying the remote address.</doc>
  66676. <type name="SocketAddress" c:type="GSocketAddress*"/>
  66677. </parameter>
  66678. <parameter name="cancellable"
  66679. transfer-ownership="none"
  66680. nullable="1"
  66681. allow-none="1">
  66682. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  66683. <type name="Cancellable" c:type="GCancellable*"/>
  66684. </parameter>
  66685. </parameters>
  66686. </method>
  66687. <method name="connection_factory_create_connection"
  66688. c:identifier="g_socket_connection_factory_create_connection"
  66689. version="2.22">
  66690. <doc xml:space="preserve">Creates a #GSocketConnection subclass of the right type for
  66691. @socket.</doc>
  66692. <return-value transfer-ownership="full">
  66693. <doc xml:space="preserve">a #GSocketConnection</doc>
  66694. <type name="SocketConnection" c:type="GSocketConnection*"/>
  66695. </return-value>
  66696. <parameters>
  66697. <instance-parameter name="socket" transfer-ownership="none">
  66698. <doc xml:space="preserve">a #GSocket</doc>
  66699. <type name="Socket" c:type="GSocket*"/>
  66700. </instance-parameter>
  66701. </parameters>
  66702. </method>
  66703. <method name="create_source"
  66704. c:identifier="g_socket_create_source"
  66705. version="2.22"
  66706. introspectable="0">
  66707. <doc xml:space="preserve">Creates a #GSource that can be attached to a %GMainContext to monitor
  66708. for the availability of the specified @condition on the socket. The #GSource
  66709. keeps a reference to the @socket.
  66710. The callback on the source is of the #GSocketSourceFunc type.
  66711. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
  66712. these conditions will always be reported output if they are true.
  66713. @cancellable if not %NULL can be used to cancel the source, which will
  66714. cause the source to trigger, reporting the current condition (which
  66715. is likely 0 unless cancellation happened at the same time as a
  66716. condition change). You can check for this in the callback using
  66717. g_cancellable_is_cancelled().
  66718. If @socket has a timeout set, and it is reached before @condition
  66719. occurs, the source will then trigger anyway, reporting %G_IO_IN or
  66720. %G_IO_OUT depending on @condition. However, @socket will have been
  66721. marked as having had a timeout, and so the next #GSocket I/O method
  66722. you call will then fail with a %G_IO_ERROR_TIMED_OUT.</doc>
  66723. <return-value transfer-ownership="full">
  66724. <doc xml:space="preserve">a newly allocated %GSource, free with g_source_unref().</doc>
  66725. <type name="GLib.Source" c:type="GSource*"/>
  66726. </return-value>
  66727. <parameters>
  66728. <instance-parameter name="socket" transfer-ownership="none">
  66729. <doc xml:space="preserve">a #GSocket</doc>
  66730. <type name="Socket" c:type="GSocket*"/>
  66731. </instance-parameter>
  66732. <parameter name="condition" transfer-ownership="none">
  66733. <doc xml:space="preserve">a #GIOCondition mask to monitor</doc>
  66734. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  66735. </parameter>
  66736. <parameter name="cancellable"
  66737. transfer-ownership="none"
  66738. nullable="1"
  66739. allow-none="1">
  66740. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  66741. <type name="Cancellable" c:type="GCancellable*"/>
  66742. </parameter>
  66743. </parameters>
  66744. </method>
  66745. <method name="get_available_bytes"
  66746. c:identifier="g_socket_get_available_bytes"
  66747. version="2.32">
  66748. <doc xml:space="preserve">Get the amount of data pending in the OS input buffer, without blocking.
  66749. If @socket is a UDP or SCTP socket, this will return the size of
  66750. just the next packet, even if additional packets are buffered after
  66751. that one.
  66752. Note that on Windows, this function is rather inefficient in the
  66753. UDP case, and so if you know any plausible upper bound on the size
  66754. of the incoming packet, it is better to just do a
  66755. g_socket_receive() with a buffer of that size, rather than calling
  66756. g_socket_get_available_bytes() first and then doing a receive of
  66757. exactly the right size.</doc>
  66758. <return-value transfer-ownership="none">
  66759. <doc xml:space="preserve">the number of bytes that can be read from the socket
  66760. without blocking or truncating, or -1 on error.</doc>
  66761. <type name="gssize" c:type="gssize"/>
  66762. </return-value>
  66763. <parameters>
  66764. <instance-parameter name="socket" transfer-ownership="none">
  66765. <doc xml:space="preserve">a #GSocket</doc>
  66766. <type name="Socket" c:type="GSocket*"/>
  66767. </instance-parameter>
  66768. </parameters>
  66769. </method>
  66770. <method name="get_blocking"
  66771. c:identifier="g_socket_get_blocking"
  66772. version="2.22">
  66773. <doc xml:space="preserve">Gets the blocking mode of the socket. For details on blocking I/O,
  66774. see g_socket_set_blocking().</doc>
  66775. <return-value transfer-ownership="none">
  66776. <doc xml:space="preserve">%TRUE if blocking I/O is used, %FALSE otherwise.</doc>
  66777. <type name="gboolean" c:type="gboolean"/>
  66778. </return-value>
  66779. <parameters>
  66780. <instance-parameter name="socket" transfer-ownership="none">
  66781. <doc xml:space="preserve">a #GSocket.</doc>
  66782. <type name="Socket" c:type="GSocket*"/>
  66783. </instance-parameter>
  66784. </parameters>
  66785. </method>
  66786. <method name="get_broadcast"
  66787. c:identifier="g_socket_get_broadcast"
  66788. version="2.32">
  66789. <doc xml:space="preserve">Gets the broadcast setting on @socket; if %TRUE,
  66790. it is possible to send packets to broadcast
  66791. addresses.</doc>
  66792. <return-value transfer-ownership="none">
  66793. <doc xml:space="preserve">the broadcast setting on @socket</doc>
  66794. <type name="gboolean" c:type="gboolean"/>
  66795. </return-value>
  66796. <parameters>
  66797. <instance-parameter name="socket" transfer-ownership="none">
  66798. <doc xml:space="preserve">a #GSocket.</doc>
  66799. <type name="Socket" c:type="GSocket*"/>
  66800. </instance-parameter>
  66801. </parameters>
  66802. </method>
  66803. <method name="get_credentials"
  66804. c:identifier="g_socket_get_credentials"
  66805. version="2.26"
  66806. throws="1">
  66807. <doc xml:space="preserve">Returns the credentials of the foreign process connected to this
  66808. socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
  66809. sockets).
  66810. If this operation isn't supported on the OS, the method fails with
  66811. the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
  66812. by reading the %SO_PEERCRED option on the underlying socket.
  66813. Other ways to obtain credentials from a foreign peer includes the
  66814. #GUnixCredentialsMessage type and
  66815. g_unix_connection_send_credentials() /
  66816. g_unix_connection_receive_credentials() functions.</doc>
  66817. <return-value transfer-ownership="full">
  66818. <doc xml:space="preserve">%NULL if @error is set, otherwise a #GCredentials object
  66819. that must be freed with g_object_unref().</doc>
  66820. <type name="Credentials" c:type="GCredentials*"/>
  66821. </return-value>
  66822. <parameters>
  66823. <instance-parameter name="socket" transfer-ownership="none">
  66824. <doc xml:space="preserve">a #GSocket.</doc>
  66825. <type name="Socket" c:type="GSocket*"/>
  66826. </instance-parameter>
  66827. </parameters>
  66828. </method>
  66829. <method name="get_family"
  66830. c:identifier="g_socket_get_family"
  66831. version="2.22">
  66832. <doc xml:space="preserve">Gets the socket family of the socket.</doc>
  66833. <return-value transfer-ownership="none">
  66834. <doc xml:space="preserve">a #GSocketFamily</doc>
  66835. <type name="SocketFamily" c:type="GSocketFamily"/>
  66836. </return-value>
  66837. <parameters>
  66838. <instance-parameter name="socket" transfer-ownership="none">
  66839. <doc xml:space="preserve">a #GSocket.</doc>
  66840. <type name="Socket" c:type="GSocket*"/>
  66841. </instance-parameter>
  66842. </parameters>
  66843. </method>
  66844. <method name="get_fd" c:identifier="g_socket_get_fd" version="2.22">
  66845. <doc xml:space="preserve">Returns the underlying OS socket object. On unix this
  66846. is a socket file descriptor, and on Windows this is
  66847. a Winsock2 SOCKET handle. This may be useful for
  66848. doing platform specific or otherwise unusual operations
  66849. on the socket.</doc>
  66850. <return-value transfer-ownership="none">
  66851. <doc xml:space="preserve">the file descriptor of the socket.</doc>
  66852. <type name="gint" c:type="int"/>
  66853. </return-value>
  66854. <parameters>
  66855. <instance-parameter name="socket" transfer-ownership="none">
  66856. <doc xml:space="preserve">a #GSocket.</doc>
  66857. <type name="Socket" c:type="GSocket*"/>
  66858. </instance-parameter>
  66859. </parameters>
  66860. </method>
  66861. <method name="get_keepalive"
  66862. c:identifier="g_socket_get_keepalive"
  66863. version="2.22">
  66864. <doc xml:space="preserve">Gets the keepalive mode of the socket. For details on this,
  66865. see g_socket_set_keepalive().</doc>
  66866. <return-value transfer-ownership="none">
  66867. <doc xml:space="preserve">%TRUE if keepalive is active, %FALSE otherwise.</doc>
  66868. <type name="gboolean" c:type="gboolean"/>
  66869. </return-value>
  66870. <parameters>
  66871. <instance-parameter name="socket" transfer-ownership="none">
  66872. <doc xml:space="preserve">a #GSocket.</doc>
  66873. <type name="Socket" c:type="GSocket*"/>
  66874. </instance-parameter>
  66875. </parameters>
  66876. </method>
  66877. <method name="get_listen_backlog"
  66878. c:identifier="g_socket_get_listen_backlog"
  66879. version="2.22">
  66880. <doc xml:space="preserve">Gets the listen backlog setting of the socket. For details on this,
  66881. see g_socket_set_listen_backlog().</doc>
  66882. <return-value transfer-ownership="none">
  66883. <doc xml:space="preserve">the maximum number of pending connections.</doc>
  66884. <type name="gint" c:type="gint"/>
  66885. </return-value>
  66886. <parameters>
  66887. <instance-parameter name="socket" transfer-ownership="none">
  66888. <doc xml:space="preserve">a #GSocket.</doc>
  66889. <type name="Socket" c:type="GSocket*"/>
  66890. </instance-parameter>
  66891. </parameters>
  66892. </method>
  66893. <method name="get_local_address"
  66894. c:identifier="g_socket_get_local_address"
  66895. version="2.22"
  66896. throws="1">
  66897. <doc xml:space="preserve">Try to get the local address of a bound socket. This is only
  66898. useful if the socket has been bound to a local address,
  66899. either explicitly or implicitly when connecting.</doc>
  66900. <return-value transfer-ownership="full">
  66901. <doc xml:space="preserve">a #GSocketAddress or %NULL on error.
  66902. Free the returned object with g_object_unref().</doc>
  66903. <type name="SocketAddress" c:type="GSocketAddress*"/>
  66904. </return-value>
  66905. <parameters>
  66906. <instance-parameter name="socket" transfer-ownership="none">
  66907. <doc xml:space="preserve">a #GSocket.</doc>
  66908. <type name="Socket" c:type="GSocket*"/>
  66909. </instance-parameter>
  66910. </parameters>
  66911. </method>
  66912. <method name="get_multicast_loopback"
  66913. c:identifier="g_socket_get_multicast_loopback"
  66914. version="2.32">
  66915. <doc xml:space="preserve">Gets the multicast loopback setting on @socket; if %TRUE (the
  66916. default), outgoing multicast packets will be looped back to
  66917. multicast listeners on the same host.</doc>
  66918. <return-value transfer-ownership="none">
  66919. <doc xml:space="preserve">the multicast loopback setting on @socket</doc>
  66920. <type name="gboolean" c:type="gboolean"/>
  66921. </return-value>
  66922. <parameters>
  66923. <instance-parameter name="socket" transfer-ownership="none">
  66924. <doc xml:space="preserve">a #GSocket.</doc>
  66925. <type name="Socket" c:type="GSocket*"/>
  66926. </instance-parameter>
  66927. </parameters>
  66928. </method>
  66929. <method name="get_multicast_ttl"
  66930. c:identifier="g_socket_get_multicast_ttl"
  66931. version="2.32">
  66932. <doc xml:space="preserve">Gets the multicast time-to-live setting on @socket; see
  66933. g_socket_set_multicast_ttl() for more details.</doc>
  66934. <return-value transfer-ownership="none">
  66935. <doc xml:space="preserve">the multicast time-to-live setting on @socket</doc>
  66936. <type name="guint" c:type="guint"/>
  66937. </return-value>
  66938. <parameters>
  66939. <instance-parameter name="socket" transfer-ownership="none">
  66940. <doc xml:space="preserve">a #GSocket.</doc>
  66941. <type name="Socket" c:type="GSocket*"/>
  66942. </instance-parameter>
  66943. </parameters>
  66944. </method>
  66945. <method name="get_option"
  66946. c:identifier="g_socket_get_option"
  66947. version="2.36"
  66948. throws="1">
  66949. <doc xml:space="preserve">Gets the value of an integer-valued option on @socket, as with
  66950. getsockopt(). (If you need to fetch a non-integer-valued option,
  66951. you will need to call getsockopt() directly.)
  66952. The [&lt;gio/gnetworking.h&gt;][gio-gnetworking.h]
  66953. header pulls in system headers that will define most of the
  66954. standard/portable socket options. For unusual socket protocols or
  66955. platform-dependent options, you may need to include additional
  66956. headers.
  66957. Note that even for socket options that are a single byte in size,
  66958. @value is still a pointer to a #gint variable, not a #guchar;
  66959. g_socket_get_option() will handle the conversion internally.</doc>
  66960. <return-value transfer-ownership="none">
  66961. <doc xml:space="preserve">success or failure. On failure, @error will be set, and
  66962. the system error value (`errno` or WSAGetLastError()) will still
  66963. be set to the result of the getsockopt() call.</doc>
  66964. <type name="gboolean" c:type="gboolean"/>
  66965. </return-value>
  66966. <parameters>
  66967. <instance-parameter name="socket" transfer-ownership="none">
  66968. <doc xml:space="preserve">a #GSocket</doc>
  66969. <type name="Socket" c:type="GSocket*"/>
  66970. </instance-parameter>
  66971. <parameter name="level" transfer-ownership="none">
  66972. <doc xml:space="preserve">the "API level" of the option (eg, `SOL_SOCKET`)</doc>
  66973. <type name="gint" c:type="gint"/>
  66974. </parameter>
  66975. <parameter name="optname" transfer-ownership="none">
  66976. <doc xml:space="preserve">the "name" of the option (eg, `SO_BROADCAST`)</doc>
  66977. <type name="gint" c:type="gint"/>
  66978. </parameter>
  66979. <parameter name="value"
  66980. direction="out"
  66981. caller-allocates="0"
  66982. transfer-ownership="full">
  66983. <doc xml:space="preserve">return location for the option value</doc>
  66984. <type name="gint" c:type="gint*"/>
  66985. </parameter>
  66986. </parameters>
  66987. </method>
  66988. <method name="get_protocol"
  66989. c:identifier="g_socket_get_protocol"
  66990. version="2.22">
  66991. <doc xml:space="preserve">Gets the socket protocol id the socket was created with.
  66992. In case the protocol is unknown, -1 is returned.</doc>
  66993. <return-value transfer-ownership="none">
  66994. <doc xml:space="preserve">a protocol id, or -1 if unknown</doc>
  66995. <type name="SocketProtocol" c:type="GSocketProtocol"/>
  66996. </return-value>
  66997. <parameters>
  66998. <instance-parameter name="socket" transfer-ownership="none">
  66999. <doc xml:space="preserve">a #GSocket.</doc>
  67000. <type name="Socket" c:type="GSocket*"/>
  67001. </instance-parameter>
  67002. </parameters>
  67003. </method>
  67004. <method name="get_remote_address"
  67005. c:identifier="g_socket_get_remote_address"
  67006. version="2.22"
  67007. throws="1">
  67008. <doc xml:space="preserve">Try to get the remove address of a connected socket. This is only
  67009. useful for connection oriented sockets that have been connected.</doc>
  67010. <return-value transfer-ownership="full">
  67011. <doc xml:space="preserve">a #GSocketAddress or %NULL on error.
  67012. Free the returned object with g_object_unref().</doc>
  67013. <type name="SocketAddress" c:type="GSocketAddress*"/>
  67014. </return-value>
  67015. <parameters>
  67016. <instance-parameter name="socket" transfer-ownership="none">
  67017. <doc xml:space="preserve">a #GSocket.</doc>
  67018. <type name="Socket" c:type="GSocket*"/>
  67019. </instance-parameter>
  67020. </parameters>
  67021. </method>
  67022. <method name="get_socket_type"
  67023. c:identifier="g_socket_get_socket_type"
  67024. version="2.22">
  67025. <doc xml:space="preserve">Gets the socket type of the socket.</doc>
  67026. <return-value transfer-ownership="none">
  67027. <doc xml:space="preserve">a #GSocketType</doc>
  67028. <type name="SocketType" c:type="GSocketType"/>
  67029. </return-value>
  67030. <parameters>
  67031. <instance-parameter name="socket" transfer-ownership="none">
  67032. <doc xml:space="preserve">a #GSocket.</doc>
  67033. <type name="Socket" c:type="GSocket*"/>
  67034. </instance-parameter>
  67035. </parameters>
  67036. </method>
  67037. <method name="get_timeout"
  67038. c:identifier="g_socket_get_timeout"
  67039. version="2.26">
  67040. <doc xml:space="preserve">Gets the timeout setting of the socket. For details on this, see
  67041. g_socket_set_timeout().</doc>
  67042. <return-value transfer-ownership="none">
  67043. <doc xml:space="preserve">the timeout in seconds</doc>
  67044. <type name="guint" c:type="guint"/>
  67045. </return-value>
  67046. <parameters>
  67047. <instance-parameter name="socket" transfer-ownership="none">
  67048. <doc xml:space="preserve">a #GSocket.</doc>
  67049. <type name="Socket" c:type="GSocket*"/>
  67050. </instance-parameter>
  67051. </parameters>
  67052. </method>
  67053. <method name="get_ttl" c:identifier="g_socket_get_ttl" version="2.32">
  67054. <doc xml:space="preserve">Gets the unicast time-to-live setting on @socket; see
  67055. g_socket_set_ttl() for more details.</doc>
  67056. <return-value transfer-ownership="none">
  67057. <doc xml:space="preserve">the time-to-live setting on @socket</doc>
  67058. <type name="guint" c:type="guint"/>
  67059. </return-value>
  67060. <parameters>
  67061. <instance-parameter name="socket" transfer-ownership="none">
  67062. <doc xml:space="preserve">a #GSocket.</doc>
  67063. <type name="Socket" c:type="GSocket*"/>
  67064. </instance-parameter>
  67065. </parameters>
  67066. </method>
  67067. <method name="is_closed"
  67068. c:identifier="g_socket_is_closed"
  67069. version="2.22">
  67070. <doc xml:space="preserve">Checks whether a socket is closed.</doc>
  67071. <return-value transfer-ownership="none">
  67072. <doc xml:space="preserve">%TRUE if socket is closed, %FALSE otherwise</doc>
  67073. <type name="gboolean" c:type="gboolean"/>
  67074. </return-value>
  67075. <parameters>
  67076. <instance-parameter name="socket" transfer-ownership="none">
  67077. <doc xml:space="preserve">a #GSocket</doc>
  67078. <type name="Socket" c:type="GSocket*"/>
  67079. </instance-parameter>
  67080. </parameters>
  67081. </method>
  67082. <method name="is_connected"
  67083. c:identifier="g_socket_is_connected"
  67084. version="2.22">
  67085. <doc xml:space="preserve">Check whether the socket is connected. This is only useful for
  67086. connection-oriented sockets.
  67087. If using g_socket_shutdown(), this function will return %TRUE until the
  67088. socket has been shut down for reading and writing. If you do a non-blocking
  67089. connect, this function will not return %TRUE until after you call
  67090. g_socket_check_connect_result().</doc>
  67091. <return-value transfer-ownership="none">
  67092. <doc xml:space="preserve">%TRUE if socket is connected, %FALSE otherwise.</doc>
  67093. <type name="gboolean" c:type="gboolean"/>
  67094. </return-value>
  67095. <parameters>
  67096. <instance-parameter name="socket" transfer-ownership="none">
  67097. <doc xml:space="preserve">a #GSocket.</doc>
  67098. <type name="Socket" c:type="GSocket*"/>
  67099. </instance-parameter>
  67100. </parameters>
  67101. </method>
  67102. <method name="join_multicast_group"
  67103. c:identifier="g_socket_join_multicast_group"
  67104. version="2.32"
  67105. throws="1">
  67106. <doc xml:space="preserve">Registers @socket to receive multicast messages sent to @group.
  67107. @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have
  67108. been bound to an appropriate interface and port with
  67109. g_socket_bind().
  67110. If @iface is %NULL, the system will automatically pick an interface
  67111. to bind to based on @group.
  67112. If @source_specific is %TRUE, source-specific multicast as defined
  67113. in RFC 4604 is used. Note that on older platforms this may fail
  67114. with a %G_IO_ERROR_NOT_SUPPORTED error.</doc>
  67115. <return-value transfer-ownership="none">
  67116. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  67117. <type name="gboolean" c:type="gboolean"/>
  67118. </return-value>
  67119. <parameters>
  67120. <instance-parameter name="socket" transfer-ownership="none">
  67121. <doc xml:space="preserve">a #GSocket.</doc>
  67122. <type name="Socket" c:type="GSocket*"/>
  67123. </instance-parameter>
  67124. <parameter name="group" transfer-ownership="none">
  67125. <doc xml:space="preserve">a #GInetAddress specifying the group address to join.</doc>
  67126. <type name="InetAddress" c:type="GInetAddress*"/>
  67127. </parameter>
  67128. <parameter name="source_specific" transfer-ownership="none">
  67129. <doc xml:space="preserve">%TRUE if source-specific multicast should be used</doc>
  67130. <type name="gboolean" c:type="gboolean"/>
  67131. </parameter>
  67132. <parameter name="iface"
  67133. transfer-ownership="none"
  67134. nullable="1"
  67135. allow-none="1">
  67136. <doc xml:space="preserve">Name of the interface to use, or %NULL</doc>
  67137. <type name="utf8" c:type="const gchar*"/>
  67138. </parameter>
  67139. </parameters>
  67140. </method>
  67141. <method name="leave_multicast_group"
  67142. c:identifier="g_socket_leave_multicast_group"
  67143. version="2.32"
  67144. throws="1">
  67145. <doc xml:space="preserve">Removes @socket from the multicast group defined by @group, @iface,
  67146. and @source_specific (which must all have the same values they had
  67147. when you joined the group).
  67148. @socket remains bound to its address and port, and can still receive
  67149. unicast messages after calling this.</doc>
  67150. <return-value transfer-ownership="none">
  67151. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  67152. <type name="gboolean" c:type="gboolean"/>
  67153. </return-value>
  67154. <parameters>
  67155. <instance-parameter name="socket" transfer-ownership="none">
  67156. <doc xml:space="preserve">a #GSocket.</doc>
  67157. <type name="Socket" c:type="GSocket*"/>
  67158. </instance-parameter>
  67159. <parameter name="group" transfer-ownership="none">
  67160. <doc xml:space="preserve">a #GInetAddress specifying the group address to leave.</doc>
  67161. <type name="InetAddress" c:type="GInetAddress*"/>
  67162. </parameter>
  67163. <parameter name="source_specific" transfer-ownership="none">
  67164. <doc xml:space="preserve">%TRUE if source-specific multicast was used</doc>
  67165. <type name="gboolean" c:type="gboolean"/>
  67166. </parameter>
  67167. <parameter name="iface"
  67168. transfer-ownership="none"
  67169. nullable="1"
  67170. allow-none="1">
  67171. <doc xml:space="preserve">Interface used</doc>
  67172. <type name="utf8" c:type="const gchar*"/>
  67173. </parameter>
  67174. </parameters>
  67175. </method>
  67176. <method name="listen"
  67177. c:identifier="g_socket_listen"
  67178. version="2.22"
  67179. throws="1">
  67180. <doc xml:space="preserve">Marks the socket as a server socket, i.e. a socket that is used
  67181. to accept incoming requests using g_socket_accept().
  67182. Before calling this the socket must be bound to a local address using
  67183. g_socket_bind().
  67184. To set the maximum amount of outstanding clients, use
  67185. g_socket_set_listen_backlog().</doc>
  67186. <return-value transfer-ownership="none">
  67187. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  67188. <type name="gboolean" c:type="gboolean"/>
  67189. </return-value>
  67190. <parameters>
  67191. <instance-parameter name="socket" transfer-ownership="none">
  67192. <doc xml:space="preserve">a #GSocket.</doc>
  67193. <type name="Socket" c:type="GSocket*"/>
  67194. </instance-parameter>
  67195. </parameters>
  67196. </method>
  67197. <method name="receive"
  67198. c:identifier="g_socket_receive"
  67199. version="2.22"
  67200. throws="1">
  67201. <doc xml:space="preserve">Receive data (up to @size bytes) from a socket. This is mainly used by
  67202. connection-oriented sockets; it is identical to g_socket_receive_from()
  67203. with @address set to %NULL.
  67204. For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
  67205. g_socket_receive() will always read either 0 or 1 complete messages from
  67206. the socket. If the received message is too large to fit in @buffer, then
  67207. the data beyond @size bytes will be discarded, without any explicit
  67208. indication that this has occurred.
  67209. For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
  67210. number of bytes, up to @size. If more than @size bytes have been
  67211. received, the additional data will be returned in future calls to
  67212. g_socket_receive().
  67213. If the socket is in blocking mode the call will block until there
  67214. is some data to receive, the connection is closed, or there is an
  67215. error. If there is no data available and the socket is in
  67216. non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
  67217. returned. To be notified when data is available, wait for the
  67218. %G_IO_IN condition.
  67219. On error -1 is returned and @error is set accordingly.</doc>
  67220. <return-value transfer-ownership="none">
  67221. <doc xml:space="preserve">Number of bytes read, or 0 if the connection was closed by
  67222. the peer, or -1 on error</doc>
  67223. <type name="gssize" c:type="gssize"/>
  67224. </return-value>
  67225. <parameters>
  67226. <instance-parameter name="socket" transfer-ownership="none">
  67227. <doc xml:space="preserve">a #GSocket</doc>
  67228. <type name="Socket" c:type="GSocket*"/>
  67229. </instance-parameter>
  67230. <parameter name="buffer" transfer-ownership="none">
  67231. <doc xml:space="preserve">a buffer to
  67232. read data into (which should be at least @size bytes long).</doc>
  67233. <array length="1" zero-terminated="0" c:type="gchar*">
  67234. <type name="guint8"/>
  67235. </array>
  67236. </parameter>
  67237. <parameter name="size" transfer-ownership="none">
  67238. <doc xml:space="preserve">the number of bytes you want to read from the socket</doc>
  67239. <type name="gsize" c:type="gsize"/>
  67240. </parameter>
  67241. <parameter name="cancellable"
  67242. transfer-ownership="none"
  67243. nullable="1"
  67244. allow-none="1">
  67245. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67246. <type name="Cancellable" c:type="GCancellable*"/>
  67247. </parameter>
  67248. </parameters>
  67249. </method>
  67250. <method name="receive_from"
  67251. c:identifier="g_socket_receive_from"
  67252. version="2.22"
  67253. throws="1">
  67254. <doc xml:space="preserve">Receive data (up to @size bytes) from a socket.
  67255. If @address is non-%NULL then @address will be set equal to the
  67256. source address of the received packet.
  67257. @address is owned by the caller.
  67258. See g_socket_receive() for additional information.</doc>
  67259. <return-value transfer-ownership="none">
  67260. <doc xml:space="preserve">Number of bytes read, or 0 if the connection was closed by
  67261. the peer, or -1 on error</doc>
  67262. <type name="gssize" c:type="gssize"/>
  67263. </return-value>
  67264. <parameters>
  67265. <instance-parameter name="socket" transfer-ownership="none">
  67266. <doc xml:space="preserve">a #GSocket</doc>
  67267. <type name="Socket" c:type="GSocket*"/>
  67268. </instance-parameter>
  67269. <parameter name="address"
  67270. direction="out"
  67271. caller-allocates="0"
  67272. transfer-ownership="full"
  67273. optional="1"
  67274. allow-none="1">
  67275. <doc xml:space="preserve">a pointer to a #GSocketAddress
  67276. pointer, or %NULL</doc>
  67277. <type name="SocketAddress" c:type="GSocketAddress**"/>
  67278. </parameter>
  67279. <parameter name="buffer" transfer-ownership="none">
  67280. <doc xml:space="preserve">a buffer to
  67281. read data into (which should be at least @size bytes long).</doc>
  67282. <array length="2" zero-terminated="0" c:type="gchar*">
  67283. <type name="guint8"/>
  67284. </array>
  67285. </parameter>
  67286. <parameter name="size" transfer-ownership="none">
  67287. <doc xml:space="preserve">the number of bytes you want to read from the socket</doc>
  67288. <type name="gsize" c:type="gsize"/>
  67289. </parameter>
  67290. <parameter name="cancellable"
  67291. transfer-ownership="none"
  67292. nullable="1"
  67293. allow-none="1">
  67294. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67295. <type name="Cancellable" c:type="GCancellable*"/>
  67296. </parameter>
  67297. </parameters>
  67298. </method>
  67299. <method name="receive_message"
  67300. c:identifier="g_socket_receive_message"
  67301. version="2.22"
  67302. throws="1">
  67303. <doc xml:space="preserve">Receive data from a socket. For receiving multiple messages, see
  67304. g_socket_receive_messages(); for easier use, see
  67305. g_socket_receive() and g_socket_receive_from().
  67306. If @address is non-%NULL then @address will be set equal to the
  67307. source address of the received packet.
  67308. @address is owned by the caller.
  67309. @vector must point to an array of #GInputVector structs and
  67310. @num_vectors must be the length of this array. These structs
  67311. describe the buffers that received data will be scattered into.
  67312. If @num_vectors is -1, then @vectors is assumed to be terminated
  67313. by a #GInputVector with a %NULL buffer pointer.
  67314. As a special case, if @num_vectors is 0 (in which case, @vectors
  67315. may of course be %NULL), then a single byte is received and
  67316. discarded. This is to facilitate the common practice of sending a
  67317. single '\0' byte for the purposes of transferring ancillary data.
  67318. @messages, if non-%NULL, will be set to point to a newly-allocated
  67319. array of #GSocketControlMessage instances or %NULL if no such
  67320. messages was received. These correspond to the control messages
  67321. received from the kernel, one #GSocketControlMessage per message
  67322. from the kernel. This array is %NULL-terminated and must be freed
  67323. by the caller using g_free() after calling g_object_unref() on each
  67324. element. If @messages is %NULL, any control messages received will
  67325. be discarded.
  67326. @num_messages, if non-%NULL, will be set to the number of control
  67327. messages received.
  67328. If both @messages and @num_messages are non-%NULL, then
  67329. @num_messages gives the number of #GSocketControlMessage instances
  67330. in @messages (ie: not including the %NULL terminator).
  67331. @flags is an in/out parameter. The commonly available arguments
  67332. for this are available in the #GSocketMsgFlags enum, but the
  67333. values there are the same as the system values, and the flags
  67334. are passed in as-is, so you can pass in system-specific flags too
  67335. (and g_socket_receive_message() may pass system-specific flags out).
  67336. Flags passed in to the parameter affect the receive operation; flags returned
  67337. out of it are relevant to the specific returned message.
  67338. As with g_socket_receive(), data may be discarded if @socket is
  67339. %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
  67340. provide enough buffer space to read a complete message. You can pass
  67341. %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
  67342. removing it from the receive queue, but there is no portable way to find
  67343. out the length of the message other than by reading it into a
  67344. sufficiently-large buffer.
  67345. If the socket is in blocking mode the call will block until there
  67346. is some data to receive, the connection is closed, or there is an
  67347. error. If there is no data available and the socket is in
  67348. non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
  67349. returned. To be notified when data is available, wait for the
  67350. %G_IO_IN condition.
  67351. On error -1 is returned and @error is set accordingly.</doc>
  67352. <return-value transfer-ownership="none">
  67353. <doc xml:space="preserve">Number of bytes read, or 0 if the connection was closed by
  67354. the peer, or -1 on error</doc>
  67355. <type name="gssize" c:type="gssize"/>
  67356. </return-value>
  67357. <parameters>
  67358. <instance-parameter name="socket" transfer-ownership="none">
  67359. <doc xml:space="preserve">a #GSocket</doc>
  67360. <type name="Socket" c:type="GSocket*"/>
  67361. </instance-parameter>
  67362. <parameter name="address"
  67363. direction="out"
  67364. caller-allocates="0"
  67365. transfer-ownership="full"
  67366. nullable="1">
  67367. <doc xml:space="preserve">a pointer to a #GSocketAddress
  67368. pointer, or %NULL</doc>
  67369. <type name="SocketAddress" c:type="GSocketAddress**"/>
  67370. </parameter>
  67371. <parameter name="vectors" transfer-ownership="none">
  67372. <doc xml:space="preserve">an array of #GInputVector structs</doc>
  67373. <array length="2" zero-terminated="0" c:type="GInputVector*">
  67374. <type name="InputVector" c:type="GInputVector"/>
  67375. </array>
  67376. </parameter>
  67377. <parameter name="num_vectors" transfer-ownership="none">
  67378. <doc xml:space="preserve">the number of elements in @vectors, or -1</doc>
  67379. <type name="gint" c:type="gint"/>
  67380. </parameter>
  67381. <parameter name="messages"
  67382. direction="out"
  67383. caller-allocates="0"
  67384. transfer-ownership="full"
  67385. nullable="1">
  67386. <doc xml:space="preserve">a pointer which
  67387. may be filled with an array of #GSocketControlMessages, or %NULL</doc>
  67388. <array length="4"
  67389. zero-terminated="0"
  67390. c:type="GSocketControlMessage***">
  67391. <type name="SocketControlMessage"
  67392. c:type="GSocketControlMessage**"/>
  67393. </array>
  67394. </parameter>
  67395. <parameter name="num_messages"
  67396. direction="out"
  67397. caller-allocates="0"
  67398. transfer-ownership="full">
  67399. <doc xml:space="preserve">a pointer which will be filled with the number of
  67400. elements in @messages, or %NULL</doc>
  67401. <type name="gint" c:type="gint*"/>
  67402. </parameter>
  67403. <parameter name="flags"
  67404. direction="inout"
  67405. caller-allocates="0"
  67406. transfer-ownership="full">
  67407. <doc xml:space="preserve">a pointer to an int containing #GSocketMsgFlags flags</doc>
  67408. <type name="gint" c:type="gint*"/>
  67409. </parameter>
  67410. <parameter name="cancellable"
  67411. transfer-ownership="none"
  67412. nullable="1"
  67413. allow-none="1">
  67414. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67415. <type name="Cancellable" c:type="GCancellable*"/>
  67416. </parameter>
  67417. </parameters>
  67418. </method>
  67419. <method name="receive_messages"
  67420. c:identifier="g_socket_receive_messages"
  67421. version="2.48"
  67422. throws="1">
  67423. <doc xml:space="preserve">Receive multiple data messages from @socket in one go. This is the most
  67424. complicated and fully-featured version of this call. For easier use, see
  67425. g_socket_receive(), g_socket_receive_from(), and g_socket_receive_message().
  67426. @messages must point to an array of #GInputMessage structs and
  67427. @num_messages must be the length of this array. Each #GInputMessage
  67428. contains a pointer to an array of #GInputVector structs describing the
  67429. buffers that the data received in each message will be written to. Using
  67430. multiple #GInputVectors is more memory-efficient than manually copying data
  67431. out of a single buffer to multiple sources, and more system-call-efficient
  67432. than making multiple calls to g_socket_receive(), such as in scenarios where
  67433. a lot of data packets need to be received (e.g. high-bandwidth video
  67434. streaming over RTP/UDP).
  67435. @flags modify how all messages are received. The commonly available
  67436. arguments for this are available in the #GSocketMsgFlags enum, but the
  67437. values there are the same as the system values, and the flags
  67438. are passed in as-is, so you can pass in system-specific flags too. These
  67439. flags affect the overall receive operation. Flags affecting individual
  67440. messages are returned in #GInputMessage.flags.
  67441. The other members of #GInputMessage are treated as described in its
  67442. documentation.
  67443. If #GSocket:blocking is %TRUE the call will block until @num_messages have
  67444. been received, or the end of the stream is reached.
  67445. If #GSocket:blocking is %FALSE the call will return up to @num_messages
  67446. without blocking, or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the
  67447. operating system to be received.
  67448. In blocking mode, if #GSocket:timeout is positive and is reached before any
  67449. messages are received, %G_IO_ERROR_TIMED_OUT is returned, otherwise up to
  67450. @num_messages are returned. (Note: This is effectively the
  67451. behaviour of `MSG_WAITFORONE` with recvmmsg().)
  67452. To be notified when messages are available, wait for the
  67453. %G_IO_IN condition. Note though that you may still receive
  67454. %G_IO_ERROR_WOULD_BLOCK from g_socket_receive_messages() even if you were
  67455. previously notified of a %G_IO_IN condition.
  67456. If the remote peer closes the connection, any messages queued in the
  67457. operating system will be returned, and subsequent calls to
  67458. g_socket_receive_messages() will return 0 (with no error set).
  67459. On error -1 is returned and @error is set accordingly. An error will only
  67460. be returned if zero messages could be received; otherwise the number of
  67461. messages successfully received before the error will be returned.</doc>
  67462. <return-value transfer-ownership="none">
  67463. <doc xml:space="preserve">number of messages received, or -1 on error. Note that the number
  67464. of messages received may be smaller than @num_messages if in non-blocking
  67465. mode, if the peer closed the connection, or if @num_messages
  67466. was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try
  67467. to receive the remaining messages.</doc>
  67468. <type name="gint" c:type="gint"/>
  67469. </return-value>
  67470. <parameters>
  67471. <instance-parameter name="socket" transfer-ownership="none">
  67472. <doc xml:space="preserve">a #GSocket</doc>
  67473. <type name="Socket" c:type="GSocket*"/>
  67474. </instance-parameter>
  67475. <parameter name="messages" transfer-ownership="none">
  67476. <doc xml:space="preserve">an array of #GInputMessage structs</doc>
  67477. <array length="1" zero-terminated="0" c:type="GInputMessage*">
  67478. <type name="InputMessage" c:type="GInputMessage"/>
  67479. </array>
  67480. </parameter>
  67481. <parameter name="num_messages" transfer-ownership="none">
  67482. <doc xml:space="preserve">the number of elements in @messages</doc>
  67483. <type name="guint" c:type="guint"/>
  67484. </parameter>
  67485. <parameter name="flags" transfer-ownership="none">
  67486. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags for the overall operation</doc>
  67487. <type name="gint" c:type="gint"/>
  67488. </parameter>
  67489. <parameter name="cancellable"
  67490. transfer-ownership="none"
  67491. nullable="1"
  67492. allow-none="1">
  67493. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67494. <type name="Cancellable" c:type="GCancellable*"/>
  67495. </parameter>
  67496. </parameters>
  67497. </method>
  67498. <method name="receive_with_blocking"
  67499. c:identifier="g_socket_receive_with_blocking"
  67500. version="2.26"
  67501. throws="1">
  67502. <doc xml:space="preserve">This behaves exactly the same as g_socket_receive(), except that
  67503. the choice of blocking or non-blocking behavior is determined by
  67504. the @blocking argument rather than by @socket's properties.</doc>
  67505. <return-value transfer-ownership="none">
  67506. <doc xml:space="preserve">Number of bytes read, or 0 if the connection was closed by
  67507. the peer, or -1 on error</doc>
  67508. <type name="gssize" c:type="gssize"/>
  67509. </return-value>
  67510. <parameters>
  67511. <instance-parameter name="socket" transfer-ownership="none">
  67512. <doc xml:space="preserve">a #GSocket</doc>
  67513. <type name="Socket" c:type="GSocket*"/>
  67514. </instance-parameter>
  67515. <parameter name="buffer" transfer-ownership="none">
  67516. <doc xml:space="preserve">a buffer to
  67517. read data into (which should be at least @size bytes long).</doc>
  67518. <array length="1" zero-terminated="0" c:type="gchar*">
  67519. <type name="guint8"/>
  67520. </array>
  67521. </parameter>
  67522. <parameter name="size" transfer-ownership="none">
  67523. <doc xml:space="preserve">the number of bytes you want to read from the socket</doc>
  67524. <type name="gsize" c:type="gsize"/>
  67525. </parameter>
  67526. <parameter name="blocking" transfer-ownership="none">
  67527. <doc xml:space="preserve">whether to do blocking or non-blocking I/O</doc>
  67528. <type name="gboolean" c:type="gboolean"/>
  67529. </parameter>
  67530. <parameter name="cancellable"
  67531. transfer-ownership="none"
  67532. nullable="1"
  67533. allow-none="1">
  67534. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67535. <type name="Cancellable" c:type="GCancellable*"/>
  67536. </parameter>
  67537. </parameters>
  67538. </method>
  67539. <method name="send"
  67540. c:identifier="g_socket_send"
  67541. version="2.22"
  67542. throws="1">
  67543. <doc xml:space="preserve">Tries to send @size bytes from @buffer on the socket. This is
  67544. mainly used by connection-oriented sockets; it is identical to
  67545. g_socket_send_to() with @address set to %NULL.
  67546. If the socket is in blocking mode the call will block until there is
  67547. space for the data in the socket queue. If there is no space available
  67548. and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
  67549. will be returned. To be notified when space is available, wait for the
  67550. %G_IO_OUT condition. Note though that you may still receive
  67551. %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
  67552. notified of a %G_IO_OUT condition. (On Windows in particular, this is
  67553. very common due to the way the underlying APIs work.)
  67554. On error -1 is returned and @error is set accordingly.</doc>
  67555. <return-value transfer-ownership="none">
  67556. <doc xml:space="preserve">Number of bytes written (which may be less than @size), or -1
  67557. on error</doc>
  67558. <type name="gssize" c:type="gssize"/>
  67559. </return-value>
  67560. <parameters>
  67561. <instance-parameter name="socket" transfer-ownership="none">
  67562. <doc xml:space="preserve">a #GSocket</doc>
  67563. <type name="Socket" c:type="GSocket*"/>
  67564. </instance-parameter>
  67565. <parameter name="buffer" transfer-ownership="none">
  67566. <doc xml:space="preserve">the buffer
  67567. containing the data to send.</doc>
  67568. <array length="1" zero-terminated="0" c:type="gchar*">
  67569. <type name="guint8"/>
  67570. </array>
  67571. </parameter>
  67572. <parameter name="size" transfer-ownership="none">
  67573. <doc xml:space="preserve">the number of bytes to send</doc>
  67574. <type name="gsize" c:type="gsize"/>
  67575. </parameter>
  67576. <parameter name="cancellable"
  67577. transfer-ownership="none"
  67578. nullable="1"
  67579. allow-none="1">
  67580. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67581. <type name="Cancellable" c:type="GCancellable*"/>
  67582. </parameter>
  67583. </parameters>
  67584. </method>
  67585. <method name="send_message"
  67586. c:identifier="g_socket_send_message"
  67587. version="2.22"
  67588. throws="1">
  67589. <doc xml:space="preserve">Send data to @address on @socket. For sending multiple messages see
  67590. g_socket_send_messages(); for easier use, see
  67591. g_socket_send() and g_socket_send_to().
  67592. If @address is %NULL then the message is sent to the default receiver
  67593. (set by g_socket_connect()).
  67594. @vectors must point to an array of #GOutputVector structs and
  67595. @num_vectors must be the length of this array. (If @num_vectors is -1,
  67596. then @vectors is assumed to be terminated by a #GOutputVector with a
  67597. %NULL buffer pointer.) The #GOutputVector structs describe the buffers
  67598. that the sent data will be gathered from. Using multiple
  67599. #GOutputVectors is more memory-efficient than manually copying
  67600. data from multiple sources into a single buffer, and more
  67601. network-efficient than making multiple calls to g_socket_send().
  67602. @messages, if non-%NULL, is taken to point to an array of @num_messages
  67603. #GSocketControlMessage instances. These correspond to the control
  67604. messages to be sent on the socket.
  67605. If @num_messages is -1 then @messages is treated as a %NULL-terminated
  67606. array.
  67607. @flags modify how the message is sent. The commonly available arguments
  67608. for this are available in the #GSocketMsgFlags enum, but the
  67609. values there are the same as the system values, and the flags
  67610. are passed in as-is, so you can pass in system-specific flags too.
  67611. If the socket is in blocking mode the call will block until there is
  67612. space for the data in the socket queue. If there is no space available
  67613. and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
  67614. will be returned. To be notified when space is available, wait for the
  67615. %G_IO_OUT condition. Note though that you may still receive
  67616. %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
  67617. notified of a %G_IO_OUT condition. (On Windows in particular, this is
  67618. very common due to the way the underlying APIs work.)
  67619. On error -1 is returned and @error is set accordingly.</doc>
  67620. <return-value transfer-ownership="none">
  67621. <doc xml:space="preserve">Number of bytes written (which may be less than @size), or -1
  67622. on error</doc>
  67623. <type name="gssize" c:type="gssize"/>
  67624. </return-value>
  67625. <parameters>
  67626. <instance-parameter name="socket" transfer-ownership="none">
  67627. <doc xml:space="preserve">a #GSocket</doc>
  67628. <type name="Socket" c:type="GSocket*"/>
  67629. </instance-parameter>
  67630. <parameter name="address"
  67631. transfer-ownership="none"
  67632. nullable="1"
  67633. allow-none="1">
  67634. <doc xml:space="preserve">a #GSocketAddress, or %NULL</doc>
  67635. <type name="SocketAddress" c:type="GSocketAddress*"/>
  67636. </parameter>
  67637. <parameter name="vectors" transfer-ownership="none">
  67638. <doc xml:space="preserve">an array of #GOutputVector structs</doc>
  67639. <array length="2" zero-terminated="0" c:type="GOutputVector*">
  67640. <type name="OutputVector" c:type="GOutputVector"/>
  67641. </array>
  67642. </parameter>
  67643. <parameter name="num_vectors" transfer-ownership="none">
  67644. <doc xml:space="preserve">the number of elements in @vectors, or -1</doc>
  67645. <type name="gint" c:type="gint"/>
  67646. </parameter>
  67647. <parameter name="messages"
  67648. transfer-ownership="none"
  67649. nullable="1"
  67650. allow-none="1">
  67651. <doc xml:space="preserve">a pointer to an
  67652. array of #GSocketControlMessages, or %NULL.</doc>
  67653. <array length="4"
  67654. zero-terminated="0"
  67655. c:type="GSocketControlMessage**">
  67656. <type name="SocketControlMessage"
  67657. c:type="GSocketControlMessage*"/>
  67658. </array>
  67659. </parameter>
  67660. <parameter name="num_messages" transfer-ownership="none">
  67661. <doc xml:space="preserve">number of elements in @messages, or -1.</doc>
  67662. <type name="gint" c:type="gint"/>
  67663. </parameter>
  67664. <parameter name="flags" transfer-ownership="none">
  67665. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags</doc>
  67666. <type name="gint" c:type="gint"/>
  67667. </parameter>
  67668. <parameter name="cancellable"
  67669. transfer-ownership="none"
  67670. nullable="1"
  67671. allow-none="1">
  67672. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67673. <type name="Cancellable" c:type="GCancellable*"/>
  67674. </parameter>
  67675. </parameters>
  67676. </method>
  67677. <method name="send_messages"
  67678. c:identifier="g_socket_send_messages"
  67679. version="2.44"
  67680. throws="1">
  67681. <doc xml:space="preserve">Send multiple data messages from @socket in one go. This is the most
  67682. complicated and fully-featured version of this call. For easier use, see
  67683. g_socket_send(), g_socket_send_to(), and g_socket_send_message().
  67684. @messages must point to an array of #GOutputMessage structs and
  67685. @num_messages must be the length of this array. Each #GOutputMessage
  67686. contains an address to send the data to, and a pointer to an array of
  67687. #GOutputVector structs to describe the buffers that the data to be sent
  67688. for each message will be gathered from. Using multiple #GOutputVectors is
  67689. more memory-efficient than manually copying data from multiple sources
  67690. into a single buffer, and more network-efficient than making multiple
  67691. calls to g_socket_send(). Sending multiple messages in one go avoids the
  67692. overhead of making a lot of syscalls in scenarios where a lot of data
  67693. packets need to be sent (e.g. high-bandwidth video streaming over RTP/UDP),
  67694. or where the same data needs to be sent to multiple recipients.
  67695. @flags modify how the message is sent. The commonly available arguments
  67696. for this are available in the #GSocketMsgFlags enum, but the
  67697. values there are the same as the system values, and the flags
  67698. are passed in as-is, so you can pass in system-specific flags too.
  67699. If the socket is in blocking mode the call will block until there is
  67700. space for all the data in the socket queue. If there is no space available
  67701. and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
  67702. will be returned if no data was written at all, otherwise the number of
  67703. messages sent will be returned. To be notified when space is available,
  67704. wait for the %G_IO_OUT condition. Note though that you may still receive
  67705. %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
  67706. notified of a %G_IO_OUT condition. (On Windows in particular, this is
  67707. very common due to the way the underlying APIs work.)
  67708. On error -1 is returned and @error is set accordingly. An error will only
  67709. be returned if zero messages could be sent; otherwise the number of messages
  67710. successfully sent before the error will be returned.</doc>
  67711. <return-value transfer-ownership="none">
  67712. <doc xml:space="preserve">number of messages sent, or -1 on error. Note that the number of
  67713. messages sent may be smaller than @num_messages if the socket is
  67714. non-blocking or if @num_messages was larger than UIO_MAXIOV (1024),
  67715. in which case the caller may re-try to send the remaining messages.</doc>
  67716. <type name="gint" c:type="gint"/>
  67717. </return-value>
  67718. <parameters>
  67719. <instance-parameter name="socket" transfer-ownership="none">
  67720. <doc xml:space="preserve">a #GSocket</doc>
  67721. <type name="Socket" c:type="GSocket*"/>
  67722. </instance-parameter>
  67723. <parameter name="messages" transfer-ownership="none">
  67724. <doc xml:space="preserve">an array of #GOutputMessage structs</doc>
  67725. <array length="1" zero-terminated="0" c:type="GOutputMessage*">
  67726. <type name="OutputMessage" c:type="GOutputMessage"/>
  67727. </array>
  67728. </parameter>
  67729. <parameter name="num_messages" transfer-ownership="none">
  67730. <doc xml:space="preserve">the number of elements in @messages</doc>
  67731. <type name="guint" c:type="guint"/>
  67732. </parameter>
  67733. <parameter name="flags" transfer-ownership="none">
  67734. <doc xml:space="preserve">an int containing #GSocketMsgFlags flags</doc>
  67735. <type name="gint" c:type="gint"/>
  67736. </parameter>
  67737. <parameter name="cancellable"
  67738. transfer-ownership="none"
  67739. nullable="1"
  67740. allow-none="1">
  67741. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67742. <type name="Cancellable" c:type="GCancellable*"/>
  67743. </parameter>
  67744. </parameters>
  67745. </method>
  67746. <method name="send_to"
  67747. c:identifier="g_socket_send_to"
  67748. version="2.22"
  67749. throws="1">
  67750. <doc xml:space="preserve">Tries to send @size bytes from @buffer to @address. If @address is
  67751. %NULL then the message is sent to the default receiver (set by
  67752. g_socket_connect()).
  67753. See g_socket_send() for additional information.</doc>
  67754. <return-value transfer-ownership="none">
  67755. <doc xml:space="preserve">Number of bytes written (which may be less than @size), or -1
  67756. on error</doc>
  67757. <type name="gssize" c:type="gssize"/>
  67758. </return-value>
  67759. <parameters>
  67760. <instance-parameter name="socket" transfer-ownership="none">
  67761. <doc xml:space="preserve">a #GSocket</doc>
  67762. <type name="Socket" c:type="GSocket*"/>
  67763. </instance-parameter>
  67764. <parameter name="address"
  67765. transfer-ownership="none"
  67766. nullable="1"
  67767. allow-none="1">
  67768. <doc xml:space="preserve">a #GSocketAddress, or %NULL</doc>
  67769. <type name="SocketAddress" c:type="GSocketAddress*"/>
  67770. </parameter>
  67771. <parameter name="buffer" transfer-ownership="none">
  67772. <doc xml:space="preserve">the buffer
  67773. containing the data to send.</doc>
  67774. <array length="2" zero-terminated="0" c:type="gchar*">
  67775. <type name="guint8"/>
  67776. </array>
  67777. </parameter>
  67778. <parameter name="size" transfer-ownership="none">
  67779. <doc xml:space="preserve">the number of bytes to send</doc>
  67780. <type name="gsize" c:type="gsize"/>
  67781. </parameter>
  67782. <parameter name="cancellable"
  67783. transfer-ownership="none"
  67784. nullable="1"
  67785. allow-none="1">
  67786. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67787. <type name="Cancellable" c:type="GCancellable*"/>
  67788. </parameter>
  67789. </parameters>
  67790. </method>
  67791. <method name="send_with_blocking"
  67792. c:identifier="g_socket_send_with_blocking"
  67793. version="2.26"
  67794. throws="1">
  67795. <doc xml:space="preserve">This behaves exactly the same as g_socket_send(), except that
  67796. the choice of blocking or non-blocking behavior is determined by
  67797. the @blocking argument rather than by @socket's properties.</doc>
  67798. <return-value transfer-ownership="none">
  67799. <doc xml:space="preserve">Number of bytes written (which may be less than @size), or -1
  67800. on error</doc>
  67801. <type name="gssize" c:type="gssize"/>
  67802. </return-value>
  67803. <parameters>
  67804. <instance-parameter name="socket" transfer-ownership="none">
  67805. <doc xml:space="preserve">a #GSocket</doc>
  67806. <type name="Socket" c:type="GSocket*"/>
  67807. </instance-parameter>
  67808. <parameter name="buffer" transfer-ownership="none">
  67809. <doc xml:space="preserve">the buffer
  67810. containing the data to send.</doc>
  67811. <array length="1" zero-terminated="0" c:type="gchar*">
  67812. <type name="guint8"/>
  67813. </array>
  67814. </parameter>
  67815. <parameter name="size" transfer-ownership="none">
  67816. <doc xml:space="preserve">the number of bytes to send</doc>
  67817. <type name="gsize" c:type="gsize"/>
  67818. </parameter>
  67819. <parameter name="blocking" transfer-ownership="none">
  67820. <doc xml:space="preserve">whether to do blocking or non-blocking I/O</doc>
  67821. <type name="gboolean" c:type="gboolean"/>
  67822. </parameter>
  67823. <parameter name="cancellable"
  67824. transfer-ownership="none"
  67825. nullable="1"
  67826. allow-none="1">
  67827. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  67828. <type name="Cancellable" c:type="GCancellable*"/>
  67829. </parameter>
  67830. </parameters>
  67831. </method>
  67832. <method name="set_blocking"
  67833. c:identifier="g_socket_set_blocking"
  67834. version="2.22">
  67835. <doc xml:space="preserve">Sets the blocking mode of the socket. In blocking mode
  67836. all operations (which don’t take an explicit blocking parameter) block until
  67837. they succeed or there is an error. In
  67838. non-blocking mode all functions return results immediately or
  67839. with a %G_IO_ERROR_WOULD_BLOCK error.
  67840. All sockets are created in blocking mode. However, note that the
  67841. platform level socket is always non-blocking, and blocking mode
  67842. is a GSocket level feature.</doc>
  67843. <return-value transfer-ownership="none">
  67844. <type name="none" c:type="void"/>
  67845. </return-value>
  67846. <parameters>
  67847. <instance-parameter name="socket" transfer-ownership="none">
  67848. <doc xml:space="preserve">a #GSocket.</doc>
  67849. <type name="Socket" c:type="GSocket*"/>
  67850. </instance-parameter>
  67851. <parameter name="blocking" transfer-ownership="none">
  67852. <doc xml:space="preserve">Whether to use blocking I/O or not.</doc>
  67853. <type name="gboolean" c:type="gboolean"/>
  67854. </parameter>
  67855. </parameters>
  67856. </method>
  67857. <method name="set_broadcast"
  67858. c:identifier="g_socket_set_broadcast"
  67859. version="2.32">
  67860. <doc xml:space="preserve">Sets whether @socket should allow sending to broadcast addresses.
  67861. This is %FALSE by default.</doc>
  67862. <return-value transfer-ownership="none">
  67863. <type name="none" c:type="void"/>
  67864. </return-value>
  67865. <parameters>
  67866. <instance-parameter name="socket" transfer-ownership="none">
  67867. <doc xml:space="preserve">a #GSocket.</doc>
  67868. <type name="Socket" c:type="GSocket*"/>
  67869. </instance-parameter>
  67870. <parameter name="broadcast" transfer-ownership="none">
  67871. <doc xml:space="preserve">whether @socket should allow sending to broadcast
  67872. addresses</doc>
  67873. <type name="gboolean" c:type="gboolean"/>
  67874. </parameter>
  67875. </parameters>
  67876. </method>
  67877. <method name="set_keepalive"
  67878. c:identifier="g_socket_set_keepalive"
  67879. version="2.22">
  67880. <doc xml:space="preserve">Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
  67881. this flag is set on a socket, the system will attempt to verify that the
  67882. remote socket endpoint is still present if a sufficiently long period of
  67883. time passes with no data being exchanged. If the system is unable to
  67884. verify the presence of the remote endpoint, it will automatically close
  67885. the connection.
  67886. This option is only functional on certain kinds of sockets. (Notably,
  67887. %G_SOCKET_PROTOCOL_TCP sockets.)
  67888. The exact time between pings is system- and protocol-dependent, but will
  67889. normally be at least two hours. Most commonly, you would set this flag
  67890. on a server socket if you want to allow clients to remain idle for long
  67891. periods of time, but also want to ensure that connections are eventually
  67892. garbage-collected if clients crash or become unreachable.</doc>
  67893. <return-value transfer-ownership="none">
  67894. <type name="none" c:type="void"/>
  67895. </return-value>
  67896. <parameters>
  67897. <instance-parameter name="socket" transfer-ownership="none">
  67898. <doc xml:space="preserve">a #GSocket.</doc>
  67899. <type name="Socket" c:type="GSocket*"/>
  67900. </instance-parameter>
  67901. <parameter name="keepalive" transfer-ownership="none">
  67902. <doc xml:space="preserve">Value for the keepalive flag</doc>
  67903. <type name="gboolean" c:type="gboolean"/>
  67904. </parameter>
  67905. </parameters>
  67906. </method>
  67907. <method name="set_listen_backlog"
  67908. c:identifier="g_socket_set_listen_backlog"
  67909. version="2.22">
  67910. <doc xml:space="preserve">Sets the maximum number of outstanding connections allowed
  67911. when listening on this socket. If more clients than this are
  67912. connecting to the socket and the application is not handling them
  67913. on time then the new connections will be refused.
  67914. Note that this must be called before g_socket_listen() and has no
  67915. effect if called after that.</doc>
  67916. <return-value transfer-ownership="none">
  67917. <type name="none" c:type="void"/>
  67918. </return-value>
  67919. <parameters>
  67920. <instance-parameter name="socket" transfer-ownership="none">
  67921. <doc xml:space="preserve">a #GSocket.</doc>
  67922. <type name="Socket" c:type="GSocket*"/>
  67923. </instance-parameter>
  67924. <parameter name="backlog" transfer-ownership="none">
  67925. <doc xml:space="preserve">the maximum number of pending connections.</doc>
  67926. <type name="gint" c:type="gint"/>
  67927. </parameter>
  67928. </parameters>
  67929. </method>
  67930. <method name="set_multicast_loopback"
  67931. c:identifier="g_socket_set_multicast_loopback"
  67932. version="2.32">
  67933. <doc xml:space="preserve">Sets whether outgoing multicast packets will be received by sockets
  67934. listening on that multicast address on the same host. This is %TRUE
  67935. by default.</doc>
  67936. <return-value transfer-ownership="none">
  67937. <type name="none" c:type="void"/>
  67938. </return-value>
  67939. <parameters>
  67940. <instance-parameter name="socket" transfer-ownership="none">
  67941. <doc xml:space="preserve">a #GSocket.</doc>
  67942. <type name="Socket" c:type="GSocket*"/>
  67943. </instance-parameter>
  67944. <parameter name="loopback" transfer-ownership="none">
  67945. <doc xml:space="preserve">whether @socket should receive messages sent to its
  67946. multicast groups from the local host</doc>
  67947. <type name="gboolean" c:type="gboolean"/>
  67948. </parameter>
  67949. </parameters>
  67950. </method>
  67951. <method name="set_multicast_ttl"
  67952. c:identifier="g_socket_set_multicast_ttl"
  67953. version="2.32">
  67954. <doc xml:space="preserve">Sets the time-to-live for outgoing multicast datagrams on @socket.
  67955. By default, this is 1, meaning that multicast packets will not leave
  67956. the local network.</doc>
  67957. <return-value transfer-ownership="none">
  67958. <type name="none" c:type="void"/>
  67959. </return-value>
  67960. <parameters>
  67961. <instance-parameter name="socket" transfer-ownership="none">
  67962. <doc xml:space="preserve">a #GSocket.</doc>
  67963. <type name="Socket" c:type="GSocket*"/>
  67964. </instance-parameter>
  67965. <parameter name="ttl" transfer-ownership="none">
  67966. <doc xml:space="preserve">the time-to-live value for all multicast datagrams on @socket</doc>
  67967. <type name="guint" c:type="guint"/>
  67968. </parameter>
  67969. </parameters>
  67970. </method>
  67971. <method name="set_option"
  67972. c:identifier="g_socket_set_option"
  67973. version="2.36"
  67974. throws="1">
  67975. <doc xml:space="preserve">Sets the value of an integer-valued option on @socket, as with
  67976. setsockopt(). (If you need to set a non-integer-valued option,
  67977. you will need to call setsockopt() directly.)
  67978. The [&lt;gio/gnetworking.h&gt;][gio-gnetworking.h]
  67979. header pulls in system headers that will define most of the
  67980. standard/portable socket options. For unusual socket protocols or
  67981. platform-dependent options, you may need to include additional
  67982. headers.</doc>
  67983. <return-value transfer-ownership="none">
  67984. <doc xml:space="preserve">success or failure. On failure, @error will be set, and
  67985. the system error value (`errno` or WSAGetLastError()) will still
  67986. be set to the result of the setsockopt() call.</doc>
  67987. <type name="gboolean" c:type="gboolean"/>
  67988. </return-value>
  67989. <parameters>
  67990. <instance-parameter name="socket" transfer-ownership="none">
  67991. <doc xml:space="preserve">a #GSocket</doc>
  67992. <type name="Socket" c:type="GSocket*"/>
  67993. </instance-parameter>
  67994. <parameter name="level" transfer-ownership="none">
  67995. <doc xml:space="preserve">the "API level" of the option (eg, `SOL_SOCKET`)</doc>
  67996. <type name="gint" c:type="gint"/>
  67997. </parameter>
  67998. <parameter name="optname" transfer-ownership="none">
  67999. <doc xml:space="preserve">the "name" of the option (eg, `SO_BROADCAST`)</doc>
  68000. <type name="gint" c:type="gint"/>
  68001. </parameter>
  68002. <parameter name="value" transfer-ownership="none">
  68003. <doc xml:space="preserve">the value to set the option to</doc>
  68004. <type name="gint" c:type="gint"/>
  68005. </parameter>
  68006. </parameters>
  68007. </method>
  68008. <method name="set_timeout"
  68009. c:identifier="g_socket_set_timeout"
  68010. version="2.26">
  68011. <doc xml:space="preserve">Sets the time in seconds after which I/O operations on @socket will
  68012. time out if they have not yet completed.
  68013. On a blocking socket, this means that any blocking #GSocket
  68014. operation will time out after @timeout seconds of inactivity,
  68015. returning %G_IO_ERROR_TIMED_OUT.
  68016. On a non-blocking socket, calls to g_socket_condition_wait() will
  68017. also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
  68018. created with g_socket_create_source() will trigger after
  68019. @timeout seconds of inactivity, with the requested condition
  68020. set, at which point calling g_socket_receive(), g_socket_send(),
  68021. g_socket_check_connect_result(), etc, will fail with
  68022. %G_IO_ERROR_TIMED_OUT.
  68023. If @timeout is 0 (the default), operations will never time out
  68024. on their own.
  68025. Note that if an I/O operation is interrupted by a signal, this may
  68026. cause the timeout to be reset.</doc>
  68027. <return-value transfer-ownership="none">
  68028. <type name="none" c:type="void"/>
  68029. </return-value>
  68030. <parameters>
  68031. <instance-parameter name="socket" transfer-ownership="none">
  68032. <doc xml:space="preserve">a #GSocket.</doc>
  68033. <type name="Socket" c:type="GSocket*"/>
  68034. </instance-parameter>
  68035. <parameter name="timeout" transfer-ownership="none">
  68036. <doc xml:space="preserve">the timeout for @socket, in seconds, or 0 for none</doc>
  68037. <type name="guint" c:type="guint"/>
  68038. </parameter>
  68039. </parameters>
  68040. </method>
  68041. <method name="set_ttl" c:identifier="g_socket_set_ttl" version="2.32">
  68042. <doc xml:space="preserve">Sets the time-to-live for outgoing unicast packets on @socket.
  68043. By default the platform-specific default value is used.</doc>
  68044. <return-value transfer-ownership="none">
  68045. <type name="none" c:type="void"/>
  68046. </return-value>
  68047. <parameters>
  68048. <instance-parameter name="socket" transfer-ownership="none">
  68049. <doc xml:space="preserve">a #GSocket.</doc>
  68050. <type name="Socket" c:type="GSocket*"/>
  68051. </instance-parameter>
  68052. <parameter name="ttl" transfer-ownership="none">
  68053. <doc xml:space="preserve">the time-to-live value for all unicast packets on @socket</doc>
  68054. <type name="guint" c:type="guint"/>
  68055. </parameter>
  68056. </parameters>
  68057. </method>
  68058. <method name="shutdown"
  68059. c:identifier="g_socket_shutdown"
  68060. version="2.22"
  68061. throws="1">
  68062. <doc xml:space="preserve">Shut down part or all of a full-duplex connection.
  68063. If @shutdown_read is %TRUE then the receiving side of the connection
  68064. is shut down, and further reading is disallowed.
  68065. If @shutdown_write is %TRUE then the sending side of the connection
  68066. is shut down, and further writing is disallowed.
  68067. It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
  68068. One example where it is useful to shut down only one side of a connection is
  68069. graceful disconnect for TCP connections where you close the sending side,
  68070. then wait for the other side to close the connection, thus ensuring that the
  68071. other side saw all sent data.</doc>
  68072. <return-value transfer-ownership="none">
  68073. <doc xml:space="preserve">%TRUE on success, %FALSE on error</doc>
  68074. <type name="gboolean" c:type="gboolean"/>
  68075. </return-value>
  68076. <parameters>
  68077. <instance-parameter name="socket" transfer-ownership="none">
  68078. <doc xml:space="preserve">a #GSocket</doc>
  68079. <type name="Socket" c:type="GSocket*"/>
  68080. </instance-parameter>
  68081. <parameter name="shutdown_read" transfer-ownership="none">
  68082. <doc xml:space="preserve">whether to shut down the read side</doc>
  68083. <type name="gboolean" c:type="gboolean"/>
  68084. </parameter>
  68085. <parameter name="shutdown_write" transfer-ownership="none">
  68086. <doc xml:space="preserve">whether to shut down the write side</doc>
  68087. <type name="gboolean" c:type="gboolean"/>
  68088. </parameter>
  68089. </parameters>
  68090. </method>
  68091. <method name="speaks_ipv4"
  68092. c:identifier="g_socket_speaks_ipv4"
  68093. version="2.22">
  68094. <doc xml:space="preserve">Checks if a socket is capable of speaking IPv4.
  68095. IPv4 sockets are capable of speaking IPv4. On some operating systems
  68096. and under some combinations of circumstances IPv6 sockets are also
  68097. capable of speaking IPv4. See RFC 3493 section 3.7 for more
  68098. information.
  68099. No other types of sockets are currently considered as being capable
  68100. of speaking IPv4.</doc>
  68101. <return-value transfer-ownership="none">
  68102. <doc xml:space="preserve">%TRUE if this socket can be used with IPv4.</doc>
  68103. <type name="gboolean" c:type="gboolean"/>
  68104. </return-value>
  68105. <parameters>
  68106. <instance-parameter name="socket" transfer-ownership="none">
  68107. <doc xml:space="preserve">a #GSocket</doc>
  68108. <type name="Socket" c:type="GSocket*"/>
  68109. </instance-parameter>
  68110. </parameters>
  68111. </method>
  68112. <property name="blocking" writable="1" transfer-ownership="none">
  68113. <type name="gboolean" c:type="gboolean"/>
  68114. </property>
  68115. <property name="broadcast"
  68116. version="2.32"
  68117. writable="1"
  68118. transfer-ownership="none">
  68119. <doc xml:space="preserve">Whether the socket should allow sending to broadcast addresses.</doc>
  68120. <type name="gboolean" c:type="gboolean"/>
  68121. </property>
  68122. <property name="family"
  68123. writable="1"
  68124. construct-only="1"
  68125. transfer-ownership="none">
  68126. <type name="SocketFamily"/>
  68127. </property>
  68128. <property name="fd"
  68129. writable="1"
  68130. construct-only="1"
  68131. transfer-ownership="none">
  68132. <type name="gint" c:type="gint"/>
  68133. </property>
  68134. <property name="keepalive" writable="1" transfer-ownership="none">
  68135. <type name="gboolean" c:type="gboolean"/>
  68136. </property>
  68137. <property name="listen-backlog" writable="1" transfer-ownership="none">
  68138. <type name="gint" c:type="gint"/>
  68139. </property>
  68140. <property name="local-address" transfer-ownership="none">
  68141. <type name="SocketAddress"/>
  68142. </property>
  68143. <property name="multicast-loopback"
  68144. version="2.32"
  68145. writable="1"
  68146. transfer-ownership="none">
  68147. <doc xml:space="preserve">Whether outgoing multicast packets loop back to the local host.</doc>
  68148. <type name="gboolean" c:type="gboolean"/>
  68149. </property>
  68150. <property name="multicast-ttl"
  68151. version="2.32"
  68152. writable="1"
  68153. transfer-ownership="none">
  68154. <doc xml:space="preserve">Time-to-live out outgoing multicast packets</doc>
  68155. <type name="guint" c:type="guint"/>
  68156. </property>
  68157. <property name="protocol"
  68158. writable="1"
  68159. construct-only="1"
  68160. transfer-ownership="none">
  68161. <type name="SocketProtocol"/>
  68162. </property>
  68163. <property name="remote-address" transfer-ownership="none">
  68164. <type name="SocketAddress"/>
  68165. </property>
  68166. <property name="timeout"
  68167. version="2.26"
  68168. writable="1"
  68169. transfer-ownership="none">
  68170. <doc xml:space="preserve">The timeout in seconds on socket I/O</doc>
  68171. <type name="guint" c:type="guint"/>
  68172. </property>
  68173. <property name="ttl"
  68174. version="2.32"
  68175. writable="1"
  68176. transfer-ownership="none">
  68177. <doc xml:space="preserve">Time-to-live for outgoing unicast packets</doc>
  68178. <type name="guint" c:type="guint"/>
  68179. </property>
  68180. <property name="type"
  68181. writable="1"
  68182. construct-only="1"
  68183. transfer-ownership="none">
  68184. <type name="SocketType"/>
  68185. </property>
  68186. <field name="parent_instance">
  68187. <type name="GObject.Object" c:type="GObject"/>
  68188. </field>
  68189. <field name="priv">
  68190. <type name="SocketPrivate" c:type="GSocketPrivate*"/>
  68191. </field>
  68192. </class>
  68193. <class name="SocketAddress"
  68194. c:symbol-prefix="socket_address"
  68195. c:type="GSocketAddress"
  68196. parent="GObject.Object"
  68197. abstract="1"
  68198. glib:type-name="GSocketAddress"
  68199. glib:get-type="g_socket_address_get_type"
  68200. glib:type-struct="SocketAddressClass">
  68201. <doc xml:space="preserve">#GSocketAddress is the equivalent of struct sockaddr in the BSD
  68202. sockets API. This is an abstract class; use #GInetSocketAddress
  68203. for internet sockets, or #GUnixSocketAddress for UNIX domain sockets.</doc>
  68204. <implements name="SocketConnectable"/>
  68205. <constructor name="new_from_native"
  68206. c:identifier="g_socket_address_new_from_native"
  68207. version="2.22">
  68208. <doc xml:space="preserve">Creates a #GSocketAddress subclass corresponding to the native
  68209. struct sockaddr @native.</doc>
  68210. <return-value transfer-ownership="full">
  68211. <doc xml:space="preserve">a new #GSocketAddress if @native could successfully
  68212. be converted, otherwise %NULL</doc>
  68213. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68214. </return-value>
  68215. <parameters>
  68216. <parameter name="native" transfer-ownership="none">
  68217. <doc xml:space="preserve">a pointer to a struct sockaddr</doc>
  68218. <type name="gpointer" c:type="gpointer"/>
  68219. </parameter>
  68220. <parameter name="len" transfer-ownership="none">
  68221. <doc xml:space="preserve">the size of the memory location pointed to by @native</doc>
  68222. <type name="gsize" c:type="gsize"/>
  68223. </parameter>
  68224. </parameters>
  68225. </constructor>
  68226. <virtual-method name="get_family" invoker="get_family" version="2.22">
  68227. <doc xml:space="preserve">Gets the socket family type of @address.</doc>
  68228. <return-value transfer-ownership="none">
  68229. <doc xml:space="preserve">the socket family type of @address</doc>
  68230. <type name="SocketFamily" c:type="GSocketFamily"/>
  68231. </return-value>
  68232. <parameters>
  68233. <instance-parameter name="address" transfer-ownership="none">
  68234. <doc xml:space="preserve">a #GSocketAddress</doc>
  68235. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68236. </instance-parameter>
  68237. </parameters>
  68238. </virtual-method>
  68239. <virtual-method name="get_native_size"
  68240. invoker="get_native_size"
  68241. version="2.22">
  68242. <doc xml:space="preserve">Gets the size of @address's native struct sockaddr.
  68243. You can use this to allocate memory to pass to
  68244. g_socket_address_to_native().</doc>
  68245. <return-value transfer-ownership="none">
  68246. <doc xml:space="preserve">the size of the native struct sockaddr that
  68247. @address represents</doc>
  68248. <type name="gssize" c:type="gssize"/>
  68249. </return-value>
  68250. <parameters>
  68251. <instance-parameter name="address" transfer-ownership="none">
  68252. <doc xml:space="preserve">a #GSocketAddress</doc>
  68253. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68254. </instance-parameter>
  68255. </parameters>
  68256. </virtual-method>
  68257. <virtual-method name="to_native"
  68258. invoker="to_native"
  68259. version="2.22"
  68260. throws="1">
  68261. <doc xml:space="preserve">Converts a #GSocketAddress to a native struct sockaddr, which can
  68262. be passed to low-level functions like connect() or bind().
  68263. If not enough space is available, a %G_IO_ERROR_NO_SPACE error
  68264. is returned. If the address type is not known on the system
  68265. then a %G_IO_ERROR_NOT_SUPPORTED error is returned.</doc>
  68266. <return-value transfer-ownership="none">
  68267. <doc xml:space="preserve">%TRUE if @dest was filled in, %FALSE on error</doc>
  68268. <type name="gboolean" c:type="gboolean"/>
  68269. </return-value>
  68270. <parameters>
  68271. <instance-parameter name="address" transfer-ownership="none">
  68272. <doc xml:space="preserve">a #GSocketAddress</doc>
  68273. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68274. </instance-parameter>
  68275. <parameter name="dest"
  68276. transfer-ownership="none"
  68277. nullable="1"
  68278. allow-none="1">
  68279. <doc xml:space="preserve">a pointer to a memory location that will contain the native
  68280. struct sockaddr</doc>
  68281. <type name="gpointer" c:type="gpointer"/>
  68282. </parameter>
  68283. <parameter name="destlen" transfer-ownership="none">
  68284. <doc xml:space="preserve">the size of @dest. Must be at least as large as
  68285. g_socket_address_get_native_size()</doc>
  68286. <type name="gsize" c:type="gsize"/>
  68287. </parameter>
  68288. </parameters>
  68289. </virtual-method>
  68290. <method name="get_family"
  68291. c:identifier="g_socket_address_get_family"
  68292. version="2.22">
  68293. <doc xml:space="preserve">Gets the socket family type of @address.</doc>
  68294. <return-value transfer-ownership="none">
  68295. <doc xml:space="preserve">the socket family type of @address</doc>
  68296. <type name="SocketFamily" c:type="GSocketFamily"/>
  68297. </return-value>
  68298. <parameters>
  68299. <instance-parameter name="address" transfer-ownership="none">
  68300. <doc xml:space="preserve">a #GSocketAddress</doc>
  68301. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68302. </instance-parameter>
  68303. </parameters>
  68304. </method>
  68305. <method name="get_native_size"
  68306. c:identifier="g_socket_address_get_native_size"
  68307. version="2.22">
  68308. <doc xml:space="preserve">Gets the size of @address's native struct sockaddr.
  68309. You can use this to allocate memory to pass to
  68310. g_socket_address_to_native().</doc>
  68311. <return-value transfer-ownership="none">
  68312. <doc xml:space="preserve">the size of the native struct sockaddr that
  68313. @address represents</doc>
  68314. <type name="gssize" c:type="gssize"/>
  68315. </return-value>
  68316. <parameters>
  68317. <instance-parameter name="address" transfer-ownership="none">
  68318. <doc xml:space="preserve">a #GSocketAddress</doc>
  68319. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68320. </instance-parameter>
  68321. </parameters>
  68322. </method>
  68323. <method name="to_native"
  68324. c:identifier="g_socket_address_to_native"
  68325. version="2.22"
  68326. throws="1">
  68327. <doc xml:space="preserve">Converts a #GSocketAddress to a native struct sockaddr, which can
  68328. be passed to low-level functions like connect() or bind().
  68329. If not enough space is available, a %G_IO_ERROR_NO_SPACE error
  68330. is returned. If the address type is not known on the system
  68331. then a %G_IO_ERROR_NOT_SUPPORTED error is returned.</doc>
  68332. <return-value transfer-ownership="none">
  68333. <doc xml:space="preserve">%TRUE if @dest was filled in, %FALSE on error</doc>
  68334. <type name="gboolean" c:type="gboolean"/>
  68335. </return-value>
  68336. <parameters>
  68337. <instance-parameter name="address" transfer-ownership="none">
  68338. <doc xml:space="preserve">a #GSocketAddress</doc>
  68339. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68340. </instance-parameter>
  68341. <parameter name="dest"
  68342. transfer-ownership="none"
  68343. nullable="1"
  68344. allow-none="1">
  68345. <doc xml:space="preserve">a pointer to a memory location that will contain the native
  68346. struct sockaddr</doc>
  68347. <type name="gpointer" c:type="gpointer"/>
  68348. </parameter>
  68349. <parameter name="destlen" transfer-ownership="none">
  68350. <doc xml:space="preserve">the size of @dest. Must be at least as large as
  68351. g_socket_address_get_native_size()</doc>
  68352. <type name="gsize" c:type="gsize"/>
  68353. </parameter>
  68354. </parameters>
  68355. </method>
  68356. <property name="family" transfer-ownership="none">
  68357. <type name="SocketFamily"/>
  68358. </property>
  68359. <field name="parent_instance">
  68360. <type name="GObject.Object" c:type="GObject"/>
  68361. </field>
  68362. </class>
  68363. <record name="SocketAddressClass"
  68364. c:type="GSocketAddressClass"
  68365. glib:is-gtype-struct-for="SocketAddress">
  68366. <field name="parent_class">
  68367. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  68368. </field>
  68369. <field name="get_family">
  68370. <callback name="get_family">
  68371. <return-value transfer-ownership="none">
  68372. <doc xml:space="preserve">the socket family type of @address</doc>
  68373. <type name="SocketFamily" c:type="GSocketFamily"/>
  68374. </return-value>
  68375. <parameters>
  68376. <parameter name="address" transfer-ownership="none">
  68377. <doc xml:space="preserve">a #GSocketAddress</doc>
  68378. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68379. </parameter>
  68380. </parameters>
  68381. </callback>
  68382. </field>
  68383. <field name="get_native_size">
  68384. <callback name="get_native_size">
  68385. <return-value transfer-ownership="none">
  68386. <doc xml:space="preserve">the size of the native struct sockaddr that
  68387. @address represents</doc>
  68388. <type name="gssize" c:type="gssize"/>
  68389. </return-value>
  68390. <parameters>
  68391. <parameter name="address" transfer-ownership="none">
  68392. <doc xml:space="preserve">a #GSocketAddress</doc>
  68393. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68394. </parameter>
  68395. </parameters>
  68396. </callback>
  68397. </field>
  68398. <field name="to_native">
  68399. <callback name="to_native" throws="1">
  68400. <return-value transfer-ownership="none">
  68401. <doc xml:space="preserve">%TRUE if @dest was filled in, %FALSE on error</doc>
  68402. <type name="gboolean" c:type="gboolean"/>
  68403. </return-value>
  68404. <parameters>
  68405. <parameter name="address" transfer-ownership="none">
  68406. <doc xml:space="preserve">a #GSocketAddress</doc>
  68407. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68408. </parameter>
  68409. <parameter name="dest"
  68410. transfer-ownership="none"
  68411. nullable="1"
  68412. allow-none="1">
  68413. <doc xml:space="preserve">a pointer to a memory location that will contain the native
  68414. struct sockaddr</doc>
  68415. <type name="gpointer" c:type="gpointer"/>
  68416. </parameter>
  68417. <parameter name="destlen" transfer-ownership="none">
  68418. <doc xml:space="preserve">the size of @dest. Must be at least as large as
  68419. g_socket_address_get_native_size()</doc>
  68420. <type name="gsize" c:type="gsize"/>
  68421. </parameter>
  68422. </parameters>
  68423. </callback>
  68424. </field>
  68425. </record>
  68426. <class name="SocketAddressEnumerator"
  68427. c:symbol-prefix="socket_address_enumerator"
  68428. c:type="GSocketAddressEnumerator"
  68429. parent="GObject.Object"
  68430. abstract="1"
  68431. glib:type-name="GSocketAddressEnumerator"
  68432. glib:get-type="g_socket_address_enumerator_get_type"
  68433. glib:type-struct="SocketAddressEnumeratorClass">
  68434. <doc xml:space="preserve">Enumerator type for objects that contain or generate
  68435. #GSocketAddress&lt;!-- --&gt;es.</doc>
  68436. <virtual-method name="next" invoker="next" throws="1">
  68437. <doc xml:space="preserve">Retrieves the next #GSocketAddress from @enumerator. Note that this
  68438. may block for some amount of time. (Eg, a #GNetworkAddress may need
  68439. to do a DNS lookup before it can return an address.) Use
  68440. g_socket_address_enumerator_next_async() if you need to avoid
  68441. blocking.
  68442. If @enumerator is expected to yield addresses, but for some reason
  68443. is unable to (eg, because of a DNS error), then the first call to
  68444. g_socket_address_enumerator_next() will return an appropriate error
  68445. in *@error. However, if the first call to
  68446. g_socket_address_enumerator_next() succeeds, then any further
  68447. internal errors (other than @cancellable being triggered) will be
  68448. ignored.</doc>
  68449. <return-value transfer-ownership="full">
  68450. <doc xml:space="preserve">a #GSocketAddress (owned by the caller), or %NULL on
  68451. error (in which case *@error will be set) or if there are no
  68452. more addresses.</doc>
  68453. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68454. </return-value>
  68455. <parameters>
  68456. <instance-parameter name="enumerator" transfer-ownership="none">
  68457. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68458. <type name="SocketAddressEnumerator"
  68459. c:type="GSocketAddressEnumerator*"/>
  68460. </instance-parameter>
  68461. <parameter name="cancellable"
  68462. transfer-ownership="none"
  68463. nullable="1"
  68464. allow-none="1">
  68465. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  68466. <type name="Cancellable" c:type="GCancellable*"/>
  68467. </parameter>
  68468. </parameters>
  68469. </virtual-method>
  68470. <virtual-method name="next_async" invoker="next_async">
  68471. <doc xml:space="preserve">Asynchronously retrieves the next #GSocketAddress from @enumerator
  68472. and then calls @callback, which must call
  68473. g_socket_address_enumerator_next_finish() to get the result.</doc>
  68474. <return-value transfer-ownership="none">
  68475. <type name="none" c:type="void"/>
  68476. </return-value>
  68477. <parameters>
  68478. <instance-parameter name="enumerator" transfer-ownership="none">
  68479. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68480. <type name="SocketAddressEnumerator"
  68481. c:type="GSocketAddressEnumerator*"/>
  68482. </instance-parameter>
  68483. <parameter name="cancellable"
  68484. transfer-ownership="none"
  68485. nullable="1"
  68486. allow-none="1">
  68487. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  68488. <type name="Cancellable" c:type="GCancellable*"/>
  68489. </parameter>
  68490. <parameter name="callback"
  68491. transfer-ownership="none"
  68492. nullable="1"
  68493. allow-none="1"
  68494. scope="async"
  68495. closure="2">
  68496. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request
  68497. is satisfied</doc>
  68498. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  68499. </parameter>
  68500. <parameter name="user_data"
  68501. transfer-ownership="none"
  68502. nullable="1"
  68503. allow-none="1"
  68504. closure="2">
  68505. <doc xml:space="preserve">the data to pass to callback function</doc>
  68506. <type name="gpointer" c:type="gpointer"/>
  68507. </parameter>
  68508. </parameters>
  68509. </virtual-method>
  68510. <virtual-method name="next_finish" invoker="next_finish" throws="1">
  68511. <doc xml:space="preserve">Retrieves the result of a completed call to
  68512. g_socket_address_enumerator_next_async(). See
  68513. g_socket_address_enumerator_next() for more information about
  68514. error handling.</doc>
  68515. <return-value transfer-ownership="full">
  68516. <doc xml:space="preserve">a #GSocketAddress (owned by the caller), or %NULL on
  68517. error (in which case *@error will be set) or if there are no
  68518. more addresses.</doc>
  68519. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68520. </return-value>
  68521. <parameters>
  68522. <instance-parameter name="enumerator" transfer-ownership="none">
  68523. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68524. <type name="SocketAddressEnumerator"
  68525. c:type="GSocketAddressEnumerator*"/>
  68526. </instance-parameter>
  68527. <parameter name="result" transfer-ownership="none">
  68528. <doc xml:space="preserve">a #GAsyncResult</doc>
  68529. <type name="AsyncResult" c:type="GAsyncResult*"/>
  68530. </parameter>
  68531. </parameters>
  68532. </virtual-method>
  68533. <method name="next"
  68534. c:identifier="g_socket_address_enumerator_next"
  68535. throws="1">
  68536. <doc xml:space="preserve">Retrieves the next #GSocketAddress from @enumerator. Note that this
  68537. may block for some amount of time. (Eg, a #GNetworkAddress may need
  68538. to do a DNS lookup before it can return an address.) Use
  68539. g_socket_address_enumerator_next_async() if you need to avoid
  68540. blocking.
  68541. If @enumerator is expected to yield addresses, but for some reason
  68542. is unable to (eg, because of a DNS error), then the first call to
  68543. g_socket_address_enumerator_next() will return an appropriate error
  68544. in *@error. However, if the first call to
  68545. g_socket_address_enumerator_next() succeeds, then any further
  68546. internal errors (other than @cancellable being triggered) will be
  68547. ignored.</doc>
  68548. <return-value transfer-ownership="full">
  68549. <doc xml:space="preserve">a #GSocketAddress (owned by the caller), or %NULL on
  68550. error (in which case *@error will be set) or if there are no
  68551. more addresses.</doc>
  68552. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68553. </return-value>
  68554. <parameters>
  68555. <instance-parameter name="enumerator" transfer-ownership="none">
  68556. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68557. <type name="SocketAddressEnumerator"
  68558. c:type="GSocketAddressEnumerator*"/>
  68559. </instance-parameter>
  68560. <parameter name="cancellable"
  68561. transfer-ownership="none"
  68562. nullable="1"
  68563. allow-none="1">
  68564. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  68565. <type name="Cancellable" c:type="GCancellable*"/>
  68566. </parameter>
  68567. </parameters>
  68568. </method>
  68569. <method name="next_async"
  68570. c:identifier="g_socket_address_enumerator_next_async">
  68571. <doc xml:space="preserve">Asynchronously retrieves the next #GSocketAddress from @enumerator
  68572. and then calls @callback, which must call
  68573. g_socket_address_enumerator_next_finish() to get the result.</doc>
  68574. <return-value transfer-ownership="none">
  68575. <type name="none" c:type="void"/>
  68576. </return-value>
  68577. <parameters>
  68578. <instance-parameter name="enumerator" transfer-ownership="none">
  68579. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68580. <type name="SocketAddressEnumerator"
  68581. c:type="GSocketAddressEnumerator*"/>
  68582. </instance-parameter>
  68583. <parameter name="cancellable"
  68584. transfer-ownership="none"
  68585. nullable="1"
  68586. allow-none="1">
  68587. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  68588. <type name="Cancellable" c:type="GCancellable*"/>
  68589. </parameter>
  68590. <parameter name="callback"
  68591. transfer-ownership="none"
  68592. nullable="1"
  68593. allow-none="1"
  68594. scope="async"
  68595. closure="2">
  68596. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request
  68597. is satisfied</doc>
  68598. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  68599. </parameter>
  68600. <parameter name="user_data"
  68601. transfer-ownership="none"
  68602. nullable="1"
  68603. allow-none="1">
  68604. <doc xml:space="preserve">the data to pass to callback function</doc>
  68605. <type name="gpointer" c:type="gpointer"/>
  68606. </parameter>
  68607. </parameters>
  68608. </method>
  68609. <method name="next_finish"
  68610. c:identifier="g_socket_address_enumerator_next_finish"
  68611. throws="1">
  68612. <doc xml:space="preserve">Retrieves the result of a completed call to
  68613. g_socket_address_enumerator_next_async(). See
  68614. g_socket_address_enumerator_next() for more information about
  68615. error handling.</doc>
  68616. <return-value transfer-ownership="full">
  68617. <doc xml:space="preserve">a #GSocketAddress (owned by the caller), or %NULL on
  68618. error (in which case *@error will be set) or if there are no
  68619. more addresses.</doc>
  68620. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68621. </return-value>
  68622. <parameters>
  68623. <instance-parameter name="enumerator" transfer-ownership="none">
  68624. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68625. <type name="SocketAddressEnumerator"
  68626. c:type="GSocketAddressEnumerator*"/>
  68627. </instance-parameter>
  68628. <parameter name="result" transfer-ownership="none">
  68629. <doc xml:space="preserve">a #GAsyncResult</doc>
  68630. <type name="AsyncResult" c:type="GAsyncResult*"/>
  68631. </parameter>
  68632. </parameters>
  68633. </method>
  68634. <field name="parent_instance">
  68635. <type name="GObject.Object" c:type="GObject"/>
  68636. </field>
  68637. </class>
  68638. <record name="SocketAddressEnumeratorClass"
  68639. c:type="GSocketAddressEnumeratorClass"
  68640. glib:is-gtype-struct-for="SocketAddressEnumerator">
  68641. <field name="parent_class">
  68642. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  68643. </field>
  68644. <field name="next">
  68645. <callback name="next" throws="1">
  68646. <return-value transfer-ownership="full">
  68647. <doc xml:space="preserve">a #GSocketAddress (owned by the caller), or %NULL on
  68648. error (in which case *@error will be set) or if there are no
  68649. more addresses.</doc>
  68650. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68651. </return-value>
  68652. <parameters>
  68653. <parameter name="enumerator" transfer-ownership="none">
  68654. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68655. <type name="SocketAddressEnumerator"
  68656. c:type="GSocketAddressEnumerator*"/>
  68657. </parameter>
  68658. <parameter name="cancellable"
  68659. transfer-ownership="none"
  68660. nullable="1"
  68661. allow-none="1">
  68662. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  68663. <type name="Cancellable" c:type="GCancellable*"/>
  68664. </parameter>
  68665. </parameters>
  68666. </callback>
  68667. </field>
  68668. <field name="next_async">
  68669. <callback name="next_async">
  68670. <return-value transfer-ownership="none">
  68671. <type name="none" c:type="void"/>
  68672. </return-value>
  68673. <parameters>
  68674. <parameter name="enumerator" transfer-ownership="none">
  68675. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68676. <type name="SocketAddressEnumerator"
  68677. c:type="GSocketAddressEnumerator*"/>
  68678. </parameter>
  68679. <parameter name="cancellable"
  68680. transfer-ownership="none"
  68681. nullable="1"
  68682. allow-none="1">
  68683. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  68684. <type name="Cancellable" c:type="GCancellable*"/>
  68685. </parameter>
  68686. <parameter name="callback"
  68687. transfer-ownership="none"
  68688. nullable="1"
  68689. allow-none="1"
  68690. scope="async"
  68691. closure="3">
  68692. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request
  68693. is satisfied</doc>
  68694. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  68695. </parameter>
  68696. <parameter name="user_data"
  68697. transfer-ownership="none"
  68698. nullable="1"
  68699. allow-none="1"
  68700. closure="3">
  68701. <doc xml:space="preserve">the data to pass to callback function</doc>
  68702. <type name="gpointer" c:type="gpointer"/>
  68703. </parameter>
  68704. </parameters>
  68705. </callback>
  68706. </field>
  68707. <field name="next_finish">
  68708. <callback name="next_finish" throws="1">
  68709. <return-value transfer-ownership="full">
  68710. <doc xml:space="preserve">a #GSocketAddress (owned by the caller), or %NULL on
  68711. error (in which case *@error will be set) or if there are no
  68712. more addresses.</doc>
  68713. <type name="SocketAddress" c:type="GSocketAddress*"/>
  68714. </return-value>
  68715. <parameters>
  68716. <parameter name="enumerator" transfer-ownership="none">
  68717. <doc xml:space="preserve">a #GSocketAddressEnumerator</doc>
  68718. <type name="SocketAddressEnumerator"
  68719. c:type="GSocketAddressEnumerator*"/>
  68720. </parameter>
  68721. <parameter name="result" transfer-ownership="none">
  68722. <doc xml:space="preserve">a #GAsyncResult</doc>
  68723. <type name="AsyncResult" c:type="GAsyncResult*"/>
  68724. </parameter>
  68725. </parameters>
  68726. </callback>
  68727. </field>
  68728. </record>
  68729. <record name="SocketClass"
  68730. c:type="GSocketClass"
  68731. glib:is-gtype-struct-for="Socket">
  68732. <field name="parent_class">
  68733. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  68734. </field>
  68735. <field name="_g_reserved1" introspectable="0">
  68736. <callback name="_g_reserved1">
  68737. <return-value transfer-ownership="none">
  68738. <type name="none" c:type="void"/>
  68739. </return-value>
  68740. </callback>
  68741. </field>
  68742. <field name="_g_reserved2" introspectable="0">
  68743. <callback name="_g_reserved2">
  68744. <return-value transfer-ownership="none">
  68745. <type name="none" c:type="void"/>
  68746. </return-value>
  68747. </callback>
  68748. </field>
  68749. <field name="_g_reserved3" introspectable="0">
  68750. <callback name="_g_reserved3">
  68751. <return-value transfer-ownership="none">
  68752. <type name="none" c:type="void"/>
  68753. </return-value>
  68754. </callback>
  68755. </field>
  68756. <field name="_g_reserved4" introspectable="0">
  68757. <callback name="_g_reserved4">
  68758. <return-value transfer-ownership="none">
  68759. <type name="none" c:type="void"/>
  68760. </return-value>
  68761. </callback>
  68762. </field>
  68763. <field name="_g_reserved5" introspectable="0">
  68764. <callback name="_g_reserved5">
  68765. <return-value transfer-ownership="none">
  68766. <type name="none" c:type="void"/>
  68767. </return-value>
  68768. </callback>
  68769. </field>
  68770. <field name="_g_reserved6" introspectable="0">
  68771. <callback name="_g_reserved6">
  68772. <return-value transfer-ownership="none">
  68773. <type name="none" c:type="void"/>
  68774. </return-value>
  68775. </callback>
  68776. </field>
  68777. <field name="_g_reserved7" introspectable="0">
  68778. <callback name="_g_reserved7">
  68779. <return-value transfer-ownership="none">
  68780. <type name="none" c:type="void"/>
  68781. </return-value>
  68782. </callback>
  68783. </field>
  68784. <field name="_g_reserved8" introspectable="0">
  68785. <callback name="_g_reserved8">
  68786. <return-value transfer-ownership="none">
  68787. <type name="none" c:type="void"/>
  68788. </return-value>
  68789. </callback>
  68790. </field>
  68791. <field name="_g_reserved9" introspectable="0">
  68792. <callback name="_g_reserved9">
  68793. <return-value transfer-ownership="none">
  68794. <type name="none" c:type="void"/>
  68795. </return-value>
  68796. </callback>
  68797. </field>
  68798. <field name="_g_reserved10" introspectable="0">
  68799. <callback name="_g_reserved10">
  68800. <return-value transfer-ownership="none">
  68801. <type name="none" c:type="void"/>
  68802. </return-value>
  68803. </callback>
  68804. </field>
  68805. </record>
  68806. <class name="SocketClient"
  68807. c:symbol-prefix="socket_client"
  68808. c:type="GSocketClient"
  68809. version="2.22"
  68810. parent="GObject.Object"
  68811. glib:type-name="GSocketClient"
  68812. glib:get-type="g_socket_client_get_type"
  68813. glib:type-struct="SocketClientClass">
  68814. <doc xml:space="preserve">#GSocketClient is a lightweight high-level utility class for connecting to
  68815. a network host using a connection oriented socket type.
  68816. You create a #GSocketClient object, set any options you want, and then
  68817. call a sync or async connect operation, which returns a #GSocketConnection
  68818. subclass on success.
  68819. The type of the #GSocketConnection object returned depends on the type of
  68820. the underlying socket that is in use. For instance, for a TCP/IP connection
  68821. it will be a #GTcpConnection.
  68822. As #GSocketClient is a lightweight object, you don't need to cache it. You
  68823. can just create a new one any time you need one.</doc>
  68824. <constructor name="new"
  68825. c:identifier="g_socket_client_new"
  68826. version="2.22">
  68827. <doc xml:space="preserve">Creates a new #GSocketClient with the default options.</doc>
  68828. <return-value transfer-ownership="full">
  68829. <doc xml:space="preserve">a #GSocketClient.
  68830. Free the returned object with g_object_unref().</doc>
  68831. <type name="SocketClient" c:type="GSocketClient*"/>
  68832. </return-value>
  68833. </constructor>
  68834. <virtual-method name="event">
  68835. <return-value transfer-ownership="none">
  68836. <type name="none" c:type="void"/>
  68837. </return-value>
  68838. <parameters>
  68839. <instance-parameter name="client" transfer-ownership="none">
  68840. <type name="SocketClient" c:type="GSocketClient*"/>
  68841. </instance-parameter>
  68842. <parameter name="event" transfer-ownership="none">
  68843. <type name="SocketClientEvent" c:type="GSocketClientEvent"/>
  68844. </parameter>
  68845. <parameter name="connectable" transfer-ownership="none">
  68846. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  68847. </parameter>
  68848. <parameter name="connection" transfer-ownership="none">
  68849. <type name="IOStream" c:type="GIOStream*"/>
  68850. </parameter>
  68851. </parameters>
  68852. </virtual-method>
  68853. <method name="add_application_proxy"
  68854. c:identifier="g_socket_client_add_application_proxy">
  68855. <doc xml:space="preserve">Enable proxy protocols to be handled by the application. When the
  68856. indicated proxy protocol is returned by the #GProxyResolver,
  68857. #GSocketClient will consider this protocol as supported but will
  68858. not try to find a #GProxy instance to handle handshaking. The
  68859. application must check for this case by calling
  68860. g_socket_connection_get_remote_address() on the returned
  68861. #GSocketConnection, and seeing if it's a #GProxyAddress of the
  68862. appropriate type, to determine whether or not it needs to handle
  68863. the proxy handshaking itself.
  68864. This should be used for proxy protocols that are dialects of
  68865. another protocol such as HTTP proxy. It also allows cohabitation of
  68866. proxy protocols that are reused between protocols. A good example
  68867. is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
  68868. be use as generic socket proxy through the HTTP CONNECT method.
  68869. When the proxy is detected as being an application proxy, TLS handshake
  68870. will be skipped. This is required to let the application do the proxy
  68871. specific handshake.</doc>
  68872. <return-value transfer-ownership="none">
  68873. <type name="none" c:type="void"/>
  68874. </return-value>
  68875. <parameters>
  68876. <instance-parameter name="client" transfer-ownership="none">
  68877. <doc xml:space="preserve">a #GSocketClient</doc>
  68878. <type name="SocketClient" c:type="GSocketClient*"/>
  68879. </instance-parameter>
  68880. <parameter name="protocol" transfer-ownership="none">
  68881. <doc xml:space="preserve">The proxy protocol</doc>
  68882. <type name="utf8" c:type="const gchar*"/>
  68883. </parameter>
  68884. </parameters>
  68885. </method>
  68886. <method name="connect"
  68887. c:identifier="g_socket_client_connect"
  68888. version="2.22"
  68889. throws="1">
  68890. <doc xml:space="preserve">Tries to resolve the @connectable and make a network connection to it.
  68891. Upon a successful connection, a new #GSocketConnection is constructed
  68892. and returned. The caller owns this new object and must drop their
  68893. reference to it when finished with it.
  68894. The type of the #GSocketConnection object returned depends on the type of
  68895. the underlying socket that is used. For instance, for a TCP/IP connection
  68896. it will be a #GTcpConnection.
  68897. The socket created will be the same family as the address that the
  68898. @connectable resolves to, unless family is set with g_socket_client_set_family()
  68899. or indirectly via g_socket_client_set_local_address(). The socket type
  68900. defaults to %G_SOCKET_TYPE_STREAM but can be set with
  68901. g_socket_client_set_socket_type().
  68902. If a local address is specified with g_socket_client_set_local_address() the
  68903. socket will be bound to this address before connecting.</doc>
  68904. <return-value transfer-ownership="full">
  68905. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  68906. <type name="SocketConnection" c:type="GSocketConnection*"/>
  68907. </return-value>
  68908. <parameters>
  68909. <instance-parameter name="client" transfer-ownership="none">
  68910. <doc xml:space="preserve">a #GSocketClient.</doc>
  68911. <type name="SocketClient" c:type="GSocketClient*"/>
  68912. </instance-parameter>
  68913. <parameter name="connectable" transfer-ownership="none">
  68914. <doc xml:space="preserve">a #GSocketConnectable specifying the remote address.</doc>
  68915. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  68916. </parameter>
  68917. <parameter name="cancellable"
  68918. transfer-ownership="none"
  68919. nullable="1"
  68920. allow-none="1">
  68921. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  68922. <type name="Cancellable" c:type="GCancellable*"/>
  68923. </parameter>
  68924. </parameters>
  68925. </method>
  68926. <method name="connect_async"
  68927. c:identifier="g_socket_client_connect_async"
  68928. version="2.22">
  68929. <doc xml:space="preserve">This is the asynchronous version of g_socket_client_connect().
  68930. When the operation is finished @callback will be
  68931. called. You can then call g_socket_client_connect_finish() to get
  68932. the result of the operation.</doc>
  68933. <return-value transfer-ownership="none">
  68934. <type name="none" c:type="void"/>
  68935. </return-value>
  68936. <parameters>
  68937. <instance-parameter name="client" transfer-ownership="none">
  68938. <doc xml:space="preserve">a #GSocketClient</doc>
  68939. <type name="SocketClient" c:type="GSocketClient*"/>
  68940. </instance-parameter>
  68941. <parameter name="connectable" transfer-ownership="none">
  68942. <doc xml:space="preserve">a #GSocketConnectable specifying the remote address.</doc>
  68943. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  68944. </parameter>
  68945. <parameter name="cancellable"
  68946. transfer-ownership="none"
  68947. nullable="1"
  68948. allow-none="1">
  68949. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  68950. <type name="Cancellable" c:type="GCancellable*"/>
  68951. </parameter>
  68952. <parameter name="callback"
  68953. transfer-ownership="none"
  68954. nullable="1"
  68955. allow-none="1"
  68956. scope="async"
  68957. closure="3">
  68958. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  68959. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  68960. </parameter>
  68961. <parameter name="user_data"
  68962. transfer-ownership="none"
  68963. nullable="1"
  68964. allow-none="1">
  68965. <doc xml:space="preserve">user data for the callback</doc>
  68966. <type name="gpointer" c:type="gpointer"/>
  68967. </parameter>
  68968. </parameters>
  68969. </method>
  68970. <method name="connect_finish"
  68971. c:identifier="g_socket_client_connect_finish"
  68972. version="2.22"
  68973. throws="1">
  68974. <doc xml:space="preserve">Finishes an async connect operation. See g_socket_client_connect_async()</doc>
  68975. <return-value transfer-ownership="full">
  68976. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  68977. <type name="SocketConnection" c:type="GSocketConnection*"/>
  68978. </return-value>
  68979. <parameters>
  68980. <instance-parameter name="client" transfer-ownership="none">
  68981. <doc xml:space="preserve">a #GSocketClient.</doc>
  68982. <type name="SocketClient" c:type="GSocketClient*"/>
  68983. </instance-parameter>
  68984. <parameter name="result" transfer-ownership="none">
  68985. <doc xml:space="preserve">a #GAsyncResult.</doc>
  68986. <type name="AsyncResult" c:type="GAsyncResult*"/>
  68987. </parameter>
  68988. </parameters>
  68989. </method>
  68990. <method name="connect_to_host"
  68991. c:identifier="g_socket_client_connect_to_host"
  68992. version="2.22"
  68993. throws="1">
  68994. <doc xml:space="preserve">This is a helper function for g_socket_client_connect().
  68995. Attempts to create a TCP connection to the named host.
  68996. @host_and_port may be in any of a number of recognized formats; an IPv6
  68997. address, an IPv4 address, or a domain name (in which case a DNS
  68998. lookup is performed). Quoting with [] is supported for all address
  68999. types. A port override may be specified in the usual way with a
  69000. colon. Ports may be given as decimal numbers or symbolic names (in
  69001. which case an /etc/services lookup is performed).
  69002. If no port override is given in @host_and_port then @default_port will be
  69003. used as the port number to connect to.
  69004. In general, @host_and_port is expected to be provided by the user (allowing
  69005. them to give the hostname, and a port override if necessary) and
  69006. @default_port is expected to be provided by the application.
  69007. In the case that an IP address is given, a single connection
  69008. attempt is made. In the case that a name is given, multiple
  69009. connection attempts may be made, in turn and according to the
  69010. number of address records in DNS, until a connection succeeds.
  69011. Upon a successful connection, a new #GSocketConnection is constructed
  69012. and returned. The caller owns this new object and must drop their
  69013. reference to it when finished with it.
  69014. In the event of any failure (DNS error, service not found, no hosts
  69015. connectable) %NULL is returned and @error (if non-%NULL) is set
  69016. accordingly.</doc>
  69017. <return-value transfer-ownership="full">
  69018. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  69019. <type name="SocketConnection" c:type="GSocketConnection*"/>
  69020. </return-value>
  69021. <parameters>
  69022. <instance-parameter name="client" transfer-ownership="none">
  69023. <doc xml:space="preserve">a #GSocketClient</doc>
  69024. <type name="SocketClient" c:type="GSocketClient*"/>
  69025. </instance-parameter>
  69026. <parameter name="host_and_port" transfer-ownership="none">
  69027. <doc xml:space="preserve">the name and optionally port of the host to connect to</doc>
  69028. <type name="utf8" c:type="const gchar*"/>
  69029. </parameter>
  69030. <parameter name="default_port" transfer-ownership="none">
  69031. <doc xml:space="preserve">the default port to connect to</doc>
  69032. <type name="guint16" c:type="guint16"/>
  69033. </parameter>
  69034. <parameter name="cancellable"
  69035. transfer-ownership="none"
  69036. nullable="1"
  69037. allow-none="1">
  69038. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  69039. <type name="Cancellable" c:type="GCancellable*"/>
  69040. </parameter>
  69041. </parameters>
  69042. </method>
  69043. <method name="connect_to_host_async"
  69044. c:identifier="g_socket_client_connect_to_host_async"
  69045. version="2.22">
  69046. <doc xml:space="preserve">This is the asynchronous version of g_socket_client_connect_to_host().
  69047. When the operation is finished @callback will be
  69048. called. You can then call g_socket_client_connect_to_host_finish() to get
  69049. the result of the operation.</doc>
  69050. <return-value transfer-ownership="none">
  69051. <type name="none" c:type="void"/>
  69052. </return-value>
  69053. <parameters>
  69054. <instance-parameter name="client" transfer-ownership="none">
  69055. <doc xml:space="preserve">a #GSocketClient</doc>
  69056. <type name="SocketClient" c:type="GSocketClient*"/>
  69057. </instance-parameter>
  69058. <parameter name="host_and_port" transfer-ownership="none">
  69059. <doc xml:space="preserve">the name and optionally the port of the host to connect to</doc>
  69060. <type name="utf8" c:type="const gchar*"/>
  69061. </parameter>
  69062. <parameter name="default_port" transfer-ownership="none">
  69063. <doc xml:space="preserve">the default port to connect to</doc>
  69064. <type name="guint16" c:type="guint16"/>
  69065. </parameter>
  69066. <parameter name="cancellable"
  69067. transfer-ownership="none"
  69068. nullable="1"
  69069. allow-none="1">
  69070. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  69071. <type name="Cancellable" c:type="GCancellable*"/>
  69072. </parameter>
  69073. <parameter name="callback"
  69074. transfer-ownership="none"
  69075. nullable="1"
  69076. allow-none="1"
  69077. scope="async"
  69078. closure="4">
  69079. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  69080. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  69081. </parameter>
  69082. <parameter name="user_data"
  69083. transfer-ownership="none"
  69084. nullable="1"
  69085. allow-none="1">
  69086. <doc xml:space="preserve">user data for the callback</doc>
  69087. <type name="gpointer" c:type="gpointer"/>
  69088. </parameter>
  69089. </parameters>
  69090. </method>
  69091. <method name="connect_to_host_finish"
  69092. c:identifier="g_socket_client_connect_to_host_finish"
  69093. version="2.22"
  69094. throws="1">
  69095. <doc xml:space="preserve">Finishes an async connect operation. See g_socket_client_connect_to_host_async()</doc>
  69096. <return-value transfer-ownership="full">
  69097. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  69098. <type name="SocketConnection" c:type="GSocketConnection*"/>
  69099. </return-value>
  69100. <parameters>
  69101. <instance-parameter name="client" transfer-ownership="none">
  69102. <doc xml:space="preserve">a #GSocketClient.</doc>
  69103. <type name="SocketClient" c:type="GSocketClient*"/>
  69104. </instance-parameter>
  69105. <parameter name="result" transfer-ownership="none">
  69106. <doc xml:space="preserve">a #GAsyncResult.</doc>
  69107. <type name="AsyncResult" c:type="GAsyncResult*"/>
  69108. </parameter>
  69109. </parameters>
  69110. </method>
  69111. <method name="connect_to_service"
  69112. c:identifier="g_socket_client_connect_to_service"
  69113. throws="1">
  69114. <doc xml:space="preserve">Attempts to create a TCP connection to a service.
  69115. This call looks up the SRV record for @service at @domain for the
  69116. "tcp" protocol. It then attempts to connect, in turn, to each of
  69117. the hosts providing the service until either a connection succeeds
  69118. or there are no hosts remaining.
  69119. Upon a successful connection, a new #GSocketConnection is constructed
  69120. and returned. The caller owns this new object and must drop their
  69121. reference to it when finished with it.
  69122. In the event of any failure (DNS error, service not found, no hosts
  69123. connectable) %NULL is returned and @error (if non-%NULL) is set
  69124. accordingly.</doc>
  69125. <return-value transfer-ownership="full">
  69126. <doc xml:space="preserve">a #GSocketConnection if successful, or %NULL on error</doc>
  69127. <type name="SocketConnection" c:type="GSocketConnection*"/>
  69128. </return-value>
  69129. <parameters>
  69130. <instance-parameter name="client" transfer-ownership="none">
  69131. <doc xml:space="preserve">a #GSocketConnection</doc>
  69132. <type name="SocketClient" c:type="GSocketClient*"/>
  69133. </instance-parameter>
  69134. <parameter name="domain" transfer-ownership="none">
  69135. <doc xml:space="preserve">a domain name</doc>
  69136. <type name="utf8" c:type="const gchar*"/>
  69137. </parameter>
  69138. <parameter name="service" transfer-ownership="none">
  69139. <doc xml:space="preserve">the name of the service to connect to</doc>
  69140. <type name="utf8" c:type="const gchar*"/>
  69141. </parameter>
  69142. <parameter name="cancellable"
  69143. transfer-ownership="none"
  69144. nullable="1"
  69145. allow-none="1">
  69146. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  69147. <type name="Cancellable" c:type="GCancellable*"/>
  69148. </parameter>
  69149. </parameters>
  69150. </method>
  69151. <method name="connect_to_service_async"
  69152. c:identifier="g_socket_client_connect_to_service_async"
  69153. version="2.22">
  69154. <doc xml:space="preserve">This is the asynchronous version of
  69155. g_socket_client_connect_to_service().</doc>
  69156. <return-value transfer-ownership="none">
  69157. <type name="none" c:type="void"/>
  69158. </return-value>
  69159. <parameters>
  69160. <instance-parameter name="client" transfer-ownership="none">
  69161. <doc xml:space="preserve">a #GSocketClient</doc>
  69162. <type name="SocketClient" c:type="GSocketClient*"/>
  69163. </instance-parameter>
  69164. <parameter name="domain" transfer-ownership="none">
  69165. <doc xml:space="preserve">a domain name</doc>
  69166. <type name="utf8" c:type="const gchar*"/>
  69167. </parameter>
  69168. <parameter name="service" transfer-ownership="none">
  69169. <doc xml:space="preserve">the name of the service to connect to</doc>
  69170. <type name="utf8" c:type="const gchar*"/>
  69171. </parameter>
  69172. <parameter name="cancellable"
  69173. transfer-ownership="none"
  69174. nullable="1"
  69175. allow-none="1">
  69176. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  69177. <type name="Cancellable" c:type="GCancellable*"/>
  69178. </parameter>
  69179. <parameter name="callback"
  69180. transfer-ownership="none"
  69181. nullable="1"
  69182. allow-none="1"
  69183. scope="async"
  69184. closure="4">
  69185. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  69186. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  69187. </parameter>
  69188. <parameter name="user_data"
  69189. transfer-ownership="none"
  69190. nullable="1"
  69191. allow-none="1">
  69192. <doc xml:space="preserve">user data for the callback</doc>
  69193. <type name="gpointer" c:type="gpointer"/>
  69194. </parameter>
  69195. </parameters>
  69196. </method>
  69197. <method name="connect_to_service_finish"
  69198. c:identifier="g_socket_client_connect_to_service_finish"
  69199. version="2.22"
  69200. throws="1">
  69201. <doc xml:space="preserve">Finishes an async connect operation. See g_socket_client_connect_to_service_async()</doc>
  69202. <return-value transfer-ownership="full">
  69203. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  69204. <type name="SocketConnection" c:type="GSocketConnection*"/>
  69205. </return-value>
  69206. <parameters>
  69207. <instance-parameter name="client" transfer-ownership="none">
  69208. <doc xml:space="preserve">a #GSocketClient.</doc>
  69209. <type name="SocketClient" c:type="GSocketClient*"/>
  69210. </instance-parameter>
  69211. <parameter name="result" transfer-ownership="none">
  69212. <doc xml:space="preserve">a #GAsyncResult.</doc>
  69213. <type name="AsyncResult" c:type="GAsyncResult*"/>
  69214. </parameter>
  69215. </parameters>
  69216. </method>
  69217. <method name="connect_to_uri"
  69218. c:identifier="g_socket_client_connect_to_uri"
  69219. version="2.26"
  69220. throws="1">
  69221. <doc xml:space="preserve">This is a helper function for g_socket_client_connect().
  69222. Attempts to create a TCP connection with a network URI.
  69223. @uri may be any valid URI containing an "authority" (hostname/port)
  69224. component. If a port is not specified in the URI, @default_port
  69225. will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
  69226. (#GSocketClient does not know to automatically assume TLS for
  69227. certain URI schemes.)
  69228. Using this rather than g_socket_client_connect() or
  69229. g_socket_client_connect_to_host() allows #GSocketClient to
  69230. determine when to use application-specific proxy protocols.
  69231. Upon a successful connection, a new #GSocketConnection is constructed
  69232. and returned. The caller owns this new object and must drop their
  69233. reference to it when finished with it.
  69234. In the event of any failure (DNS error, service not found, no hosts
  69235. connectable) %NULL is returned and @error (if non-%NULL) is set
  69236. accordingly.</doc>
  69237. <return-value transfer-ownership="full">
  69238. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  69239. <type name="SocketConnection" c:type="GSocketConnection*"/>
  69240. </return-value>
  69241. <parameters>
  69242. <instance-parameter name="client" transfer-ownership="none">
  69243. <doc xml:space="preserve">a #GSocketClient</doc>
  69244. <type name="SocketClient" c:type="GSocketClient*"/>
  69245. </instance-parameter>
  69246. <parameter name="uri" transfer-ownership="none">
  69247. <doc xml:space="preserve">A network URI</doc>
  69248. <type name="utf8" c:type="const gchar*"/>
  69249. </parameter>
  69250. <parameter name="default_port" transfer-ownership="none">
  69251. <doc xml:space="preserve">the default port to connect to</doc>
  69252. <type name="guint16" c:type="guint16"/>
  69253. </parameter>
  69254. <parameter name="cancellable"
  69255. transfer-ownership="none"
  69256. nullable="1"
  69257. allow-none="1">
  69258. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  69259. <type name="Cancellable" c:type="GCancellable*"/>
  69260. </parameter>
  69261. </parameters>
  69262. </method>
  69263. <method name="connect_to_uri_async"
  69264. c:identifier="g_socket_client_connect_to_uri_async"
  69265. version="2.26">
  69266. <doc xml:space="preserve">This is the asynchronous version of g_socket_client_connect_to_uri().
  69267. When the operation is finished @callback will be
  69268. called. You can then call g_socket_client_connect_to_uri_finish() to get
  69269. the result of the operation.</doc>
  69270. <return-value transfer-ownership="none">
  69271. <type name="none" c:type="void"/>
  69272. </return-value>
  69273. <parameters>
  69274. <instance-parameter name="client" transfer-ownership="none">
  69275. <doc xml:space="preserve">a #GSocketClient</doc>
  69276. <type name="SocketClient" c:type="GSocketClient*"/>
  69277. </instance-parameter>
  69278. <parameter name="uri" transfer-ownership="none">
  69279. <doc xml:space="preserve">a network uri</doc>
  69280. <type name="utf8" c:type="const gchar*"/>
  69281. </parameter>
  69282. <parameter name="default_port" transfer-ownership="none">
  69283. <doc xml:space="preserve">the default port to connect to</doc>
  69284. <type name="guint16" c:type="guint16"/>
  69285. </parameter>
  69286. <parameter name="cancellable"
  69287. transfer-ownership="none"
  69288. nullable="1"
  69289. allow-none="1">
  69290. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  69291. <type name="Cancellable" c:type="GCancellable*"/>
  69292. </parameter>
  69293. <parameter name="callback"
  69294. transfer-ownership="none"
  69295. nullable="1"
  69296. allow-none="1"
  69297. scope="async"
  69298. closure="4">
  69299. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  69300. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  69301. </parameter>
  69302. <parameter name="user_data"
  69303. transfer-ownership="none"
  69304. nullable="1"
  69305. allow-none="1">
  69306. <doc xml:space="preserve">user data for the callback</doc>
  69307. <type name="gpointer" c:type="gpointer"/>
  69308. </parameter>
  69309. </parameters>
  69310. </method>
  69311. <method name="connect_to_uri_finish"
  69312. c:identifier="g_socket_client_connect_to_uri_finish"
  69313. version="2.26"
  69314. throws="1">
  69315. <doc xml:space="preserve">Finishes an async connect operation. See g_socket_client_connect_to_uri_async()</doc>
  69316. <return-value transfer-ownership="full">
  69317. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  69318. <type name="SocketConnection" c:type="GSocketConnection*"/>
  69319. </return-value>
  69320. <parameters>
  69321. <instance-parameter name="client" transfer-ownership="none">
  69322. <doc xml:space="preserve">a #GSocketClient.</doc>
  69323. <type name="SocketClient" c:type="GSocketClient*"/>
  69324. </instance-parameter>
  69325. <parameter name="result" transfer-ownership="none">
  69326. <doc xml:space="preserve">a #GAsyncResult.</doc>
  69327. <type name="AsyncResult" c:type="GAsyncResult*"/>
  69328. </parameter>
  69329. </parameters>
  69330. </method>
  69331. <method name="get_enable_proxy"
  69332. c:identifier="g_socket_client_get_enable_proxy"
  69333. version="2.26">
  69334. <doc xml:space="preserve">Gets the proxy enable state; see g_socket_client_set_enable_proxy()</doc>
  69335. <return-value transfer-ownership="none">
  69336. <doc xml:space="preserve">whether proxying is enabled</doc>
  69337. <type name="gboolean" c:type="gboolean"/>
  69338. </return-value>
  69339. <parameters>
  69340. <instance-parameter name="client" transfer-ownership="none">
  69341. <doc xml:space="preserve">a #GSocketClient.</doc>
  69342. <type name="SocketClient" c:type="GSocketClient*"/>
  69343. </instance-parameter>
  69344. </parameters>
  69345. </method>
  69346. <method name="get_family"
  69347. c:identifier="g_socket_client_get_family"
  69348. version="2.22">
  69349. <doc xml:space="preserve">Gets the socket family of the socket client.
  69350. See g_socket_client_set_family() for details.</doc>
  69351. <return-value transfer-ownership="none">
  69352. <doc xml:space="preserve">a #GSocketFamily</doc>
  69353. <type name="SocketFamily" c:type="GSocketFamily"/>
  69354. </return-value>
  69355. <parameters>
  69356. <instance-parameter name="client" transfer-ownership="none">
  69357. <doc xml:space="preserve">a #GSocketClient.</doc>
  69358. <type name="SocketClient" c:type="GSocketClient*"/>
  69359. </instance-parameter>
  69360. </parameters>
  69361. </method>
  69362. <method name="get_local_address"
  69363. c:identifier="g_socket_client_get_local_address"
  69364. version="2.22">
  69365. <doc xml:space="preserve">Gets the local address of the socket client.
  69366. See g_socket_client_set_local_address() for details.</doc>
  69367. <return-value transfer-ownership="none">
  69368. <doc xml:space="preserve">a #GSocketAddress or %NULL. Do not free.</doc>
  69369. <type name="SocketAddress" c:type="GSocketAddress*"/>
  69370. </return-value>
  69371. <parameters>
  69372. <instance-parameter name="client" transfer-ownership="none">
  69373. <doc xml:space="preserve">a #GSocketClient.</doc>
  69374. <type name="SocketClient" c:type="GSocketClient*"/>
  69375. </instance-parameter>
  69376. </parameters>
  69377. </method>
  69378. <method name="get_protocol"
  69379. c:identifier="g_socket_client_get_protocol"
  69380. version="2.22">
  69381. <doc xml:space="preserve">Gets the protocol name type of the socket client.
  69382. See g_socket_client_set_protocol() for details.</doc>
  69383. <return-value transfer-ownership="none">
  69384. <doc xml:space="preserve">a #GSocketProtocol</doc>
  69385. <type name="SocketProtocol" c:type="GSocketProtocol"/>
  69386. </return-value>
  69387. <parameters>
  69388. <instance-parameter name="client" transfer-ownership="none">
  69389. <doc xml:space="preserve">a #GSocketClient</doc>
  69390. <type name="SocketClient" c:type="GSocketClient*"/>
  69391. </instance-parameter>
  69392. </parameters>
  69393. </method>
  69394. <method name="get_proxy_resolver"
  69395. c:identifier="g_socket_client_get_proxy_resolver"
  69396. version="2.36">
  69397. <doc xml:space="preserve">Gets the #GProxyResolver being used by @client. Normally, this will
  69398. be the resolver returned by g_proxy_resolver_get_default(), but you
  69399. can override it with g_socket_client_set_proxy_resolver().</doc>
  69400. <return-value transfer-ownership="none">
  69401. <doc xml:space="preserve">The #GProxyResolver being used by
  69402. @client.</doc>
  69403. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  69404. </return-value>
  69405. <parameters>
  69406. <instance-parameter name="client" transfer-ownership="none">
  69407. <doc xml:space="preserve">a #GSocketClient.</doc>
  69408. <type name="SocketClient" c:type="GSocketClient*"/>
  69409. </instance-parameter>
  69410. </parameters>
  69411. </method>
  69412. <method name="get_socket_type"
  69413. c:identifier="g_socket_client_get_socket_type"
  69414. version="2.22">
  69415. <doc xml:space="preserve">Gets the socket type of the socket client.
  69416. See g_socket_client_set_socket_type() for details.</doc>
  69417. <return-value transfer-ownership="none">
  69418. <doc xml:space="preserve">a #GSocketFamily</doc>
  69419. <type name="SocketType" c:type="GSocketType"/>
  69420. </return-value>
  69421. <parameters>
  69422. <instance-parameter name="client" transfer-ownership="none">
  69423. <doc xml:space="preserve">a #GSocketClient.</doc>
  69424. <type name="SocketClient" c:type="GSocketClient*"/>
  69425. </instance-parameter>
  69426. </parameters>
  69427. </method>
  69428. <method name="get_timeout"
  69429. c:identifier="g_socket_client_get_timeout"
  69430. version="2.26">
  69431. <doc xml:space="preserve">Gets the I/O timeout time for sockets created by @client.
  69432. See g_socket_client_set_timeout() for details.</doc>
  69433. <return-value transfer-ownership="none">
  69434. <doc xml:space="preserve">the timeout in seconds</doc>
  69435. <type name="guint" c:type="guint"/>
  69436. </return-value>
  69437. <parameters>
  69438. <instance-parameter name="client" transfer-ownership="none">
  69439. <doc xml:space="preserve">a #GSocketClient</doc>
  69440. <type name="SocketClient" c:type="GSocketClient*"/>
  69441. </instance-parameter>
  69442. </parameters>
  69443. </method>
  69444. <method name="get_tls"
  69445. c:identifier="g_socket_client_get_tls"
  69446. version="2.28">
  69447. <doc xml:space="preserve">Gets whether @client creates TLS connections. See
  69448. g_socket_client_set_tls() for details.</doc>
  69449. <return-value transfer-ownership="none">
  69450. <doc xml:space="preserve">whether @client uses TLS</doc>
  69451. <type name="gboolean" c:type="gboolean"/>
  69452. </return-value>
  69453. <parameters>
  69454. <instance-parameter name="client" transfer-ownership="none">
  69455. <doc xml:space="preserve">a #GSocketClient.</doc>
  69456. <type name="SocketClient" c:type="GSocketClient*"/>
  69457. </instance-parameter>
  69458. </parameters>
  69459. </method>
  69460. <method name="get_tls_validation_flags"
  69461. c:identifier="g_socket_client_get_tls_validation_flags"
  69462. version="2.28">
  69463. <doc xml:space="preserve">Gets the TLS validation flags used creating TLS connections via
  69464. @client.</doc>
  69465. <return-value transfer-ownership="none">
  69466. <doc xml:space="preserve">the TLS validation flags</doc>
  69467. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  69468. </return-value>
  69469. <parameters>
  69470. <instance-parameter name="client" transfer-ownership="none">
  69471. <doc xml:space="preserve">a #GSocketClient.</doc>
  69472. <type name="SocketClient" c:type="GSocketClient*"/>
  69473. </instance-parameter>
  69474. </parameters>
  69475. </method>
  69476. <method name="set_enable_proxy"
  69477. c:identifier="g_socket_client_set_enable_proxy"
  69478. version="2.26">
  69479. <doc xml:space="preserve">Sets whether or not @client attempts to make connections via a
  69480. proxy server. When enabled (the default), #GSocketClient will use a
  69481. #GProxyResolver to determine if a proxy protocol such as SOCKS is
  69482. needed, and automatically do the necessary proxy negotiation.
  69483. See also g_socket_client_set_proxy_resolver().</doc>
  69484. <return-value transfer-ownership="none">
  69485. <type name="none" c:type="void"/>
  69486. </return-value>
  69487. <parameters>
  69488. <instance-parameter name="client" transfer-ownership="none">
  69489. <doc xml:space="preserve">a #GSocketClient.</doc>
  69490. <type name="SocketClient" c:type="GSocketClient*"/>
  69491. </instance-parameter>
  69492. <parameter name="enable" transfer-ownership="none">
  69493. <doc xml:space="preserve">whether to enable proxies</doc>
  69494. <type name="gboolean" c:type="gboolean"/>
  69495. </parameter>
  69496. </parameters>
  69497. </method>
  69498. <method name="set_family"
  69499. c:identifier="g_socket_client_set_family"
  69500. version="2.22">
  69501. <doc xml:space="preserve">Sets the socket family of the socket client.
  69502. If this is set to something other than %G_SOCKET_FAMILY_INVALID
  69503. then the sockets created by this object will be of the specified
  69504. family.
  69505. This might be useful for instance if you want to force the local
  69506. connection to be an ipv4 socket, even though the address might
  69507. be an ipv6 mapped to ipv4 address.</doc>
  69508. <return-value transfer-ownership="none">
  69509. <type name="none" c:type="void"/>
  69510. </return-value>
  69511. <parameters>
  69512. <instance-parameter name="client" transfer-ownership="none">
  69513. <doc xml:space="preserve">a #GSocketClient.</doc>
  69514. <type name="SocketClient" c:type="GSocketClient*"/>
  69515. </instance-parameter>
  69516. <parameter name="family" transfer-ownership="none">
  69517. <doc xml:space="preserve">a #GSocketFamily</doc>
  69518. <type name="SocketFamily" c:type="GSocketFamily"/>
  69519. </parameter>
  69520. </parameters>
  69521. </method>
  69522. <method name="set_local_address"
  69523. c:identifier="g_socket_client_set_local_address"
  69524. version="2.22">
  69525. <doc xml:space="preserve">Sets the local address of the socket client.
  69526. The sockets created by this object will bound to the
  69527. specified address (if not %NULL) before connecting.
  69528. This is useful if you want to ensure that the local
  69529. side of the connection is on a specific port, or on
  69530. a specific interface.</doc>
  69531. <return-value transfer-ownership="none">
  69532. <type name="none" c:type="void"/>
  69533. </return-value>
  69534. <parameters>
  69535. <instance-parameter name="client" transfer-ownership="none">
  69536. <doc xml:space="preserve">a #GSocketClient.</doc>
  69537. <type name="SocketClient" c:type="GSocketClient*"/>
  69538. </instance-parameter>
  69539. <parameter name="address"
  69540. transfer-ownership="none"
  69541. nullable="1"
  69542. allow-none="1">
  69543. <doc xml:space="preserve">a #GSocketAddress, or %NULL</doc>
  69544. <type name="SocketAddress" c:type="GSocketAddress*"/>
  69545. </parameter>
  69546. </parameters>
  69547. </method>
  69548. <method name="set_protocol"
  69549. c:identifier="g_socket_client_set_protocol"
  69550. version="2.22">
  69551. <doc xml:space="preserve">Sets the protocol of the socket client.
  69552. The sockets created by this object will use of the specified
  69553. protocol.
  69554. If @protocol is %0 that means to use the default
  69555. protocol for the socket family and type.</doc>
  69556. <return-value transfer-ownership="none">
  69557. <type name="none" c:type="void"/>
  69558. </return-value>
  69559. <parameters>
  69560. <instance-parameter name="client" transfer-ownership="none">
  69561. <doc xml:space="preserve">a #GSocketClient.</doc>
  69562. <type name="SocketClient" c:type="GSocketClient*"/>
  69563. </instance-parameter>
  69564. <parameter name="protocol" transfer-ownership="none">
  69565. <doc xml:space="preserve">a #GSocketProtocol</doc>
  69566. <type name="SocketProtocol" c:type="GSocketProtocol"/>
  69567. </parameter>
  69568. </parameters>
  69569. </method>
  69570. <method name="set_proxy_resolver"
  69571. c:identifier="g_socket_client_set_proxy_resolver"
  69572. version="2.36">
  69573. <doc xml:space="preserve">Overrides the #GProxyResolver used by @client. You can call this if
  69574. you want to use specific proxies, rather than using the system
  69575. default proxy settings.
  69576. Note that whether or not the proxy resolver is actually used
  69577. depends on the setting of #GSocketClient:enable-proxy, which is not
  69578. changed by this function (but which is %TRUE by default)</doc>
  69579. <return-value transfer-ownership="none">
  69580. <type name="none" c:type="void"/>
  69581. </return-value>
  69582. <parameters>
  69583. <instance-parameter name="client" transfer-ownership="none">
  69584. <doc xml:space="preserve">a #GSocketClient.</doc>
  69585. <type name="SocketClient" c:type="GSocketClient*"/>
  69586. </instance-parameter>
  69587. <parameter name="proxy_resolver"
  69588. transfer-ownership="none"
  69589. nullable="1"
  69590. allow-none="1">
  69591. <doc xml:space="preserve">a #GProxyResolver, or %NULL for the
  69592. default.</doc>
  69593. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  69594. </parameter>
  69595. </parameters>
  69596. </method>
  69597. <method name="set_socket_type"
  69598. c:identifier="g_socket_client_set_socket_type"
  69599. version="2.22">
  69600. <doc xml:space="preserve">Sets the socket type of the socket client.
  69601. The sockets created by this object will be of the specified
  69602. type.
  69603. It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
  69604. as GSocketClient is used for connection oriented services.</doc>
  69605. <return-value transfer-ownership="none">
  69606. <type name="none" c:type="void"/>
  69607. </return-value>
  69608. <parameters>
  69609. <instance-parameter name="client" transfer-ownership="none">
  69610. <doc xml:space="preserve">a #GSocketClient.</doc>
  69611. <type name="SocketClient" c:type="GSocketClient*"/>
  69612. </instance-parameter>
  69613. <parameter name="type" transfer-ownership="none">
  69614. <doc xml:space="preserve">a #GSocketType</doc>
  69615. <type name="SocketType" c:type="GSocketType"/>
  69616. </parameter>
  69617. </parameters>
  69618. </method>
  69619. <method name="set_timeout"
  69620. c:identifier="g_socket_client_set_timeout"
  69621. version="2.26">
  69622. <doc xml:space="preserve">Sets the I/O timeout for sockets created by @client. @timeout is a
  69623. time in seconds, or 0 for no timeout (the default).
  69624. The timeout value affects the initial connection attempt as well,
  69625. so setting this may cause calls to g_socket_client_connect(), etc,
  69626. to fail with %G_IO_ERROR_TIMED_OUT.</doc>
  69627. <return-value transfer-ownership="none">
  69628. <type name="none" c:type="void"/>
  69629. </return-value>
  69630. <parameters>
  69631. <instance-parameter name="client" transfer-ownership="none">
  69632. <doc xml:space="preserve">a #GSocketClient.</doc>
  69633. <type name="SocketClient" c:type="GSocketClient*"/>
  69634. </instance-parameter>
  69635. <parameter name="timeout" transfer-ownership="none">
  69636. <doc xml:space="preserve">the timeout</doc>
  69637. <type name="guint" c:type="guint"/>
  69638. </parameter>
  69639. </parameters>
  69640. </method>
  69641. <method name="set_tls"
  69642. c:identifier="g_socket_client_set_tls"
  69643. version="2.28">
  69644. <doc xml:space="preserve">Sets whether @client creates TLS (aka SSL) connections. If @tls is
  69645. %TRUE, @client will wrap its connections in a #GTlsClientConnection
  69646. and perform a TLS handshake when connecting.
  69647. Note that since #GSocketClient must return a #GSocketConnection,
  69648. but #GTlsClientConnection is not a #GSocketConnection, this
  69649. actually wraps the resulting #GTlsClientConnection in a
  69650. #GTcpWrapperConnection when returning it. You can use
  69651. g_tcp_wrapper_connection_get_base_io_stream() on the return value
  69652. to extract the #GTlsClientConnection.
  69653. If you need to modify the behavior of the TLS handshake (eg, by
  69654. setting a client-side certificate to use, or connecting to the
  69655. #GTlsConnection::accept-certificate signal), you can connect to
  69656. @client's #GSocketClient::event signal and wait for it to be
  69657. emitted with %G_SOCKET_CLIENT_TLS_HANDSHAKING, which will give you
  69658. a chance to see the #GTlsClientConnection before the handshake
  69659. starts.</doc>
  69660. <return-value transfer-ownership="none">
  69661. <type name="none" c:type="void"/>
  69662. </return-value>
  69663. <parameters>
  69664. <instance-parameter name="client" transfer-ownership="none">
  69665. <doc xml:space="preserve">a #GSocketClient.</doc>
  69666. <type name="SocketClient" c:type="GSocketClient*"/>
  69667. </instance-parameter>
  69668. <parameter name="tls" transfer-ownership="none">
  69669. <doc xml:space="preserve">whether to use TLS</doc>
  69670. <type name="gboolean" c:type="gboolean"/>
  69671. </parameter>
  69672. </parameters>
  69673. </method>
  69674. <method name="set_tls_validation_flags"
  69675. c:identifier="g_socket_client_set_tls_validation_flags"
  69676. version="2.28">
  69677. <doc xml:space="preserve">Sets the TLS validation flags used when creating TLS connections
  69678. via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.</doc>
  69679. <return-value transfer-ownership="none">
  69680. <type name="none" c:type="void"/>
  69681. </return-value>
  69682. <parameters>
  69683. <instance-parameter name="client" transfer-ownership="none">
  69684. <doc xml:space="preserve">a #GSocketClient.</doc>
  69685. <type name="SocketClient" c:type="GSocketClient*"/>
  69686. </instance-parameter>
  69687. <parameter name="flags" transfer-ownership="none">
  69688. <doc xml:space="preserve">the validation flags</doc>
  69689. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  69690. </parameter>
  69691. </parameters>
  69692. </method>
  69693. <property name="enable-proxy"
  69694. writable="1"
  69695. construct="1"
  69696. transfer-ownership="none">
  69697. <type name="gboolean" c:type="gboolean"/>
  69698. </property>
  69699. <property name="family"
  69700. writable="1"
  69701. construct="1"
  69702. transfer-ownership="none">
  69703. <type name="SocketFamily"/>
  69704. </property>
  69705. <property name="local-address"
  69706. writable="1"
  69707. construct="1"
  69708. transfer-ownership="none">
  69709. <type name="SocketAddress"/>
  69710. </property>
  69711. <property name="protocol"
  69712. writable="1"
  69713. construct="1"
  69714. transfer-ownership="none">
  69715. <type name="SocketProtocol"/>
  69716. </property>
  69717. <property name="proxy-resolver"
  69718. version="2.36"
  69719. writable="1"
  69720. construct="1"
  69721. transfer-ownership="none">
  69722. <doc xml:space="preserve">The proxy resolver to use</doc>
  69723. <type name="ProxyResolver"/>
  69724. </property>
  69725. <property name="timeout"
  69726. writable="1"
  69727. construct="1"
  69728. transfer-ownership="none">
  69729. <type name="guint" c:type="guint"/>
  69730. </property>
  69731. <property name="tls"
  69732. writable="1"
  69733. construct="1"
  69734. transfer-ownership="none">
  69735. <type name="gboolean" c:type="gboolean"/>
  69736. </property>
  69737. <property name="tls-validation-flags"
  69738. writable="1"
  69739. construct="1"
  69740. transfer-ownership="none">
  69741. <type name="TlsCertificateFlags"/>
  69742. </property>
  69743. <property name="type"
  69744. writable="1"
  69745. construct="1"
  69746. transfer-ownership="none">
  69747. <type name="SocketType"/>
  69748. </property>
  69749. <field name="parent_instance">
  69750. <type name="GObject.Object" c:type="GObject"/>
  69751. </field>
  69752. <field name="priv">
  69753. <type name="SocketClientPrivate" c:type="GSocketClientPrivate*"/>
  69754. </field>
  69755. <glib:signal name="event" when="last" version="2.32">
  69756. <doc xml:space="preserve">Emitted when @client's activity on @connectable changes state.
  69757. Among other things, this can be used to provide progress
  69758. information about a network connection in the UI. The meanings of
  69759. the different @event values are as follows:
  69760. - %G_SOCKET_CLIENT_RESOLVING: @client is about to look up @connectable
  69761. in DNS. @connection will be %NULL.
  69762. - %G_SOCKET_CLIENT_RESOLVED: @client has successfully resolved
  69763. @connectable in DNS. @connection will be %NULL.
  69764. - %G_SOCKET_CLIENT_CONNECTING: @client is about to make a connection
  69765. to a remote host; either a proxy server or the destination server
  69766. itself. @connection is the #GSocketConnection, which is not yet
  69767. connected. Since GLib 2.40, you can access the remote
  69768. address via g_socket_connection_get_remote_address().
  69769. - %G_SOCKET_CLIENT_CONNECTED: @client has successfully connected
  69770. to a remote host. @connection is the connected #GSocketConnection.
  69771. - %G_SOCKET_CLIENT_PROXY_NEGOTIATING: @client is about to negotiate
  69772. with a proxy to get it to connect to @connectable. @connection is
  69773. the #GSocketConnection to the proxy server.
  69774. - %G_SOCKET_CLIENT_PROXY_NEGOTIATED: @client has negotiated a
  69775. connection to @connectable through a proxy server. @connection is
  69776. the stream returned from g_proxy_connect(), which may or may not
  69777. be a #GSocketConnection.
  69778. - %G_SOCKET_CLIENT_TLS_HANDSHAKING: @client is about to begin a TLS
  69779. handshake. @connection is a #GTlsClientConnection.
  69780. - %G_SOCKET_CLIENT_TLS_HANDSHAKED: @client has successfully completed
  69781. the TLS handshake. @connection is a #GTlsClientConnection.
  69782. - %G_SOCKET_CLIENT_COMPLETE: @client has either successfully connected
  69783. to @connectable (in which case @connection is the #GSocketConnection
  69784. that it will be returning to the caller) or has failed (in which
  69785. case @connection is %NULL and the client is about to return an error).
  69786. Each event except %G_SOCKET_CLIENT_COMPLETE may be emitted
  69787. multiple times (or not at all) for a given connectable (in
  69788. particular, if @client ends up attempting to connect to more than
  69789. one address). However, if @client emits the #GSocketClient::event
  69790. signal at all for a given connectable, that it will always emit
  69791. it with %G_SOCKET_CLIENT_COMPLETE when it is done.
  69792. Note that there may be additional #GSocketClientEvent values in
  69793. the future; unrecognized @event values should be ignored.</doc>
  69794. <return-value transfer-ownership="none">
  69795. <type name="none" c:type="void"/>
  69796. </return-value>
  69797. <parameters>
  69798. <parameter name="event" transfer-ownership="none">
  69799. <doc xml:space="preserve">the event that is occurring</doc>
  69800. <type name="SocketClientEvent"/>
  69801. </parameter>
  69802. <parameter name="connectable" transfer-ownership="none">
  69803. <doc xml:space="preserve">the #GSocketConnectable that @event is occurring on</doc>
  69804. <type name="SocketConnectable"/>
  69805. </parameter>
  69806. <parameter name="connection"
  69807. transfer-ownership="none"
  69808. nullable="1"
  69809. allow-none="1">
  69810. <doc xml:space="preserve">the current representation of the connection</doc>
  69811. <type name="IOStream"/>
  69812. </parameter>
  69813. </parameters>
  69814. </glib:signal>
  69815. </class>
  69816. <record name="SocketClientClass"
  69817. c:type="GSocketClientClass"
  69818. glib:is-gtype-struct-for="SocketClient">
  69819. <field name="parent_class">
  69820. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  69821. </field>
  69822. <field name="event">
  69823. <callback name="event">
  69824. <return-value transfer-ownership="none">
  69825. <type name="none" c:type="void"/>
  69826. </return-value>
  69827. <parameters>
  69828. <parameter name="client" transfer-ownership="none">
  69829. <type name="SocketClient" c:type="GSocketClient*"/>
  69830. </parameter>
  69831. <parameter name="event" transfer-ownership="none">
  69832. <type name="SocketClientEvent" c:type="GSocketClientEvent"/>
  69833. </parameter>
  69834. <parameter name="connectable" transfer-ownership="none">
  69835. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  69836. </parameter>
  69837. <parameter name="connection" transfer-ownership="none">
  69838. <type name="IOStream" c:type="GIOStream*"/>
  69839. </parameter>
  69840. </parameters>
  69841. </callback>
  69842. </field>
  69843. <field name="_g_reserved1" introspectable="0">
  69844. <callback name="_g_reserved1">
  69845. <return-value transfer-ownership="none">
  69846. <type name="none" c:type="void"/>
  69847. </return-value>
  69848. </callback>
  69849. </field>
  69850. <field name="_g_reserved2" introspectable="0">
  69851. <callback name="_g_reserved2">
  69852. <return-value transfer-ownership="none">
  69853. <type name="none" c:type="void"/>
  69854. </return-value>
  69855. </callback>
  69856. </field>
  69857. <field name="_g_reserved3" introspectable="0">
  69858. <callback name="_g_reserved3">
  69859. <return-value transfer-ownership="none">
  69860. <type name="none" c:type="void"/>
  69861. </return-value>
  69862. </callback>
  69863. </field>
  69864. <field name="_g_reserved4" introspectable="0">
  69865. <callback name="_g_reserved4">
  69866. <return-value transfer-ownership="none">
  69867. <type name="none" c:type="void"/>
  69868. </return-value>
  69869. </callback>
  69870. </field>
  69871. </record>
  69872. <enumeration name="SocketClientEvent"
  69873. version="2.32"
  69874. glib:type-name="GSocketClientEvent"
  69875. glib:get-type="g_socket_client_event_get_type"
  69876. c:type="GSocketClientEvent">
  69877. <doc xml:space="preserve">Describes an event occurring on a #GSocketClient. See the
  69878. #GSocketClient::event signal for more details.
  69879. Additional values may be added to this type in the future.</doc>
  69880. <member name="resolving"
  69881. value="0"
  69882. c:identifier="G_SOCKET_CLIENT_RESOLVING"
  69883. glib:nick="resolving">
  69884. <doc xml:space="preserve">The client is doing a DNS lookup.</doc>
  69885. </member>
  69886. <member name="resolved"
  69887. value="1"
  69888. c:identifier="G_SOCKET_CLIENT_RESOLVED"
  69889. glib:nick="resolved">
  69890. <doc xml:space="preserve">The client has completed a DNS lookup.</doc>
  69891. </member>
  69892. <member name="connecting"
  69893. value="2"
  69894. c:identifier="G_SOCKET_CLIENT_CONNECTING"
  69895. glib:nick="connecting">
  69896. <doc xml:space="preserve">The client is connecting to a remote
  69897. host (either a proxy or the destination server).</doc>
  69898. </member>
  69899. <member name="connected"
  69900. value="3"
  69901. c:identifier="G_SOCKET_CLIENT_CONNECTED"
  69902. glib:nick="connected">
  69903. <doc xml:space="preserve">The client has connected to a remote
  69904. host.</doc>
  69905. </member>
  69906. <member name="proxy_negotiating"
  69907. value="4"
  69908. c:identifier="G_SOCKET_CLIENT_PROXY_NEGOTIATING"
  69909. glib:nick="proxy-negotiating">
  69910. <doc xml:space="preserve">The client is negotiating
  69911. with a proxy to connect to the destination server.</doc>
  69912. </member>
  69913. <member name="proxy_negotiated"
  69914. value="5"
  69915. c:identifier="G_SOCKET_CLIENT_PROXY_NEGOTIATED"
  69916. glib:nick="proxy-negotiated">
  69917. <doc xml:space="preserve">The client has negotiated
  69918. with the proxy server.</doc>
  69919. </member>
  69920. <member name="tls_handshaking"
  69921. value="6"
  69922. c:identifier="G_SOCKET_CLIENT_TLS_HANDSHAKING"
  69923. glib:nick="tls-handshaking">
  69924. <doc xml:space="preserve">The client is performing a
  69925. TLS handshake.</doc>
  69926. </member>
  69927. <member name="tls_handshaked"
  69928. value="7"
  69929. c:identifier="G_SOCKET_CLIENT_TLS_HANDSHAKED"
  69930. glib:nick="tls-handshaked">
  69931. <doc xml:space="preserve">The client has performed a
  69932. TLS handshake.</doc>
  69933. </member>
  69934. <member name="complete"
  69935. value="8"
  69936. c:identifier="G_SOCKET_CLIENT_COMPLETE"
  69937. glib:nick="complete">
  69938. <doc xml:space="preserve">The client is done with a particular
  69939. #GSocketConnectable.</doc>
  69940. </member>
  69941. </enumeration>
  69942. <record name="SocketClientPrivate"
  69943. c:type="GSocketClientPrivate"
  69944. disguised="1">
  69945. </record>
  69946. <interface name="SocketConnectable"
  69947. c:symbol-prefix="socket_connectable"
  69948. c:type="GSocketConnectable"
  69949. glib:type-name="GSocketConnectable"
  69950. glib:get-type="g_socket_connectable_get_type"
  69951. glib:type-struct="SocketConnectableIface">
  69952. <doc xml:space="preserve">Objects that describe one or more potential socket endpoints
  69953. implement #GSocketConnectable. Callers can then use
  69954. g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
  69955. to try out each socket address in turn until one succeeds, as shown
  69956. in the sample code below.
  69957. |[&lt;!-- language="C" --&gt;
  69958. MyConnectionType *
  69959. connect_to_host (const char *hostname,
  69960. guint16 port,
  69961. GCancellable *cancellable,
  69962. GError **error)
  69963. {
  69964. MyConnection *conn = NULL;
  69965. GSocketConnectable *addr;
  69966. GSocketAddressEnumerator *enumerator;
  69967. GSocketAddress *sockaddr;
  69968. GError *conn_error = NULL;
  69969. addr = g_network_address_new (hostname, port);
  69970. enumerator = g_socket_connectable_enumerate (addr);
  69971. g_object_unref (addr);
  69972. // Try each sockaddr until we succeed. Record the first connection error,
  69973. // but not any further ones (since they'll probably be basically the same
  69974. // as the first).
  69975. while (!conn &amp;&amp; (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
  69976. {
  69977. conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &amp;conn_error);
  69978. g_object_unref (sockaddr);
  69979. }
  69980. g_object_unref (enumerator);
  69981. if (conn)
  69982. {
  69983. if (conn_error)
  69984. {
  69985. // We couldn't connect to the first address, but we succeeded
  69986. // in connecting to a later address.
  69987. g_error_free (conn_error);
  69988. }
  69989. return conn;
  69990. }
  69991. else if (error)
  69992. {
  69993. /// Either initial lookup failed, or else the caller cancelled us.
  69994. if (conn_error)
  69995. g_error_free (conn_error);
  69996. return NULL;
  69997. }
  69998. else
  69999. {
  70000. g_error_propagate (error, conn_error);
  70001. return NULL;
  70002. }
  70003. }
  70004. ]|</doc>
  70005. <virtual-method name="enumerate" invoker="enumerate" version="2.22">
  70006. <doc xml:space="preserve">Creates a #GSocketAddressEnumerator for @connectable.</doc>
  70007. <return-value transfer-ownership="full">
  70008. <doc xml:space="preserve">a new #GSocketAddressEnumerator.</doc>
  70009. <type name="SocketAddressEnumerator"
  70010. c:type="GSocketAddressEnumerator*"/>
  70011. </return-value>
  70012. <parameters>
  70013. <instance-parameter name="connectable" transfer-ownership="none">
  70014. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70015. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70016. </instance-parameter>
  70017. </parameters>
  70018. </virtual-method>
  70019. <virtual-method name="proxy_enumerate"
  70020. invoker="proxy_enumerate"
  70021. version="2.26">
  70022. <doc xml:space="preserve">Creates a #GSocketAddressEnumerator for @connectable that will
  70023. return #GProxyAddresses for addresses that you must connect
  70024. to via a proxy.
  70025. If @connectable does not implement
  70026. g_socket_connectable_proxy_enumerate(), this will fall back to
  70027. calling g_socket_connectable_enumerate().</doc>
  70028. <return-value transfer-ownership="full">
  70029. <doc xml:space="preserve">a new #GSocketAddressEnumerator.</doc>
  70030. <type name="SocketAddressEnumerator"
  70031. c:type="GSocketAddressEnumerator*"/>
  70032. </return-value>
  70033. <parameters>
  70034. <instance-parameter name="connectable" transfer-ownership="none">
  70035. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70036. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70037. </instance-parameter>
  70038. </parameters>
  70039. </virtual-method>
  70040. <virtual-method name="to_string" invoker="to_string" version="2.48">
  70041. <doc xml:space="preserve">Format a #GSocketConnectable as a string. This is a human-readable format for
  70042. use in debugging output, and is not a stable serialization format. It is not
  70043. suitable for use in user interfaces as it exposes too much information for a
  70044. user.
  70045. If the #GSocketConnectable implementation does not support string formatting,
  70046. the implementation’s type name will be returned as a fallback.</doc>
  70047. <return-value transfer-ownership="full">
  70048. <doc xml:space="preserve">the formatted string</doc>
  70049. <type name="utf8" c:type="gchar*"/>
  70050. </return-value>
  70051. <parameters>
  70052. <instance-parameter name="connectable" transfer-ownership="none">
  70053. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70054. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70055. </instance-parameter>
  70056. </parameters>
  70057. </virtual-method>
  70058. <method name="enumerate"
  70059. c:identifier="g_socket_connectable_enumerate"
  70060. version="2.22">
  70061. <doc xml:space="preserve">Creates a #GSocketAddressEnumerator for @connectable.</doc>
  70062. <return-value transfer-ownership="full">
  70063. <doc xml:space="preserve">a new #GSocketAddressEnumerator.</doc>
  70064. <type name="SocketAddressEnumerator"
  70065. c:type="GSocketAddressEnumerator*"/>
  70066. </return-value>
  70067. <parameters>
  70068. <instance-parameter name="connectable" transfer-ownership="none">
  70069. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70070. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70071. </instance-parameter>
  70072. </parameters>
  70073. </method>
  70074. <method name="proxy_enumerate"
  70075. c:identifier="g_socket_connectable_proxy_enumerate"
  70076. version="2.26">
  70077. <doc xml:space="preserve">Creates a #GSocketAddressEnumerator for @connectable that will
  70078. return #GProxyAddresses for addresses that you must connect
  70079. to via a proxy.
  70080. If @connectable does not implement
  70081. g_socket_connectable_proxy_enumerate(), this will fall back to
  70082. calling g_socket_connectable_enumerate().</doc>
  70083. <return-value transfer-ownership="full">
  70084. <doc xml:space="preserve">a new #GSocketAddressEnumerator.</doc>
  70085. <type name="SocketAddressEnumerator"
  70086. c:type="GSocketAddressEnumerator*"/>
  70087. </return-value>
  70088. <parameters>
  70089. <instance-parameter name="connectable" transfer-ownership="none">
  70090. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70091. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70092. </instance-parameter>
  70093. </parameters>
  70094. </method>
  70095. <method name="to_string"
  70096. c:identifier="g_socket_connectable_to_string"
  70097. version="2.48">
  70098. <doc xml:space="preserve">Format a #GSocketConnectable as a string. This is a human-readable format for
  70099. use in debugging output, and is not a stable serialization format. It is not
  70100. suitable for use in user interfaces as it exposes too much information for a
  70101. user.
  70102. If the #GSocketConnectable implementation does not support string formatting,
  70103. the implementation’s type name will be returned as a fallback.</doc>
  70104. <return-value transfer-ownership="full">
  70105. <doc xml:space="preserve">the formatted string</doc>
  70106. <type name="utf8" c:type="gchar*"/>
  70107. </return-value>
  70108. <parameters>
  70109. <instance-parameter name="connectable" transfer-ownership="none">
  70110. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70111. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70112. </instance-parameter>
  70113. </parameters>
  70114. </method>
  70115. </interface>
  70116. <record name="SocketConnectableIface"
  70117. c:type="GSocketConnectableIface"
  70118. glib:is-gtype-struct-for="SocketConnectable">
  70119. <doc xml:space="preserve">Provides an interface for returning a #GSocketAddressEnumerator
  70120. and #GProxyAddressEnumerator</doc>
  70121. <field name="g_iface">
  70122. <doc xml:space="preserve">The parent interface.</doc>
  70123. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  70124. </field>
  70125. <field name="enumerate">
  70126. <callback name="enumerate">
  70127. <return-value transfer-ownership="full">
  70128. <doc xml:space="preserve">a new #GSocketAddressEnumerator.</doc>
  70129. <type name="SocketAddressEnumerator"
  70130. c:type="GSocketAddressEnumerator*"/>
  70131. </return-value>
  70132. <parameters>
  70133. <parameter name="connectable" transfer-ownership="none">
  70134. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70135. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70136. </parameter>
  70137. </parameters>
  70138. </callback>
  70139. </field>
  70140. <field name="proxy_enumerate">
  70141. <callback name="proxy_enumerate">
  70142. <return-value transfer-ownership="full">
  70143. <doc xml:space="preserve">a new #GSocketAddressEnumerator.</doc>
  70144. <type name="SocketAddressEnumerator"
  70145. c:type="GSocketAddressEnumerator*"/>
  70146. </return-value>
  70147. <parameters>
  70148. <parameter name="connectable" transfer-ownership="none">
  70149. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70150. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70151. </parameter>
  70152. </parameters>
  70153. </callback>
  70154. </field>
  70155. <field name="to_string">
  70156. <callback name="to_string">
  70157. <return-value transfer-ownership="full">
  70158. <doc xml:space="preserve">the formatted string</doc>
  70159. <type name="utf8" c:type="gchar*"/>
  70160. </return-value>
  70161. <parameters>
  70162. <parameter name="connectable" transfer-ownership="none">
  70163. <doc xml:space="preserve">a #GSocketConnectable</doc>
  70164. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  70165. </parameter>
  70166. </parameters>
  70167. </callback>
  70168. </field>
  70169. </record>
  70170. <class name="SocketConnection"
  70171. c:symbol-prefix="socket_connection"
  70172. c:type="GSocketConnection"
  70173. version="2.22"
  70174. parent="IOStream"
  70175. glib:type-name="GSocketConnection"
  70176. glib:get-type="g_socket_connection_get_type"
  70177. glib:type-struct="SocketConnectionClass">
  70178. <doc xml:space="preserve">#GSocketConnection is a #GIOStream for a connected socket. They
  70179. can be created either by #GSocketClient when connecting to a host,
  70180. or by #GSocketListener when accepting a new client.
  70181. The type of the #GSocketConnection object returned from these calls
  70182. depends on the type of the underlying socket that is in use. For
  70183. instance, for a TCP/IP connection it will be a #GTcpConnection.
  70184. Choosing what type of object to construct is done with the socket
  70185. connection factory, and it is possible for 3rd parties to register
  70186. custom socket connection types for specific combination of socket
  70187. family/type/protocol using g_socket_connection_factory_register_type().
  70188. To close a #GSocketConnection, use g_io_stream_close(). Closing both
  70189. substreams of the #GIOStream separately will not close the underlying
  70190. #GSocket.</doc>
  70191. <function name="factory_lookup_type"
  70192. c:identifier="g_socket_connection_factory_lookup_type"
  70193. version="2.22">
  70194. <doc xml:space="preserve">Looks up the #GType to be used when creating socket connections on
  70195. sockets with the specified @family, @type and @protocol_id.
  70196. If no type is registered, the #GSocketConnection base type is returned.</doc>
  70197. <return-value transfer-ownership="none">
  70198. <doc xml:space="preserve">a #GType</doc>
  70199. <type name="GType" c:type="GType"/>
  70200. </return-value>
  70201. <parameters>
  70202. <parameter name="family" transfer-ownership="none">
  70203. <doc xml:space="preserve">a #GSocketFamily</doc>
  70204. <type name="SocketFamily" c:type="GSocketFamily"/>
  70205. </parameter>
  70206. <parameter name="type" transfer-ownership="none">
  70207. <doc xml:space="preserve">a #GSocketType</doc>
  70208. <type name="SocketType" c:type="GSocketType"/>
  70209. </parameter>
  70210. <parameter name="protocol_id" transfer-ownership="none">
  70211. <doc xml:space="preserve">a protocol id</doc>
  70212. <type name="gint" c:type="gint"/>
  70213. </parameter>
  70214. </parameters>
  70215. </function>
  70216. <function name="factory_register_type"
  70217. c:identifier="g_socket_connection_factory_register_type"
  70218. version="2.22">
  70219. <doc xml:space="preserve">Looks up the #GType to be used when creating socket connections on
  70220. sockets with the specified @family, @type and @protocol.
  70221. If no type is registered, the #GSocketConnection base type is returned.</doc>
  70222. <return-value transfer-ownership="none">
  70223. <type name="none" c:type="void"/>
  70224. </return-value>
  70225. <parameters>
  70226. <parameter name="g_type" transfer-ownership="none">
  70227. <doc xml:space="preserve">a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION</doc>
  70228. <type name="GType" c:type="GType"/>
  70229. </parameter>
  70230. <parameter name="family" transfer-ownership="none">
  70231. <doc xml:space="preserve">a #GSocketFamily</doc>
  70232. <type name="SocketFamily" c:type="GSocketFamily"/>
  70233. </parameter>
  70234. <parameter name="type" transfer-ownership="none">
  70235. <doc xml:space="preserve">a #GSocketType</doc>
  70236. <type name="SocketType" c:type="GSocketType"/>
  70237. </parameter>
  70238. <parameter name="protocol" transfer-ownership="none">
  70239. <doc xml:space="preserve">a protocol id</doc>
  70240. <type name="gint" c:type="gint"/>
  70241. </parameter>
  70242. </parameters>
  70243. </function>
  70244. <method name="connect"
  70245. c:identifier="g_socket_connection_connect"
  70246. version="2.32"
  70247. throws="1">
  70248. <doc xml:space="preserve">Connect @connection to the specified remote address.</doc>
  70249. <return-value transfer-ownership="none">
  70250. <doc xml:space="preserve">%TRUE if the connection succeeded, %FALSE on error</doc>
  70251. <type name="gboolean" c:type="gboolean"/>
  70252. </return-value>
  70253. <parameters>
  70254. <instance-parameter name="connection" transfer-ownership="none">
  70255. <doc xml:space="preserve">a #GSocketConnection</doc>
  70256. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70257. </instance-parameter>
  70258. <parameter name="address" transfer-ownership="none">
  70259. <doc xml:space="preserve">a #GSocketAddress specifying the remote address.</doc>
  70260. <type name="SocketAddress" c:type="GSocketAddress*"/>
  70261. </parameter>
  70262. <parameter name="cancellable"
  70263. transfer-ownership="none"
  70264. nullable="1"
  70265. allow-none="1">
  70266. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  70267. <type name="Cancellable" c:type="GCancellable*"/>
  70268. </parameter>
  70269. </parameters>
  70270. </method>
  70271. <method name="connect_async"
  70272. c:identifier="g_socket_connection_connect_async"
  70273. version="2.32">
  70274. <doc xml:space="preserve">Asynchronously connect @connection to the specified remote address.
  70275. This clears the #GSocket:blocking flag on @connection's underlying
  70276. socket if it is currently set.
  70277. Use g_socket_connection_connect_finish() to retrieve the result.</doc>
  70278. <return-value transfer-ownership="none">
  70279. <type name="none" c:type="void"/>
  70280. </return-value>
  70281. <parameters>
  70282. <instance-parameter name="connection" transfer-ownership="none">
  70283. <doc xml:space="preserve">a #GSocketConnection</doc>
  70284. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70285. </instance-parameter>
  70286. <parameter name="address" transfer-ownership="none">
  70287. <doc xml:space="preserve">a #GSocketAddress specifying the remote address.</doc>
  70288. <type name="SocketAddress" c:type="GSocketAddress*"/>
  70289. </parameter>
  70290. <parameter name="cancellable"
  70291. transfer-ownership="none"
  70292. nullable="1"
  70293. allow-none="1">
  70294. <doc xml:space="preserve">a %GCancellable or %NULL</doc>
  70295. <type name="Cancellable" c:type="GCancellable*"/>
  70296. </parameter>
  70297. <parameter name="callback"
  70298. transfer-ownership="none"
  70299. nullable="1"
  70300. allow-none="1"
  70301. scope="async"
  70302. closure="3">
  70303. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  70304. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  70305. </parameter>
  70306. <parameter name="user_data"
  70307. transfer-ownership="none"
  70308. nullable="1"
  70309. allow-none="1">
  70310. <doc xml:space="preserve">user data for the callback</doc>
  70311. <type name="gpointer" c:type="gpointer"/>
  70312. </parameter>
  70313. </parameters>
  70314. </method>
  70315. <method name="connect_finish"
  70316. c:identifier="g_socket_connection_connect_finish"
  70317. version="2.32"
  70318. throws="1">
  70319. <doc xml:space="preserve">Gets the result of a g_socket_connection_connect_async() call.</doc>
  70320. <return-value transfer-ownership="none">
  70321. <doc xml:space="preserve">%TRUE if the connection succeeded, %FALSE on error</doc>
  70322. <type name="gboolean" c:type="gboolean"/>
  70323. </return-value>
  70324. <parameters>
  70325. <instance-parameter name="connection" transfer-ownership="none">
  70326. <doc xml:space="preserve">a #GSocketConnection</doc>
  70327. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70328. </instance-parameter>
  70329. <parameter name="result" transfer-ownership="none">
  70330. <doc xml:space="preserve">the #GAsyncResult</doc>
  70331. <type name="AsyncResult" c:type="GAsyncResult*"/>
  70332. </parameter>
  70333. </parameters>
  70334. </method>
  70335. <method name="get_local_address"
  70336. c:identifier="g_socket_connection_get_local_address"
  70337. version="2.22"
  70338. throws="1">
  70339. <doc xml:space="preserve">Try to get the local address of a socket connection.</doc>
  70340. <return-value transfer-ownership="full">
  70341. <doc xml:space="preserve">a #GSocketAddress or %NULL on error.
  70342. Free the returned object with g_object_unref().</doc>
  70343. <type name="SocketAddress" c:type="GSocketAddress*"/>
  70344. </return-value>
  70345. <parameters>
  70346. <instance-parameter name="connection" transfer-ownership="none">
  70347. <doc xml:space="preserve">a #GSocketConnection</doc>
  70348. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70349. </instance-parameter>
  70350. </parameters>
  70351. </method>
  70352. <method name="get_remote_address"
  70353. c:identifier="g_socket_connection_get_remote_address"
  70354. version="2.22"
  70355. throws="1">
  70356. <doc xml:space="preserve">Try to get the remote address of a socket connection.
  70357. Since GLib 2.40, when used with g_socket_client_connect() or
  70358. g_socket_client_connect_async(), during emission of
  70359. %G_SOCKET_CLIENT_CONNECTING, this function will return the remote
  70360. address that will be used for the connection. This allows
  70361. applications to print e.g. "Connecting to example.com
  70362. (10.42.77.3)...".</doc>
  70363. <return-value transfer-ownership="full">
  70364. <doc xml:space="preserve">a #GSocketAddress or %NULL on error.
  70365. Free the returned object with g_object_unref().</doc>
  70366. <type name="SocketAddress" c:type="GSocketAddress*"/>
  70367. </return-value>
  70368. <parameters>
  70369. <instance-parameter name="connection" transfer-ownership="none">
  70370. <doc xml:space="preserve">a #GSocketConnection</doc>
  70371. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70372. </instance-parameter>
  70373. </parameters>
  70374. </method>
  70375. <method name="get_socket"
  70376. c:identifier="g_socket_connection_get_socket"
  70377. version="2.22">
  70378. <doc xml:space="preserve">Gets the underlying #GSocket object of the connection.
  70379. This can be useful if you want to do something unusual on it
  70380. not supported by the #GSocketConnection APIs.</doc>
  70381. <return-value transfer-ownership="none">
  70382. <doc xml:space="preserve">a #GSocket or %NULL on error.</doc>
  70383. <type name="Socket" c:type="GSocket*"/>
  70384. </return-value>
  70385. <parameters>
  70386. <instance-parameter name="connection" transfer-ownership="none">
  70387. <doc xml:space="preserve">a #GSocketConnection</doc>
  70388. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70389. </instance-parameter>
  70390. </parameters>
  70391. </method>
  70392. <method name="is_connected"
  70393. c:identifier="g_socket_connection_is_connected"
  70394. version="2.32">
  70395. <doc xml:space="preserve">Checks if @connection is connected. This is equivalent to calling
  70396. g_socket_is_connected() on @connection's underlying #GSocket.</doc>
  70397. <return-value transfer-ownership="none">
  70398. <doc xml:space="preserve">whether @connection is connected</doc>
  70399. <type name="gboolean" c:type="gboolean"/>
  70400. </return-value>
  70401. <parameters>
  70402. <instance-parameter name="connection" transfer-ownership="none">
  70403. <doc xml:space="preserve">a #GSocketConnection</doc>
  70404. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70405. </instance-parameter>
  70406. </parameters>
  70407. </method>
  70408. <property name="socket"
  70409. writable="1"
  70410. construct-only="1"
  70411. transfer-ownership="none">
  70412. <type name="Socket"/>
  70413. </property>
  70414. <field name="parent_instance">
  70415. <type name="IOStream" c:type="GIOStream"/>
  70416. </field>
  70417. <field name="priv">
  70418. <type name="SocketConnectionPrivate"
  70419. c:type="GSocketConnectionPrivate*"/>
  70420. </field>
  70421. </class>
  70422. <record name="SocketConnectionClass"
  70423. c:type="GSocketConnectionClass"
  70424. glib:is-gtype-struct-for="SocketConnection">
  70425. <field name="parent_class">
  70426. <type name="IOStreamClass" c:type="GIOStreamClass"/>
  70427. </field>
  70428. <field name="_g_reserved1" introspectable="0">
  70429. <callback name="_g_reserved1">
  70430. <return-value transfer-ownership="none">
  70431. <type name="none" c:type="void"/>
  70432. </return-value>
  70433. </callback>
  70434. </field>
  70435. <field name="_g_reserved2" introspectable="0">
  70436. <callback name="_g_reserved2">
  70437. <return-value transfer-ownership="none">
  70438. <type name="none" c:type="void"/>
  70439. </return-value>
  70440. </callback>
  70441. </field>
  70442. <field name="_g_reserved3" introspectable="0">
  70443. <callback name="_g_reserved3">
  70444. <return-value transfer-ownership="none">
  70445. <type name="none" c:type="void"/>
  70446. </return-value>
  70447. </callback>
  70448. </field>
  70449. <field name="_g_reserved4" introspectable="0">
  70450. <callback name="_g_reserved4">
  70451. <return-value transfer-ownership="none">
  70452. <type name="none" c:type="void"/>
  70453. </return-value>
  70454. </callback>
  70455. </field>
  70456. <field name="_g_reserved5" introspectable="0">
  70457. <callback name="_g_reserved5">
  70458. <return-value transfer-ownership="none">
  70459. <type name="none" c:type="void"/>
  70460. </return-value>
  70461. </callback>
  70462. </field>
  70463. <field name="_g_reserved6" introspectable="0">
  70464. <callback name="_g_reserved6">
  70465. <return-value transfer-ownership="none">
  70466. <type name="none" c:type="void"/>
  70467. </return-value>
  70468. </callback>
  70469. </field>
  70470. </record>
  70471. <record name="SocketConnectionPrivate"
  70472. c:type="GSocketConnectionPrivate"
  70473. disguised="1">
  70474. </record>
  70475. <class name="SocketControlMessage"
  70476. c:symbol-prefix="socket_control_message"
  70477. c:type="GSocketControlMessage"
  70478. parent="GObject.Object"
  70479. abstract="1"
  70480. glib:type-name="GSocketControlMessage"
  70481. glib:get-type="g_socket_control_message_get_type"
  70482. glib:type-struct="SocketControlMessageClass">
  70483. <doc xml:space="preserve">A #GSocketControlMessage is a special-purpose utility message that
  70484. can be sent to or received from a #GSocket. These types of
  70485. messages are often called "ancillary data".
  70486. The message can represent some sort of special instruction to or
  70487. information from the socket or can represent a special kind of
  70488. transfer to the peer (for example, sending a file descriptor over
  70489. a UNIX socket).
  70490. These messages are sent with g_socket_send_message() and received
  70491. with g_socket_receive_message().
  70492. To extend the set of control message that can be sent, subclass this
  70493. class and override the get_size, get_level, get_type and serialize
  70494. methods.
  70495. To extend the set of control messages that can be received, subclass
  70496. this class and implement the deserialize method. Also, make sure your
  70497. class is registered with the GType typesystem before calling
  70498. g_socket_receive_message() to read such a message.</doc>
  70499. <function name="deserialize"
  70500. c:identifier="g_socket_control_message_deserialize"
  70501. version="2.22">
  70502. <doc xml:space="preserve">Tries to deserialize a socket control message of a given
  70503. @level and @type. This will ask all known (to GType) subclasses
  70504. of #GSocketControlMessage if they can understand this kind
  70505. of message and if so deserialize it into a #GSocketControlMessage.
  70506. If there is no implementation for this kind of control message, %NULL
  70507. will be returned.</doc>
  70508. <return-value transfer-ownership="full">
  70509. <doc xml:space="preserve">the deserialized message or %NULL</doc>
  70510. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70511. </return-value>
  70512. <parameters>
  70513. <parameter name="level" transfer-ownership="none">
  70514. <doc xml:space="preserve">a socket level</doc>
  70515. <type name="gint" c:type="int"/>
  70516. </parameter>
  70517. <parameter name="type" transfer-ownership="none">
  70518. <doc xml:space="preserve">a socket control message type for the given @level</doc>
  70519. <type name="gint" c:type="int"/>
  70520. </parameter>
  70521. <parameter name="size" transfer-ownership="none">
  70522. <doc xml:space="preserve">the size of the data in bytes</doc>
  70523. <type name="gsize" c:type="gsize"/>
  70524. </parameter>
  70525. <parameter name="data" transfer-ownership="none">
  70526. <doc xml:space="preserve">pointer to the message data</doc>
  70527. <array length="2" zero-terminated="0" c:type="gpointer">
  70528. <type name="guint8"/>
  70529. </array>
  70530. </parameter>
  70531. </parameters>
  70532. </function>
  70533. <virtual-method name="get_level" invoker="get_level" version="2.22">
  70534. <doc xml:space="preserve">Returns the "level" (i.e. the originating protocol) of the control message.
  70535. This is often SOL_SOCKET.</doc>
  70536. <return-value transfer-ownership="none">
  70537. <doc xml:space="preserve">an integer describing the level</doc>
  70538. <type name="gint" c:type="int"/>
  70539. </return-value>
  70540. <parameters>
  70541. <instance-parameter name="message" transfer-ownership="none">
  70542. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70543. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70544. </instance-parameter>
  70545. </parameters>
  70546. </virtual-method>
  70547. <virtual-method name="get_size" invoker="get_size" version="2.22">
  70548. <doc xml:space="preserve">Returns the space required for the control message, not including
  70549. headers or alignment.</doc>
  70550. <return-value transfer-ownership="none">
  70551. <doc xml:space="preserve">The number of bytes required.</doc>
  70552. <type name="gsize" c:type="gsize"/>
  70553. </return-value>
  70554. <parameters>
  70555. <instance-parameter name="message" transfer-ownership="none">
  70556. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70557. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70558. </instance-parameter>
  70559. </parameters>
  70560. </virtual-method>
  70561. <virtual-method name="get_type">
  70562. <return-value transfer-ownership="none">
  70563. <type name="gint" c:type="int"/>
  70564. </return-value>
  70565. <parameters>
  70566. <instance-parameter name="message" transfer-ownership="none">
  70567. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70568. </instance-parameter>
  70569. </parameters>
  70570. </virtual-method>
  70571. <virtual-method name="serialize" invoker="serialize" version="2.22">
  70572. <doc xml:space="preserve">Converts the data in the message to bytes placed in the
  70573. message.
  70574. @data is guaranteed to have enough space to fit the size
  70575. returned by g_socket_control_message_get_size() on this
  70576. object.</doc>
  70577. <return-value transfer-ownership="none">
  70578. <type name="none" c:type="void"/>
  70579. </return-value>
  70580. <parameters>
  70581. <instance-parameter name="message" transfer-ownership="none">
  70582. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70583. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70584. </instance-parameter>
  70585. <parameter name="data" transfer-ownership="none">
  70586. <doc xml:space="preserve">A buffer to write data to</doc>
  70587. <type name="gpointer" c:type="gpointer"/>
  70588. </parameter>
  70589. </parameters>
  70590. </virtual-method>
  70591. <method name="get_level"
  70592. c:identifier="g_socket_control_message_get_level"
  70593. version="2.22">
  70594. <doc xml:space="preserve">Returns the "level" (i.e. the originating protocol) of the control message.
  70595. This is often SOL_SOCKET.</doc>
  70596. <return-value transfer-ownership="none">
  70597. <doc xml:space="preserve">an integer describing the level</doc>
  70598. <type name="gint" c:type="int"/>
  70599. </return-value>
  70600. <parameters>
  70601. <instance-parameter name="message" transfer-ownership="none">
  70602. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70603. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70604. </instance-parameter>
  70605. </parameters>
  70606. </method>
  70607. <method name="get_msg_type"
  70608. c:identifier="g_socket_control_message_get_msg_type"
  70609. version="2.22">
  70610. <doc xml:space="preserve">Returns the protocol specific type of the control message.
  70611. For instance, for UNIX fd passing this would be SCM_RIGHTS.</doc>
  70612. <return-value transfer-ownership="none">
  70613. <doc xml:space="preserve">an integer describing the type of control message</doc>
  70614. <type name="gint" c:type="int"/>
  70615. </return-value>
  70616. <parameters>
  70617. <instance-parameter name="message" transfer-ownership="none">
  70618. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70619. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70620. </instance-parameter>
  70621. </parameters>
  70622. </method>
  70623. <method name="get_size"
  70624. c:identifier="g_socket_control_message_get_size"
  70625. version="2.22">
  70626. <doc xml:space="preserve">Returns the space required for the control message, not including
  70627. headers or alignment.</doc>
  70628. <return-value transfer-ownership="none">
  70629. <doc xml:space="preserve">The number of bytes required.</doc>
  70630. <type name="gsize" c:type="gsize"/>
  70631. </return-value>
  70632. <parameters>
  70633. <instance-parameter name="message" transfer-ownership="none">
  70634. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70635. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70636. </instance-parameter>
  70637. </parameters>
  70638. </method>
  70639. <method name="serialize"
  70640. c:identifier="g_socket_control_message_serialize"
  70641. version="2.22">
  70642. <doc xml:space="preserve">Converts the data in the message to bytes placed in the
  70643. message.
  70644. @data is guaranteed to have enough space to fit the size
  70645. returned by g_socket_control_message_get_size() on this
  70646. object.</doc>
  70647. <return-value transfer-ownership="none">
  70648. <type name="none" c:type="void"/>
  70649. </return-value>
  70650. <parameters>
  70651. <instance-parameter name="message" transfer-ownership="none">
  70652. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70653. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70654. </instance-parameter>
  70655. <parameter name="data" transfer-ownership="none">
  70656. <doc xml:space="preserve">A buffer to write data to</doc>
  70657. <type name="gpointer" c:type="gpointer"/>
  70658. </parameter>
  70659. </parameters>
  70660. </method>
  70661. <field name="parent_instance">
  70662. <type name="GObject.Object" c:type="GObject"/>
  70663. </field>
  70664. <field name="priv">
  70665. <type name="SocketControlMessagePrivate"
  70666. c:type="GSocketControlMessagePrivate*"/>
  70667. </field>
  70668. </class>
  70669. <record name="SocketControlMessageClass"
  70670. c:type="GSocketControlMessageClass"
  70671. glib:is-gtype-struct-for="SocketControlMessage">
  70672. <doc xml:space="preserve">Class structure for #GSocketControlMessage.</doc>
  70673. <field name="parent_class">
  70674. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  70675. </field>
  70676. <field name="get_size">
  70677. <callback name="get_size">
  70678. <return-value transfer-ownership="none">
  70679. <doc xml:space="preserve">The number of bytes required.</doc>
  70680. <type name="gsize" c:type="gsize"/>
  70681. </return-value>
  70682. <parameters>
  70683. <parameter name="message" transfer-ownership="none">
  70684. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70685. <type name="SocketControlMessage"
  70686. c:type="GSocketControlMessage*"/>
  70687. </parameter>
  70688. </parameters>
  70689. </callback>
  70690. </field>
  70691. <field name="get_level">
  70692. <callback name="get_level">
  70693. <return-value transfer-ownership="none">
  70694. <doc xml:space="preserve">an integer describing the level</doc>
  70695. <type name="gint" c:type="int"/>
  70696. </return-value>
  70697. <parameters>
  70698. <parameter name="message" transfer-ownership="none">
  70699. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70700. <type name="SocketControlMessage"
  70701. c:type="GSocketControlMessage*"/>
  70702. </parameter>
  70703. </parameters>
  70704. </callback>
  70705. </field>
  70706. <field name="get_type">
  70707. <callback name="get_type">
  70708. <return-value transfer-ownership="none">
  70709. <type name="gint" c:type="int"/>
  70710. </return-value>
  70711. <parameters>
  70712. <parameter name="message" transfer-ownership="none">
  70713. <type name="SocketControlMessage"
  70714. c:type="GSocketControlMessage*"/>
  70715. </parameter>
  70716. </parameters>
  70717. </callback>
  70718. </field>
  70719. <field name="serialize">
  70720. <callback name="serialize">
  70721. <return-value transfer-ownership="none">
  70722. <type name="none" c:type="void"/>
  70723. </return-value>
  70724. <parameters>
  70725. <parameter name="message" transfer-ownership="none">
  70726. <doc xml:space="preserve">a #GSocketControlMessage</doc>
  70727. <type name="SocketControlMessage"
  70728. c:type="GSocketControlMessage*"/>
  70729. </parameter>
  70730. <parameter name="data" transfer-ownership="none">
  70731. <doc xml:space="preserve">A buffer to write data to</doc>
  70732. <type name="gpointer" c:type="gpointer"/>
  70733. </parameter>
  70734. </parameters>
  70735. </callback>
  70736. </field>
  70737. <field name="deserialize" introspectable="0">
  70738. <callback name="deserialize" introspectable="0">
  70739. <return-value>
  70740. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  70741. </return-value>
  70742. <parameters>
  70743. <parameter name="level" transfer-ownership="none">
  70744. <type name="gint" c:type="int"/>
  70745. </parameter>
  70746. <parameter name="type" transfer-ownership="none">
  70747. <type name="gint" c:type="int"/>
  70748. </parameter>
  70749. <parameter name="size" transfer-ownership="none">
  70750. <type name="gsize" c:type="gsize"/>
  70751. </parameter>
  70752. <parameter name="data" transfer-ownership="none">
  70753. <type name="gpointer" c:type="gpointer"/>
  70754. </parameter>
  70755. </parameters>
  70756. </callback>
  70757. </field>
  70758. <field name="_g_reserved1" introspectable="0">
  70759. <callback name="_g_reserved1">
  70760. <return-value transfer-ownership="none">
  70761. <type name="none" c:type="void"/>
  70762. </return-value>
  70763. </callback>
  70764. </field>
  70765. <field name="_g_reserved2" introspectable="0">
  70766. <callback name="_g_reserved2">
  70767. <return-value transfer-ownership="none">
  70768. <type name="none" c:type="void"/>
  70769. </return-value>
  70770. </callback>
  70771. </field>
  70772. <field name="_g_reserved3" introspectable="0">
  70773. <callback name="_g_reserved3">
  70774. <return-value transfer-ownership="none">
  70775. <type name="none" c:type="void"/>
  70776. </return-value>
  70777. </callback>
  70778. </field>
  70779. <field name="_g_reserved4" introspectable="0">
  70780. <callback name="_g_reserved4">
  70781. <return-value transfer-ownership="none">
  70782. <type name="none" c:type="void"/>
  70783. </return-value>
  70784. </callback>
  70785. </field>
  70786. <field name="_g_reserved5" introspectable="0">
  70787. <callback name="_g_reserved5">
  70788. <return-value transfer-ownership="none">
  70789. <type name="none" c:type="void"/>
  70790. </return-value>
  70791. </callback>
  70792. </field>
  70793. </record>
  70794. <record name="SocketControlMessagePrivate"
  70795. c:type="GSocketControlMessagePrivate"
  70796. disguised="1">
  70797. </record>
  70798. <enumeration name="SocketFamily"
  70799. version="2.22"
  70800. glib:type-name="GSocketFamily"
  70801. glib:get-type="g_socket_family_get_type"
  70802. c:type="GSocketFamily">
  70803. <doc xml:space="preserve">The protocol family of a #GSocketAddress. (These values are
  70804. identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
  70805. if available.)</doc>
  70806. <member name="invalid"
  70807. value="0"
  70808. c:identifier="G_SOCKET_FAMILY_INVALID"
  70809. glib:nick="invalid">
  70810. <doc xml:space="preserve">no address family</doc>
  70811. </member>
  70812. <member name="unix"
  70813. value="1"
  70814. c:identifier="G_SOCKET_FAMILY_UNIX"
  70815. glib:nick="unix">
  70816. <doc xml:space="preserve">the UNIX domain family</doc>
  70817. </member>
  70818. <member name="ipv4"
  70819. value="2"
  70820. c:identifier="G_SOCKET_FAMILY_IPV4"
  70821. glib:nick="ipv4">
  70822. <doc xml:space="preserve">the IPv4 family</doc>
  70823. </member>
  70824. <member name="ipv6"
  70825. value="10"
  70826. c:identifier="G_SOCKET_FAMILY_IPV6"
  70827. glib:nick="ipv6">
  70828. <doc xml:space="preserve">the IPv6 family</doc>
  70829. </member>
  70830. </enumeration>
  70831. <class name="SocketListener"
  70832. c:symbol-prefix="socket_listener"
  70833. c:type="GSocketListener"
  70834. version="2.22"
  70835. parent="GObject.Object"
  70836. glib:type-name="GSocketListener"
  70837. glib:get-type="g_socket_listener_get_type"
  70838. glib:type-struct="SocketListenerClass">
  70839. <doc xml:space="preserve">A #GSocketListener is an object that keeps track of a set
  70840. of server sockets and helps you accept sockets from any of the
  70841. socket, either sync or async.
  70842. If you want to implement a network server, also look at #GSocketService
  70843. and #GThreadedSocketService which are subclass of #GSocketListener
  70844. that makes this even easier.</doc>
  70845. <constructor name="new"
  70846. c:identifier="g_socket_listener_new"
  70847. version="2.22">
  70848. <doc xml:space="preserve">Creates a new #GSocketListener with no sockets to listen for.
  70849. New listeners can be added with e.g. g_socket_listener_add_address()
  70850. or g_socket_listener_add_inet_port().</doc>
  70851. <return-value transfer-ownership="full">
  70852. <doc xml:space="preserve">a new #GSocketListener.</doc>
  70853. <type name="SocketListener" c:type="GSocketListener*"/>
  70854. </return-value>
  70855. </constructor>
  70856. <virtual-method name="changed">
  70857. <return-value transfer-ownership="none">
  70858. <type name="none" c:type="void"/>
  70859. </return-value>
  70860. <parameters>
  70861. <instance-parameter name="listener" transfer-ownership="none">
  70862. <type name="SocketListener" c:type="GSocketListener*"/>
  70863. </instance-parameter>
  70864. </parameters>
  70865. </virtual-method>
  70866. <virtual-method name="event">
  70867. <return-value transfer-ownership="none">
  70868. <type name="none" c:type="void"/>
  70869. </return-value>
  70870. <parameters>
  70871. <instance-parameter name="listener" transfer-ownership="none">
  70872. <type name="SocketListener" c:type="GSocketListener*"/>
  70873. </instance-parameter>
  70874. <parameter name="event" transfer-ownership="none">
  70875. <type name="SocketListenerEvent" c:type="GSocketListenerEvent*"/>
  70876. </parameter>
  70877. <parameter name="socket" transfer-ownership="none">
  70878. <type name="Socket" c:type="GSocket*"/>
  70879. </parameter>
  70880. </parameters>
  70881. </virtual-method>
  70882. <method name="accept"
  70883. c:identifier="g_socket_listener_accept"
  70884. version="2.22"
  70885. throws="1">
  70886. <doc xml:space="preserve">Blocks waiting for a client to connect to any of the sockets added
  70887. to the listener. Returns a #GSocketConnection for the socket that was
  70888. accepted.
  70889. If @source_object is not %NULL it will be filled out with the source
  70890. object specified when the corresponding socket or address was added
  70891. to the listener.
  70892. If @cancellable is not %NULL, then the operation can be cancelled by
  70893. triggering the cancellable object from another thread. If the operation
  70894. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  70895. <return-value transfer-ownership="full">
  70896. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  70897. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70898. </return-value>
  70899. <parameters>
  70900. <instance-parameter name="listener" transfer-ownership="none">
  70901. <doc xml:space="preserve">a #GSocketListener</doc>
  70902. <type name="SocketListener" c:type="GSocketListener*"/>
  70903. </instance-parameter>
  70904. <parameter name="source_object"
  70905. direction="out"
  70906. caller-allocates="0"
  70907. transfer-ownership="none"
  70908. optional="1"
  70909. allow-none="1">
  70910. <doc xml:space="preserve">location where #GObject pointer will be stored, or %NULL</doc>
  70911. <type name="GObject.Object" c:type="GObject**"/>
  70912. </parameter>
  70913. <parameter name="cancellable"
  70914. transfer-ownership="none"
  70915. nullable="1"
  70916. allow-none="1">
  70917. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  70918. <type name="Cancellable" c:type="GCancellable*"/>
  70919. </parameter>
  70920. </parameters>
  70921. </method>
  70922. <method name="accept_async"
  70923. c:identifier="g_socket_listener_accept_async"
  70924. version="2.22">
  70925. <doc xml:space="preserve">This is the asynchronous version of g_socket_listener_accept().
  70926. When the operation is finished @callback will be
  70927. called. You can then call g_socket_listener_accept_socket()
  70928. to get the result of the operation.</doc>
  70929. <return-value transfer-ownership="none">
  70930. <type name="none" c:type="void"/>
  70931. </return-value>
  70932. <parameters>
  70933. <instance-parameter name="listener" transfer-ownership="none">
  70934. <doc xml:space="preserve">a #GSocketListener</doc>
  70935. <type name="SocketListener" c:type="GSocketListener*"/>
  70936. </instance-parameter>
  70937. <parameter name="cancellable"
  70938. transfer-ownership="none"
  70939. nullable="1"
  70940. allow-none="1">
  70941. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  70942. <type name="Cancellable" c:type="GCancellable*"/>
  70943. </parameter>
  70944. <parameter name="callback"
  70945. transfer-ownership="none"
  70946. nullable="1"
  70947. allow-none="1"
  70948. scope="async"
  70949. closure="2">
  70950. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  70951. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  70952. </parameter>
  70953. <parameter name="user_data"
  70954. transfer-ownership="none"
  70955. nullable="1"
  70956. allow-none="1">
  70957. <doc xml:space="preserve">user data for the callback</doc>
  70958. <type name="gpointer" c:type="gpointer"/>
  70959. </parameter>
  70960. </parameters>
  70961. </method>
  70962. <method name="accept_finish"
  70963. c:identifier="g_socket_listener_accept_finish"
  70964. version="2.22"
  70965. throws="1">
  70966. <doc xml:space="preserve">Finishes an async accept operation. See g_socket_listener_accept_async()</doc>
  70967. <return-value transfer-ownership="full">
  70968. <doc xml:space="preserve">a #GSocketConnection on success, %NULL on error.</doc>
  70969. <type name="SocketConnection" c:type="GSocketConnection*"/>
  70970. </return-value>
  70971. <parameters>
  70972. <instance-parameter name="listener" transfer-ownership="none">
  70973. <doc xml:space="preserve">a #GSocketListener</doc>
  70974. <type name="SocketListener" c:type="GSocketListener*"/>
  70975. </instance-parameter>
  70976. <parameter name="result" transfer-ownership="none">
  70977. <doc xml:space="preserve">a #GAsyncResult.</doc>
  70978. <type name="AsyncResult" c:type="GAsyncResult*"/>
  70979. </parameter>
  70980. <parameter name="source_object"
  70981. direction="out"
  70982. caller-allocates="0"
  70983. transfer-ownership="none"
  70984. optional="1"
  70985. allow-none="1">
  70986. <doc xml:space="preserve">Optional #GObject identifying this source</doc>
  70987. <type name="GObject.Object" c:type="GObject**"/>
  70988. </parameter>
  70989. </parameters>
  70990. </method>
  70991. <method name="accept_socket"
  70992. c:identifier="g_socket_listener_accept_socket"
  70993. version="2.22"
  70994. throws="1">
  70995. <doc xml:space="preserve">Blocks waiting for a client to connect to any of the sockets added
  70996. to the listener. Returns the #GSocket that was accepted.
  70997. If you want to accept the high-level #GSocketConnection, not a #GSocket,
  70998. which is often the case, then you should use g_socket_listener_accept()
  70999. instead.
  71000. If @source_object is not %NULL it will be filled out with the source
  71001. object specified when the corresponding socket or address was added
  71002. to the listener.
  71003. If @cancellable is not %NULL, then the operation can be cancelled by
  71004. triggering the cancellable object from another thread. If the operation
  71005. was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.</doc>
  71006. <return-value transfer-ownership="full">
  71007. <doc xml:space="preserve">a #GSocket on success, %NULL on error.</doc>
  71008. <type name="Socket" c:type="GSocket*"/>
  71009. </return-value>
  71010. <parameters>
  71011. <instance-parameter name="listener" transfer-ownership="none">
  71012. <doc xml:space="preserve">a #GSocketListener</doc>
  71013. <type name="SocketListener" c:type="GSocketListener*"/>
  71014. </instance-parameter>
  71015. <parameter name="source_object"
  71016. direction="out"
  71017. caller-allocates="0"
  71018. transfer-ownership="none"
  71019. optional="1"
  71020. allow-none="1">
  71021. <doc xml:space="preserve">location where #GObject pointer will be stored, or %NULL.</doc>
  71022. <type name="GObject.Object" c:type="GObject**"/>
  71023. </parameter>
  71024. <parameter name="cancellable"
  71025. transfer-ownership="none"
  71026. nullable="1"
  71027. allow-none="1">
  71028. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  71029. <type name="Cancellable" c:type="GCancellable*"/>
  71030. </parameter>
  71031. </parameters>
  71032. </method>
  71033. <method name="accept_socket_async"
  71034. c:identifier="g_socket_listener_accept_socket_async"
  71035. version="2.22">
  71036. <doc xml:space="preserve">This is the asynchronous version of g_socket_listener_accept_socket().
  71037. When the operation is finished @callback will be
  71038. called. You can then call g_socket_listener_accept_socket_finish()
  71039. to get the result of the operation.</doc>
  71040. <return-value transfer-ownership="none">
  71041. <type name="none" c:type="void"/>
  71042. </return-value>
  71043. <parameters>
  71044. <instance-parameter name="listener" transfer-ownership="none">
  71045. <doc xml:space="preserve">a #GSocketListener</doc>
  71046. <type name="SocketListener" c:type="GSocketListener*"/>
  71047. </instance-parameter>
  71048. <parameter name="cancellable"
  71049. transfer-ownership="none"
  71050. nullable="1"
  71051. allow-none="1">
  71052. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  71053. <type name="Cancellable" c:type="GCancellable*"/>
  71054. </parameter>
  71055. <parameter name="callback"
  71056. transfer-ownership="none"
  71057. nullable="1"
  71058. allow-none="1"
  71059. scope="async"
  71060. closure="2">
  71061. <doc xml:space="preserve">a #GAsyncReadyCallback</doc>
  71062. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  71063. </parameter>
  71064. <parameter name="user_data"
  71065. transfer-ownership="none"
  71066. nullable="1"
  71067. allow-none="1">
  71068. <doc xml:space="preserve">user data for the callback</doc>
  71069. <type name="gpointer" c:type="gpointer"/>
  71070. </parameter>
  71071. </parameters>
  71072. </method>
  71073. <method name="accept_socket_finish"
  71074. c:identifier="g_socket_listener_accept_socket_finish"
  71075. version="2.22"
  71076. throws="1">
  71077. <doc xml:space="preserve">Finishes an async accept operation. See g_socket_listener_accept_socket_async()</doc>
  71078. <return-value transfer-ownership="full">
  71079. <doc xml:space="preserve">a #GSocket on success, %NULL on error.</doc>
  71080. <type name="Socket" c:type="GSocket*"/>
  71081. </return-value>
  71082. <parameters>
  71083. <instance-parameter name="listener" transfer-ownership="none">
  71084. <doc xml:space="preserve">a #GSocketListener</doc>
  71085. <type name="SocketListener" c:type="GSocketListener*"/>
  71086. </instance-parameter>
  71087. <parameter name="result" transfer-ownership="none">
  71088. <doc xml:space="preserve">a #GAsyncResult.</doc>
  71089. <type name="AsyncResult" c:type="GAsyncResult*"/>
  71090. </parameter>
  71091. <parameter name="source_object"
  71092. direction="out"
  71093. caller-allocates="0"
  71094. transfer-ownership="none"
  71095. optional="1"
  71096. allow-none="1">
  71097. <doc xml:space="preserve">Optional #GObject identifying this source</doc>
  71098. <type name="GObject.Object" c:type="GObject**"/>
  71099. </parameter>
  71100. </parameters>
  71101. </method>
  71102. <method name="add_address"
  71103. c:identifier="g_socket_listener_add_address"
  71104. version="2.22"
  71105. throws="1">
  71106. <doc xml:space="preserve">Creates a socket of type @type and protocol @protocol, binds
  71107. it to @address and adds it to the set of sockets we're accepting
  71108. sockets from.
  71109. Note that adding an IPv6 address, depending on the platform,
  71110. may or may not result in a listener that also accepts IPv4
  71111. connections. For more deterministic behavior, see
  71112. g_socket_listener_add_inet_port().
  71113. @source_object will be passed out in the various calls
  71114. to accept to identify this particular source, which is
  71115. useful if you're listening on multiple addresses and do
  71116. different things depending on what address is connected to.
  71117. If successful and @effective_address is non-%NULL then it will
  71118. be set to the address that the binding actually occurred at. This
  71119. is helpful for determining the port number that was used for when
  71120. requesting a binding to port 0 (ie: "any port"). This address, if
  71121. requested, belongs to the caller and must be freed.</doc>
  71122. <return-value transfer-ownership="none">
  71123. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  71124. <type name="gboolean" c:type="gboolean"/>
  71125. </return-value>
  71126. <parameters>
  71127. <instance-parameter name="listener" transfer-ownership="none">
  71128. <doc xml:space="preserve">a #GSocketListener</doc>
  71129. <type name="SocketListener" c:type="GSocketListener*"/>
  71130. </instance-parameter>
  71131. <parameter name="address" transfer-ownership="none">
  71132. <doc xml:space="preserve">a #GSocketAddress</doc>
  71133. <type name="SocketAddress" c:type="GSocketAddress*"/>
  71134. </parameter>
  71135. <parameter name="type" transfer-ownership="none">
  71136. <doc xml:space="preserve">a #GSocketType</doc>
  71137. <type name="SocketType" c:type="GSocketType"/>
  71138. </parameter>
  71139. <parameter name="protocol" transfer-ownership="none">
  71140. <doc xml:space="preserve">a #GSocketProtocol</doc>
  71141. <type name="SocketProtocol" c:type="GSocketProtocol"/>
  71142. </parameter>
  71143. <parameter name="source_object"
  71144. transfer-ownership="none"
  71145. nullable="1"
  71146. allow-none="1">
  71147. <doc xml:space="preserve">Optional #GObject identifying this source</doc>
  71148. <type name="GObject.Object" c:type="GObject*"/>
  71149. </parameter>
  71150. <parameter name="effective_address"
  71151. direction="out"
  71152. caller-allocates="0"
  71153. transfer-ownership="full"
  71154. optional="1"
  71155. allow-none="1">
  71156. <doc xml:space="preserve">location to store the address that was bound to, or %NULL.</doc>
  71157. <type name="SocketAddress" c:type="GSocketAddress**"/>
  71158. </parameter>
  71159. </parameters>
  71160. </method>
  71161. <method name="add_any_inet_port"
  71162. c:identifier="g_socket_listener_add_any_inet_port"
  71163. version="2.24"
  71164. throws="1">
  71165. <doc xml:space="preserve">Listens for TCP connections on any available port number for both
  71166. IPv6 and IPv4 (if each is available).
  71167. This is useful if you need to have a socket for incoming connections
  71168. but don't care about the specific port number.
  71169. @source_object will be passed out in the various calls
  71170. to accept to identify this particular source, which is
  71171. useful if you're listening on multiple addresses and do
  71172. different things depending on what address is connected to.</doc>
  71173. <return-value transfer-ownership="none">
  71174. <doc xml:space="preserve">the port number, or 0 in case of failure.</doc>
  71175. <type name="guint16" c:type="guint16"/>
  71176. </return-value>
  71177. <parameters>
  71178. <instance-parameter name="listener" transfer-ownership="none">
  71179. <doc xml:space="preserve">a #GSocketListener</doc>
  71180. <type name="SocketListener" c:type="GSocketListener*"/>
  71181. </instance-parameter>
  71182. <parameter name="source_object"
  71183. transfer-ownership="none"
  71184. nullable="1"
  71185. allow-none="1">
  71186. <doc xml:space="preserve">Optional #GObject identifying this source</doc>
  71187. <type name="GObject.Object" c:type="GObject*"/>
  71188. </parameter>
  71189. </parameters>
  71190. </method>
  71191. <method name="add_inet_port"
  71192. c:identifier="g_socket_listener_add_inet_port"
  71193. version="2.22"
  71194. throws="1">
  71195. <doc xml:space="preserve">Helper function for g_socket_listener_add_address() that
  71196. creates a TCP/IP socket listening on IPv4 and IPv6 (if
  71197. supported) on the specified port on all interfaces.
  71198. @source_object will be passed out in the various calls
  71199. to accept to identify this particular source, which is
  71200. useful if you're listening on multiple addresses and do
  71201. different things depending on what address is connected to.</doc>
  71202. <return-value transfer-ownership="none">
  71203. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  71204. <type name="gboolean" c:type="gboolean"/>
  71205. </return-value>
  71206. <parameters>
  71207. <instance-parameter name="listener" transfer-ownership="none">
  71208. <doc xml:space="preserve">a #GSocketListener</doc>
  71209. <type name="SocketListener" c:type="GSocketListener*"/>
  71210. </instance-parameter>
  71211. <parameter name="port" transfer-ownership="none">
  71212. <doc xml:space="preserve">an IP port number (non-zero)</doc>
  71213. <type name="guint16" c:type="guint16"/>
  71214. </parameter>
  71215. <parameter name="source_object"
  71216. transfer-ownership="none"
  71217. nullable="1"
  71218. allow-none="1">
  71219. <doc xml:space="preserve">Optional #GObject identifying this source</doc>
  71220. <type name="GObject.Object" c:type="GObject*"/>
  71221. </parameter>
  71222. </parameters>
  71223. </method>
  71224. <method name="add_socket"
  71225. c:identifier="g_socket_listener_add_socket"
  71226. version="2.22"
  71227. throws="1">
  71228. <doc xml:space="preserve">Adds @socket to the set of sockets that we try to accept
  71229. new clients from. The socket must be bound to a local
  71230. address and listened to.
  71231. @source_object will be passed out in the various calls
  71232. to accept to identify this particular source, which is
  71233. useful if you're listening on multiple addresses and do
  71234. different things depending on what address is connected to.
  71235. The @socket will not be automatically closed when the @listener is finalized
  71236. unless the listener held the final reference to the socket. Before GLib 2.42,
  71237. the @socket was automatically closed on finalization of the @listener, even
  71238. if references to it were held elsewhere.</doc>
  71239. <return-value transfer-ownership="none">
  71240. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  71241. <type name="gboolean" c:type="gboolean"/>
  71242. </return-value>
  71243. <parameters>
  71244. <instance-parameter name="listener" transfer-ownership="none">
  71245. <doc xml:space="preserve">a #GSocketListener</doc>
  71246. <type name="SocketListener" c:type="GSocketListener*"/>
  71247. </instance-parameter>
  71248. <parameter name="socket" transfer-ownership="none">
  71249. <doc xml:space="preserve">a listening #GSocket</doc>
  71250. <type name="Socket" c:type="GSocket*"/>
  71251. </parameter>
  71252. <parameter name="source_object"
  71253. transfer-ownership="none"
  71254. nullable="1"
  71255. allow-none="1">
  71256. <doc xml:space="preserve">Optional #GObject identifying this source</doc>
  71257. <type name="GObject.Object" c:type="GObject*"/>
  71258. </parameter>
  71259. </parameters>
  71260. </method>
  71261. <method name="close"
  71262. c:identifier="g_socket_listener_close"
  71263. version="2.22">
  71264. <doc xml:space="preserve">Closes all the sockets in the listener.</doc>
  71265. <return-value transfer-ownership="none">
  71266. <type name="none" c:type="void"/>
  71267. </return-value>
  71268. <parameters>
  71269. <instance-parameter name="listener" transfer-ownership="none">
  71270. <doc xml:space="preserve">a #GSocketListener</doc>
  71271. <type name="SocketListener" c:type="GSocketListener*"/>
  71272. </instance-parameter>
  71273. </parameters>
  71274. </method>
  71275. <method name="set_backlog"
  71276. c:identifier="g_socket_listener_set_backlog"
  71277. version="2.22">
  71278. <doc xml:space="preserve">Sets the listen backlog on the sockets in the listener.
  71279. See g_socket_set_listen_backlog() for details</doc>
  71280. <return-value transfer-ownership="none">
  71281. <type name="none" c:type="void"/>
  71282. </return-value>
  71283. <parameters>
  71284. <instance-parameter name="listener" transfer-ownership="none">
  71285. <doc xml:space="preserve">a #GSocketListener</doc>
  71286. <type name="SocketListener" c:type="GSocketListener*"/>
  71287. </instance-parameter>
  71288. <parameter name="listen_backlog" transfer-ownership="none">
  71289. <doc xml:space="preserve">an integer</doc>
  71290. <type name="gint" c:type="int"/>
  71291. </parameter>
  71292. </parameters>
  71293. </method>
  71294. <property name="listen-backlog"
  71295. writable="1"
  71296. construct="1"
  71297. transfer-ownership="none">
  71298. <type name="gint" c:type="gint"/>
  71299. </property>
  71300. <field name="parent_instance">
  71301. <type name="GObject.Object" c:type="GObject"/>
  71302. </field>
  71303. <field name="priv">
  71304. <type name="SocketListenerPrivate" c:type="GSocketListenerPrivate*"/>
  71305. </field>
  71306. <glib:signal name="event" when="last" version="2.46">
  71307. <doc xml:space="preserve">Emitted when @listener's activity on @socket changes state.
  71308. Note that when @listener is used to listen on both IPv4 and
  71309. IPv6, a separate set of signals will be emitted for each, and
  71310. the order they happen in is undefined.</doc>
  71311. <return-value transfer-ownership="none">
  71312. <type name="none" c:type="void"/>
  71313. </return-value>
  71314. <parameters>
  71315. <parameter name="event" transfer-ownership="none">
  71316. <doc xml:space="preserve">the event that is occurring</doc>
  71317. <type name="SocketListenerEvent"/>
  71318. </parameter>
  71319. <parameter name="socket" transfer-ownership="none">
  71320. <doc xml:space="preserve">the #GSocket the event is occurring on</doc>
  71321. <type name="Socket"/>
  71322. </parameter>
  71323. </parameters>
  71324. </glib:signal>
  71325. </class>
  71326. <record name="SocketListenerClass"
  71327. c:type="GSocketListenerClass"
  71328. glib:is-gtype-struct-for="SocketListener">
  71329. <doc xml:space="preserve">Class structure for #GSocketListener.</doc>
  71330. <field name="parent_class">
  71331. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  71332. </field>
  71333. <field name="changed">
  71334. <callback name="changed">
  71335. <return-value transfer-ownership="none">
  71336. <type name="none" c:type="void"/>
  71337. </return-value>
  71338. <parameters>
  71339. <parameter name="listener" transfer-ownership="none">
  71340. <type name="SocketListener" c:type="GSocketListener*"/>
  71341. </parameter>
  71342. </parameters>
  71343. </callback>
  71344. </field>
  71345. <field name="event">
  71346. <callback name="event">
  71347. <return-value transfer-ownership="none">
  71348. <type name="none" c:type="void"/>
  71349. </return-value>
  71350. <parameters>
  71351. <parameter name="listener" transfer-ownership="none">
  71352. <type name="SocketListener" c:type="GSocketListener*"/>
  71353. </parameter>
  71354. <parameter name="event" transfer-ownership="none">
  71355. <type name="SocketListenerEvent" c:type="GSocketListenerEvent*"/>
  71356. </parameter>
  71357. <parameter name="socket" transfer-ownership="none">
  71358. <type name="Socket" c:type="GSocket*"/>
  71359. </parameter>
  71360. </parameters>
  71361. </callback>
  71362. </field>
  71363. <field name="_g_reserved2" introspectable="0">
  71364. <callback name="_g_reserved2">
  71365. <return-value transfer-ownership="none">
  71366. <type name="none" c:type="void"/>
  71367. </return-value>
  71368. </callback>
  71369. </field>
  71370. <field name="_g_reserved3" introspectable="0">
  71371. <callback name="_g_reserved3">
  71372. <return-value transfer-ownership="none">
  71373. <type name="none" c:type="void"/>
  71374. </return-value>
  71375. </callback>
  71376. </field>
  71377. <field name="_g_reserved4" introspectable="0">
  71378. <callback name="_g_reserved4">
  71379. <return-value transfer-ownership="none">
  71380. <type name="none" c:type="void"/>
  71381. </return-value>
  71382. </callback>
  71383. </field>
  71384. <field name="_g_reserved5" introspectable="0">
  71385. <callback name="_g_reserved5">
  71386. <return-value transfer-ownership="none">
  71387. <type name="none" c:type="void"/>
  71388. </return-value>
  71389. </callback>
  71390. </field>
  71391. <field name="_g_reserved6" introspectable="0">
  71392. <callback name="_g_reserved6">
  71393. <return-value transfer-ownership="none">
  71394. <type name="none" c:type="void"/>
  71395. </return-value>
  71396. </callback>
  71397. </field>
  71398. </record>
  71399. <enumeration name="SocketListenerEvent"
  71400. version="2.46"
  71401. glib:type-name="GSocketListenerEvent"
  71402. glib:get-type="g_socket_listener_event_get_type"
  71403. c:type="GSocketListenerEvent">
  71404. <doc xml:space="preserve">Describes an event occurring on a #GSocketListener. See the
  71405. #GSocketListener::event signal for more details.
  71406. Additional values may be added to this type in the future.</doc>
  71407. <member name="binding"
  71408. value="0"
  71409. c:identifier="G_SOCKET_LISTENER_BINDING"
  71410. glib:nick="binding">
  71411. <doc xml:space="preserve">The listener is about to bind a socket.</doc>
  71412. </member>
  71413. <member name="bound"
  71414. value="1"
  71415. c:identifier="G_SOCKET_LISTENER_BOUND"
  71416. glib:nick="bound">
  71417. <doc xml:space="preserve">The listener has bound a socket.</doc>
  71418. </member>
  71419. <member name="listening"
  71420. value="2"
  71421. c:identifier="G_SOCKET_LISTENER_LISTENING"
  71422. glib:nick="listening">
  71423. <doc xml:space="preserve">The listener is about to start
  71424. listening on this socket.</doc>
  71425. </member>
  71426. <member name="listened"
  71427. value="3"
  71428. c:identifier="G_SOCKET_LISTENER_LISTENED"
  71429. glib:nick="listened">
  71430. <doc xml:space="preserve">The listener is now listening on
  71431. this socket.</doc>
  71432. </member>
  71433. </enumeration>
  71434. <record name="SocketListenerPrivate"
  71435. c:type="GSocketListenerPrivate"
  71436. disguised="1">
  71437. </record>
  71438. <bitfield name="SocketMsgFlags"
  71439. version="2.22"
  71440. glib:type-name="GSocketMsgFlags"
  71441. glib:get-type="g_socket_msg_flags_get_type"
  71442. c:type="GSocketMsgFlags">
  71443. <doc xml:space="preserve">Flags used in g_socket_receive_message() and g_socket_send_message().
  71444. The flags listed in the enum are some commonly available flags, but the
  71445. values used for them are the same as on the platform, and any other flags
  71446. are passed in/out as is. So to use a platform specific flag, just include
  71447. the right system header and pass in the flag.</doc>
  71448. <member name="none"
  71449. value="0"
  71450. c:identifier="G_SOCKET_MSG_NONE"
  71451. glib:nick="none">
  71452. <doc xml:space="preserve">No flags.</doc>
  71453. </member>
  71454. <member name="oob"
  71455. value="1"
  71456. c:identifier="G_SOCKET_MSG_OOB"
  71457. glib:nick="oob">
  71458. <doc xml:space="preserve">Request to send/receive out of band data.</doc>
  71459. </member>
  71460. <member name="peek"
  71461. value="2"
  71462. c:identifier="G_SOCKET_MSG_PEEK"
  71463. glib:nick="peek">
  71464. <doc xml:space="preserve">Read data from the socket without removing it from
  71465. the queue.</doc>
  71466. </member>
  71467. <member name="dontroute"
  71468. value="4"
  71469. c:identifier="G_SOCKET_MSG_DONTROUTE"
  71470. glib:nick="dontroute">
  71471. <doc xml:space="preserve">Don't use a gateway to send out the packet,
  71472. only send to hosts on directly connected networks.</doc>
  71473. </member>
  71474. </bitfield>
  71475. <record name="SocketPrivate" c:type="GSocketPrivate" disguised="1">
  71476. </record>
  71477. <enumeration name="SocketProtocol"
  71478. version="2.22"
  71479. glib:type-name="GSocketProtocol"
  71480. glib:get-type="g_socket_protocol_get_type"
  71481. c:type="GSocketProtocol">
  71482. <doc xml:space="preserve">A protocol identifier is specified when creating a #GSocket, which is a
  71483. family/type specific identifier, where 0 means the default protocol for
  71484. the particular family/type.
  71485. This enum contains a set of commonly available and used protocols. You
  71486. can also pass any other identifiers handled by the platform in order to
  71487. use protocols not listed here.</doc>
  71488. <member name="unknown"
  71489. value="-1"
  71490. c:identifier="G_SOCKET_PROTOCOL_UNKNOWN"
  71491. glib:nick="unknown">
  71492. <doc xml:space="preserve">The protocol type is unknown</doc>
  71493. </member>
  71494. <member name="default"
  71495. value="0"
  71496. c:identifier="G_SOCKET_PROTOCOL_DEFAULT"
  71497. glib:nick="default">
  71498. <doc xml:space="preserve">The default protocol for the family/type</doc>
  71499. </member>
  71500. <member name="tcp"
  71501. value="6"
  71502. c:identifier="G_SOCKET_PROTOCOL_TCP"
  71503. glib:nick="tcp">
  71504. <doc xml:space="preserve">TCP over IP</doc>
  71505. </member>
  71506. <member name="udp"
  71507. value="17"
  71508. c:identifier="G_SOCKET_PROTOCOL_UDP"
  71509. glib:nick="udp">
  71510. <doc xml:space="preserve">UDP over IP</doc>
  71511. </member>
  71512. <member name="sctp"
  71513. value="132"
  71514. c:identifier="G_SOCKET_PROTOCOL_SCTP"
  71515. glib:nick="sctp">
  71516. <doc xml:space="preserve">SCTP over IP</doc>
  71517. </member>
  71518. </enumeration>
  71519. <class name="SocketService"
  71520. c:symbol-prefix="socket_service"
  71521. c:type="GSocketService"
  71522. version="2.22"
  71523. parent="SocketListener"
  71524. glib:type-name="GSocketService"
  71525. glib:get-type="g_socket_service_get_type"
  71526. glib:type-struct="SocketServiceClass">
  71527. <doc xml:space="preserve">A #GSocketService is an object that represents a service that
  71528. is provided to the network or over local sockets. When a new
  71529. connection is made to the service the #GSocketService::incoming
  71530. signal is emitted.
  71531. A #GSocketService is a subclass of #GSocketListener and you need
  71532. to add the addresses you want to accept connections on with the
  71533. #GSocketListener APIs.
  71534. There are two options for implementing a network service based on
  71535. #GSocketService. The first is to create the service using
  71536. g_socket_service_new() and to connect to the #GSocketService::incoming
  71537. signal. The second is to subclass #GSocketService and override the
  71538. default signal handler implementation.
  71539. In either case, the handler must immediately return, or else it
  71540. will block additional incoming connections from being serviced.
  71541. If you are interested in writing connection handlers that contain
  71542. blocking code then see #GThreadedSocketService.
  71543. The socket service runs on the main loop of the
  71544. [thread-default context][g-main-context-push-thread-default-context]
  71545. of the thread it is created in, and is not
  71546. threadsafe in general. However, the calls to start and stop the
  71547. service are thread-safe so these can be used from threads that
  71548. handle incoming clients.</doc>
  71549. <constructor name="new"
  71550. c:identifier="g_socket_service_new"
  71551. version="2.22">
  71552. <doc xml:space="preserve">Creates a new #GSocketService with no sockets to listen for.
  71553. New listeners can be added with e.g. g_socket_listener_add_address()
  71554. or g_socket_listener_add_inet_port().</doc>
  71555. <return-value transfer-ownership="full">
  71556. <doc xml:space="preserve">a new #GSocketService.</doc>
  71557. <type name="SocketService" c:type="GSocketService*"/>
  71558. </return-value>
  71559. </constructor>
  71560. <virtual-method name="incoming">
  71561. <return-value transfer-ownership="none">
  71562. <type name="gboolean" c:type="gboolean"/>
  71563. </return-value>
  71564. <parameters>
  71565. <instance-parameter name="service" transfer-ownership="none">
  71566. <type name="SocketService" c:type="GSocketService*"/>
  71567. </instance-parameter>
  71568. <parameter name="connection" transfer-ownership="none">
  71569. <type name="SocketConnection" c:type="GSocketConnection*"/>
  71570. </parameter>
  71571. <parameter name="source_object" transfer-ownership="none">
  71572. <type name="GObject.Object" c:type="GObject*"/>
  71573. </parameter>
  71574. </parameters>
  71575. </virtual-method>
  71576. <method name="is_active"
  71577. c:identifier="g_socket_service_is_active"
  71578. version="2.22">
  71579. <doc xml:space="preserve">Check whether the service is active or not. An active
  71580. service will accept new clients that connect, while
  71581. a non-active service will let connecting clients queue
  71582. up until the service is started.</doc>
  71583. <return-value transfer-ownership="none">
  71584. <doc xml:space="preserve">%TRUE if the service is active, %FALSE otherwise</doc>
  71585. <type name="gboolean" c:type="gboolean"/>
  71586. </return-value>
  71587. <parameters>
  71588. <instance-parameter name="service" transfer-ownership="none">
  71589. <doc xml:space="preserve">a #GSocketService</doc>
  71590. <type name="SocketService" c:type="GSocketService*"/>
  71591. </instance-parameter>
  71592. </parameters>
  71593. </method>
  71594. <method name="start"
  71595. c:identifier="g_socket_service_start"
  71596. version="2.22">
  71597. <doc xml:space="preserve">Starts the service, i.e. start accepting connections
  71598. from the added sockets when the mainloop runs.
  71599. This call is thread-safe, so it may be called from a thread
  71600. handling an incoming client request.</doc>
  71601. <return-value transfer-ownership="none">
  71602. <type name="none" c:type="void"/>
  71603. </return-value>
  71604. <parameters>
  71605. <instance-parameter name="service" transfer-ownership="none">
  71606. <doc xml:space="preserve">a #GSocketService</doc>
  71607. <type name="SocketService" c:type="GSocketService*"/>
  71608. </instance-parameter>
  71609. </parameters>
  71610. </method>
  71611. <method name="stop" c:identifier="g_socket_service_stop" version="2.22">
  71612. <doc xml:space="preserve">Stops the service, i.e. stops accepting connections
  71613. from the added sockets when the mainloop runs.
  71614. This call is thread-safe, so it may be called from a thread
  71615. handling an incoming client request.
  71616. Note that this only stops accepting new connections; it does not
  71617. close the listening sockets, and you can call
  71618. g_socket_service_start() again later to begin listening again. To
  71619. close the listening sockets, call g_socket_listener_close(). (This
  71620. will happen automatically when the #GSocketService is finalized.)</doc>
  71621. <return-value transfer-ownership="none">
  71622. <type name="none" c:type="void"/>
  71623. </return-value>
  71624. <parameters>
  71625. <instance-parameter name="service" transfer-ownership="none">
  71626. <doc xml:space="preserve">a #GSocketService</doc>
  71627. <type name="SocketService" c:type="GSocketService*"/>
  71628. </instance-parameter>
  71629. </parameters>
  71630. </method>
  71631. <property name="active"
  71632. version="2.46"
  71633. writable="1"
  71634. construct="1"
  71635. transfer-ownership="none">
  71636. <doc xml:space="preserve">Whether the service is currently accepting connections.</doc>
  71637. <type name="gboolean" c:type="gboolean"/>
  71638. </property>
  71639. <field name="parent_instance">
  71640. <type name="SocketListener" c:type="GSocketListener"/>
  71641. </field>
  71642. <field name="priv">
  71643. <type name="SocketServicePrivate" c:type="GSocketServicePrivate*"/>
  71644. </field>
  71645. <glib:signal name="incoming" when="last" version="2.22">
  71646. <doc xml:space="preserve">The ::incoming signal is emitted when a new incoming connection
  71647. to @service needs to be handled. The handler must initiate the
  71648. handling of @connection, but may not block; in essence,
  71649. asynchronous operations must be used.
  71650. @connection will be unreffed once the signal handler returns,
  71651. so you need to ref it yourself if you are planning to use it.</doc>
  71652. <return-value transfer-ownership="none">
  71653. <doc xml:space="preserve">%TRUE to stop other handlers from being called</doc>
  71654. <type name="gboolean" c:type="gboolean"/>
  71655. </return-value>
  71656. <parameters>
  71657. <parameter name="connection" transfer-ownership="none">
  71658. <doc xml:space="preserve">a new #GSocketConnection object</doc>
  71659. <type name="SocketConnection"/>
  71660. </parameter>
  71661. <parameter name="source_object"
  71662. transfer-ownership="none"
  71663. nullable="1"
  71664. allow-none="1">
  71665. <doc xml:space="preserve">the source_object passed to
  71666. g_socket_listener_add_address()</doc>
  71667. <type name="GObject.Object"/>
  71668. </parameter>
  71669. </parameters>
  71670. </glib:signal>
  71671. </class>
  71672. <record name="SocketServiceClass"
  71673. c:type="GSocketServiceClass"
  71674. glib:is-gtype-struct-for="SocketService">
  71675. <doc xml:space="preserve">Class structure for #GSocketService.</doc>
  71676. <field name="parent_class">
  71677. <type name="SocketListenerClass" c:type="GSocketListenerClass"/>
  71678. </field>
  71679. <field name="incoming">
  71680. <callback name="incoming">
  71681. <return-value transfer-ownership="none">
  71682. <type name="gboolean" c:type="gboolean"/>
  71683. </return-value>
  71684. <parameters>
  71685. <parameter name="service" transfer-ownership="none">
  71686. <type name="SocketService" c:type="GSocketService*"/>
  71687. </parameter>
  71688. <parameter name="connection" transfer-ownership="none">
  71689. <type name="SocketConnection" c:type="GSocketConnection*"/>
  71690. </parameter>
  71691. <parameter name="source_object" transfer-ownership="none">
  71692. <type name="GObject.Object" c:type="GObject*"/>
  71693. </parameter>
  71694. </parameters>
  71695. </callback>
  71696. </field>
  71697. <field name="_g_reserved1" introspectable="0">
  71698. <callback name="_g_reserved1">
  71699. <return-value transfer-ownership="none">
  71700. <type name="none" c:type="void"/>
  71701. </return-value>
  71702. </callback>
  71703. </field>
  71704. <field name="_g_reserved2" introspectable="0">
  71705. <callback name="_g_reserved2">
  71706. <return-value transfer-ownership="none">
  71707. <type name="none" c:type="void"/>
  71708. </return-value>
  71709. </callback>
  71710. </field>
  71711. <field name="_g_reserved3" introspectable="0">
  71712. <callback name="_g_reserved3">
  71713. <return-value transfer-ownership="none">
  71714. <type name="none" c:type="void"/>
  71715. </return-value>
  71716. </callback>
  71717. </field>
  71718. <field name="_g_reserved4" introspectable="0">
  71719. <callback name="_g_reserved4">
  71720. <return-value transfer-ownership="none">
  71721. <type name="none" c:type="void"/>
  71722. </return-value>
  71723. </callback>
  71724. </field>
  71725. <field name="_g_reserved5" introspectable="0">
  71726. <callback name="_g_reserved5">
  71727. <return-value transfer-ownership="none">
  71728. <type name="none" c:type="void"/>
  71729. </return-value>
  71730. </callback>
  71731. </field>
  71732. <field name="_g_reserved6" introspectable="0">
  71733. <callback name="_g_reserved6">
  71734. <return-value transfer-ownership="none">
  71735. <type name="none" c:type="void"/>
  71736. </return-value>
  71737. </callback>
  71738. </field>
  71739. </record>
  71740. <record name="SocketServicePrivate"
  71741. c:type="GSocketServicePrivate"
  71742. disguised="1">
  71743. </record>
  71744. <callback name="SocketSourceFunc"
  71745. c:type="GSocketSourceFunc"
  71746. version="2.22">
  71747. <doc xml:space="preserve">This is the function type of the callback used for the #GSource
  71748. returned by g_socket_create_source().</doc>
  71749. <return-value transfer-ownership="none">
  71750. <doc xml:space="preserve">it should return %FALSE if the source should be removed.</doc>
  71751. <type name="gboolean" c:type="gboolean"/>
  71752. </return-value>
  71753. <parameters>
  71754. <parameter name="socket" transfer-ownership="none">
  71755. <doc xml:space="preserve">the #GSocket</doc>
  71756. <type name="Socket" c:type="GSocket*"/>
  71757. </parameter>
  71758. <parameter name="condition" transfer-ownership="none">
  71759. <doc xml:space="preserve">the current condition at the source fired.</doc>
  71760. <type name="GLib.IOCondition" c:type="GIOCondition"/>
  71761. </parameter>
  71762. <parameter name="user_data"
  71763. transfer-ownership="none"
  71764. nullable="1"
  71765. allow-none="1"
  71766. closure="2">
  71767. <doc xml:space="preserve">data passed in by the user.</doc>
  71768. <type name="gpointer" c:type="gpointer"/>
  71769. </parameter>
  71770. </parameters>
  71771. </callback>
  71772. <enumeration name="SocketType"
  71773. version="2.22"
  71774. glib:type-name="GSocketType"
  71775. glib:get-type="g_socket_type_get_type"
  71776. c:type="GSocketType">
  71777. <doc xml:space="preserve">Flags used when creating a #GSocket. Some protocols may not implement
  71778. all the socket types.</doc>
  71779. <member name="invalid"
  71780. value="0"
  71781. c:identifier="G_SOCKET_TYPE_INVALID"
  71782. glib:nick="invalid">
  71783. <doc xml:space="preserve">Type unknown or wrong</doc>
  71784. </member>
  71785. <member name="stream"
  71786. value="1"
  71787. c:identifier="G_SOCKET_TYPE_STREAM"
  71788. glib:nick="stream">
  71789. <doc xml:space="preserve">Reliable connection-based byte streams (e.g. TCP).</doc>
  71790. </member>
  71791. <member name="datagram"
  71792. value="2"
  71793. c:identifier="G_SOCKET_TYPE_DATAGRAM"
  71794. glib:nick="datagram">
  71795. <doc xml:space="preserve">Connectionless, unreliable datagram passing.
  71796. (e.g. UDP)</doc>
  71797. </member>
  71798. <member name="seqpacket"
  71799. value="3"
  71800. c:identifier="G_SOCKET_TYPE_SEQPACKET"
  71801. glib:nick="seqpacket">
  71802. <doc xml:space="preserve">Reliable connection-based passing of datagrams
  71803. of fixed maximum length (e.g. SCTP).</doc>
  71804. </member>
  71805. </enumeration>
  71806. <record name="SrvTarget"
  71807. c:type="GSrvTarget"
  71808. glib:type-name="GSrvTarget"
  71809. glib:get-type="g_srv_target_get_type"
  71810. c:symbol-prefix="srv_target">
  71811. <doc xml:space="preserve">SRV (service) records are used by some network protocols to provide
  71812. service-specific aliasing and load-balancing. For example, XMPP
  71813. (Jabber) uses SRV records to locate the XMPP server for a domain;
  71814. rather than connecting directly to "example.com" or assuming a
  71815. specific server hostname like "xmpp.example.com", an XMPP client
  71816. would look up the "xmpp-client" SRV record for "example.com", and
  71817. then connect to whatever host was pointed to by that record.
  71818. You can use g_resolver_lookup_service() or
  71819. g_resolver_lookup_service_async() to find the #GSrvTargets
  71820. for a given service. However, if you are simply planning to connect
  71821. to the remote service, you can use #GNetworkService's
  71822. #GSocketConnectable interface and not need to worry about
  71823. #GSrvTarget at all.</doc>
  71824. <constructor name="new" c:identifier="g_srv_target_new" version="2.22">
  71825. <doc xml:space="preserve">Creates a new #GSrvTarget with the given parameters.
  71826. You should not need to use this; normally #GSrvTargets are
  71827. created by #GResolver.</doc>
  71828. <return-value transfer-ownership="full">
  71829. <doc xml:space="preserve">a new #GSrvTarget.</doc>
  71830. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71831. </return-value>
  71832. <parameters>
  71833. <parameter name="hostname" transfer-ownership="none">
  71834. <doc xml:space="preserve">the host that the service is running on</doc>
  71835. <type name="utf8" c:type="const gchar*"/>
  71836. </parameter>
  71837. <parameter name="port" transfer-ownership="none">
  71838. <doc xml:space="preserve">the port that the service is running on</doc>
  71839. <type name="guint16" c:type="guint16"/>
  71840. </parameter>
  71841. <parameter name="priority" transfer-ownership="none">
  71842. <doc xml:space="preserve">the target's priority</doc>
  71843. <type name="guint16" c:type="guint16"/>
  71844. </parameter>
  71845. <parameter name="weight" transfer-ownership="none">
  71846. <doc xml:space="preserve">the target's weight</doc>
  71847. <type name="guint16" c:type="guint16"/>
  71848. </parameter>
  71849. </parameters>
  71850. </constructor>
  71851. <method name="copy" c:identifier="g_srv_target_copy" version="2.22">
  71852. <doc xml:space="preserve">Copies @target</doc>
  71853. <return-value transfer-ownership="full">
  71854. <doc xml:space="preserve">a copy of @target</doc>
  71855. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71856. </return-value>
  71857. <parameters>
  71858. <instance-parameter name="target" transfer-ownership="none">
  71859. <doc xml:space="preserve">a #GSrvTarget</doc>
  71860. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71861. </instance-parameter>
  71862. </parameters>
  71863. </method>
  71864. <method name="free" c:identifier="g_srv_target_free" version="2.22">
  71865. <doc xml:space="preserve">Frees @target</doc>
  71866. <return-value transfer-ownership="none">
  71867. <type name="none" c:type="void"/>
  71868. </return-value>
  71869. <parameters>
  71870. <instance-parameter name="target" transfer-ownership="none">
  71871. <doc xml:space="preserve">a #GSrvTarget</doc>
  71872. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71873. </instance-parameter>
  71874. </parameters>
  71875. </method>
  71876. <method name="get_hostname"
  71877. c:identifier="g_srv_target_get_hostname"
  71878. version="2.22">
  71879. <doc xml:space="preserve">Gets @target's hostname (in ASCII form; if you are going to present
  71880. this to the user, you should use g_hostname_is_ascii_encoded() to
  71881. check if it contains encoded Unicode segments, and use
  71882. g_hostname_to_unicode() to convert it if it does.)</doc>
  71883. <return-value transfer-ownership="none">
  71884. <doc xml:space="preserve">@target's hostname</doc>
  71885. <type name="utf8" c:type="const gchar*"/>
  71886. </return-value>
  71887. <parameters>
  71888. <instance-parameter name="target" transfer-ownership="none">
  71889. <doc xml:space="preserve">a #GSrvTarget</doc>
  71890. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71891. </instance-parameter>
  71892. </parameters>
  71893. </method>
  71894. <method name="get_port"
  71895. c:identifier="g_srv_target_get_port"
  71896. version="2.22">
  71897. <doc xml:space="preserve">Gets @target's port</doc>
  71898. <return-value transfer-ownership="none">
  71899. <doc xml:space="preserve">@target's port</doc>
  71900. <type name="guint16" c:type="guint16"/>
  71901. </return-value>
  71902. <parameters>
  71903. <instance-parameter name="target" transfer-ownership="none">
  71904. <doc xml:space="preserve">a #GSrvTarget</doc>
  71905. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71906. </instance-parameter>
  71907. </parameters>
  71908. </method>
  71909. <method name="get_priority"
  71910. c:identifier="g_srv_target_get_priority"
  71911. version="2.22">
  71912. <doc xml:space="preserve">Gets @target's priority. You should not need to look at this;
  71913. #GResolver already sorts the targets according to the algorithm in
  71914. RFC 2782.</doc>
  71915. <return-value transfer-ownership="none">
  71916. <doc xml:space="preserve">@target's priority</doc>
  71917. <type name="guint16" c:type="guint16"/>
  71918. </return-value>
  71919. <parameters>
  71920. <instance-parameter name="target" transfer-ownership="none">
  71921. <doc xml:space="preserve">a #GSrvTarget</doc>
  71922. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71923. </instance-parameter>
  71924. </parameters>
  71925. </method>
  71926. <method name="get_weight"
  71927. c:identifier="g_srv_target_get_weight"
  71928. version="2.22">
  71929. <doc xml:space="preserve">Gets @target's weight. You should not need to look at this;
  71930. #GResolver already sorts the targets according to the algorithm in
  71931. RFC 2782.</doc>
  71932. <return-value transfer-ownership="none">
  71933. <doc xml:space="preserve">@target's weight</doc>
  71934. <type name="guint16" c:type="guint16"/>
  71935. </return-value>
  71936. <parameters>
  71937. <instance-parameter name="target" transfer-ownership="none">
  71938. <doc xml:space="preserve">a #GSrvTarget</doc>
  71939. <type name="SrvTarget" c:type="GSrvTarget*"/>
  71940. </instance-parameter>
  71941. </parameters>
  71942. </method>
  71943. <function name="list_sort"
  71944. c:identifier="g_srv_target_list_sort"
  71945. version="2.22"
  71946. introspectable="0">
  71947. <doc xml:space="preserve">Sorts @targets in place according to the algorithm in RFC 2782.</doc>
  71948. <return-value transfer-ownership="full">
  71949. <doc xml:space="preserve">the head of the sorted list.</doc>
  71950. <type name="GLib.List" c:type="GList*">
  71951. <type name="gpointer" c:type="gpointer"/>
  71952. </type>
  71953. </return-value>
  71954. <parameters>
  71955. <parameter name="targets" transfer-ownership="none">
  71956. <doc xml:space="preserve">a #GList of #GSrvTarget</doc>
  71957. <type name="GLib.List" c:type="GList*">
  71958. <type name="gpointer" c:type="gpointer"/>
  71959. </type>
  71960. </parameter>
  71961. </parameters>
  71962. </function>
  71963. </record>
  71964. <record name="StaticResource" c:type="GStaticResource">
  71965. <doc xml:space="preserve">#GStaticResource is an opaque data structure and can only be accessed
  71966. using the following functions.</doc>
  71967. <field name="data" readable="0" private="1">
  71968. <type name="guint8" c:type="const guint8*"/>
  71969. </field>
  71970. <field name="data_len" readable="0" private="1">
  71971. <type name="gsize" c:type="gsize"/>
  71972. </field>
  71973. <field name="resource" readable="0" private="1">
  71974. <type name="Resource" c:type="GResource*"/>
  71975. </field>
  71976. <field name="next" readable="0" private="1">
  71977. <type name="StaticResource" c:type="GStaticResource*"/>
  71978. </field>
  71979. <field name="padding" readable="0" private="1">
  71980. <type name="gpointer" c:type="gpointer"/>
  71981. </field>
  71982. <method name="fini" c:identifier="g_static_resource_fini" version="2.32">
  71983. <doc xml:space="preserve">Finalized a GResource initialized by g_static_resource_init().
  71984. This is normally used by code generated by
  71985. [glib-compile-resources][glib-compile-resources]
  71986. and is not typically used by other code.</doc>
  71987. <return-value transfer-ownership="none">
  71988. <type name="none" c:type="void"/>
  71989. </return-value>
  71990. <parameters>
  71991. <instance-parameter name="static_resource" transfer-ownership="none">
  71992. <doc xml:space="preserve">pointer to a static #GStaticResource</doc>
  71993. <type name="StaticResource" c:type="GStaticResource*"/>
  71994. </instance-parameter>
  71995. </parameters>
  71996. </method>
  71997. <method name="get_resource"
  71998. c:identifier="g_static_resource_get_resource"
  71999. version="2.32">
  72000. <doc xml:space="preserve">Gets the GResource that was registered by a call to g_static_resource_init().
  72001. This is normally used by code generated by
  72002. [glib-compile-resources][glib-compile-resources]
  72003. and is not typically used by other code.</doc>
  72004. <return-value transfer-ownership="none">
  72005. <doc xml:space="preserve">a #GResource</doc>
  72006. <type name="Resource" c:type="GResource*"/>
  72007. </return-value>
  72008. <parameters>
  72009. <instance-parameter name="static_resource" transfer-ownership="none">
  72010. <doc xml:space="preserve">pointer to a static #GStaticResource</doc>
  72011. <type name="StaticResource" c:type="GStaticResource*"/>
  72012. </instance-parameter>
  72013. </parameters>
  72014. </method>
  72015. <method name="init" c:identifier="g_static_resource_init" version="2.32">
  72016. <doc xml:space="preserve">Initializes a GResource from static data using a
  72017. GStaticResource.
  72018. This is normally used by code generated by
  72019. [glib-compile-resources][glib-compile-resources]
  72020. and is not typically used by other code.</doc>
  72021. <return-value transfer-ownership="none">
  72022. <type name="none" c:type="void"/>
  72023. </return-value>
  72024. <parameters>
  72025. <instance-parameter name="static_resource" transfer-ownership="none">
  72026. <doc xml:space="preserve">pointer to a static #GStaticResource</doc>
  72027. <type name="StaticResource" c:type="GStaticResource*"/>
  72028. </instance-parameter>
  72029. </parameters>
  72030. </method>
  72031. </record>
  72032. <class name="Subprocess"
  72033. c:symbol-prefix="subprocess"
  72034. c:type="GSubprocess"
  72035. version="2.40"
  72036. parent="GObject.Object"
  72037. glib:type-name="GSubprocess"
  72038. glib:get-type="g_subprocess_get_type">
  72039. <doc xml:space="preserve">#GSubprocess allows the creation of and interaction with child
  72040. processes.
  72041. Processes can be communicated with using standard GIO-style APIs (ie:
  72042. #GInputStream, #GOutputStream). There are GIO-style APIs to wait for
  72043. process termination (ie: cancellable and with an asynchronous
  72044. variant).
  72045. There is an API to force a process to terminate, as well as a
  72046. race-free API for sending UNIX signals to a subprocess.
  72047. One major advantage that GIO brings over the core GLib library is
  72048. comprehensive API for asynchronous I/O, such
  72049. g_output_stream_splice_async(). This makes GSubprocess
  72050. significantly more powerful and flexible than equivalent APIs in
  72051. some other languages such as the `subprocess.py`
  72052. included with Python. For example, using #GSubprocess one could
  72053. create two child processes, reading standard output from the first,
  72054. processing it, and writing to the input stream of the second, all
  72055. without blocking the main loop.
  72056. A powerful g_subprocess_communicate() API is provided similar to the
  72057. `communicate()` method of `subprocess.py`. This enables very easy
  72058. interaction with a subprocess that has been opened with pipes.
  72059. #GSubprocess defaults to tight control over the file descriptors open
  72060. in the child process, avoiding dangling-fd issues that are caused by
  72061. a simple fork()/exec(). The only open file descriptors in the
  72062. spawned process are ones that were explicitly specified by the
  72063. #GSubprocess API (unless %G_SUBPROCESS_FLAGS_INHERIT_FDS was
  72064. specified).
  72065. #GSubprocess will quickly reap all child processes as they exit,
  72066. avoiding "zombie processes" remaining around for long periods of
  72067. time. g_subprocess_wait() can be used to wait for this to happen,
  72068. but it will happen even without the call being explicitly made.
  72069. As a matter of principle, #GSubprocess has no API that accepts
  72070. shell-style space-separated strings. It will, however, match the
  72071. typical shell behaviour of searching the PATH for executables that do
  72072. not contain a directory separator in their name.
  72073. #GSubprocess attempts to have a very simple API for most uses (ie:
  72074. spawning a subprocess with arguments and support for most typical
  72075. kinds of input and output redirection). See g_subprocess_new(). The
  72076. #GSubprocessLauncher API is provided for more complicated cases
  72077. (advanced types of redirection, environment variable manipulation,
  72078. change of working directory, child setup functions, etc).
  72079. A typical use of #GSubprocess will involve calling
  72080. g_subprocess_new(), followed by g_subprocess_wait_async() or
  72081. g_subprocess_wait(). After the process exits, the status can be
  72082. checked using functions such as g_subprocess_get_if_exited() (which
  72083. are similar to the familiar WIFEXITED-style POSIX macros).</doc>
  72084. <implements name="Initable"/>
  72085. <constructor name="new"
  72086. c:identifier="g_subprocess_new"
  72087. shadowed-by="newv"
  72088. version="2.40"
  72089. introspectable="0">
  72090. <doc xml:space="preserve">Create a new process with the given flags and varargs argument
  72091. list. By default, matching the g_spawn_async() defaults, the
  72092. child's stdin will be set to the system null device, and
  72093. stdout/stderr will be inherited from the parent. You can use
  72094. @flags to control this behavior.
  72095. The argument list must be terminated with %NULL.</doc>
  72096. <return-value transfer-ownership="full">
  72097. <doc xml:space="preserve">A newly created #GSubprocess, or %NULL on error (and @error
  72098. will be set)</doc>
  72099. <type name="Subprocess" c:type="GSubprocess*"/>
  72100. </return-value>
  72101. <parameters>
  72102. <parameter name="flags" transfer-ownership="none">
  72103. <doc xml:space="preserve">flags that define the behaviour of the subprocess</doc>
  72104. <type name="SubprocessFlags" c:type="GSubprocessFlags"/>
  72105. </parameter>
  72106. <parameter name="error"
  72107. transfer-ownership="none"
  72108. nullable="1"
  72109. allow-none="1">
  72110. <doc xml:space="preserve">return location for an error, or %NULL</doc>
  72111. <type name="GLib.Error" c:type="GError**"/>
  72112. </parameter>
  72113. <parameter name="argv0" transfer-ownership="none">
  72114. <doc xml:space="preserve">first commandline argument to pass to the subprocess</doc>
  72115. <type name="utf8" c:type="const gchar*"/>
  72116. </parameter>
  72117. <parameter name="..." transfer-ownership="none">
  72118. <doc xml:space="preserve">more commandline arguments, followed by %NULL</doc>
  72119. <varargs/>
  72120. </parameter>
  72121. </parameters>
  72122. </constructor>
  72123. <constructor name="newv"
  72124. c:identifier="g_subprocess_newv"
  72125. shadows="new"
  72126. version="2.40"
  72127. throws="1">
  72128. <doc xml:space="preserve">Create a new process with the given flags and argument list.
  72129. The argument list is expected to be %NULL-terminated.</doc>
  72130. <return-value transfer-ownership="full">
  72131. <doc xml:space="preserve">A newly created #GSubprocess, or %NULL on error (and @error
  72132. will be set)</doc>
  72133. <type name="Subprocess" c:type="GSubprocess*"/>
  72134. </return-value>
  72135. <parameters>
  72136. <parameter name="argv" transfer-ownership="none">
  72137. <doc xml:space="preserve">commandline arguments for the subprocess</doc>
  72138. <array c:type="gchar**">
  72139. <type name="utf8"/>
  72140. </array>
  72141. </parameter>
  72142. <parameter name="flags" transfer-ownership="none">
  72143. <doc xml:space="preserve">flags that define the behaviour of the subprocess</doc>
  72144. <type name="SubprocessFlags" c:type="GSubprocessFlags"/>
  72145. </parameter>
  72146. </parameters>
  72147. </constructor>
  72148. <method name="communicate"
  72149. c:identifier="g_subprocess_communicate"
  72150. version="2.40"
  72151. throws="1">
  72152. <doc xml:space="preserve">Communicate with the subprocess until it terminates, and all input
  72153. and output has been completed.
  72154. If @stdin_buf is given, the subprocess must have been created with
  72155. %G_SUBPROCESS_FLAGS_STDIN_PIPE. The given data is fed to the
  72156. stdin of the subprocess and the pipe is closed (ie: EOF).
  72157. At the same time (as not to cause blocking when dealing with large
  72158. amounts of data), if %G_SUBPROCESS_FLAGS_STDOUT_PIPE or
  72159. %G_SUBPROCESS_FLAGS_STDERR_PIPE were used, reads from those
  72160. streams. The data that was read is returned in @stdout and/or
  72161. the @stderr.
  72162. If the subprocess was created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE,
  72163. @stdout_buf will contain the data read from stdout. Otherwise, for
  72164. subprocesses not created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE,
  72165. @stdout_buf will be set to %NULL. Similar provisions apply to
  72166. @stderr_buf and %G_SUBPROCESS_FLAGS_STDERR_PIPE.
  72167. As usual, any output variable may be given as %NULL to ignore it.
  72168. If you desire the stdout and stderr data to be interleaved, create
  72169. the subprocess with %G_SUBPROCESS_FLAGS_STDOUT_PIPE and
  72170. %G_SUBPROCESS_FLAGS_STDERR_MERGE. The merged result will be returned
  72171. in @stdout_buf and @stderr_buf will be set to %NULL.
  72172. In case of any error (including cancellation), %FALSE will be
  72173. returned with @error set. Some or all of the stdin data may have
  72174. been written. Any stdout or stderr data that has been read will be
  72175. discarded. None of the out variables (aside from @error) will have
  72176. been set to anything in particular and should not be inspected.
  72177. In the case that %TRUE is returned, the subprocess has exited and the
  72178. exit status inspection APIs (eg: g_subprocess_get_if_exited(),
  72179. g_subprocess_get_exit_status()) may be used.
  72180. You should not attempt to use any of the subprocess pipes after
  72181. starting this function, since they may be left in strange states,
  72182. even if the operation was cancelled. You should especially not
  72183. attempt to interact with the pipes while the operation is in progress
  72184. (either from another thread or if using the asynchronous version).</doc>
  72185. <return-value transfer-ownership="none">
  72186. <doc xml:space="preserve">%TRUE if successful</doc>
  72187. <type name="gboolean" c:type="gboolean"/>
  72188. </return-value>
  72189. <parameters>
  72190. <instance-parameter name="subprocess" transfer-ownership="none">
  72191. <doc xml:space="preserve">a #GSubprocess</doc>
  72192. <type name="Subprocess" c:type="GSubprocess*"/>
  72193. </instance-parameter>
  72194. <parameter name="stdin_buf"
  72195. transfer-ownership="none"
  72196. nullable="1"
  72197. allow-none="1">
  72198. <doc xml:space="preserve">data to send to the stdin of the subprocess, or %NULL</doc>
  72199. <type name="GLib.Bytes" c:type="GBytes*"/>
  72200. </parameter>
  72201. <parameter name="cancellable"
  72202. transfer-ownership="none"
  72203. nullable="1"
  72204. allow-none="1">
  72205. <doc xml:space="preserve">a #GCancellable</doc>
  72206. <type name="Cancellable" c:type="GCancellable*"/>
  72207. </parameter>
  72208. <parameter name="stdout_buf"
  72209. direction="out"
  72210. caller-allocates="0"
  72211. transfer-ownership="full">
  72212. <doc xml:space="preserve">data read from the subprocess stdout</doc>
  72213. <type name="GLib.Bytes" c:type="GBytes**"/>
  72214. </parameter>
  72215. <parameter name="stderr_buf"
  72216. direction="out"
  72217. caller-allocates="0"
  72218. transfer-ownership="full">
  72219. <doc xml:space="preserve">data read from the subprocess stderr</doc>
  72220. <type name="GLib.Bytes" c:type="GBytes**"/>
  72221. </parameter>
  72222. </parameters>
  72223. </method>
  72224. <method name="communicate_async"
  72225. c:identifier="g_subprocess_communicate_async">
  72226. <doc xml:space="preserve">Asynchronous version of g_subprocess_communicate(). Complete
  72227. invocation with g_subprocess_communicate_finish().</doc>
  72228. <return-value transfer-ownership="none">
  72229. <type name="none" c:type="void"/>
  72230. </return-value>
  72231. <parameters>
  72232. <instance-parameter name="subprocess" transfer-ownership="none">
  72233. <doc xml:space="preserve">Self</doc>
  72234. <type name="Subprocess" c:type="GSubprocess*"/>
  72235. </instance-parameter>
  72236. <parameter name="stdin_buf"
  72237. transfer-ownership="none"
  72238. nullable="1"
  72239. allow-none="1">
  72240. <doc xml:space="preserve">Input data, or %NULL</doc>
  72241. <type name="GLib.Bytes" c:type="GBytes*"/>
  72242. </parameter>
  72243. <parameter name="cancellable"
  72244. transfer-ownership="none"
  72245. nullable="1"
  72246. allow-none="1">
  72247. <doc xml:space="preserve">Cancellable</doc>
  72248. <type name="Cancellable" c:type="GCancellable*"/>
  72249. </parameter>
  72250. <parameter name="callback"
  72251. transfer-ownership="none"
  72252. nullable="1"
  72253. allow-none="1"
  72254. scope="async"
  72255. closure="3">
  72256. <doc xml:space="preserve">Callback</doc>
  72257. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  72258. </parameter>
  72259. <parameter name="user_data"
  72260. transfer-ownership="none"
  72261. nullable="1"
  72262. allow-none="1">
  72263. <doc xml:space="preserve">User data</doc>
  72264. <type name="gpointer" c:type="gpointer"/>
  72265. </parameter>
  72266. </parameters>
  72267. </method>
  72268. <method name="communicate_finish"
  72269. c:identifier="g_subprocess_communicate_finish"
  72270. throws="1">
  72271. <doc xml:space="preserve">Complete an invocation of g_subprocess_communicate_async().</doc>
  72272. <return-value transfer-ownership="none">
  72273. <type name="gboolean" c:type="gboolean"/>
  72274. </return-value>
  72275. <parameters>
  72276. <instance-parameter name="subprocess" transfer-ownership="none">
  72277. <doc xml:space="preserve">Self</doc>
  72278. <type name="Subprocess" c:type="GSubprocess*"/>
  72279. </instance-parameter>
  72280. <parameter name="result" transfer-ownership="none">
  72281. <doc xml:space="preserve">Result</doc>
  72282. <type name="AsyncResult" c:type="GAsyncResult*"/>
  72283. </parameter>
  72284. <parameter name="stdout_buf"
  72285. direction="out"
  72286. caller-allocates="0"
  72287. transfer-ownership="full">
  72288. <doc xml:space="preserve">Return location for stdout data</doc>
  72289. <type name="GLib.Bytes" c:type="GBytes**"/>
  72290. </parameter>
  72291. <parameter name="stderr_buf"
  72292. direction="out"
  72293. caller-allocates="0"
  72294. transfer-ownership="full">
  72295. <doc xml:space="preserve">Return location for stderr data</doc>
  72296. <type name="GLib.Bytes" c:type="GBytes**"/>
  72297. </parameter>
  72298. </parameters>
  72299. </method>
  72300. <method name="communicate_utf8"
  72301. c:identifier="g_subprocess_communicate_utf8"
  72302. throws="1">
  72303. <doc xml:space="preserve">Like g_subprocess_communicate(), but validates the output of the
  72304. process as UTF-8, and returns it as a regular NUL terminated string.</doc>
  72305. <return-value transfer-ownership="none">
  72306. <type name="gboolean" c:type="gboolean"/>
  72307. </return-value>
  72308. <parameters>
  72309. <instance-parameter name="subprocess" transfer-ownership="none">
  72310. <doc xml:space="preserve">a #GSubprocess</doc>
  72311. <type name="Subprocess" c:type="GSubprocess*"/>
  72312. </instance-parameter>
  72313. <parameter name="stdin_buf"
  72314. transfer-ownership="none"
  72315. nullable="1"
  72316. allow-none="1">
  72317. <doc xml:space="preserve">data to send to the stdin of the subprocess, or %NULL</doc>
  72318. <type name="utf8" c:type="const char*"/>
  72319. </parameter>
  72320. <parameter name="cancellable"
  72321. transfer-ownership="none"
  72322. nullable="1"
  72323. allow-none="1">
  72324. <doc xml:space="preserve">a #GCancellable</doc>
  72325. <type name="Cancellable" c:type="GCancellable*"/>
  72326. </parameter>
  72327. <parameter name="stdout_buf"
  72328. direction="out"
  72329. caller-allocates="0"
  72330. transfer-ownership="full">
  72331. <doc xml:space="preserve">data read from the subprocess stdout</doc>
  72332. <type name="utf8" c:type="char**"/>
  72333. </parameter>
  72334. <parameter name="stderr_buf"
  72335. direction="out"
  72336. caller-allocates="0"
  72337. transfer-ownership="full">
  72338. <doc xml:space="preserve">data read from the subprocess stderr</doc>
  72339. <type name="utf8" c:type="char**"/>
  72340. </parameter>
  72341. </parameters>
  72342. </method>
  72343. <method name="communicate_utf8_async"
  72344. c:identifier="g_subprocess_communicate_utf8_async">
  72345. <doc xml:space="preserve">Asynchronous version of g_subprocess_communicate_utf8(). Complete
  72346. invocation with g_subprocess_communicate_utf8_finish().</doc>
  72347. <return-value transfer-ownership="none">
  72348. <type name="none" c:type="void"/>
  72349. </return-value>
  72350. <parameters>
  72351. <instance-parameter name="subprocess" transfer-ownership="none">
  72352. <doc xml:space="preserve">Self</doc>
  72353. <type name="Subprocess" c:type="GSubprocess*"/>
  72354. </instance-parameter>
  72355. <parameter name="stdin_buf"
  72356. transfer-ownership="none"
  72357. nullable="1"
  72358. allow-none="1">
  72359. <doc xml:space="preserve">Input data, or %NULL</doc>
  72360. <type name="utf8" c:type="const char*"/>
  72361. </parameter>
  72362. <parameter name="cancellable"
  72363. transfer-ownership="none"
  72364. nullable="1"
  72365. allow-none="1">
  72366. <doc xml:space="preserve">Cancellable</doc>
  72367. <type name="Cancellable" c:type="GCancellable*"/>
  72368. </parameter>
  72369. <parameter name="callback"
  72370. transfer-ownership="none"
  72371. nullable="1"
  72372. allow-none="1"
  72373. scope="async"
  72374. closure="3">
  72375. <doc xml:space="preserve">Callback</doc>
  72376. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  72377. </parameter>
  72378. <parameter name="user_data"
  72379. transfer-ownership="none"
  72380. nullable="1"
  72381. allow-none="1">
  72382. <doc xml:space="preserve">User data</doc>
  72383. <type name="gpointer" c:type="gpointer"/>
  72384. </parameter>
  72385. </parameters>
  72386. </method>
  72387. <method name="communicate_utf8_finish"
  72388. c:identifier="g_subprocess_communicate_utf8_finish"
  72389. throws="1">
  72390. <doc xml:space="preserve">Complete an invocation of g_subprocess_communicate_utf8_async().</doc>
  72391. <return-value transfer-ownership="none">
  72392. <type name="gboolean" c:type="gboolean"/>
  72393. </return-value>
  72394. <parameters>
  72395. <instance-parameter name="subprocess" transfer-ownership="none">
  72396. <doc xml:space="preserve">Self</doc>
  72397. <type name="Subprocess" c:type="GSubprocess*"/>
  72398. </instance-parameter>
  72399. <parameter name="result" transfer-ownership="none">
  72400. <doc xml:space="preserve">Result</doc>
  72401. <type name="AsyncResult" c:type="GAsyncResult*"/>
  72402. </parameter>
  72403. <parameter name="stdout_buf"
  72404. direction="out"
  72405. caller-allocates="0"
  72406. transfer-ownership="full">
  72407. <doc xml:space="preserve">Return location for stdout data</doc>
  72408. <type name="utf8" c:type="char**"/>
  72409. </parameter>
  72410. <parameter name="stderr_buf"
  72411. direction="out"
  72412. caller-allocates="0"
  72413. transfer-ownership="full">
  72414. <doc xml:space="preserve">Return location for stderr data</doc>
  72415. <type name="utf8" c:type="char**"/>
  72416. </parameter>
  72417. </parameters>
  72418. </method>
  72419. <method name="force_exit"
  72420. c:identifier="g_subprocess_force_exit"
  72421. version="2.40">
  72422. <doc xml:space="preserve">Use an operating-system specific method to attempt an immediate,
  72423. forceful termination of the process. There is no mechanism to
  72424. determine whether or not the request itself was successful;
  72425. however, you can use g_subprocess_wait() to monitor the status of
  72426. the process after calling this function.
  72427. On Unix, this function sends %SIGKILL.</doc>
  72428. <return-value transfer-ownership="none">
  72429. <type name="none" c:type="void"/>
  72430. </return-value>
  72431. <parameters>
  72432. <instance-parameter name="subprocess" transfer-ownership="none">
  72433. <doc xml:space="preserve">a #GSubprocess</doc>
  72434. <type name="Subprocess" c:type="GSubprocess*"/>
  72435. </instance-parameter>
  72436. </parameters>
  72437. </method>
  72438. <method name="get_exit_status"
  72439. c:identifier="g_subprocess_get_exit_status"
  72440. version="2.40">
  72441. <doc xml:space="preserve">Check the exit status of the subprocess, given that it exited
  72442. normally. This is the value passed to the exit() system call or the
  72443. return value from main.
  72444. This is equivalent to the system WEXITSTATUS macro.
  72445. It is an error to call this function before g_subprocess_wait() and
  72446. unless g_subprocess_get_if_exited() returned %TRUE.</doc>
  72447. <return-value transfer-ownership="none">
  72448. <doc xml:space="preserve">the exit status</doc>
  72449. <type name="gint" c:type="gint"/>
  72450. </return-value>
  72451. <parameters>
  72452. <instance-parameter name="subprocess" transfer-ownership="none">
  72453. <doc xml:space="preserve">a #GSubprocess</doc>
  72454. <type name="Subprocess" c:type="GSubprocess*"/>
  72455. </instance-parameter>
  72456. </parameters>
  72457. </method>
  72458. <method name="get_identifier" c:identifier="g_subprocess_get_identifier">
  72459. <doc xml:space="preserve">On UNIX, returns the process ID as a decimal string.
  72460. On Windows, returns the result of GetProcessId() also as a string.</doc>
  72461. <return-value transfer-ownership="none">
  72462. <type name="utf8" c:type="const gchar*"/>
  72463. </return-value>
  72464. <parameters>
  72465. <instance-parameter name="subprocess" transfer-ownership="none">
  72466. <doc xml:space="preserve">a #GSubprocess</doc>
  72467. <type name="Subprocess" c:type="GSubprocess*"/>
  72468. </instance-parameter>
  72469. </parameters>
  72470. </method>
  72471. <method name="get_if_exited"
  72472. c:identifier="g_subprocess_get_if_exited"
  72473. version="2.40">
  72474. <doc xml:space="preserve">Check if the given subprocess exited normally (ie: by way of exit()
  72475. or return from main()).
  72476. This is equivalent to the system WIFEXITED macro.
  72477. It is an error to call this function before g_subprocess_wait() has
  72478. returned.</doc>
  72479. <return-value transfer-ownership="none">
  72480. <doc xml:space="preserve">%TRUE if the case of a normal exit</doc>
  72481. <type name="gboolean" c:type="gboolean"/>
  72482. </return-value>
  72483. <parameters>
  72484. <instance-parameter name="subprocess" transfer-ownership="none">
  72485. <doc xml:space="preserve">a #GSubprocess</doc>
  72486. <type name="Subprocess" c:type="GSubprocess*"/>
  72487. </instance-parameter>
  72488. </parameters>
  72489. </method>
  72490. <method name="get_if_signaled"
  72491. c:identifier="g_subprocess_get_if_signaled"
  72492. version="2.40">
  72493. <doc xml:space="preserve">Check if the given subprocess terminated in response to a signal.
  72494. This is equivalent to the system WIFSIGNALED macro.
  72495. It is an error to call this function before g_subprocess_wait() has
  72496. returned.</doc>
  72497. <return-value transfer-ownership="none">
  72498. <doc xml:space="preserve">%TRUE if the case of termination due to a signal</doc>
  72499. <type name="gboolean" c:type="gboolean"/>
  72500. </return-value>
  72501. <parameters>
  72502. <instance-parameter name="subprocess" transfer-ownership="none">
  72503. <doc xml:space="preserve">a #GSubprocess</doc>
  72504. <type name="Subprocess" c:type="GSubprocess*"/>
  72505. </instance-parameter>
  72506. </parameters>
  72507. </method>
  72508. <method name="get_status"
  72509. c:identifier="g_subprocess_get_status"
  72510. version="2.40">
  72511. <doc xml:space="preserve">Gets the raw status code of the process, as from waitpid().
  72512. This value has no particular meaning, but it can be used with the
  72513. macros defined by the system headers such as WIFEXITED. It can also
  72514. be used with g_spawn_check_exit_status().
  72515. It is more likely that you want to use g_subprocess_get_if_exited()
  72516. followed by g_subprocess_get_exit_status().
  72517. It is an error to call this function before g_subprocess_wait() has
  72518. returned.</doc>
  72519. <return-value transfer-ownership="none">
  72520. <doc xml:space="preserve">the (meaningless) waitpid() exit status from the kernel</doc>
  72521. <type name="gint" c:type="gint"/>
  72522. </return-value>
  72523. <parameters>
  72524. <instance-parameter name="subprocess" transfer-ownership="none">
  72525. <doc xml:space="preserve">a #GSubprocess</doc>
  72526. <type name="Subprocess" c:type="GSubprocess*"/>
  72527. </instance-parameter>
  72528. </parameters>
  72529. </method>
  72530. <method name="get_stderr_pipe"
  72531. c:identifier="g_subprocess_get_stderr_pipe"
  72532. version="2.40">
  72533. <doc xml:space="preserve">Gets the #GInputStream from which to read the stderr output of
  72534. @subprocess.
  72535. The process must have been created with
  72536. %G_SUBPROCESS_FLAGS_STDERR_PIPE.</doc>
  72537. <return-value transfer-ownership="none">
  72538. <doc xml:space="preserve">the stderr pipe</doc>
  72539. <type name="InputStream" c:type="GInputStream*"/>
  72540. </return-value>
  72541. <parameters>
  72542. <instance-parameter name="subprocess" transfer-ownership="none">
  72543. <doc xml:space="preserve">a #GSubprocess</doc>
  72544. <type name="Subprocess" c:type="GSubprocess*"/>
  72545. </instance-parameter>
  72546. </parameters>
  72547. </method>
  72548. <method name="get_stdin_pipe"
  72549. c:identifier="g_subprocess_get_stdin_pipe"
  72550. version="2.40">
  72551. <doc xml:space="preserve">Gets the #GOutputStream that you can write to in order to give data
  72552. to the stdin of @subprocess.
  72553. The process must have been created with
  72554. %G_SUBPROCESS_FLAGS_STDIN_PIPE.</doc>
  72555. <return-value transfer-ownership="none">
  72556. <doc xml:space="preserve">the stdout pipe</doc>
  72557. <type name="OutputStream" c:type="GOutputStream*"/>
  72558. </return-value>
  72559. <parameters>
  72560. <instance-parameter name="subprocess" transfer-ownership="none">
  72561. <doc xml:space="preserve">a #GSubprocess</doc>
  72562. <type name="Subprocess" c:type="GSubprocess*"/>
  72563. </instance-parameter>
  72564. </parameters>
  72565. </method>
  72566. <method name="get_stdout_pipe"
  72567. c:identifier="g_subprocess_get_stdout_pipe"
  72568. version="2.40">
  72569. <doc xml:space="preserve">Gets the #GInputStream from which to read the stdout output of
  72570. @subprocess.
  72571. The process must have been created with
  72572. %G_SUBPROCESS_FLAGS_STDOUT_PIPE.</doc>
  72573. <return-value transfer-ownership="none">
  72574. <doc xml:space="preserve">the stdout pipe</doc>
  72575. <type name="InputStream" c:type="GInputStream*"/>
  72576. </return-value>
  72577. <parameters>
  72578. <instance-parameter name="subprocess" transfer-ownership="none">
  72579. <doc xml:space="preserve">a #GSubprocess</doc>
  72580. <type name="Subprocess" c:type="GSubprocess*"/>
  72581. </instance-parameter>
  72582. </parameters>
  72583. </method>
  72584. <method name="get_successful"
  72585. c:identifier="g_subprocess_get_successful"
  72586. version="2.40">
  72587. <doc xml:space="preserve">Checks if the process was "successful". A process is considered
  72588. successful if it exited cleanly with an exit status of 0, either by
  72589. way of the exit() system call or return from main().
  72590. It is an error to call this function before g_subprocess_wait() has
  72591. returned.</doc>
  72592. <return-value transfer-ownership="none">
  72593. <doc xml:space="preserve">%TRUE if the process exited cleanly with a exit status of 0</doc>
  72594. <type name="gboolean" c:type="gboolean"/>
  72595. </return-value>
  72596. <parameters>
  72597. <instance-parameter name="subprocess" transfer-ownership="none">
  72598. <doc xml:space="preserve">a #GSubprocess</doc>
  72599. <type name="Subprocess" c:type="GSubprocess*"/>
  72600. </instance-parameter>
  72601. </parameters>
  72602. </method>
  72603. <method name="get_term_sig"
  72604. c:identifier="g_subprocess_get_term_sig"
  72605. version="2.40">
  72606. <doc xml:space="preserve">Get the signal number that caused the subprocess to terminate, given
  72607. that it terminated due to a signal.
  72608. This is equivalent to the system WTERMSIG macro.
  72609. It is an error to call this function before g_subprocess_wait() and
  72610. unless g_subprocess_get_if_signaled() returned %TRUE.</doc>
  72611. <return-value transfer-ownership="none">
  72612. <doc xml:space="preserve">the signal causing termination</doc>
  72613. <type name="gint" c:type="gint"/>
  72614. </return-value>
  72615. <parameters>
  72616. <instance-parameter name="subprocess" transfer-ownership="none">
  72617. <doc xml:space="preserve">a #GSubprocess</doc>
  72618. <type name="Subprocess" c:type="GSubprocess*"/>
  72619. </instance-parameter>
  72620. </parameters>
  72621. </method>
  72622. <method name="send_signal"
  72623. c:identifier="g_subprocess_send_signal"
  72624. version="2.40">
  72625. <doc xml:space="preserve">Sends the UNIX signal @signal_num to the subprocess, if it is still
  72626. running.
  72627. This API is race-free. If the subprocess has terminated, it will not
  72628. be signalled.
  72629. This API is not available on Windows.</doc>
  72630. <return-value transfer-ownership="none">
  72631. <type name="none" c:type="void"/>
  72632. </return-value>
  72633. <parameters>
  72634. <instance-parameter name="subprocess" transfer-ownership="none">
  72635. <doc xml:space="preserve">a #GSubprocess</doc>
  72636. <type name="Subprocess" c:type="GSubprocess*"/>
  72637. </instance-parameter>
  72638. <parameter name="signal_num" transfer-ownership="none">
  72639. <doc xml:space="preserve">the signal number to send</doc>
  72640. <type name="gint" c:type="gint"/>
  72641. </parameter>
  72642. </parameters>
  72643. </method>
  72644. <method name="wait"
  72645. c:identifier="g_subprocess_wait"
  72646. version="2.40"
  72647. throws="1">
  72648. <doc xml:space="preserve">Synchronously wait for the subprocess to terminate.
  72649. After the process terminates you can query its exit status with
  72650. functions such as g_subprocess_get_if_exited() and
  72651. g_subprocess_get_exit_status().
  72652. This function does not fail in the case of the subprocess having
  72653. abnormal termination. See g_subprocess_wait_check() for that.
  72654. Cancelling @cancellable doesn't kill the subprocess. Call
  72655. g_subprocess_force_exit() if it is desirable.</doc>
  72656. <return-value transfer-ownership="none">
  72657. <doc xml:space="preserve">%TRUE on success, %FALSE if @cancellable was cancelled</doc>
  72658. <type name="gboolean" c:type="gboolean"/>
  72659. </return-value>
  72660. <parameters>
  72661. <instance-parameter name="subprocess" transfer-ownership="none">
  72662. <doc xml:space="preserve">a #GSubprocess</doc>
  72663. <type name="Subprocess" c:type="GSubprocess*"/>
  72664. </instance-parameter>
  72665. <parameter name="cancellable"
  72666. transfer-ownership="none"
  72667. nullable="1"
  72668. allow-none="1">
  72669. <doc xml:space="preserve">a #GCancellable</doc>
  72670. <type name="Cancellable" c:type="GCancellable*"/>
  72671. </parameter>
  72672. </parameters>
  72673. </method>
  72674. <method name="wait_async"
  72675. c:identifier="g_subprocess_wait_async"
  72676. version="2.40">
  72677. <doc xml:space="preserve">Wait for the subprocess to terminate.
  72678. This is the asynchronous version of g_subprocess_wait().</doc>
  72679. <return-value transfer-ownership="none">
  72680. <type name="none" c:type="void"/>
  72681. </return-value>
  72682. <parameters>
  72683. <instance-parameter name="subprocess" transfer-ownership="none">
  72684. <doc xml:space="preserve">a #GSubprocess</doc>
  72685. <type name="Subprocess" c:type="GSubprocess*"/>
  72686. </instance-parameter>
  72687. <parameter name="cancellable"
  72688. transfer-ownership="none"
  72689. nullable="1"
  72690. allow-none="1">
  72691. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  72692. <type name="Cancellable" c:type="GCancellable*"/>
  72693. </parameter>
  72694. <parameter name="callback"
  72695. transfer-ownership="none"
  72696. nullable="1"
  72697. allow-none="1"
  72698. scope="async"
  72699. closure="2">
  72700. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the operation is complete</doc>
  72701. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  72702. </parameter>
  72703. <parameter name="user_data"
  72704. transfer-ownership="none"
  72705. nullable="1"
  72706. allow-none="1">
  72707. <doc xml:space="preserve">user_data for @callback</doc>
  72708. <type name="gpointer" c:type="gpointer"/>
  72709. </parameter>
  72710. </parameters>
  72711. </method>
  72712. <method name="wait_check"
  72713. c:identifier="g_subprocess_wait_check"
  72714. version="2.40"
  72715. throws="1">
  72716. <doc xml:space="preserve">Combines g_subprocess_wait() with g_spawn_check_exit_status().</doc>
  72717. <return-value transfer-ownership="none">
  72718. <doc xml:space="preserve">%TRUE on success, %FALSE if process exited abnormally, or
  72719. @cancellable was cancelled</doc>
  72720. <type name="gboolean" c:type="gboolean"/>
  72721. </return-value>
  72722. <parameters>
  72723. <instance-parameter name="subprocess" transfer-ownership="none">
  72724. <doc xml:space="preserve">a #GSubprocess</doc>
  72725. <type name="Subprocess" c:type="GSubprocess*"/>
  72726. </instance-parameter>
  72727. <parameter name="cancellable"
  72728. transfer-ownership="none"
  72729. nullable="1"
  72730. allow-none="1">
  72731. <doc xml:space="preserve">a #GCancellable</doc>
  72732. <type name="Cancellable" c:type="GCancellable*"/>
  72733. </parameter>
  72734. </parameters>
  72735. </method>
  72736. <method name="wait_check_async"
  72737. c:identifier="g_subprocess_wait_check_async"
  72738. version="2.40">
  72739. <doc xml:space="preserve">Combines g_subprocess_wait_async() with g_spawn_check_exit_status().
  72740. This is the asynchronous version of g_subprocess_wait_check().</doc>
  72741. <return-value transfer-ownership="none">
  72742. <type name="none" c:type="void"/>
  72743. </return-value>
  72744. <parameters>
  72745. <instance-parameter name="subprocess" transfer-ownership="none">
  72746. <doc xml:space="preserve">a #GSubprocess</doc>
  72747. <type name="Subprocess" c:type="GSubprocess*"/>
  72748. </instance-parameter>
  72749. <parameter name="cancellable"
  72750. transfer-ownership="none"
  72751. nullable="1"
  72752. allow-none="1">
  72753. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  72754. <type name="Cancellable" c:type="GCancellable*"/>
  72755. </parameter>
  72756. <parameter name="callback"
  72757. transfer-ownership="none"
  72758. nullable="1"
  72759. allow-none="1"
  72760. scope="async"
  72761. closure="2">
  72762. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the operation is complete</doc>
  72763. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  72764. </parameter>
  72765. <parameter name="user_data"
  72766. transfer-ownership="none"
  72767. nullable="1"
  72768. allow-none="1">
  72769. <doc xml:space="preserve">user_data for @callback</doc>
  72770. <type name="gpointer" c:type="gpointer"/>
  72771. </parameter>
  72772. </parameters>
  72773. </method>
  72774. <method name="wait_check_finish"
  72775. c:identifier="g_subprocess_wait_check_finish"
  72776. version="2.40"
  72777. throws="1">
  72778. <doc xml:space="preserve">Collects the result of a previous call to
  72779. g_subprocess_wait_check_async().</doc>
  72780. <return-value transfer-ownership="none">
  72781. <doc xml:space="preserve">%TRUE if successful, or %FALSE with @error set</doc>
  72782. <type name="gboolean" c:type="gboolean"/>
  72783. </return-value>
  72784. <parameters>
  72785. <instance-parameter name="subprocess" transfer-ownership="none">
  72786. <doc xml:space="preserve">a #GSubprocess</doc>
  72787. <type name="Subprocess" c:type="GSubprocess*"/>
  72788. </instance-parameter>
  72789. <parameter name="result" transfer-ownership="none">
  72790. <doc xml:space="preserve">the #GAsyncResult passed to your #GAsyncReadyCallback</doc>
  72791. <type name="AsyncResult" c:type="GAsyncResult*"/>
  72792. </parameter>
  72793. </parameters>
  72794. </method>
  72795. <method name="wait_finish"
  72796. c:identifier="g_subprocess_wait_finish"
  72797. version="2.40"
  72798. throws="1">
  72799. <doc xml:space="preserve">Collects the result of a previous call to
  72800. g_subprocess_wait_async().</doc>
  72801. <return-value transfer-ownership="none">
  72802. <doc xml:space="preserve">%TRUE if successful, or %FALSE with @error set</doc>
  72803. <type name="gboolean" c:type="gboolean"/>
  72804. </return-value>
  72805. <parameters>
  72806. <instance-parameter name="subprocess" transfer-ownership="none">
  72807. <doc xml:space="preserve">a #GSubprocess</doc>
  72808. <type name="Subprocess" c:type="GSubprocess*"/>
  72809. </instance-parameter>
  72810. <parameter name="result" transfer-ownership="none">
  72811. <doc xml:space="preserve">the #GAsyncResult passed to your #GAsyncReadyCallback</doc>
  72812. <type name="AsyncResult" c:type="GAsyncResult*"/>
  72813. </parameter>
  72814. </parameters>
  72815. </method>
  72816. <property name="argv"
  72817. readable="0"
  72818. writable="1"
  72819. construct-only="1"
  72820. transfer-ownership="none">
  72821. <array>
  72822. <type name="utf8"/>
  72823. </array>
  72824. </property>
  72825. <property name="flags"
  72826. readable="0"
  72827. writable="1"
  72828. construct-only="1"
  72829. transfer-ownership="none">
  72830. <type name="SubprocessFlags"/>
  72831. </property>
  72832. </class>
  72833. <bitfield name="SubprocessFlags"
  72834. version="2.40"
  72835. glib:type-name="GSubprocessFlags"
  72836. glib:get-type="g_subprocess_flags_get_type"
  72837. c:type="GSubprocessFlags">
  72838. <doc xml:space="preserve">Flags to define the behaviour of a #GSubprocess.
  72839. Note that the default for stdin is to redirect from /dev/null. For
  72840. stdout and stderr the default are for them to inherit the
  72841. corresponding descriptor from the calling process.
  72842. Note that it is a programmer error to mix 'incompatible' flags. For
  72843. example, you may not request both %G_SUBPROCESS_FLAGS_STDOUT_PIPE and
  72844. %G_SUBPROCESS_FLAGS_STDOUT_SILENCE.</doc>
  72845. <member name="none"
  72846. value="0"
  72847. c:identifier="G_SUBPROCESS_FLAGS_NONE"
  72848. glib:nick="none">
  72849. <doc xml:space="preserve">No flags.</doc>
  72850. </member>
  72851. <member name="stdin_pipe"
  72852. value="1"
  72853. c:identifier="G_SUBPROCESS_FLAGS_STDIN_PIPE"
  72854. glib:nick="stdin-pipe">
  72855. <doc xml:space="preserve">create a pipe for the stdin of the
  72856. spawned process that can be accessed with
  72857. g_subprocess_get_stdin_pipe().</doc>
  72858. </member>
  72859. <member name="stdin_inherit"
  72860. value="2"
  72861. c:identifier="G_SUBPROCESS_FLAGS_STDIN_INHERIT"
  72862. glib:nick="stdin-inherit">
  72863. <doc xml:space="preserve">stdin is inherited from the
  72864. calling process.</doc>
  72865. </member>
  72866. <member name="stdout_pipe"
  72867. value="4"
  72868. c:identifier="G_SUBPROCESS_FLAGS_STDOUT_PIPE"
  72869. glib:nick="stdout-pipe">
  72870. <doc xml:space="preserve">create a pipe for the stdout of the
  72871. spawned process that can be accessed with
  72872. g_subprocess_get_stdout_pipe().</doc>
  72873. </member>
  72874. <member name="stdout_silence"
  72875. value="8"
  72876. c:identifier="G_SUBPROCESS_FLAGS_STDOUT_SILENCE"
  72877. glib:nick="stdout-silence">
  72878. <doc xml:space="preserve">silence the stdout of the spawned
  72879. process (ie: redirect to /dev/null).</doc>
  72880. </member>
  72881. <member name="stderr_pipe"
  72882. value="16"
  72883. c:identifier="G_SUBPROCESS_FLAGS_STDERR_PIPE"
  72884. glib:nick="stderr-pipe">
  72885. <doc xml:space="preserve">create a pipe for the stderr of the
  72886. spawned process that can be accessed with
  72887. g_subprocess_get_stderr_pipe().</doc>
  72888. </member>
  72889. <member name="stderr_silence"
  72890. value="32"
  72891. c:identifier="G_SUBPROCESS_FLAGS_STDERR_SILENCE"
  72892. glib:nick="stderr-silence">
  72893. <doc xml:space="preserve">silence the stderr of the spawned
  72894. process (ie: redirect to /dev/null).</doc>
  72895. </member>
  72896. <member name="stderr_merge"
  72897. value="64"
  72898. c:identifier="G_SUBPROCESS_FLAGS_STDERR_MERGE"
  72899. glib:nick="stderr-merge">
  72900. <doc xml:space="preserve">merge the stderr of the spawned
  72901. process with whatever the stdout happens to be. This is a good way
  72902. of directing both streams to a common log file, for example.</doc>
  72903. </member>
  72904. <member name="inherit_fds"
  72905. value="128"
  72906. c:identifier="G_SUBPROCESS_FLAGS_INHERIT_FDS"
  72907. glib:nick="inherit-fds">
  72908. <doc xml:space="preserve">spawned processes will inherit the
  72909. file descriptors of their parent, unless those descriptors have
  72910. been explicitly marked as close-on-exec. This flag has no effect
  72911. over the "standard" file descriptors (stdin, stdout, stderr).</doc>
  72912. </member>
  72913. </bitfield>
  72914. <class name="SubprocessLauncher"
  72915. c:symbol-prefix="subprocess_launcher"
  72916. c:type="GSubprocessLauncher"
  72917. version="2.40"
  72918. parent="GObject.Object"
  72919. glib:type-name="GSubprocessLauncher"
  72920. glib:get-type="g_subprocess_launcher_get_type">
  72921. <doc xml:space="preserve">This class contains a set of options for launching child processes,
  72922. such as where its standard input and output will be directed, the
  72923. argument list, the environment, and more.
  72924. While the #GSubprocess class has high level functions covering
  72925. popular cases, use of this class allows access to more advanced
  72926. options. It can also be used to launch multiple subprocesses with
  72927. a similar configuration.</doc>
  72928. <constructor name="new"
  72929. c:identifier="g_subprocess_launcher_new"
  72930. version="2.40">
  72931. <doc xml:space="preserve">Creates a new #GSubprocessLauncher.
  72932. The launcher is created with the default options. A copy of the
  72933. environment of the calling process is made at the time of this call
  72934. and will be used as the environment that the process is launched in.</doc>
  72935. <return-value transfer-ownership="full">
  72936. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  72937. </return-value>
  72938. <parameters>
  72939. <parameter name="flags" transfer-ownership="none">
  72940. <doc xml:space="preserve">#GSubprocessFlags</doc>
  72941. <type name="SubprocessFlags" c:type="GSubprocessFlags"/>
  72942. </parameter>
  72943. </parameters>
  72944. </constructor>
  72945. <method name="getenv"
  72946. c:identifier="g_subprocess_launcher_getenv"
  72947. version="2.40">
  72948. <doc xml:space="preserve">Returns the value of the environment variable @variable in the
  72949. environment of processes launched from this launcher.
  72950. On UNIX, the returned string can be an arbitrary byte string.
  72951. On Windows, it will be UTF-8.</doc>
  72952. <return-value transfer-ownership="none">
  72953. <doc xml:space="preserve">the value of the environment variable, %NULL if unset</doc>
  72954. <type name="utf8" c:type="const gchar*"/>
  72955. </return-value>
  72956. <parameters>
  72957. <instance-parameter name="self" transfer-ownership="none">
  72958. <doc xml:space="preserve">a #GSubprocess</doc>
  72959. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  72960. </instance-parameter>
  72961. <parameter name="variable" transfer-ownership="none">
  72962. <doc xml:space="preserve">the environment variable to get</doc>
  72963. <type name="utf8" c:type="const gchar*"/>
  72964. </parameter>
  72965. </parameters>
  72966. </method>
  72967. <method name="set_child_setup"
  72968. c:identifier="g_subprocess_launcher_set_child_setup"
  72969. version="2.40">
  72970. <doc xml:space="preserve">Sets up a child setup function.
  72971. The child setup function will be called after fork() but before
  72972. exec() on the child's side.
  72973. @destroy_notify will not be automatically called on the child's side
  72974. of the fork(). It will only be called when the last reference on the
  72975. #GSubprocessLauncher is dropped or when a new child setup function is
  72976. given.
  72977. %NULL can be given as @child_setup to disable the functionality.
  72978. Child setup functions are only available on UNIX.</doc>
  72979. <return-value transfer-ownership="none">
  72980. <type name="none" c:type="void"/>
  72981. </return-value>
  72982. <parameters>
  72983. <instance-parameter name="self" transfer-ownership="none">
  72984. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  72985. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  72986. </instance-parameter>
  72987. <parameter name="child_setup"
  72988. transfer-ownership="none"
  72989. scope="notified"
  72990. closure="1"
  72991. destroy="2">
  72992. <doc xml:space="preserve">a #GSpawnChildSetupFunc to use as the child setup function</doc>
  72993. <type name="GLib.SpawnChildSetupFunc"
  72994. c:type="GSpawnChildSetupFunc"/>
  72995. </parameter>
  72996. <parameter name="user_data"
  72997. transfer-ownership="none"
  72998. nullable="1"
  72999. allow-none="1">
  73000. <doc xml:space="preserve">user data for @child_setup</doc>
  73001. <type name="gpointer" c:type="gpointer"/>
  73002. </parameter>
  73003. <parameter name="destroy_notify"
  73004. transfer-ownership="none"
  73005. scope="async">
  73006. <doc xml:space="preserve">a #GDestroyNotify for @user_data</doc>
  73007. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  73008. </parameter>
  73009. </parameters>
  73010. </method>
  73011. <method name="set_cwd"
  73012. c:identifier="g_subprocess_launcher_set_cwd"
  73013. version="2.40">
  73014. <doc xml:space="preserve">Sets the current working directory that processes will be launched
  73015. with.
  73016. By default processes are launched with the current working directory
  73017. of the launching process at the time of launch.</doc>
  73018. <return-value transfer-ownership="none">
  73019. <type name="none" c:type="void"/>
  73020. </return-value>
  73021. <parameters>
  73022. <instance-parameter name="self" transfer-ownership="none">
  73023. <doc xml:space="preserve">a #GSubprocess</doc>
  73024. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73025. </instance-parameter>
  73026. <parameter name="cwd" transfer-ownership="none">
  73027. <doc xml:space="preserve">the cwd for launched processes</doc>
  73028. <type name="utf8" c:type="const gchar*"/>
  73029. </parameter>
  73030. </parameters>
  73031. </method>
  73032. <method name="set_environ"
  73033. c:identifier="g_subprocess_launcher_set_environ"
  73034. version="2.40">
  73035. <doc xml:space="preserve">Replace the entire environment of processes launched from this
  73036. launcher with the given 'environ' variable.
  73037. Typically you will build this variable by using g_listenv() to copy
  73038. the process 'environ' and using the functions g_environ_setenv(),
  73039. g_environ_unsetenv(), etc.
  73040. As an alternative, you can use g_subprocess_launcher_setenv(),
  73041. g_subprocess_launcher_unsetenv(), etc.
  73042. On UNIX, all strings in this array can be arbitrary byte strings.
  73043. On Windows, they should be in UTF-8.</doc>
  73044. <return-value transfer-ownership="none">
  73045. <type name="none" c:type="void"/>
  73046. </return-value>
  73047. <parameters>
  73048. <instance-parameter name="self" transfer-ownership="none">
  73049. <doc xml:space="preserve">a #GSubprocess</doc>
  73050. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73051. </instance-parameter>
  73052. <parameter name="env" transfer-ownership="none">
  73053. <doc xml:space="preserve">the replacement environment</doc>
  73054. <type name="utf8" c:type="gchar**"/>
  73055. </parameter>
  73056. </parameters>
  73057. </method>
  73058. <method name="set_flags"
  73059. c:identifier="g_subprocess_launcher_set_flags"
  73060. version="2.40">
  73061. <doc xml:space="preserve">Sets the flags on the launcher.
  73062. The default flags are %G_SUBPROCESS_FLAGS_NONE.
  73063. You may not set flags that specify conflicting options for how to
  73064. handle a particular stdio stream (eg: specifying both
  73065. %G_SUBPROCESS_FLAGS_STDIN_PIPE and
  73066. %G_SUBPROCESS_FLAGS_STDIN_INHERIT).
  73067. You may also not set a flag that conflicts with a previous call to a
  73068. function like g_subprocess_launcher_set_stdin_file_path() or
  73069. g_subprocess_launcher_take_stdout_fd().</doc>
  73070. <return-value transfer-ownership="none">
  73071. <type name="none" c:type="void"/>
  73072. </return-value>
  73073. <parameters>
  73074. <instance-parameter name="self" transfer-ownership="none">
  73075. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73076. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73077. </instance-parameter>
  73078. <parameter name="flags" transfer-ownership="none">
  73079. <doc xml:space="preserve">#GSubprocessFlags</doc>
  73080. <type name="SubprocessFlags" c:type="GSubprocessFlags"/>
  73081. </parameter>
  73082. </parameters>
  73083. </method>
  73084. <method name="set_stderr_file_path"
  73085. c:identifier="g_subprocess_launcher_set_stderr_file_path"
  73086. version="2.40">
  73087. <doc xml:space="preserve">Sets the file path to use as the stderr for spawned processes.
  73088. If @path is %NULL then any previously given path is unset.
  73089. The file will be created or truncated when the process is spawned, as
  73090. would be the case if using '2&gt;' at the shell.
  73091. If you want to send both stdout and stderr to the same file then use
  73092. %G_SUBPROCESS_FLAGS_STDERR_MERGE.
  73093. You may not set a stderr file path if a stderr fd is already set or
  73094. if the launcher flags contain any flags directing stderr elsewhere.
  73095. This feature is only available on UNIX.</doc>
  73096. <return-value transfer-ownership="none">
  73097. <type name="none" c:type="void"/>
  73098. </return-value>
  73099. <parameters>
  73100. <instance-parameter name="self" transfer-ownership="none">
  73101. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73102. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73103. </instance-parameter>
  73104. <parameter name="path" transfer-ownership="none">
  73105. <doc xml:space="preserve">a filename or %NULL</doc>
  73106. <type name="utf8" c:type="const gchar*"/>
  73107. </parameter>
  73108. </parameters>
  73109. </method>
  73110. <method name="set_stdin_file_path"
  73111. c:identifier="g_subprocess_launcher_set_stdin_file_path"
  73112. version="2.40">
  73113. <doc xml:space="preserve">Sets the file path to use as the stdin for spawned processes.
  73114. If @path is %NULL then any previously given path is unset.
  73115. The file must exist or spawning the process will fail.
  73116. You may not set a stdin file path if a stdin fd is already set or if
  73117. the launcher flags contain any flags directing stdin elsewhere.
  73118. This feature is only available on UNIX.</doc>
  73119. <return-value transfer-ownership="none">
  73120. <type name="none" c:type="void"/>
  73121. </return-value>
  73122. <parameters>
  73123. <instance-parameter name="self" transfer-ownership="none">
  73124. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73125. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73126. </instance-parameter>
  73127. <parameter name="path" transfer-ownership="none">
  73128. <doc xml:space="preserve">a filename or %NULL</doc>
  73129. <type name="utf8" c:type="const gchar*"/>
  73130. </parameter>
  73131. </parameters>
  73132. </method>
  73133. <method name="set_stdout_file_path"
  73134. c:identifier="g_subprocess_launcher_set_stdout_file_path"
  73135. version="2.40">
  73136. <doc xml:space="preserve">Sets the file path to use as the stdout for spawned processes.
  73137. If @path is %NULL then any previously given path is unset.
  73138. The file will be created or truncated when the process is spawned, as
  73139. would be the case if using '&gt;' at the shell.
  73140. You may not set a stdout file path if a stdout fd is already set or
  73141. if the launcher flags contain any flags directing stdout elsewhere.
  73142. This feature is only available on UNIX.</doc>
  73143. <return-value transfer-ownership="none">
  73144. <type name="none" c:type="void"/>
  73145. </return-value>
  73146. <parameters>
  73147. <instance-parameter name="self" transfer-ownership="none">
  73148. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73149. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73150. </instance-parameter>
  73151. <parameter name="path" transfer-ownership="none">
  73152. <doc xml:space="preserve">a filename or %NULL</doc>
  73153. <type name="utf8" c:type="const gchar*"/>
  73154. </parameter>
  73155. </parameters>
  73156. </method>
  73157. <method name="setenv"
  73158. c:identifier="g_subprocess_launcher_setenv"
  73159. version="2.40">
  73160. <doc xml:space="preserve">Sets the environment variable @variable in the environment of
  73161. processes launched from this launcher.
  73162. On UNIX, both the variable's name and value can be arbitrary byte
  73163. strings, except that the variable's name cannot contain '='.
  73164. On Windows, they should be in UTF-8.</doc>
  73165. <return-value transfer-ownership="none">
  73166. <type name="none" c:type="void"/>
  73167. </return-value>
  73168. <parameters>
  73169. <instance-parameter name="self" transfer-ownership="none">
  73170. <doc xml:space="preserve">a #GSubprocess</doc>
  73171. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73172. </instance-parameter>
  73173. <parameter name="variable" transfer-ownership="none">
  73174. <doc xml:space="preserve">the environment variable to set, must not contain '='</doc>
  73175. <type name="utf8" c:type="const gchar*"/>
  73176. </parameter>
  73177. <parameter name="value" transfer-ownership="none">
  73178. <doc xml:space="preserve">the new value for the variable</doc>
  73179. <type name="utf8" c:type="const gchar*"/>
  73180. </parameter>
  73181. <parameter name="overwrite" transfer-ownership="none">
  73182. <doc xml:space="preserve">whether to change the variable if it already exists</doc>
  73183. <type name="gboolean" c:type="gboolean"/>
  73184. </parameter>
  73185. </parameters>
  73186. </method>
  73187. <method name="spawn"
  73188. c:identifier="g_subprocess_launcher_spawn"
  73189. version="2.40"
  73190. introspectable="0">
  73191. <doc xml:space="preserve">Creates a #GSubprocess given a provided varargs list of arguments.</doc>
  73192. <return-value transfer-ownership="full">
  73193. <doc xml:space="preserve">A new #GSubprocess, or %NULL on error (and @error will be set)</doc>
  73194. <type name="Subprocess" c:type="GSubprocess*"/>
  73195. </return-value>
  73196. <parameters>
  73197. <instance-parameter name="self" transfer-ownership="none">
  73198. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73199. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73200. </instance-parameter>
  73201. <parameter name="error" transfer-ownership="none">
  73202. <doc xml:space="preserve">Error</doc>
  73203. <type name="GLib.Error" c:type="GError**"/>
  73204. </parameter>
  73205. <parameter name="argv0" transfer-ownership="none">
  73206. <doc xml:space="preserve">Command line arguments</doc>
  73207. <type name="utf8" c:type="const gchar*"/>
  73208. </parameter>
  73209. <parameter name="..." transfer-ownership="none">
  73210. <doc xml:space="preserve">Continued arguments, %NULL terminated</doc>
  73211. <varargs/>
  73212. </parameter>
  73213. </parameters>
  73214. </method>
  73215. <method name="spawnv"
  73216. c:identifier="g_subprocess_launcher_spawnv"
  73217. version="2.40"
  73218. throws="1">
  73219. <doc xml:space="preserve">Creates a #GSubprocess given a provided array of arguments.</doc>
  73220. <return-value transfer-ownership="full">
  73221. <doc xml:space="preserve">A new #GSubprocess, or %NULL on error (and @error will be set)</doc>
  73222. <type name="Subprocess" c:type="GSubprocess*"/>
  73223. </return-value>
  73224. <parameters>
  73225. <instance-parameter name="self" transfer-ownership="none">
  73226. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73227. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73228. </instance-parameter>
  73229. <parameter name="argv" transfer-ownership="none">
  73230. <doc xml:space="preserve">Command line arguments</doc>
  73231. <array c:type="gchar**">
  73232. <type name="utf8"/>
  73233. </array>
  73234. </parameter>
  73235. </parameters>
  73236. </method>
  73237. <method name="take_fd" c:identifier="g_subprocess_launcher_take_fd">
  73238. <doc xml:space="preserve">Transfer an arbitrary file descriptor from parent process to the
  73239. child. This function takes "ownership" of the fd; it will be closed
  73240. in the parent when @self is freed.
  73241. By default, all file descriptors from the parent will be closed.
  73242. This function allows you to create (for example) a custom pipe() or
  73243. socketpair() before launching the process, and choose the target
  73244. descriptor in the child.
  73245. An example use case is GNUPG, which has a command line argument
  73246. --passphrase-fd providing a file descriptor number where it expects
  73247. the passphrase to be written.</doc>
  73248. <return-value transfer-ownership="none">
  73249. <type name="none" c:type="void"/>
  73250. </return-value>
  73251. <parameters>
  73252. <instance-parameter name="self" transfer-ownership="none">
  73253. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73254. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73255. </instance-parameter>
  73256. <parameter name="source_fd" transfer-ownership="none">
  73257. <doc xml:space="preserve">File descriptor in parent process</doc>
  73258. <type name="gint" c:type="gint"/>
  73259. </parameter>
  73260. <parameter name="target_fd" transfer-ownership="none">
  73261. <doc xml:space="preserve">Target descriptor for child process</doc>
  73262. <type name="gint" c:type="gint"/>
  73263. </parameter>
  73264. </parameters>
  73265. </method>
  73266. <method name="take_stderr_fd"
  73267. c:identifier="g_subprocess_launcher_take_stderr_fd"
  73268. version="2.40">
  73269. <doc xml:space="preserve">Sets the file descriptor to use as the stderr for spawned processes.
  73270. If @fd is -1 then any previously given fd is unset.
  73271. Note that the default behaviour is to pass stderr through to the
  73272. stderr of the parent process.
  73273. The passed @fd belongs to the #GSubprocessLauncher. It will be
  73274. automatically closed when the launcher is finalized. The file
  73275. descriptor will also be closed on the child side when executing the
  73276. spawned process.
  73277. You may not set a stderr fd if a stderr file path is already set or
  73278. if the launcher flags contain any flags directing stderr elsewhere.
  73279. This feature is only available on UNIX.</doc>
  73280. <return-value transfer-ownership="none">
  73281. <type name="none" c:type="void"/>
  73282. </return-value>
  73283. <parameters>
  73284. <instance-parameter name="self" transfer-ownership="none">
  73285. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73286. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73287. </instance-parameter>
  73288. <parameter name="fd" transfer-ownership="none">
  73289. <doc xml:space="preserve">a file descriptor, or -1</doc>
  73290. <type name="gint" c:type="gint"/>
  73291. </parameter>
  73292. </parameters>
  73293. </method>
  73294. <method name="take_stdin_fd"
  73295. c:identifier="g_subprocess_launcher_take_stdin_fd"
  73296. version="2.40">
  73297. <doc xml:space="preserve">Sets the file descriptor to use as the stdin for spawned processes.
  73298. If @fd is -1 then any previously given fd is unset.
  73299. Note that if your intention is to have the stdin of the calling
  73300. process inherited by the child then %G_SUBPROCESS_FLAGS_STDIN_INHERIT
  73301. is a better way to go about doing that.
  73302. The passed @fd is noted but will not be touched in the current
  73303. process. It is therefore necessary that it be kept open by the
  73304. caller until the subprocess is spawned. The file descriptor will
  73305. also not be explicitly closed on the child side, so it must be marked
  73306. O_CLOEXEC if that's what you want.
  73307. You may not set a stdin fd if a stdin file path is already set or if
  73308. the launcher flags contain any flags directing stdin elsewhere.
  73309. This feature is only available on UNIX.</doc>
  73310. <return-value transfer-ownership="none">
  73311. <type name="none" c:type="void"/>
  73312. </return-value>
  73313. <parameters>
  73314. <instance-parameter name="self" transfer-ownership="none">
  73315. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73316. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73317. </instance-parameter>
  73318. <parameter name="fd" transfer-ownership="none">
  73319. <doc xml:space="preserve">a file descriptor, or -1</doc>
  73320. <type name="gint" c:type="gint"/>
  73321. </parameter>
  73322. </parameters>
  73323. </method>
  73324. <method name="take_stdout_fd"
  73325. c:identifier="g_subprocess_launcher_take_stdout_fd"
  73326. version="2.40">
  73327. <doc xml:space="preserve">Sets the file descriptor to use as the stdout for spawned processes.
  73328. If @fd is -1 then any previously given fd is unset.
  73329. Note that the default behaviour is to pass stdout through to the
  73330. stdout of the parent process.
  73331. The passed @fd is noted but will not be touched in the current
  73332. process. It is therefore necessary that it be kept open by the
  73333. caller until the subprocess is spawned. The file descriptor will
  73334. also not be explicitly closed on the child side, so it must be marked
  73335. O_CLOEXEC if that's what you want.
  73336. You may not set a stdout fd if a stdout file path is already set or
  73337. if the launcher flags contain any flags directing stdout elsewhere.
  73338. This feature is only available on UNIX.</doc>
  73339. <return-value transfer-ownership="none">
  73340. <type name="none" c:type="void"/>
  73341. </return-value>
  73342. <parameters>
  73343. <instance-parameter name="self" transfer-ownership="none">
  73344. <doc xml:space="preserve">a #GSubprocessLauncher</doc>
  73345. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73346. </instance-parameter>
  73347. <parameter name="fd" transfer-ownership="none">
  73348. <doc xml:space="preserve">a file descriptor, or -1</doc>
  73349. <type name="gint" c:type="gint"/>
  73350. </parameter>
  73351. </parameters>
  73352. </method>
  73353. <method name="unsetenv"
  73354. c:identifier="g_subprocess_launcher_unsetenv"
  73355. version="2.40">
  73356. <doc xml:space="preserve">Removes the environment variable @variable from the environment of
  73357. processes launched from this launcher.
  73358. On UNIX, the variable's name can be an arbitrary byte string not
  73359. containing '='. On Windows, it should be in UTF-8.</doc>
  73360. <return-value transfer-ownership="none">
  73361. <type name="none" c:type="void"/>
  73362. </return-value>
  73363. <parameters>
  73364. <instance-parameter name="self" transfer-ownership="none">
  73365. <doc xml:space="preserve">a #GSubprocess</doc>
  73366. <type name="SubprocessLauncher" c:type="GSubprocessLauncher*"/>
  73367. </instance-parameter>
  73368. <parameter name="variable" transfer-ownership="none">
  73369. <doc xml:space="preserve">the environment variable to unset, must not contain '='</doc>
  73370. <type name="utf8" c:type="const gchar*"/>
  73371. </parameter>
  73372. </parameters>
  73373. </method>
  73374. <property name="flags"
  73375. readable="0"
  73376. writable="1"
  73377. construct-only="1"
  73378. transfer-ownership="none">
  73379. <type name="SubprocessFlags"/>
  73380. </property>
  73381. </class>
  73382. <constant name="TLS_BACKEND_EXTENSION_POINT_NAME"
  73383. value="gio-tls-backend"
  73384. c:type="G_TLS_BACKEND_EXTENSION_POINT_NAME">
  73385. <doc xml:space="preserve">Extension point for TLS functionality via #GTlsBackend.
  73386. See [Extending GIO][extending-gio].</doc>
  73387. <type name="utf8" c:type="gchar*"/>
  73388. </constant>
  73389. <constant name="TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT"
  73390. value="1.3.6.1.5.5.7.3.2"
  73391. c:type="G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT">
  73392. <doc xml:space="preserve">The purpose used to verify the client certificate in a TLS connection.
  73393. Used by TLS servers.</doc>
  73394. <type name="utf8" c:type="gchar*"/>
  73395. </constant>
  73396. <constant name="TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER"
  73397. value="1.3.6.1.5.5.7.3.1"
  73398. c:type="G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER">
  73399. <doc xml:space="preserve">The purpose used to verify the server certificate in a TLS connection. This
  73400. is the most common purpose in use. Used by TLS clients.</doc>
  73401. <type name="utf8" c:type="gchar*"/>
  73402. </constant>
  73403. <class name="Task"
  73404. c:symbol-prefix="task"
  73405. c:type="GTask"
  73406. parent="GObject.Object"
  73407. glib:type-name="GTask"
  73408. glib:get-type="g_task_get_type"
  73409. glib:type-struct="TaskClass">
  73410. <doc xml:space="preserve">A #GTask represents and manages a cancellable "task".
  73411. ## Asynchronous operations
  73412. The most common usage of #GTask is as a #GAsyncResult, to
  73413. manage data during an asynchronous operation. You call
  73414. g_task_new() in the "start" method, followed by
  73415. g_task_set_task_data() and the like if you need to keep some
  73416. additional data associated with the task, and then pass the
  73417. task object around through your asynchronous operation.
  73418. Eventually, you will call a method such as
  73419. g_task_return_pointer() or g_task_return_error(), which will
  73420. save the value you give it and then invoke the task's callback
  73421. function (waiting until the next iteration of the main
  73422. loop first, if necessary). The caller will pass the #GTask back
  73423. to the operation's finish function (as a #GAsyncResult), and
  73424. you can use g_task_propagate_pointer() or the like to extract
  73425. the return value.
  73426. Here is an example for using GTask as a GAsyncResult:
  73427. |[&lt;!-- language="C" --&gt;
  73428. typedef struct {
  73429. CakeFrostingType frosting;
  73430. char *message;
  73431. } DecorationData;
  73432. static void
  73433. decoration_data_free (DecorationData *decoration)
  73434. {
  73435. g_free (decoration-&gt;message);
  73436. g_slice_free (DecorationData, decoration);
  73437. }
  73438. static void
  73439. baked_cb (Cake *cake,
  73440. gpointer user_data)
  73441. {
  73442. GTask *task = user_data;
  73443. DecorationData *decoration = g_task_get_task_data (task);
  73444. GError *error = NULL;
  73445. if (cake == NULL)
  73446. {
  73447. g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR,
  73448. "Go to the supermarket");
  73449. g_object_unref (task);
  73450. return;
  73451. }
  73452. if (!cake_decorate (cake, decoration-&gt;frosting, decoration-&gt;message, &amp;error))
  73453. {
  73454. g_object_unref (cake);
  73455. // g_task_return_error() takes ownership of error
  73456. g_task_return_error (task, error);
  73457. g_object_unref (task);
  73458. return;
  73459. }
  73460. g_task_return_pointer (task, cake, g_object_unref);
  73461. g_object_unref (task);
  73462. }
  73463. void
  73464. baker_bake_cake_async (Baker *self,
  73465. guint radius,
  73466. CakeFlavor flavor,
  73467. CakeFrostingType frosting,
  73468. const char *message,
  73469. GCancellable *cancellable,
  73470. GAsyncReadyCallback callback,
  73471. gpointer user_data)
  73472. {
  73473. GTask *task;
  73474. DecorationData *decoration;
  73475. Cake *cake;
  73476. task = g_task_new (self, cancellable, callback, user_data);
  73477. if (radius &lt; 3)
  73478. {
  73479. g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_TOO_SMALL,
  73480. "%ucm radius cakes are silly",
  73481. radius);
  73482. g_object_unref (task);
  73483. return;
  73484. }
  73485. cake = _baker_get_cached_cake (self, radius, flavor, frosting, message);
  73486. if (cake != NULL)
  73487. {
  73488. // _baker_get_cached_cake() returns a reffed cake
  73489. g_task_return_pointer (task, cake, g_object_unref);
  73490. g_object_unref (task);
  73491. return;
  73492. }
  73493. decoration = g_slice_new (DecorationData);
  73494. decoration-&gt;frosting = frosting;
  73495. decoration-&gt;message = g_strdup (message);
  73496. g_task_set_task_data (task, decoration, (GDestroyNotify) decoration_data_free);
  73497. _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task);
  73498. }
  73499. Cake *
  73500. baker_bake_cake_finish (Baker *self,
  73501. GAsyncResult *result,
  73502. GError **error)
  73503. {
  73504. g_return_val_if_fail (g_task_is_valid (result, self), NULL);
  73505. return g_task_propagate_pointer (G_TASK (result), error);
  73506. }
  73507. ]|
  73508. ## Chained asynchronous operations
  73509. #GTask also tries to simplify asynchronous operations that
  73510. internally chain together several smaller asynchronous
  73511. operations. g_task_get_cancellable(), g_task_get_context(),
  73512. and g_task_get_priority() allow you to get back the task's
  73513. #GCancellable, #GMainContext, and [I/O priority][io-priority]
  73514. when starting a new subtask, so you don't have to keep track
  73515. of them yourself. g_task_attach_source() simplifies the case
  73516. of waiting for a source to fire (automatically using the correct
  73517. #GMainContext and priority).
  73518. Here is an example for chained asynchronous operations:
  73519. |[&lt;!-- language="C" --&gt;
  73520. typedef struct {
  73521. Cake *cake;
  73522. CakeFrostingType frosting;
  73523. char *message;
  73524. } BakingData;
  73525. static void
  73526. decoration_data_free (BakingData *bd)
  73527. {
  73528. if (bd-&gt;cake)
  73529. g_object_unref (bd-&gt;cake);
  73530. g_free (bd-&gt;message);
  73531. g_slice_free (BakingData, bd);
  73532. }
  73533. static void
  73534. decorated_cb (Cake *cake,
  73535. GAsyncResult *result,
  73536. gpointer user_data)
  73537. {
  73538. GTask *task = user_data;
  73539. GError *error = NULL;
  73540. if (!cake_decorate_finish (cake, result, &amp;error))
  73541. {
  73542. g_object_unref (cake);
  73543. g_task_return_error (task, error);
  73544. g_object_unref (task);
  73545. return;
  73546. }
  73547. // baking_data_free() will drop its ref on the cake, so we have to
  73548. // take another here to give to the caller.
  73549. g_task_return_pointer (task, g_object_ref (cake), g_object_unref);
  73550. g_object_unref (task);
  73551. }
  73552. static gboolean
  73553. decorator_ready (gpointer user_data)
  73554. {
  73555. GTask *task = user_data;
  73556. BakingData *bd = g_task_get_task_data (task);
  73557. cake_decorate_async (bd-&gt;cake, bd-&gt;frosting, bd-&gt;message,
  73558. g_task_get_cancellable (task),
  73559. decorated_cb, task);
  73560. return G_SOURCE_REMOVE;
  73561. }
  73562. static void
  73563. baked_cb (Cake *cake,
  73564. gpointer user_data)
  73565. {
  73566. GTask *task = user_data;
  73567. BakingData *bd = g_task_get_task_data (task);
  73568. GError *error = NULL;
  73569. if (cake == NULL)
  73570. {
  73571. g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR,
  73572. "Go to the supermarket");
  73573. g_object_unref (task);
  73574. return;
  73575. }
  73576. bd-&gt;cake = cake;
  73577. // Bail out now if the user has already cancelled
  73578. if (g_task_return_error_if_cancelled (task))
  73579. {
  73580. g_object_unref (task);
  73581. return;
  73582. }
  73583. if (cake_decorator_available (cake))
  73584. decorator_ready (task);
  73585. else
  73586. {
  73587. GSource *source;
  73588. source = cake_decorator_wait_source_new (cake);
  73589. // Attach @source to @task's GMainContext and have it call
  73590. // decorator_ready() when it is ready.
  73591. g_task_attach_source (task, source, decorator_ready);
  73592. g_source_unref (source);
  73593. }
  73594. }
  73595. void
  73596. baker_bake_cake_async (Baker *self,
  73597. guint radius,
  73598. CakeFlavor flavor,
  73599. CakeFrostingType frosting,
  73600. const char *message,
  73601. gint priority,
  73602. GCancellable *cancellable,
  73603. GAsyncReadyCallback callback,
  73604. gpointer user_data)
  73605. {
  73606. GTask *task;
  73607. BakingData *bd;
  73608. task = g_task_new (self, cancellable, callback, user_data);
  73609. g_task_set_priority (task, priority);
  73610. bd = g_slice_new0 (BakingData);
  73611. bd-&gt;frosting = frosting;
  73612. bd-&gt;message = g_strdup (message);
  73613. g_task_set_task_data (task, bd, (GDestroyNotify) baking_data_free);
  73614. _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task);
  73615. }
  73616. Cake *
  73617. baker_bake_cake_finish (Baker *self,
  73618. GAsyncResult *result,
  73619. GError **error)
  73620. {
  73621. g_return_val_if_fail (g_task_is_valid (result, self), NULL);
  73622. return g_task_propagate_pointer (G_TASK (result), error);
  73623. }
  73624. ]|
  73625. ## Asynchronous operations from synchronous ones
  73626. You can use g_task_run_in_thread() to turn a synchronous
  73627. operation into an asynchronous one, by running it in a thread
  73628. which will then dispatch the result back to the caller's
  73629. #GMainContext when it completes.
  73630. Running a task in a thread:
  73631. |[&lt;!-- language="C" --&gt;
  73632. typedef struct {
  73633. guint radius;
  73634. CakeFlavor flavor;
  73635. CakeFrostingType frosting;
  73636. char *message;
  73637. } CakeData;
  73638. static void
  73639. cake_data_free (CakeData *cake_data)
  73640. {
  73641. g_free (cake_data-&gt;message);
  73642. g_slice_free (CakeData, cake_data);
  73643. }
  73644. static void
  73645. bake_cake_thread (GTask *task,
  73646. gpointer source_object,
  73647. gpointer task_data,
  73648. GCancellable *cancellable)
  73649. {
  73650. Baker *self = source_object;
  73651. CakeData *cake_data = task_data;
  73652. Cake *cake;
  73653. GError *error = NULL;
  73654. cake = bake_cake (baker, cake_data-&gt;radius, cake_data-&gt;flavor,
  73655. cake_data-&gt;frosting, cake_data-&gt;message,
  73656. cancellable, &amp;error);
  73657. if (cake)
  73658. g_task_return_pointer (task, cake, g_object_unref);
  73659. else
  73660. g_task_return_error (task, error);
  73661. }
  73662. void
  73663. baker_bake_cake_async (Baker *self,
  73664. guint radius,
  73665. CakeFlavor flavor,
  73666. CakeFrostingType frosting,
  73667. const char *message,
  73668. GCancellable *cancellable,
  73669. GAsyncReadyCallback callback,
  73670. gpointer user_data)
  73671. {
  73672. CakeData *cake_data;
  73673. GTask *task;
  73674. cake_data = g_slice_new (CakeData);
  73675. cake_data-&gt;radius = radius;
  73676. cake_data-&gt;flavor = flavor;
  73677. cake_data-&gt;frosting = frosting;
  73678. cake_data-&gt;message = g_strdup (message);
  73679. task = g_task_new (self, cancellable, callback, user_data);
  73680. g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
  73681. g_task_run_in_thread (task, bake_cake_thread);
  73682. g_object_unref (task);
  73683. }
  73684. Cake *
  73685. baker_bake_cake_finish (Baker *self,
  73686. GAsyncResult *result,
  73687. GError **error)
  73688. {
  73689. g_return_val_if_fail (g_task_is_valid (result, self), NULL);
  73690. return g_task_propagate_pointer (G_TASK (result), error);
  73691. }
  73692. ]|
  73693. ## Adding cancellability to uncancellable tasks
  73694. Finally, g_task_run_in_thread() and g_task_run_in_thread_sync()
  73695. can be used to turn an uncancellable operation into a
  73696. cancellable one. If you call g_task_set_return_on_cancel(),
  73697. passing %TRUE, then if the task's #GCancellable is cancelled,
  73698. it will return control back to the caller immediately, while
  73699. allowing the task thread to continue running in the background
  73700. (and simply discarding its result when it finally does finish).
  73701. Provided that the task thread is careful about how it uses
  73702. locks and other externally-visible resources, this allows you
  73703. to make "GLib-friendly" asynchronous and cancellable
  73704. synchronous variants of blocking APIs.
  73705. Cancelling a task:
  73706. |[&lt;!-- language="C" --&gt;
  73707. static void
  73708. bake_cake_thread (GTask *task,
  73709. gpointer source_object,
  73710. gpointer task_data,
  73711. GCancellable *cancellable)
  73712. {
  73713. Baker *self = source_object;
  73714. CakeData *cake_data = task_data;
  73715. Cake *cake;
  73716. GError *error = NULL;
  73717. cake = bake_cake (baker, cake_data-&gt;radius, cake_data-&gt;flavor,
  73718. cake_data-&gt;frosting, cake_data-&gt;message,
  73719. &amp;error);
  73720. if (error)
  73721. {
  73722. g_task_return_error (task, error);
  73723. return;
  73724. }
  73725. // If the task has already been cancelled, then we don't want to add
  73726. // the cake to the cake cache. Likewise, we don't want to have the
  73727. // task get cancelled in the middle of updating the cache.
  73728. // g_task_set_return_on_cancel() will return %TRUE here if it managed
  73729. // to disable return-on-cancel, or %FALSE if the task was cancelled
  73730. // before it could.
  73731. if (g_task_set_return_on_cancel (task, FALSE))
  73732. {
  73733. // If the caller cancels at this point, their
  73734. // GAsyncReadyCallback won't be invoked until we return,
  73735. // so we don't have to worry that this code will run at
  73736. // the same time as that code does. But if there were
  73737. // other functions that might look at the cake cache,
  73738. // then we'd probably need a GMutex here as well.
  73739. baker_add_cake_to_cache (baker, cake);
  73740. g_task_return_pointer (task, cake, g_object_unref);
  73741. }
  73742. }
  73743. void
  73744. baker_bake_cake_async (Baker *self,
  73745. guint radius,
  73746. CakeFlavor flavor,
  73747. CakeFrostingType frosting,
  73748. const char *message,
  73749. GCancellable *cancellable,
  73750. GAsyncReadyCallback callback,
  73751. gpointer user_data)
  73752. {
  73753. CakeData *cake_data;
  73754. GTask *task;
  73755. cake_data = g_slice_new (CakeData);
  73756. ...
  73757. task = g_task_new (self, cancellable, callback, user_data);
  73758. g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
  73759. g_task_set_return_on_cancel (task, TRUE);
  73760. g_task_run_in_thread (task, bake_cake_thread);
  73761. }
  73762. Cake *
  73763. baker_bake_cake_sync (Baker *self,
  73764. guint radius,
  73765. CakeFlavor flavor,
  73766. CakeFrostingType frosting,
  73767. const char *message,
  73768. GCancellable *cancellable,
  73769. GError **error)
  73770. {
  73771. CakeData *cake_data;
  73772. GTask *task;
  73773. Cake *cake;
  73774. cake_data = g_slice_new (CakeData);
  73775. ...
  73776. task = g_task_new (self, cancellable, NULL, NULL);
  73777. g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
  73778. g_task_set_return_on_cancel (task, TRUE);
  73779. g_task_run_in_thread_sync (task, bake_cake_thread);
  73780. cake = g_task_propagate_pointer (task, error);
  73781. g_object_unref (task);
  73782. return cake;
  73783. }
  73784. ]|
  73785. ## Porting from GSimpleAsyncResult
  73786. #GTask's API attempts to be simpler than #GSimpleAsyncResult's
  73787. in several ways:
  73788. - You can save task-specific data with g_task_set_task_data(), and
  73789. retrieve it later with g_task_get_task_data(). This replaces the
  73790. abuse of g_simple_async_result_set_op_res_gpointer() for the same
  73791. purpose with #GSimpleAsyncResult.
  73792. - In addition to the task data, #GTask also keeps track of the
  73793. [priority][io-priority], #GCancellable, and
  73794. #GMainContext associated with the task, so tasks that consist of
  73795. a chain of simpler asynchronous operations will have easy access
  73796. to those values when starting each sub-task.
  73797. - g_task_return_error_if_cancelled() provides simplified
  73798. handling for cancellation. In addition, cancellation
  73799. overrides any other #GTask return value by default, like
  73800. #GSimpleAsyncResult does when
  73801. g_simple_async_result_set_check_cancellable() is called.
  73802. (You can use g_task_set_check_cancellable() to turn off that
  73803. behavior.) On the other hand, g_task_run_in_thread()
  73804. guarantees that it will always run your
  73805. `task_func`, even if the task's #GCancellable
  73806. is already cancelled before the task gets a chance to run;
  73807. you can start your `task_func` with a
  73808. g_task_return_error_if_cancelled() check if you need the
  73809. old behavior.
  73810. - The "return" methods (eg, g_task_return_pointer())
  73811. automatically cause the task to be "completed" as well, and
  73812. there is no need to worry about the "complete" vs "complete
  73813. in idle" distinction. (#GTask automatically figures out
  73814. whether the task's callback can be invoked directly, or
  73815. if it needs to be sent to another #GMainContext, or delayed
  73816. until the next iteration of the current #GMainContext.)
  73817. - The "finish" functions for #GTask-based operations are generally
  73818. much simpler than #GSimpleAsyncResult ones, normally consisting
  73819. of only a single call to g_task_propagate_pointer() or the like.
  73820. Since g_task_propagate_pointer() "steals" the return value from
  73821. the #GTask, it is not necessary to juggle pointers around to
  73822. prevent it from being freed twice.
  73823. - With #GSimpleAsyncResult, it was common to call
  73824. g_simple_async_result_propagate_error() from the
  73825. `_finish()` wrapper function, and have
  73826. virtual method implementations only deal with successful
  73827. returns. This behavior is deprecated, because it makes it
  73828. difficult for a subclass to chain to a parent class's async
  73829. methods. Instead, the wrapper function should just be a
  73830. simple wrapper, and the virtual method should call an
  73831. appropriate `g_task_propagate_` function.
  73832. Note that wrapper methods can now use
  73833. g_async_result_legacy_propagate_error() to do old-style
  73834. #GSimpleAsyncResult error-returning behavior, and
  73835. g_async_result_is_tagged() to check if a result is tagged as
  73836. having come from the `_async()` wrapper
  73837. function (for "short-circuit" results, such as when passing
  73838. 0 to g_input_stream_read_async()).</doc>
  73839. <implements name="AsyncResult"/>
  73840. <constructor name="new" c:identifier="g_task_new" version="2.36">
  73841. <doc xml:space="preserve">Creates a #GTask acting on @source_object, which will eventually be
  73842. used to invoke @callback in the current
  73843. [thread-default main context][g-main-context-push-thread-default].
  73844. Call this in the "start" method of your asynchronous method, and
  73845. pass the #GTask around throughout the asynchronous operation. You
  73846. can use g_task_set_task_data() to attach task-specific data to the
  73847. object, which you can retrieve later via g_task_get_task_data().
  73848. By default, if @cancellable is cancelled, then the return value of
  73849. the task will always be %G_IO_ERROR_CANCELLED, even if the task had
  73850. already completed before the cancellation. This allows for
  73851. simplified handling in cases where cancellation may imply that
  73852. other objects that the task depends on have been destroyed. If you
  73853. do not want this behavior, you can use
  73854. g_task_set_check_cancellable() to change it.</doc>
  73855. <return-value transfer-ownership="full">
  73856. <doc xml:space="preserve">a #GTask.</doc>
  73857. <type name="Task" c:type="GTask*"/>
  73858. </return-value>
  73859. <parameters>
  73860. <parameter name="source_object"
  73861. transfer-ownership="none"
  73862. nullable="1"
  73863. allow-none="1">
  73864. <doc xml:space="preserve">the #GObject that owns
  73865. this task, or %NULL.</doc>
  73866. <type name="GObject.Object" c:type="gpointer"/>
  73867. </parameter>
  73868. <parameter name="cancellable"
  73869. transfer-ownership="none"
  73870. nullable="1"
  73871. allow-none="1">
  73872. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  73873. <type name="Cancellable" c:type="GCancellable*"/>
  73874. </parameter>
  73875. <parameter name="callback"
  73876. transfer-ownership="none"
  73877. nullable="1"
  73878. allow-none="1"
  73879. scope="async"
  73880. closure="3">
  73881. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  73882. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  73883. </parameter>
  73884. <parameter name="callback_data"
  73885. transfer-ownership="none"
  73886. nullable="1"
  73887. allow-none="1">
  73888. <doc xml:space="preserve">user data passed to @callback.</doc>
  73889. <type name="gpointer" c:type="gpointer"/>
  73890. </parameter>
  73891. </parameters>
  73892. </constructor>
  73893. <function name="is_valid" c:identifier="g_task_is_valid" version="2.36">
  73894. <doc xml:space="preserve">Checks that @result is a #GTask, and that @source_object is its
  73895. source object (or that @source_object is %NULL and @result has no
  73896. source object). This can be used in g_return_if_fail() checks.</doc>
  73897. <return-value transfer-ownership="none">
  73898. <doc xml:space="preserve">%TRUE if @result and @source_object are valid, %FALSE
  73899. if not</doc>
  73900. <type name="gboolean" c:type="gboolean"/>
  73901. </return-value>
  73902. <parameters>
  73903. <parameter name="result" transfer-ownership="none">
  73904. <doc xml:space="preserve">A #GAsyncResult</doc>
  73905. <type name="AsyncResult" c:type="gpointer"/>
  73906. </parameter>
  73907. <parameter name="source_object"
  73908. transfer-ownership="none"
  73909. nullable="1"
  73910. allow-none="1">
  73911. <doc xml:space="preserve">the source object
  73912. expected to be associated with the task</doc>
  73913. <type name="GObject.Object" c:type="gpointer"/>
  73914. </parameter>
  73915. </parameters>
  73916. </function>
  73917. <function name="report_error"
  73918. c:identifier="g_task_report_error"
  73919. version="2.36">
  73920. <doc xml:space="preserve">Creates a #GTask and then immediately calls g_task_return_error()
  73921. on it. Use this in the wrapper function of an asynchronous method
  73922. when you want to avoid even calling the virtual method. You can
  73923. then use g_async_result_is_tagged() in the finish method wrapper to
  73924. check if the result there is tagged as having been created by the
  73925. wrapper method, and deal with it appropriately if so.
  73926. See also g_task_report_new_error().</doc>
  73927. <return-value transfer-ownership="none">
  73928. <type name="none" c:type="void"/>
  73929. </return-value>
  73930. <parameters>
  73931. <parameter name="source_object"
  73932. transfer-ownership="none"
  73933. nullable="1"
  73934. allow-none="1">
  73935. <doc xml:space="preserve">the #GObject that owns
  73936. this task, or %NULL.</doc>
  73937. <type name="GObject.Object" c:type="gpointer"/>
  73938. </parameter>
  73939. <parameter name="callback"
  73940. transfer-ownership="none"
  73941. nullable="1"
  73942. allow-none="1"
  73943. scope="async"
  73944. closure="2">
  73945. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  73946. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  73947. </parameter>
  73948. <parameter name="callback_data"
  73949. transfer-ownership="none"
  73950. nullable="1"
  73951. allow-none="1">
  73952. <doc xml:space="preserve">user data passed to @callback.</doc>
  73953. <type name="gpointer" c:type="gpointer"/>
  73954. </parameter>
  73955. <parameter name="source_tag"
  73956. transfer-ownership="none"
  73957. nullable="1"
  73958. allow-none="1">
  73959. <doc xml:space="preserve">an opaque pointer indicating the source of this task</doc>
  73960. <type name="gpointer" c:type="gpointer"/>
  73961. </parameter>
  73962. <parameter name="error" transfer-ownership="full">
  73963. <doc xml:space="preserve">error to report</doc>
  73964. <type name="GLib.Error" c:type="GError*"/>
  73965. </parameter>
  73966. </parameters>
  73967. </function>
  73968. <function name="report_new_error"
  73969. c:identifier="g_task_report_new_error"
  73970. version="2.36"
  73971. introspectable="0">
  73972. <doc xml:space="preserve">Creates a #GTask and then immediately calls
  73973. g_task_return_new_error() on it. Use this in the wrapper function
  73974. of an asynchronous method when you want to avoid even calling the
  73975. virtual method. You can then use g_async_result_is_tagged() in the
  73976. finish method wrapper to check if the result there is tagged as
  73977. having been created by the wrapper method, and deal with it
  73978. appropriately if so.
  73979. See also g_task_report_error().</doc>
  73980. <return-value transfer-ownership="none">
  73981. <type name="none" c:type="void"/>
  73982. </return-value>
  73983. <parameters>
  73984. <parameter name="source_object"
  73985. transfer-ownership="none"
  73986. nullable="1"
  73987. allow-none="1">
  73988. <doc xml:space="preserve">the #GObject that owns
  73989. this task, or %NULL.</doc>
  73990. <type name="GObject.Object" c:type="gpointer"/>
  73991. </parameter>
  73992. <parameter name="callback"
  73993. transfer-ownership="none"
  73994. nullable="1"
  73995. allow-none="1"
  73996. scope="async"
  73997. closure="2">
  73998. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  73999. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  74000. </parameter>
  74001. <parameter name="callback_data"
  74002. transfer-ownership="none"
  74003. nullable="1"
  74004. allow-none="1">
  74005. <doc xml:space="preserve">user data passed to @callback.</doc>
  74006. <type name="gpointer" c:type="gpointer"/>
  74007. </parameter>
  74008. <parameter name="source_tag"
  74009. transfer-ownership="none"
  74010. nullable="1"
  74011. allow-none="1">
  74012. <doc xml:space="preserve">an opaque pointer indicating the source of this task</doc>
  74013. <type name="gpointer" c:type="gpointer"/>
  74014. </parameter>
  74015. <parameter name="domain" transfer-ownership="none">
  74016. <doc xml:space="preserve">a #GQuark.</doc>
  74017. <type name="GLib.Quark" c:type="GQuark"/>
  74018. </parameter>
  74019. <parameter name="code" transfer-ownership="none">
  74020. <doc xml:space="preserve">an error code.</doc>
  74021. <type name="gint" c:type="gint"/>
  74022. </parameter>
  74023. <parameter name="format" transfer-ownership="none">
  74024. <doc xml:space="preserve">a string with format characters.</doc>
  74025. <type name="utf8" c:type="const char*"/>
  74026. </parameter>
  74027. <parameter name="..." transfer-ownership="none">
  74028. <doc xml:space="preserve">a list of values to insert into @format.</doc>
  74029. <varargs/>
  74030. </parameter>
  74031. </parameters>
  74032. </function>
  74033. <method name="attach_source"
  74034. c:identifier="g_task_attach_source"
  74035. version="2.36"
  74036. introspectable="0">
  74037. <doc xml:space="preserve">A utility function for dealing with async operations where you need
  74038. to wait for a #GSource to trigger. Attaches @source to @task's
  74039. #GMainContext with @task's [priority][io-priority], and sets @source's
  74040. callback to @callback, with @task as the callback's `user_data`.
  74041. This takes a reference on @task until @source is destroyed.</doc>
  74042. <return-value transfer-ownership="none">
  74043. <type name="none" c:type="void"/>
  74044. </return-value>
  74045. <parameters>
  74046. <instance-parameter name="task" transfer-ownership="none">
  74047. <doc xml:space="preserve">a #GTask</doc>
  74048. <type name="Task" c:type="GTask*"/>
  74049. </instance-parameter>
  74050. <parameter name="source" transfer-ownership="none">
  74051. <doc xml:space="preserve">the source to attach</doc>
  74052. <type name="GLib.Source" c:type="GSource*"/>
  74053. </parameter>
  74054. <parameter name="callback" transfer-ownership="none">
  74055. <doc xml:space="preserve">the callback to invoke when @source triggers</doc>
  74056. <type name="GLib.SourceFunc" c:type="GSourceFunc"/>
  74057. </parameter>
  74058. </parameters>
  74059. </method>
  74060. <method name="get_cancellable"
  74061. c:identifier="g_task_get_cancellable"
  74062. version="2.36">
  74063. <doc xml:space="preserve">Gets @task's #GCancellable</doc>
  74064. <return-value transfer-ownership="none">
  74065. <doc xml:space="preserve">@task's #GCancellable</doc>
  74066. <type name="Cancellable" c:type="GCancellable*"/>
  74067. </return-value>
  74068. <parameters>
  74069. <instance-parameter name="task" transfer-ownership="none">
  74070. <doc xml:space="preserve">a #GTask</doc>
  74071. <type name="Task" c:type="GTask*"/>
  74072. </instance-parameter>
  74073. </parameters>
  74074. </method>
  74075. <method name="get_check_cancellable"
  74076. c:identifier="g_task_get_check_cancellable"
  74077. version="2.36">
  74078. <doc xml:space="preserve">Gets @task's check-cancellable flag. See
  74079. g_task_set_check_cancellable() for more details.</doc>
  74080. <return-value transfer-ownership="none">
  74081. <type name="gboolean" c:type="gboolean"/>
  74082. </return-value>
  74083. <parameters>
  74084. <instance-parameter name="task" transfer-ownership="none">
  74085. <doc xml:space="preserve">the #GTask</doc>
  74086. <type name="Task" c:type="GTask*"/>
  74087. </instance-parameter>
  74088. </parameters>
  74089. </method>
  74090. <method name="get_completed"
  74091. c:identifier="g_task_get_completed"
  74092. version="2.44">
  74093. <doc xml:space="preserve">Gets the value of #GTask:completed. This changes from %FALSE to %TRUE after
  74094. the task’s callback is invoked, and will return %FALSE if called from inside
  74095. the callback.</doc>
  74096. <return-value transfer-ownership="none">
  74097. <doc xml:space="preserve">%TRUE if the task has completed, %FALSE otherwise.</doc>
  74098. <type name="gboolean" c:type="gboolean"/>
  74099. </return-value>
  74100. <parameters>
  74101. <instance-parameter name="task" transfer-ownership="none">
  74102. <doc xml:space="preserve">a #GTask.</doc>
  74103. <type name="Task" c:type="GTask*"/>
  74104. </instance-parameter>
  74105. </parameters>
  74106. </method>
  74107. <method name="get_context"
  74108. c:identifier="g_task_get_context"
  74109. version="2.36">
  74110. <doc xml:space="preserve">Gets the #GMainContext that @task will return its result in (that
  74111. is, the context that was the
  74112. [thread-default main context][g-main-context-push-thread-default]
  74113. at the point when @task was created).
  74114. This will always return a non-%NULL value, even if the task's
  74115. context is the default #GMainContext.</doc>
  74116. <return-value transfer-ownership="none">
  74117. <doc xml:space="preserve">@task's #GMainContext</doc>
  74118. <type name="GLib.MainContext" c:type="GMainContext*"/>
  74119. </return-value>
  74120. <parameters>
  74121. <instance-parameter name="task" transfer-ownership="none">
  74122. <doc xml:space="preserve">a #GTask</doc>
  74123. <type name="Task" c:type="GTask*"/>
  74124. </instance-parameter>
  74125. </parameters>
  74126. </method>
  74127. <method name="get_priority"
  74128. c:identifier="g_task_get_priority"
  74129. version="2.36">
  74130. <doc xml:space="preserve">Gets @task's priority</doc>
  74131. <return-value transfer-ownership="none">
  74132. <doc xml:space="preserve">@task's priority</doc>
  74133. <type name="gint" c:type="gint"/>
  74134. </return-value>
  74135. <parameters>
  74136. <instance-parameter name="task" transfer-ownership="none">
  74137. <doc xml:space="preserve">a #GTask</doc>
  74138. <type name="Task" c:type="GTask*"/>
  74139. </instance-parameter>
  74140. </parameters>
  74141. </method>
  74142. <method name="get_return_on_cancel"
  74143. c:identifier="g_task_get_return_on_cancel"
  74144. version="2.36">
  74145. <doc xml:space="preserve">Gets @task's return-on-cancel flag. See
  74146. g_task_set_return_on_cancel() for more details.</doc>
  74147. <return-value transfer-ownership="none">
  74148. <type name="gboolean" c:type="gboolean"/>
  74149. </return-value>
  74150. <parameters>
  74151. <instance-parameter name="task" transfer-ownership="none">
  74152. <doc xml:space="preserve">the #GTask</doc>
  74153. <type name="Task" c:type="GTask*"/>
  74154. </instance-parameter>
  74155. </parameters>
  74156. </method>
  74157. <method name="get_source_object"
  74158. c:identifier="g_task_get_source_object"
  74159. version="2.36">
  74160. <doc xml:space="preserve">Gets the source object from @task. Like
  74161. g_async_result_get_source_object(), but does not ref the object.</doc>
  74162. <return-value transfer-ownership="none">
  74163. <doc xml:space="preserve">@task's source object, or %NULL</doc>
  74164. <type name="GObject.Object" c:type="gpointer"/>
  74165. </return-value>
  74166. <parameters>
  74167. <instance-parameter name="task" transfer-ownership="none">
  74168. <doc xml:space="preserve">a #GTask</doc>
  74169. <type name="Task" c:type="GTask*"/>
  74170. </instance-parameter>
  74171. </parameters>
  74172. </method>
  74173. <method name="get_source_tag"
  74174. c:identifier="g_task_get_source_tag"
  74175. version="2.36">
  74176. <doc xml:space="preserve">Gets @task's source tag. See g_task_set_source_tag().</doc>
  74177. <return-value transfer-ownership="none" nullable="1">
  74178. <doc xml:space="preserve">@task's source tag</doc>
  74179. <type name="gpointer" c:type="gpointer"/>
  74180. </return-value>
  74181. <parameters>
  74182. <instance-parameter name="task" transfer-ownership="none">
  74183. <doc xml:space="preserve">a #GTask</doc>
  74184. <type name="Task" c:type="GTask*"/>
  74185. </instance-parameter>
  74186. </parameters>
  74187. </method>
  74188. <method name="get_task_data"
  74189. c:identifier="g_task_get_task_data"
  74190. version="2.36">
  74191. <doc xml:space="preserve">Gets @task's `task_data`.</doc>
  74192. <return-value transfer-ownership="none" nullable="1">
  74193. <doc xml:space="preserve">@task's `task_data`.</doc>
  74194. <type name="gpointer" c:type="gpointer"/>
  74195. </return-value>
  74196. <parameters>
  74197. <instance-parameter name="task" transfer-ownership="none">
  74198. <doc xml:space="preserve">a #GTask</doc>
  74199. <type name="Task" c:type="GTask*"/>
  74200. </instance-parameter>
  74201. </parameters>
  74202. </method>
  74203. <method name="had_error" c:identifier="g_task_had_error" version="2.36">
  74204. <doc xml:space="preserve">Tests if @task resulted in an error.</doc>
  74205. <return-value transfer-ownership="none">
  74206. <doc xml:space="preserve">%TRUE if the task resulted in an error, %FALSE otherwise.</doc>
  74207. <type name="gboolean" c:type="gboolean"/>
  74208. </return-value>
  74209. <parameters>
  74210. <instance-parameter name="task" transfer-ownership="none">
  74211. <doc xml:space="preserve">a #GTask.</doc>
  74212. <type name="Task" c:type="GTask*"/>
  74213. </instance-parameter>
  74214. </parameters>
  74215. </method>
  74216. <method name="propagate_boolean"
  74217. c:identifier="g_task_propagate_boolean"
  74218. version="2.36"
  74219. throws="1">
  74220. <doc xml:space="preserve">Gets the result of @task as a #gboolean.
  74221. If the task resulted in an error, or was cancelled, then this will
  74222. instead return %FALSE and set @error.
  74223. Since this method transfers ownership of the return value (or
  74224. error) to the caller, you may only call it once.</doc>
  74225. <return-value transfer-ownership="none">
  74226. <doc xml:space="preserve">the task result, or %FALSE on error</doc>
  74227. <type name="gboolean" c:type="gboolean"/>
  74228. </return-value>
  74229. <parameters>
  74230. <instance-parameter name="task" transfer-ownership="none">
  74231. <doc xml:space="preserve">a #GTask.</doc>
  74232. <type name="Task" c:type="GTask*"/>
  74233. </instance-parameter>
  74234. </parameters>
  74235. </method>
  74236. <method name="propagate_int"
  74237. c:identifier="g_task_propagate_int"
  74238. version="2.36"
  74239. throws="1">
  74240. <doc xml:space="preserve">Gets the result of @task as an integer (#gssize).
  74241. If the task resulted in an error, or was cancelled, then this will
  74242. instead return -1 and set @error.
  74243. Since this method transfers ownership of the return value (or
  74244. error) to the caller, you may only call it once.</doc>
  74245. <return-value transfer-ownership="none">
  74246. <doc xml:space="preserve">the task result, or -1 on error</doc>
  74247. <type name="gssize" c:type="gssize"/>
  74248. </return-value>
  74249. <parameters>
  74250. <instance-parameter name="task" transfer-ownership="none">
  74251. <doc xml:space="preserve">a #GTask.</doc>
  74252. <type name="Task" c:type="GTask*"/>
  74253. </instance-parameter>
  74254. </parameters>
  74255. </method>
  74256. <method name="propagate_pointer"
  74257. c:identifier="g_task_propagate_pointer"
  74258. version="2.36"
  74259. throws="1">
  74260. <doc xml:space="preserve">Gets the result of @task as a pointer, and transfers ownership
  74261. of that value to the caller.
  74262. If the task resulted in an error, or was cancelled, then this will
  74263. instead return %NULL and set @error.
  74264. Since this method transfers ownership of the return value (or
  74265. error) to the caller, you may only call it once.</doc>
  74266. <return-value transfer-ownership="full" nullable="1">
  74267. <doc xml:space="preserve">the task result, or %NULL on error</doc>
  74268. <type name="gpointer" c:type="gpointer"/>
  74269. </return-value>
  74270. <parameters>
  74271. <instance-parameter name="task" transfer-ownership="none">
  74272. <doc xml:space="preserve">a #GTask</doc>
  74273. <type name="Task" c:type="GTask*"/>
  74274. </instance-parameter>
  74275. </parameters>
  74276. </method>
  74277. <method name="return_boolean"
  74278. c:identifier="g_task_return_boolean"
  74279. version="2.36">
  74280. <doc xml:space="preserve">Sets @task's result to @result and completes the task (see
  74281. g_task_return_pointer() for more discussion of exactly what this
  74282. means).</doc>
  74283. <return-value transfer-ownership="none">
  74284. <type name="none" c:type="void"/>
  74285. </return-value>
  74286. <parameters>
  74287. <instance-parameter name="task" transfer-ownership="none">
  74288. <doc xml:space="preserve">a #GTask.</doc>
  74289. <type name="Task" c:type="GTask*"/>
  74290. </instance-parameter>
  74291. <parameter name="result" transfer-ownership="none">
  74292. <doc xml:space="preserve">the #gboolean result of a task function.</doc>
  74293. <type name="gboolean" c:type="gboolean"/>
  74294. </parameter>
  74295. </parameters>
  74296. </method>
  74297. <method name="return_error"
  74298. c:identifier="g_task_return_error"
  74299. version="2.36">
  74300. <doc xml:space="preserve">Sets @task's result to @error (which @task assumes ownership of)
  74301. and completes the task (see g_task_return_pointer() for more
  74302. discussion of exactly what this means).
  74303. Note that since the task takes ownership of @error, and since the
  74304. task may be completed before returning from g_task_return_error(),
  74305. you cannot assume that @error is still valid after calling this.
  74306. Call g_error_copy() on the error if you need to keep a local copy
  74307. as well.
  74308. See also g_task_return_new_error().</doc>
  74309. <return-value transfer-ownership="none">
  74310. <type name="none" c:type="void"/>
  74311. </return-value>
  74312. <parameters>
  74313. <instance-parameter name="task" transfer-ownership="none">
  74314. <doc xml:space="preserve">a #GTask.</doc>
  74315. <type name="Task" c:type="GTask*"/>
  74316. </instance-parameter>
  74317. <parameter name="error" transfer-ownership="full">
  74318. <doc xml:space="preserve">the #GError result of a task function.</doc>
  74319. <type name="GLib.Error" c:type="GError*"/>
  74320. </parameter>
  74321. </parameters>
  74322. </method>
  74323. <method name="return_error_if_cancelled"
  74324. c:identifier="g_task_return_error_if_cancelled"
  74325. version="2.36">
  74326. <doc xml:space="preserve">Checks if @task's #GCancellable has been cancelled, and if so, sets
  74327. @task's error accordingly and completes the task (see
  74328. g_task_return_pointer() for more discussion of exactly what this
  74329. means).</doc>
  74330. <return-value transfer-ownership="none">
  74331. <doc xml:space="preserve">%TRUE if @task has been cancelled, %FALSE if not</doc>
  74332. <type name="gboolean" c:type="gboolean"/>
  74333. </return-value>
  74334. <parameters>
  74335. <instance-parameter name="task" transfer-ownership="none">
  74336. <doc xml:space="preserve">a #GTask</doc>
  74337. <type name="Task" c:type="GTask*"/>
  74338. </instance-parameter>
  74339. </parameters>
  74340. </method>
  74341. <method name="return_int"
  74342. c:identifier="g_task_return_int"
  74343. version="2.36">
  74344. <doc xml:space="preserve">Sets @task's result to @result and completes the task (see
  74345. g_task_return_pointer() for more discussion of exactly what this
  74346. means).</doc>
  74347. <return-value transfer-ownership="none">
  74348. <type name="none" c:type="void"/>
  74349. </return-value>
  74350. <parameters>
  74351. <instance-parameter name="task" transfer-ownership="none">
  74352. <doc xml:space="preserve">a #GTask.</doc>
  74353. <type name="Task" c:type="GTask*"/>
  74354. </instance-parameter>
  74355. <parameter name="result" transfer-ownership="none">
  74356. <doc xml:space="preserve">the integer (#gssize) result of a task function.</doc>
  74357. <type name="gssize" c:type="gssize"/>
  74358. </parameter>
  74359. </parameters>
  74360. </method>
  74361. <method name="return_new_error"
  74362. c:identifier="g_task_return_new_error"
  74363. version="2.36"
  74364. introspectable="0">
  74365. <doc xml:space="preserve">Sets @task's result to a new #GError created from @domain, @code,
  74366. @format, and the remaining arguments, and completes the task (see
  74367. g_task_return_pointer() for more discussion of exactly what this
  74368. means).
  74369. See also g_task_return_error().</doc>
  74370. <return-value transfer-ownership="none">
  74371. <type name="none" c:type="void"/>
  74372. </return-value>
  74373. <parameters>
  74374. <instance-parameter name="task" transfer-ownership="none">
  74375. <doc xml:space="preserve">a #GTask.</doc>
  74376. <type name="Task" c:type="GTask*"/>
  74377. </instance-parameter>
  74378. <parameter name="domain" transfer-ownership="none">
  74379. <doc xml:space="preserve">a #GQuark.</doc>
  74380. <type name="GLib.Quark" c:type="GQuark"/>
  74381. </parameter>
  74382. <parameter name="code" transfer-ownership="none">
  74383. <doc xml:space="preserve">an error code.</doc>
  74384. <type name="gint" c:type="gint"/>
  74385. </parameter>
  74386. <parameter name="format" transfer-ownership="none">
  74387. <doc xml:space="preserve">a string with format characters.</doc>
  74388. <type name="utf8" c:type="const char*"/>
  74389. </parameter>
  74390. <parameter name="..." transfer-ownership="none">
  74391. <doc xml:space="preserve">a list of values to insert into @format.</doc>
  74392. <varargs/>
  74393. </parameter>
  74394. </parameters>
  74395. </method>
  74396. <method name="return_pointer"
  74397. c:identifier="g_task_return_pointer"
  74398. version="2.36">
  74399. <doc xml:space="preserve">Sets @task's result to @result and completes the task. If @result
  74400. is not %NULL, then @result_destroy will be used to free @result if
  74401. the caller does not take ownership of it with
  74402. g_task_propagate_pointer().
  74403. "Completes the task" means that for an ordinary asynchronous task
  74404. it will either invoke the task's callback, or else queue that
  74405. callback to be invoked in the proper #GMainContext, or in the next
  74406. iteration of the current #GMainContext. For a task run via
  74407. g_task_run_in_thread() or g_task_run_in_thread_sync(), calling this
  74408. method will save @result to be returned to the caller later, but
  74409. the task will not actually be completed until the #GTaskThreadFunc
  74410. exits.
  74411. Note that since the task may be completed before returning from
  74412. g_task_return_pointer(), you cannot assume that @result is still
  74413. valid after calling this, unless you are still holding another
  74414. reference on it.</doc>
  74415. <return-value transfer-ownership="none">
  74416. <type name="none" c:type="void"/>
  74417. </return-value>
  74418. <parameters>
  74419. <instance-parameter name="task" transfer-ownership="none">
  74420. <doc xml:space="preserve">a #GTask</doc>
  74421. <type name="Task" c:type="GTask*"/>
  74422. </instance-parameter>
  74423. <parameter name="result"
  74424. transfer-ownership="full"
  74425. nullable="1"
  74426. allow-none="1">
  74427. <doc xml:space="preserve">the pointer result of a task
  74428. function</doc>
  74429. <type name="gpointer" c:type="gpointer"/>
  74430. </parameter>
  74431. <parameter name="result_destroy"
  74432. transfer-ownership="none"
  74433. nullable="1"
  74434. allow-none="1"
  74435. scope="async">
  74436. <doc xml:space="preserve">a #GDestroyNotify function.</doc>
  74437. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  74438. </parameter>
  74439. </parameters>
  74440. </method>
  74441. <method name="run_in_thread"
  74442. c:identifier="g_task_run_in_thread"
  74443. version="2.36"
  74444. introspectable="0">
  74445. <doc xml:space="preserve">Runs @task_func in another thread. When @task_func returns, @task's
  74446. #GAsyncReadyCallback will be invoked in @task's #GMainContext.
  74447. This takes a ref on @task until the task completes.
  74448. See #GTaskThreadFunc for more details about how @task_func is handled.
  74449. Although GLib currently rate-limits the tasks queued via
  74450. g_task_run_in_thread(), you should not assume that it will always
  74451. do this. If you have a very large number of tasks to run, but don't
  74452. want them to all run at once, you should only queue a limited
  74453. number of them at a time.</doc>
  74454. <return-value transfer-ownership="none">
  74455. <type name="none" c:type="void"/>
  74456. </return-value>
  74457. <parameters>
  74458. <instance-parameter name="task" transfer-ownership="none">
  74459. <doc xml:space="preserve">a #GTask</doc>
  74460. <type name="Task" c:type="GTask*"/>
  74461. </instance-parameter>
  74462. <parameter name="task_func" transfer-ownership="none">
  74463. <doc xml:space="preserve">a #GTaskThreadFunc</doc>
  74464. <type name="TaskThreadFunc" c:type="GTaskThreadFunc"/>
  74465. </parameter>
  74466. </parameters>
  74467. </method>
  74468. <method name="run_in_thread_sync"
  74469. c:identifier="g_task_run_in_thread_sync"
  74470. version="2.36"
  74471. introspectable="0">
  74472. <doc xml:space="preserve">Runs @task_func in another thread, and waits for it to return or be
  74473. cancelled. You can use g_task_propagate_pointer(), etc, afterward
  74474. to get the result of @task_func.
  74475. See #GTaskThreadFunc for more details about how @task_func is handled.
  74476. Normally this is used with tasks created with a %NULL
  74477. `callback`, but note that even if the task does
  74478. have a callback, it will not be invoked when @task_func returns.
  74479. #GTask:completed will be set to %TRUE just before this function returns.
  74480. Although GLib currently rate-limits the tasks queued via
  74481. g_task_run_in_thread_sync(), you should not assume that it will
  74482. always do this. If you have a very large number of tasks to run,
  74483. but don't want them to all run at once, you should only queue a
  74484. limited number of them at a time.</doc>
  74485. <return-value transfer-ownership="none">
  74486. <type name="none" c:type="void"/>
  74487. </return-value>
  74488. <parameters>
  74489. <instance-parameter name="task" transfer-ownership="none">
  74490. <doc xml:space="preserve">a #GTask</doc>
  74491. <type name="Task" c:type="GTask*"/>
  74492. </instance-parameter>
  74493. <parameter name="task_func" transfer-ownership="none">
  74494. <doc xml:space="preserve">a #GTaskThreadFunc</doc>
  74495. <type name="TaskThreadFunc" c:type="GTaskThreadFunc"/>
  74496. </parameter>
  74497. </parameters>
  74498. </method>
  74499. <method name="set_check_cancellable"
  74500. c:identifier="g_task_set_check_cancellable"
  74501. version="2.36">
  74502. <doc xml:space="preserve">Sets or clears @task's check-cancellable flag. If this is %TRUE
  74503. (the default), then g_task_propagate_pointer(), etc, and
  74504. g_task_had_error() will check the task's #GCancellable first, and
  74505. if it has been cancelled, then they will consider the task to have
  74506. returned an "Operation was cancelled" error
  74507. (%G_IO_ERROR_CANCELLED), regardless of any other error or return
  74508. value the task may have had.
  74509. If @check_cancellable is %FALSE, then the #GTask will not check the
  74510. cancellable itself, and it is up to @task's owner to do this (eg,
  74511. via g_task_return_error_if_cancelled()).
  74512. If you are using g_task_set_return_on_cancel() as well, then
  74513. you must leave check-cancellable set %TRUE.</doc>
  74514. <return-value transfer-ownership="none">
  74515. <type name="none" c:type="void"/>
  74516. </return-value>
  74517. <parameters>
  74518. <instance-parameter name="task" transfer-ownership="none">
  74519. <doc xml:space="preserve">the #GTask</doc>
  74520. <type name="Task" c:type="GTask*"/>
  74521. </instance-parameter>
  74522. <parameter name="check_cancellable" transfer-ownership="none">
  74523. <doc xml:space="preserve">whether #GTask will check the state of
  74524. its #GCancellable for you.</doc>
  74525. <type name="gboolean" c:type="gboolean"/>
  74526. </parameter>
  74527. </parameters>
  74528. </method>
  74529. <method name="set_priority"
  74530. c:identifier="g_task_set_priority"
  74531. version="2.36">
  74532. <doc xml:space="preserve">Sets @task's priority. If you do not call this, it will default to
  74533. %G_PRIORITY_DEFAULT.
  74534. This will affect the priority of #GSources created with
  74535. g_task_attach_source() and the scheduling of tasks run in threads,
  74536. and can also be explicitly retrieved later via
  74537. g_task_get_priority().</doc>
  74538. <return-value transfer-ownership="none">
  74539. <type name="none" c:type="void"/>
  74540. </return-value>
  74541. <parameters>
  74542. <instance-parameter name="task" transfer-ownership="none">
  74543. <doc xml:space="preserve">the #GTask</doc>
  74544. <type name="Task" c:type="GTask*"/>
  74545. </instance-parameter>
  74546. <parameter name="priority" transfer-ownership="none">
  74547. <doc xml:space="preserve">the [priority][io-priority] of the request</doc>
  74548. <type name="gint" c:type="gint"/>
  74549. </parameter>
  74550. </parameters>
  74551. </method>
  74552. <method name="set_return_on_cancel"
  74553. c:identifier="g_task_set_return_on_cancel"
  74554. version="2.36">
  74555. <doc xml:space="preserve">Sets or clears @task's return-on-cancel flag. This is only
  74556. meaningful for tasks run via g_task_run_in_thread() or
  74557. g_task_run_in_thread_sync().
  74558. If @return_on_cancel is %TRUE, then cancelling @task's
  74559. #GCancellable will immediately cause it to return, as though the
  74560. task's #GTaskThreadFunc had called
  74561. g_task_return_error_if_cancelled() and then returned.
  74562. This allows you to create a cancellable wrapper around an
  74563. uninterruptable function. The #GTaskThreadFunc just needs to be
  74564. careful that it does not modify any externally-visible state after
  74565. it has been cancelled. To do that, the thread should call
  74566. g_task_set_return_on_cancel() again to (atomically) set
  74567. return-on-cancel %FALSE before making externally-visible changes;
  74568. if the task gets cancelled before the return-on-cancel flag could
  74569. be changed, g_task_set_return_on_cancel() will indicate this by
  74570. returning %FALSE.
  74571. You can disable and re-enable this flag multiple times if you wish.
  74572. If the task's #GCancellable is cancelled while return-on-cancel is
  74573. %FALSE, then calling g_task_set_return_on_cancel() to set it %TRUE
  74574. again will cause the task to be cancelled at that point.
  74575. If the task's #GCancellable is already cancelled before you call
  74576. g_task_run_in_thread()/g_task_run_in_thread_sync(), then the
  74577. #GTaskThreadFunc will still be run (for consistency), but the task
  74578. will also be completed right away.</doc>
  74579. <return-value transfer-ownership="none">
  74580. <doc xml:space="preserve">%TRUE if @task's return-on-cancel flag was changed to
  74581. match @return_on_cancel. %FALSE if @task has already been
  74582. cancelled.</doc>
  74583. <type name="gboolean" c:type="gboolean"/>
  74584. </return-value>
  74585. <parameters>
  74586. <instance-parameter name="task" transfer-ownership="none">
  74587. <doc xml:space="preserve">the #GTask</doc>
  74588. <type name="Task" c:type="GTask*"/>
  74589. </instance-parameter>
  74590. <parameter name="return_on_cancel" transfer-ownership="none">
  74591. <doc xml:space="preserve">whether the task returns automatically when
  74592. it is cancelled.</doc>
  74593. <type name="gboolean" c:type="gboolean"/>
  74594. </parameter>
  74595. </parameters>
  74596. </method>
  74597. <method name="set_source_tag"
  74598. c:identifier="g_task_set_source_tag"
  74599. version="2.36">
  74600. <doc xml:space="preserve">Sets @task's source tag. You can use this to tag a task return
  74601. value with a particular pointer (usually a pointer to the function
  74602. doing the tagging) and then later check it using
  74603. g_task_get_source_tag() (or g_async_result_is_tagged()) in the
  74604. task's "finish" function, to figure out if the response came from a
  74605. particular place.</doc>
  74606. <return-value transfer-ownership="none">
  74607. <type name="none" c:type="void"/>
  74608. </return-value>
  74609. <parameters>
  74610. <instance-parameter name="task" transfer-ownership="none">
  74611. <doc xml:space="preserve">the #GTask</doc>
  74612. <type name="Task" c:type="GTask*"/>
  74613. </instance-parameter>
  74614. <parameter name="source_tag"
  74615. transfer-ownership="none"
  74616. nullable="1"
  74617. allow-none="1">
  74618. <doc xml:space="preserve">an opaque pointer indicating the source of this task</doc>
  74619. <type name="gpointer" c:type="gpointer"/>
  74620. </parameter>
  74621. </parameters>
  74622. </method>
  74623. <method name="set_task_data"
  74624. c:identifier="g_task_set_task_data"
  74625. version="2.36">
  74626. <doc xml:space="preserve">Sets @task's task data (freeing the existing task data, if any).</doc>
  74627. <return-value transfer-ownership="none">
  74628. <type name="none" c:type="void"/>
  74629. </return-value>
  74630. <parameters>
  74631. <instance-parameter name="task" transfer-ownership="none">
  74632. <doc xml:space="preserve">the #GTask</doc>
  74633. <type name="Task" c:type="GTask*"/>
  74634. </instance-parameter>
  74635. <parameter name="task_data"
  74636. transfer-ownership="none"
  74637. nullable="1"
  74638. allow-none="1">
  74639. <doc xml:space="preserve">task-specific data</doc>
  74640. <type name="gpointer" c:type="gpointer"/>
  74641. </parameter>
  74642. <parameter name="task_data_destroy"
  74643. transfer-ownership="none"
  74644. nullable="1"
  74645. allow-none="1"
  74646. scope="async">
  74647. <doc xml:space="preserve">#GDestroyNotify for @task_data</doc>
  74648. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  74649. </parameter>
  74650. </parameters>
  74651. </method>
  74652. <property name="completed" version="2.44" transfer-ownership="none">
  74653. <doc xml:space="preserve">Whether the task has completed, meaning its callback (if set) has been
  74654. invoked. This can only happen after g_task_return_pointer(),
  74655. g_task_return_error() or one of the other return functions have been called
  74656. on the task.
  74657. This property is guaranteed to change from %FALSE to %TRUE exactly once.
  74658. The #GObject::notify signal for this change is emitted in the same main
  74659. context as the task’s callback, immediately after that callback is invoked.</doc>
  74660. <type name="gboolean" c:type="gboolean"/>
  74661. </property>
  74662. </class>
  74663. <record name="TaskClass"
  74664. c:type="GTaskClass"
  74665. disguised="1"
  74666. glib:is-gtype-struct-for="Task">
  74667. </record>
  74668. <callback name="TaskThreadFunc" c:type="GTaskThreadFunc" version="2.36">
  74669. <doc xml:space="preserve">The prototype for a task function to be run in a thread via
  74670. g_task_run_in_thread() or g_task_run_in_thread_sync().
  74671. If the return-on-cancel flag is set on @task, and @cancellable gets
  74672. cancelled, then the #GTask will be completed immediately (as though
  74673. g_task_return_error_if_cancelled() had been called), without
  74674. waiting for the task function to complete. However, the task
  74675. function will continue running in its thread in the background. The
  74676. function therefore needs to be careful about how it uses
  74677. externally-visible state in this case. See
  74678. g_task_set_return_on_cancel() for more details.
  74679. Other than in that case, @task will be completed when the
  74680. #GTaskThreadFunc returns, not when it calls a
  74681. `g_task_return_` function.</doc>
  74682. <return-value transfer-ownership="none">
  74683. <type name="none" c:type="void"/>
  74684. </return-value>
  74685. <parameters>
  74686. <parameter name="task" transfer-ownership="none">
  74687. <doc xml:space="preserve">the #GTask</doc>
  74688. <type name="Task" c:type="GTask*"/>
  74689. </parameter>
  74690. <parameter name="source_object" transfer-ownership="none">
  74691. <doc xml:space="preserve">@task's source object</doc>
  74692. <type name="GObject.Object" c:type="gpointer"/>
  74693. </parameter>
  74694. <parameter name="task_data"
  74695. transfer-ownership="none"
  74696. nullable="1"
  74697. allow-none="1">
  74698. <doc xml:space="preserve">@task's task data</doc>
  74699. <type name="gpointer" c:type="gpointer"/>
  74700. </parameter>
  74701. <parameter name="cancellable"
  74702. transfer-ownership="none"
  74703. nullable="1"
  74704. allow-none="1">
  74705. <doc xml:space="preserve">@task's #GCancellable, or %NULL</doc>
  74706. <type name="Cancellable" c:type="GCancellable*"/>
  74707. </parameter>
  74708. </parameters>
  74709. </callback>
  74710. <class name="TcpConnection"
  74711. c:symbol-prefix="tcp_connection"
  74712. c:type="GTcpConnection"
  74713. version="2.22"
  74714. parent="SocketConnection"
  74715. glib:type-name="GTcpConnection"
  74716. glib:get-type="g_tcp_connection_get_type"
  74717. glib:type-struct="TcpConnectionClass">
  74718. <doc xml:space="preserve">This is the subclass of #GSocketConnection that is created
  74719. for TCP/IP sockets.</doc>
  74720. <method name="get_graceful_disconnect"
  74721. c:identifier="g_tcp_connection_get_graceful_disconnect"
  74722. version="2.22">
  74723. <doc xml:space="preserve">Checks if graceful disconnects are used. See
  74724. g_tcp_connection_set_graceful_disconnect().</doc>
  74725. <return-value transfer-ownership="none">
  74726. <doc xml:space="preserve">%TRUE if graceful disconnect is used on close, %FALSE otherwise</doc>
  74727. <type name="gboolean" c:type="gboolean"/>
  74728. </return-value>
  74729. <parameters>
  74730. <instance-parameter name="connection" transfer-ownership="none">
  74731. <doc xml:space="preserve">a #GTcpConnection</doc>
  74732. <type name="TcpConnection" c:type="GTcpConnection*"/>
  74733. </instance-parameter>
  74734. </parameters>
  74735. </method>
  74736. <method name="set_graceful_disconnect"
  74737. c:identifier="g_tcp_connection_set_graceful_disconnect"
  74738. version="2.22">
  74739. <doc xml:space="preserve">This enables graceful disconnects on close. A graceful disconnect
  74740. means that we signal the receiving end that the connection is terminated
  74741. and wait for it to close the connection before closing the connection.
  74742. A graceful disconnect means that we can be sure that we successfully sent
  74743. all the outstanding data to the other end, or get an error reported.
  74744. However, it also means we have to wait for all the data to reach the
  74745. other side and for it to acknowledge this by closing the socket, which may
  74746. take a while. For this reason it is disabled by default.</doc>
  74747. <return-value transfer-ownership="none">
  74748. <type name="none" c:type="void"/>
  74749. </return-value>
  74750. <parameters>
  74751. <instance-parameter name="connection" transfer-ownership="none">
  74752. <doc xml:space="preserve">a #GTcpConnection</doc>
  74753. <type name="TcpConnection" c:type="GTcpConnection*"/>
  74754. </instance-parameter>
  74755. <parameter name="graceful_disconnect" transfer-ownership="none">
  74756. <doc xml:space="preserve">Whether to do graceful disconnects or not</doc>
  74757. <type name="gboolean" c:type="gboolean"/>
  74758. </parameter>
  74759. </parameters>
  74760. </method>
  74761. <property name="graceful-disconnect"
  74762. writable="1"
  74763. transfer-ownership="none">
  74764. <type name="gboolean" c:type="gboolean"/>
  74765. </property>
  74766. <field name="parent_instance">
  74767. <type name="SocketConnection" c:type="GSocketConnection"/>
  74768. </field>
  74769. <field name="priv">
  74770. <type name="TcpConnectionPrivate" c:type="GTcpConnectionPrivate*"/>
  74771. </field>
  74772. </class>
  74773. <record name="TcpConnectionClass"
  74774. c:type="GTcpConnectionClass"
  74775. glib:is-gtype-struct-for="TcpConnection">
  74776. <field name="parent_class">
  74777. <type name="SocketConnectionClass" c:type="GSocketConnectionClass"/>
  74778. </field>
  74779. </record>
  74780. <record name="TcpConnectionPrivate"
  74781. c:type="GTcpConnectionPrivate"
  74782. disguised="1">
  74783. </record>
  74784. <class name="TcpWrapperConnection"
  74785. c:symbol-prefix="tcp_wrapper_connection"
  74786. c:type="GTcpWrapperConnection"
  74787. parent="TcpConnection"
  74788. glib:type-name="GTcpWrapperConnection"
  74789. glib:get-type="g_tcp_wrapper_connection_get_type"
  74790. glib:type-struct="TcpWrapperConnectionClass">
  74791. <doc xml:space="preserve">A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
  74792. based on a #GSocket, but which is not actually a
  74793. #GSocketConnection. This is used by #GSocketClient so that it can
  74794. always return a #GSocketConnection, even when the connection it has
  74795. actually created is not directly a #GSocketConnection.</doc>
  74796. <constructor name="new"
  74797. c:identifier="g_tcp_wrapper_connection_new"
  74798. version="2.28">
  74799. <doc xml:space="preserve">Wraps @base_io_stream and @socket together as a #GSocketConnection.</doc>
  74800. <return-value transfer-ownership="full">
  74801. <doc xml:space="preserve">the new #GSocketConnection.</doc>
  74802. <type name="SocketConnection" c:type="GSocketConnection*"/>
  74803. </return-value>
  74804. <parameters>
  74805. <parameter name="base_io_stream" transfer-ownership="none">
  74806. <doc xml:space="preserve">the #GIOStream to wrap</doc>
  74807. <type name="IOStream" c:type="GIOStream*"/>
  74808. </parameter>
  74809. <parameter name="socket" transfer-ownership="none">
  74810. <doc xml:space="preserve">the #GSocket associated with @base_io_stream</doc>
  74811. <type name="Socket" c:type="GSocket*"/>
  74812. </parameter>
  74813. </parameters>
  74814. </constructor>
  74815. <method name="get_base_io_stream"
  74816. c:identifier="g_tcp_wrapper_connection_get_base_io_stream">
  74817. <doc xml:space="preserve">Get's @conn's base #GIOStream</doc>
  74818. <return-value transfer-ownership="none">
  74819. <doc xml:space="preserve">@conn's base #GIOStream</doc>
  74820. <type name="IOStream" c:type="GIOStream*"/>
  74821. </return-value>
  74822. <parameters>
  74823. <instance-parameter name="conn" transfer-ownership="none">
  74824. <doc xml:space="preserve">a #GTcpWrapperConnection</doc>
  74825. <type name="TcpWrapperConnection" c:type="GTcpWrapperConnection*"/>
  74826. </instance-parameter>
  74827. </parameters>
  74828. </method>
  74829. <property name="base-io-stream"
  74830. writable="1"
  74831. construct-only="1"
  74832. transfer-ownership="none">
  74833. <type name="IOStream"/>
  74834. </property>
  74835. <field name="parent_instance">
  74836. <type name="TcpConnection" c:type="GTcpConnection"/>
  74837. </field>
  74838. <field name="priv">
  74839. <type name="TcpWrapperConnectionPrivate"
  74840. c:type="GTcpWrapperConnectionPrivate*"/>
  74841. </field>
  74842. </class>
  74843. <record name="TcpWrapperConnectionClass"
  74844. c:type="GTcpWrapperConnectionClass"
  74845. glib:is-gtype-struct-for="TcpWrapperConnection">
  74846. <field name="parent_class">
  74847. <type name="TcpConnectionClass" c:type="GTcpConnectionClass"/>
  74848. </field>
  74849. </record>
  74850. <record name="TcpWrapperConnectionPrivate"
  74851. c:type="GTcpWrapperConnectionPrivate"
  74852. disguised="1">
  74853. </record>
  74854. <class name="TestDBus"
  74855. c:symbol-prefix="test_dbus"
  74856. c:type="GTestDBus"
  74857. version="2.34"
  74858. parent="GObject.Object"
  74859. glib:type-name="GTestDBus"
  74860. glib:get-type="g_test_dbus_get_type">
  74861. <doc xml:space="preserve">A helper class for testing code which uses D-Bus without touching the user's
  74862. session bus.
  74863. Note that #GTestDBus modifies the user’s environment, calling setenv().
  74864. This is not thread-safe, so all #GTestDBus calls should be completed before
  74865. threads are spawned, or should have appropriate locking to ensure no access
  74866. conflicts to environment variables shared between #GTestDBus and other
  74867. threads.
  74868. ## Creating unit tests using GTestDBus
  74869. Testing of D-Bus services can be tricky because normally we only ever run
  74870. D-Bus services over an existing instance of the D-Bus daemon thus we
  74871. usually don't activate D-Bus services that are not yet installed into the
  74872. target system. The #GTestDBus object makes this easier for us by taking care
  74873. of the lower level tasks such as running a private D-Bus daemon and looking
  74874. up uninstalled services in customizable locations, typically in your source
  74875. code tree.
  74876. The first thing you will need is a separate service description file for the
  74877. D-Bus daemon. Typically a `services` subdirectory of your `tests` directory
  74878. is a good place to put this file.
  74879. The service file should list your service along with an absolute path to the
  74880. uninstalled service executable in your source tree. Using autotools we would
  74881. achieve this by adding a file such as `my-server.service.in` in the services
  74882. directory and have it processed by configure.
  74883. |[
  74884. [D-BUS Service]
  74885. Name=org.gtk.GDBus.Examples.ObjectManager
  74886. Exec=@abs_top_builddir@/gio/tests/gdbus-example-objectmanager-server
  74887. ]|
  74888. You will also need to indicate this service directory in your test
  74889. fixtures, so you will need to pass the path while compiling your
  74890. test cases. Typically this is done with autotools with an added
  74891. preprocessor flag specified to compile your tests such as:
  74892. |[
  74893. -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\"
  74894. ]|
  74895. Once you have a service definition file which is local to your source tree,
  74896. you can proceed to set up a GTest fixture using the #GTestDBus scaffolding.
  74897. An example of a test fixture for D-Bus services can be found
  74898. here:
  74899. [gdbus-test-fixture.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-test-fixture.c)
  74900. Note that these examples only deal with isolating the D-Bus aspect of your
  74901. service. To successfully run isolated unit tests on your service you may need
  74902. some additional modifications to your test case fixture. For example; if your
  74903. service uses GSettings and installs a schema then it is important that your test service
  74904. not load the schema in the ordinary installed location (chances are that your service
  74905. and schema files are not yet installed, or worse; there is an older version of the
  74906. schema file sitting in the install location).
  74907. Most of the time we can work around these obstacles using the
  74908. environment. Since the environment is inherited by the D-Bus daemon
  74909. created by #GTestDBus and then in turn inherited by any services the
  74910. D-Bus daemon activates, using the setup routine for your fixture is
  74911. a practical place to help sandbox your runtime environment. For the
  74912. rather typical GSettings case we can work around this by setting
  74913. `GSETTINGS_SCHEMA_DIR` to the in tree directory holding your schemas
  74914. in the above fixture_setup() routine.
  74915. The GSettings schemas need to be locally pre-compiled for this to work. This can be achieved
  74916. by compiling the schemas locally as a step before running test cases, an autotools setup might
  74917. do the following in the directory holding schemas:
  74918. |[
  74919. all-am:
  74920. $(GLIB_COMPILE_SCHEMAS) .
  74921. CLEANFILES += gschemas.compiled
  74922. ]|</doc>
  74923. <constructor name="new" c:identifier="g_test_dbus_new">
  74924. <doc xml:space="preserve">Create a new #GTestDBus object.</doc>
  74925. <return-value transfer-ownership="full">
  74926. <doc xml:space="preserve">a new #GTestDBus.</doc>
  74927. <type name="TestDBus" c:type="GTestDBus*"/>
  74928. </return-value>
  74929. <parameters>
  74930. <parameter name="flags" transfer-ownership="none">
  74931. <doc xml:space="preserve">a #GTestDBusFlags</doc>
  74932. <type name="TestDBusFlags" c:type="GTestDBusFlags"/>
  74933. </parameter>
  74934. </parameters>
  74935. </constructor>
  74936. <function name="unset" c:identifier="g_test_dbus_unset">
  74937. <doc xml:space="preserve">Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test
  74938. won't use user's session bus.
  74939. This is useful for unit tests that want to verify behaviour when no session
  74940. bus is running. It is not necessary to call this if unit test already calls
  74941. g_test_dbus_up() before acquiring the session bus.</doc>
  74942. <return-value transfer-ownership="none">
  74943. <type name="none" c:type="void"/>
  74944. </return-value>
  74945. </function>
  74946. <method name="add_service_dir"
  74947. c:identifier="g_test_dbus_add_service_dir">
  74948. <doc xml:space="preserve">Add a path where dbus-daemon will look up .service files. This can't be
  74949. called after g_test_dbus_up().</doc>
  74950. <return-value transfer-ownership="none">
  74951. <type name="none" c:type="void"/>
  74952. </return-value>
  74953. <parameters>
  74954. <instance-parameter name="self" transfer-ownership="none">
  74955. <doc xml:space="preserve">a #GTestDBus</doc>
  74956. <type name="TestDBus" c:type="GTestDBus*"/>
  74957. </instance-parameter>
  74958. <parameter name="path" transfer-ownership="none">
  74959. <doc xml:space="preserve">path to a directory containing .service files</doc>
  74960. <type name="utf8" c:type="const gchar*"/>
  74961. </parameter>
  74962. </parameters>
  74963. </method>
  74964. <method name="down" c:identifier="g_test_dbus_down">
  74965. <doc xml:space="preserve">Stop the session bus started by g_test_dbus_up().
  74966. This will wait for the singleton returned by g_bus_get() or g_bus_get_sync()
  74967. is destroyed. This is done to ensure that the next unit test won't get a
  74968. leaked singleton from this test.</doc>
  74969. <return-value transfer-ownership="none">
  74970. <type name="none" c:type="void"/>
  74971. </return-value>
  74972. <parameters>
  74973. <instance-parameter name="self" transfer-ownership="none">
  74974. <doc xml:space="preserve">a #GTestDBus</doc>
  74975. <type name="TestDBus" c:type="GTestDBus*"/>
  74976. </instance-parameter>
  74977. </parameters>
  74978. </method>
  74979. <method name="get_bus_address"
  74980. c:identifier="g_test_dbus_get_bus_address">
  74981. <doc xml:space="preserve">Get the address on which dbus-daemon is running. If g_test_dbus_up() has not
  74982. been called yet, %NULL is returned. This can be used with
  74983. g_dbus_connection_new_for_address().</doc>
  74984. <return-value transfer-ownership="none" nullable="1">
  74985. <doc xml:space="preserve">the address of the bus, or %NULL.</doc>
  74986. <type name="utf8" c:type="const gchar*"/>
  74987. </return-value>
  74988. <parameters>
  74989. <instance-parameter name="self" transfer-ownership="none">
  74990. <doc xml:space="preserve">a #GTestDBus</doc>
  74991. <type name="TestDBus" c:type="GTestDBus*"/>
  74992. </instance-parameter>
  74993. </parameters>
  74994. </method>
  74995. <method name="get_flags" c:identifier="g_test_dbus_get_flags">
  74996. <doc xml:space="preserve">Get the flags of the #GTestDBus object.</doc>
  74997. <return-value transfer-ownership="none">
  74998. <doc xml:space="preserve">the value of #GTestDBus:flags property</doc>
  74999. <type name="TestDBusFlags" c:type="GTestDBusFlags"/>
  75000. </return-value>
  75001. <parameters>
  75002. <instance-parameter name="self" transfer-ownership="none">
  75003. <doc xml:space="preserve">a #GTestDBus</doc>
  75004. <type name="TestDBus" c:type="GTestDBus*"/>
  75005. </instance-parameter>
  75006. </parameters>
  75007. </method>
  75008. <method name="stop" c:identifier="g_test_dbus_stop">
  75009. <doc xml:space="preserve">Stop the session bus started by g_test_dbus_up().
  75010. Unlike g_test_dbus_down(), this won't verify the #GDBusConnection
  75011. singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit
  75012. tests wanting to verify behaviour after the session bus has been stopped
  75013. can use this function but should still call g_test_dbus_down() when done.</doc>
  75014. <return-value transfer-ownership="none">
  75015. <type name="none" c:type="void"/>
  75016. </return-value>
  75017. <parameters>
  75018. <instance-parameter name="self" transfer-ownership="none">
  75019. <doc xml:space="preserve">a #GTestDBus</doc>
  75020. <type name="TestDBus" c:type="GTestDBus*"/>
  75021. </instance-parameter>
  75022. </parameters>
  75023. </method>
  75024. <method name="up" c:identifier="g_test_dbus_up">
  75025. <doc xml:space="preserve">Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this
  75026. call, it is safe for unit tests to start sending messages on the session bus.
  75027. If this function is called from setup callback of g_test_add(),
  75028. g_test_dbus_down() must be called in its teardown callback.
  75029. If this function is called from unit test's main(), then g_test_dbus_down()
  75030. must be called after g_test_run().</doc>
  75031. <return-value transfer-ownership="none">
  75032. <type name="none" c:type="void"/>
  75033. </return-value>
  75034. <parameters>
  75035. <instance-parameter name="self" transfer-ownership="none">
  75036. <doc xml:space="preserve">a #GTestDBus</doc>
  75037. <type name="TestDBus" c:type="GTestDBus*"/>
  75038. </instance-parameter>
  75039. </parameters>
  75040. </method>
  75041. <property name="flags"
  75042. version="2.34"
  75043. writable="1"
  75044. construct-only="1"
  75045. transfer-ownership="none">
  75046. <doc xml:space="preserve">#GTestDBusFlags specifying the behaviour of the D-Bus session.</doc>
  75047. <type name="TestDBusFlags"/>
  75048. </property>
  75049. </class>
  75050. <bitfield name="TestDBusFlags"
  75051. version="2.34"
  75052. glib:type-name="GTestDBusFlags"
  75053. glib:get-type="g_test_dbus_flags_get_type"
  75054. c:type="GTestDBusFlags">
  75055. <doc xml:space="preserve">Flags to define future #GTestDBus behaviour.</doc>
  75056. <member name="none"
  75057. value="0"
  75058. c:identifier="G_TEST_DBUS_NONE"
  75059. glib:nick="none">
  75060. <doc xml:space="preserve">No flags.</doc>
  75061. </member>
  75062. </bitfield>
  75063. <class name="ThemedIcon"
  75064. c:symbol-prefix="themed_icon"
  75065. c:type="GThemedIcon"
  75066. parent="GObject.Object"
  75067. glib:type-name="GThemedIcon"
  75068. glib:get-type="g_themed_icon_get_type"
  75069. glib:type-struct="ThemedIconClass">
  75070. <doc xml:space="preserve">#GThemedIcon is an implementation of #GIcon that supports icon themes.
  75071. #GThemedIcon contains a list of all of the icons present in an icon
  75072. theme, so that icons can be looked up quickly. #GThemedIcon does
  75073. not provide actual pixmaps for icons, just the icon names.
  75074. Ideally something like gtk_icon_theme_choose_icon() should be used to
  75075. resolve the list of names so that fallback icons work nicely with
  75076. themes that inherit other themes.</doc>
  75077. <implements name="Icon"/>
  75078. <constructor name="new" c:identifier="g_themed_icon_new">
  75079. <doc xml:space="preserve">Creates a new themed icon for @iconname.</doc>
  75080. <return-value transfer-ownership="full">
  75081. <doc xml:space="preserve">a new #GThemedIcon.</doc>
  75082. <type name="ThemedIcon" c:type="GIcon*"/>
  75083. </return-value>
  75084. <parameters>
  75085. <parameter name="iconname" transfer-ownership="none">
  75086. <doc xml:space="preserve">a string containing an icon name.</doc>
  75087. <type name="utf8" c:type="const char*"/>
  75088. </parameter>
  75089. </parameters>
  75090. </constructor>
  75091. <constructor name="new_from_names"
  75092. c:identifier="g_themed_icon_new_from_names">
  75093. <doc xml:space="preserve">Creates a new themed icon for @iconnames.</doc>
  75094. <return-value transfer-ownership="full">
  75095. <doc xml:space="preserve">a new #GThemedIcon</doc>
  75096. <type name="ThemedIcon" c:type="GIcon*"/>
  75097. </return-value>
  75098. <parameters>
  75099. <parameter name="iconnames" transfer-ownership="none">
  75100. <doc xml:space="preserve">an array of strings containing icon names.</doc>
  75101. <array length="1" zero-terminated="0" c:type="char**">
  75102. <type name="utf8" c:type="char*"/>
  75103. </array>
  75104. </parameter>
  75105. <parameter name="len" transfer-ownership="none">
  75106. <doc xml:space="preserve">the length of the @iconnames array, or -1 if @iconnames is
  75107. %NULL-terminated</doc>
  75108. <type name="gint" c:type="int"/>
  75109. </parameter>
  75110. </parameters>
  75111. </constructor>
  75112. <constructor name="new_with_default_fallbacks"
  75113. c:identifier="g_themed_icon_new_with_default_fallbacks">
  75114. <doc xml:space="preserve">Creates a new themed icon for @iconname, and all the names
  75115. that can be created by shortening @iconname at '-' characters.
  75116. In the following example, @icon1 and @icon2 are equivalent:
  75117. |[&lt;!-- language="C" --&gt;
  75118. const char *names[] = {
  75119. "gnome-dev-cdrom-audio",
  75120. "gnome-dev-cdrom",
  75121. "gnome-dev",
  75122. "gnome"
  75123. };
  75124. icon1 = g_themed_icon_new_from_names (names, 4);
  75125. icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
  75126. ]|</doc>
  75127. <return-value transfer-ownership="full">
  75128. <doc xml:space="preserve">a new #GThemedIcon.</doc>
  75129. <type name="ThemedIcon" c:type="GIcon*"/>
  75130. </return-value>
  75131. <parameters>
  75132. <parameter name="iconname" transfer-ownership="none">
  75133. <doc xml:space="preserve">a string containing an icon name</doc>
  75134. <type name="utf8" c:type="const char*"/>
  75135. </parameter>
  75136. </parameters>
  75137. </constructor>
  75138. <method name="append_name" c:identifier="g_themed_icon_append_name">
  75139. <doc xml:space="preserve">Append a name to the list of icons from within @icon.
  75140. Note that doing so invalidates the hash computed by prior calls
  75141. to g_icon_hash().</doc>
  75142. <return-value transfer-ownership="none">
  75143. <type name="none" c:type="void"/>
  75144. </return-value>
  75145. <parameters>
  75146. <instance-parameter name="icon" transfer-ownership="none">
  75147. <doc xml:space="preserve">a #GThemedIcon</doc>
  75148. <type name="ThemedIcon" c:type="GThemedIcon*"/>
  75149. </instance-parameter>
  75150. <parameter name="iconname" transfer-ownership="none">
  75151. <doc xml:space="preserve">name of icon to append to list of icons from within @icon.</doc>
  75152. <type name="utf8" c:type="const char*"/>
  75153. </parameter>
  75154. </parameters>
  75155. </method>
  75156. <method name="get_names" c:identifier="g_themed_icon_get_names">
  75157. <doc xml:space="preserve">Gets the names of icons from within @icon.</doc>
  75158. <return-value transfer-ownership="none">
  75159. <doc xml:space="preserve">a list of icon names.</doc>
  75160. <array c:type="const gchar* const*">
  75161. <type name="utf8"/>
  75162. </array>
  75163. </return-value>
  75164. <parameters>
  75165. <instance-parameter name="icon" transfer-ownership="none">
  75166. <doc xml:space="preserve">a #GThemedIcon.</doc>
  75167. <type name="ThemedIcon" c:type="GThemedIcon*"/>
  75168. </instance-parameter>
  75169. </parameters>
  75170. </method>
  75171. <method name="prepend_name"
  75172. c:identifier="g_themed_icon_prepend_name"
  75173. version="2.18">
  75174. <doc xml:space="preserve">Prepend a name to the list of icons from within @icon.
  75175. Note that doing so invalidates the hash computed by prior calls
  75176. to g_icon_hash().</doc>
  75177. <return-value transfer-ownership="none">
  75178. <type name="none" c:type="void"/>
  75179. </return-value>
  75180. <parameters>
  75181. <instance-parameter name="icon" transfer-ownership="none">
  75182. <doc xml:space="preserve">a #GThemedIcon</doc>
  75183. <type name="ThemedIcon" c:type="GThemedIcon*"/>
  75184. </instance-parameter>
  75185. <parameter name="iconname" transfer-ownership="none">
  75186. <doc xml:space="preserve">name of icon to prepend to list of icons from within @icon.</doc>
  75187. <type name="utf8" c:type="const char*"/>
  75188. </parameter>
  75189. </parameters>
  75190. </method>
  75191. <property name="name"
  75192. readable="0"
  75193. writable="1"
  75194. construct-only="1"
  75195. transfer-ownership="none">
  75196. <doc xml:space="preserve">The icon name.</doc>
  75197. <type name="utf8" c:type="gchar*"/>
  75198. </property>
  75199. <property name="names"
  75200. writable="1"
  75201. construct-only="1"
  75202. transfer-ownership="none">
  75203. <doc xml:space="preserve">A %NULL-terminated array of icon names.</doc>
  75204. <array>
  75205. <type name="utf8"/>
  75206. </array>
  75207. </property>
  75208. <property name="use-default-fallbacks"
  75209. writable="1"
  75210. construct-only="1"
  75211. transfer-ownership="none">
  75212. <doc xml:space="preserve">Whether to use the default fallbacks found by shortening the icon name
  75213. at '-' characters. If the "names" array has more than one element,
  75214. ignores any past the first.
  75215. For example, if the icon name was "gnome-dev-cdrom-audio", the array
  75216. would become
  75217. |[&lt;!-- language="C" --&gt;
  75218. {
  75219. "gnome-dev-cdrom-audio",
  75220. "gnome-dev-cdrom",
  75221. "gnome-dev",
  75222. "gnome",
  75223. NULL
  75224. };
  75225. ]|</doc>
  75226. <type name="gboolean" c:type="gboolean"/>
  75227. </property>
  75228. </class>
  75229. <record name="ThemedIconClass"
  75230. c:type="GThemedIconClass"
  75231. disguised="1"
  75232. glib:is-gtype-struct-for="ThemedIcon">
  75233. </record>
  75234. <class name="ThreadedSocketService"
  75235. c:symbol-prefix="threaded_socket_service"
  75236. c:type="GThreadedSocketService"
  75237. version="2.22"
  75238. parent="SocketService"
  75239. glib:type-name="GThreadedSocketService"
  75240. glib:get-type="g_threaded_socket_service_get_type"
  75241. glib:type-struct="ThreadedSocketServiceClass">
  75242. <doc xml:space="preserve">A #GThreadedSocketService is a simple subclass of #GSocketService
  75243. that handles incoming connections by creating a worker thread and
  75244. dispatching the connection to it by emitting the
  75245. #GThreadedSocketService::run signal in the new thread.
  75246. The signal handler may perform blocking IO and need not return
  75247. until the connection is closed.
  75248. The service is implemented using a thread pool, so there is a
  75249. limited amount of threads available to serve incoming requests.
  75250. The service automatically stops the #GSocketService from accepting
  75251. new connections when all threads are busy.
  75252. As with #GSocketService, you may connect to #GThreadedSocketService::run,
  75253. or subclass and override the default handler.</doc>
  75254. <constructor name="new"
  75255. c:identifier="g_threaded_socket_service_new"
  75256. version="2.22">
  75257. <doc xml:space="preserve">Creates a new #GThreadedSocketService with no listeners. Listeners
  75258. must be added with one of the #GSocketListener "add" methods.</doc>
  75259. <return-value transfer-ownership="full">
  75260. <doc xml:space="preserve">a new #GSocketService.</doc>
  75261. <type name="SocketService" c:type="GSocketService*"/>
  75262. </return-value>
  75263. <parameters>
  75264. <parameter name="max_threads" transfer-ownership="none">
  75265. <doc xml:space="preserve">the maximal number of threads to execute concurrently
  75266. handling incoming clients, -1 means no limit</doc>
  75267. <type name="gint" c:type="int"/>
  75268. </parameter>
  75269. </parameters>
  75270. </constructor>
  75271. <virtual-method name="run">
  75272. <return-value transfer-ownership="none">
  75273. <type name="gboolean" c:type="gboolean"/>
  75274. </return-value>
  75275. <parameters>
  75276. <instance-parameter name="service" transfer-ownership="none">
  75277. <type name="ThreadedSocketService"
  75278. c:type="GThreadedSocketService*"/>
  75279. </instance-parameter>
  75280. <parameter name="connection" transfer-ownership="none">
  75281. <type name="SocketConnection" c:type="GSocketConnection*"/>
  75282. </parameter>
  75283. <parameter name="source_object" transfer-ownership="none">
  75284. <type name="GObject.Object" c:type="GObject*"/>
  75285. </parameter>
  75286. </parameters>
  75287. </virtual-method>
  75288. <property name="max-threads"
  75289. writable="1"
  75290. construct-only="1"
  75291. transfer-ownership="none">
  75292. <type name="gint" c:type="gint"/>
  75293. </property>
  75294. <field name="parent_instance">
  75295. <type name="SocketService" c:type="GSocketService"/>
  75296. </field>
  75297. <field name="priv">
  75298. <type name="ThreadedSocketServicePrivate"
  75299. c:type="GThreadedSocketServicePrivate*"/>
  75300. </field>
  75301. <glib:signal name="run" when="last">
  75302. <doc xml:space="preserve">The ::run signal is emitted in a worker thread in response to an
  75303. incoming connection. This thread is dedicated to handling
  75304. @connection and may perform blocking IO. The signal handler need
  75305. not return until the connection is closed.</doc>
  75306. <return-value transfer-ownership="none">
  75307. <doc xml:space="preserve">%TRUE to stop further signal handlers from being called</doc>
  75308. <type name="gboolean" c:type="gboolean"/>
  75309. </return-value>
  75310. <parameters>
  75311. <parameter name="connection" transfer-ownership="none">
  75312. <doc xml:space="preserve">a new #GSocketConnection object.</doc>
  75313. <type name="SocketConnection"/>
  75314. </parameter>
  75315. <parameter name="source_object" transfer-ownership="none">
  75316. <doc xml:space="preserve">the source_object passed to g_socket_listener_add_address().</doc>
  75317. <type name="GObject.Object"/>
  75318. </parameter>
  75319. </parameters>
  75320. </glib:signal>
  75321. </class>
  75322. <record name="ThreadedSocketServiceClass"
  75323. c:type="GThreadedSocketServiceClass"
  75324. glib:is-gtype-struct-for="ThreadedSocketService">
  75325. <field name="parent_class">
  75326. <type name="SocketServiceClass" c:type="GSocketServiceClass"/>
  75327. </field>
  75328. <field name="run">
  75329. <callback name="run">
  75330. <return-value transfer-ownership="none">
  75331. <type name="gboolean" c:type="gboolean"/>
  75332. </return-value>
  75333. <parameters>
  75334. <parameter name="service" transfer-ownership="none">
  75335. <type name="ThreadedSocketService"
  75336. c:type="GThreadedSocketService*"/>
  75337. </parameter>
  75338. <parameter name="connection" transfer-ownership="none">
  75339. <type name="SocketConnection" c:type="GSocketConnection*"/>
  75340. </parameter>
  75341. <parameter name="source_object" transfer-ownership="none">
  75342. <type name="GObject.Object" c:type="GObject*"/>
  75343. </parameter>
  75344. </parameters>
  75345. </callback>
  75346. </field>
  75347. <field name="_g_reserved1" introspectable="0">
  75348. <callback name="_g_reserved1">
  75349. <return-value transfer-ownership="none">
  75350. <type name="none" c:type="void"/>
  75351. </return-value>
  75352. </callback>
  75353. </field>
  75354. <field name="_g_reserved2" introspectable="0">
  75355. <callback name="_g_reserved2">
  75356. <return-value transfer-ownership="none">
  75357. <type name="none" c:type="void"/>
  75358. </return-value>
  75359. </callback>
  75360. </field>
  75361. <field name="_g_reserved3" introspectable="0">
  75362. <callback name="_g_reserved3">
  75363. <return-value transfer-ownership="none">
  75364. <type name="none" c:type="void"/>
  75365. </return-value>
  75366. </callback>
  75367. </field>
  75368. <field name="_g_reserved4" introspectable="0">
  75369. <callback name="_g_reserved4">
  75370. <return-value transfer-ownership="none">
  75371. <type name="none" c:type="void"/>
  75372. </return-value>
  75373. </callback>
  75374. </field>
  75375. <field name="_g_reserved5" introspectable="0">
  75376. <callback name="_g_reserved5">
  75377. <return-value transfer-ownership="none">
  75378. <type name="none" c:type="void"/>
  75379. </return-value>
  75380. </callback>
  75381. </field>
  75382. </record>
  75383. <record name="ThreadedSocketServicePrivate"
  75384. c:type="GThreadedSocketServicePrivate"
  75385. disguised="1">
  75386. </record>
  75387. <enumeration name="TlsAuthenticationMode"
  75388. version="2.28"
  75389. glib:type-name="GTlsAuthenticationMode"
  75390. glib:get-type="g_tls_authentication_mode_get_type"
  75391. c:type="GTlsAuthenticationMode">
  75392. <doc xml:space="preserve">The client authentication mode for a #GTlsServerConnection.</doc>
  75393. <member name="none"
  75394. value="0"
  75395. c:identifier="G_TLS_AUTHENTICATION_NONE"
  75396. glib:nick="none">
  75397. <doc xml:space="preserve">client authentication not required</doc>
  75398. </member>
  75399. <member name="requested"
  75400. value="1"
  75401. c:identifier="G_TLS_AUTHENTICATION_REQUESTED"
  75402. glib:nick="requested">
  75403. <doc xml:space="preserve">client authentication is requested</doc>
  75404. </member>
  75405. <member name="required"
  75406. value="2"
  75407. c:identifier="G_TLS_AUTHENTICATION_REQUIRED"
  75408. glib:nick="required">
  75409. <doc xml:space="preserve">client authentication is required</doc>
  75410. </member>
  75411. </enumeration>
  75412. <interface name="TlsBackend"
  75413. c:symbol-prefix="tls_backend"
  75414. c:type="GTlsBackend"
  75415. version="2.28"
  75416. glib:type-name="GTlsBackend"
  75417. glib:get-type="g_tls_backend_get_type"
  75418. glib:type-struct="TlsBackendInterface">
  75419. <doc xml:space="preserve">TLS (Transport Layer Security, aka SSL) and DTLS backend.</doc>
  75420. <function name="get_default"
  75421. c:identifier="g_tls_backend_get_default"
  75422. version="2.28">
  75423. <doc xml:space="preserve">Gets the default #GTlsBackend for the system.</doc>
  75424. <return-value transfer-ownership="none">
  75425. <doc xml:space="preserve">a #GTlsBackend</doc>
  75426. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75427. </return-value>
  75428. </function>
  75429. <virtual-method name="get_default_database"
  75430. invoker="get_default_database"
  75431. version="2.30">
  75432. <doc xml:space="preserve">Gets the default #GTlsDatabase used to verify TLS connections.</doc>
  75433. <return-value transfer-ownership="full">
  75434. <doc xml:space="preserve">the default database, which should be
  75435. unreffed when done.</doc>
  75436. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  75437. </return-value>
  75438. <parameters>
  75439. <instance-parameter name="backend" transfer-ownership="none">
  75440. <doc xml:space="preserve">the #GTlsBackend</doc>
  75441. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75442. </instance-parameter>
  75443. </parameters>
  75444. </virtual-method>
  75445. <virtual-method name="supports_dtls"
  75446. invoker="supports_dtls"
  75447. version="2.48">
  75448. <doc xml:space="preserve">Checks if DTLS is supported. DTLS support may not be available even if TLS
  75449. support is available, and vice-versa.</doc>
  75450. <return-value transfer-ownership="none">
  75451. <doc xml:space="preserve">whether DTLS is supported</doc>
  75452. <type name="gboolean" c:type="gboolean"/>
  75453. </return-value>
  75454. <parameters>
  75455. <instance-parameter name="backend" transfer-ownership="none">
  75456. <doc xml:space="preserve">the #GTlsBackend</doc>
  75457. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75458. </instance-parameter>
  75459. </parameters>
  75460. </virtual-method>
  75461. <virtual-method name="supports_tls"
  75462. invoker="supports_tls"
  75463. version="2.28">
  75464. <doc xml:space="preserve">Checks if TLS is supported; if this returns %FALSE for the default
  75465. #GTlsBackend, it means no "real" TLS backend is available.</doc>
  75466. <return-value transfer-ownership="none">
  75467. <doc xml:space="preserve">whether or not TLS is supported</doc>
  75468. <type name="gboolean" c:type="gboolean"/>
  75469. </return-value>
  75470. <parameters>
  75471. <instance-parameter name="backend" transfer-ownership="none">
  75472. <doc xml:space="preserve">the #GTlsBackend</doc>
  75473. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75474. </instance-parameter>
  75475. </parameters>
  75476. </virtual-method>
  75477. <method name="get_certificate_type"
  75478. c:identifier="g_tls_backend_get_certificate_type"
  75479. version="2.28">
  75480. <doc xml:space="preserve">Gets the #GType of @backend's #GTlsCertificate implementation.</doc>
  75481. <return-value transfer-ownership="none">
  75482. <doc xml:space="preserve">the #GType of @backend's #GTlsCertificate
  75483. implementation.</doc>
  75484. <type name="GType" c:type="GType"/>
  75485. </return-value>
  75486. <parameters>
  75487. <instance-parameter name="backend" transfer-ownership="none">
  75488. <doc xml:space="preserve">the #GTlsBackend</doc>
  75489. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75490. </instance-parameter>
  75491. </parameters>
  75492. </method>
  75493. <method name="get_client_connection_type"
  75494. c:identifier="g_tls_backend_get_client_connection_type"
  75495. version="2.28">
  75496. <doc xml:space="preserve">Gets the #GType of @backend's #GTlsClientConnection implementation.</doc>
  75497. <return-value transfer-ownership="none">
  75498. <doc xml:space="preserve">the #GType of @backend's #GTlsClientConnection
  75499. implementation.</doc>
  75500. <type name="GType" c:type="GType"/>
  75501. </return-value>
  75502. <parameters>
  75503. <instance-parameter name="backend" transfer-ownership="none">
  75504. <doc xml:space="preserve">the #GTlsBackend</doc>
  75505. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75506. </instance-parameter>
  75507. </parameters>
  75508. </method>
  75509. <method name="get_default_database"
  75510. c:identifier="g_tls_backend_get_default_database"
  75511. version="2.30">
  75512. <doc xml:space="preserve">Gets the default #GTlsDatabase used to verify TLS connections.</doc>
  75513. <return-value transfer-ownership="full">
  75514. <doc xml:space="preserve">the default database, which should be
  75515. unreffed when done.</doc>
  75516. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  75517. </return-value>
  75518. <parameters>
  75519. <instance-parameter name="backend" transfer-ownership="none">
  75520. <doc xml:space="preserve">the #GTlsBackend</doc>
  75521. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75522. </instance-parameter>
  75523. </parameters>
  75524. </method>
  75525. <method name="get_dtls_client_connection_type"
  75526. c:identifier="g_tls_backend_get_dtls_client_connection_type"
  75527. version="2.48">
  75528. <doc xml:space="preserve">Gets the #GType of @backend’s #GDtlsClientConnection implementation.</doc>
  75529. <return-value transfer-ownership="none">
  75530. <doc xml:space="preserve">the #GType of @backend’s #GDtlsClientConnection
  75531. implementation.</doc>
  75532. <type name="GType" c:type="GType"/>
  75533. </return-value>
  75534. <parameters>
  75535. <instance-parameter name="backend" transfer-ownership="none">
  75536. <doc xml:space="preserve">the #GTlsBackend</doc>
  75537. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75538. </instance-parameter>
  75539. </parameters>
  75540. </method>
  75541. <method name="get_dtls_server_connection_type"
  75542. c:identifier="g_tls_backend_get_dtls_server_connection_type"
  75543. version="2.48">
  75544. <doc xml:space="preserve">Gets the #GType of @backend’s #GDtlsServerConnection implementation.</doc>
  75545. <return-value transfer-ownership="none">
  75546. <doc xml:space="preserve">the #GType of @backend’s #GDtlsServerConnection
  75547. implementation.</doc>
  75548. <type name="GType" c:type="GType"/>
  75549. </return-value>
  75550. <parameters>
  75551. <instance-parameter name="backend" transfer-ownership="none">
  75552. <doc xml:space="preserve">the #GTlsBackend</doc>
  75553. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75554. </instance-parameter>
  75555. </parameters>
  75556. </method>
  75557. <method name="get_file_database_type"
  75558. c:identifier="g_tls_backend_get_file_database_type"
  75559. version="2.30">
  75560. <doc xml:space="preserve">Gets the #GType of @backend's #GTlsFileDatabase implementation.</doc>
  75561. <return-value transfer-ownership="none">
  75562. <doc xml:space="preserve">the #GType of backend's #GTlsFileDatabase implementation.</doc>
  75563. <type name="GType" c:type="GType"/>
  75564. </return-value>
  75565. <parameters>
  75566. <instance-parameter name="backend" transfer-ownership="none">
  75567. <doc xml:space="preserve">the #GTlsBackend</doc>
  75568. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75569. </instance-parameter>
  75570. </parameters>
  75571. </method>
  75572. <method name="get_server_connection_type"
  75573. c:identifier="g_tls_backend_get_server_connection_type"
  75574. version="2.28">
  75575. <doc xml:space="preserve">Gets the #GType of @backend's #GTlsServerConnection implementation.</doc>
  75576. <return-value transfer-ownership="none">
  75577. <doc xml:space="preserve">the #GType of @backend's #GTlsServerConnection
  75578. implementation.</doc>
  75579. <type name="GType" c:type="GType"/>
  75580. </return-value>
  75581. <parameters>
  75582. <instance-parameter name="backend" transfer-ownership="none">
  75583. <doc xml:space="preserve">the #GTlsBackend</doc>
  75584. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75585. </instance-parameter>
  75586. </parameters>
  75587. </method>
  75588. <method name="supports_dtls"
  75589. c:identifier="g_tls_backend_supports_dtls"
  75590. version="2.48">
  75591. <doc xml:space="preserve">Checks if DTLS is supported. DTLS support may not be available even if TLS
  75592. support is available, and vice-versa.</doc>
  75593. <return-value transfer-ownership="none">
  75594. <doc xml:space="preserve">whether DTLS is supported</doc>
  75595. <type name="gboolean" c:type="gboolean"/>
  75596. </return-value>
  75597. <parameters>
  75598. <instance-parameter name="backend" transfer-ownership="none">
  75599. <doc xml:space="preserve">the #GTlsBackend</doc>
  75600. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75601. </instance-parameter>
  75602. </parameters>
  75603. </method>
  75604. <method name="supports_tls"
  75605. c:identifier="g_tls_backend_supports_tls"
  75606. version="2.28">
  75607. <doc xml:space="preserve">Checks if TLS is supported; if this returns %FALSE for the default
  75608. #GTlsBackend, it means no "real" TLS backend is available.</doc>
  75609. <return-value transfer-ownership="none">
  75610. <doc xml:space="preserve">whether or not TLS is supported</doc>
  75611. <type name="gboolean" c:type="gboolean"/>
  75612. </return-value>
  75613. <parameters>
  75614. <instance-parameter name="backend" transfer-ownership="none">
  75615. <doc xml:space="preserve">the #GTlsBackend</doc>
  75616. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75617. </instance-parameter>
  75618. </parameters>
  75619. </method>
  75620. </interface>
  75621. <record name="TlsBackendInterface"
  75622. c:type="GTlsBackendInterface"
  75623. glib:is-gtype-struct-for="TlsBackend"
  75624. version="2.28">
  75625. <doc xml:space="preserve">Provides an interface for describing TLS-related types.</doc>
  75626. <field name="g_iface">
  75627. <doc xml:space="preserve">The parent interface.</doc>
  75628. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  75629. </field>
  75630. <field name="supports_tls">
  75631. <callback name="supports_tls">
  75632. <return-value transfer-ownership="none">
  75633. <doc xml:space="preserve">whether or not TLS is supported</doc>
  75634. <type name="gboolean" c:type="gboolean"/>
  75635. </return-value>
  75636. <parameters>
  75637. <parameter name="backend" transfer-ownership="none">
  75638. <doc xml:space="preserve">the #GTlsBackend</doc>
  75639. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75640. </parameter>
  75641. </parameters>
  75642. </callback>
  75643. </field>
  75644. <field name="get_certificate_type">
  75645. <callback name="get_certificate_type">
  75646. <return-value transfer-ownership="none">
  75647. <type name="GType" c:type="GType"/>
  75648. </return-value>
  75649. </callback>
  75650. </field>
  75651. <field name="get_client_connection_type">
  75652. <callback name="get_client_connection_type">
  75653. <return-value transfer-ownership="none">
  75654. <type name="GType" c:type="GType"/>
  75655. </return-value>
  75656. </callback>
  75657. </field>
  75658. <field name="get_server_connection_type">
  75659. <callback name="get_server_connection_type">
  75660. <return-value transfer-ownership="none">
  75661. <type name="GType" c:type="GType"/>
  75662. </return-value>
  75663. </callback>
  75664. </field>
  75665. <field name="get_file_database_type">
  75666. <callback name="get_file_database_type">
  75667. <return-value transfer-ownership="none">
  75668. <type name="GType" c:type="GType"/>
  75669. </return-value>
  75670. </callback>
  75671. </field>
  75672. <field name="get_default_database">
  75673. <callback name="get_default_database">
  75674. <return-value transfer-ownership="full">
  75675. <doc xml:space="preserve">the default database, which should be
  75676. unreffed when done.</doc>
  75677. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  75678. </return-value>
  75679. <parameters>
  75680. <parameter name="backend" transfer-ownership="none">
  75681. <doc xml:space="preserve">the #GTlsBackend</doc>
  75682. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75683. </parameter>
  75684. </parameters>
  75685. </callback>
  75686. </field>
  75687. <field name="supports_dtls">
  75688. <callback name="supports_dtls">
  75689. <return-value transfer-ownership="none">
  75690. <doc xml:space="preserve">whether DTLS is supported</doc>
  75691. <type name="gboolean" c:type="gboolean"/>
  75692. </return-value>
  75693. <parameters>
  75694. <parameter name="backend" transfer-ownership="none">
  75695. <doc xml:space="preserve">the #GTlsBackend</doc>
  75696. <type name="TlsBackend" c:type="GTlsBackend*"/>
  75697. </parameter>
  75698. </parameters>
  75699. </callback>
  75700. </field>
  75701. <field name="get_dtls_client_connection_type">
  75702. <callback name="get_dtls_client_connection_type">
  75703. <return-value transfer-ownership="none">
  75704. <type name="GType" c:type="GType"/>
  75705. </return-value>
  75706. </callback>
  75707. </field>
  75708. <field name="get_dtls_server_connection_type">
  75709. <callback name="get_dtls_server_connection_type">
  75710. <return-value transfer-ownership="none">
  75711. <type name="GType" c:type="GType"/>
  75712. </return-value>
  75713. </callback>
  75714. </field>
  75715. </record>
  75716. <class name="TlsCertificate"
  75717. c:symbol-prefix="tls_certificate"
  75718. c:type="GTlsCertificate"
  75719. version="2.28"
  75720. parent="GObject.Object"
  75721. abstract="1"
  75722. glib:type-name="GTlsCertificate"
  75723. glib:get-type="g_tls_certificate_get_type"
  75724. glib:type-struct="TlsCertificateClass">
  75725. <doc xml:space="preserve">A certificate used for TLS authentication and encryption.
  75726. This can represent either a certificate only (eg, the certificate
  75727. received by a client from a server), or the combination of
  75728. a certificate and a private key (which is needed when acting as a
  75729. #GTlsServerConnection).</doc>
  75730. <constructor name="new_from_file"
  75731. c:identifier="g_tls_certificate_new_from_file"
  75732. version="2.28"
  75733. throws="1">
  75734. <doc xml:space="preserve">Creates a #GTlsCertificate from the PEM-encoded data in @file. The
  75735. returned certificate will be the first certificate found in @file. As
  75736. of GLib 2.44, if @file contains more certificates it will try to load
  75737. a certificate chain. All certificates will be verified in the order
  75738. found (top-level certificate should be the last one in the file) and
  75739. the #GTlsCertificate:issuer property of each certificate will be set
  75740. accordingly if the verification succeeds. If any certificate in the
  75741. chain cannot be verified, the first certificate in the file will
  75742. still be returned.
  75743. If @file cannot be read or parsed, the function will return %NULL and
  75744. set @error. Otherwise, this behaves like
  75745. g_tls_certificate_new_from_pem().</doc>
  75746. <return-value transfer-ownership="full">
  75747. <doc xml:space="preserve">the new certificate, or %NULL on error</doc>
  75748. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75749. </return-value>
  75750. <parameters>
  75751. <parameter name="file" transfer-ownership="none">
  75752. <doc xml:space="preserve">file containing a PEM-encoded certificate to import</doc>
  75753. <type name="utf8" c:type="const gchar*"/>
  75754. </parameter>
  75755. </parameters>
  75756. </constructor>
  75757. <constructor name="new_from_files"
  75758. c:identifier="g_tls_certificate_new_from_files"
  75759. version="2.28"
  75760. throws="1">
  75761. <doc xml:space="preserve">Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
  75762. and @key_file. The returned certificate will be the first certificate
  75763. found in @cert_file. As of GLib 2.44, if @cert_file contains more
  75764. certificates it will try to load a certificate chain. All
  75765. certificates will be verified in the order found (top-level
  75766. certificate should be the last one in the file) and the
  75767. #GTlsCertificate:issuer property of each certificate will be set
  75768. accordingly if the verification succeeds. If any certificate in the
  75769. chain cannot be verified, the first certificate in the file will
  75770. still be returned.
  75771. If either file cannot be read or parsed, the function will return
  75772. %NULL and set @error. Otherwise, this behaves like
  75773. g_tls_certificate_new_from_pem().</doc>
  75774. <return-value transfer-ownership="full">
  75775. <doc xml:space="preserve">the new certificate, or %NULL on error</doc>
  75776. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75777. </return-value>
  75778. <parameters>
  75779. <parameter name="cert_file" transfer-ownership="none">
  75780. <doc xml:space="preserve">file containing one or more PEM-encoded certificates to
  75781. import</doc>
  75782. <type name="utf8" c:type="const gchar*"/>
  75783. </parameter>
  75784. <parameter name="key_file" transfer-ownership="none">
  75785. <doc xml:space="preserve">file containing a PEM-encoded private key to import</doc>
  75786. <type name="utf8" c:type="const gchar*"/>
  75787. </parameter>
  75788. </parameters>
  75789. </constructor>
  75790. <constructor name="new_from_pem"
  75791. c:identifier="g_tls_certificate_new_from_pem"
  75792. version="2.28"
  75793. throws="1">
  75794. <doc xml:space="preserve">Creates a #GTlsCertificate from the PEM-encoded data in @data. If
  75795. @data includes both a certificate and a private key, then the
  75796. returned certificate will include the private key data as well. (See
  75797. the #GTlsCertificate:private-key-pem property for information about
  75798. supported formats.)
  75799. The returned certificate will be the first certificate found in
  75800. @data. As of GLib 2.44, if @data contains more certificates it will
  75801. try to load a certificate chain. All certificates will be verified in
  75802. the order found (top-level certificate should be the last one in the
  75803. file) and the #GTlsCertificate:issuer property of each certificate
  75804. will be set accordingly if the verification succeeds. If any
  75805. certificate in the chain cannot be verified, the first certificate in
  75806. the file will still be returned.</doc>
  75807. <return-value transfer-ownership="full">
  75808. <doc xml:space="preserve">the new certificate, or %NULL if @data is invalid</doc>
  75809. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75810. </return-value>
  75811. <parameters>
  75812. <parameter name="data" transfer-ownership="none">
  75813. <doc xml:space="preserve">PEM-encoded certificate data</doc>
  75814. <type name="utf8" c:type="const gchar*"/>
  75815. </parameter>
  75816. <parameter name="length" transfer-ownership="none">
  75817. <doc xml:space="preserve">the length of @data, or -1 if it's 0-terminated.</doc>
  75818. <type name="gssize" c:type="gssize"/>
  75819. </parameter>
  75820. </parameters>
  75821. </constructor>
  75822. <function name="list_new_from_file"
  75823. c:identifier="g_tls_certificate_list_new_from_file"
  75824. version="2.28"
  75825. throws="1">
  75826. <doc xml:space="preserve">Creates one or more #GTlsCertificates from the PEM-encoded
  75827. data in @file. If @file cannot be read or parsed, the function will
  75828. return %NULL and set @error. If @file does not contain any
  75829. PEM-encoded certificates, this will return an empty list and not
  75830. set @error.</doc>
  75831. <return-value transfer-ownership="full">
  75832. <doc xml:space="preserve">a
  75833. #GList containing #GTlsCertificate objects. You must free the list
  75834. and its contents when you are done with it.</doc>
  75835. <type name="GLib.List" c:type="GList*">
  75836. <type name="TlsCertificate"/>
  75837. </type>
  75838. </return-value>
  75839. <parameters>
  75840. <parameter name="file" transfer-ownership="none">
  75841. <doc xml:space="preserve">file containing PEM-encoded certificates to import</doc>
  75842. <type name="utf8" c:type="const gchar*"/>
  75843. </parameter>
  75844. </parameters>
  75845. </function>
  75846. <virtual-method name="verify" invoker="verify" version="2.28">
  75847. <doc xml:space="preserve">This verifies @cert and returns a set of #GTlsCertificateFlags
  75848. indicating any problems found with it. This can be used to verify a
  75849. certificate outside the context of making a connection, or to
  75850. check a certificate against a CA that is not part of the system
  75851. CA database.
  75852. If @identity is not %NULL, @cert's name(s) will be compared against
  75853. it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
  75854. value if it does not match. If @identity is %NULL, that bit will
  75855. never be set in the return value.
  75856. If @trusted_ca is not %NULL, then @cert (or one of the certificates
  75857. in its chain) must be signed by it, or else
  75858. %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
  75859. @trusted_ca is %NULL, that bit will never be set in the return
  75860. value.
  75861. (All other #GTlsCertificateFlags values will always be set or unset
  75862. as appropriate.)</doc>
  75863. <return-value transfer-ownership="none">
  75864. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags</doc>
  75865. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  75866. </return-value>
  75867. <parameters>
  75868. <instance-parameter name="cert" transfer-ownership="none">
  75869. <doc xml:space="preserve">a #GTlsCertificate</doc>
  75870. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75871. </instance-parameter>
  75872. <parameter name="identity"
  75873. transfer-ownership="none"
  75874. nullable="1"
  75875. allow-none="1">
  75876. <doc xml:space="preserve">the expected peer identity</doc>
  75877. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  75878. </parameter>
  75879. <parameter name="trusted_ca"
  75880. transfer-ownership="none"
  75881. nullable="1"
  75882. allow-none="1">
  75883. <doc xml:space="preserve">the certificate of a trusted authority</doc>
  75884. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75885. </parameter>
  75886. </parameters>
  75887. </virtual-method>
  75888. <method name="get_issuer"
  75889. c:identifier="g_tls_certificate_get_issuer"
  75890. version="2.28">
  75891. <doc xml:space="preserve">Gets the #GTlsCertificate representing @cert's issuer, if known</doc>
  75892. <return-value transfer-ownership="none">
  75893. <doc xml:space="preserve">The certificate of @cert's issuer,
  75894. or %NULL if @cert is self-signed or signed with an unknown
  75895. certificate.</doc>
  75896. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75897. </return-value>
  75898. <parameters>
  75899. <instance-parameter name="cert" transfer-ownership="none">
  75900. <doc xml:space="preserve">a #GTlsCertificate</doc>
  75901. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75902. </instance-parameter>
  75903. </parameters>
  75904. </method>
  75905. <method name="is_same"
  75906. c:identifier="g_tls_certificate_is_same"
  75907. version="2.34">
  75908. <doc xml:space="preserve">Check if two #GTlsCertificate objects represent the same certificate.
  75909. The raw DER byte data of the two certificates are checked for equality.
  75910. This has the effect that two certificates may compare equal even if
  75911. their #GTlsCertificate:issuer, #GTlsCertificate:private-key, or
  75912. #GTlsCertificate:private-key-pem properties differ.</doc>
  75913. <return-value transfer-ownership="none">
  75914. <doc xml:space="preserve">whether the same or not</doc>
  75915. <type name="gboolean" c:type="gboolean"/>
  75916. </return-value>
  75917. <parameters>
  75918. <instance-parameter name="cert_one" transfer-ownership="none">
  75919. <doc xml:space="preserve">first certificate to compare</doc>
  75920. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75921. </instance-parameter>
  75922. <parameter name="cert_two" transfer-ownership="none">
  75923. <doc xml:space="preserve">second certificate to compare</doc>
  75924. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75925. </parameter>
  75926. </parameters>
  75927. </method>
  75928. <method name="verify"
  75929. c:identifier="g_tls_certificate_verify"
  75930. version="2.28">
  75931. <doc xml:space="preserve">This verifies @cert and returns a set of #GTlsCertificateFlags
  75932. indicating any problems found with it. This can be used to verify a
  75933. certificate outside the context of making a connection, or to
  75934. check a certificate against a CA that is not part of the system
  75935. CA database.
  75936. If @identity is not %NULL, @cert's name(s) will be compared against
  75937. it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
  75938. value if it does not match. If @identity is %NULL, that bit will
  75939. never be set in the return value.
  75940. If @trusted_ca is not %NULL, then @cert (or one of the certificates
  75941. in its chain) must be signed by it, or else
  75942. %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
  75943. @trusted_ca is %NULL, that bit will never be set in the return
  75944. value.
  75945. (All other #GTlsCertificateFlags values will always be set or unset
  75946. as appropriate.)</doc>
  75947. <return-value transfer-ownership="none">
  75948. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags</doc>
  75949. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  75950. </return-value>
  75951. <parameters>
  75952. <instance-parameter name="cert" transfer-ownership="none">
  75953. <doc xml:space="preserve">a #GTlsCertificate</doc>
  75954. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75955. </instance-parameter>
  75956. <parameter name="identity"
  75957. transfer-ownership="none"
  75958. nullable="1"
  75959. allow-none="1">
  75960. <doc xml:space="preserve">the expected peer identity</doc>
  75961. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  75962. </parameter>
  75963. <parameter name="trusted_ca"
  75964. transfer-ownership="none"
  75965. nullable="1"
  75966. allow-none="1">
  75967. <doc xml:space="preserve">the certificate of a trusted authority</doc>
  75968. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  75969. </parameter>
  75970. </parameters>
  75971. </method>
  75972. <property name="certificate"
  75973. version="2.28"
  75974. writable="1"
  75975. construct-only="1"
  75976. transfer-ownership="none">
  75977. <doc xml:space="preserve">The DER (binary) encoded representation of the certificate.
  75978. This property and the #GTlsCertificate:certificate-pem property
  75979. represent the same data, just in different forms.</doc>
  75980. <array name="GLib.ByteArray">
  75981. <type name="gpointer" c:type="gpointer"/>
  75982. </array>
  75983. </property>
  75984. <property name="certificate-pem"
  75985. version="2.28"
  75986. writable="1"
  75987. construct-only="1"
  75988. transfer-ownership="none">
  75989. <doc xml:space="preserve">The PEM (ASCII) encoded representation of the certificate.
  75990. This property and the #GTlsCertificate:certificate
  75991. property represent the same data, just in different forms.</doc>
  75992. <type name="utf8" c:type="gchar*"/>
  75993. </property>
  75994. <property name="issuer"
  75995. version="2.28"
  75996. writable="1"
  75997. construct-only="1"
  75998. transfer-ownership="none">
  75999. <doc xml:space="preserve">A #GTlsCertificate representing the entity that issued this
  76000. certificate. If %NULL, this means that the certificate is either
  76001. self-signed, or else the certificate of the issuer is not
  76002. available.</doc>
  76003. <type name="TlsCertificate"/>
  76004. </property>
  76005. <property name="private-key"
  76006. version="2.28"
  76007. readable="0"
  76008. writable="1"
  76009. construct-only="1"
  76010. transfer-ownership="none">
  76011. <doc xml:space="preserve">The DER (binary) encoded representation of the certificate's
  76012. private key, in either PKCS#1 format or unencrypted PKCS#8
  76013. format. This property (or the #GTlsCertificate:private-key-pem
  76014. property) can be set when constructing a key (eg, from a file),
  76015. but cannot be read.
  76016. PKCS#8 format is supported since 2.32; earlier releases only
  76017. support PKCS#1. You can use the `openssl rsa`
  76018. tool to convert PKCS#8 keys to PKCS#1.</doc>
  76019. <array name="GLib.ByteArray">
  76020. <type name="gpointer" c:type="gpointer"/>
  76021. </array>
  76022. </property>
  76023. <property name="private-key-pem"
  76024. version="2.28"
  76025. readable="0"
  76026. writable="1"
  76027. construct-only="1"
  76028. transfer-ownership="none">
  76029. <doc xml:space="preserve">The PEM (ASCII) encoded representation of the certificate's
  76030. private key in either PKCS#1 format ("`BEGIN RSA PRIVATE
  76031. KEY`") or unencrypted PKCS#8 format ("`BEGIN
  76032. PRIVATE KEY`"). This property (or the
  76033. #GTlsCertificate:private-key property) can be set when
  76034. constructing a key (eg, from a file), but cannot be read.
  76035. PKCS#8 format is supported since 2.32; earlier releases only
  76036. support PKCS#1. You can use the `openssl rsa`
  76037. tool to convert PKCS#8 keys to PKCS#1.</doc>
  76038. <type name="utf8" c:type="gchar*"/>
  76039. </property>
  76040. <field name="parent_instance">
  76041. <type name="GObject.Object" c:type="GObject"/>
  76042. </field>
  76043. <field name="priv">
  76044. <type name="TlsCertificatePrivate" c:type="GTlsCertificatePrivate*"/>
  76045. </field>
  76046. </class>
  76047. <record name="TlsCertificateClass"
  76048. c:type="GTlsCertificateClass"
  76049. glib:is-gtype-struct-for="TlsCertificate">
  76050. <field name="parent_class">
  76051. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  76052. </field>
  76053. <field name="verify">
  76054. <callback name="verify">
  76055. <return-value transfer-ownership="none">
  76056. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags</doc>
  76057. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  76058. </return-value>
  76059. <parameters>
  76060. <parameter name="cert" transfer-ownership="none">
  76061. <doc xml:space="preserve">a #GTlsCertificate</doc>
  76062. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  76063. </parameter>
  76064. <parameter name="identity"
  76065. transfer-ownership="none"
  76066. nullable="1"
  76067. allow-none="1">
  76068. <doc xml:space="preserve">the expected peer identity</doc>
  76069. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  76070. </parameter>
  76071. <parameter name="trusted_ca"
  76072. transfer-ownership="none"
  76073. nullable="1"
  76074. allow-none="1">
  76075. <doc xml:space="preserve">the certificate of a trusted authority</doc>
  76076. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  76077. </parameter>
  76078. </parameters>
  76079. </callback>
  76080. </field>
  76081. <field name="padding" readable="0" private="1">
  76082. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  76083. <type name="gpointer" c:type="gpointer"/>
  76084. </array>
  76085. </field>
  76086. </record>
  76087. <bitfield name="TlsCertificateFlags"
  76088. version="2.28"
  76089. glib:type-name="GTlsCertificateFlags"
  76090. glib:get-type="g_tls_certificate_flags_get_type"
  76091. c:type="GTlsCertificateFlags">
  76092. <doc xml:space="preserve">A set of flags describing TLS certification validation. This can be
  76093. used to set which validation steps to perform (eg, with
  76094. g_tls_client_connection_set_validation_flags()), or to describe why
  76095. a particular certificate was rejected (eg, in
  76096. #GTlsConnection::accept-certificate).</doc>
  76097. <member name="unknown_ca"
  76098. value="1"
  76099. c:identifier="G_TLS_CERTIFICATE_UNKNOWN_CA"
  76100. glib:nick="unknown-ca">
  76101. <doc xml:space="preserve">The signing certificate authority is
  76102. not known.</doc>
  76103. </member>
  76104. <member name="bad_identity"
  76105. value="2"
  76106. c:identifier="G_TLS_CERTIFICATE_BAD_IDENTITY"
  76107. glib:nick="bad-identity">
  76108. <doc xml:space="preserve">The certificate does not match the
  76109. expected identity of the site that it was retrieved from.</doc>
  76110. </member>
  76111. <member name="not_activated"
  76112. value="4"
  76113. c:identifier="G_TLS_CERTIFICATE_NOT_ACTIVATED"
  76114. glib:nick="not-activated">
  76115. <doc xml:space="preserve">The certificate's activation time
  76116. is still in the future</doc>
  76117. </member>
  76118. <member name="expired"
  76119. value="8"
  76120. c:identifier="G_TLS_CERTIFICATE_EXPIRED"
  76121. glib:nick="expired">
  76122. <doc xml:space="preserve">The certificate has expired</doc>
  76123. </member>
  76124. <member name="revoked"
  76125. value="16"
  76126. c:identifier="G_TLS_CERTIFICATE_REVOKED"
  76127. glib:nick="revoked">
  76128. <doc xml:space="preserve">The certificate has been revoked
  76129. according to the #GTlsConnection's certificate revocation list.</doc>
  76130. </member>
  76131. <member name="insecure"
  76132. value="32"
  76133. c:identifier="G_TLS_CERTIFICATE_INSECURE"
  76134. glib:nick="insecure">
  76135. <doc xml:space="preserve">The certificate's algorithm is
  76136. considered insecure.</doc>
  76137. </member>
  76138. <member name="generic_error"
  76139. value="64"
  76140. c:identifier="G_TLS_CERTIFICATE_GENERIC_ERROR"
  76141. glib:nick="generic-error">
  76142. <doc xml:space="preserve">Some other error occurred validating
  76143. the certificate</doc>
  76144. </member>
  76145. <member name="validate_all"
  76146. value="127"
  76147. c:identifier="G_TLS_CERTIFICATE_VALIDATE_ALL"
  76148. glib:nick="validate-all">
  76149. <doc xml:space="preserve">the combination of all of the above
  76150. flags</doc>
  76151. </member>
  76152. </bitfield>
  76153. <record name="TlsCertificatePrivate"
  76154. c:type="GTlsCertificatePrivate"
  76155. disguised="1">
  76156. </record>
  76157. <enumeration name="TlsCertificateRequestFlags"
  76158. version="2.40"
  76159. glib:type-name="GTlsCertificateRequestFlags"
  76160. glib:get-type="g_tls_certificate_request_flags_get_type"
  76161. c:type="GTlsCertificateRequestFlags">
  76162. <doc xml:space="preserve">Flags for g_tls_interaction_request_certificate(),
  76163. g_tls_interaction_request_certificate_async(), and
  76164. g_tls_interaction_invoke_request_certificate().</doc>
  76165. <member name="none"
  76166. value="0"
  76167. c:identifier="G_TLS_CERTIFICATE_REQUEST_NONE"
  76168. glib:nick="none">
  76169. <doc xml:space="preserve">No flags</doc>
  76170. </member>
  76171. </enumeration>
  76172. <interface name="TlsClientConnection"
  76173. c:symbol-prefix="tls_client_connection"
  76174. c:type="GTlsClientConnection"
  76175. version="2.28"
  76176. glib:type-name="GTlsClientConnection"
  76177. glib:get-type="g_tls_client_connection_get_type"
  76178. glib:type-struct="TlsClientConnectionInterface">
  76179. <doc xml:space="preserve">#GTlsClientConnection is the client-side subclass of
  76180. #GTlsConnection, representing a client-side TLS connection.</doc>
  76181. <prerequisite name="TlsConnection"/>
  76182. <function name="new"
  76183. c:identifier="g_tls_client_connection_new"
  76184. version="2.28"
  76185. throws="1">
  76186. <doc xml:space="preserve">Creates a new #GTlsClientConnection wrapping @base_io_stream (which
  76187. must have pollable input and output streams) which is assumed to
  76188. communicate with the server identified by @server_identity.
  76189. See the documentation for #GTlsConnection:base-io-stream for restrictions
  76190. on when application code can run operations on the @base_io_stream after
  76191. this function has returned.</doc>
  76192. <return-value transfer-ownership="full">
  76193. <doc xml:space="preserve">the new
  76194. #GTlsClientConnection, or %NULL on error</doc>
  76195. <type name="TlsClientConnection" c:type="GIOStream*"/>
  76196. </return-value>
  76197. <parameters>
  76198. <parameter name="base_io_stream" transfer-ownership="none">
  76199. <doc xml:space="preserve">the #GIOStream to wrap</doc>
  76200. <type name="IOStream" c:type="GIOStream*"/>
  76201. </parameter>
  76202. <parameter name="server_identity"
  76203. transfer-ownership="none"
  76204. nullable="1"
  76205. allow-none="1">
  76206. <doc xml:space="preserve">the expected identity of the server</doc>
  76207. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  76208. </parameter>
  76209. </parameters>
  76210. </function>
  76211. <virtual-method name="copy_session_state"
  76212. invoker="copy_session_state"
  76213. version="2.46">
  76214. <doc xml:space="preserve">Copies session state from one connection to another. This is
  76215. not normally needed, but may be used when the same session
  76216. needs to be used between different endpoints as is required
  76217. by some protocols such as FTP over TLS. @source should have
  76218. already completed a handshake, and @conn should not have
  76219. completed a handshake.</doc>
  76220. <return-value transfer-ownership="none">
  76221. <type name="none" c:type="void"/>
  76222. </return-value>
  76223. <parameters>
  76224. <instance-parameter name="conn" transfer-ownership="none">
  76225. <doc xml:space="preserve">a #GTlsClientConnection</doc>
  76226. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76227. </instance-parameter>
  76228. <parameter name="source" transfer-ownership="none">
  76229. <doc xml:space="preserve">a #GTlsClientConnection</doc>
  76230. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76231. </parameter>
  76232. </parameters>
  76233. </virtual-method>
  76234. <method name="copy_session_state"
  76235. c:identifier="g_tls_client_connection_copy_session_state"
  76236. version="2.46">
  76237. <doc xml:space="preserve">Copies session state from one connection to another. This is
  76238. not normally needed, but may be used when the same session
  76239. needs to be used between different endpoints as is required
  76240. by some protocols such as FTP over TLS. @source should have
  76241. already completed a handshake, and @conn should not have
  76242. completed a handshake.</doc>
  76243. <return-value transfer-ownership="none">
  76244. <type name="none" c:type="void"/>
  76245. </return-value>
  76246. <parameters>
  76247. <instance-parameter name="conn" transfer-ownership="none">
  76248. <doc xml:space="preserve">a #GTlsClientConnection</doc>
  76249. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76250. </instance-parameter>
  76251. <parameter name="source" transfer-ownership="none">
  76252. <doc xml:space="preserve">a #GTlsClientConnection</doc>
  76253. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76254. </parameter>
  76255. </parameters>
  76256. </method>
  76257. <method name="get_accepted_cas"
  76258. c:identifier="g_tls_client_connection_get_accepted_cas"
  76259. version="2.28">
  76260. <doc xml:space="preserve">Gets the list of distinguished names of the Certificate Authorities
  76261. that the server will accept certificates from. This will be set
  76262. during the TLS handshake if the server requests a certificate.
  76263. Otherwise, it will be %NULL.
  76264. Each item in the list is a #GByteArray which contains the complete
  76265. subject DN of the certificate authority.</doc>
  76266. <return-value transfer-ownership="full">
  76267. <doc xml:space="preserve">the list of
  76268. CA DNs. You should unref each element with g_byte_array_unref() and then
  76269. the free the list with g_list_free().</doc>
  76270. <type name="GLib.List" c:type="GList*">
  76271. <array name="GLib.ByteArray">
  76272. <type name="gpointer" c:type="gpointer"/>
  76273. </array>
  76274. </type>
  76275. </return-value>
  76276. <parameters>
  76277. <instance-parameter name="conn" transfer-ownership="none">
  76278. <doc xml:space="preserve">the #GTlsClientConnection</doc>
  76279. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76280. </instance-parameter>
  76281. </parameters>
  76282. </method>
  76283. <method name="get_server_identity"
  76284. c:identifier="g_tls_client_connection_get_server_identity"
  76285. version="2.28">
  76286. <doc xml:space="preserve">Gets @conn's expected server identity</doc>
  76287. <return-value transfer-ownership="none">
  76288. <doc xml:space="preserve">a #GSocketConnectable describing the
  76289. expected server identity, or %NULL if the expected identity is not
  76290. known.</doc>
  76291. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  76292. </return-value>
  76293. <parameters>
  76294. <instance-parameter name="conn" transfer-ownership="none">
  76295. <doc xml:space="preserve">the #GTlsClientConnection</doc>
  76296. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76297. </instance-parameter>
  76298. </parameters>
  76299. </method>
  76300. <method name="get_use_ssl3"
  76301. c:identifier="g_tls_client_connection_get_use_ssl3"
  76302. version="2.28">
  76303. <doc xml:space="preserve">Gets whether @conn will use SSL 3.0 rather than the
  76304. highest-supported version of TLS; see
  76305. g_tls_client_connection_set_use_ssl3().</doc>
  76306. <return-value transfer-ownership="none">
  76307. <doc xml:space="preserve">whether @conn will use SSL 3.0</doc>
  76308. <type name="gboolean" c:type="gboolean"/>
  76309. </return-value>
  76310. <parameters>
  76311. <instance-parameter name="conn" transfer-ownership="none">
  76312. <doc xml:space="preserve">the #GTlsClientConnection</doc>
  76313. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76314. </instance-parameter>
  76315. </parameters>
  76316. </method>
  76317. <method name="get_validation_flags"
  76318. c:identifier="g_tls_client_connection_get_validation_flags"
  76319. version="2.28">
  76320. <doc xml:space="preserve">Gets @conn's validation flags</doc>
  76321. <return-value transfer-ownership="none">
  76322. <doc xml:space="preserve">the validation flags</doc>
  76323. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  76324. </return-value>
  76325. <parameters>
  76326. <instance-parameter name="conn" transfer-ownership="none">
  76327. <doc xml:space="preserve">the #GTlsClientConnection</doc>
  76328. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76329. </instance-parameter>
  76330. </parameters>
  76331. </method>
  76332. <method name="set_server_identity"
  76333. c:identifier="g_tls_client_connection_set_server_identity"
  76334. version="2.28">
  76335. <doc xml:space="preserve">Sets @conn's expected server identity, which is used both to tell
  76336. servers on virtual hosts which certificate to present, and also
  76337. to let @conn know what name to look for in the certificate when
  76338. performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.</doc>
  76339. <return-value transfer-ownership="none">
  76340. <type name="none" c:type="void"/>
  76341. </return-value>
  76342. <parameters>
  76343. <instance-parameter name="conn" transfer-ownership="none">
  76344. <doc xml:space="preserve">the #GTlsClientConnection</doc>
  76345. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76346. </instance-parameter>
  76347. <parameter name="identity" transfer-ownership="none">
  76348. <doc xml:space="preserve">a #GSocketConnectable describing the expected server identity</doc>
  76349. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  76350. </parameter>
  76351. </parameters>
  76352. </method>
  76353. <method name="set_use_ssl3"
  76354. c:identifier="g_tls_client_connection_set_use_ssl3"
  76355. version="2.28">
  76356. <doc xml:space="preserve">If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
  76357. trying to properly negotiate the right version of TLS or SSL to use.
  76358. This can be used when talking to servers that do not implement the
  76359. fallbacks correctly and which will therefore fail to handshake with
  76360. a "modern" TLS handshake attempt.</doc>
  76361. <return-value transfer-ownership="none">
  76362. <type name="none" c:type="void"/>
  76363. </return-value>
  76364. <parameters>
  76365. <instance-parameter name="conn" transfer-ownership="none">
  76366. <doc xml:space="preserve">the #GTlsClientConnection</doc>
  76367. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76368. </instance-parameter>
  76369. <parameter name="use_ssl3" transfer-ownership="none">
  76370. <doc xml:space="preserve">whether to use SSL 3.0</doc>
  76371. <type name="gboolean" c:type="gboolean"/>
  76372. </parameter>
  76373. </parameters>
  76374. </method>
  76375. <method name="set_validation_flags"
  76376. c:identifier="g_tls_client_connection_set_validation_flags"
  76377. version="2.28">
  76378. <doc xml:space="preserve">Sets @conn's validation flags, to override the default set of
  76379. checks performed when validating a server certificate. By default,
  76380. %G_TLS_CERTIFICATE_VALIDATE_ALL is used.</doc>
  76381. <return-value transfer-ownership="none">
  76382. <type name="none" c:type="void"/>
  76383. </return-value>
  76384. <parameters>
  76385. <instance-parameter name="conn" transfer-ownership="none">
  76386. <doc xml:space="preserve">the #GTlsClientConnection</doc>
  76387. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76388. </instance-parameter>
  76389. <parameter name="flags" transfer-ownership="none">
  76390. <doc xml:space="preserve">the #GTlsCertificateFlags to use</doc>
  76391. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  76392. </parameter>
  76393. </parameters>
  76394. </method>
  76395. <property name="accepted-cas" version="2.28" transfer-ownership="none">
  76396. <doc xml:space="preserve">A list of the distinguished names of the Certificate Authorities
  76397. that the server will accept client certificates signed by. If the
  76398. server requests a client certificate during the handshake, then
  76399. this property will be set after the handshake completes.
  76400. Each item in the list is a #GByteArray which contains the complete
  76401. subject DN of the certificate authority.</doc>
  76402. <type name="GLib.List" c:type="gpointer">
  76403. <type name="gpointer" c:type="gpointer"/>
  76404. </type>
  76405. </property>
  76406. <property name="server-identity"
  76407. version="2.28"
  76408. writable="1"
  76409. construct="1"
  76410. transfer-ownership="none">
  76411. <doc xml:space="preserve">A #GSocketConnectable describing the identity of the server that
  76412. is expected on the other end of the connection.
  76413. If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
  76414. #GTlsClientConnection:validation-flags, this object will be used
  76415. to determine the expected identify of the remote end of the
  76416. connection; if #GTlsClientConnection:server-identity is not set,
  76417. or does not match the identity presented by the server, then the
  76418. %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
  76419. In addition to its use in verifying the server certificate,
  76420. this is also used to give a hint to the server about what
  76421. certificate we expect, which is useful for servers that serve
  76422. virtual hosts.</doc>
  76423. <type name="SocketConnectable"/>
  76424. </property>
  76425. <property name="use-ssl3"
  76426. version="2.28"
  76427. writable="1"
  76428. construct="1"
  76429. transfer-ownership="none">
  76430. <doc xml:space="preserve">If %TRUE, tells the connection to use a fallback version of TLS
  76431. or SSL, rather than trying to negotiate the best version of TLS
  76432. to use. This can be used when talking to servers that don't
  76433. implement version negotiation correctly and therefore refuse to
  76434. handshake at all with a "modern" TLS handshake.
  76435. Despite the property name, the fallback version is not
  76436. necessarily SSL 3.0; if SSL 3.0 has been disabled, the
  76437. #GTlsClientConnection will use the next highest available version
  76438. (normally TLS 1.0) as the fallback version.</doc>
  76439. <type name="gboolean" c:type="gboolean"/>
  76440. </property>
  76441. <property name="validation-flags"
  76442. version="2.28"
  76443. writable="1"
  76444. construct="1"
  76445. transfer-ownership="none">
  76446. <doc xml:space="preserve">What steps to perform when validating a certificate received from
  76447. a server. Server certificates that fail to validate in all of the
  76448. ways indicated here will be rejected unless the application
  76449. overrides the default via #GTlsConnection::accept-certificate.</doc>
  76450. <type name="TlsCertificateFlags"/>
  76451. </property>
  76452. </interface>
  76453. <record name="TlsClientConnectionInterface"
  76454. c:type="GTlsClientConnectionInterface"
  76455. glib:is-gtype-struct-for="TlsClientConnection"
  76456. version="2.26">
  76457. <doc xml:space="preserve">vtable for a #GTlsClientConnection implementation.</doc>
  76458. <field name="g_iface">
  76459. <doc xml:space="preserve">The parent interface.</doc>
  76460. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  76461. </field>
  76462. <field name="copy_session_state">
  76463. <callback name="copy_session_state">
  76464. <return-value transfer-ownership="none">
  76465. <type name="none" c:type="void"/>
  76466. </return-value>
  76467. <parameters>
  76468. <parameter name="conn" transfer-ownership="none">
  76469. <doc xml:space="preserve">a #GTlsClientConnection</doc>
  76470. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76471. </parameter>
  76472. <parameter name="source" transfer-ownership="none">
  76473. <doc xml:space="preserve">a #GTlsClientConnection</doc>
  76474. <type name="TlsClientConnection" c:type="GTlsClientConnection*"/>
  76475. </parameter>
  76476. </parameters>
  76477. </callback>
  76478. </field>
  76479. </record>
  76480. <class name="TlsConnection"
  76481. c:symbol-prefix="tls_connection"
  76482. c:type="GTlsConnection"
  76483. version="2.28"
  76484. parent="IOStream"
  76485. abstract="1"
  76486. glib:type-name="GTlsConnection"
  76487. glib:get-type="g_tls_connection_get_type"
  76488. glib:type-struct="TlsConnectionClass">
  76489. <doc xml:space="preserve">#GTlsConnection is the base TLS connection class type, which wraps
  76490. a #GIOStream and provides TLS encryption on top of it. Its
  76491. subclasses, #GTlsClientConnection and #GTlsServerConnection,
  76492. implement client-side and server-side TLS, respectively.
  76493. For DTLS (Datagram TLS) support, see #GDtlsConnection.</doc>
  76494. <virtual-method name="accept_certificate">
  76495. <return-value transfer-ownership="none">
  76496. <type name="gboolean" c:type="gboolean"/>
  76497. </return-value>
  76498. <parameters>
  76499. <instance-parameter name="connection" transfer-ownership="none">
  76500. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76501. </instance-parameter>
  76502. <parameter name="peer_cert" transfer-ownership="none">
  76503. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  76504. </parameter>
  76505. <parameter name="errors" transfer-ownership="none">
  76506. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  76507. </parameter>
  76508. </parameters>
  76509. </virtual-method>
  76510. <virtual-method name="handshake"
  76511. invoker="handshake"
  76512. version="2.28"
  76513. throws="1">
  76514. <doc xml:space="preserve">Attempts a TLS handshake on @conn.
  76515. On the client side, it is never necessary to call this method;
  76516. although the connection needs to perform a handshake after
  76517. connecting (or after sending a "STARTTLS"-type command) and may
  76518. need to rehandshake later if the server requests it,
  76519. #GTlsConnection will handle this for you automatically when you try
  76520. to send or receive data on the connection. However, you can call
  76521. g_tls_connection_handshake() manually if you want to know for sure
  76522. whether the initial handshake succeeded or failed (as opposed to
  76523. just immediately trying to write to @conn's output stream, in which
  76524. case if it fails, it may not be possible to tell if it failed
  76525. before or after completing the handshake).
  76526. Likewise, on the server side, although a handshake is necessary at
  76527. the beginning of the communication, you do not need to call this
  76528. function explicitly unless you want clearer error reporting.
  76529. However, you may call g_tls_connection_handshake() later on to
  76530. renegotiate parameters (encryption methods, etc) with the client.
  76531. #GTlsConnection::accept_certificate may be emitted during the
  76532. handshake.</doc>
  76533. <return-value transfer-ownership="none">
  76534. <doc xml:space="preserve">success or failure</doc>
  76535. <type name="gboolean" c:type="gboolean"/>
  76536. </return-value>
  76537. <parameters>
  76538. <instance-parameter name="conn" transfer-ownership="none">
  76539. <doc xml:space="preserve">a #GTlsConnection</doc>
  76540. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76541. </instance-parameter>
  76542. <parameter name="cancellable"
  76543. transfer-ownership="none"
  76544. nullable="1"
  76545. allow-none="1">
  76546. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  76547. <type name="Cancellable" c:type="GCancellable*"/>
  76548. </parameter>
  76549. </parameters>
  76550. </virtual-method>
  76551. <virtual-method name="handshake_async"
  76552. invoker="handshake_async"
  76553. version="2.28">
  76554. <doc xml:space="preserve">Asynchronously performs a TLS handshake on @conn. See
  76555. g_tls_connection_handshake() for more information.</doc>
  76556. <return-value transfer-ownership="none">
  76557. <type name="none" c:type="void"/>
  76558. </return-value>
  76559. <parameters>
  76560. <instance-parameter name="conn" transfer-ownership="none">
  76561. <doc xml:space="preserve">a #GTlsConnection</doc>
  76562. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76563. </instance-parameter>
  76564. <parameter name="io_priority" transfer-ownership="none">
  76565. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  76566. <type name="gint" c:type="int"/>
  76567. </parameter>
  76568. <parameter name="cancellable"
  76569. transfer-ownership="none"
  76570. nullable="1"
  76571. allow-none="1">
  76572. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  76573. <type name="Cancellable" c:type="GCancellable*"/>
  76574. </parameter>
  76575. <parameter name="callback"
  76576. transfer-ownership="none"
  76577. nullable="1"
  76578. allow-none="1"
  76579. scope="async"
  76580. closure="3">
  76581. <doc xml:space="preserve">callback to call when the handshake is complete</doc>
  76582. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  76583. </parameter>
  76584. <parameter name="user_data"
  76585. transfer-ownership="none"
  76586. nullable="1"
  76587. allow-none="1"
  76588. closure="3">
  76589. <doc xml:space="preserve">the data to pass to the callback function</doc>
  76590. <type name="gpointer" c:type="gpointer"/>
  76591. </parameter>
  76592. </parameters>
  76593. </virtual-method>
  76594. <virtual-method name="handshake_finish"
  76595. invoker="handshake_finish"
  76596. version="2.28"
  76597. throws="1">
  76598. <doc xml:space="preserve">Finish an asynchronous TLS handshake operation. See
  76599. g_tls_connection_handshake() for more information.</doc>
  76600. <return-value transfer-ownership="none">
  76601. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  76602. case @error will be set.</doc>
  76603. <type name="gboolean" c:type="gboolean"/>
  76604. </return-value>
  76605. <parameters>
  76606. <instance-parameter name="conn" transfer-ownership="none">
  76607. <doc xml:space="preserve">a #GTlsConnection</doc>
  76608. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76609. </instance-parameter>
  76610. <parameter name="result" transfer-ownership="none">
  76611. <doc xml:space="preserve">a #GAsyncResult.</doc>
  76612. <type name="AsyncResult" c:type="GAsyncResult*"/>
  76613. </parameter>
  76614. </parameters>
  76615. </virtual-method>
  76616. <method name="emit_accept_certificate"
  76617. c:identifier="g_tls_connection_emit_accept_certificate"
  76618. version="2.28">
  76619. <doc xml:space="preserve">Used by #GTlsConnection implementations to emit the
  76620. #GTlsConnection::accept-certificate signal.</doc>
  76621. <return-value transfer-ownership="none">
  76622. <doc xml:space="preserve">%TRUE if one of the signal handlers has returned
  76623. %TRUE to accept @peer_cert</doc>
  76624. <type name="gboolean" c:type="gboolean"/>
  76625. </return-value>
  76626. <parameters>
  76627. <instance-parameter name="conn" transfer-ownership="none">
  76628. <doc xml:space="preserve">a #GTlsConnection</doc>
  76629. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76630. </instance-parameter>
  76631. <parameter name="peer_cert" transfer-ownership="none">
  76632. <doc xml:space="preserve">the peer's #GTlsCertificate</doc>
  76633. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  76634. </parameter>
  76635. <parameter name="errors" transfer-ownership="none">
  76636. <doc xml:space="preserve">the problems with @peer_cert</doc>
  76637. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  76638. </parameter>
  76639. </parameters>
  76640. </method>
  76641. <method name="get_certificate"
  76642. c:identifier="g_tls_connection_get_certificate"
  76643. version="2.28">
  76644. <doc xml:space="preserve">Gets @conn's certificate, as set by
  76645. g_tls_connection_set_certificate().</doc>
  76646. <return-value transfer-ownership="none">
  76647. <doc xml:space="preserve">@conn's certificate, or %NULL</doc>
  76648. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  76649. </return-value>
  76650. <parameters>
  76651. <instance-parameter name="conn" transfer-ownership="none">
  76652. <doc xml:space="preserve">a #GTlsConnection</doc>
  76653. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76654. </instance-parameter>
  76655. </parameters>
  76656. </method>
  76657. <method name="get_database"
  76658. c:identifier="g_tls_connection_get_database"
  76659. version="2.30">
  76660. <doc xml:space="preserve">Gets the certificate database that @conn uses to verify
  76661. peer certificates. See g_tls_connection_set_database().</doc>
  76662. <return-value transfer-ownership="none">
  76663. <doc xml:space="preserve">the certificate database that @conn uses or %NULL</doc>
  76664. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  76665. </return-value>
  76666. <parameters>
  76667. <instance-parameter name="conn" transfer-ownership="none">
  76668. <doc xml:space="preserve">a #GTlsConnection</doc>
  76669. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76670. </instance-parameter>
  76671. </parameters>
  76672. </method>
  76673. <method name="get_interaction"
  76674. c:identifier="g_tls_connection_get_interaction"
  76675. version="2.30">
  76676. <doc xml:space="preserve">Get the object that will be used to interact with the user. It will be used
  76677. for things like prompting the user for passwords. If %NULL is returned, then
  76678. no user interaction will occur for this connection.</doc>
  76679. <return-value transfer-ownership="none">
  76680. <doc xml:space="preserve">The interaction object.</doc>
  76681. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  76682. </return-value>
  76683. <parameters>
  76684. <instance-parameter name="conn" transfer-ownership="none">
  76685. <doc xml:space="preserve">a connection</doc>
  76686. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76687. </instance-parameter>
  76688. </parameters>
  76689. </method>
  76690. <method name="get_peer_certificate"
  76691. c:identifier="g_tls_connection_get_peer_certificate"
  76692. version="2.28">
  76693. <doc xml:space="preserve">Gets @conn's peer's certificate after the handshake has completed.
  76694. (It is not set during the emission of
  76695. #GTlsConnection::accept-certificate.)</doc>
  76696. <return-value transfer-ownership="none">
  76697. <doc xml:space="preserve">@conn's peer's certificate, or %NULL</doc>
  76698. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  76699. </return-value>
  76700. <parameters>
  76701. <instance-parameter name="conn" transfer-ownership="none">
  76702. <doc xml:space="preserve">a #GTlsConnection</doc>
  76703. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76704. </instance-parameter>
  76705. </parameters>
  76706. </method>
  76707. <method name="get_peer_certificate_errors"
  76708. c:identifier="g_tls_connection_get_peer_certificate_errors"
  76709. version="2.28">
  76710. <doc xml:space="preserve">Gets the errors associated with validating @conn's peer's
  76711. certificate, after the handshake has completed. (It is not set
  76712. during the emission of #GTlsConnection::accept-certificate.)</doc>
  76713. <return-value transfer-ownership="none">
  76714. <doc xml:space="preserve">@conn's peer's certificate errors</doc>
  76715. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  76716. </return-value>
  76717. <parameters>
  76718. <instance-parameter name="conn" transfer-ownership="none">
  76719. <doc xml:space="preserve">a #GTlsConnection</doc>
  76720. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76721. </instance-parameter>
  76722. </parameters>
  76723. </method>
  76724. <method name="get_rehandshake_mode"
  76725. c:identifier="g_tls_connection_get_rehandshake_mode"
  76726. version="2.28">
  76727. <doc xml:space="preserve">Gets @conn rehandshaking mode. See
  76728. g_tls_connection_set_rehandshake_mode() for details.</doc>
  76729. <return-value transfer-ownership="none">
  76730. <doc xml:space="preserve">@conn's rehandshaking mode</doc>
  76731. <type name="TlsRehandshakeMode" c:type="GTlsRehandshakeMode"/>
  76732. </return-value>
  76733. <parameters>
  76734. <instance-parameter name="conn" transfer-ownership="none">
  76735. <doc xml:space="preserve">a #GTlsConnection</doc>
  76736. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76737. </instance-parameter>
  76738. </parameters>
  76739. </method>
  76740. <method name="get_require_close_notify"
  76741. c:identifier="g_tls_connection_get_require_close_notify"
  76742. version="2.28">
  76743. <doc xml:space="preserve">Tests whether or not @conn expects a proper TLS close notification
  76744. when the connection is closed. See
  76745. g_tls_connection_set_require_close_notify() for details.</doc>
  76746. <return-value transfer-ownership="none">
  76747. <doc xml:space="preserve">%TRUE if @conn requires a proper TLS close
  76748. notification.</doc>
  76749. <type name="gboolean" c:type="gboolean"/>
  76750. </return-value>
  76751. <parameters>
  76752. <instance-parameter name="conn" transfer-ownership="none">
  76753. <doc xml:space="preserve">a #GTlsConnection</doc>
  76754. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76755. </instance-parameter>
  76756. </parameters>
  76757. </method>
  76758. <method name="get_use_system_certdb"
  76759. c:identifier="g_tls_connection_get_use_system_certdb"
  76760. deprecated="1"
  76761. deprecated-version="2.30">
  76762. <doc xml:space="preserve">Gets whether @conn uses the system certificate database to verify
  76763. peer certificates. See g_tls_connection_set_use_system_certdb().</doc>
  76764. <doc-deprecated xml:space="preserve">Use g_tls_connection_get_database() instead</doc-deprecated>
  76765. <return-value transfer-ownership="none">
  76766. <doc xml:space="preserve">whether @conn uses the system certificate database</doc>
  76767. <type name="gboolean" c:type="gboolean"/>
  76768. </return-value>
  76769. <parameters>
  76770. <instance-parameter name="conn" transfer-ownership="none">
  76771. <doc xml:space="preserve">a #GTlsConnection</doc>
  76772. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76773. </instance-parameter>
  76774. </parameters>
  76775. </method>
  76776. <method name="handshake"
  76777. c:identifier="g_tls_connection_handshake"
  76778. version="2.28"
  76779. throws="1">
  76780. <doc xml:space="preserve">Attempts a TLS handshake on @conn.
  76781. On the client side, it is never necessary to call this method;
  76782. although the connection needs to perform a handshake after
  76783. connecting (or after sending a "STARTTLS"-type command) and may
  76784. need to rehandshake later if the server requests it,
  76785. #GTlsConnection will handle this for you automatically when you try
  76786. to send or receive data on the connection. However, you can call
  76787. g_tls_connection_handshake() manually if you want to know for sure
  76788. whether the initial handshake succeeded or failed (as opposed to
  76789. just immediately trying to write to @conn's output stream, in which
  76790. case if it fails, it may not be possible to tell if it failed
  76791. before or after completing the handshake).
  76792. Likewise, on the server side, although a handshake is necessary at
  76793. the beginning of the communication, you do not need to call this
  76794. function explicitly unless you want clearer error reporting.
  76795. However, you may call g_tls_connection_handshake() later on to
  76796. renegotiate parameters (encryption methods, etc) with the client.
  76797. #GTlsConnection::accept_certificate may be emitted during the
  76798. handshake.</doc>
  76799. <return-value transfer-ownership="none">
  76800. <doc xml:space="preserve">success or failure</doc>
  76801. <type name="gboolean" c:type="gboolean"/>
  76802. </return-value>
  76803. <parameters>
  76804. <instance-parameter name="conn" transfer-ownership="none">
  76805. <doc xml:space="preserve">a #GTlsConnection</doc>
  76806. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76807. </instance-parameter>
  76808. <parameter name="cancellable"
  76809. transfer-ownership="none"
  76810. nullable="1"
  76811. allow-none="1">
  76812. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  76813. <type name="Cancellable" c:type="GCancellable*"/>
  76814. </parameter>
  76815. </parameters>
  76816. </method>
  76817. <method name="handshake_async"
  76818. c:identifier="g_tls_connection_handshake_async"
  76819. version="2.28">
  76820. <doc xml:space="preserve">Asynchronously performs a TLS handshake on @conn. See
  76821. g_tls_connection_handshake() for more information.</doc>
  76822. <return-value transfer-ownership="none">
  76823. <type name="none" c:type="void"/>
  76824. </return-value>
  76825. <parameters>
  76826. <instance-parameter name="conn" transfer-ownership="none">
  76827. <doc xml:space="preserve">a #GTlsConnection</doc>
  76828. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76829. </instance-parameter>
  76830. <parameter name="io_priority" transfer-ownership="none">
  76831. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  76832. <type name="gint" c:type="int"/>
  76833. </parameter>
  76834. <parameter name="cancellable"
  76835. transfer-ownership="none"
  76836. nullable="1"
  76837. allow-none="1">
  76838. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  76839. <type name="Cancellable" c:type="GCancellable*"/>
  76840. </parameter>
  76841. <parameter name="callback"
  76842. transfer-ownership="none"
  76843. nullable="1"
  76844. allow-none="1"
  76845. scope="async"
  76846. closure="3">
  76847. <doc xml:space="preserve">callback to call when the handshake is complete</doc>
  76848. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  76849. </parameter>
  76850. <parameter name="user_data"
  76851. transfer-ownership="none"
  76852. nullable="1"
  76853. allow-none="1">
  76854. <doc xml:space="preserve">the data to pass to the callback function</doc>
  76855. <type name="gpointer" c:type="gpointer"/>
  76856. </parameter>
  76857. </parameters>
  76858. </method>
  76859. <method name="handshake_finish"
  76860. c:identifier="g_tls_connection_handshake_finish"
  76861. version="2.28"
  76862. throws="1">
  76863. <doc xml:space="preserve">Finish an asynchronous TLS handshake operation. See
  76864. g_tls_connection_handshake() for more information.</doc>
  76865. <return-value transfer-ownership="none">
  76866. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  76867. case @error will be set.</doc>
  76868. <type name="gboolean" c:type="gboolean"/>
  76869. </return-value>
  76870. <parameters>
  76871. <instance-parameter name="conn" transfer-ownership="none">
  76872. <doc xml:space="preserve">a #GTlsConnection</doc>
  76873. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76874. </instance-parameter>
  76875. <parameter name="result" transfer-ownership="none">
  76876. <doc xml:space="preserve">a #GAsyncResult.</doc>
  76877. <type name="AsyncResult" c:type="GAsyncResult*"/>
  76878. </parameter>
  76879. </parameters>
  76880. </method>
  76881. <method name="set_certificate"
  76882. c:identifier="g_tls_connection_set_certificate"
  76883. version="2.28">
  76884. <doc xml:space="preserve">This sets the certificate that @conn will present to its peer
  76885. during the TLS handshake. For a #GTlsServerConnection, it is
  76886. mandatory to set this, and that will normally be done at construct
  76887. time.
  76888. For a #GTlsClientConnection, this is optional. If a handshake fails
  76889. with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
  76890. requires a certificate, and if you try connecting again, you should
  76891. call this method first. You can call
  76892. g_tls_client_connection_get_accepted_cas() on the failed connection
  76893. to get a list of Certificate Authorities that the server will
  76894. accept certificates from.
  76895. (It is also possible that a server will allow the connection with
  76896. or without a certificate; in that case, if you don't provide a
  76897. certificate, you can tell that the server requested one by the fact
  76898. that g_tls_client_connection_get_accepted_cas() will return
  76899. non-%NULL.)</doc>
  76900. <return-value transfer-ownership="none">
  76901. <type name="none" c:type="void"/>
  76902. </return-value>
  76903. <parameters>
  76904. <instance-parameter name="conn" transfer-ownership="none">
  76905. <doc xml:space="preserve">a #GTlsConnection</doc>
  76906. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76907. </instance-parameter>
  76908. <parameter name="certificate" transfer-ownership="none">
  76909. <doc xml:space="preserve">the certificate to use for @conn</doc>
  76910. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  76911. </parameter>
  76912. </parameters>
  76913. </method>
  76914. <method name="set_database"
  76915. c:identifier="g_tls_connection_set_database"
  76916. version="2.30">
  76917. <doc xml:space="preserve">Sets the certificate database that is used to verify peer certificates.
  76918. This is set to the default database by default. See
  76919. g_tls_backend_get_default_database(). If set to %NULL, then
  76920. peer certificate validation will always set the
  76921. %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
  76922. #GTlsConnection::accept-certificate will always be emitted on
  76923. client-side connections, unless that bit is not set in
  76924. #GTlsClientConnection:validation-flags).</doc>
  76925. <return-value transfer-ownership="none">
  76926. <type name="none" c:type="void"/>
  76927. </return-value>
  76928. <parameters>
  76929. <instance-parameter name="conn" transfer-ownership="none">
  76930. <doc xml:space="preserve">a #GTlsConnection</doc>
  76931. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76932. </instance-parameter>
  76933. <parameter name="database" transfer-ownership="none">
  76934. <doc xml:space="preserve">a #GTlsDatabase</doc>
  76935. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  76936. </parameter>
  76937. </parameters>
  76938. </method>
  76939. <method name="set_interaction"
  76940. c:identifier="g_tls_connection_set_interaction"
  76941. version="2.30">
  76942. <doc xml:space="preserve">Set the object that will be used to interact with the user. It will be used
  76943. for things like prompting the user for passwords.
  76944. The @interaction argument will normally be a derived subclass of
  76945. #GTlsInteraction. %NULL can also be provided if no user interaction
  76946. should occur for this connection.</doc>
  76947. <return-value transfer-ownership="none">
  76948. <type name="none" c:type="void"/>
  76949. </return-value>
  76950. <parameters>
  76951. <instance-parameter name="conn" transfer-ownership="none">
  76952. <doc xml:space="preserve">a connection</doc>
  76953. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76954. </instance-parameter>
  76955. <parameter name="interaction"
  76956. transfer-ownership="none"
  76957. nullable="1"
  76958. allow-none="1">
  76959. <doc xml:space="preserve">an interaction object, or %NULL</doc>
  76960. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  76961. </parameter>
  76962. </parameters>
  76963. </method>
  76964. <method name="set_rehandshake_mode"
  76965. c:identifier="g_tls_connection_set_rehandshake_mode"
  76966. version="2.28">
  76967. <doc xml:space="preserve">Sets how @conn behaves with respect to rehandshaking requests.
  76968. %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
  76969. rehandshake after the initial handshake is complete. (For a client,
  76970. this means it will refuse rehandshake requests from the server, and
  76971. for a server, this means it will close the connection with an error
  76972. if the client attempts to rehandshake.)
  76973. %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
  76974. rehandshake only if the other end of the connection supports the
  76975. TLS `renegotiation_info` extension. This is the default behavior,
  76976. but means that rehandshaking will not work against older
  76977. implementations that do not support that extension.
  76978. %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
  76979. rehandshaking even without the `renegotiation_info` extension. On
  76980. the server side in particular, this is not recommended, since it
  76981. leaves the server open to certain attacks. However, this mode is
  76982. necessary if you need to allow renegotiation with older client
  76983. software.</doc>
  76984. <return-value transfer-ownership="none">
  76985. <type name="none" c:type="void"/>
  76986. </return-value>
  76987. <parameters>
  76988. <instance-parameter name="conn" transfer-ownership="none">
  76989. <doc xml:space="preserve">a #GTlsConnection</doc>
  76990. <type name="TlsConnection" c:type="GTlsConnection*"/>
  76991. </instance-parameter>
  76992. <parameter name="mode" transfer-ownership="none">
  76993. <doc xml:space="preserve">the rehandshaking mode</doc>
  76994. <type name="TlsRehandshakeMode" c:type="GTlsRehandshakeMode"/>
  76995. </parameter>
  76996. </parameters>
  76997. </method>
  76998. <method name="set_require_close_notify"
  76999. c:identifier="g_tls_connection_set_require_close_notify"
  77000. version="2.28">
  77001. <doc xml:space="preserve">Sets whether or not @conn expects a proper TLS close notification
  77002. before the connection is closed. If this is %TRUE (the default),
  77003. then @conn will expect to receive a TLS close notification from its
  77004. peer before the connection is closed, and will return a
  77005. %G_TLS_ERROR_EOF error if the connection is closed without proper
  77006. notification (since this may indicate a network error, or
  77007. man-in-the-middle attack).
  77008. In some protocols, the application will know whether or not the
  77009. connection was closed cleanly based on application-level data
  77010. (because the application-level data includes a length field, or is
  77011. somehow self-delimiting); in this case, the close notify is
  77012. redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
  77013. in TLS 1.0 it is technically an error, but often done anyway.) You
  77014. can use g_tls_connection_set_require_close_notify() to tell @conn
  77015. to allow an "unannounced" connection close, in which case the close
  77016. will show up as a 0-length read, as in a non-TLS
  77017. #GSocketConnection, and it is up to the application to check that
  77018. the data has been fully received.
  77019. Note that this only affects the behavior when the peer closes the
  77020. connection; when the application calls g_io_stream_close() itself
  77021. on @conn, this will send a close notification regardless of the
  77022. setting of this property. If you explicitly want to do an unclean
  77023. close, you can close @conn's #GTlsConnection:base-io-stream rather
  77024. than closing @conn itself, but note that this may only be done when no other
  77025. operations are pending on @conn or the base I/O stream.</doc>
  77026. <return-value transfer-ownership="none">
  77027. <type name="none" c:type="void"/>
  77028. </return-value>
  77029. <parameters>
  77030. <instance-parameter name="conn" transfer-ownership="none">
  77031. <doc xml:space="preserve">a #GTlsConnection</doc>
  77032. <type name="TlsConnection" c:type="GTlsConnection*"/>
  77033. </instance-parameter>
  77034. <parameter name="require_close_notify" transfer-ownership="none">
  77035. <doc xml:space="preserve">whether or not to require close notification</doc>
  77036. <type name="gboolean" c:type="gboolean"/>
  77037. </parameter>
  77038. </parameters>
  77039. </method>
  77040. <method name="set_use_system_certdb"
  77041. c:identifier="g_tls_connection_set_use_system_certdb"
  77042. deprecated="1"
  77043. deprecated-version="2.30">
  77044. <doc xml:space="preserve">Sets whether @conn uses the system certificate database to verify
  77045. peer certificates. This is %TRUE by default. If set to %FALSE, then
  77046. peer certificate validation will always set the
  77047. %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
  77048. #GTlsConnection::accept-certificate will always be emitted on
  77049. client-side connections, unless that bit is not set in
  77050. #GTlsClientConnection:validation-flags).</doc>
  77051. <doc-deprecated xml:space="preserve">Use g_tls_connection_set_database() instead</doc-deprecated>
  77052. <return-value transfer-ownership="none">
  77053. <type name="none" c:type="void"/>
  77054. </return-value>
  77055. <parameters>
  77056. <instance-parameter name="conn" transfer-ownership="none">
  77057. <doc xml:space="preserve">a #GTlsConnection</doc>
  77058. <type name="TlsConnection" c:type="GTlsConnection*"/>
  77059. </instance-parameter>
  77060. <parameter name="use_system_certdb" transfer-ownership="none">
  77061. <doc xml:space="preserve">whether to use the system certificate database</doc>
  77062. <type name="gboolean" c:type="gboolean"/>
  77063. </parameter>
  77064. </parameters>
  77065. </method>
  77066. <property name="base-io-stream"
  77067. version="2.28"
  77068. writable="1"
  77069. construct-only="1"
  77070. transfer-ownership="none">
  77071. <doc xml:space="preserve">The #GIOStream that the connection wraps. The connection holds a reference
  77072. to this stream, and may run operations on the stream from other threads
  77073. throughout its lifetime. Consequently, after the #GIOStream has been
  77074. constructed, application code may only run its own operations on this
  77075. stream when no #GIOStream operations are running.</doc>
  77076. <type name="IOStream"/>
  77077. </property>
  77078. <property name="certificate"
  77079. version="2.28"
  77080. writable="1"
  77081. transfer-ownership="none">
  77082. <doc xml:space="preserve">The connection's certificate; see
  77083. g_tls_connection_set_certificate().</doc>
  77084. <type name="TlsCertificate"/>
  77085. </property>
  77086. <property name="database"
  77087. version="2.30"
  77088. writable="1"
  77089. transfer-ownership="none">
  77090. <doc xml:space="preserve">The certificate database to use when verifying this TLS connection.
  77091. If no certificate database is set, then the default database will be
  77092. used. See g_tls_backend_get_default_database().</doc>
  77093. <type name="TlsDatabase"/>
  77094. </property>
  77095. <property name="interaction"
  77096. version="2.30"
  77097. writable="1"
  77098. transfer-ownership="none">
  77099. <doc xml:space="preserve">A #GTlsInteraction object to be used when the connection or certificate
  77100. database need to interact with the user. This will be used to prompt the
  77101. user for passwords where necessary.</doc>
  77102. <type name="TlsInteraction"/>
  77103. </property>
  77104. <property name="peer-certificate"
  77105. version="2.28"
  77106. transfer-ownership="none">
  77107. <doc xml:space="preserve">The connection's peer's certificate, after the TLS handshake has
  77108. completed and the certificate has been accepted. Note in
  77109. particular that this is not yet set during the emission of
  77110. #GTlsConnection::accept-certificate.
  77111. (You can watch for a #GObject::notify signal on this property to
  77112. detect when a handshake has occurred.)</doc>
  77113. <type name="TlsCertificate"/>
  77114. </property>
  77115. <property name="peer-certificate-errors"
  77116. version="2.28"
  77117. transfer-ownership="none">
  77118. <doc xml:space="preserve">The errors noticed-and-ignored while verifying
  77119. #GTlsConnection:peer-certificate. Normally this should be 0, but
  77120. it may not be if #GTlsClientConnection:validation-flags is not
  77121. %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
  77122. #GTlsConnection::accept-certificate overrode the default
  77123. behavior.</doc>
  77124. <type name="TlsCertificateFlags"/>
  77125. </property>
  77126. <property name="rehandshake-mode"
  77127. version="2.28"
  77128. writable="1"
  77129. construct="1"
  77130. transfer-ownership="none">
  77131. <doc xml:space="preserve">The rehandshaking mode. See
  77132. g_tls_connection_set_rehandshake_mode().</doc>
  77133. <type name="TlsRehandshakeMode"/>
  77134. </property>
  77135. <property name="require-close-notify"
  77136. version="2.28"
  77137. writable="1"
  77138. construct="1"
  77139. transfer-ownership="none">
  77140. <doc xml:space="preserve">Whether or not proper TLS close notification is required.
  77141. See g_tls_connection_set_require_close_notify().</doc>
  77142. <type name="gboolean" c:type="gboolean"/>
  77143. </property>
  77144. <property name="use-system-certdb"
  77145. deprecated="1"
  77146. deprecated-version="2.30"
  77147. writable="1"
  77148. construct="1"
  77149. transfer-ownership="none">
  77150. <doc xml:space="preserve">Whether or not the system certificate database will be used to
  77151. verify peer certificates. See
  77152. g_tls_connection_set_use_system_certdb().</doc>
  77153. <doc-deprecated xml:space="preserve">Use GTlsConnection:database instead</doc-deprecated>
  77154. <type name="gboolean" c:type="gboolean"/>
  77155. </property>
  77156. <field name="parent_instance">
  77157. <type name="IOStream" c:type="GIOStream"/>
  77158. </field>
  77159. <field name="priv">
  77160. <type name="TlsConnectionPrivate" c:type="GTlsConnectionPrivate*"/>
  77161. </field>
  77162. <glib:signal name="accept-certificate" when="last" version="2.28">
  77163. <doc xml:space="preserve">Emitted during the TLS handshake after the peer certificate has
  77164. been received. You can examine @peer_cert's certification path by
  77165. calling g_tls_certificate_get_issuer() on it.
  77166. For a client-side connection, @peer_cert is the server's
  77167. certificate, and the signal will only be emitted if the
  77168. certificate was not acceptable according to @conn's
  77169. #GTlsClientConnection:validation_flags. If you would like the
  77170. certificate to be accepted despite @errors, return %TRUE from the
  77171. signal handler. Otherwise, if no handler accepts the certificate,
  77172. the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
  77173. For a server-side connection, @peer_cert is the certificate
  77174. presented by the client, if this was requested via the server's
  77175. #GTlsServerConnection:authentication_mode. On the server side,
  77176. the signal is always emitted when the client presents a
  77177. certificate, and the certificate will only be accepted if a
  77178. handler returns %TRUE.
  77179. Note that if this signal is emitted as part of asynchronous I/O
  77180. in the main thread, then you should not attempt to interact with
  77181. the user before returning from the signal handler. If you want to
  77182. let the user decide whether or not to accept the certificate, you
  77183. would have to return %FALSE from the signal handler on the first
  77184. attempt, and then after the connection attempt returns a
  77185. %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
  77186. the user decides to accept the certificate, remember that fact,
  77187. create a new connection, and return %TRUE from the signal handler
  77188. the next time.
  77189. If you are doing I/O in another thread, you do not
  77190. need to worry about this, and can simply block in the signal
  77191. handler until the UI thread returns an answer.</doc>
  77192. <return-value transfer-ownership="none">
  77193. <doc xml:space="preserve">%TRUE to accept @peer_cert (which will also
  77194. immediately end the signal emission). %FALSE to allow the signal
  77195. emission to continue, which will cause the handshake to fail if
  77196. no one else overrides it.</doc>
  77197. <type name="gboolean" c:type="gboolean"/>
  77198. </return-value>
  77199. <parameters>
  77200. <parameter name="peer_cert" transfer-ownership="none">
  77201. <doc xml:space="preserve">the peer's #GTlsCertificate</doc>
  77202. <type name="TlsCertificate"/>
  77203. </parameter>
  77204. <parameter name="errors" transfer-ownership="none">
  77205. <doc xml:space="preserve">the problems with @peer_cert.</doc>
  77206. <type name="TlsCertificateFlags"/>
  77207. </parameter>
  77208. </parameters>
  77209. </glib:signal>
  77210. </class>
  77211. <record name="TlsConnectionClass"
  77212. c:type="GTlsConnectionClass"
  77213. glib:is-gtype-struct-for="TlsConnection">
  77214. <field name="parent_class">
  77215. <type name="IOStreamClass" c:type="GIOStreamClass"/>
  77216. </field>
  77217. <field name="accept_certificate">
  77218. <callback name="accept_certificate">
  77219. <return-value transfer-ownership="none">
  77220. <type name="gboolean" c:type="gboolean"/>
  77221. </return-value>
  77222. <parameters>
  77223. <parameter name="connection" transfer-ownership="none">
  77224. <type name="TlsConnection" c:type="GTlsConnection*"/>
  77225. </parameter>
  77226. <parameter name="peer_cert" transfer-ownership="none">
  77227. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77228. </parameter>
  77229. <parameter name="errors" transfer-ownership="none">
  77230. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  77231. </parameter>
  77232. </parameters>
  77233. </callback>
  77234. </field>
  77235. <field name="handshake">
  77236. <callback name="handshake" throws="1">
  77237. <return-value transfer-ownership="none">
  77238. <doc xml:space="preserve">success or failure</doc>
  77239. <type name="gboolean" c:type="gboolean"/>
  77240. </return-value>
  77241. <parameters>
  77242. <parameter name="conn" transfer-ownership="none">
  77243. <doc xml:space="preserve">a #GTlsConnection</doc>
  77244. <type name="TlsConnection" c:type="GTlsConnection*"/>
  77245. </parameter>
  77246. <parameter name="cancellable"
  77247. transfer-ownership="none"
  77248. nullable="1"
  77249. allow-none="1">
  77250. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77251. <type name="Cancellable" c:type="GCancellable*"/>
  77252. </parameter>
  77253. </parameters>
  77254. </callback>
  77255. </field>
  77256. <field name="handshake_async">
  77257. <callback name="handshake_async">
  77258. <return-value transfer-ownership="none">
  77259. <type name="none" c:type="void"/>
  77260. </return-value>
  77261. <parameters>
  77262. <parameter name="conn" transfer-ownership="none">
  77263. <doc xml:space="preserve">a #GTlsConnection</doc>
  77264. <type name="TlsConnection" c:type="GTlsConnection*"/>
  77265. </parameter>
  77266. <parameter name="io_priority" transfer-ownership="none">
  77267. <doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
  77268. <type name="gint" c:type="int"/>
  77269. </parameter>
  77270. <parameter name="cancellable"
  77271. transfer-ownership="none"
  77272. nullable="1"
  77273. allow-none="1">
  77274. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77275. <type name="Cancellable" c:type="GCancellable*"/>
  77276. </parameter>
  77277. <parameter name="callback"
  77278. transfer-ownership="none"
  77279. nullable="1"
  77280. allow-none="1"
  77281. scope="async"
  77282. closure="4">
  77283. <doc xml:space="preserve">callback to call when the handshake is complete</doc>
  77284. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  77285. </parameter>
  77286. <parameter name="user_data"
  77287. transfer-ownership="none"
  77288. nullable="1"
  77289. allow-none="1"
  77290. closure="4">
  77291. <doc xml:space="preserve">the data to pass to the callback function</doc>
  77292. <type name="gpointer" c:type="gpointer"/>
  77293. </parameter>
  77294. </parameters>
  77295. </callback>
  77296. </field>
  77297. <field name="handshake_finish">
  77298. <callback name="handshake_finish" throws="1">
  77299. <return-value transfer-ownership="none">
  77300. <doc xml:space="preserve">%TRUE on success, %FALSE on failure, in which
  77301. case @error will be set.</doc>
  77302. <type name="gboolean" c:type="gboolean"/>
  77303. </return-value>
  77304. <parameters>
  77305. <parameter name="conn" transfer-ownership="none">
  77306. <doc xml:space="preserve">a #GTlsConnection</doc>
  77307. <type name="TlsConnection" c:type="GTlsConnection*"/>
  77308. </parameter>
  77309. <parameter name="result" transfer-ownership="none">
  77310. <doc xml:space="preserve">a #GAsyncResult.</doc>
  77311. <type name="AsyncResult" c:type="GAsyncResult*"/>
  77312. </parameter>
  77313. </parameters>
  77314. </callback>
  77315. </field>
  77316. <field name="padding" readable="0" private="1">
  77317. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  77318. <type name="gpointer" c:type="gpointer"/>
  77319. </array>
  77320. </field>
  77321. </record>
  77322. <record name="TlsConnectionPrivate"
  77323. c:type="GTlsConnectionPrivate"
  77324. disguised="1">
  77325. </record>
  77326. <class name="TlsDatabase"
  77327. c:symbol-prefix="tls_database"
  77328. c:type="GTlsDatabase"
  77329. version="2.30"
  77330. parent="GObject.Object"
  77331. abstract="1"
  77332. glib:type-name="GTlsDatabase"
  77333. glib:get-type="g_tls_database_get_type"
  77334. glib:type-struct="TlsDatabaseClass">
  77335. <doc xml:space="preserve">#GTlsDatabase is used to lookup certificates and other information
  77336. from a certificate or key store. It is an abstract base class which
  77337. TLS library specific subtypes override.
  77338. Most common client applications will not directly interact with
  77339. #GTlsDatabase. It is used internally by #GTlsConnection.</doc>
  77340. <virtual-method name="create_certificate_handle"
  77341. invoker="create_certificate_handle"
  77342. version="2.30">
  77343. <doc xml:space="preserve">Create a handle string for the certificate. The database will only be able
  77344. to create a handle for certificates that originate from the database. In
  77345. cases where the database cannot create a handle for a certificate, %NULL
  77346. will be returned.
  77347. This handle should be stable across various instances of the application,
  77348. and between applications. If a certificate is modified in the database,
  77349. then it is not guaranteed that this handle will continue to point to it.</doc>
  77350. <return-value transfer-ownership="full" nullable="1">
  77351. <doc xml:space="preserve">a newly allocated string containing the
  77352. handle.</doc>
  77353. <type name="utf8" c:type="gchar*"/>
  77354. </return-value>
  77355. <parameters>
  77356. <instance-parameter name="self" transfer-ownership="none">
  77357. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77358. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77359. </instance-parameter>
  77360. <parameter name="certificate" transfer-ownership="none">
  77361. <doc xml:space="preserve">certificate for which to create a handle.</doc>
  77362. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77363. </parameter>
  77364. </parameters>
  77365. </virtual-method>
  77366. <virtual-method name="lookup_certificate_for_handle"
  77367. invoker="lookup_certificate_for_handle"
  77368. version="2.30"
  77369. throws="1">
  77370. <doc xml:space="preserve">Lookup a certificate by its handle.
  77371. The handle should have been created by calling
  77372. g_tls_database_create_certificate_handle() on a #GTlsDatabase object of
  77373. the same TLS backend. The handle is designed to remain valid across
  77374. instantiations of the database.
  77375. If the handle is no longer valid, or does not point to a certificate in
  77376. this database, then %NULL will be returned.
  77377. This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform
  77378. the lookup operation asynchronously.</doc>
  77379. <return-value transfer-ownership="full" nullable="1">
  77380. <doc xml:space="preserve">a newly allocated
  77381. #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate.</doc>
  77382. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77383. </return-value>
  77384. <parameters>
  77385. <instance-parameter name="self" transfer-ownership="none">
  77386. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77387. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77388. </instance-parameter>
  77389. <parameter name="handle" transfer-ownership="none">
  77390. <doc xml:space="preserve">a certificate handle</doc>
  77391. <type name="utf8" c:type="const gchar*"/>
  77392. </parameter>
  77393. <parameter name="interaction"
  77394. transfer-ownership="none"
  77395. nullable="1"
  77396. allow-none="1">
  77397. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77398. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77399. </parameter>
  77400. <parameter name="flags" transfer-ownership="none">
  77401. <doc xml:space="preserve">Flags which affect the lookup.</doc>
  77402. <type name="TlsDatabaseLookupFlags"
  77403. c:type="GTlsDatabaseLookupFlags"/>
  77404. </parameter>
  77405. <parameter name="cancellable"
  77406. transfer-ownership="none"
  77407. nullable="1"
  77408. allow-none="1">
  77409. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77410. <type name="Cancellable" c:type="GCancellable*"/>
  77411. </parameter>
  77412. </parameters>
  77413. </virtual-method>
  77414. <virtual-method name="lookup_certificate_for_handle_async"
  77415. invoker="lookup_certificate_for_handle_async"
  77416. version="2.30">
  77417. <doc xml:space="preserve">Asynchronously lookup a certificate by its handle in the database. See
  77418. g_tls_database_lookup_certificate_for_handle() for more information.</doc>
  77419. <return-value transfer-ownership="none">
  77420. <type name="none" c:type="void"/>
  77421. </return-value>
  77422. <parameters>
  77423. <instance-parameter name="self" transfer-ownership="none">
  77424. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77425. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77426. </instance-parameter>
  77427. <parameter name="handle" transfer-ownership="none">
  77428. <doc xml:space="preserve">a certificate handle</doc>
  77429. <type name="utf8" c:type="const gchar*"/>
  77430. </parameter>
  77431. <parameter name="interaction"
  77432. transfer-ownership="none"
  77433. nullable="1"
  77434. allow-none="1">
  77435. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77436. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77437. </parameter>
  77438. <parameter name="flags" transfer-ownership="none">
  77439. <doc xml:space="preserve">Flags which affect the lookup.</doc>
  77440. <type name="TlsDatabaseLookupFlags"
  77441. c:type="GTlsDatabaseLookupFlags"/>
  77442. </parameter>
  77443. <parameter name="cancellable"
  77444. transfer-ownership="none"
  77445. nullable="1"
  77446. allow-none="1">
  77447. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77448. <type name="Cancellable" c:type="GCancellable*"/>
  77449. </parameter>
  77450. <parameter name="callback"
  77451. transfer-ownership="none"
  77452. nullable="1"
  77453. allow-none="1"
  77454. scope="async"
  77455. closure="5">
  77456. <doc xml:space="preserve">callback to call when the operation completes</doc>
  77457. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  77458. </parameter>
  77459. <parameter name="user_data"
  77460. transfer-ownership="none"
  77461. nullable="1"
  77462. allow-none="1"
  77463. closure="5">
  77464. <doc xml:space="preserve">the data to pass to the callback function</doc>
  77465. <type name="gpointer" c:type="gpointer"/>
  77466. </parameter>
  77467. </parameters>
  77468. </virtual-method>
  77469. <virtual-method name="lookup_certificate_for_handle_finish"
  77470. invoker="lookup_certificate_for_handle_finish"
  77471. version="2.30"
  77472. throws="1">
  77473. <doc xml:space="preserve">Finish an asynchronous lookup of a certificate by its handle. See
  77474. g_tls_database_lookup_certificate_handle() for more information.
  77475. If the handle is no longer valid, or does not point to a certificate in
  77476. this database, then %NULL will be returned.</doc>
  77477. <return-value transfer-ownership="full">
  77478. <doc xml:space="preserve">a newly allocated #GTlsCertificate object.
  77479. Use g_object_unref() to release the certificate.</doc>
  77480. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77481. </return-value>
  77482. <parameters>
  77483. <instance-parameter name="self" transfer-ownership="none">
  77484. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77485. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77486. </instance-parameter>
  77487. <parameter name="result" transfer-ownership="none">
  77488. <doc xml:space="preserve">a #GAsyncResult.</doc>
  77489. <type name="AsyncResult" c:type="GAsyncResult*"/>
  77490. </parameter>
  77491. </parameters>
  77492. </virtual-method>
  77493. <virtual-method name="lookup_certificate_issuer"
  77494. invoker="lookup_certificate_issuer"
  77495. version="2.30"
  77496. throws="1">
  77497. <doc xml:space="preserve">Lookup the issuer of @certificate in the database.
  77498. The %issuer property
  77499. of @certificate is not modified, and the two certificates are not hooked
  77500. into a chain.
  77501. This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform
  77502. the lookup operation asynchronously.</doc>
  77503. <return-value transfer-ownership="full">
  77504. <doc xml:space="preserve">a newly allocated issuer #GTlsCertificate,
  77505. or %NULL. Use g_object_unref() to release the certificate.</doc>
  77506. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77507. </return-value>
  77508. <parameters>
  77509. <instance-parameter name="self" transfer-ownership="none">
  77510. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77511. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77512. </instance-parameter>
  77513. <parameter name="certificate" transfer-ownership="none">
  77514. <doc xml:space="preserve">a #GTlsCertificate</doc>
  77515. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77516. </parameter>
  77517. <parameter name="interaction"
  77518. transfer-ownership="none"
  77519. nullable="1"
  77520. allow-none="1">
  77521. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77522. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77523. </parameter>
  77524. <parameter name="flags" transfer-ownership="none">
  77525. <doc xml:space="preserve">flags which affect the lookup operation</doc>
  77526. <type name="TlsDatabaseLookupFlags"
  77527. c:type="GTlsDatabaseLookupFlags"/>
  77528. </parameter>
  77529. <parameter name="cancellable"
  77530. transfer-ownership="none"
  77531. nullable="1"
  77532. allow-none="1">
  77533. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77534. <type name="Cancellable" c:type="GCancellable*"/>
  77535. </parameter>
  77536. </parameters>
  77537. </virtual-method>
  77538. <virtual-method name="lookup_certificate_issuer_async"
  77539. invoker="lookup_certificate_issuer_async"
  77540. version="2.30">
  77541. <doc xml:space="preserve">Asynchronously lookup the issuer of @certificate in the database. See
  77542. g_tls_database_lookup_certificate_issuer() for more information.</doc>
  77543. <return-value transfer-ownership="none">
  77544. <type name="none" c:type="void"/>
  77545. </return-value>
  77546. <parameters>
  77547. <instance-parameter name="self" transfer-ownership="none">
  77548. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77549. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77550. </instance-parameter>
  77551. <parameter name="certificate" transfer-ownership="none">
  77552. <doc xml:space="preserve">a #GTlsCertificate</doc>
  77553. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77554. </parameter>
  77555. <parameter name="interaction"
  77556. transfer-ownership="none"
  77557. nullable="1"
  77558. allow-none="1">
  77559. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77560. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77561. </parameter>
  77562. <parameter name="flags" transfer-ownership="none">
  77563. <doc xml:space="preserve">flags which affect the lookup operation</doc>
  77564. <type name="TlsDatabaseLookupFlags"
  77565. c:type="GTlsDatabaseLookupFlags"/>
  77566. </parameter>
  77567. <parameter name="cancellable"
  77568. transfer-ownership="none"
  77569. nullable="1"
  77570. allow-none="1">
  77571. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77572. <type name="Cancellable" c:type="GCancellable*"/>
  77573. </parameter>
  77574. <parameter name="callback"
  77575. transfer-ownership="none"
  77576. nullable="1"
  77577. allow-none="1"
  77578. scope="async"
  77579. closure="5">
  77580. <doc xml:space="preserve">callback to call when the operation completes</doc>
  77581. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  77582. </parameter>
  77583. <parameter name="user_data"
  77584. transfer-ownership="none"
  77585. nullable="1"
  77586. allow-none="1"
  77587. closure="5">
  77588. <doc xml:space="preserve">the data to pass to the callback function</doc>
  77589. <type name="gpointer" c:type="gpointer"/>
  77590. </parameter>
  77591. </parameters>
  77592. </virtual-method>
  77593. <virtual-method name="lookup_certificate_issuer_finish"
  77594. invoker="lookup_certificate_issuer_finish"
  77595. version="2.30"
  77596. throws="1">
  77597. <doc xml:space="preserve">Finish an asynchronous lookup issuer operation. See
  77598. g_tls_database_lookup_certificate_issuer() for more information.</doc>
  77599. <return-value transfer-ownership="full">
  77600. <doc xml:space="preserve">a newly allocated issuer #GTlsCertificate,
  77601. or %NULL. Use g_object_unref() to release the certificate.</doc>
  77602. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77603. </return-value>
  77604. <parameters>
  77605. <instance-parameter name="self" transfer-ownership="none">
  77606. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77607. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77608. </instance-parameter>
  77609. <parameter name="result" transfer-ownership="none">
  77610. <doc xml:space="preserve">a #GAsyncResult.</doc>
  77611. <type name="AsyncResult" c:type="GAsyncResult*"/>
  77612. </parameter>
  77613. </parameters>
  77614. </virtual-method>
  77615. <virtual-method name="lookup_certificates_issued_by"
  77616. invoker="lookup_certificates_issued_by"
  77617. version="2.30"
  77618. throws="1">
  77619. <doc xml:space="preserve">Lookup certificates issued by this issuer in the database.
  77620. This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform
  77621. the lookup operation asynchronously.</doc>
  77622. <return-value transfer-ownership="full">
  77623. <doc xml:space="preserve">a newly allocated list of #GTlsCertificate
  77624. objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.</doc>
  77625. <type name="GLib.List" c:type="GList*">
  77626. <type name="TlsCertificate"/>
  77627. </type>
  77628. </return-value>
  77629. <parameters>
  77630. <instance-parameter name="self" transfer-ownership="none">
  77631. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77632. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77633. </instance-parameter>
  77634. <parameter name="issuer_raw_dn" transfer-ownership="none">
  77635. <doc xml:space="preserve">a #GByteArray which holds the DER encoded issuer DN.</doc>
  77636. <array name="GLib.ByteArray" c:type="GByteArray*">
  77637. <type name="guint8" c:type="guint8"/>
  77638. </array>
  77639. </parameter>
  77640. <parameter name="interaction"
  77641. transfer-ownership="none"
  77642. nullable="1"
  77643. allow-none="1">
  77644. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77645. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77646. </parameter>
  77647. <parameter name="flags" transfer-ownership="none">
  77648. <doc xml:space="preserve">Flags which affect the lookup operation.</doc>
  77649. <type name="TlsDatabaseLookupFlags"
  77650. c:type="GTlsDatabaseLookupFlags"/>
  77651. </parameter>
  77652. <parameter name="cancellable"
  77653. transfer-ownership="none"
  77654. nullable="1"
  77655. allow-none="1">
  77656. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77657. <type name="Cancellable" c:type="GCancellable*"/>
  77658. </parameter>
  77659. </parameters>
  77660. </virtual-method>
  77661. <virtual-method name="lookup_certificates_issued_by_async"
  77662. invoker="lookup_certificates_issued_by_async"
  77663. version="2.30">
  77664. <doc xml:space="preserve">Asynchronously lookup certificates issued by this issuer in the database. See
  77665. g_tls_database_lookup_certificates_issued_by() for more information.
  77666. The database may choose to hold a reference to the issuer byte array for the duration
  77667. of of this asynchronous operation. The byte array should not be modified during
  77668. this time.</doc>
  77669. <return-value transfer-ownership="none">
  77670. <type name="none" c:type="void"/>
  77671. </return-value>
  77672. <parameters>
  77673. <instance-parameter name="self" transfer-ownership="none">
  77674. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77675. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77676. </instance-parameter>
  77677. <parameter name="issuer_raw_dn" transfer-ownership="none">
  77678. <doc xml:space="preserve">a #GByteArray which holds the DER encoded issuer DN.</doc>
  77679. <array name="GLib.ByteArray" c:type="GByteArray*">
  77680. <type name="guint8" c:type="guint8"/>
  77681. </array>
  77682. </parameter>
  77683. <parameter name="interaction"
  77684. transfer-ownership="none"
  77685. nullable="1"
  77686. allow-none="1">
  77687. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77688. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77689. </parameter>
  77690. <parameter name="flags" transfer-ownership="none">
  77691. <doc xml:space="preserve">Flags which affect the lookup operation.</doc>
  77692. <type name="TlsDatabaseLookupFlags"
  77693. c:type="GTlsDatabaseLookupFlags"/>
  77694. </parameter>
  77695. <parameter name="cancellable"
  77696. transfer-ownership="none"
  77697. nullable="1"
  77698. allow-none="1">
  77699. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77700. <type name="Cancellable" c:type="GCancellable*"/>
  77701. </parameter>
  77702. <parameter name="callback"
  77703. transfer-ownership="none"
  77704. nullable="1"
  77705. allow-none="1"
  77706. scope="async"
  77707. closure="5">
  77708. <doc xml:space="preserve">callback to call when the operation completes</doc>
  77709. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  77710. </parameter>
  77711. <parameter name="user_data"
  77712. transfer-ownership="none"
  77713. nullable="1"
  77714. allow-none="1"
  77715. closure="5">
  77716. <doc xml:space="preserve">the data to pass to the callback function</doc>
  77717. <type name="gpointer" c:type="gpointer"/>
  77718. </parameter>
  77719. </parameters>
  77720. </virtual-method>
  77721. <virtual-method name="lookup_certificates_issued_by_finish"
  77722. invoker="lookup_certificates_issued_by_finish"
  77723. version="2.30"
  77724. throws="1">
  77725. <doc xml:space="preserve">Finish an asynchronous lookup of certificates. See
  77726. g_tls_database_lookup_certificates_issued_by() for more information.</doc>
  77727. <return-value transfer-ownership="full">
  77728. <doc xml:space="preserve">a newly allocated list of #GTlsCertificate
  77729. objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.</doc>
  77730. <type name="GLib.List" c:type="GList*">
  77731. <type name="TlsCertificate"/>
  77732. </type>
  77733. </return-value>
  77734. <parameters>
  77735. <instance-parameter name="self" transfer-ownership="none">
  77736. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77737. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77738. </instance-parameter>
  77739. <parameter name="result" transfer-ownership="none">
  77740. <doc xml:space="preserve">a #GAsyncResult.</doc>
  77741. <type name="AsyncResult" c:type="GAsyncResult*"/>
  77742. </parameter>
  77743. </parameters>
  77744. </virtual-method>
  77745. <virtual-method name="verify_chain"
  77746. invoker="verify_chain"
  77747. version="2.30"
  77748. throws="1">
  77749. <doc xml:space="preserve">Verify's a certificate chain after looking up and adding any missing
  77750. certificates to the chain.
  77751. @chain is a chain of #GTlsCertificate objects each pointing to the next
  77752. certificate in the chain by its %issuer property. The chain may initially
  77753. consist of one or more certificates. After the verification process is
  77754. complete, @chain may be modified by adding missing certificates, or removing
  77755. extra certificates. If a certificate anchor was found, then it is added to
  77756. the @chain.
  77757. @purpose describes the purpose (or usage) for which the certificate
  77758. is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
  77759. which means that the certificate is being used to authenticate a server
  77760. (and we are acting as the client).
  77761. The @identity is used to check for pinned certificates (trust exceptions)
  77762. in the database. These will override the normal verification process on a
  77763. host by host basis.
  77764. Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be
  77765. used.
  77766. This function can block, use g_tls_database_verify_chain_async() to perform
  77767. the verification operation asynchronously.</doc>
  77768. <return-value transfer-ownership="none">
  77769. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags which represents the
  77770. result of verification.</doc>
  77771. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  77772. </return-value>
  77773. <parameters>
  77774. <instance-parameter name="self" transfer-ownership="none">
  77775. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77776. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77777. </instance-parameter>
  77778. <parameter name="chain" transfer-ownership="none">
  77779. <doc xml:space="preserve">a #GTlsCertificate chain</doc>
  77780. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77781. </parameter>
  77782. <parameter name="purpose" transfer-ownership="none">
  77783. <doc xml:space="preserve">the purpose that this certificate chain will be used for.</doc>
  77784. <type name="utf8" c:type="const gchar*"/>
  77785. </parameter>
  77786. <parameter name="identity"
  77787. transfer-ownership="none"
  77788. nullable="1"
  77789. allow-none="1">
  77790. <doc xml:space="preserve">the expected peer identity</doc>
  77791. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  77792. </parameter>
  77793. <parameter name="interaction"
  77794. transfer-ownership="none"
  77795. nullable="1"
  77796. allow-none="1">
  77797. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77798. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77799. </parameter>
  77800. <parameter name="flags" transfer-ownership="none">
  77801. <doc xml:space="preserve">additional verify flags</doc>
  77802. <type name="TlsDatabaseVerifyFlags"
  77803. c:type="GTlsDatabaseVerifyFlags"/>
  77804. </parameter>
  77805. <parameter name="cancellable"
  77806. transfer-ownership="none"
  77807. nullable="1"
  77808. allow-none="1">
  77809. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77810. <type name="Cancellable" c:type="GCancellable*"/>
  77811. </parameter>
  77812. </parameters>
  77813. </virtual-method>
  77814. <virtual-method name="verify_chain_async"
  77815. invoker="verify_chain_async"
  77816. version="2.30">
  77817. <doc xml:space="preserve">Asynchronously verify's a certificate chain after looking up and adding
  77818. any missing certificates to the chain. See g_tls_database_verify_chain()
  77819. for more information.</doc>
  77820. <return-value transfer-ownership="none">
  77821. <type name="none" c:type="void"/>
  77822. </return-value>
  77823. <parameters>
  77824. <instance-parameter name="self" transfer-ownership="none">
  77825. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77826. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77827. </instance-parameter>
  77828. <parameter name="chain" transfer-ownership="none">
  77829. <doc xml:space="preserve">a #GTlsCertificate chain</doc>
  77830. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77831. </parameter>
  77832. <parameter name="purpose" transfer-ownership="none">
  77833. <doc xml:space="preserve">the purpose that this certificate chain will be used for.</doc>
  77834. <type name="utf8" c:type="const gchar*"/>
  77835. </parameter>
  77836. <parameter name="identity"
  77837. transfer-ownership="none"
  77838. nullable="1"
  77839. allow-none="1">
  77840. <doc xml:space="preserve">the expected peer identity</doc>
  77841. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  77842. </parameter>
  77843. <parameter name="interaction"
  77844. transfer-ownership="none"
  77845. nullable="1"
  77846. allow-none="1">
  77847. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77848. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77849. </parameter>
  77850. <parameter name="flags" transfer-ownership="none">
  77851. <doc xml:space="preserve">additional verify flags</doc>
  77852. <type name="TlsDatabaseVerifyFlags"
  77853. c:type="GTlsDatabaseVerifyFlags"/>
  77854. </parameter>
  77855. <parameter name="cancellable"
  77856. transfer-ownership="none"
  77857. nullable="1"
  77858. allow-none="1">
  77859. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77860. <type name="Cancellable" c:type="GCancellable*"/>
  77861. </parameter>
  77862. <parameter name="callback"
  77863. transfer-ownership="none"
  77864. nullable="1"
  77865. allow-none="1"
  77866. scope="async"
  77867. closure="7">
  77868. <doc xml:space="preserve">callback to call when the operation completes</doc>
  77869. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  77870. </parameter>
  77871. <parameter name="user_data"
  77872. transfer-ownership="none"
  77873. nullable="1"
  77874. allow-none="1"
  77875. closure="7">
  77876. <doc xml:space="preserve">the data to pass to the callback function</doc>
  77877. <type name="gpointer" c:type="gpointer"/>
  77878. </parameter>
  77879. </parameters>
  77880. </virtual-method>
  77881. <virtual-method name="verify_chain_finish"
  77882. invoker="verify_chain_finish"
  77883. version="2.30"
  77884. throws="1">
  77885. <doc xml:space="preserve">Finish an asynchronous verify chain operation. See
  77886. g_tls_database_verify_chain() for more information. *</doc>
  77887. <return-value transfer-ownership="none">
  77888. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags which represents the
  77889. result of verification.</doc>
  77890. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  77891. </return-value>
  77892. <parameters>
  77893. <instance-parameter name="self" transfer-ownership="none">
  77894. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77895. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77896. </instance-parameter>
  77897. <parameter name="result" transfer-ownership="none">
  77898. <doc xml:space="preserve">a #GAsyncResult.</doc>
  77899. <type name="AsyncResult" c:type="GAsyncResult*"/>
  77900. </parameter>
  77901. </parameters>
  77902. </virtual-method>
  77903. <method name="create_certificate_handle"
  77904. c:identifier="g_tls_database_create_certificate_handle"
  77905. version="2.30">
  77906. <doc xml:space="preserve">Create a handle string for the certificate. The database will only be able
  77907. to create a handle for certificates that originate from the database. In
  77908. cases where the database cannot create a handle for a certificate, %NULL
  77909. will be returned.
  77910. This handle should be stable across various instances of the application,
  77911. and between applications. If a certificate is modified in the database,
  77912. then it is not guaranteed that this handle will continue to point to it.</doc>
  77913. <return-value transfer-ownership="full" nullable="1">
  77914. <doc xml:space="preserve">a newly allocated string containing the
  77915. handle.</doc>
  77916. <type name="utf8" c:type="gchar*"/>
  77917. </return-value>
  77918. <parameters>
  77919. <instance-parameter name="self" transfer-ownership="none">
  77920. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77921. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77922. </instance-parameter>
  77923. <parameter name="certificate" transfer-ownership="none">
  77924. <doc xml:space="preserve">certificate for which to create a handle.</doc>
  77925. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77926. </parameter>
  77927. </parameters>
  77928. </method>
  77929. <method name="lookup_certificate_for_handle"
  77930. c:identifier="g_tls_database_lookup_certificate_for_handle"
  77931. version="2.30"
  77932. throws="1">
  77933. <doc xml:space="preserve">Lookup a certificate by its handle.
  77934. The handle should have been created by calling
  77935. g_tls_database_create_certificate_handle() on a #GTlsDatabase object of
  77936. the same TLS backend. The handle is designed to remain valid across
  77937. instantiations of the database.
  77938. If the handle is no longer valid, or does not point to a certificate in
  77939. this database, then %NULL will be returned.
  77940. This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform
  77941. the lookup operation asynchronously.</doc>
  77942. <return-value transfer-ownership="full" nullable="1">
  77943. <doc xml:space="preserve">a newly allocated
  77944. #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate.</doc>
  77945. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  77946. </return-value>
  77947. <parameters>
  77948. <instance-parameter name="self" transfer-ownership="none">
  77949. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77950. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77951. </instance-parameter>
  77952. <parameter name="handle" transfer-ownership="none">
  77953. <doc xml:space="preserve">a certificate handle</doc>
  77954. <type name="utf8" c:type="const gchar*"/>
  77955. </parameter>
  77956. <parameter name="interaction"
  77957. transfer-ownership="none"
  77958. nullable="1"
  77959. allow-none="1">
  77960. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77961. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  77962. </parameter>
  77963. <parameter name="flags" transfer-ownership="none">
  77964. <doc xml:space="preserve">Flags which affect the lookup.</doc>
  77965. <type name="TlsDatabaseLookupFlags"
  77966. c:type="GTlsDatabaseLookupFlags"/>
  77967. </parameter>
  77968. <parameter name="cancellable"
  77969. transfer-ownership="none"
  77970. nullable="1"
  77971. allow-none="1">
  77972. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  77973. <type name="Cancellable" c:type="GCancellable*"/>
  77974. </parameter>
  77975. </parameters>
  77976. </method>
  77977. <method name="lookup_certificate_for_handle_async"
  77978. c:identifier="g_tls_database_lookup_certificate_for_handle_async"
  77979. version="2.30">
  77980. <doc xml:space="preserve">Asynchronously lookup a certificate by its handle in the database. See
  77981. g_tls_database_lookup_certificate_for_handle() for more information.</doc>
  77982. <return-value transfer-ownership="none">
  77983. <type name="none" c:type="void"/>
  77984. </return-value>
  77985. <parameters>
  77986. <instance-parameter name="self" transfer-ownership="none">
  77987. <doc xml:space="preserve">a #GTlsDatabase</doc>
  77988. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  77989. </instance-parameter>
  77990. <parameter name="handle" transfer-ownership="none">
  77991. <doc xml:space="preserve">a certificate handle</doc>
  77992. <type name="utf8" c:type="const gchar*"/>
  77993. </parameter>
  77994. <parameter name="interaction"
  77995. transfer-ownership="none"
  77996. nullable="1"
  77997. allow-none="1">
  77998. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  77999. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78000. </parameter>
  78001. <parameter name="flags" transfer-ownership="none">
  78002. <doc xml:space="preserve">Flags which affect the lookup.</doc>
  78003. <type name="TlsDatabaseLookupFlags"
  78004. c:type="GTlsDatabaseLookupFlags"/>
  78005. </parameter>
  78006. <parameter name="cancellable"
  78007. transfer-ownership="none"
  78008. nullable="1"
  78009. allow-none="1">
  78010. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78011. <type name="Cancellable" c:type="GCancellable*"/>
  78012. </parameter>
  78013. <parameter name="callback"
  78014. transfer-ownership="none"
  78015. nullable="1"
  78016. allow-none="1"
  78017. scope="async"
  78018. closure="5">
  78019. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78020. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78021. </parameter>
  78022. <parameter name="user_data"
  78023. transfer-ownership="none"
  78024. nullable="1"
  78025. allow-none="1">
  78026. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78027. <type name="gpointer" c:type="gpointer"/>
  78028. </parameter>
  78029. </parameters>
  78030. </method>
  78031. <method name="lookup_certificate_for_handle_finish"
  78032. c:identifier="g_tls_database_lookup_certificate_for_handle_finish"
  78033. version="2.30"
  78034. throws="1">
  78035. <doc xml:space="preserve">Finish an asynchronous lookup of a certificate by its handle. See
  78036. g_tls_database_lookup_certificate_handle() for more information.
  78037. If the handle is no longer valid, or does not point to a certificate in
  78038. this database, then %NULL will be returned.</doc>
  78039. <return-value transfer-ownership="full">
  78040. <doc xml:space="preserve">a newly allocated #GTlsCertificate object.
  78041. Use g_object_unref() to release the certificate.</doc>
  78042. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78043. </return-value>
  78044. <parameters>
  78045. <instance-parameter name="self" transfer-ownership="none">
  78046. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78047. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78048. </instance-parameter>
  78049. <parameter name="result" transfer-ownership="none">
  78050. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78051. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78052. </parameter>
  78053. </parameters>
  78054. </method>
  78055. <method name="lookup_certificate_issuer"
  78056. c:identifier="g_tls_database_lookup_certificate_issuer"
  78057. version="2.30"
  78058. throws="1">
  78059. <doc xml:space="preserve">Lookup the issuer of @certificate in the database.
  78060. The %issuer property
  78061. of @certificate is not modified, and the two certificates are not hooked
  78062. into a chain.
  78063. This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform
  78064. the lookup operation asynchronously.</doc>
  78065. <return-value transfer-ownership="full">
  78066. <doc xml:space="preserve">a newly allocated issuer #GTlsCertificate,
  78067. or %NULL. Use g_object_unref() to release the certificate.</doc>
  78068. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78069. </return-value>
  78070. <parameters>
  78071. <instance-parameter name="self" transfer-ownership="none">
  78072. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78073. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78074. </instance-parameter>
  78075. <parameter name="certificate" transfer-ownership="none">
  78076. <doc xml:space="preserve">a #GTlsCertificate</doc>
  78077. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78078. </parameter>
  78079. <parameter name="interaction"
  78080. transfer-ownership="none"
  78081. nullable="1"
  78082. allow-none="1">
  78083. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78084. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78085. </parameter>
  78086. <parameter name="flags" transfer-ownership="none">
  78087. <doc xml:space="preserve">flags which affect the lookup operation</doc>
  78088. <type name="TlsDatabaseLookupFlags"
  78089. c:type="GTlsDatabaseLookupFlags"/>
  78090. </parameter>
  78091. <parameter name="cancellable"
  78092. transfer-ownership="none"
  78093. nullable="1"
  78094. allow-none="1">
  78095. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78096. <type name="Cancellable" c:type="GCancellable*"/>
  78097. </parameter>
  78098. </parameters>
  78099. </method>
  78100. <method name="lookup_certificate_issuer_async"
  78101. c:identifier="g_tls_database_lookup_certificate_issuer_async"
  78102. version="2.30">
  78103. <doc xml:space="preserve">Asynchronously lookup the issuer of @certificate in the database. See
  78104. g_tls_database_lookup_certificate_issuer() for more information.</doc>
  78105. <return-value transfer-ownership="none">
  78106. <type name="none" c:type="void"/>
  78107. </return-value>
  78108. <parameters>
  78109. <instance-parameter name="self" transfer-ownership="none">
  78110. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78111. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78112. </instance-parameter>
  78113. <parameter name="certificate" transfer-ownership="none">
  78114. <doc xml:space="preserve">a #GTlsCertificate</doc>
  78115. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78116. </parameter>
  78117. <parameter name="interaction"
  78118. transfer-ownership="none"
  78119. nullable="1"
  78120. allow-none="1">
  78121. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78122. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78123. </parameter>
  78124. <parameter name="flags" transfer-ownership="none">
  78125. <doc xml:space="preserve">flags which affect the lookup operation</doc>
  78126. <type name="TlsDatabaseLookupFlags"
  78127. c:type="GTlsDatabaseLookupFlags"/>
  78128. </parameter>
  78129. <parameter name="cancellable"
  78130. transfer-ownership="none"
  78131. nullable="1"
  78132. allow-none="1">
  78133. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78134. <type name="Cancellable" c:type="GCancellable*"/>
  78135. </parameter>
  78136. <parameter name="callback"
  78137. transfer-ownership="none"
  78138. nullable="1"
  78139. allow-none="1"
  78140. scope="async"
  78141. closure="5">
  78142. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78143. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78144. </parameter>
  78145. <parameter name="user_data"
  78146. transfer-ownership="none"
  78147. nullable="1"
  78148. allow-none="1">
  78149. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78150. <type name="gpointer" c:type="gpointer"/>
  78151. </parameter>
  78152. </parameters>
  78153. </method>
  78154. <method name="lookup_certificate_issuer_finish"
  78155. c:identifier="g_tls_database_lookup_certificate_issuer_finish"
  78156. version="2.30"
  78157. throws="1">
  78158. <doc xml:space="preserve">Finish an asynchronous lookup issuer operation. See
  78159. g_tls_database_lookup_certificate_issuer() for more information.</doc>
  78160. <return-value transfer-ownership="full">
  78161. <doc xml:space="preserve">a newly allocated issuer #GTlsCertificate,
  78162. or %NULL. Use g_object_unref() to release the certificate.</doc>
  78163. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78164. </return-value>
  78165. <parameters>
  78166. <instance-parameter name="self" transfer-ownership="none">
  78167. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78168. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78169. </instance-parameter>
  78170. <parameter name="result" transfer-ownership="none">
  78171. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78172. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78173. </parameter>
  78174. </parameters>
  78175. </method>
  78176. <method name="lookup_certificates_issued_by"
  78177. c:identifier="g_tls_database_lookup_certificates_issued_by"
  78178. version="2.30"
  78179. throws="1">
  78180. <doc xml:space="preserve">Lookup certificates issued by this issuer in the database.
  78181. This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform
  78182. the lookup operation asynchronously.</doc>
  78183. <return-value transfer-ownership="full">
  78184. <doc xml:space="preserve">a newly allocated list of #GTlsCertificate
  78185. objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.</doc>
  78186. <type name="GLib.List" c:type="GList*">
  78187. <type name="TlsCertificate"/>
  78188. </type>
  78189. </return-value>
  78190. <parameters>
  78191. <instance-parameter name="self" transfer-ownership="none">
  78192. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78193. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78194. </instance-parameter>
  78195. <parameter name="issuer_raw_dn" transfer-ownership="none">
  78196. <doc xml:space="preserve">a #GByteArray which holds the DER encoded issuer DN.</doc>
  78197. <array name="GLib.ByteArray" c:type="GByteArray*">
  78198. <type name="guint8" c:type="guint8"/>
  78199. </array>
  78200. </parameter>
  78201. <parameter name="interaction"
  78202. transfer-ownership="none"
  78203. nullable="1"
  78204. allow-none="1">
  78205. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78206. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78207. </parameter>
  78208. <parameter name="flags" transfer-ownership="none">
  78209. <doc xml:space="preserve">Flags which affect the lookup operation.</doc>
  78210. <type name="TlsDatabaseLookupFlags"
  78211. c:type="GTlsDatabaseLookupFlags"/>
  78212. </parameter>
  78213. <parameter name="cancellable"
  78214. transfer-ownership="none"
  78215. nullable="1"
  78216. allow-none="1">
  78217. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78218. <type name="Cancellable" c:type="GCancellable*"/>
  78219. </parameter>
  78220. </parameters>
  78221. </method>
  78222. <method name="lookup_certificates_issued_by_async"
  78223. c:identifier="g_tls_database_lookup_certificates_issued_by_async"
  78224. version="2.30">
  78225. <doc xml:space="preserve">Asynchronously lookup certificates issued by this issuer in the database. See
  78226. g_tls_database_lookup_certificates_issued_by() for more information.
  78227. The database may choose to hold a reference to the issuer byte array for the duration
  78228. of of this asynchronous operation. The byte array should not be modified during
  78229. this time.</doc>
  78230. <return-value transfer-ownership="none">
  78231. <type name="none" c:type="void"/>
  78232. </return-value>
  78233. <parameters>
  78234. <instance-parameter name="self" transfer-ownership="none">
  78235. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78236. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78237. </instance-parameter>
  78238. <parameter name="issuer_raw_dn" transfer-ownership="none">
  78239. <doc xml:space="preserve">a #GByteArray which holds the DER encoded issuer DN.</doc>
  78240. <array name="GLib.ByteArray" c:type="GByteArray*">
  78241. <type name="guint8" c:type="guint8"/>
  78242. </array>
  78243. </parameter>
  78244. <parameter name="interaction"
  78245. transfer-ownership="none"
  78246. nullable="1"
  78247. allow-none="1">
  78248. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78249. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78250. </parameter>
  78251. <parameter name="flags" transfer-ownership="none">
  78252. <doc xml:space="preserve">Flags which affect the lookup operation.</doc>
  78253. <type name="TlsDatabaseLookupFlags"
  78254. c:type="GTlsDatabaseLookupFlags"/>
  78255. </parameter>
  78256. <parameter name="cancellable"
  78257. transfer-ownership="none"
  78258. nullable="1"
  78259. allow-none="1">
  78260. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78261. <type name="Cancellable" c:type="GCancellable*"/>
  78262. </parameter>
  78263. <parameter name="callback"
  78264. transfer-ownership="none"
  78265. nullable="1"
  78266. allow-none="1"
  78267. scope="async"
  78268. closure="5">
  78269. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78270. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78271. </parameter>
  78272. <parameter name="user_data"
  78273. transfer-ownership="none"
  78274. nullable="1"
  78275. allow-none="1">
  78276. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78277. <type name="gpointer" c:type="gpointer"/>
  78278. </parameter>
  78279. </parameters>
  78280. </method>
  78281. <method name="lookup_certificates_issued_by_finish"
  78282. c:identifier="g_tls_database_lookup_certificates_issued_by_finish"
  78283. version="2.30"
  78284. throws="1">
  78285. <doc xml:space="preserve">Finish an asynchronous lookup of certificates. See
  78286. g_tls_database_lookup_certificates_issued_by() for more information.</doc>
  78287. <return-value transfer-ownership="full">
  78288. <doc xml:space="preserve">a newly allocated list of #GTlsCertificate
  78289. objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.</doc>
  78290. <type name="GLib.List" c:type="GList*">
  78291. <type name="TlsCertificate"/>
  78292. </type>
  78293. </return-value>
  78294. <parameters>
  78295. <instance-parameter name="self" transfer-ownership="none">
  78296. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78297. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78298. </instance-parameter>
  78299. <parameter name="result" transfer-ownership="none">
  78300. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78301. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78302. </parameter>
  78303. </parameters>
  78304. </method>
  78305. <method name="verify_chain"
  78306. c:identifier="g_tls_database_verify_chain"
  78307. version="2.30"
  78308. throws="1">
  78309. <doc xml:space="preserve">Verify's a certificate chain after looking up and adding any missing
  78310. certificates to the chain.
  78311. @chain is a chain of #GTlsCertificate objects each pointing to the next
  78312. certificate in the chain by its %issuer property. The chain may initially
  78313. consist of one or more certificates. After the verification process is
  78314. complete, @chain may be modified by adding missing certificates, or removing
  78315. extra certificates. If a certificate anchor was found, then it is added to
  78316. the @chain.
  78317. @purpose describes the purpose (or usage) for which the certificate
  78318. is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
  78319. which means that the certificate is being used to authenticate a server
  78320. (and we are acting as the client).
  78321. The @identity is used to check for pinned certificates (trust exceptions)
  78322. in the database. These will override the normal verification process on a
  78323. host by host basis.
  78324. Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be
  78325. used.
  78326. This function can block, use g_tls_database_verify_chain_async() to perform
  78327. the verification operation asynchronously.</doc>
  78328. <return-value transfer-ownership="none">
  78329. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags which represents the
  78330. result of verification.</doc>
  78331. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  78332. </return-value>
  78333. <parameters>
  78334. <instance-parameter name="self" transfer-ownership="none">
  78335. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78336. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78337. </instance-parameter>
  78338. <parameter name="chain" transfer-ownership="none">
  78339. <doc xml:space="preserve">a #GTlsCertificate chain</doc>
  78340. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78341. </parameter>
  78342. <parameter name="purpose" transfer-ownership="none">
  78343. <doc xml:space="preserve">the purpose that this certificate chain will be used for.</doc>
  78344. <type name="utf8" c:type="const gchar*"/>
  78345. </parameter>
  78346. <parameter name="identity"
  78347. transfer-ownership="none"
  78348. nullable="1"
  78349. allow-none="1">
  78350. <doc xml:space="preserve">the expected peer identity</doc>
  78351. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  78352. </parameter>
  78353. <parameter name="interaction"
  78354. transfer-ownership="none"
  78355. nullable="1"
  78356. allow-none="1">
  78357. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78358. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78359. </parameter>
  78360. <parameter name="flags" transfer-ownership="none">
  78361. <doc xml:space="preserve">additional verify flags</doc>
  78362. <type name="TlsDatabaseVerifyFlags"
  78363. c:type="GTlsDatabaseVerifyFlags"/>
  78364. </parameter>
  78365. <parameter name="cancellable"
  78366. transfer-ownership="none"
  78367. nullable="1"
  78368. allow-none="1">
  78369. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78370. <type name="Cancellable" c:type="GCancellable*"/>
  78371. </parameter>
  78372. </parameters>
  78373. </method>
  78374. <method name="verify_chain_async"
  78375. c:identifier="g_tls_database_verify_chain_async"
  78376. version="2.30">
  78377. <doc xml:space="preserve">Asynchronously verify's a certificate chain after looking up and adding
  78378. any missing certificates to the chain. See g_tls_database_verify_chain()
  78379. for more information.</doc>
  78380. <return-value transfer-ownership="none">
  78381. <type name="none" c:type="void"/>
  78382. </return-value>
  78383. <parameters>
  78384. <instance-parameter name="self" transfer-ownership="none">
  78385. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78386. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78387. </instance-parameter>
  78388. <parameter name="chain" transfer-ownership="none">
  78389. <doc xml:space="preserve">a #GTlsCertificate chain</doc>
  78390. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78391. </parameter>
  78392. <parameter name="purpose" transfer-ownership="none">
  78393. <doc xml:space="preserve">the purpose that this certificate chain will be used for.</doc>
  78394. <type name="utf8" c:type="const gchar*"/>
  78395. </parameter>
  78396. <parameter name="identity"
  78397. transfer-ownership="none"
  78398. nullable="1"
  78399. allow-none="1">
  78400. <doc xml:space="preserve">the expected peer identity</doc>
  78401. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  78402. </parameter>
  78403. <parameter name="interaction"
  78404. transfer-ownership="none"
  78405. nullable="1"
  78406. allow-none="1">
  78407. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78408. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78409. </parameter>
  78410. <parameter name="flags" transfer-ownership="none">
  78411. <doc xml:space="preserve">additional verify flags</doc>
  78412. <type name="TlsDatabaseVerifyFlags"
  78413. c:type="GTlsDatabaseVerifyFlags"/>
  78414. </parameter>
  78415. <parameter name="cancellable"
  78416. transfer-ownership="none"
  78417. nullable="1"
  78418. allow-none="1">
  78419. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78420. <type name="Cancellable" c:type="GCancellable*"/>
  78421. </parameter>
  78422. <parameter name="callback"
  78423. transfer-ownership="none"
  78424. nullable="1"
  78425. allow-none="1"
  78426. scope="async"
  78427. closure="7">
  78428. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78429. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78430. </parameter>
  78431. <parameter name="user_data"
  78432. transfer-ownership="none"
  78433. nullable="1"
  78434. allow-none="1">
  78435. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78436. <type name="gpointer" c:type="gpointer"/>
  78437. </parameter>
  78438. </parameters>
  78439. </method>
  78440. <method name="verify_chain_finish"
  78441. c:identifier="g_tls_database_verify_chain_finish"
  78442. version="2.30"
  78443. throws="1">
  78444. <doc xml:space="preserve">Finish an asynchronous verify chain operation. See
  78445. g_tls_database_verify_chain() for more information. *</doc>
  78446. <return-value transfer-ownership="none">
  78447. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags which represents the
  78448. result of verification.</doc>
  78449. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  78450. </return-value>
  78451. <parameters>
  78452. <instance-parameter name="self" transfer-ownership="none">
  78453. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78454. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78455. </instance-parameter>
  78456. <parameter name="result" transfer-ownership="none">
  78457. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78458. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78459. </parameter>
  78460. </parameters>
  78461. </method>
  78462. <field name="parent_instance">
  78463. <type name="GObject.Object" c:type="GObject"/>
  78464. </field>
  78465. <field name="priv">
  78466. <type name="TlsDatabasePrivate" c:type="GTlsDatabasePrivate*"/>
  78467. </field>
  78468. </class>
  78469. <record name="TlsDatabaseClass"
  78470. c:type="GTlsDatabaseClass"
  78471. glib:is-gtype-struct-for="TlsDatabase"
  78472. version="2.30">
  78473. <doc xml:space="preserve">The class for #GTlsDatabase. Derived classes should implement the various
  78474. virtual methods. _async and _finish methods have a default
  78475. implementation that runs the corresponding sync method in a thread.</doc>
  78476. <field name="parent_class">
  78477. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  78478. </field>
  78479. <field name="verify_chain">
  78480. <callback name="verify_chain" throws="1">
  78481. <return-value transfer-ownership="none">
  78482. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags which represents the
  78483. result of verification.</doc>
  78484. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  78485. </return-value>
  78486. <parameters>
  78487. <parameter name="self" transfer-ownership="none">
  78488. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78489. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78490. </parameter>
  78491. <parameter name="chain" transfer-ownership="none">
  78492. <doc xml:space="preserve">a #GTlsCertificate chain</doc>
  78493. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78494. </parameter>
  78495. <parameter name="purpose" transfer-ownership="none">
  78496. <doc xml:space="preserve">the purpose that this certificate chain will be used for.</doc>
  78497. <type name="utf8" c:type="const gchar*"/>
  78498. </parameter>
  78499. <parameter name="identity"
  78500. transfer-ownership="none"
  78501. nullable="1"
  78502. allow-none="1">
  78503. <doc xml:space="preserve">the expected peer identity</doc>
  78504. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  78505. </parameter>
  78506. <parameter name="interaction"
  78507. transfer-ownership="none"
  78508. nullable="1"
  78509. allow-none="1">
  78510. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78511. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78512. </parameter>
  78513. <parameter name="flags" transfer-ownership="none">
  78514. <doc xml:space="preserve">additional verify flags</doc>
  78515. <type name="TlsDatabaseVerifyFlags"
  78516. c:type="GTlsDatabaseVerifyFlags"/>
  78517. </parameter>
  78518. <parameter name="cancellable"
  78519. transfer-ownership="none"
  78520. nullable="1"
  78521. allow-none="1">
  78522. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78523. <type name="Cancellable" c:type="GCancellable*"/>
  78524. </parameter>
  78525. </parameters>
  78526. </callback>
  78527. </field>
  78528. <field name="verify_chain_async">
  78529. <callback name="verify_chain_async">
  78530. <return-value transfer-ownership="none">
  78531. <type name="none" c:type="void"/>
  78532. </return-value>
  78533. <parameters>
  78534. <parameter name="self" transfer-ownership="none">
  78535. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78536. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78537. </parameter>
  78538. <parameter name="chain" transfer-ownership="none">
  78539. <doc xml:space="preserve">a #GTlsCertificate chain</doc>
  78540. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78541. </parameter>
  78542. <parameter name="purpose" transfer-ownership="none">
  78543. <doc xml:space="preserve">the purpose that this certificate chain will be used for.</doc>
  78544. <type name="utf8" c:type="const gchar*"/>
  78545. </parameter>
  78546. <parameter name="identity"
  78547. transfer-ownership="none"
  78548. nullable="1"
  78549. allow-none="1">
  78550. <doc xml:space="preserve">the expected peer identity</doc>
  78551. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  78552. </parameter>
  78553. <parameter name="interaction"
  78554. transfer-ownership="none"
  78555. nullable="1"
  78556. allow-none="1">
  78557. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78558. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78559. </parameter>
  78560. <parameter name="flags" transfer-ownership="none">
  78561. <doc xml:space="preserve">additional verify flags</doc>
  78562. <type name="TlsDatabaseVerifyFlags"
  78563. c:type="GTlsDatabaseVerifyFlags"/>
  78564. </parameter>
  78565. <parameter name="cancellable"
  78566. transfer-ownership="none"
  78567. nullable="1"
  78568. allow-none="1">
  78569. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78570. <type name="Cancellable" c:type="GCancellable*"/>
  78571. </parameter>
  78572. <parameter name="callback"
  78573. transfer-ownership="none"
  78574. nullable="1"
  78575. allow-none="1"
  78576. scope="async"
  78577. closure="8">
  78578. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78579. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78580. </parameter>
  78581. <parameter name="user_data"
  78582. transfer-ownership="none"
  78583. nullable="1"
  78584. allow-none="1"
  78585. closure="8">
  78586. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78587. <type name="gpointer" c:type="gpointer"/>
  78588. </parameter>
  78589. </parameters>
  78590. </callback>
  78591. </field>
  78592. <field name="verify_chain_finish">
  78593. <callback name="verify_chain_finish" throws="1">
  78594. <return-value transfer-ownership="none">
  78595. <doc xml:space="preserve">the appropriate #GTlsCertificateFlags which represents the
  78596. result of verification.</doc>
  78597. <type name="TlsCertificateFlags" c:type="GTlsCertificateFlags"/>
  78598. </return-value>
  78599. <parameters>
  78600. <parameter name="self" transfer-ownership="none">
  78601. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78602. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78603. </parameter>
  78604. <parameter name="result" transfer-ownership="none">
  78605. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78606. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78607. </parameter>
  78608. </parameters>
  78609. </callback>
  78610. </field>
  78611. <field name="create_certificate_handle">
  78612. <callback name="create_certificate_handle">
  78613. <return-value transfer-ownership="full" nullable="1">
  78614. <doc xml:space="preserve">a newly allocated string containing the
  78615. handle.</doc>
  78616. <type name="utf8" c:type="gchar*"/>
  78617. </return-value>
  78618. <parameters>
  78619. <parameter name="self" transfer-ownership="none">
  78620. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78621. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78622. </parameter>
  78623. <parameter name="certificate" transfer-ownership="none">
  78624. <doc xml:space="preserve">certificate for which to create a handle.</doc>
  78625. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78626. </parameter>
  78627. </parameters>
  78628. </callback>
  78629. </field>
  78630. <field name="lookup_certificate_for_handle">
  78631. <callback name="lookup_certificate_for_handle" throws="1">
  78632. <return-value transfer-ownership="full" nullable="1">
  78633. <doc xml:space="preserve">a newly allocated
  78634. #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate.</doc>
  78635. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78636. </return-value>
  78637. <parameters>
  78638. <parameter name="self" transfer-ownership="none">
  78639. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78640. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78641. </parameter>
  78642. <parameter name="handle" transfer-ownership="none">
  78643. <doc xml:space="preserve">a certificate handle</doc>
  78644. <type name="utf8" c:type="const gchar*"/>
  78645. </parameter>
  78646. <parameter name="interaction"
  78647. transfer-ownership="none"
  78648. nullable="1"
  78649. allow-none="1">
  78650. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78651. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78652. </parameter>
  78653. <parameter name="flags" transfer-ownership="none">
  78654. <doc xml:space="preserve">Flags which affect the lookup.</doc>
  78655. <type name="TlsDatabaseLookupFlags"
  78656. c:type="GTlsDatabaseLookupFlags"/>
  78657. </parameter>
  78658. <parameter name="cancellable"
  78659. transfer-ownership="none"
  78660. nullable="1"
  78661. allow-none="1">
  78662. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78663. <type name="Cancellable" c:type="GCancellable*"/>
  78664. </parameter>
  78665. </parameters>
  78666. </callback>
  78667. </field>
  78668. <field name="lookup_certificate_for_handle_async">
  78669. <callback name="lookup_certificate_for_handle_async">
  78670. <return-value transfer-ownership="none">
  78671. <type name="none" c:type="void"/>
  78672. </return-value>
  78673. <parameters>
  78674. <parameter name="self" transfer-ownership="none">
  78675. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78676. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78677. </parameter>
  78678. <parameter name="handle" transfer-ownership="none">
  78679. <doc xml:space="preserve">a certificate handle</doc>
  78680. <type name="utf8" c:type="const gchar*"/>
  78681. </parameter>
  78682. <parameter name="interaction"
  78683. transfer-ownership="none"
  78684. nullable="1"
  78685. allow-none="1">
  78686. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78687. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78688. </parameter>
  78689. <parameter name="flags" transfer-ownership="none">
  78690. <doc xml:space="preserve">Flags which affect the lookup.</doc>
  78691. <type name="TlsDatabaseLookupFlags"
  78692. c:type="GTlsDatabaseLookupFlags"/>
  78693. </parameter>
  78694. <parameter name="cancellable"
  78695. transfer-ownership="none"
  78696. nullable="1"
  78697. allow-none="1">
  78698. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78699. <type name="Cancellable" c:type="GCancellable*"/>
  78700. </parameter>
  78701. <parameter name="callback"
  78702. transfer-ownership="none"
  78703. nullable="1"
  78704. allow-none="1"
  78705. scope="async"
  78706. closure="6">
  78707. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78708. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78709. </parameter>
  78710. <parameter name="user_data"
  78711. transfer-ownership="none"
  78712. nullable="1"
  78713. allow-none="1"
  78714. closure="6">
  78715. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78716. <type name="gpointer" c:type="gpointer"/>
  78717. </parameter>
  78718. </parameters>
  78719. </callback>
  78720. </field>
  78721. <field name="lookup_certificate_for_handle_finish">
  78722. <callback name="lookup_certificate_for_handle_finish" throws="1">
  78723. <return-value transfer-ownership="full">
  78724. <doc xml:space="preserve">a newly allocated #GTlsCertificate object.
  78725. Use g_object_unref() to release the certificate.</doc>
  78726. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78727. </return-value>
  78728. <parameters>
  78729. <parameter name="self" transfer-ownership="none">
  78730. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78731. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78732. </parameter>
  78733. <parameter name="result" transfer-ownership="none">
  78734. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78735. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78736. </parameter>
  78737. </parameters>
  78738. </callback>
  78739. </field>
  78740. <field name="lookup_certificate_issuer">
  78741. <callback name="lookup_certificate_issuer" throws="1">
  78742. <return-value transfer-ownership="full">
  78743. <doc xml:space="preserve">a newly allocated issuer #GTlsCertificate,
  78744. or %NULL. Use g_object_unref() to release the certificate.</doc>
  78745. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78746. </return-value>
  78747. <parameters>
  78748. <parameter name="self" transfer-ownership="none">
  78749. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78750. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78751. </parameter>
  78752. <parameter name="certificate" transfer-ownership="none">
  78753. <doc xml:space="preserve">a #GTlsCertificate</doc>
  78754. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78755. </parameter>
  78756. <parameter name="interaction"
  78757. transfer-ownership="none"
  78758. nullable="1"
  78759. allow-none="1">
  78760. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78761. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78762. </parameter>
  78763. <parameter name="flags" transfer-ownership="none">
  78764. <doc xml:space="preserve">flags which affect the lookup operation</doc>
  78765. <type name="TlsDatabaseLookupFlags"
  78766. c:type="GTlsDatabaseLookupFlags"/>
  78767. </parameter>
  78768. <parameter name="cancellable"
  78769. transfer-ownership="none"
  78770. nullable="1"
  78771. allow-none="1">
  78772. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78773. <type name="Cancellable" c:type="GCancellable*"/>
  78774. </parameter>
  78775. </parameters>
  78776. </callback>
  78777. </field>
  78778. <field name="lookup_certificate_issuer_async">
  78779. <callback name="lookup_certificate_issuer_async">
  78780. <return-value transfer-ownership="none">
  78781. <type name="none" c:type="void"/>
  78782. </return-value>
  78783. <parameters>
  78784. <parameter name="self" transfer-ownership="none">
  78785. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78786. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78787. </parameter>
  78788. <parameter name="certificate" transfer-ownership="none">
  78789. <doc xml:space="preserve">a #GTlsCertificate</doc>
  78790. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78791. </parameter>
  78792. <parameter name="interaction"
  78793. transfer-ownership="none"
  78794. nullable="1"
  78795. allow-none="1">
  78796. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78797. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78798. </parameter>
  78799. <parameter name="flags" transfer-ownership="none">
  78800. <doc xml:space="preserve">flags which affect the lookup operation</doc>
  78801. <type name="TlsDatabaseLookupFlags"
  78802. c:type="GTlsDatabaseLookupFlags"/>
  78803. </parameter>
  78804. <parameter name="cancellable"
  78805. transfer-ownership="none"
  78806. nullable="1"
  78807. allow-none="1">
  78808. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78809. <type name="Cancellable" c:type="GCancellable*"/>
  78810. </parameter>
  78811. <parameter name="callback"
  78812. transfer-ownership="none"
  78813. nullable="1"
  78814. allow-none="1"
  78815. scope="async"
  78816. closure="6">
  78817. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78818. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78819. </parameter>
  78820. <parameter name="user_data"
  78821. transfer-ownership="none"
  78822. nullable="1"
  78823. allow-none="1"
  78824. closure="6">
  78825. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78826. <type name="gpointer" c:type="gpointer"/>
  78827. </parameter>
  78828. </parameters>
  78829. </callback>
  78830. </field>
  78831. <field name="lookup_certificate_issuer_finish">
  78832. <callback name="lookup_certificate_issuer_finish" throws="1">
  78833. <return-value transfer-ownership="full">
  78834. <doc xml:space="preserve">a newly allocated issuer #GTlsCertificate,
  78835. or %NULL. Use g_object_unref() to release the certificate.</doc>
  78836. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  78837. </return-value>
  78838. <parameters>
  78839. <parameter name="self" transfer-ownership="none">
  78840. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78841. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78842. </parameter>
  78843. <parameter name="result" transfer-ownership="none">
  78844. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78845. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78846. </parameter>
  78847. </parameters>
  78848. </callback>
  78849. </field>
  78850. <field name="lookup_certificates_issued_by">
  78851. <callback name="lookup_certificates_issued_by" throws="1">
  78852. <return-value transfer-ownership="full">
  78853. <doc xml:space="preserve">a newly allocated list of #GTlsCertificate
  78854. objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.</doc>
  78855. <type name="GLib.List" c:type="GList*">
  78856. <type name="TlsCertificate"/>
  78857. </type>
  78858. </return-value>
  78859. <parameters>
  78860. <parameter name="self" transfer-ownership="none">
  78861. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78862. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78863. </parameter>
  78864. <parameter name="issuer_raw_dn" transfer-ownership="none">
  78865. <doc xml:space="preserve">a #GByteArray which holds the DER encoded issuer DN.</doc>
  78866. <array name="GLib.ByteArray" c:type="GByteArray*">
  78867. <type name="guint8" c:type="guint8"/>
  78868. </array>
  78869. </parameter>
  78870. <parameter name="interaction"
  78871. transfer-ownership="none"
  78872. nullable="1"
  78873. allow-none="1">
  78874. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78875. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78876. </parameter>
  78877. <parameter name="flags" transfer-ownership="none">
  78878. <doc xml:space="preserve">Flags which affect the lookup operation.</doc>
  78879. <type name="TlsDatabaseLookupFlags"
  78880. c:type="GTlsDatabaseLookupFlags"/>
  78881. </parameter>
  78882. <parameter name="cancellable"
  78883. transfer-ownership="none"
  78884. nullable="1"
  78885. allow-none="1">
  78886. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78887. <type name="Cancellable" c:type="GCancellable*"/>
  78888. </parameter>
  78889. </parameters>
  78890. </callback>
  78891. </field>
  78892. <field name="lookup_certificates_issued_by_async">
  78893. <callback name="lookup_certificates_issued_by_async">
  78894. <return-value transfer-ownership="none">
  78895. <type name="none" c:type="void"/>
  78896. </return-value>
  78897. <parameters>
  78898. <parameter name="self" transfer-ownership="none">
  78899. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78900. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78901. </parameter>
  78902. <parameter name="issuer_raw_dn" transfer-ownership="none">
  78903. <doc xml:space="preserve">a #GByteArray which holds the DER encoded issuer DN.</doc>
  78904. <array name="GLib.ByteArray" c:type="GByteArray*">
  78905. <type name="guint8" c:type="guint8"/>
  78906. </array>
  78907. </parameter>
  78908. <parameter name="interaction"
  78909. transfer-ownership="none"
  78910. nullable="1"
  78911. allow-none="1">
  78912. <doc xml:space="preserve">used to interact with the user if necessary</doc>
  78913. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  78914. </parameter>
  78915. <parameter name="flags" transfer-ownership="none">
  78916. <doc xml:space="preserve">Flags which affect the lookup operation.</doc>
  78917. <type name="TlsDatabaseLookupFlags"
  78918. c:type="GTlsDatabaseLookupFlags"/>
  78919. </parameter>
  78920. <parameter name="cancellable"
  78921. transfer-ownership="none"
  78922. nullable="1"
  78923. allow-none="1">
  78924. <doc xml:space="preserve">a #GCancellable, or %NULL</doc>
  78925. <type name="Cancellable" c:type="GCancellable*"/>
  78926. </parameter>
  78927. <parameter name="callback"
  78928. transfer-ownership="none"
  78929. nullable="1"
  78930. allow-none="1"
  78931. scope="async"
  78932. closure="6">
  78933. <doc xml:space="preserve">callback to call when the operation completes</doc>
  78934. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  78935. </parameter>
  78936. <parameter name="user_data"
  78937. transfer-ownership="none"
  78938. nullable="1"
  78939. allow-none="1"
  78940. closure="6">
  78941. <doc xml:space="preserve">the data to pass to the callback function</doc>
  78942. <type name="gpointer" c:type="gpointer"/>
  78943. </parameter>
  78944. </parameters>
  78945. </callback>
  78946. </field>
  78947. <field name="lookup_certificates_issued_by_finish">
  78948. <callback name="lookup_certificates_issued_by_finish" throws="1">
  78949. <return-value transfer-ownership="full">
  78950. <doc xml:space="preserve">a newly allocated list of #GTlsCertificate
  78951. objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.</doc>
  78952. <type name="GLib.List" c:type="GList*">
  78953. <type name="TlsCertificate"/>
  78954. </type>
  78955. </return-value>
  78956. <parameters>
  78957. <parameter name="self" transfer-ownership="none">
  78958. <doc xml:space="preserve">a #GTlsDatabase</doc>
  78959. <type name="TlsDatabase" c:type="GTlsDatabase*"/>
  78960. </parameter>
  78961. <parameter name="result" transfer-ownership="none">
  78962. <doc xml:space="preserve">a #GAsyncResult.</doc>
  78963. <type name="AsyncResult" c:type="GAsyncResult*"/>
  78964. </parameter>
  78965. </parameters>
  78966. </callback>
  78967. </field>
  78968. <field name="padding" readable="0" private="1">
  78969. <array zero-terminated="0" c:type="gpointer" fixed-size="16">
  78970. <type name="gpointer" c:type="gpointer"/>
  78971. </array>
  78972. </field>
  78973. </record>
  78974. <enumeration name="TlsDatabaseLookupFlags"
  78975. version="2.30"
  78976. glib:type-name="GTlsDatabaseLookupFlags"
  78977. glib:get-type="g_tls_database_lookup_flags_get_type"
  78978. c:type="GTlsDatabaseLookupFlags">
  78979. <doc xml:space="preserve">Flags for g_tls_database_lookup_certificate_handle(),
  78980. g_tls_database_lookup_certificate_issuer(),
  78981. and g_tls_database_lookup_certificates_issued_by().</doc>
  78982. <member name="none"
  78983. value="0"
  78984. c:identifier="G_TLS_DATABASE_LOOKUP_NONE"
  78985. glib:nick="none">
  78986. <doc xml:space="preserve">No lookup flags</doc>
  78987. </member>
  78988. <member name="keypair"
  78989. value="1"
  78990. c:identifier="G_TLS_DATABASE_LOOKUP_KEYPAIR"
  78991. glib:nick="keypair">
  78992. <doc xml:space="preserve">Restrict lookup to certificates that have
  78993. a private key.</doc>
  78994. </member>
  78995. </enumeration>
  78996. <record name="TlsDatabasePrivate"
  78997. c:type="GTlsDatabasePrivate"
  78998. disguised="1">
  78999. </record>
  79000. <bitfield name="TlsDatabaseVerifyFlags"
  79001. version="2.30"
  79002. glib:type-name="GTlsDatabaseVerifyFlags"
  79003. glib:get-type="g_tls_database_verify_flags_get_type"
  79004. c:type="GTlsDatabaseVerifyFlags">
  79005. <doc xml:space="preserve">Flags for g_tls_database_verify_chain().</doc>
  79006. <member name="none"
  79007. value="0"
  79008. c:identifier="G_TLS_DATABASE_VERIFY_NONE"
  79009. glib:nick="none">
  79010. <doc xml:space="preserve">No verification flags</doc>
  79011. </member>
  79012. </bitfield>
  79013. <enumeration name="TlsError"
  79014. version="2.28"
  79015. glib:type-name="GTlsError"
  79016. glib:get-type="g_tls_error_get_type"
  79017. c:type="GTlsError"
  79018. glib:error-domain="g-tls-error-quark">
  79019. <doc xml:space="preserve">An error code used with %G_TLS_ERROR in a #GError returned from a
  79020. TLS-related routine.</doc>
  79021. <member name="unavailable"
  79022. value="0"
  79023. c:identifier="G_TLS_ERROR_UNAVAILABLE"
  79024. glib:nick="unavailable">
  79025. <doc xml:space="preserve">No TLS provider is available</doc>
  79026. </member>
  79027. <member name="misc"
  79028. value="1"
  79029. c:identifier="G_TLS_ERROR_MISC"
  79030. glib:nick="misc">
  79031. <doc xml:space="preserve">Miscellaneous TLS error</doc>
  79032. </member>
  79033. <member name="bad_certificate"
  79034. value="2"
  79035. c:identifier="G_TLS_ERROR_BAD_CERTIFICATE"
  79036. glib:nick="bad-certificate">
  79037. <doc xml:space="preserve">A certificate could not be parsed</doc>
  79038. </member>
  79039. <member name="not_tls"
  79040. value="3"
  79041. c:identifier="G_TLS_ERROR_NOT_TLS"
  79042. glib:nick="not-tls">
  79043. <doc xml:space="preserve">The TLS handshake failed because the
  79044. peer does not seem to be a TLS server.</doc>
  79045. </member>
  79046. <member name="handshake"
  79047. value="4"
  79048. c:identifier="G_TLS_ERROR_HANDSHAKE"
  79049. glib:nick="handshake">
  79050. <doc xml:space="preserve">The TLS handshake failed because the
  79051. peer's certificate was not acceptable.</doc>
  79052. </member>
  79053. <member name="certificate_required"
  79054. value="5"
  79055. c:identifier="G_TLS_ERROR_CERTIFICATE_REQUIRED"
  79056. glib:nick="certificate-required">
  79057. <doc xml:space="preserve">The TLS handshake failed because
  79058. the server requested a client-side certificate, but none was
  79059. provided. See g_tls_connection_set_certificate().</doc>
  79060. </member>
  79061. <member name="eof"
  79062. value="6"
  79063. c:identifier="G_TLS_ERROR_EOF"
  79064. glib:nick="eof">
  79065. <doc xml:space="preserve">The TLS connection was closed without proper
  79066. notice, which may indicate an attack. See
  79067. g_tls_connection_set_require_close_notify().</doc>
  79068. </member>
  79069. <function name="quark" c:identifier="g_tls_error_quark" version="2.28">
  79070. <doc xml:space="preserve">Gets the TLS error quark.</doc>
  79071. <return-value transfer-ownership="none">
  79072. <doc xml:space="preserve">a #GQuark.</doc>
  79073. <type name="GLib.Quark" c:type="GQuark"/>
  79074. </return-value>
  79075. </function>
  79076. </enumeration>
  79077. <interface name="TlsFileDatabase"
  79078. c:symbol-prefix="tls_file_database"
  79079. c:type="GTlsFileDatabase"
  79080. version="2.30"
  79081. glib:type-name="GTlsFileDatabase"
  79082. glib:get-type="g_tls_file_database_get_type"
  79083. glib:type-struct="TlsFileDatabaseInterface">
  79084. <doc xml:space="preserve">#GTlsFileDatabase is implemented by #GTlsDatabase objects which load
  79085. their certificate information from a file. It is an interface which
  79086. TLS library specific subtypes implement.</doc>
  79087. <prerequisite name="TlsDatabase"/>
  79088. <function name="new"
  79089. c:identifier="g_tls_file_database_new"
  79090. version="2.30"
  79091. throws="1">
  79092. <doc xml:space="preserve">Creates a new #GTlsFileDatabase which uses anchor certificate authorities
  79093. in @anchors to verify certificate chains.
  79094. The certificates in @anchors must be PEM encoded.</doc>
  79095. <return-value transfer-ownership="full">
  79096. <doc xml:space="preserve">the new
  79097. #GTlsFileDatabase, or %NULL on error</doc>
  79098. <type name="TlsFileDatabase" c:type="GTlsDatabase*"/>
  79099. </return-value>
  79100. <parameters>
  79101. <parameter name="anchors" transfer-ownership="none">
  79102. <doc xml:space="preserve">filename of anchor certificate authorities.</doc>
  79103. <type name="utf8" c:type="const gchar*"/>
  79104. </parameter>
  79105. </parameters>
  79106. </function>
  79107. <property name="anchors"
  79108. version="2.30"
  79109. writable="1"
  79110. construct="1"
  79111. transfer-ownership="none">
  79112. <doc xml:space="preserve">The path to a file containing PEM encoded certificate authority
  79113. root anchors. The certificates in this file will be treated as
  79114. root authorities for the purpose of verifying other certificates
  79115. via the g_tls_database_verify_chain() operation.</doc>
  79116. <type name="utf8" c:type="gchar*"/>
  79117. </property>
  79118. </interface>
  79119. <record name="TlsFileDatabaseInterface"
  79120. c:type="GTlsFileDatabaseInterface"
  79121. glib:is-gtype-struct-for="TlsFileDatabase">
  79122. <doc xml:space="preserve">Provides an interface for #GTlsFileDatabase implementations.</doc>
  79123. <field name="g_iface">
  79124. <doc xml:space="preserve">The parent interface.</doc>
  79125. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  79126. </field>
  79127. <field name="padding" readable="0" private="1">
  79128. <array zero-terminated="0" c:type="gpointer" fixed-size="8">
  79129. <type name="gpointer" c:type="gpointer"/>
  79130. </array>
  79131. </field>
  79132. </record>
  79133. <class name="TlsInteraction"
  79134. c:symbol-prefix="tls_interaction"
  79135. c:type="GTlsInteraction"
  79136. version="2.30"
  79137. parent="GObject.Object"
  79138. glib:type-name="GTlsInteraction"
  79139. glib:get-type="g_tls_interaction_get_type"
  79140. glib:type-struct="TlsInteractionClass">
  79141. <doc xml:space="preserve">#GTlsInteraction provides a mechanism for the TLS connection and database
  79142. code to interact with the user. It can be used to ask the user for passwords.
  79143. To use a #GTlsInteraction with a TLS connection use
  79144. g_tls_connection_set_interaction().
  79145. Callers should instantiate a derived class that implements the various
  79146. interaction methods to show the required dialogs.
  79147. Callers should use the 'invoke' functions like
  79148. g_tls_interaction_invoke_ask_password() to run interaction methods. These
  79149. functions make sure that the interaction is invoked in the main loop
  79150. and not in the current thread, if the current thread is not running the
  79151. main loop.
  79152. Derived classes can choose to implement whichever interactions methods they'd
  79153. like to support by overriding those virtual methods in their class
  79154. initialization function. Any interactions not implemented will return
  79155. %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method,
  79156. it must also implement the corresponding finish method.</doc>
  79157. <virtual-method name="ask_password"
  79158. invoker="ask_password"
  79159. version="2.30"
  79160. throws="1">
  79161. <doc xml:space="preserve">Run synchronous interaction to ask the user for a password. In general,
  79162. g_tls_interaction_invoke_ask_password() should be used instead of this
  79163. function.
  79164. Derived subclasses usually implement a password prompt, although they may
  79165. also choose to provide a password from elsewhere. The @password value will
  79166. be filled in and then @callback will be called. Alternatively the user may
  79167. abort this password request, which will usually abort the TLS connection.
  79168. If the interaction is cancelled by the cancellation object, or by the
  79169. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79170. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79171. not support immediate cancellation.</doc>
  79172. <return-value transfer-ownership="none">
  79173. <doc xml:space="preserve">The status of the ask password interaction.</doc>
  79174. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79175. </return-value>
  79176. <parameters>
  79177. <instance-parameter name="interaction" transfer-ownership="none">
  79178. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79179. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79180. </instance-parameter>
  79181. <parameter name="password" transfer-ownership="none">
  79182. <doc xml:space="preserve">a #GTlsPassword object</doc>
  79183. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79184. </parameter>
  79185. <parameter name="cancellable"
  79186. transfer-ownership="none"
  79187. nullable="1"
  79188. allow-none="1">
  79189. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79190. <type name="Cancellable" c:type="GCancellable*"/>
  79191. </parameter>
  79192. </parameters>
  79193. </virtual-method>
  79194. <virtual-method name="ask_password_async"
  79195. invoker="ask_password_async"
  79196. version="2.30">
  79197. <doc xml:space="preserve">Run asynchronous interaction to ask the user for a password. In general,
  79198. g_tls_interaction_invoke_ask_password() should be used instead of this
  79199. function.
  79200. Derived subclasses usually implement a password prompt, although they may
  79201. also choose to provide a password from elsewhere. The @password value will
  79202. be filled in and then @callback will be called. Alternatively the user may
  79203. abort this password request, which will usually abort the TLS connection.
  79204. If the interaction is cancelled by the cancellation object, or by the
  79205. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79206. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79207. not support immediate cancellation.
  79208. Certain implementations may not support immediate cancellation.</doc>
  79209. <return-value transfer-ownership="none">
  79210. <type name="none" c:type="void"/>
  79211. </return-value>
  79212. <parameters>
  79213. <instance-parameter name="interaction" transfer-ownership="none">
  79214. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79215. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79216. </instance-parameter>
  79217. <parameter name="password" transfer-ownership="none">
  79218. <doc xml:space="preserve">a #GTlsPassword object</doc>
  79219. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79220. </parameter>
  79221. <parameter name="cancellable"
  79222. transfer-ownership="none"
  79223. nullable="1"
  79224. allow-none="1">
  79225. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79226. <type name="Cancellable" c:type="GCancellable*"/>
  79227. </parameter>
  79228. <parameter name="callback"
  79229. transfer-ownership="none"
  79230. nullable="1"
  79231. allow-none="1"
  79232. scope="async"
  79233. closure="3">
  79234. <doc xml:space="preserve">will be called when the interaction completes</doc>
  79235. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  79236. </parameter>
  79237. <parameter name="user_data"
  79238. transfer-ownership="none"
  79239. nullable="1"
  79240. allow-none="1"
  79241. closure="3">
  79242. <doc xml:space="preserve">data to pass to the @callback</doc>
  79243. <type name="gpointer" c:type="gpointer"/>
  79244. </parameter>
  79245. </parameters>
  79246. </virtual-method>
  79247. <virtual-method name="ask_password_finish"
  79248. invoker="ask_password_finish"
  79249. version="2.30"
  79250. throws="1">
  79251. <doc xml:space="preserve">Complete an ask password user interaction request. This should be once
  79252. the g_tls_interaction_ask_password_async() completion callback is called.
  79253. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed
  79254. to g_tls_interaction_ask_password() will have its password filled in.
  79255. If the interaction is cancelled by the cancellation object, or by the
  79256. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79257. contains a %G_IO_ERROR_CANCELLED error code.</doc>
  79258. <return-value transfer-ownership="none">
  79259. <doc xml:space="preserve">The status of the ask password interaction.</doc>
  79260. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79261. </return-value>
  79262. <parameters>
  79263. <instance-parameter name="interaction" transfer-ownership="none">
  79264. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79265. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79266. </instance-parameter>
  79267. <parameter name="result" transfer-ownership="none">
  79268. <doc xml:space="preserve">the result passed to the callback</doc>
  79269. <type name="AsyncResult" c:type="GAsyncResult*"/>
  79270. </parameter>
  79271. </parameters>
  79272. </virtual-method>
  79273. <virtual-method name="request_certificate"
  79274. invoker="request_certificate"
  79275. version="2.40"
  79276. throws="1">
  79277. <doc xml:space="preserve">Run synchronous interaction to ask the user to choose a certificate to use
  79278. with the connection. In general, g_tls_interaction_invoke_request_certificate()
  79279. should be used instead of this function.
  79280. Derived subclasses usually implement a certificate selector, although they may
  79281. also choose to provide a certificate from elsewhere. Alternatively the user may
  79282. abort this certificate request, which will usually abort the TLS connection.
  79283. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection
  79284. passed to g_tls_interaction_request_certificate() will have had its
  79285. #GTlsConnection:certificate filled in.
  79286. If the interaction is cancelled by the cancellation object, or by the
  79287. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79288. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79289. not support immediate cancellation.</doc>
  79290. <return-value transfer-ownership="none">
  79291. <doc xml:space="preserve">The status of the request certificate interaction.</doc>
  79292. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79293. </return-value>
  79294. <parameters>
  79295. <instance-parameter name="interaction" transfer-ownership="none">
  79296. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79297. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79298. </instance-parameter>
  79299. <parameter name="connection" transfer-ownership="none">
  79300. <doc xml:space="preserve">a #GTlsConnection object</doc>
  79301. <type name="TlsConnection" c:type="GTlsConnection*"/>
  79302. </parameter>
  79303. <parameter name="flags" transfer-ownership="none">
  79304. <doc xml:space="preserve">flags providing more information about the request</doc>
  79305. <type name="TlsCertificateRequestFlags"
  79306. c:type="GTlsCertificateRequestFlags"/>
  79307. </parameter>
  79308. <parameter name="cancellable"
  79309. transfer-ownership="none"
  79310. nullable="1"
  79311. allow-none="1">
  79312. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79313. <type name="Cancellable" c:type="GCancellable*"/>
  79314. </parameter>
  79315. </parameters>
  79316. </virtual-method>
  79317. <virtual-method name="request_certificate_async"
  79318. invoker="request_certificate_async"
  79319. version="2.40">
  79320. <doc xml:space="preserve">Run asynchronous interaction to ask the user for a certificate to use with
  79321. the connection. In general, g_tls_interaction_invoke_request_certificate() should
  79322. be used instead of this function.
  79323. Derived subclasses usually implement a certificate selector, although they may
  79324. also choose to provide a certificate from elsewhere. @callback will be called
  79325. when the operation completes. Alternatively the user may abort this certificate
  79326. request, which will usually abort the TLS connection.</doc>
  79327. <return-value transfer-ownership="none">
  79328. <type name="none" c:type="void"/>
  79329. </return-value>
  79330. <parameters>
  79331. <instance-parameter name="interaction" transfer-ownership="none">
  79332. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79333. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79334. </instance-parameter>
  79335. <parameter name="connection" transfer-ownership="none">
  79336. <doc xml:space="preserve">a #GTlsConnection object</doc>
  79337. <type name="TlsConnection" c:type="GTlsConnection*"/>
  79338. </parameter>
  79339. <parameter name="flags" transfer-ownership="none">
  79340. <doc xml:space="preserve">flags providing more information about the request</doc>
  79341. <type name="TlsCertificateRequestFlags"
  79342. c:type="GTlsCertificateRequestFlags"/>
  79343. </parameter>
  79344. <parameter name="cancellable"
  79345. transfer-ownership="none"
  79346. nullable="1"
  79347. allow-none="1">
  79348. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79349. <type name="Cancellable" c:type="GCancellable*"/>
  79350. </parameter>
  79351. <parameter name="callback"
  79352. transfer-ownership="none"
  79353. nullable="1"
  79354. allow-none="1"
  79355. scope="async"
  79356. closure="4">
  79357. <doc xml:space="preserve">will be called when the interaction completes</doc>
  79358. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  79359. </parameter>
  79360. <parameter name="user_data"
  79361. transfer-ownership="none"
  79362. nullable="1"
  79363. allow-none="1"
  79364. closure="4">
  79365. <doc xml:space="preserve">data to pass to the @callback</doc>
  79366. <type name="gpointer" c:type="gpointer"/>
  79367. </parameter>
  79368. </parameters>
  79369. </virtual-method>
  79370. <virtual-method name="request_certificate_finish"
  79371. invoker="request_certificate_finish"
  79372. version="2.40"
  79373. throws="1">
  79374. <doc xml:space="preserve">Complete an request certificate user interaction request. This should be once
  79375. the g_tls_interaction_request_certificate_async() completion callback is called.
  79376. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection
  79377. passed to g_tls_interaction_request_certificate_async() will have had its
  79378. #GTlsConnection:certificate filled in.
  79379. If the interaction is cancelled by the cancellation object, or by the
  79380. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79381. contains a %G_IO_ERROR_CANCELLED error code.</doc>
  79382. <return-value transfer-ownership="none">
  79383. <doc xml:space="preserve">The status of the request certificate interaction.</doc>
  79384. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79385. </return-value>
  79386. <parameters>
  79387. <instance-parameter name="interaction" transfer-ownership="none">
  79388. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79389. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79390. </instance-parameter>
  79391. <parameter name="result" transfer-ownership="none">
  79392. <doc xml:space="preserve">the result passed to the callback</doc>
  79393. <type name="AsyncResult" c:type="GAsyncResult*"/>
  79394. </parameter>
  79395. </parameters>
  79396. </virtual-method>
  79397. <method name="ask_password"
  79398. c:identifier="g_tls_interaction_ask_password"
  79399. version="2.30"
  79400. throws="1">
  79401. <doc xml:space="preserve">Run synchronous interaction to ask the user for a password. In general,
  79402. g_tls_interaction_invoke_ask_password() should be used instead of this
  79403. function.
  79404. Derived subclasses usually implement a password prompt, although they may
  79405. also choose to provide a password from elsewhere. The @password value will
  79406. be filled in and then @callback will be called. Alternatively the user may
  79407. abort this password request, which will usually abort the TLS connection.
  79408. If the interaction is cancelled by the cancellation object, or by the
  79409. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79410. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79411. not support immediate cancellation.</doc>
  79412. <return-value transfer-ownership="none">
  79413. <doc xml:space="preserve">The status of the ask password interaction.</doc>
  79414. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79415. </return-value>
  79416. <parameters>
  79417. <instance-parameter name="interaction" transfer-ownership="none">
  79418. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79419. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79420. </instance-parameter>
  79421. <parameter name="password" transfer-ownership="none">
  79422. <doc xml:space="preserve">a #GTlsPassword object</doc>
  79423. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79424. </parameter>
  79425. <parameter name="cancellable"
  79426. transfer-ownership="none"
  79427. nullable="1"
  79428. allow-none="1">
  79429. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79430. <type name="Cancellable" c:type="GCancellable*"/>
  79431. </parameter>
  79432. </parameters>
  79433. </method>
  79434. <method name="ask_password_async"
  79435. c:identifier="g_tls_interaction_ask_password_async"
  79436. version="2.30">
  79437. <doc xml:space="preserve">Run asynchronous interaction to ask the user for a password. In general,
  79438. g_tls_interaction_invoke_ask_password() should be used instead of this
  79439. function.
  79440. Derived subclasses usually implement a password prompt, although they may
  79441. also choose to provide a password from elsewhere. The @password value will
  79442. be filled in and then @callback will be called. Alternatively the user may
  79443. abort this password request, which will usually abort the TLS connection.
  79444. If the interaction is cancelled by the cancellation object, or by the
  79445. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79446. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79447. not support immediate cancellation.
  79448. Certain implementations may not support immediate cancellation.</doc>
  79449. <return-value transfer-ownership="none">
  79450. <type name="none" c:type="void"/>
  79451. </return-value>
  79452. <parameters>
  79453. <instance-parameter name="interaction" transfer-ownership="none">
  79454. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79455. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79456. </instance-parameter>
  79457. <parameter name="password" transfer-ownership="none">
  79458. <doc xml:space="preserve">a #GTlsPassword object</doc>
  79459. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79460. </parameter>
  79461. <parameter name="cancellable"
  79462. transfer-ownership="none"
  79463. nullable="1"
  79464. allow-none="1">
  79465. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79466. <type name="Cancellable" c:type="GCancellable*"/>
  79467. </parameter>
  79468. <parameter name="callback"
  79469. transfer-ownership="none"
  79470. nullable="1"
  79471. allow-none="1"
  79472. scope="async"
  79473. closure="3">
  79474. <doc xml:space="preserve">will be called when the interaction completes</doc>
  79475. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  79476. </parameter>
  79477. <parameter name="user_data"
  79478. transfer-ownership="none"
  79479. nullable="1"
  79480. allow-none="1">
  79481. <doc xml:space="preserve">data to pass to the @callback</doc>
  79482. <type name="gpointer" c:type="gpointer"/>
  79483. </parameter>
  79484. </parameters>
  79485. </method>
  79486. <method name="ask_password_finish"
  79487. c:identifier="g_tls_interaction_ask_password_finish"
  79488. version="2.30"
  79489. throws="1">
  79490. <doc xml:space="preserve">Complete an ask password user interaction request. This should be once
  79491. the g_tls_interaction_ask_password_async() completion callback is called.
  79492. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed
  79493. to g_tls_interaction_ask_password() will have its password filled in.
  79494. If the interaction is cancelled by the cancellation object, or by the
  79495. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79496. contains a %G_IO_ERROR_CANCELLED error code.</doc>
  79497. <return-value transfer-ownership="none">
  79498. <doc xml:space="preserve">The status of the ask password interaction.</doc>
  79499. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79500. </return-value>
  79501. <parameters>
  79502. <instance-parameter name="interaction" transfer-ownership="none">
  79503. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79504. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79505. </instance-parameter>
  79506. <parameter name="result" transfer-ownership="none">
  79507. <doc xml:space="preserve">the result passed to the callback</doc>
  79508. <type name="AsyncResult" c:type="GAsyncResult*"/>
  79509. </parameter>
  79510. </parameters>
  79511. </method>
  79512. <method name="invoke_ask_password"
  79513. c:identifier="g_tls_interaction_invoke_ask_password"
  79514. version="2.30"
  79515. throws="1">
  79516. <doc xml:space="preserve">Invoke the interaction to ask the user for a password. It invokes this
  79517. interaction in the main loop, specifically the #GMainContext returned by
  79518. g_main_context_get_thread_default() when the interaction is created. This
  79519. is called by called by #GTlsConnection or #GTlsDatabase to ask the user
  79520. for a password.
  79521. Derived subclasses usually implement a password prompt, although they may
  79522. also choose to provide a password from elsewhere. The @password value will
  79523. be filled in and then @callback will be called. Alternatively the user may
  79524. abort this password request, which will usually abort the TLS connection.
  79525. The implementation can either be a synchronous (eg: modal dialog) or an
  79526. asynchronous one (eg: modeless dialog). This function will take care of
  79527. calling which ever one correctly.
  79528. If the interaction is cancelled by the cancellation object, or by the
  79529. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79530. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79531. not support immediate cancellation.</doc>
  79532. <return-value transfer-ownership="none">
  79533. <doc xml:space="preserve">The status of the ask password interaction.</doc>
  79534. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79535. </return-value>
  79536. <parameters>
  79537. <instance-parameter name="interaction" transfer-ownership="none">
  79538. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79539. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79540. </instance-parameter>
  79541. <parameter name="password" transfer-ownership="none">
  79542. <doc xml:space="preserve">a #GTlsPassword object</doc>
  79543. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79544. </parameter>
  79545. <parameter name="cancellable"
  79546. transfer-ownership="none"
  79547. nullable="1"
  79548. allow-none="1">
  79549. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79550. <type name="Cancellable" c:type="GCancellable*"/>
  79551. </parameter>
  79552. </parameters>
  79553. </method>
  79554. <method name="invoke_request_certificate"
  79555. c:identifier="g_tls_interaction_invoke_request_certificate"
  79556. version="2.40"
  79557. throws="1">
  79558. <doc xml:space="preserve">Invoke the interaction to ask the user to choose a certificate to
  79559. use with the connection. It invokes this interaction in the main
  79560. loop, specifically the #GMainContext returned by
  79561. g_main_context_get_thread_default() when the interaction is
  79562. created. This is called by called by #GTlsConnection when the peer
  79563. requests a certificate during the handshake.
  79564. Derived subclasses usually implement a certificate selector,
  79565. although they may also choose to provide a certificate from
  79566. elsewhere. Alternatively the user may abort this certificate
  79567. request, which may or may not abort the TLS connection.
  79568. The implementation can either be a synchronous (eg: modal dialog) or an
  79569. asynchronous one (eg: modeless dialog). This function will take care of
  79570. calling which ever one correctly.
  79571. If the interaction is cancelled by the cancellation object, or by the
  79572. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79573. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79574. not support immediate cancellation.</doc>
  79575. <return-value transfer-ownership="none">
  79576. <doc xml:space="preserve">The status of the certificate request interaction.</doc>
  79577. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79578. </return-value>
  79579. <parameters>
  79580. <instance-parameter name="interaction" transfer-ownership="none">
  79581. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79582. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79583. </instance-parameter>
  79584. <parameter name="connection" transfer-ownership="none">
  79585. <doc xml:space="preserve">a #GTlsConnection object</doc>
  79586. <type name="TlsConnection" c:type="GTlsConnection*"/>
  79587. </parameter>
  79588. <parameter name="flags" transfer-ownership="none">
  79589. <doc xml:space="preserve">flags providing more information about the request</doc>
  79590. <type name="TlsCertificateRequestFlags"
  79591. c:type="GTlsCertificateRequestFlags"/>
  79592. </parameter>
  79593. <parameter name="cancellable"
  79594. transfer-ownership="none"
  79595. nullable="1"
  79596. allow-none="1">
  79597. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79598. <type name="Cancellable" c:type="GCancellable*"/>
  79599. </parameter>
  79600. </parameters>
  79601. </method>
  79602. <method name="request_certificate"
  79603. c:identifier="g_tls_interaction_request_certificate"
  79604. version="2.40"
  79605. throws="1">
  79606. <doc xml:space="preserve">Run synchronous interaction to ask the user to choose a certificate to use
  79607. with the connection. In general, g_tls_interaction_invoke_request_certificate()
  79608. should be used instead of this function.
  79609. Derived subclasses usually implement a certificate selector, although they may
  79610. also choose to provide a certificate from elsewhere. Alternatively the user may
  79611. abort this certificate request, which will usually abort the TLS connection.
  79612. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection
  79613. passed to g_tls_interaction_request_certificate() will have had its
  79614. #GTlsConnection:certificate filled in.
  79615. If the interaction is cancelled by the cancellation object, or by the
  79616. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79617. contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
  79618. not support immediate cancellation.</doc>
  79619. <return-value transfer-ownership="none">
  79620. <doc xml:space="preserve">The status of the request certificate interaction.</doc>
  79621. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79622. </return-value>
  79623. <parameters>
  79624. <instance-parameter name="interaction" transfer-ownership="none">
  79625. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79626. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79627. </instance-parameter>
  79628. <parameter name="connection" transfer-ownership="none">
  79629. <doc xml:space="preserve">a #GTlsConnection object</doc>
  79630. <type name="TlsConnection" c:type="GTlsConnection*"/>
  79631. </parameter>
  79632. <parameter name="flags" transfer-ownership="none">
  79633. <doc xml:space="preserve">flags providing more information about the request</doc>
  79634. <type name="TlsCertificateRequestFlags"
  79635. c:type="GTlsCertificateRequestFlags"/>
  79636. </parameter>
  79637. <parameter name="cancellable"
  79638. transfer-ownership="none"
  79639. nullable="1"
  79640. allow-none="1">
  79641. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79642. <type name="Cancellable" c:type="GCancellable*"/>
  79643. </parameter>
  79644. </parameters>
  79645. </method>
  79646. <method name="request_certificate_async"
  79647. c:identifier="g_tls_interaction_request_certificate_async"
  79648. version="2.40">
  79649. <doc xml:space="preserve">Run asynchronous interaction to ask the user for a certificate to use with
  79650. the connection. In general, g_tls_interaction_invoke_request_certificate() should
  79651. be used instead of this function.
  79652. Derived subclasses usually implement a certificate selector, although they may
  79653. also choose to provide a certificate from elsewhere. @callback will be called
  79654. when the operation completes. Alternatively the user may abort this certificate
  79655. request, which will usually abort the TLS connection.</doc>
  79656. <return-value transfer-ownership="none">
  79657. <type name="none" c:type="void"/>
  79658. </return-value>
  79659. <parameters>
  79660. <instance-parameter name="interaction" transfer-ownership="none">
  79661. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79662. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79663. </instance-parameter>
  79664. <parameter name="connection" transfer-ownership="none">
  79665. <doc xml:space="preserve">a #GTlsConnection object</doc>
  79666. <type name="TlsConnection" c:type="GTlsConnection*"/>
  79667. </parameter>
  79668. <parameter name="flags" transfer-ownership="none">
  79669. <doc xml:space="preserve">flags providing more information about the request</doc>
  79670. <type name="TlsCertificateRequestFlags"
  79671. c:type="GTlsCertificateRequestFlags"/>
  79672. </parameter>
  79673. <parameter name="cancellable"
  79674. transfer-ownership="none"
  79675. nullable="1"
  79676. allow-none="1">
  79677. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79678. <type name="Cancellable" c:type="GCancellable*"/>
  79679. </parameter>
  79680. <parameter name="callback"
  79681. transfer-ownership="none"
  79682. nullable="1"
  79683. allow-none="1"
  79684. scope="async"
  79685. closure="4">
  79686. <doc xml:space="preserve">will be called when the interaction completes</doc>
  79687. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  79688. </parameter>
  79689. <parameter name="user_data"
  79690. transfer-ownership="none"
  79691. nullable="1"
  79692. allow-none="1">
  79693. <doc xml:space="preserve">data to pass to the @callback</doc>
  79694. <type name="gpointer" c:type="gpointer"/>
  79695. </parameter>
  79696. </parameters>
  79697. </method>
  79698. <method name="request_certificate_finish"
  79699. c:identifier="g_tls_interaction_request_certificate_finish"
  79700. version="2.40"
  79701. throws="1">
  79702. <doc xml:space="preserve">Complete an request certificate user interaction request. This should be once
  79703. the g_tls_interaction_request_certificate_async() completion callback is called.
  79704. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection
  79705. passed to g_tls_interaction_request_certificate_async() will have had its
  79706. #GTlsConnection:certificate filled in.
  79707. If the interaction is cancelled by the cancellation object, or by the
  79708. user then %G_TLS_INTERACTION_FAILED will be returned with an error that
  79709. contains a %G_IO_ERROR_CANCELLED error code.</doc>
  79710. <return-value transfer-ownership="none">
  79711. <doc xml:space="preserve">The status of the request certificate interaction.</doc>
  79712. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79713. </return-value>
  79714. <parameters>
  79715. <instance-parameter name="interaction" transfer-ownership="none">
  79716. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79717. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79718. </instance-parameter>
  79719. <parameter name="result" transfer-ownership="none">
  79720. <doc xml:space="preserve">the result passed to the callback</doc>
  79721. <type name="AsyncResult" c:type="GAsyncResult*"/>
  79722. </parameter>
  79723. </parameters>
  79724. </method>
  79725. <field name="parent_instance" readable="0" private="1">
  79726. <type name="GObject.Object" c:type="GObject"/>
  79727. </field>
  79728. <field name="priv" readable="0" private="1">
  79729. <type name="TlsInteractionPrivate" c:type="GTlsInteractionPrivate*"/>
  79730. </field>
  79731. </class>
  79732. <record name="TlsInteractionClass"
  79733. c:type="GTlsInteractionClass"
  79734. glib:is-gtype-struct-for="TlsInteraction"
  79735. version="2.30">
  79736. <doc xml:space="preserve">The class for #GTlsInteraction. Derived classes implement the various
  79737. virtual interaction methods to handle TLS interactions.
  79738. Derived classes can choose to implement whichever interactions methods they'd
  79739. like to support by overriding those virtual methods in their class
  79740. initialization function. If a derived class implements an async method,
  79741. it must also implement the corresponding finish method.
  79742. The synchronous interaction methods should implement to display modal dialogs,
  79743. and the asynchronous methods to display modeless dialogs.
  79744. If the user cancels an interaction, then the result should be
  79745. %G_TLS_INTERACTION_FAILED and the error should be set with a domain of
  79746. %G_IO_ERROR and code of %G_IO_ERROR_CANCELLED.</doc>
  79747. <field name="parent_class" readable="0" private="1">
  79748. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  79749. </field>
  79750. <field name="ask_password">
  79751. <callback name="ask_password" throws="1">
  79752. <return-value transfer-ownership="none">
  79753. <doc xml:space="preserve">The status of the ask password interaction.</doc>
  79754. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79755. </return-value>
  79756. <parameters>
  79757. <parameter name="interaction" transfer-ownership="none">
  79758. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79759. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79760. </parameter>
  79761. <parameter name="password" transfer-ownership="none">
  79762. <doc xml:space="preserve">a #GTlsPassword object</doc>
  79763. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79764. </parameter>
  79765. <parameter name="cancellable"
  79766. transfer-ownership="none"
  79767. nullable="1"
  79768. allow-none="1">
  79769. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79770. <type name="Cancellable" c:type="GCancellable*"/>
  79771. </parameter>
  79772. </parameters>
  79773. </callback>
  79774. </field>
  79775. <field name="ask_password_async">
  79776. <callback name="ask_password_async">
  79777. <return-value transfer-ownership="none">
  79778. <type name="none" c:type="void"/>
  79779. </return-value>
  79780. <parameters>
  79781. <parameter name="interaction" transfer-ownership="none">
  79782. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79783. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79784. </parameter>
  79785. <parameter name="password" transfer-ownership="none">
  79786. <doc xml:space="preserve">a #GTlsPassword object</doc>
  79787. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79788. </parameter>
  79789. <parameter name="cancellable"
  79790. transfer-ownership="none"
  79791. nullable="1"
  79792. allow-none="1">
  79793. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79794. <type name="Cancellable" c:type="GCancellable*"/>
  79795. </parameter>
  79796. <parameter name="callback"
  79797. transfer-ownership="none"
  79798. nullable="1"
  79799. allow-none="1"
  79800. scope="async"
  79801. closure="4">
  79802. <doc xml:space="preserve">will be called when the interaction completes</doc>
  79803. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  79804. </parameter>
  79805. <parameter name="user_data"
  79806. transfer-ownership="none"
  79807. nullable="1"
  79808. allow-none="1"
  79809. closure="4">
  79810. <doc xml:space="preserve">data to pass to the @callback</doc>
  79811. <type name="gpointer" c:type="gpointer"/>
  79812. </parameter>
  79813. </parameters>
  79814. </callback>
  79815. </field>
  79816. <field name="ask_password_finish">
  79817. <callback name="ask_password_finish" throws="1">
  79818. <return-value transfer-ownership="none">
  79819. <doc xml:space="preserve">The status of the ask password interaction.</doc>
  79820. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79821. </return-value>
  79822. <parameters>
  79823. <parameter name="interaction" transfer-ownership="none">
  79824. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79825. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79826. </parameter>
  79827. <parameter name="result" transfer-ownership="none">
  79828. <doc xml:space="preserve">the result passed to the callback</doc>
  79829. <type name="AsyncResult" c:type="GAsyncResult*"/>
  79830. </parameter>
  79831. </parameters>
  79832. </callback>
  79833. </field>
  79834. <field name="request_certificate">
  79835. <callback name="request_certificate" throws="1">
  79836. <return-value transfer-ownership="none">
  79837. <doc xml:space="preserve">The status of the request certificate interaction.</doc>
  79838. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79839. </return-value>
  79840. <parameters>
  79841. <parameter name="interaction" transfer-ownership="none">
  79842. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79843. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79844. </parameter>
  79845. <parameter name="connection" transfer-ownership="none">
  79846. <doc xml:space="preserve">a #GTlsConnection object</doc>
  79847. <type name="TlsConnection" c:type="GTlsConnection*"/>
  79848. </parameter>
  79849. <parameter name="flags" transfer-ownership="none">
  79850. <doc xml:space="preserve">flags providing more information about the request</doc>
  79851. <type name="TlsCertificateRequestFlags"
  79852. c:type="GTlsCertificateRequestFlags"/>
  79853. </parameter>
  79854. <parameter name="cancellable"
  79855. transfer-ownership="none"
  79856. nullable="1"
  79857. allow-none="1">
  79858. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79859. <type name="Cancellable" c:type="GCancellable*"/>
  79860. </parameter>
  79861. </parameters>
  79862. </callback>
  79863. </field>
  79864. <field name="request_certificate_async">
  79865. <callback name="request_certificate_async">
  79866. <return-value transfer-ownership="none">
  79867. <type name="none" c:type="void"/>
  79868. </return-value>
  79869. <parameters>
  79870. <parameter name="interaction" transfer-ownership="none">
  79871. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79872. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79873. </parameter>
  79874. <parameter name="connection" transfer-ownership="none">
  79875. <doc xml:space="preserve">a #GTlsConnection object</doc>
  79876. <type name="TlsConnection" c:type="GTlsConnection*"/>
  79877. </parameter>
  79878. <parameter name="flags" transfer-ownership="none">
  79879. <doc xml:space="preserve">flags providing more information about the request</doc>
  79880. <type name="TlsCertificateRequestFlags"
  79881. c:type="GTlsCertificateRequestFlags"/>
  79882. </parameter>
  79883. <parameter name="cancellable"
  79884. transfer-ownership="none"
  79885. nullable="1"
  79886. allow-none="1">
  79887. <doc xml:space="preserve">an optional #GCancellable cancellation object</doc>
  79888. <type name="Cancellable" c:type="GCancellable*"/>
  79889. </parameter>
  79890. <parameter name="callback"
  79891. transfer-ownership="none"
  79892. nullable="1"
  79893. allow-none="1"
  79894. scope="async"
  79895. closure="5">
  79896. <doc xml:space="preserve">will be called when the interaction completes</doc>
  79897. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  79898. </parameter>
  79899. <parameter name="user_data"
  79900. transfer-ownership="none"
  79901. nullable="1"
  79902. allow-none="1"
  79903. closure="5">
  79904. <doc xml:space="preserve">data to pass to the @callback</doc>
  79905. <type name="gpointer" c:type="gpointer"/>
  79906. </parameter>
  79907. </parameters>
  79908. </callback>
  79909. </field>
  79910. <field name="request_certificate_finish">
  79911. <callback name="request_certificate_finish" throws="1">
  79912. <return-value transfer-ownership="none">
  79913. <doc xml:space="preserve">The status of the request certificate interaction.</doc>
  79914. <type name="TlsInteractionResult" c:type="GTlsInteractionResult"/>
  79915. </return-value>
  79916. <parameters>
  79917. <parameter name="interaction" transfer-ownership="none">
  79918. <doc xml:space="preserve">a #GTlsInteraction object</doc>
  79919. <type name="TlsInteraction" c:type="GTlsInteraction*"/>
  79920. </parameter>
  79921. <parameter name="result" transfer-ownership="none">
  79922. <doc xml:space="preserve">the result passed to the callback</doc>
  79923. <type name="AsyncResult" c:type="GAsyncResult*"/>
  79924. </parameter>
  79925. </parameters>
  79926. </callback>
  79927. </field>
  79928. <field name="padding" readable="0" private="1">
  79929. <array zero-terminated="0" c:type="gpointer" fixed-size="21">
  79930. <type name="gpointer" c:type="gpointer"/>
  79931. </array>
  79932. </field>
  79933. </record>
  79934. <record name="TlsInteractionPrivate"
  79935. c:type="GTlsInteractionPrivate"
  79936. disguised="1">
  79937. </record>
  79938. <enumeration name="TlsInteractionResult"
  79939. version="2.30"
  79940. glib:type-name="GTlsInteractionResult"
  79941. glib:get-type="g_tls_interaction_result_get_type"
  79942. c:type="GTlsInteractionResult">
  79943. <doc xml:space="preserve">#GTlsInteractionResult is returned by various functions in #GTlsInteraction
  79944. when finishing an interaction request.</doc>
  79945. <member name="unhandled"
  79946. value="0"
  79947. c:identifier="G_TLS_INTERACTION_UNHANDLED"
  79948. glib:nick="unhandled">
  79949. <doc xml:space="preserve">The interaction was unhandled (i.e. not
  79950. implemented).</doc>
  79951. </member>
  79952. <member name="handled"
  79953. value="1"
  79954. c:identifier="G_TLS_INTERACTION_HANDLED"
  79955. glib:nick="handled">
  79956. <doc xml:space="preserve">The interaction completed, and resulting data
  79957. is available.</doc>
  79958. </member>
  79959. <member name="failed"
  79960. value="2"
  79961. c:identifier="G_TLS_INTERACTION_FAILED"
  79962. glib:nick="failed">
  79963. <doc xml:space="preserve">The interaction has failed, or was cancelled.
  79964. and the operation should be aborted.</doc>
  79965. </member>
  79966. </enumeration>
  79967. <class name="TlsPassword"
  79968. c:symbol-prefix="tls_password"
  79969. c:type="GTlsPassword"
  79970. version="2.30"
  79971. parent="GObject.Object"
  79972. glib:type-name="GTlsPassword"
  79973. glib:get-type="g_tls_password_get_type"
  79974. glib:type-struct="TlsPasswordClass">
  79975. <doc xml:space="preserve">Holds a password used in TLS.</doc>
  79976. <constructor name="new" c:identifier="g_tls_password_new">
  79977. <doc xml:space="preserve">Create a new #GTlsPassword object.</doc>
  79978. <return-value transfer-ownership="full">
  79979. <doc xml:space="preserve">The newly allocated password object</doc>
  79980. <type name="TlsPassword" c:type="GTlsPassword*"/>
  79981. </return-value>
  79982. <parameters>
  79983. <parameter name="flags" transfer-ownership="none">
  79984. <doc xml:space="preserve">the password flags</doc>
  79985. <type name="TlsPasswordFlags" c:type="GTlsPasswordFlags"/>
  79986. </parameter>
  79987. <parameter name="description" transfer-ownership="none">
  79988. <doc xml:space="preserve">description of what the password is for</doc>
  79989. <type name="utf8" c:type="const gchar*"/>
  79990. </parameter>
  79991. </parameters>
  79992. </constructor>
  79993. <virtual-method name="get_default_warning">
  79994. <return-value transfer-ownership="none">
  79995. <type name="utf8" c:type="const gchar*"/>
  79996. </return-value>
  79997. <parameters>
  79998. <instance-parameter name="password" transfer-ownership="none">
  79999. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80000. </instance-parameter>
  80001. </parameters>
  80002. </virtual-method>
  80003. <virtual-method name="get_value" invoker="get_value" version="2.30">
  80004. <doc xml:space="preserve">Get the password value. If @length is not %NULL then it will be
  80005. filled in with the length of the password value. (Note that the
  80006. password value is not nul-terminated, so you can only pass %NULL
  80007. for @length in contexts where you know the password will have a
  80008. certain fixed length.)</doc>
  80009. <return-value transfer-ownership="none">
  80010. <doc xml:space="preserve">The password value (owned by the password object).</doc>
  80011. <type name="guint8" c:type="const guchar*"/>
  80012. </return-value>
  80013. <parameters>
  80014. <instance-parameter name="password" transfer-ownership="none">
  80015. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80016. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80017. </instance-parameter>
  80018. <parameter name="length"
  80019. transfer-ownership="none"
  80020. nullable="1"
  80021. allow-none="1">
  80022. <doc xml:space="preserve">location to place the length of the password.</doc>
  80023. <type name="gsize" c:type="gsize*"/>
  80024. </parameter>
  80025. </parameters>
  80026. </virtual-method>
  80027. <virtual-method name="set_value" invoker="set_value_full" version="2.30">
  80028. <doc xml:space="preserve">Provide the value for this password.
  80029. The @value will be owned by the password object, and later freed using
  80030. the @destroy function callback.
  80031. Specify the @length, for a non-nul-terminated password. Pass -1 as
  80032. @length if using a nul-terminated password, and @length will be
  80033. calculated automatically. (Note that the terminating nul is not
  80034. considered part of the password in this case.)</doc>
  80035. <return-value transfer-ownership="none">
  80036. <type name="none" c:type="void"/>
  80037. </return-value>
  80038. <parameters>
  80039. <instance-parameter name="password" transfer-ownership="none">
  80040. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80041. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80042. </instance-parameter>
  80043. <parameter name="value" transfer-ownership="none">
  80044. <doc xml:space="preserve">the value for the password</doc>
  80045. <type name="guint8" c:type="guchar*"/>
  80046. </parameter>
  80047. <parameter name="length" transfer-ownership="none">
  80048. <doc xml:space="preserve">the length of the password, or -1</doc>
  80049. <type name="gssize" c:type="gssize"/>
  80050. </parameter>
  80051. <parameter name="destroy"
  80052. transfer-ownership="none"
  80053. nullable="1"
  80054. allow-none="1"
  80055. scope="async">
  80056. <doc xml:space="preserve">a function to use to free the password.</doc>
  80057. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  80058. </parameter>
  80059. </parameters>
  80060. </virtual-method>
  80061. <method name="get_description"
  80062. c:identifier="g_tls_password_get_description"
  80063. version="2.30">
  80064. <doc xml:space="preserve">Get a description string about what the password will be used for.</doc>
  80065. <return-value transfer-ownership="none">
  80066. <doc xml:space="preserve">The description of the password.</doc>
  80067. <type name="utf8" c:type="const gchar*"/>
  80068. </return-value>
  80069. <parameters>
  80070. <instance-parameter name="password" transfer-ownership="none">
  80071. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80072. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80073. </instance-parameter>
  80074. </parameters>
  80075. </method>
  80076. <method name="get_flags"
  80077. c:identifier="g_tls_password_get_flags"
  80078. version="2.30">
  80079. <doc xml:space="preserve">Get flags about the password.</doc>
  80080. <return-value transfer-ownership="none">
  80081. <doc xml:space="preserve">The flags about the password.</doc>
  80082. <type name="TlsPasswordFlags" c:type="GTlsPasswordFlags"/>
  80083. </return-value>
  80084. <parameters>
  80085. <instance-parameter name="password" transfer-ownership="none">
  80086. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80087. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80088. </instance-parameter>
  80089. </parameters>
  80090. </method>
  80091. <method name="get_value"
  80092. c:identifier="g_tls_password_get_value"
  80093. version="2.30">
  80094. <doc xml:space="preserve">Get the password value. If @length is not %NULL then it will be
  80095. filled in with the length of the password value. (Note that the
  80096. password value is not nul-terminated, so you can only pass %NULL
  80097. for @length in contexts where you know the password will have a
  80098. certain fixed length.)</doc>
  80099. <return-value transfer-ownership="none">
  80100. <doc xml:space="preserve">The password value (owned by the password object).</doc>
  80101. <type name="guint8" c:type="const guchar*"/>
  80102. </return-value>
  80103. <parameters>
  80104. <instance-parameter name="password" transfer-ownership="none">
  80105. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80106. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80107. </instance-parameter>
  80108. <parameter name="length"
  80109. transfer-ownership="none"
  80110. nullable="1"
  80111. allow-none="1">
  80112. <doc xml:space="preserve">location to place the length of the password.</doc>
  80113. <type name="gsize" c:type="gsize*"/>
  80114. </parameter>
  80115. </parameters>
  80116. </method>
  80117. <method name="get_warning"
  80118. c:identifier="g_tls_password_get_warning"
  80119. version="2.30">
  80120. <doc xml:space="preserve">Get a user readable translated warning. Usually this warning is a
  80121. representation of the password flags returned from
  80122. g_tls_password_get_flags().</doc>
  80123. <return-value transfer-ownership="none">
  80124. <doc xml:space="preserve">The warning.</doc>
  80125. <type name="utf8" c:type="const gchar*"/>
  80126. </return-value>
  80127. <parameters>
  80128. <instance-parameter name="password" transfer-ownership="none">
  80129. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80130. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80131. </instance-parameter>
  80132. </parameters>
  80133. </method>
  80134. <method name="set_description"
  80135. c:identifier="g_tls_password_set_description"
  80136. version="2.30">
  80137. <doc xml:space="preserve">Set a description string about what the password will be used for.</doc>
  80138. <return-value transfer-ownership="none">
  80139. <type name="none" c:type="void"/>
  80140. </return-value>
  80141. <parameters>
  80142. <instance-parameter name="password" transfer-ownership="none">
  80143. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80144. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80145. </instance-parameter>
  80146. <parameter name="description" transfer-ownership="none">
  80147. <doc xml:space="preserve">The description of the password</doc>
  80148. <type name="utf8" c:type="const gchar*"/>
  80149. </parameter>
  80150. </parameters>
  80151. </method>
  80152. <method name="set_flags"
  80153. c:identifier="g_tls_password_set_flags"
  80154. version="2.30">
  80155. <doc xml:space="preserve">Set flags about the password.</doc>
  80156. <return-value transfer-ownership="none">
  80157. <type name="none" c:type="void"/>
  80158. </return-value>
  80159. <parameters>
  80160. <instance-parameter name="password" transfer-ownership="none">
  80161. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80162. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80163. </instance-parameter>
  80164. <parameter name="flags" transfer-ownership="none">
  80165. <doc xml:space="preserve">The flags about the password</doc>
  80166. <type name="TlsPasswordFlags" c:type="GTlsPasswordFlags"/>
  80167. </parameter>
  80168. </parameters>
  80169. </method>
  80170. <method name="set_value"
  80171. c:identifier="g_tls_password_set_value"
  80172. version="2.30">
  80173. <doc xml:space="preserve">Set the value for this password. The @value will be copied by the password
  80174. object.
  80175. Specify the @length, for a non-nul-terminated password. Pass -1 as
  80176. @length if using a nul-terminated password, and @length will be
  80177. calculated automatically. (Note that the terminating nul is not
  80178. considered part of the password in this case.)</doc>
  80179. <return-value transfer-ownership="none">
  80180. <type name="none" c:type="void"/>
  80181. </return-value>
  80182. <parameters>
  80183. <instance-parameter name="password" transfer-ownership="none">
  80184. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80185. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80186. </instance-parameter>
  80187. <parameter name="value" transfer-ownership="none">
  80188. <doc xml:space="preserve">the new password value</doc>
  80189. <type name="guint8" c:type="const guchar*"/>
  80190. </parameter>
  80191. <parameter name="length" transfer-ownership="none">
  80192. <doc xml:space="preserve">the length of the password, or -1</doc>
  80193. <type name="gssize" c:type="gssize"/>
  80194. </parameter>
  80195. </parameters>
  80196. </method>
  80197. <method name="set_value_full"
  80198. c:identifier="g_tls_password_set_value_full"
  80199. version="2.30">
  80200. <doc xml:space="preserve">Provide the value for this password.
  80201. The @value will be owned by the password object, and later freed using
  80202. the @destroy function callback.
  80203. Specify the @length, for a non-nul-terminated password. Pass -1 as
  80204. @length if using a nul-terminated password, and @length will be
  80205. calculated automatically. (Note that the terminating nul is not
  80206. considered part of the password in this case.)</doc>
  80207. <return-value transfer-ownership="none">
  80208. <type name="none" c:type="void"/>
  80209. </return-value>
  80210. <parameters>
  80211. <instance-parameter name="password" transfer-ownership="none">
  80212. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80213. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80214. </instance-parameter>
  80215. <parameter name="value" transfer-ownership="none">
  80216. <doc xml:space="preserve">the value for the password</doc>
  80217. <type name="guint8" c:type="guchar*"/>
  80218. </parameter>
  80219. <parameter name="length" transfer-ownership="none">
  80220. <doc xml:space="preserve">the length of the password, or -1</doc>
  80221. <type name="gssize" c:type="gssize"/>
  80222. </parameter>
  80223. <parameter name="destroy"
  80224. transfer-ownership="none"
  80225. nullable="1"
  80226. allow-none="1"
  80227. scope="async">
  80228. <doc xml:space="preserve">a function to use to free the password.</doc>
  80229. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  80230. </parameter>
  80231. </parameters>
  80232. </method>
  80233. <method name="set_warning"
  80234. c:identifier="g_tls_password_set_warning"
  80235. version="2.30">
  80236. <doc xml:space="preserve">Set a user readable translated warning. Usually this warning is a
  80237. representation of the password flags returned from
  80238. g_tls_password_get_flags().</doc>
  80239. <return-value transfer-ownership="none">
  80240. <type name="none" c:type="void"/>
  80241. </return-value>
  80242. <parameters>
  80243. <instance-parameter name="password" transfer-ownership="none">
  80244. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80245. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80246. </instance-parameter>
  80247. <parameter name="warning" transfer-ownership="none">
  80248. <doc xml:space="preserve">The user readable warning</doc>
  80249. <type name="utf8" c:type="const gchar*"/>
  80250. </parameter>
  80251. </parameters>
  80252. </method>
  80253. <property name="description" writable="1" transfer-ownership="none">
  80254. <type name="utf8" c:type="gchar*"/>
  80255. </property>
  80256. <property name="flags" writable="1" transfer-ownership="none">
  80257. <type name="TlsPasswordFlags"/>
  80258. </property>
  80259. <property name="warning" writable="1" transfer-ownership="none">
  80260. <type name="utf8" c:type="gchar*"/>
  80261. </property>
  80262. <field name="parent_instance">
  80263. <type name="GObject.Object" c:type="GObject"/>
  80264. </field>
  80265. <field name="priv">
  80266. <type name="TlsPasswordPrivate" c:type="GTlsPasswordPrivate*"/>
  80267. </field>
  80268. </class>
  80269. <record name="TlsPasswordClass"
  80270. c:type="GTlsPasswordClass"
  80271. glib:is-gtype-struct-for="TlsPassword">
  80272. <doc xml:space="preserve">Class structure for #GTlsPassword.</doc>
  80273. <field name="parent_class">
  80274. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  80275. </field>
  80276. <field name="get_value">
  80277. <callback name="get_value">
  80278. <return-value transfer-ownership="none">
  80279. <doc xml:space="preserve">The password value (owned by the password object).</doc>
  80280. <type name="guint8" c:type="const guchar*"/>
  80281. </return-value>
  80282. <parameters>
  80283. <parameter name="password" transfer-ownership="none">
  80284. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80285. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80286. </parameter>
  80287. <parameter name="length"
  80288. transfer-ownership="none"
  80289. nullable="1"
  80290. allow-none="1">
  80291. <doc xml:space="preserve">location to place the length of the password.</doc>
  80292. <type name="gsize" c:type="gsize*"/>
  80293. </parameter>
  80294. </parameters>
  80295. </callback>
  80296. </field>
  80297. <field name="set_value">
  80298. <callback name="set_value">
  80299. <return-value transfer-ownership="none">
  80300. <type name="none" c:type="void"/>
  80301. </return-value>
  80302. <parameters>
  80303. <parameter name="password" transfer-ownership="none">
  80304. <doc xml:space="preserve">a #GTlsPassword object</doc>
  80305. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80306. </parameter>
  80307. <parameter name="value" transfer-ownership="none">
  80308. <doc xml:space="preserve">the value for the password</doc>
  80309. <type name="guint8" c:type="guchar*"/>
  80310. </parameter>
  80311. <parameter name="length" transfer-ownership="none">
  80312. <doc xml:space="preserve">the length of the password, or -1</doc>
  80313. <type name="gssize" c:type="gssize"/>
  80314. </parameter>
  80315. <parameter name="destroy"
  80316. transfer-ownership="none"
  80317. nullable="1"
  80318. allow-none="1"
  80319. scope="async">
  80320. <doc xml:space="preserve">a function to use to free the password.</doc>
  80321. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  80322. </parameter>
  80323. </parameters>
  80324. </callback>
  80325. </field>
  80326. <field name="get_default_warning">
  80327. <callback name="get_default_warning">
  80328. <return-value transfer-ownership="none">
  80329. <type name="utf8" c:type="const gchar*"/>
  80330. </return-value>
  80331. <parameters>
  80332. <parameter name="password" transfer-ownership="none">
  80333. <type name="TlsPassword" c:type="GTlsPassword*"/>
  80334. </parameter>
  80335. </parameters>
  80336. </callback>
  80337. </field>
  80338. <field name="padding" readable="0" private="1">
  80339. <array zero-terminated="0" c:type="gpointer" fixed-size="4">
  80340. <type name="gpointer" c:type="gpointer"/>
  80341. </array>
  80342. </field>
  80343. </record>
  80344. <bitfield name="TlsPasswordFlags"
  80345. version="2.30"
  80346. glib:type-name="GTlsPasswordFlags"
  80347. glib:get-type="g_tls_password_flags_get_type"
  80348. c:type="GTlsPasswordFlags">
  80349. <doc xml:space="preserve">Various flags for the password.</doc>
  80350. <member name="none"
  80351. value="0"
  80352. c:identifier="G_TLS_PASSWORD_NONE"
  80353. glib:nick="none">
  80354. <doc xml:space="preserve">No flags</doc>
  80355. </member>
  80356. <member name="retry"
  80357. value="2"
  80358. c:identifier="G_TLS_PASSWORD_RETRY"
  80359. glib:nick="retry">
  80360. <doc xml:space="preserve">The password was wrong, and the user should retry.</doc>
  80361. </member>
  80362. <member name="many_tries"
  80363. value="4"
  80364. c:identifier="G_TLS_PASSWORD_MANY_TRIES"
  80365. glib:nick="many-tries">
  80366. <doc xml:space="preserve">Hint to the user that the password has been
  80367. wrong many times, and the user may not have many chances left.</doc>
  80368. </member>
  80369. <member name="final_try"
  80370. value="8"
  80371. c:identifier="G_TLS_PASSWORD_FINAL_TRY"
  80372. glib:nick="final-try">
  80373. <doc xml:space="preserve">Hint to the user that this is the last try to get
  80374. this password right.</doc>
  80375. </member>
  80376. </bitfield>
  80377. <record name="TlsPasswordPrivate"
  80378. c:type="GTlsPasswordPrivate"
  80379. disguised="1">
  80380. </record>
  80381. <enumeration name="TlsRehandshakeMode"
  80382. version="2.28"
  80383. glib:type-name="GTlsRehandshakeMode"
  80384. glib:get-type="g_tls_rehandshake_mode_get_type"
  80385. c:type="GTlsRehandshakeMode">
  80386. <doc xml:space="preserve">When to allow rehandshaking. See
  80387. g_tls_connection_set_rehandshake_mode().</doc>
  80388. <member name="never"
  80389. value="0"
  80390. c:identifier="G_TLS_REHANDSHAKE_NEVER"
  80391. glib:nick="never">
  80392. <doc xml:space="preserve">Never allow rehandshaking</doc>
  80393. </member>
  80394. <member name="safely"
  80395. value="1"
  80396. c:identifier="G_TLS_REHANDSHAKE_SAFELY"
  80397. glib:nick="safely">
  80398. <doc xml:space="preserve">Allow safe rehandshaking only</doc>
  80399. </member>
  80400. <member name="unsafely"
  80401. value="2"
  80402. c:identifier="G_TLS_REHANDSHAKE_UNSAFELY"
  80403. glib:nick="unsafely">
  80404. <doc xml:space="preserve">Allow unsafe rehandshaking</doc>
  80405. </member>
  80406. </enumeration>
  80407. <interface name="TlsServerConnection"
  80408. c:symbol-prefix="tls_server_connection"
  80409. c:type="GTlsServerConnection"
  80410. version="2.28"
  80411. glib:type-name="GTlsServerConnection"
  80412. glib:get-type="g_tls_server_connection_get_type"
  80413. glib:type-struct="TlsServerConnectionInterface">
  80414. <doc xml:space="preserve">#GTlsServerConnection is the server-side subclass of #GTlsConnection,
  80415. representing a server-side TLS connection.</doc>
  80416. <prerequisite name="TlsConnection"/>
  80417. <function name="new"
  80418. c:identifier="g_tls_server_connection_new"
  80419. version="2.28"
  80420. throws="1">
  80421. <doc xml:space="preserve">Creates a new #GTlsServerConnection wrapping @base_io_stream (which
  80422. must have pollable input and output streams).
  80423. See the documentation for #GTlsConnection:base-io-stream for restrictions
  80424. on when application code can run operations on the @base_io_stream after
  80425. this function has returned.</doc>
  80426. <return-value transfer-ownership="full">
  80427. <doc xml:space="preserve">the new
  80428. #GTlsServerConnection, or %NULL on error</doc>
  80429. <type name="TlsServerConnection" c:type="GIOStream*"/>
  80430. </return-value>
  80431. <parameters>
  80432. <parameter name="base_io_stream" transfer-ownership="none">
  80433. <doc xml:space="preserve">the #GIOStream to wrap</doc>
  80434. <type name="IOStream" c:type="GIOStream*"/>
  80435. </parameter>
  80436. <parameter name="certificate"
  80437. transfer-ownership="none"
  80438. nullable="1"
  80439. allow-none="1">
  80440. <doc xml:space="preserve">the default server certificate, or %NULL</doc>
  80441. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  80442. </parameter>
  80443. </parameters>
  80444. </function>
  80445. <property name="authentication-mode"
  80446. version="2.28"
  80447. writable="1"
  80448. transfer-ownership="none">
  80449. <doc xml:space="preserve">The #GTlsAuthenticationMode for the server. This can be changed
  80450. before calling g_tls_connection_handshake() if you want to
  80451. rehandshake with a different mode from the initial handshake.</doc>
  80452. <type name="TlsAuthenticationMode"/>
  80453. </property>
  80454. </interface>
  80455. <record name="TlsServerConnectionInterface"
  80456. c:type="GTlsServerConnectionInterface"
  80457. glib:is-gtype-struct-for="TlsServerConnection"
  80458. version="2.26">
  80459. <doc xml:space="preserve">vtable for a #GTlsServerConnection implementation.</doc>
  80460. <field name="g_iface">
  80461. <doc xml:space="preserve">The parent interface.</doc>
  80462. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  80463. </field>
  80464. </record>
  80465. <class name="UnixConnection"
  80466. c:symbol-prefix="unix_connection"
  80467. c:type="GUnixConnection"
  80468. parent="SocketConnection"
  80469. glib:type-name="GUnixConnection"
  80470. glib:get-type="g_unix_connection_get_type"
  80471. glib:type-struct="UnixConnectionClass">
  80472. <doc xml:space="preserve">This is the subclass of #GSocketConnection that is created
  80473. for UNIX domain sockets.
  80474. It contains functions to do some of the UNIX socket specific
  80475. functionality like passing file descriptors.
  80476. Note that `&lt;gio/gunixconnection.h&gt;` belongs to the UNIX-specific
  80477. GIO interfaces, thus you have to use the `gio-unix-2.0.pc`
  80478. pkg-config file when using it.</doc>
  80479. <method name="receive_credentials"
  80480. c:identifier="g_unix_connection_receive_credentials"
  80481. version="2.26"
  80482. throws="1">
  80483. <doc xml:space="preserve">Receives credentials from the sending end of the connection. The
  80484. sending end has to call g_unix_connection_send_credentials() (or
  80485. similar) for this to work.
  80486. As well as reading the credentials this also reads (and discards) a
  80487. single byte from the stream, as this is required for credentials
  80488. passing to work on some implementations.
  80489. Other ways to exchange credentials with a foreign peer includes the
  80490. #GUnixCredentialsMessage type and g_socket_get_credentials() function.</doc>
  80491. <return-value transfer-ownership="full">
  80492. <doc xml:space="preserve">Received credentials on success (free with
  80493. g_object_unref()), %NULL if @error is set.</doc>
  80494. <type name="Credentials" c:type="GCredentials*"/>
  80495. </return-value>
  80496. <parameters>
  80497. <instance-parameter name="connection" transfer-ownership="none">
  80498. <doc xml:space="preserve">A #GUnixConnection.</doc>
  80499. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80500. </instance-parameter>
  80501. <parameter name="cancellable"
  80502. transfer-ownership="none"
  80503. nullable="1"
  80504. allow-none="1">
  80505. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  80506. <type name="Cancellable" c:type="GCancellable*"/>
  80507. </parameter>
  80508. </parameters>
  80509. </method>
  80510. <method name="receive_credentials_async"
  80511. c:identifier="g_unix_connection_receive_credentials_async"
  80512. version="2.32">
  80513. <doc xml:space="preserve">Asynchronously receive credentials.
  80514. For more details, see g_unix_connection_receive_credentials() which is
  80515. the synchronous version of this call.
  80516. When the operation is finished, @callback will be called. You can then call
  80517. g_unix_connection_receive_credentials_finish() to get the result of the operation.</doc>
  80518. <return-value transfer-ownership="none">
  80519. <type name="none" c:type="void"/>
  80520. </return-value>
  80521. <parameters>
  80522. <instance-parameter name="connection" transfer-ownership="none">
  80523. <doc xml:space="preserve">A #GUnixConnection.</doc>
  80524. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80525. </instance-parameter>
  80526. <parameter name="cancellable"
  80527. transfer-ownership="none"
  80528. nullable="1"
  80529. allow-none="1">
  80530. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  80531. <type name="Cancellable" c:type="GCancellable*"/>
  80532. </parameter>
  80533. <parameter name="callback"
  80534. transfer-ownership="none"
  80535. nullable="1"
  80536. allow-none="1"
  80537. scope="async"
  80538. closure="2">
  80539. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  80540. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  80541. </parameter>
  80542. <parameter name="user_data"
  80543. transfer-ownership="none"
  80544. nullable="1"
  80545. allow-none="1">
  80546. <doc xml:space="preserve">the data to pass to callback function</doc>
  80547. <type name="gpointer" c:type="gpointer"/>
  80548. </parameter>
  80549. </parameters>
  80550. </method>
  80551. <method name="receive_credentials_finish"
  80552. c:identifier="g_unix_connection_receive_credentials_finish"
  80553. version="2.32"
  80554. throws="1">
  80555. <doc xml:space="preserve">Finishes an asynchronous receive credentials operation started with
  80556. g_unix_connection_receive_credentials_async().</doc>
  80557. <return-value transfer-ownership="full">
  80558. <doc xml:space="preserve">a #GCredentials, or %NULL on error.
  80559. Free the returned object with g_object_unref().</doc>
  80560. <type name="Credentials" c:type="GCredentials*"/>
  80561. </return-value>
  80562. <parameters>
  80563. <instance-parameter name="connection" transfer-ownership="none">
  80564. <doc xml:space="preserve">A #GUnixConnection.</doc>
  80565. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80566. </instance-parameter>
  80567. <parameter name="result" transfer-ownership="none">
  80568. <doc xml:space="preserve">a #GAsyncResult.</doc>
  80569. <type name="AsyncResult" c:type="GAsyncResult*"/>
  80570. </parameter>
  80571. </parameters>
  80572. </method>
  80573. <method name="receive_fd"
  80574. c:identifier="g_unix_connection_receive_fd"
  80575. version="2.22"
  80576. throws="1">
  80577. <doc xml:space="preserve">Receives a file descriptor from the sending end of the connection.
  80578. The sending end has to call g_unix_connection_send_fd() for this
  80579. to work.
  80580. As well as reading the fd this also reads a single byte from the
  80581. stream, as this is required for fd passing to work on some
  80582. implementations.</doc>
  80583. <return-value transfer-ownership="none">
  80584. <doc xml:space="preserve">a file descriptor on success, -1 on error.</doc>
  80585. <type name="gint" c:type="gint"/>
  80586. </return-value>
  80587. <parameters>
  80588. <instance-parameter name="connection" transfer-ownership="none">
  80589. <doc xml:space="preserve">a #GUnixConnection</doc>
  80590. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80591. </instance-parameter>
  80592. <parameter name="cancellable"
  80593. transfer-ownership="none"
  80594. nullable="1"
  80595. allow-none="1">
  80596. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  80597. <type name="Cancellable" c:type="GCancellable*"/>
  80598. </parameter>
  80599. </parameters>
  80600. </method>
  80601. <method name="send_credentials"
  80602. c:identifier="g_unix_connection_send_credentials"
  80603. version="2.26"
  80604. throws="1">
  80605. <doc xml:space="preserve">Passes the credentials of the current user the receiving side
  80606. of the connection. The receiving end has to call
  80607. g_unix_connection_receive_credentials() (or similar) to accept the
  80608. credentials.
  80609. As well as sending the credentials this also writes a single NUL
  80610. byte to the stream, as this is required for credentials passing to
  80611. work on some implementations.
  80612. Other ways to exchange credentials with a foreign peer includes the
  80613. #GUnixCredentialsMessage type and g_socket_get_credentials() function.</doc>
  80614. <return-value transfer-ownership="none">
  80615. <doc xml:space="preserve">%TRUE on success, %FALSE if @error is set.</doc>
  80616. <type name="gboolean" c:type="gboolean"/>
  80617. </return-value>
  80618. <parameters>
  80619. <instance-parameter name="connection" transfer-ownership="none">
  80620. <doc xml:space="preserve">A #GUnixConnection.</doc>
  80621. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80622. </instance-parameter>
  80623. <parameter name="cancellable"
  80624. transfer-ownership="none"
  80625. nullable="1"
  80626. allow-none="1">
  80627. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  80628. <type name="Cancellable" c:type="GCancellable*"/>
  80629. </parameter>
  80630. </parameters>
  80631. </method>
  80632. <method name="send_credentials_async"
  80633. c:identifier="g_unix_connection_send_credentials_async"
  80634. version="2.32">
  80635. <doc xml:space="preserve">Asynchronously send credentials.
  80636. For more details, see g_unix_connection_send_credentials() which is
  80637. the synchronous version of this call.
  80638. When the operation is finished, @callback will be called. You can then call
  80639. g_unix_connection_send_credentials_finish() to get the result of the operation.</doc>
  80640. <return-value transfer-ownership="none">
  80641. <type name="none" c:type="void"/>
  80642. </return-value>
  80643. <parameters>
  80644. <instance-parameter name="connection" transfer-ownership="none">
  80645. <doc xml:space="preserve">A #GUnixConnection.</doc>
  80646. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80647. </instance-parameter>
  80648. <parameter name="cancellable"
  80649. transfer-ownership="none"
  80650. nullable="1"
  80651. allow-none="1">
  80652. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  80653. <type name="Cancellable" c:type="GCancellable*"/>
  80654. </parameter>
  80655. <parameter name="callback"
  80656. transfer-ownership="none"
  80657. nullable="1"
  80658. allow-none="1"
  80659. scope="async"
  80660. closure="2">
  80661. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  80662. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  80663. </parameter>
  80664. <parameter name="user_data"
  80665. transfer-ownership="none"
  80666. nullable="1"
  80667. allow-none="1">
  80668. <doc xml:space="preserve">the data to pass to callback function</doc>
  80669. <type name="gpointer" c:type="gpointer"/>
  80670. </parameter>
  80671. </parameters>
  80672. </method>
  80673. <method name="send_credentials_finish"
  80674. c:identifier="g_unix_connection_send_credentials_finish"
  80675. version="2.32"
  80676. throws="1">
  80677. <doc xml:space="preserve">Finishes an asynchronous send credentials operation started with
  80678. g_unix_connection_send_credentials_async().</doc>
  80679. <return-value transfer-ownership="none">
  80680. <doc xml:space="preserve">%TRUE if the operation was successful, otherwise %FALSE.</doc>
  80681. <type name="gboolean" c:type="gboolean"/>
  80682. </return-value>
  80683. <parameters>
  80684. <instance-parameter name="connection" transfer-ownership="none">
  80685. <doc xml:space="preserve">A #GUnixConnection.</doc>
  80686. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80687. </instance-parameter>
  80688. <parameter name="result" transfer-ownership="none">
  80689. <doc xml:space="preserve">a #GAsyncResult.</doc>
  80690. <type name="AsyncResult" c:type="GAsyncResult*"/>
  80691. </parameter>
  80692. </parameters>
  80693. </method>
  80694. <method name="send_fd"
  80695. c:identifier="g_unix_connection_send_fd"
  80696. version="2.22"
  80697. throws="1">
  80698. <doc xml:space="preserve">Passes a file descriptor to the receiving side of the
  80699. connection. The receiving end has to call g_unix_connection_receive_fd()
  80700. to accept the file descriptor.
  80701. As well as sending the fd this also writes a single byte to the
  80702. stream, as this is required for fd passing to work on some
  80703. implementations.</doc>
  80704. <return-value transfer-ownership="none">
  80705. <doc xml:space="preserve">a %TRUE on success, %NULL on error.</doc>
  80706. <type name="gboolean" c:type="gboolean"/>
  80707. </return-value>
  80708. <parameters>
  80709. <instance-parameter name="connection" transfer-ownership="none">
  80710. <doc xml:space="preserve">a #GUnixConnection</doc>
  80711. <type name="UnixConnection" c:type="GUnixConnection*"/>
  80712. </instance-parameter>
  80713. <parameter name="fd" transfer-ownership="none">
  80714. <doc xml:space="preserve">a file descriptor</doc>
  80715. <type name="gint" c:type="gint"/>
  80716. </parameter>
  80717. <parameter name="cancellable"
  80718. transfer-ownership="none"
  80719. nullable="1"
  80720. allow-none="1">
  80721. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  80722. <type name="Cancellable" c:type="GCancellable*"/>
  80723. </parameter>
  80724. </parameters>
  80725. </method>
  80726. <field name="parent_instance">
  80727. <type name="SocketConnection" c:type="GSocketConnection"/>
  80728. </field>
  80729. <field name="priv">
  80730. <type name="UnixConnectionPrivate" c:type="GUnixConnectionPrivate*"/>
  80731. </field>
  80732. </class>
  80733. <record name="UnixConnectionClass"
  80734. c:type="GUnixConnectionClass"
  80735. glib:is-gtype-struct-for="UnixConnection">
  80736. <field name="parent_class">
  80737. <type name="SocketConnectionClass" c:type="GSocketConnectionClass"/>
  80738. </field>
  80739. </record>
  80740. <record name="UnixConnectionPrivate"
  80741. c:type="GUnixConnectionPrivate"
  80742. disguised="1">
  80743. </record>
  80744. <class name="UnixCredentialsMessage"
  80745. c:symbol-prefix="unix_credentials_message"
  80746. c:type="GUnixCredentialsMessage"
  80747. version="2.26"
  80748. parent="SocketControlMessage"
  80749. glib:type-name="GUnixCredentialsMessage"
  80750. glib:get-type="g_unix_credentials_message_get_type"
  80751. glib:type-struct="UnixCredentialsMessageClass">
  80752. <doc xml:space="preserve">This #GSocketControlMessage contains a #GCredentials instance. It
  80753. may be sent using g_socket_send_message() and received using
  80754. g_socket_receive_message() over UNIX sockets (ie: sockets in the
  80755. %G_SOCKET_FAMILY_UNIX family).
  80756. For an easier way to send and receive credentials over
  80757. stream-oriented UNIX sockets, see
  80758. g_unix_connection_send_credentials() and
  80759. g_unix_connection_receive_credentials(). To receive credentials of
  80760. a foreign process connected to a socket, use
  80761. g_socket_get_credentials().</doc>
  80762. <constructor name="new"
  80763. c:identifier="g_unix_credentials_message_new"
  80764. version="2.26">
  80765. <doc xml:space="preserve">Creates a new #GUnixCredentialsMessage with credentials matching the current processes.</doc>
  80766. <return-value transfer-ownership="full">
  80767. <doc xml:space="preserve">a new #GUnixCredentialsMessage</doc>
  80768. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  80769. </return-value>
  80770. </constructor>
  80771. <constructor name="new_with_credentials"
  80772. c:identifier="g_unix_credentials_message_new_with_credentials"
  80773. version="2.26">
  80774. <doc xml:space="preserve">Creates a new #GUnixCredentialsMessage holding @credentials.</doc>
  80775. <return-value transfer-ownership="full">
  80776. <doc xml:space="preserve">a new #GUnixCredentialsMessage</doc>
  80777. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  80778. </return-value>
  80779. <parameters>
  80780. <parameter name="credentials" transfer-ownership="none">
  80781. <doc xml:space="preserve">A #GCredentials object.</doc>
  80782. <type name="Credentials" c:type="GCredentials*"/>
  80783. </parameter>
  80784. </parameters>
  80785. </constructor>
  80786. <function name="is_supported"
  80787. c:identifier="g_unix_credentials_message_is_supported"
  80788. version="2.26">
  80789. <doc xml:space="preserve">Checks if passing #GCredentials on a #GSocket is supported on this platform.</doc>
  80790. <return-value transfer-ownership="none">
  80791. <doc xml:space="preserve">%TRUE if supported, %FALSE otherwise</doc>
  80792. <type name="gboolean" c:type="gboolean"/>
  80793. </return-value>
  80794. </function>
  80795. <method name="get_credentials"
  80796. c:identifier="g_unix_credentials_message_get_credentials"
  80797. version="2.26">
  80798. <doc xml:space="preserve">Gets the credentials stored in @message.</doc>
  80799. <return-value transfer-ownership="none">
  80800. <doc xml:space="preserve">A #GCredentials instance. Do not free, it is owned by @message.</doc>
  80801. <type name="Credentials" c:type="GCredentials*"/>
  80802. </return-value>
  80803. <parameters>
  80804. <instance-parameter name="message" transfer-ownership="none">
  80805. <doc xml:space="preserve">A #GUnixCredentialsMessage.</doc>
  80806. <type name="UnixCredentialsMessage"
  80807. c:type="GUnixCredentialsMessage*"/>
  80808. </instance-parameter>
  80809. </parameters>
  80810. </method>
  80811. <property name="credentials"
  80812. version="2.26"
  80813. writable="1"
  80814. construct-only="1"
  80815. transfer-ownership="none">
  80816. <doc xml:space="preserve">The credentials stored in the message.</doc>
  80817. <type name="Credentials"/>
  80818. </property>
  80819. <field name="parent_instance">
  80820. <type name="SocketControlMessage" c:type="GSocketControlMessage"/>
  80821. </field>
  80822. <field name="priv">
  80823. <type name="UnixCredentialsMessagePrivate"
  80824. c:type="GUnixCredentialsMessagePrivate*"/>
  80825. </field>
  80826. </class>
  80827. <record name="UnixCredentialsMessageClass"
  80828. c:type="GUnixCredentialsMessageClass"
  80829. glib:is-gtype-struct-for="UnixCredentialsMessage"
  80830. version="2.26">
  80831. <doc xml:space="preserve">Class structure for #GUnixCredentialsMessage.</doc>
  80832. <field name="parent_class">
  80833. <type name="SocketControlMessageClass"
  80834. c:type="GSocketControlMessageClass"/>
  80835. </field>
  80836. <field name="_g_reserved1" introspectable="0">
  80837. <callback name="_g_reserved1">
  80838. <return-value transfer-ownership="none">
  80839. <type name="none" c:type="void"/>
  80840. </return-value>
  80841. </callback>
  80842. </field>
  80843. <field name="_g_reserved2" introspectable="0">
  80844. <callback name="_g_reserved2">
  80845. <return-value transfer-ownership="none">
  80846. <type name="none" c:type="void"/>
  80847. </return-value>
  80848. </callback>
  80849. </field>
  80850. </record>
  80851. <record name="UnixCredentialsMessagePrivate"
  80852. c:type="GUnixCredentialsMessagePrivate"
  80853. disguised="1">
  80854. </record>
  80855. <class name="UnixFDList"
  80856. c:symbol-prefix="unix_fd_list"
  80857. c:type="GUnixFDList"
  80858. parent="GObject.Object"
  80859. glib:type-name="GUnixFDList"
  80860. glib:get-type="g_unix_fd_list_get_type"
  80861. glib:type-struct="UnixFDListClass">
  80862. <doc xml:space="preserve">A #GUnixFDList contains a list of file descriptors. It owns the file
  80863. descriptors that it contains, closing them when finalized.
  80864. It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
  80865. the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
  80866. and received using g_socket_receive_message().
  80867. Note that `&lt;gio/gunixfdlist.h&gt;` belongs to the UNIX-specific GIO
  80868. interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
  80869. file when using it.</doc>
  80870. <constructor name="new" c:identifier="g_unix_fd_list_new" version="2.24">
  80871. <doc xml:space="preserve">Creates a new #GUnixFDList containing no file descriptors.</doc>
  80872. <return-value transfer-ownership="full">
  80873. <doc xml:space="preserve">a new #GUnixFDList</doc>
  80874. <type name="UnixFDList" c:type="GUnixFDList*"/>
  80875. </return-value>
  80876. </constructor>
  80877. <constructor name="new_from_array"
  80878. c:identifier="g_unix_fd_list_new_from_array"
  80879. version="2.24">
  80880. <doc xml:space="preserve">Creates a new #GUnixFDList containing the file descriptors given in
  80881. @fds. The file descriptors become the property of the new list and
  80882. may no longer be used by the caller. The array itself is owned by
  80883. the caller.
  80884. Each file descriptor in the array should be set to close-on-exec.
  80885. If @n_fds is -1 then @fds must be terminated with -1.</doc>
  80886. <return-value transfer-ownership="full">
  80887. <doc xml:space="preserve">a new #GUnixFDList</doc>
  80888. <type name="UnixFDList" c:type="GUnixFDList*"/>
  80889. </return-value>
  80890. <parameters>
  80891. <parameter name="fds" transfer-ownership="none">
  80892. <doc xml:space="preserve">the initial list of file descriptors</doc>
  80893. <array length="1" zero-terminated="0" c:type="gint*">
  80894. <type name="gint" c:type="gint"/>
  80895. </array>
  80896. </parameter>
  80897. <parameter name="n_fds" transfer-ownership="none">
  80898. <doc xml:space="preserve">the length of #fds, or -1</doc>
  80899. <type name="gint" c:type="gint"/>
  80900. </parameter>
  80901. </parameters>
  80902. </constructor>
  80903. <method name="append"
  80904. c:identifier="g_unix_fd_list_append"
  80905. version="2.24"
  80906. throws="1">
  80907. <doc xml:space="preserve">Adds a file descriptor to @list.
  80908. The file descriptor is duplicated using dup(). You keep your copy
  80909. of the descriptor and the copy contained in @list will be closed
  80910. when @list is finalized.
  80911. A possible cause of failure is exceeding the per-process or
  80912. system-wide file descriptor limit.
  80913. The index of the file descriptor in the list is returned. If you use
  80914. this index with g_unix_fd_list_get() then you will receive back a
  80915. duplicated copy of the same file descriptor.</doc>
  80916. <return-value transfer-ownership="none">
  80917. <doc xml:space="preserve">the index of the appended fd in case of success, else -1
  80918. (and @error is set)</doc>
  80919. <type name="gint" c:type="gint"/>
  80920. </return-value>
  80921. <parameters>
  80922. <instance-parameter name="list" transfer-ownership="none">
  80923. <doc xml:space="preserve">a #GUnixFDList</doc>
  80924. <type name="UnixFDList" c:type="GUnixFDList*"/>
  80925. </instance-parameter>
  80926. <parameter name="fd" transfer-ownership="none">
  80927. <doc xml:space="preserve">a valid open file descriptor</doc>
  80928. <type name="gint" c:type="gint"/>
  80929. </parameter>
  80930. </parameters>
  80931. </method>
  80932. <method name="get"
  80933. c:identifier="g_unix_fd_list_get"
  80934. version="2.24"
  80935. throws="1">
  80936. <doc xml:space="preserve">Gets a file descriptor out of @list.
  80937. @index_ specifies the index of the file descriptor to get. It is a
  80938. programmer error for @index_ to be out of range; see
  80939. g_unix_fd_list_get_length().
  80940. The file descriptor is duplicated using dup() and set as
  80941. close-on-exec before being returned. You must call close() on it
  80942. when you are done.
  80943. A possible cause of failure is exceeding the per-process or
  80944. system-wide file descriptor limit.</doc>
  80945. <return-value transfer-ownership="none">
  80946. <doc xml:space="preserve">the file descriptor, or -1 in case of error</doc>
  80947. <type name="gint" c:type="gint"/>
  80948. </return-value>
  80949. <parameters>
  80950. <instance-parameter name="list" transfer-ownership="none">
  80951. <doc xml:space="preserve">a #GUnixFDList</doc>
  80952. <type name="UnixFDList" c:type="GUnixFDList*"/>
  80953. </instance-parameter>
  80954. <parameter name="index_" transfer-ownership="none">
  80955. <doc xml:space="preserve">the index into the list</doc>
  80956. <type name="gint" c:type="gint"/>
  80957. </parameter>
  80958. </parameters>
  80959. </method>
  80960. <method name="get_length"
  80961. c:identifier="g_unix_fd_list_get_length"
  80962. version="2.24">
  80963. <doc xml:space="preserve">Gets the length of @list (ie: the number of file descriptors
  80964. contained within).</doc>
  80965. <return-value transfer-ownership="none">
  80966. <doc xml:space="preserve">the length of @list</doc>
  80967. <type name="gint" c:type="gint"/>
  80968. </return-value>
  80969. <parameters>
  80970. <instance-parameter name="list" transfer-ownership="none">
  80971. <doc xml:space="preserve">a #GUnixFDList</doc>
  80972. <type name="UnixFDList" c:type="GUnixFDList*"/>
  80973. </instance-parameter>
  80974. </parameters>
  80975. </method>
  80976. <method name="peek_fds"
  80977. c:identifier="g_unix_fd_list_peek_fds"
  80978. version="2.24">
  80979. <doc xml:space="preserve">Returns the array of file descriptors that is contained in this
  80980. object.
  80981. After this call, the descriptors remain the property of @list. The
  80982. caller must not close them and must not free the array. The array is
  80983. valid only until @list is changed in any way.
  80984. If @length is non-%NULL then it is set to the number of file
  80985. descriptors in the returned array. The returned array is also
  80986. terminated with -1.
  80987. This function never returns %NULL. In case there are no file
  80988. descriptors contained in @list, an empty array is returned.</doc>
  80989. <return-value transfer-ownership="none">
  80990. <doc xml:space="preserve">an array of file
  80991. descriptors</doc>
  80992. <array length="0" zero-terminated="0" c:type="gint*">
  80993. <type name="gint" c:type="gint"/>
  80994. </array>
  80995. </return-value>
  80996. <parameters>
  80997. <instance-parameter name="list" transfer-ownership="none">
  80998. <doc xml:space="preserve">a #GUnixFDList</doc>
  80999. <type name="UnixFDList" c:type="GUnixFDList*"/>
  81000. </instance-parameter>
  81001. <parameter name="length"
  81002. direction="out"
  81003. caller-allocates="0"
  81004. transfer-ownership="full"
  81005. optional="1"
  81006. allow-none="1">
  81007. <doc xml:space="preserve">pointer to the length of the returned
  81008. array, or %NULL</doc>
  81009. <type name="gint" c:type="gint*"/>
  81010. </parameter>
  81011. </parameters>
  81012. </method>
  81013. <method name="steal_fds"
  81014. c:identifier="g_unix_fd_list_steal_fds"
  81015. version="2.24">
  81016. <doc xml:space="preserve">Returns the array of file descriptors that is contained in this
  81017. object.
  81018. After this call, the descriptors are no longer contained in
  81019. @list. Further calls will return an empty list (unless more
  81020. descriptors have been added).
  81021. The return result of this function must be freed with g_free().
  81022. The caller is also responsible for closing all of the file
  81023. descriptors. The file descriptors in the array are set to
  81024. close-on-exec.
  81025. If @length is non-%NULL then it is set to the number of file
  81026. descriptors in the returned array. The returned array is also
  81027. terminated with -1.
  81028. This function never returns %NULL. In case there are no file
  81029. descriptors contained in @list, an empty array is returned.</doc>
  81030. <return-value transfer-ownership="full">
  81031. <doc xml:space="preserve">an array of file
  81032. descriptors</doc>
  81033. <array length="0" zero-terminated="0" c:type="gint*">
  81034. <type name="gint" c:type="gint"/>
  81035. </array>
  81036. </return-value>
  81037. <parameters>
  81038. <instance-parameter name="list" transfer-ownership="none">
  81039. <doc xml:space="preserve">a #GUnixFDList</doc>
  81040. <type name="UnixFDList" c:type="GUnixFDList*"/>
  81041. </instance-parameter>
  81042. <parameter name="length"
  81043. direction="out"
  81044. caller-allocates="0"
  81045. transfer-ownership="full"
  81046. optional="1"
  81047. allow-none="1">
  81048. <doc xml:space="preserve">pointer to the length of the returned
  81049. array, or %NULL</doc>
  81050. <type name="gint" c:type="gint*"/>
  81051. </parameter>
  81052. </parameters>
  81053. </method>
  81054. <field name="parent_instance">
  81055. <type name="GObject.Object" c:type="GObject"/>
  81056. </field>
  81057. <field name="priv">
  81058. <type name="UnixFDListPrivate" c:type="GUnixFDListPrivate*"/>
  81059. </field>
  81060. </class>
  81061. <record name="UnixFDListClass"
  81062. c:type="GUnixFDListClass"
  81063. glib:is-gtype-struct-for="UnixFDList">
  81064. <field name="parent_class">
  81065. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  81066. </field>
  81067. <field name="_g_reserved1" introspectable="0">
  81068. <callback name="_g_reserved1">
  81069. <return-value transfer-ownership="none">
  81070. <type name="none" c:type="void"/>
  81071. </return-value>
  81072. </callback>
  81073. </field>
  81074. <field name="_g_reserved2" introspectable="0">
  81075. <callback name="_g_reserved2">
  81076. <return-value transfer-ownership="none">
  81077. <type name="none" c:type="void"/>
  81078. </return-value>
  81079. </callback>
  81080. </field>
  81081. <field name="_g_reserved3" introspectable="0">
  81082. <callback name="_g_reserved3">
  81083. <return-value transfer-ownership="none">
  81084. <type name="none" c:type="void"/>
  81085. </return-value>
  81086. </callback>
  81087. </field>
  81088. <field name="_g_reserved4" introspectable="0">
  81089. <callback name="_g_reserved4">
  81090. <return-value transfer-ownership="none">
  81091. <type name="none" c:type="void"/>
  81092. </return-value>
  81093. </callback>
  81094. </field>
  81095. <field name="_g_reserved5" introspectable="0">
  81096. <callback name="_g_reserved5">
  81097. <return-value transfer-ownership="none">
  81098. <type name="none" c:type="void"/>
  81099. </return-value>
  81100. </callback>
  81101. </field>
  81102. </record>
  81103. <record name="UnixFDListPrivate" c:type="GUnixFDListPrivate" disguised="1">
  81104. </record>
  81105. <class name="UnixFDMessage"
  81106. c:symbol-prefix="unix_fd_message"
  81107. c:type="GUnixFDMessage"
  81108. parent="SocketControlMessage"
  81109. glib:type-name="GUnixFDMessage"
  81110. glib:get-type="g_unix_fd_message_get_type"
  81111. glib:type-struct="UnixFDMessageClass">
  81112. <doc xml:space="preserve">This #GSocketControlMessage contains a #GUnixFDList.
  81113. It may be sent using g_socket_send_message() and received using
  81114. g_socket_receive_message() over UNIX sockets (ie: sockets in the
  81115. %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
  81116. between processes by the kernel.
  81117. For an easier way to send and receive file descriptors over
  81118. stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
  81119. g_unix_connection_receive_fd().
  81120. Note that `&lt;gio/gunixfdmessage.h&gt;` belongs to the UNIX-specific GIO
  81121. interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
  81122. file when using it.</doc>
  81123. <constructor name="new"
  81124. c:identifier="g_unix_fd_message_new"
  81125. version="2.22">
  81126. <doc xml:space="preserve">Creates a new #GUnixFDMessage containing an empty file descriptor
  81127. list.</doc>
  81128. <return-value transfer-ownership="full">
  81129. <doc xml:space="preserve">a new #GUnixFDMessage</doc>
  81130. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  81131. </return-value>
  81132. </constructor>
  81133. <constructor name="new_with_fd_list"
  81134. c:identifier="g_unix_fd_message_new_with_fd_list"
  81135. version="2.24">
  81136. <doc xml:space="preserve">Creates a new #GUnixFDMessage containing @list.</doc>
  81137. <return-value transfer-ownership="full">
  81138. <doc xml:space="preserve">a new #GUnixFDMessage</doc>
  81139. <type name="SocketControlMessage" c:type="GSocketControlMessage*"/>
  81140. </return-value>
  81141. <parameters>
  81142. <parameter name="fd_list" transfer-ownership="none">
  81143. <doc xml:space="preserve">a #GUnixFDList</doc>
  81144. <type name="UnixFDList" c:type="GUnixFDList*"/>
  81145. </parameter>
  81146. </parameters>
  81147. </constructor>
  81148. <method name="append_fd"
  81149. c:identifier="g_unix_fd_message_append_fd"
  81150. version="2.22"
  81151. throws="1">
  81152. <doc xml:space="preserve">Adds a file descriptor to @message.
  81153. The file descriptor is duplicated using dup(). You keep your copy
  81154. of the descriptor and the copy contained in @message will be closed
  81155. when @message is finalized.
  81156. A possible cause of failure is exceeding the per-process or
  81157. system-wide file descriptor limit.</doc>
  81158. <return-value transfer-ownership="none">
  81159. <doc xml:space="preserve">%TRUE in case of success, else %FALSE (and @error is set)</doc>
  81160. <type name="gboolean" c:type="gboolean"/>
  81161. </return-value>
  81162. <parameters>
  81163. <instance-parameter name="message" transfer-ownership="none">
  81164. <doc xml:space="preserve">a #GUnixFDMessage</doc>
  81165. <type name="UnixFDMessage" c:type="GUnixFDMessage*"/>
  81166. </instance-parameter>
  81167. <parameter name="fd" transfer-ownership="none">
  81168. <doc xml:space="preserve">a valid open file descriptor</doc>
  81169. <type name="gint" c:type="gint"/>
  81170. </parameter>
  81171. </parameters>
  81172. </method>
  81173. <method name="get_fd_list"
  81174. c:identifier="g_unix_fd_message_get_fd_list"
  81175. version="2.24">
  81176. <doc xml:space="preserve">Gets the #GUnixFDList contained in @message. This function does not
  81177. return a reference to the caller, but the returned list is valid for
  81178. the lifetime of @message.</doc>
  81179. <return-value transfer-ownership="none">
  81180. <doc xml:space="preserve">the #GUnixFDList from @message</doc>
  81181. <type name="UnixFDList" c:type="GUnixFDList*"/>
  81182. </return-value>
  81183. <parameters>
  81184. <instance-parameter name="message" transfer-ownership="none">
  81185. <doc xml:space="preserve">a #GUnixFDMessage</doc>
  81186. <type name="UnixFDMessage" c:type="GUnixFDMessage*"/>
  81187. </instance-parameter>
  81188. </parameters>
  81189. </method>
  81190. <method name="steal_fds"
  81191. c:identifier="g_unix_fd_message_steal_fds"
  81192. version="2.22">
  81193. <doc xml:space="preserve">Returns the array of file descriptors that is contained in this
  81194. object.
  81195. After this call, the descriptors are no longer contained in
  81196. @message. Further calls will return an empty list (unless more
  81197. descriptors have been added).
  81198. The return result of this function must be freed with g_free().
  81199. The caller is also responsible for closing all of the file
  81200. descriptors.
  81201. If @length is non-%NULL then it is set to the number of file
  81202. descriptors in the returned array. The returned array is also
  81203. terminated with -1.
  81204. This function never returns %NULL. In case there are no file
  81205. descriptors contained in @message, an empty array is returned.</doc>
  81206. <return-value transfer-ownership="full">
  81207. <doc xml:space="preserve">an array of file
  81208. descriptors</doc>
  81209. <array length="0" zero-terminated="0" c:type="gint*">
  81210. <type name="gint" c:type="gint"/>
  81211. </array>
  81212. </return-value>
  81213. <parameters>
  81214. <instance-parameter name="message" transfer-ownership="none">
  81215. <doc xml:space="preserve">a #GUnixFDMessage</doc>
  81216. <type name="UnixFDMessage" c:type="GUnixFDMessage*"/>
  81217. </instance-parameter>
  81218. <parameter name="length"
  81219. direction="out"
  81220. caller-allocates="0"
  81221. transfer-ownership="full"
  81222. optional="1"
  81223. allow-none="1">
  81224. <doc xml:space="preserve">pointer to the length of the returned
  81225. array, or %NULL</doc>
  81226. <type name="gint" c:type="gint*"/>
  81227. </parameter>
  81228. </parameters>
  81229. </method>
  81230. <property name="fd-list"
  81231. writable="1"
  81232. construct-only="1"
  81233. transfer-ownership="none">
  81234. <type name="UnixFDList"/>
  81235. </property>
  81236. <field name="parent_instance">
  81237. <type name="SocketControlMessage" c:type="GSocketControlMessage"/>
  81238. </field>
  81239. <field name="priv">
  81240. <type name="UnixFDMessagePrivate" c:type="GUnixFDMessagePrivate*"/>
  81241. </field>
  81242. </class>
  81243. <record name="UnixFDMessageClass"
  81244. c:type="GUnixFDMessageClass"
  81245. glib:is-gtype-struct-for="UnixFDMessage">
  81246. <field name="parent_class">
  81247. <type name="SocketControlMessageClass"
  81248. c:type="GSocketControlMessageClass"/>
  81249. </field>
  81250. <field name="_g_reserved1" introspectable="0">
  81251. <callback name="_g_reserved1">
  81252. <return-value transfer-ownership="none">
  81253. <type name="none" c:type="void"/>
  81254. </return-value>
  81255. </callback>
  81256. </field>
  81257. <field name="_g_reserved2" introspectable="0">
  81258. <callback name="_g_reserved2">
  81259. <return-value transfer-ownership="none">
  81260. <type name="none" c:type="void"/>
  81261. </return-value>
  81262. </callback>
  81263. </field>
  81264. </record>
  81265. <record name="UnixFDMessagePrivate"
  81266. c:type="GUnixFDMessagePrivate"
  81267. disguised="1">
  81268. </record>
  81269. <class name="UnixInputStream"
  81270. c:symbol-prefix="unix_input_stream"
  81271. c:type="GUnixInputStream"
  81272. parent="InputStream"
  81273. glib:type-name="GUnixInputStream"
  81274. glib:get-type="g_unix_input_stream_get_type"
  81275. glib:type-struct="UnixInputStreamClass">
  81276. <doc xml:space="preserve">#GUnixInputStream implements #GInputStream for reading from a UNIX
  81277. file descriptor, including asynchronous operations. (If the file
  81278. descriptor refers to a socket or pipe, this will use poll() to do
  81279. asynchronous I/O. If it refers to a regular file, it will fall back
  81280. to doing asynchronous I/O in another thread.)
  81281. Note that `&lt;gio/gunixinputstream.h&gt;` belongs to the UNIX-specific GIO
  81282. interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
  81283. file when using it.</doc>
  81284. <implements name="FileDescriptorBased"/>
  81285. <implements name="PollableInputStream"/>
  81286. <constructor name="new" c:identifier="g_unix_input_stream_new">
  81287. <doc xml:space="preserve">Creates a new #GUnixInputStream for the given @fd.
  81288. If @close_fd is %TRUE, the file descriptor will be closed
  81289. when the stream is closed.</doc>
  81290. <return-value transfer-ownership="full">
  81291. <doc xml:space="preserve">a new #GUnixInputStream</doc>
  81292. <type name="InputStream" c:type="GInputStream*"/>
  81293. </return-value>
  81294. <parameters>
  81295. <parameter name="fd" transfer-ownership="none">
  81296. <doc xml:space="preserve">a UNIX file descriptor</doc>
  81297. <type name="gint" c:type="gint"/>
  81298. </parameter>
  81299. <parameter name="close_fd" transfer-ownership="none">
  81300. <doc xml:space="preserve">%TRUE to close the file descriptor when done</doc>
  81301. <type name="gboolean" c:type="gboolean"/>
  81302. </parameter>
  81303. </parameters>
  81304. </constructor>
  81305. <method name="get_close_fd"
  81306. c:identifier="g_unix_input_stream_get_close_fd"
  81307. version="2.20">
  81308. <doc xml:space="preserve">Returns whether the file descriptor of @stream will be
  81309. closed when the stream is closed.</doc>
  81310. <return-value transfer-ownership="none">
  81311. <doc xml:space="preserve">%TRUE if the file descriptor is closed when done</doc>
  81312. <type name="gboolean" c:type="gboolean"/>
  81313. </return-value>
  81314. <parameters>
  81315. <instance-parameter name="stream" transfer-ownership="none">
  81316. <doc xml:space="preserve">a #GUnixInputStream</doc>
  81317. <type name="UnixInputStream" c:type="GUnixInputStream*"/>
  81318. </instance-parameter>
  81319. </parameters>
  81320. </method>
  81321. <method name="get_fd"
  81322. c:identifier="g_unix_input_stream_get_fd"
  81323. version="2.20">
  81324. <doc xml:space="preserve">Return the UNIX file descriptor that the stream reads from.</doc>
  81325. <return-value transfer-ownership="none">
  81326. <doc xml:space="preserve">The file descriptor of @stream</doc>
  81327. <type name="gint" c:type="gint"/>
  81328. </return-value>
  81329. <parameters>
  81330. <instance-parameter name="stream" transfer-ownership="none">
  81331. <doc xml:space="preserve">a #GUnixInputStream</doc>
  81332. <type name="UnixInputStream" c:type="GUnixInputStream*"/>
  81333. </instance-parameter>
  81334. </parameters>
  81335. </method>
  81336. <method name="set_close_fd"
  81337. c:identifier="g_unix_input_stream_set_close_fd"
  81338. version="2.20">
  81339. <doc xml:space="preserve">Sets whether the file descriptor of @stream shall be closed
  81340. when the stream is closed.</doc>
  81341. <return-value transfer-ownership="none">
  81342. <type name="none" c:type="void"/>
  81343. </return-value>
  81344. <parameters>
  81345. <instance-parameter name="stream" transfer-ownership="none">
  81346. <doc xml:space="preserve">a #GUnixInputStream</doc>
  81347. <type name="UnixInputStream" c:type="GUnixInputStream*"/>
  81348. </instance-parameter>
  81349. <parameter name="close_fd" transfer-ownership="none">
  81350. <doc xml:space="preserve">%TRUE to close the file descriptor when done</doc>
  81351. <type name="gboolean" c:type="gboolean"/>
  81352. </parameter>
  81353. </parameters>
  81354. </method>
  81355. <property name="close-fd"
  81356. version="2.20"
  81357. writable="1"
  81358. transfer-ownership="none">
  81359. <doc xml:space="preserve">Whether to close the file descriptor when the stream is closed.</doc>
  81360. <type name="gboolean" c:type="gboolean"/>
  81361. </property>
  81362. <property name="fd"
  81363. version="2.20"
  81364. writable="1"
  81365. construct-only="1"
  81366. transfer-ownership="none">
  81367. <doc xml:space="preserve">The file descriptor that the stream reads from.</doc>
  81368. <type name="gint" c:type="gint"/>
  81369. </property>
  81370. <field name="parent_instance">
  81371. <type name="InputStream" c:type="GInputStream"/>
  81372. </field>
  81373. <field name="priv" readable="0" private="1">
  81374. <type name="UnixInputStreamPrivate" c:type="GUnixInputStreamPrivate*"/>
  81375. </field>
  81376. </class>
  81377. <record name="UnixInputStreamClass"
  81378. c:type="GUnixInputStreamClass"
  81379. glib:is-gtype-struct-for="UnixInputStream">
  81380. <field name="parent_class">
  81381. <type name="InputStreamClass" c:type="GInputStreamClass"/>
  81382. </field>
  81383. <field name="_g_reserved1" introspectable="0">
  81384. <callback name="_g_reserved1">
  81385. <return-value transfer-ownership="none">
  81386. <type name="none" c:type="void"/>
  81387. </return-value>
  81388. </callback>
  81389. </field>
  81390. <field name="_g_reserved2" introspectable="0">
  81391. <callback name="_g_reserved2">
  81392. <return-value transfer-ownership="none">
  81393. <type name="none" c:type="void"/>
  81394. </return-value>
  81395. </callback>
  81396. </field>
  81397. <field name="_g_reserved3" introspectable="0">
  81398. <callback name="_g_reserved3">
  81399. <return-value transfer-ownership="none">
  81400. <type name="none" c:type="void"/>
  81401. </return-value>
  81402. </callback>
  81403. </field>
  81404. <field name="_g_reserved4" introspectable="0">
  81405. <callback name="_g_reserved4">
  81406. <return-value transfer-ownership="none">
  81407. <type name="none" c:type="void"/>
  81408. </return-value>
  81409. </callback>
  81410. </field>
  81411. <field name="_g_reserved5" introspectable="0">
  81412. <callback name="_g_reserved5">
  81413. <return-value transfer-ownership="none">
  81414. <type name="none" c:type="void"/>
  81415. </return-value>
  81416. </callback>
  81417. </field>
  81418. </record>
  81419. <record name="UnixInputStreamPrivate"
  81420. c:type="GUnixInputStreamPrivate"
  81421. disguised="1">
  81422. </record>
  81423. <record name="UnixMountEntry" c:type="GUnixMountEntry" disguised="1">
  81424. <doc xml:space="preserve">Defines a Unix mount entry (e.g. &lt;filename&gt;/media/cdrom&lt;/filename&gt;).
  81425. This corresponds roughly to a mtab entry.</doc>
  81426. </record>
  81427. <class name="UnixMountMonitor"
  81428. c:symbol-prefix="unix_mount_monitor"
  81429. c:type="GUnixMountMonitor"
  81430. parent="GObject.Object"
  81431. glib:type-name="GUnixMountMonitor"
  81432. glib:get-type="g_unix_mount_monitor_get_type"
  81433. glib:type-struct="UnixMountMonitorClass">
  81434. <doc xml:space="preserve">Watches #GUnixMounts for changes.</doc>
  81435. <constructor name="new"
  81436. c:identifier="g_unix_mount_monitor_new"
  81437. deprecated="1"
  81438. deprecated-version="2.44">
  81439. <doc xml:space="preserve">Deprecated alias for g_unix_mount_monitor_get().
  81440. This function was never a true constructor, which is why it was
  81441. renamed.</doc>
  81442. <doc-deprecated xml:space="preserve">Use g_unix_mount_monitor_get() instead.</doc-deprecated>
  81443. <return-value transfer-ownership="full">
  81444. <doc xml:space="preserve">a #GUnixMountMonitor.</doc>
  81445. <type name="UnixMountMonitor" c:type="GUnixMountMonitor*"/>
  81446. </return-value>
  81447. </constructor>
  81448. <function name="get"
  81449. c:identifier="g_unix_mount_monitor_get"
  81450. version="2.44">
  81451. <doc xml:space="preserve">Gets the #GUnixMountMonitor for the current thread-default main
  81452. context.
  81453. The mount monitor can be used to monitor for changes to the list of
  81454. mounted filesystems as well as the list of mount points (ie: fstab
  81455. entries).
  81456. You must only call g_object_unref() on the return value from under
  81457. the same main context as you called this function.</doc>
  81458. <return-value transfer-ownership="full">
  81459. <doc xml:space="preserve">the #GUnixMountMonitor.</doc>
  81460. <type name="UnixMountMonitor" c:type="GUnixMountMonitor*"/>
  81461. </return-value>
  81462. </function>
  81463. <method name="set_rate_limit"
  81464. c:identifier="g_unix_mount_monitor_set_rate_limit"
  81465. version="2.18"
  81466. deprecated="1"
  81467. deprecated-version="2.44">
  81468. <doc xml:space="preserve">This function does nothing.
  81469. Before 2.44, this was a partially-effective way of controlling the
  81470. rate at which events would be reported under some uncommon
  81471. circumstances. Since @mount_monitor is a singleton, it also meant
  81472. that calling this function would have side effects for other users of
  81473. the monitor.</doc>
  81474. <doc-deprecated xml:space="preserve">This function does nothing. Don't call it.</doc-deprecated>
  81475. <return-value transfer-ownership="none">
  81476. <type name="none" c:type="void"/>
  81477. </return-value>
  81478. <parameters>
  81479. <instance-parameter name="mount_monitor" transfer-ownership="none">
  81480. <doc xml:space="preserve">a #GUnixMountMonitor</doc>
  81481. <type name="UnixMountMonitor" c:type="GUnixMountMonitor*"/>
  81482. </instance-parameter>
  81483. <parameter name="limit_msec" transfer-ownership="none">
  81484. <doc xml:space="preserve">a integer with the limit in milliseconds to
  81485. poll for changes.</doc>
  81486. <type name="gint" c:type="int"/>
  81487. </parameter>
  81488. </parameters>
  81489. </method>
  81490. <glib:signal name="mountpoints-changed" when="last">
  81491. <doc xml:space="preserve">Emitted when the unix mount points have changed.</doc>
  81492. <return-value transfer-ownership="none">
  81493. <type name="none" c:type="void"/>
  81494. </return-value>
  81495. </glib:signal>
  81496. <glib:signal name="mounts-changed" when="last">
  81497. <doc xml:space="preserve">Emitted when the unix mounts have changed.</doc>
  81498. <return-value transfer-ownership="none">
  81499. <type name="none" c:type="void"/>
  81500. </return-value>
  81501. </glib:signal>
  81502. </class>
  81503. <record name="UnixMountMonitorClass"
  81504. c:type="GUnixMountMonitorClass"
  81505. disguised="1"
  81506. glib:is-gtype-struct-for="UnixMountMonitor">
  81507. </record>
  81508. <record name="UnixMountPoint" c:type="GUnixMountPoint" disguised="1">
  81509. <doc xml:space="preserve">Defines a Unix mount point (e.g. &lt;filename&gt;/dev&lt;/filename&gt;).
  81510. This corresponds roughly to a fstab entry.</doc>
  81511. <method name="compare" c:identifier="g_unix_mount_point_compare">
  81512. <doc xml:space="preserve">Compares two unix mount points.</doc>
  81513. <return-value transfer-ownership="none">
  81514. <doc xml:space="preserve">1, 0 or -1 if @mount1 is greater than, equal to,
  81515. or less than @mount2, respectively.</doc>
  81516. <type name="gint" c:type="gint"/>
  81517. </return-value>
  81518. <parameters>
  81519. <instance-parameter name="mount1" transfer-ownership="none">
  81520. <doc xml:space="preserve">a #GUnixMount.</doc>
  81521. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81522. </instance-parameter>
  81523. <parameter name="mount2" transfer-ownership="none">
  81524. <doc xml:space="preserve">a #GUnixMount.</doc>
  81525. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81526. </parameter>
  81527. </parameters>
  81528. </method>
  81529. <method name="free" c:identifier="g_unix_mount_point_free">
  81530. <doc xml:space="preserve">Frees a unix mount point.</doc>
  81531. <return-value transfer-ownership="none">
  81532. <type name="none" c:type="void"/>
  81533. </return-value>
  81534. <parameters>
  81535. <instance-parameter name="mount_point" transfer-ownership="none">
  81536. <doc xml:space="preserve">unix mount point to free.</doc>
  81537. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81538. </instance-parameter>
  81539. </parameters>
  81540. </method>
  81541. <method name="get_device_path"
  81542. c:identifier="g_unix_mount_point_get_device_path">
  81543. <doc xml:space="preserve">Gets the device path for a unix mount point.</doc>
  81544. <return-value transfer-ownership="none">
  81545. <doc xml:space="preserve">a string containing the device path.</doc>
  81546. <type name="utf8" c:type="const char*"/>
  81547. </return-value>
  81548. <parameters>
  81549. <instance-parameter name="mount_point" transfer-ownership="none">
  81550. <doc xml:space="preserve">a #GUnixMountPoint.</doc>
  81551. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81552. </instance-parameter>
  81553. </parameters>
  81554. </method>
  81555. <method name="get_fs_type" c:identifier="g_unix_mount_point_get_fs_type">
  81556. <doc xml:space="preserve">Gets the file system type for the mount point.</doc>
  81557. <return-value transfer-ownership="none">
  81558. <doc xml:space="preserve">a string containing the file system type.</doc>
  81559. <type name="utf8" c:type="const char*"/>
  81560. </return-value>
  81561. <parameters>
  81562. <instance-parameter name="mount_point" transfer-ownership="none">
  81563. <doc xml:space="preserve">a #GUnixMountPoint.</doc>
  81564. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81565. </instance-parameter>
  81566. </parameters>
  81567. </method>
  81568. <method name="get_mount_path"
  81569. c:identifier="g_unix_mount_point_get_mount_path">
  81570. <doc xml:space="preserve">Gets the mount path for a unix mount point.</doc>
  81571. <return-value transfer-ownership="none">
  81572. <doc xml:space="preserve">a string containing the mount path.</doc>
  81573. <type name="utf8" c:type="const char*"/>
  81574. </return-value>
  81575. <parameters>
  81576. <instance-parameter name="mount_point" transfer-ownership="none">
  81577. <doc xml:space="preserve">a #GUnixMountPoint.</doc>
  81578. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81579. </instance-parameter>
  81580. </parameters>
  81581. </method>
  81582. <method name="get_options"
  81583. c:identifier="g_unix_mount_point_get_options"
  81584. version="2.32">
  81585. <doc xml:space="preserve">Gets the options for the mount point.</doc>
  81586. <return-value transfer-ownership="none">
  81587. <doc xml:space="preserve">a string containing the options.</doc>
  81588. <type name="utf8" c:type="const char*"/>
  81589. </return-value>
  81590. <parameters>
  81591. <instance-parameter name="mount_point" transfer-ownership="none">
  81592. <doc xml:space="preserve">a #GUnixMountPoint.</doc>
  81593. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81594. </instance-parameter>
  81595. </parameters>
  81596. </method>
  81597. <method name="guess_can_eject"
  81598. c:identifier="g_unix_mount_point_guess_can_eject">
  81599. <doc xml:space="preserve">Guesses whether a Unix mount point can be ejected.</doc>
  81600. <return-value transfer-ownership="none">
  81601. <doc xml:space="preserve">%TRUE if @mount_point is deemed to be ejectable.</doc>
  81602. <type name="gboolean" c:type="gboolean"/>
  81603. </return-value>
  81604. <parameters>
  81605. <instance-parameter name="mount_point" transfer-ownership="none">
  81606. <doc xml:space="preserve">a #GUnixMountPoint</doc>
  81607. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81608. </instance-parameter>
  81609. </parameters>
  81610. </method>
  81611. <method name="guess_icon" c:identifier="g_unix_mount_point_guess_icon">
  81612. <doc xml:space="preserve">Guesses the icon of a Unix mount point.</doc>
  81613. <return-value transfer-ownership="full">
  81614. <doc xml:space="preserve">a #GIcon</doc>
  81615. <type name="Icon" c:type="GIcon*"/>
  81616. </return-value>
  81617. <parameters>
  81618. <instance-parameter name="mount_point" transfer-ownership="none">
  81619. <doc xml:space="preserve">a #GUnixMountPoint</doc>
  81620. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81621. </instance-parameter>
  81622. </parameters>
  81623. </method>
  81624. <method name="guess_name" c:identifier="g_unix_mount_point_guess_name">
  81625. <doc xml:space="preserve">Guesses the name of a Unix mount point.
  81626. The result is a translated string.</doc>
  81627. <return-value transfer-ownership="full">
  81628. <doc xml:space="preserve">A newly allocated string that must
  81629. be freed with g_free()</doc>
  81630. <type name="utf8" c:type="char*"/>
  81631. </return-value>
  81632. <parameters>
  81633. <instance-parameter name="mount_point" transfer-ownership="none">
  81634. <doc xml:space="preserve">a #GUnixMountPoint</doc>
  81635. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81636. </instance-parameter>
  81637. </parameters>
  81638. </method>
  81639. <method name="guess_symbolic_icon"
  81640. c:identifier="g_unix_mount_point_guess_symbolic_icon"
  81641. version="2.34">
  81642. <doc xml:space="preserve">Guesses the symbolic icon of a Unix mount point.</doc>
  81643. <return-value transfer-ownership="full">
  81644. <doc xml:space="preserve">a #GIcon</doc>
  81645. <type name="Icon" c:type="GIcon*"/>
  81646. </return-value>
  81647. <parameters>
  81648. <instance-parameter name="mount_point" transfer-ownership="none">
  81649. <doc xml:space="preserve">a #GUnixMountPoint</doc>
  81650. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81651. </instance-parameter>
  81652. </parameters>
  81653. </method>
  81654. <method name="is_loopback" c:identifier="g_unix_mount_point_is_loopback">
  81655. <doc xml:space="preserve">Checks if a unix mount point is a loopback device.</doc>
  81656. <return-value transfer-ownership="none">
  81657. <doc xml:space="preserve">%TRUE if the mount point is a loopback. %FALSE otherwise.</doc>
  81658. <type name="gboolean" c:type="gboolean"/>
  81659. </return-value>
  81660. <parameters>
  81661. <instance-parameter name="mount_point" transfer-ownership="none">
  81662. <doc xml:space="preserve">a #GUnixMountPoint.</doc>
  81663. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81664. </instance-parameter>
  81665. </parameters>
  81666. </method>
  81667. <method name="is_readonly" c:identifier="g_unix_mount_point_is_readonly">
  81668. <doc xml:space="preserve">Checks if a unix mount point is read only.</doc>
  81669. <return-value transfer-ownership="none">
  81670. <doc xml:space="preserve">%TRUE if a mount point is read only.</doc>
  81671. <type name="gboolean" c:type="gboolean"/>
  81672. </return-value>
  81673. <parameters>
  81674. <instance-parameter name="mount_point" transfer-ownership="none">
  81675. <doc xml:space="preserve">a #GUnixMountPoint.</doc>
  81676. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81677. </instance-parameter>
  81678. </parameters>
  81679. </method>
  81680. <method name="is_user_mountable"
  81681. c:identifier="g_unix_mount_point_is_user_mountable">
  81682. <doc xml:space="preserve">Checks if a unix mount point is mountable by the user.</doc>
  81683. <return-value transfer-ownership="none">
  81684. <doc xml:space="preserve">%TRUE if the mount point is user mountable.</doc>
  81685. <type name="gboolean" c:type="gboolean"/>
  81686. </return-value>
  81687. <parameters>
  81688. <instance-parameter name="mount_point" transfer-ownership="none">
  81689. <doc xml:space="preserve">a #GUnixMountPoint.</doc>
  81690. <type name="UnixMountPoint" c:type="GUnixMountPoint*"/>
  81691. </instance-parameter>
  81692. </parameters>
  81693. </method>
  81694. </record>
  81695. <class name="UnixOutputStream"
  81696. c:symbol-prefix="unix_output_stream"
  81697. c:type="GUnixOutputStream"
  81698. parent="OutputStream"
  81699. glib:type-name="GUnixOutputStream"
  81700. glib:get-type="g_unix_output_stream_get_type"
  81701. glib:type-struct="UnixOutputStreamClass">
  81702. <doc xml:space="preserve">#GUnixOutputStream implements #GOutputStream for writing to a UNIX
  81703. file descriptor, including asynchronous operations. (If the file
  81704. descriptor refers to a socket or pipe, this will use poll() to do
  81705. asynchronous I/O. If it refers to a regular file, it will fall back
  81706. to doing asynchronous I/O in another thread.)
  81707. Note that `&lt;gio/gunixoutputstream.h&gt;` belongs to the UNIX-specific GIO
  81708. interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file
  81709. when using it.</doc>
  81710. <implements name="FileDescriptorBased"/>
  81711. <implements name="PollableOutputStream"/>
  81712. <constructor name="new" c:identifier="g_unix_output_stream_new">
  81713. <doc xml:space="preserve">Creates a new #GUnixOutputStream for the given @fd.
  81714. If @close_fd, is %TRUE, the file descriptor will be closed when
  81715. the output stream is destroyed.</doc>
  81716. <return-value transfer-ownership="full">
  81717. <doc xml:space="preserve">a new #GOutputStream</doc>
  81718. <type name="OutputStream" c:type="GOutputStream*"/>
  81719. </return-value>
  81720. <parameters>
  81721. <parameter name="fd" transfer-ownership="none">
  81722. <doc xml:space="preserve">a UNIX file descriptor</doc>
  81723. <type name="gint" c:type="gint"/>
  81724. </parameter>
  81725. <parameter name="close_fd" transfer-ownership="none">
  81726. <doc xml:space="preserve">%TRUE to close the file descriptor when done</doc>
  81727. <type name="gboolean" c:type="gboolean"/>
  81728. </parameter>
  81729. </parameters>
  81730. </constructor>
  81731. <method name="get_close_fd"
  81732. c:identifier="g_unix_output_stream_get_close_fd"
  81733. version="2.20">
  81734. <doc xml:space="preserve">Returns whether the file descriptor of @stream will be
  81735. closed when the stream is closed.</doc>
  81736. <return-value transfer-ownership="none">
  81737. <doc xml:space="preserve">%TRUE if the file descriptor is closed when done</doc>
  81738. <type name="gboolean" c:type="gboolean"/>
  81739. </return-value>
  81740. <parameters>
  81741. <instance-parameter name="stream" transfer-ownership="none">
  81742. <doc xml:space="preserve">a #GUnixOutputStream</doc>
  81743. <type name="UnixOutputStream" c:type="GUnixOutputStream*"/>
  81744. </instance-parameter>
  81745. </parameters>
  81746. </method>
  81747. <method name="get_fd"
  81748. c:identifier="g_unix_output_stream_get_fd"
  81749. version="2.20">
  81750. <doc xml:space="preserve">Return the UNIX file descriptor that the stream writes to.</doc>
  81751. <return-value transfer-ownership="none">
  81752. <doc xml:space="preserve">The file descriptor of @stream</doc>
  81753. <type name="gint" c:type="gint"/>
  81754. </return-value>
  81755. <parameters>
  81756. <instance-parameter name="stream" transfer-ownership="none">
  81757. <doc xml:space="preserve">a #GUnixOutputStream</doc>
  81758. <type name="UnixOutputStream" c:type="GUnixOutputStream*"/>
  81759. </instance-parameter>
  81760. </parameters>
  81761. </method>
  81762. <method name="set_close_fd"
  81763. c:identifier="g_unix_output_stream_set_close_fd"
  81764. version="2.20">
  81765. <doc xml:space="preserve">Sets whether the file descriptor of @stream shall be closed
  81766. when the stream is closed.</doc>
  81767. <return-value transfer-ownership="none">
  81768. <type name="none" c:type="void"/>
  81769. </return-value>
  81770. <parameters>
  81771. <instance-parameter name="stream" transfer-ownership="none">
  81772. <doc xml:space="preserve">a #GUnixOutputStream</doc>
  81773. <type name="UnixOutputStream" c:type="GUnixOutputStream*"/>
  81774. </instance-parameter>
  81775. <parameter name="close_fd" transfer-ownership="none">
  81776. <doc xml:space="preserve">%TRUE to close the file descriptor when done</doc>
  81777. <type name="gboolean" c:type="gboolean"/>
  81778. </parameter>
  81779. </parameters>
  81780. </method>
  81781. <property name="close-fd"
  81782. version="2.20"
  81783. writable="1"
  81784. transfer-ownership="none">
  81785. <doc xml:space="preserve">Whether to close the file descriptor when the stream is closed.</doc>
  81786. <type name="gboolean" c:type="gboolean"/>
  81787. </property>
  81788. <property name="fd"
  81789. version="2.20"
  81790. writable="1"
  81791. construct-only="1"
  81792. transfer-ownership="none">
  81793. <doc xml:space="preserve">The file descriptor that the stream writes to.</doc>
  81794. <type name="gint" c:type="gint"/>
  81795. </property>
  81796. <field name="parent_instance">
  81797. <type name="OutputStream" c:type="GOutputStream"/>
  81798. </field>
  81799. <field name="priv" readable="0" private="1">
  81800. <type name="UnixOutputStreamPrivate"
  81801. c:type="GUnixOutputStreamPrivate*"/>
  81802. </field>
  81803. </class>
  81804. <record name="UnixOutputStreamClass"
  81805. c:type="GUnixOutputStreamClass"
  81806. glib:is-gtype-struct-for="UnixOutputStream">
  81807. <field name="parent_class">
  81808. <type name="OutputStreamClass" c:type="GOutputStreamClass"/>
  81809. </field>
  81810. <field name="_g_reserved1" introspectable="0">
  81811. <callback name="_g_reserved1">
  81812. <return-value transfer-ownership="none">
  81813. <type name="none" c:type="void"/>
  81814. </return-value>
  81815. </callback>
  81816. </field>
  81817. <field name="_g_reserved2" introspectable="0">
  81818. <callback name="_g_reserved2">
  81819. <return-value transfer-ownership="none">
  81820. <type name="none" c:type="void"/>
  81821. </return-value>
  81822. </callback>
  81823. </field>
  81824. <field name="_g_reserved3" introspectable="0">
  81825. <callback name="_g_reserved3">
  81826. <return-value transfer-ownership="none">
  81827. <type name="none" c:type="void"/>
  81828. </return-value>
  81829. </callback>
  81830. </field>
  81831. <field name="_g_reserved4" introspectable="0">
  81832. <callback name="_g_reserved4">
  81833. <return-value transfer-ownership="none">
  81834. <type name="none" c:type="void"/>
  81835. </return-value>
  81836. </callback>
  81837. </field>
  81838. <field name="_g_reserved5" introspectable="0">
  81839. <callback name="_g_reserved5">
  81840. <return-value transfer-ownership="none">
  81841. <type name="none" c:type="void"/>
  81842. </return-value>
  81843. </callback>
  81844. </field>
  81845. </record>
  81846. <record name="UnixOutputStreamPrivate"
  81847. c:type="GUnixOutputStreamPrivate"
  81848. disguised="1">
  81849. </record>
  81850. <class name="UnixSocketAddress"
  81851. c:symbol-prefix="unix_socket_address"
  81852. c:type="GUnixSocketAddress"
  81853. parent="SocketAddress"
  81854. glib:type-name="GUnixSocketAddress"
  81855. glib:get-type="g_unix_socket_address_get_type"
  81856. glib:type-struct="UnixSocketAddressClass">
  81857. <doc xml:space="preserve">Support for UNIX-domain (also known as local) sockets.
  81858. UNIX domain sockets are generally visible in the filesystem.
  81859. However, some systems support abstract socket names which are not
  81860. visible in the filesystem and not affected by the filesystem
  81861. permissions, visibility, etc. Currently this is only supported
  81862. under Linux. If you attempt to use abstract sockets on other
  81863. systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
  81864. errors. You can use g_unix_socket_address_abstract_names_supported()
  81865. to see if abstract names are supported.
  81866. Note that `&lt;gio/gunixsocketaddress.h&gt;` belongs to the UNIX-specific GIO
  81867. interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file
  81868. when using it.</doc>
  81869. <implements name="SocketConnectable"/>
  81870. <constructor name="new"
  81871. c:identifier="g_unix_socket_address_new"
  81872. version="2.22">
  81873. <doc xml:space="preserve">Creates a new #GUnixSocketAddress for @path.
  81874. To create abstract socket addresses, on systems that support that,
  81875. use g_unix_socket_address_new_abstract().</doc>
  81876. <return-value transfer-ownership="full">
  81877. <doc xml:space="preserve">a new #GUnixSocketAddress</doc>
  81878. <type name="SocketAddress" c:type="GSocketAddress*"/>
  81879. </return-value>
  81880. <parameters>
  81881. <parameter name="path" transfer-ownership="none">
  81882. <doc xml:space="preserve">the socket path</doc>
  81883. <type name="utf8" c:type="const gchar*"/>
  81884. </parameter>
  81885. </parameters>
  81886. </constructor>
  81887. <constructor name="new_abstract"
  81888. c:identifier="g_unix_socket_address_new_abstract"
  81889. deprecated="1">
  81890. <doc xml:space="preserve">Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
  81891. #GUnixSocketAddress for @path.</doc>
  81892. <doc-deprecated xml:space="preserve">Use g_unix_socket_address_new_with_type().</doc-deprecated>
  81893. <return-value transfer-ownership="full">
  81894. <doc xml:space="preserve">a new #GUnixSocketAddress</doc>
  81895. <type name="SocketAddress" c:type="GSocketAddress*"/>
  81896. </return-value>
  81897. <parameters>
  81898. <parameter name="path" transfer-ownership="none">
  81899. <doc xml:space="preserve">the abstract name</doc>
  81900. <array length="1" zero-terminated="0" c:type="gchar*">
  81901. <type name="gchar"/>
  81902. </array>
  81903. </parameter>
  81904. <parameter name="path_len" transfer-ownership="none">
  81905. <doc xml:space="preserve">the length of @path, or -1</doc>
  81906. <type name="gint" c:type="gint"/>
  81907. </parameter>
  81908. </parameters>
  81909. </constructor>
  81910. <constructor name="new_with_type"
  81911. c:identifier="g_unix_socket_address_new_with_type"
  81912. version="2.26">
  81913. <doc xml:space="preserve">Creates a new #GUnixSocketAddress of type @type with name @path.
  81914. If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
  81915. calling g_unix_socket_address_new().
  81916. If @type is %G_UNIX_SOCKET_ADDRESS_ANONYMOUS, @path and @path_len will be
  81917. ignored.
  81918. If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
  81919. bytes of @path will be copied to the socket's path, and only those
  81920. bytes will be considered part of the name. (If @path_len is -1,
  81921. then @path is assumed to be NUL-terminated.) For example, if @path
  81922. was "test", then calling g_socket_address_get_native_size() on the
  81923. returned socket would return 7 (2 bytes of overhead, 1 byte for the
  81924. abstract-socket indicator byte, and 4 bytes for the name "test").
  81925. If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
  81926. @path_len bytes of @path will be copied to the socket's path, the
  81927. rest of the path will be padded with 0 bytes, and the entire
  81928. zero-padded buffer will be considered the name. (As above, if
  81929. @path_len is -1, then @path is assumed to be NUL-terminated.) In
  81930. this case, g_socket_address_get_native_size() will always return
  81931. the full size of a `struct sockaddr_un`, although
  81932. g_unix_socket_address_get_path_len() will still return just the
  81933. length of @path.
  81934. %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
  81935. %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
  81936. when connecting to a server created by another process, you must
  81937. use the appropriate type corresponding to how that process created
  81938. its listening socket.</doc>
  81939. <return-value transfer-ownership="full">
  81940. <doc xml:space="preserve">a new #GUnixSocketAddress</doc>
  81941. <type name="SocketAddress" c:type="GSocketAddress*"/>
  81942. </return-value>
  81943. <parameters>
  81944. <parameter name="path" transfer-ownership="none">
  81945. <doc xml:space="preserve">the name</doc>
  81946. <array length="1" zero-terminated="0" c:type="gchar*">
  81947. <type name="gchar"/>
  81948. </array>
  81949. </parameter>
  81950. <parameter name="path_len" transfer-ownership="none">
  81951. <doc xml:space="preserve">the length of @path, or -1</doc>
  81952. <type name="gint" c:type="gint"/>
  81953. </parameter>
  81954. <parameter name="type" transfer-ownership="none">
  81955. <doc xml:space="preserve">a #GUnixSocketAddressType</doc>
  81956. <type name="UnixSocketAddressType"
  81957. c:type="GUnixSocketAddressType"/>
  81958. </parameter>
  81959. </parameters>
  81960. </constructor>
  81961. <function name="abstract_names_supported"
  81962. c:identifier="g_unix_socket_address_abstract_names_supported"
  81963. version="2.22">
  81964. <doc xml:space="preserve">Checks if abstract UNIX domain socket names are supported.</doc>
  81965. <return-value transfer-ownership="none">
  81966. <doc xml:space="preserve">%TRUE if supported, %FALSE otherwise</doc>
  81967. <type name="gboolean" c:type="gboolean"/>
  81968. </return-value>
  81969. </function>
  81970. <method name="get_address_type"
  81971. c:identifier="g_unix_socket_address_get_address_type"
  81972. version="2.26">
  81973. <doc xml:space="preserve">Gets @address's type.</doc>
  81974. <return-value transfer-ownership="none">
  81975. <doc xml:space="preserve">a #GUnixSocketAddressType</doc>
  81976. <type name="UnixSocketAddressType" c:type="GUnixSocketAddressType"/>
  81977. </return-value>
  81978. <parameters>
  81979. <instance-parameter name="address" transfer-ownership="none">
  81980. <doc xml:space="preserve">a #GInetSocketAddress</doc>
  81981. <type name="UnixSocketAddress" c:type="GUnixSocketAddress*"/>
  81982. </instance-parameter>
  81983. </parameters>
  81984. </method>
  81985. <method name="get_is_abstract"
  81986. c:identifier="g_unix_socket_address_get_is_abstract"
  81987. version="2.22"
  81988. deprecated="1">
  81989. <doc xml:space="preserve">Tests if @address is abstract.</doc>
  81990. <doc-deprecated xml:space="preserve">Use g_unix_socket_address_get_address_type()</doc-deprecated>
  81991. <return-value transfer-ownership="none">
  81992. <doc xml:space="preserve">%TRUE if the address is abstract, %FALSE otherwise</doc>
  81993. <type name="gboolean" c:type="gboolean"/>
  81994. </return-value>
  81995. <parameters>
  81996. <instance-parameter name="address" transfer-ownership="none">
  81997. <doc xml:space="preserve">a #GInetSocketAddress</doc>
  81998. <type name="UnixSocketAddress" c:type="GUnixSocketAddress*"/>
  81999. </instance-parameter>
  82000. </parameters>
  82001. </method>
  82002. <method name="get_path"
  82003. c:identifier="g_unix_socket_address_get_path"
  82004. version="2.22">
  82005. <doc xml:space="preserve">Gets @address's path, or for abstract sockets the "name".
  82006. Guaranteed to be zero-terminated, but an abstract socket
  82007. may contain embedded zeros, and thus you should use
  82008. g_unix_socket_address_get_path_len() to get the true length
  82009. of this string.</doc>
  82010. <return-value transfer-ownership="none">
  82011. <doc xml:space="preserve">the path for @address</doc>
  82012. <type name="utf8" c:type="const char*"/>
  82013. </return-value>
  82014. <parameters>
  82015. <instance-parameter name="address" transfer-ownership="none">
  82016. <doc xml:space="preserve">a #GInetSocketAddress</doc>
  82017. <type name="UnixSocketAddress" c:type="GUnixSocketAddress*"/>
  82018. </instance-parameter>
  82019. </parameters>
  82020. </method>
  82021. <method name="get_path_len"
  82022. c:identifier="g_unix_socket_address_get_path_len"
  82023. version="2.22">
  82024. <doc xml:space="preserve">Gets the length of @address's path.
  82025. For details, see g_unix_socket_address_get_path().</doc>
  82026. <return-value transfer-ownership="none">
  82027. <doc xml:space="preserve">the length of the path</doc>
  82028. <type name="gsize" c:type="gsize"/>
  82029. </return-value>
  82030. <parameters>
  82031. <instance-parameter name="address" transfer-ownership="none">
  82032. <doc xml:space="preserve">a #GInetSocketAddress</doc>
  82033. <type name="UnixSocketAddress" c:type="GUnixSocketAddress*"/>
  82034. </instance-parameter>
  82035. </parameters>
  82036. </method>
  82037. <property name="abstract"
  82038. deprecated="1"
  82039. writable="1"
  82040. construct-only="1"
  82041. transfer-ownership="none">
  82042. <doc xml:space="preserve">Whether or not this is an abstract address</doc>
  82043. <doc-deprecated xml:space="preserve">Use #GUnixSocketAddress:address-type, which
  82044. distinguishes between zero-padded and non-zero-padded
  82045. abstract addresses.</doc-deprecated>
  82046. <type name="gboolean" c:type="gboolean"/>
  82047. </property>
  82048. <property name="address-type"
  82049. writable="1"
  82050. construct-only="1"
  82051. transfer-ownership="none">
  82052. <type name="UnixSocketAddressType"/>
  82053. </property>
  82054. <property name="path"
  82055. writable="1"
  82056. construct-only="1"
  82057. transfer-ownership="none">
  82058. <type name="utf8" c:type="gchar*"/>
  82059. </property>
  82060. <property name="path-as-array"
  82061. writable="1"
  82062. construct-only="1"
  82063. transfer-ownership="none">
  82064. <array name="GLib.ByteArray">
  82065. <type name="gpointer" c:type="gpointer"/>
  82066. </array>
  82067. </property>
  82068. <field name="parent_instance">
  82069. <type name="SocketAddress" c:type="GSocketAddress"/>
  82070. </field>
  82071. <field name="priv" readable="0" private="1">
  82072. <type name="UnixSocketAddressPrivate"
  82073. c:type="GUnixSocketAddressPrivate*"/>
  82074. </field>
  82075. </class>
  82076. <record name="UnixSocketAddressClass"
  82077. c:type="GUnixSocketAddressClass"
  82078. glib:is-gtype-struct-for="UnixSocketAddress">
  82079. <field name="parent_class">
  82080. <type name="SocketAddressClass" c:type="GSocketAddressClass"/>
  82081. </field>
  82082. </record>
  82083. <record name="UnixSocketAddressPrivate"
  82084. c:type="GUnixSocketAddressPrivate"
  82085. disguised="1">
  82086. </record>
  82087. <enumeration name="UnixSocketAddressType"
  82088. version="2.26"
  82089. glib:type-name="GUnixSocketAddressType"
  82090. glib:get-type="g_unix_socket_address_type_get_type"
  82091. c:type="GUnixSocketAddressType">
  82092. <doc xml:space="preserve">The type of name used by a #GUnixSocketAddress.
  82093. %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
  82094. socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
  82095. indicates a socket not bound to any name (eg, a client-side socket,
  82096. or a socket created with socketpair()).
  82097. For abstract sockets, there are two incompatible ways of naming
  82098. them; the man pages suggest using the entire `struct sockaddr_un`
  82099. as the name, padding the unused parts of the %sun_path field with
  82100. zeroes; this corresponds to %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED.
  82101. However, many programs instead just use a portion of %sun_path, and
  82102. pass an appropriate smaller length to bind() or connect(). This is
  82103. %G_UNIX_SOCKET_ADDRESS_ABSTRACT.</doc>
  82104. <member name="invalid"
  82105. value="0"
  82106. c:identifier="G_UNIX_SOCKET_ADDRESS_INVALID"
  82107. glib:nick="invalid">
  82108. <doc xml:space="preserve">invalid</doc>
  82109. </member>
  82110. <member name="anonymous"
  82111. value="1"
  82112. c:identifier="G_UNIX_SOCKET_ADDRESS_ANONYMOUS"
  82113. glib:nick="anonymous">
  82114. <doc xml:space="preserve">anonymous</doc>
  82115. </member>
  82116. <member name="path"
  82117. value="2"
  82118. c:identifier="G_UNIX_SOCKET_ADDRESS_PATH"
  82119. glib:nick="path">
  82120. <doc xml:space="preserve">a filesystem path</doc>
  82121. </member>
  82122. <member name="abstract"
  82123. value="3"
  82124. c:identifier="G_UNIX_SOCKET_ADDRESS_ABSTRACT"
  82125. glib:nick="abstract">
  82126. <doc xml:space="preserve">an abstract name</doc>
  82127. </member>
  82128. <member name="abstract_padded"
  82129. value="4"
  82130. c:identifier="G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED"
  82131. glib:nick="abstract-padded">
  82132. <doc xml:space="preserve">an abstract name, 0-padded
  82133. to the full length of a unix socket name</doc>
  82134. </member>
  82135. </enumeration>
  82136. <constant name="VFS_EXTENSION_POINT_NAME"
  82137. value="gio-vfs"
  82138. c:type="G_VFS_EXTENSION_POINT_NAME">
  82139. <doc xml:space="preserve">Extension point for #GVfs functionality.
  82140. See [Extending GIO][extending-gio].</doc>
  82141. <type name="utf8" c:type="gchar*"/>
  82142. </constant>
  82143. <constant name="VOLUME_IDENTIFIER_KIND_CLASS"
  82144. value="class"
  82145. c:type="G_VOLUME_IDENTIFIER_KIND_CLASS">
  82146. <doc xml:space="preserve">The string used to obtain the volume class with g_volume_get_identifier().
  82147. Known volume classes include `device` and `network`. Other classes may
  82148. be added in the future.
  82149. This is intended to be used by applications to classify #GVolume
  82150. instances into different sections - for example a file manager or
  82151. file chooser can use this information to show `network` volumes under
  82152. a "Network" heading and `device` volumes under a "Devices" heading.</doc>
  82153. <type name="utf8" c:type="gchar*"/>
  82154. </constant>
  82155. <constant name="VOLUME_IDENTIFIER_KIND_HAL_UDI"
  82156. value="hal-udi"
  82157. c:type="G_VOLUME_IDENTIFIER_KIND_HAL_UDI">
  82158. <doc xml:space="preserve">The string used to obtain a Hal UDI with g_volume_get_identifier().</doc>
  82159. <type name="utf8" c:type="gchar*"/>
  82160. </constant>
  82161. <constant name="VOLUME_IDENTIFIER_KIND_LABEL"
  82162. value="label"
  82163. c:type="G_VOLUME_IDENTIFIER_KIND_LABEL">
  82164. <doc xml:space="preserve">The string used to obtain a filesystem label with g_volume_get_identifier().</doc>
  82165. <type name="utf8" c:type="gchar*"/>
  82166. </constant>
  82167. <constant name="VOLUME_IDENTIFIER_KIND_NFS_MOUNT"
  82168. value="nfs-mount"
  82169. c:type="G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT">
  82170. <doc xml:space="preserve">The string used to obtain a NFS mount with g_volume_get_identifier().</doc>
  82171. <type name="utf8" c:type="gchar*"/>
  82172. </constant>
  82173. <constant name="VOLUME_IDENTIFIER_KIND_UNIX_DEVICE"
  82174. value="unix-device"
  82175. c:type="G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE">
  82176. <doc xml:space="preserve">The string used to obtain a Unix device path with g_volume_get_identifier().</doc>
  82177. <type name="utf8" c:type="gchar*"/>
  82178. </constant>
  82179. <constant name="VOLUME_IDENTIFIER_KIND_UUID"
  82180. value="uuid"
  82181. c:type="G_VOLUME_IDENTIFIER_KIND_UUID">
  82182. <doc xml:space="preserve">The string used to obtain a UUID with g_volume_get_identifier().</doc>
  82183. <type name="utf8" c:type="gchar*"/>
  82184. </constant>
  82185. <constant name="VOLUME_MONITOR_EXTENSION_POINT_NAME"
  82186. value="gio-volume-monitor"
  82187. c:type="G_VOLUME_MONITOR_EXTENSION_POINT_NAME">
  82188. <doc xml:space="preserve">Extension point for volume monitor functionality.
  82189. See [Extending GIO][extending-gio].</doc>
  82190. <type name="utf8" c:type="gchar*"/>
  82191. </constant>
  82192. <class name="Vfs"
  82193. c:symbol-prefix="vfs"
  82194. c:type="GVfs"
  82195. parent="GObject.Object"
  82196. glib:type-name="GVfs"
  82197. glib:get-type="g_vfs_get_type"
  82198. glib:type-struct="VfsClass">
  82199. <doc xml:space="preserve">Entry point for using GIO functionality.</doc>
  82200. <function name="get_default" c:identifier="g_vfs_get_default">
  82201. <doc xml:space="preserve">Gets the default #GVfs for the system.</doc>
  82202. <return-value transfer-ownership="none">
  82203. <doc xml:space="preserve">a #GVfs.</doc>
  82204. <type name="Vfs" c:type="GVfs*"/>
  82205. </return-value>
  82206. </function>
  82207. <function name="get_local" c:identifier="g_vfs_get_local">
  82208. <doc xml:space="preserve">Gets the local #GVfs for the system.</doc>
  82209. <return-value transfer-ownership="none">
  82210. <doc xml:space="preserve">a #GVfs.</doc>
  82211. <type name="Vfs" c:type="GVfs*"/>
  82212. </return-value>
  82213. </function>
  82214. <virtual-method name="add_writable_namespaces">
  82215. <return-value transfer-ownership="none">
  82216. <type name="none" c:type="void"/>
  82217. </return-value>
  82218. <parameters>
  82219. <instance-parameter name="vfs" transfer-ownership="none">
  82220. <type name="Vfs" c:type="GVfs*"/>
  82221. </instance-parameter>
  82222. <parameter name="list" transfer-ownership="none">
  82223. <type name="FileAttributeInfoList"
  82224. c:type="GFileAttributeInfoList*"/>
  82225. </parameter>
  82226. </parameters>
  82227. </virtual-method>
  82228. <virtual-method name="deserialize_icon" introspectable="0">
  82229. <return-value>
  82230. <type name="Icon" c:type="GIcon*"/>
  82231. </return-value>
  82232. <parameters>
  82233. <instance-parameter name="vfs" transfer-ownership="none">
  82234. <type name="Vfs" c:type="GVfs*"/>
  82235. </instance-parameter>
  82236. <parameter name="value" transfer-ownership="none">
  82237. <type name="GLib.Variant" c:type="GVariant*"/>
  82238. </parameter>
  82239. </parameters>
  82240. </virtual-method>
  82241. <virtual-method name="get_file_for_path" invoker="get_file_for_path">
  82242. <doc xml:space="preserve">Gets a #GFile for @path.</doc>
  82243. <return-value transfer-ownership="full">
  82244. <doc xml:space="preserve">a #GFile.
  82245. Free the returned object with g_object_unref().</doc>
  82246. <type name="File" c:type="GFile*"/>
  82247. </return-value>
  82248. <parameters>
  82249. <instance-parameter name="vfs" transfer-ownership="none">
  82250. <doc xml:space="preserve">a #GVfs.</doc>
  82251. <type name="Vfs" c:type="GVfs*"/>
  82252. </instance-parameter>
  82253. <parameter name="path" transfer-ownership="none">
  82254. <doc xml:space="preserve">a string containing a VFS path.</doc>
  82255. <type name="utf8" c:type="const char*"/>
  82256. </parameter>
  82257. </parameters>
  82258. </virtual-method>
  82259. <virtual-method name="get_file_for_uri" invoker="get_file_for_uri">
  82260. <doc xml:space="preserve">Gets a #GFile for @uri.
  82261. This operation never fails, but the returned object
  82262. might not support any I/O operation if the URI
  82263. is malformed or if the URI scheme is not supported.</doc>
  82264. <return-value transfer-ownership="full">
  82265. <doc xml:space="preserve">a #GFile.
  82266. Free the returned object with g_object_unref().</doc>
  82267. <type name="File" c:type="GFile*"/>
  82268. </return-value>
  82269. <parameters>
  82270. <instance-parameter name="vfs" transfer-ownership="none">
  82271. <doc xml:space="preserve">a#GVfs.</doc>
  82272. <type name="Vfs" c:type="GVfs*"/>
  82273. </instance-parameter>
  82274. <parameter name="uri" transfer-ownership="none">
  82275. <doc xml:space="preserve">a string containing a URI</doc>
  82276. <type name="utf8" c:type="const char*"/>
  82277. </parameter>
  82278. </parameters>
  82279. </virtual-method>
  82280. <virtual-method name="get_supported_uri_schemes"
  82281. invoker="get_supported_uri_schemes">
  82282. <doc xml:space="preserve">Gets a list of URI schemes supported by @vfs.</doc>
  82283. <return-value transfer-ownership="none">
  82284. <doc xml:space="preserve">a %NULL-terminated array of strings.
  82285. The returned array belongs to GIO and must
  82286. not be freed or modified.</doc>
  82287. <array c:type="const gchar* const*">
  82288. <type name="utf8"/>
  82289. </array>
  82290. </return-value>
  82291. <parameters>
  82292. <instance-parameter name="vfs" transfer-ownership="none">
  82293. <doc xml:space="preserve">a #GVfs.</doc>
  82294. <type name="Vfs" c:type="GVfs*"/>
  82295. </instance-parameter>
  82296. </parameters>
  82297. </virtual-method>
  82298. <virtual-method name="is_active" invoker="is_active">
  82299. <doc xml:space="preserve">Checks if the VFS is active.</doc>
  82300. <return-value transfer-ownership="none">
  82301. <doc xml:space="preserve">%TRUE if construction of the @vfs was successful
  82302. and it is now active.</doc>
  82303. <type name="gboolean" c:type="gboolean"/>
  82304. </return-value>
  82305. <parameters>
  82306. <instance-parameter name="vfs" transfer-ownership="none">
  82307. <doc xml:space="preserve">a #GVfs.</doc>
  82308. <type name="Vfs" c:type="GVfs*"/>
  82309. </instance-parameter>
  82310. </parameters>
  82311. </virtual-method>
  82312. <virtual-method name="local_file_add_info">
  82313. <return-value transfer-ownership="none">
  82314. <type name="none" c:type="void"/>
  82315. </return-value>
  82316. <parameters>
  82317. <instance-parameter name="vfs" transfer-ownership="none">
  82318. <type name="Vfs" c:type="GVfs*"/>
  82319. </instance-parameter>
  82320. <parameter name="filename" transfer-ownership="none">
  82321. <type name="utf8" c:type="const char*"/>
  82322. </parameter>
  82323. <parameter name="device" transfer-ownership="none">
  82324. <type name="guint64" c:type="guint64"/>
  82325. </parameter>
  82326. <parameter name="attribute_matcher" transfer-ownership="none">
  82327. <type name="FileAttributeMatcher" c:type="GFileAttributeMatcher*"/>
  82328. </parameter>
  82329. <parameter name="info" transfer-ownership="none">
  82330. <type name="FileInfo" c:type="GFileInfo*"/>
  82331. </parameter>
  82332. <parameter name="cancellable"
  82333. transfer-ownership="none"
  82334. nullable="1"
  82335. allow-none="1">
  82336. <type name="Cancellable" c:type="GCancellable*"/>
  82337. </parameter>
  82338. <parameter name="extra_data"
  82339. transfer-ownership="none"
  82340. nullable="1"
  82341. allow-none="1">
  82342. <type name="gpointer" c:type="gpointer*"/>
  82343. </parameter>
  82344. <parameter name="free_extra_data"
  82345. transfer-ownership="none"
  82346. scope="async">
  82347. <type name="GLib.DestroyNotify" c:type="GDestroyNotify*"/>
  82348. </parameter>
  82349. </parameters>
  82350. </virtual-method>
  82351. <virtual-method name="local_file_moved">
  82352. <return-value transfer-ownership="none">
  82353. <type name="none" c:type="void"/>
  82354. </return-value>
  82355. <parameters>
  82356. <instance-parameter name="vfs" transfer-ownership="none">
  82357. <type name="Vfs" c:type="GVfs*"/>
  82358. </instance-parameter>
  82359. <parameter name="source" transfer-ownership="none">
  82360. <type name="utf8" c:type="const char*"/>
  82361. </parameter>
  82362. <parameter name="dest" transfer-ownership="none">
  82363. <type name="utf8" c:type="const char*"/>
  82364. </parameter>
  82365. </parameters>
  82366. </virtual-method>
  82367. <virtual-method name="local_file_removed">
  82368. <return-value transfer-ownership="none">
  82369. <type name="none" c:type="void"/>
  82370. </return-value>
  82371. <parameters>
  82372. <instance-parameter name="vfs" transfer-ownership="none">
  82373. <type name="Vfs" c:type="GVfs*"/>
  82374. </instance-parameter>
  82375. <parameter name="filename" transfer-ownership="none">
  82376. <type name="utf8" c:type="const char*"/>
  82377. </parameter>
  82378. </parameters>
  82379. </virtual-method>
  82380. <virtual-method name="local_file_set_attributes" throws="1">
  82381. <return-value transfer-ownership="none">
  82382. <type name="gboolean" c:type="gboolean"/>
  82383. </return-value>
  82384. <parameters>
  82385. <instance-parameter name="vfs" transfer-ownership="none">
  82386. <type name="Vfs" c:type="GVfs*"/>
  82387. </instance-parameter>
  82388. <parameter name="filename" transfer-ownership="none">
  82389. <type name="utf8" c:type="const char*"/>
  82390. </parameter>
  82391. <parameter name="info" transfer-ownership="none">
  82392. <type name="FileInfo" c:type="GFileInfo*"/>
  82393. </parameter>
  82394. <parameter name="flags" transfer-ownership="none">
  82395. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  82396. </parameter>
  82397. <parameter name="cancellable"
  82398. transfer-ownership="none"
  82399. nullable="1"
  82400. allow-none="1">
  82401. <type name="Cancellable" c:type="GCancellable*"/>
  82402. </parameter>
  82403. </parameters>
  82404. </virtual-method>
  82405. <virtual-method name="parse_name" invoker="parse_name">
  82406. <doc xml:space="preserve">This operation never fails, but the returned object might
  82407. not support any I/O operations if the @parse_name cannot
  82408. be parsed by the #GVfs module.</doc>
  82409. <return-value transfer-ownership="full">
  82410. <doc xml:space="preserve">a #GFile for the given @parse_name.
  82411. Free the returned object with g_object_unref().</doc>
  82412. <type name="File" c:type="GFile*"/>
  82413. </return-value>
  82414. <parameters>
  82415. <instance-parameter name="vfs" transfer-ownership="none">
  82416. <doc xml:space="preserve">a #GVfs.</doc>
  82417. <type name="Vfs" c:type="GVfs*"/>
  82418. </instance-parameter>
  82419. <parameter name="parse_name" transfer-ownership="none">
  82420. <doc xml:space="preserve">a string to be parsed by the VFS module.</doc>
  82421. <type name="utf8" c:type="const char*"/>
  82422. </parameter>
  82423. </parameters>
  82424. </virtual-method>
  82425. <method name="get_file_for_path" c:identifier="g_vfs_get_file_for_path">
  82426. <doc xml:space="preserve">Gets a #GFile for @path.</doc>
  82427. <return-value transfer-ownership="full">
  82428. <doc xml:space="preserve">a #GFile.
  82429. Free the returned object with g_object_unref().</doc>
  82430. <type name="File" c:type="GFile*"/>
  82431. </return-value>
  82432. <parameters>
  82433. <instance-parameter name="vfs" transfer-ownership="none">
  82434. <doc xml:space="preserve">a #GVfs.</doc>
  82435. <type name="Vfs" c:type="GVfs*"/>
  82436. </instance-parameter>
  82437. <parameter name="path" transfer-ownership="none">
  82438. <doc xml:space="preserve">a string containing a VFS path.</doc>
  82439. <type name="utf8" c:type="const char*"/>
  82440. </parameter>
  82441. </parameters>
  82442. </method>
  82443. <method name="get_file_for_uri" c:identifier="g_vfs_get_file_for_uri">
  82444. <doc xml:space="preserve">Gets a #GFile for @uri.
  82445. This operation never fails, but the returned object
  82446. might not support any I/O operation if the URI
  82447. is malformed or if the URI scheme is not supported.</doc>
  82448. <return-value transfer-ownership="full">
  82449. <doc xml:space="preserve">a #GFile.
  82450. Free the returned object with g_object_unref().</doc>
  82451. <type name="File" c:type="GFile*"/>
  82452. </return-value>
  82453. <parameters>
  82454. <instance-parameter name="vfs" transfer-ownership="none">
  82455. <doc xml:space="preserve">a#GVfs.</doc>
  82456. <type name="Vfs" c:type="GVfs*"/>
  82457. </instance-parameter>
  82458. <parameter name="uri" transfer-ownership="none">
  82459. <doc xml:space="preserve">a string containing a URI</doc>
  82460. <type name="utf8" c:type="const char*"/>
  82461. </parameter>
  82462. </parameters>
  82463. </method>
  82464. <method name="get_supported_uri_schemes"
  82465. c:identifier="g_vfs_get_supported_uri_schemes">
  82466. <doc xml:space="preserve">Gets a list of URI schemes supported by @vfs.</doc>
  82467. <return-value transfer-ownership="none">
  82468. <doc xml:space="preserve">a %NULL-terminated array of strings.
  82469. The returned array belongs to GIO and must
  82470. not be freed or modified.</doc>
  82471. <array c:type="const gchar* const*">
  82472. <type name="utf8"/>
  82473. </array>
  82474. </return-value>
  82475. <parameters>
  82476. <instance-parameter name="vfs" transfer-ownership="none">
  82477. <doc xml:space="preserve">a #GVfs.</doc>
  82478. <type name="Vfs" c:type="GVfs*"/>
  82479. </instance-parameter>
  82480. </parameters>
  82481. </method>
  82482. <method name="is_active" c:identifier="g_vfs_is_active">
  82483. <doc xml:space="preserve">Checks if the VFS is active.</doc>
  82484. <return-value transfer-ownership="none">
  82485. <doc xml:space="preserve">%TRUE if construction of the @vfs was successful
  82486. and it is now active.</doc>
  82487. <type name="gboolean" c:type="gboolean"/>
  82488. </return-value>
  82489. <parameters>
  82490. <instance-parameter name="vfs" transfer-ownership="none">
  82491. <doc xml:space="preserve">a #GVfs.</doc>
  82492. <type name="Vfs" c:type="GVfs*"/>
  82493. </instance-parameter>
  82494. </parameters>
  82495. </method>
  82496. <method name="parse_name" c:identifier="g_vfs_parse_name">
  82497. <doc xml:space="preserve">This operation never fails, but the returned object might
  82498. not support any I/O operations if the @parse_name cannot
  82499. be parsed by the #GVfs module.</doc>
  82500. <return-value transfer-ownership="full">
  82501. <doc xml:space="preserve">a #GFile for the given @parse_name.
  82502. Free the returned object with g_object_unref().</doc>
  82503. <type name="File" c:type="GFile*"/>
  82504. </return-value>
  82505. <parameters>
  82506. <instance-parameter name="vfs" transfer-ownership="none">
  82507. <doc xml:space="preserve">a #GVfs.</doc>
  82508. <type name="Vfs" c:type="GVfs*"/>
  82509. </instance-parameter>
  82510. <parameter name="parse_name" transfer-ownership="none">
  82511. <doc xml:space="preserve">a string to be parsed by the VFS module.</doc>
  82512. <type name="utf8" c:type="const char*"/>
  82513. </parameter>
  82514. </parameters>
  82515. </method>
  82516. <field name="parent_instance">
  82517. <type name="GObject.Object" c:type="GObject"/>
  82518. </field>
  82519. </class>
  82520. <record name="VfsClass" c:type="GVfsClass" glib:is-gtype-struct-for="Vfs">
  82521. <field name="parent_class">
  82522. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  82523. </field>
  82524. <field name="is_active">
  82525. <callback name="is_active">
  82526. <return-value transfer-ownership="none">
  82527. <doc xml:space="preserve">%TRUE if construction of the @vfs was successful
  82528. and it is now active.</doc>
  82529. <type name="gboolean" c:type="gboolean"/>
  82530. </return-value>
  82531. <parameters>
  82532. <parameter name="vfs" transfer-ownership="none">
  82533. <doc xml:space="preserve">a #GVfs.</doc>
  82534. <type name="Vfs" c:type="GVfs*"/>
  82535. </parameter>
  82536. </parameters>
  82537. </callback>
  82538. </field>
  82539. <field name="get_file_for_path">
  82540. <callback name="get_file_for_path">
  82541. <return-value transfer-ownership="full">
  82542. <doc xml:space="preserve">a #GFile.
  82543. Free the returned object with g_object_unref().</doc>
  82544. <type name="File" c:type="GFile*"/>
  82545. </return-value>
  82546. <parameters>
  82547. <parameter name="vfs" transfer-ownership="none">
  82548. <doc xml:space="preserve">a #GVfs.</doc>
  82549. <type name="Vfs" c:type="GVfs*"/>
  82550. </parameter>
  82551. <parameter name="path" transfer-ownership="none">
  82552. <doc xml:space="preserve">a string containing a VFS path.</doc>
  82553. <type name="utf8" c:type="const char*"/>
  82554. </parameter>
  82555. </parameters>
  82556. </callback>
  82557. </field>
  82558. <field name="get_file_for_uri">
  82559. <callback name="get_file_for_uri">
  82560. <return-value transfer-ownership="full">
  82561. <doc xml:space="preserve">a #GFile.
  82562. Free the returned object with g_object_unref().</doc>
  82563. <type name="File" c:type="GFile*"/>
  82564. </return-value>
  82565. <parameters>
  82566. <parameter name="vfs" transfer-ownership="none">
  82567. <doc xml:space="preserve">a#GVfs.</doc>
  82568. <type name="Vfs" c:type="GVfs*"/>
  82569. </parameter>
  82570. <parameter name="uri" transfer-ownership="none">
  82571. <doc xml:space="preserve">a string containing a URI</doc>
  82572. <type name="utf8" c:type="const char*"/>
  82573. </parameter>
  82574. </parameters>
  82575. </callback>
  82576. </field>
  82577. <field name="get_supported_uri_schemes">
  82578. <callback name="get_supported_uri_schemes">
  82579. <return-value transfer-ownership="none">
  82580. <doc xml:space="preserve">a %NULL-terminated array of strings.
  82581. The returned array belongs to GIO and must
  82582. not be freed or modified.</doc>
  82583. <array c:type="const gchar* const*">
  82584. <type name="utf8"/>
  82585. </array>
  82586. </return-value>
  82587. <parameters>
  82588. <parameter name="vfs" transfer-ownership="none">
  82589. <doc xml:space="preserve">a #GVfs.</doc>
  82590. <type name="Vfs" c:type="GVfs*"/>
  82591. </parameter>
  82592. </parameters>
  82593. </callback>
  82594. </field>
  82595. <field name="parse_name">
  82596. <callback name="parse_name">
  82597. <return-value transfer-ownership="full">
  82598. <doc xml:space="preserve">a #GFile for the given @parse_name.
  82599. Free the returned object with g_object_unref().</doc>
  82600. <type name="File" c:type="GFile*"/>
  82601. </return-value>
  82602. <parameters>
  82603. <parameter name="vfs" transfer-ownership="none">
  82604. <doc xml:space="preserve">a #GVfs.</doc>
  82605. <type name="Vfs" c:type="GVfs*"/>
  82606. </parameter>
  82607. <parameter name="parse_name" transfer-ownership="none">
  82608. <doc xml:space="preserve">a string to be parsed by the VFS module.</doc>
  82609. <type name="utf8" c:type="const char*"/>
  82610. </parameter>
  82611. </parameters>
  82612. </callback>
  82613. </field>
  82614. <field name="local_file_add_info">
  82615. <callback name="local_file_add_info">
  82616. <return-value transfer-ownership="none">
  82617. <type name="none" c:type="void"/>
  82618. </return-value>
  82619. <parameters>
  82620. <parameter name="vfs" transfer-ownership="none">
  82621. <type name="Vfs" c:type="GVfs*"/>
  82622. </parameter>
  82623. <parameter name="filename" transfer-ownership="none">
  82624. <type name="utf8" c:type="const char*"/>
  82625. </parameter>
  82626. <parameter name="device" transfer-ownership="none">
  82627. <type name="guint64" c:type="guint64"/>
  82628. </parameter>
  82629. <parameter name="attribute_matcher" transfer-ownership="none">
  82630. <type name="FileAttributeMatcher"
  82631. c:type="GFileAttributeMatcher*"/>
  82632. </parameter>
  82633. <parameter name="info" transfer-ownership="none">
  82634. <type name="FileInfo" c:type="GFileInfo*"/>
  82635. </parameter>
  82636. <parameter name="cancellable"
  82637. transfer-ownership="none"
  82638. nullable="1"
  82639. allow-none="1">
  82640. <type name="Cancellable" c:type="GCancellable*"/>
  82641. </parameter>
  82642. <parameter name="extra_data"
  82643. transfer-ownership="none"
  82644. nullable="1"
  82645. allow-none="1">
  82646. <type name="gpointer" c:type="gpointer*"/>
  82647. </parameter>
  82648. <parameter name="free_extra_data"
  82649. transfer-ownership="none"
  82650. scope="async">
  82651. <type name="GLib.DestroyNotify" c:type="GDestroyNotify*"/>
  82652. </parameter>
  82653. </parameters>
  82654. </callback>
  82655. </field>
  82656. <field name="add_writable_namespaces">
  82657. <callback name="add_writable_namespaces">
  82658. <return-value transfer-ownership="none">
  82659. <type name="none" c:type="void"/>
  82660. </return-value>
  82661. <parameters>
  82662. <parameter name="vfs" transfer-ownership="none">
  82663. <type name="Vfs" c:type="GVfs*"/>
  82664. </parameter>
  82665. <parameter name="list" transfer-ownership="none">
  82666. <type name="FileAttributeInfoList"
  82667. c:type="GFileAttributeInfoList*"/>
  82668. </parameter>
  82669. </parameters>
  82670. </callback>
  82671. </field>
  82672. <field name="local_file_set_attributes">
  82673. <callback name="local_file_set_attributes" throws="1">
  82674. <return-value transfer-ownership="none">
  82675. <type name="gboolean" c:type="gboolean"/>
  82676. </return-value>
  82677. <parameters>
  82678. <parameter name="vfs" transfer-ownership="none">
  82679. <type name="Vfs" c:type="GVfs*"/>
  82680. </parameter>
  82681. <parameter name="filename" transfer-ownership="none">
  82682. <type name="utf8" c:type="const char*"/>
  82683. </parameter>
  82684. <parameter name="info" transfer-ownership="none">
  82685. <type name="FileInfo" c:type="GFileInfo*"/>
  82686. </parameter>
  82687. <parameter name="flags" transfer-ownership="none">
  82688. <type name="FileQueryInfoFlags" c:type="GFileQueryInfoFlags"/>
  82689. </parameter>
  82690. <parameter name="cancellable"
  82691. transfer-ownership="none"
  82692. nullable="1"
  82693. allow-none="1">
  82694. <type name="Cancellable" c:type="GCancellable*"/>
  82695. </parameter>
  82696. </parameters>
  82697. </callback>
  82698. </field>
  82699. <field name="local_file_removed">
  82700. <callback name="local_file_removed">
  82701. <return-value transfer-ownership="none">
  82702. <type name="none" c:type="void"/>
  82703. </return-value>
  82704. <parameters>
  82705. <parameter name="vfs" transfer-ownership="none">
  82706. <type name="Vfs" c:type="GVfs*"/>
  82707. </parameter>
  82708. <parameter name="filename" transfer-ownership="none">
  82709. <type name="utf8" c:type="const char*"/>
  82710. </parameter>
  82711. </parameters>
  82712. </callback>
  82713. </field>
  82714. <field name="local_file_moved">
  82715. <callback name="local_file_moved">
  82716. <return-value transfer-ownership="none">
  82717. <type name="none" c:type="void"/>
  82718. </return-value>
  82719. <parameters>
  82720. <parameter name="vfs" transfer-ownership="none">
  82721. <type name="Vfs" c:type="GVfs*"/>
  82722. </parameter>
  82723. <parameter name="source" transfer-ownership="none">
  82724. <type name="utf8" c:type="const char*"/>
  82725. </parameter>
  82726. <parameter name="dest" transfer-ownership="none">
  82727. <type name="utf8" c:type="const char*"/>
  82728. </parameter>
  82729. </parameters>
  82730. </callback>
  82731. </field>
  82732. <field name="deserialize_icon" introspectable="0">
  82733. <callback name="deserialize_icon" introspectable="0">
  82734. <return-value>
  82735. <type name="Icon" c:type="GIcon*"/>
  82736. </return-value>
  82737. <parameters>
  82738. <parameter name="vfs" transfer-ownership="none">
  82739. <type name="Vfs" c:type="GVfs*"/>
  82740. </parameter>
  82741. <parameter name="value" transfer-ownership="none">
  82742. <type name="GLib.Variant" c:type="GVariant*"/>
  82743. </parameter>
  82744. </parameters>
  82745. </callback>
  82746. </field>
  82747. <field name="_g_reserved1" introspectable="0">
  82748. <callback name="_g_reserved1">
  82749. <return-value transfer-ownership="none">
  82750. <type name="none" c:type="void"/>
  82751. </return-value>
  82752. </callback>
  82753. </field>
  82754. <field name="_g_reserved2" introspectable="0">
  82755. <callback name="_g_reserved2">
  82756. <return-value transfer-ownership="none">
  82757. <type name="none" c:type="void"/>
  82758. </return-value>
  82759. </callback>
  82760. </field>
  82761. <field name="_g_reserved3" introspectable="0">
  82762. <callback name="_g_reserved3">
  82763. <return-value transfer-ownership="none">
  82764. <type name="none" c:type="void"/>
  82765. </return-value>
  82766. </callback>
  82767. </field>
  82768. <field name="_g_reserved4" introspectable="0">
  82769. <callback name="_g_reserved4">
  82770. <return-value transfer-ownership="none">
  82771. <type name="none" c:type="void"/>
  82772. </return-value>
  82773. </callback>
  82774. </field>
  82775. <field name="_g_reserved5" introspectable="0">
  82776. <callback name="_g_reserved5">
  82777. <return-value transfer-ownership="none">
  82778. <type name="none" c:type="void"/>
  82779. </return-value>
  82780. </callback>
  82781. </field>
  82782. <field name="_g_reserved6" introspectable="0">
  82783. <callback name="_g_reserved6">
  82784. <return-value transfer-ownership="none">
  82785. <type name="none" c:type="void"/>
  82786. </return-value>
  82787. </callback>
  82788. </field>
  82789. </record>
  82790. <interface name="Volume"
  82791. c:symbol-prefix="volume"
  82792. c:type="GVolume"
  82793. glib:type-name="GVolume"
  82794. glib:get-type="g_volume_get_type"
  82795. glib:type-struct="VolumeIface">
  82796. <doc xml:space="preserve">The #GVolume interface represents user-visible objects that can be
  82797. mounted. Note, when porting from GnomeVFS, #GVolume is the moral
  82798. equivalent of #GnomeVFSDrive.
  82799. Mounting a #GVolume instance is an asynchronous operation. For more
  82800. information about asynchronous operations, see #GAsyncResult and
  82801. #GTask. To mount a #GVolume, first call g_volume_mount() with (at
  82802. least) the #GVolume instance, optionally a #GMountOperation object
  82803. and a #GAsyncReadyCallback.
  82804. Typically, one will only want to pass %NULL for the
  82805. #GMountOperation if automounting all volumes when a desktop session
  82806. starts since it's not desirable to put up a lot of dialogs asking
  82807. for credentials.
  82808. The callback will be fired when the operation has resolved (either
  82809. with success or failure), and a #GAsyncReady structure will be
  82810. passed to the callback. That callback should then call
  82811. g_volume_mount_finish() with the #GVolume instance and the
  82812. #GAsyncReady data to see if the operation was completed
  82813. successfully. If an @error is present when g_volume_mount_finish()
  82814. is called, then it will be filled with any error information.
  82815. ## Volume Identifiers # {#volume-identifier}
  82816. It is sometimes necessary to directly access the underlying
  82817. operating system object behind a volume (e.g. for passing a volume
  82818. to an application via the commandline). For this purpose, GIO
  82819. allows to obtain an 'identifier' for the volume. There can be
  82820. different kinds of identifiers, such as Hal UDIs, filesystem labels,
  82821. traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined
  82822. strings as names for the different kinds of identifiers:
  82823. #G_VOLUME_IDENTIFIER_KIND_HAL_UDI, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc.
  82824. Use g_volume_get_identifier() to obtain an identifier for a volume.
  82825. Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
  82826. when the gvfs hal volume monitor is in use. Other volume monitors
  82827. will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
  82828. identifier, which can be used to obtain a hal device by means of
  82829. libhal_manager_find_device_string_match().</doc>
  82830. <virtual-method name="can_eject" invoker="can_eject">
  82831. <doc xml:space="preserve">Checks if a volume can be ejected.</doc>
  82832. <return-value transfer-ownership="none">
  82833. <doc xml:space="preserve">%TRUE if the @volume can be ejected. %FALSE otherwise</doc>
  82834. <type name="gboolean" c:type="gboolean"/>
  82835. </return-value>
  82836. <parameters>
  82837. <instance-parameter name="volume" transfer-ownership="none">
  82838. <doc xml:space="preserve">a #GVolume</doc>
  82839. <type name="Volume" c:type="GVolume*"/>
  82840. </instance-parameter>
  82841. </parameters>
  82842. </virtual-method>
  82843. <virtual-method name="can_mount" invoker="can_mount">
  82844. <doc xml:space="preserve">Checks if a volume can be mounted.</doc>
  82845. <return-value transfer-ownership="none">
  82846. <doc xml:space="preserve">%TRUE if the @volume can be mounted. %FALSE otherwise</doc>
  82847. <type name="gboolean" c:type="gboolean"/>
  82848. </return-value>
  82849. <parameters>
  82850. <instance-parameter name="volume" transfer-ownership="none">
  82851. <doc xml:space="preserve">a #GVolume</doc>
  82852. <type name="Volume" c:type="GVolume*"/>
  82853. </instance-parameter>
  82854. </parameters>
  82855. </virtual-method>
  82856. <virtual-method name="changed">
  82857. <return-value transfer-ownership="none">
  82858. <type name="none" c:type="void"/>
  82859. </return-value>
  82860. <parameters>
  82861. <instance-parameter name="volume" transfer-ownership="none">
  82862. <type name="Volume" c:type="GVolume*"/>
  82863. </instance-parameter>
  82864. </parameters>
  82865. </virtual-method>
  82866. <virtual-method name="eject"
  82867. invoker="eject"
  82868. deprecated="1"
  82869. deprecated-version="2.22">
  82870. <doc xml:space="preserve">Ejects a volume. This is an asynchronous operation, and is
  82871. finished by calling g_volume_eject_finish() with the @volume
  82872. and #GAsyncResult returned in the @callback.</doc>
  82873. <doc-deprecated xml:space="preserve">Use g_volume_eject_with_operation() instead.</doc-deprecated>
  82874. <return-value transfer-ownership="none">
  82875. <type name="none" c:type="void"/>
  82876. </return-value>
  82877. <parameters>
  82878. <instance-parameter name="volume" transfer-ownership="none">
  82879. <doc xml:space="preserve">a #GVolume</doc>
  82880. <type name="Volume" c:type="GVolume*"/>
  82881. </instance-parameter>
  82882. <parameter name="flags" transfer-ownership="none">
  82883. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  82884. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  82885. </parameter>
  82886. <parameter name="cancellable"
  82887. transfer-ownership="none"
  82888. nullable="1"
  82889. allow-none="1">
  82890. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  82891. <type name="Cancellable" c:type="GCancellable*"/>
  82892. </parameter>
  82893. <parameter name="callback"
  82894. transfer-ownership="none"
  82895. nullable="1"
  82896. allow-none="1"
  82897. scope="async"
  82898. closure="3">
  82899. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  82900. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  82901. </parameter>
  82902. <parameter name="user_data"
  82903. transfer-ownership="none"
  82904. nullable="1"
  82905. allow-none="1"
  82906. closure="3">
  82907. <doc xml:space="preserve">user data that gets passed to @callback</doc>
  82908. <type name="gpointer" c:type="gpointer"/>
  82909. </parameter>
  82910. </parameters>
  82911. </virtual-method>
  82912. <virtual-method name="eject_finish"
  82913. invoker="eject_finish"
  82914. deprecated="1"
  82915. deprecated-version="2.22"
  82916. throws="1">
  82917. <doc xml:space="preserve">Finishes ejecting a volume. If any errors occurred during the operation,
  82918. @error will be set to contain the errors and %FALSE will be returned.</doc>
  82919. <doc-deprecated xml:space="preserve">Use g_volume_eject_with_operation_finish() instead.</doc-deprecated>
  82920. <return-value transfer-ownership="none">
  82921. <doc xml:space="preserve">%TRUE, %FALSE if operation failed</doc>
  82922. <type name="gboolean" c:type="gboolean"/>
  82923. </return-value>
  82924. <parameters>
  82925. <instance-parameter name="volume" transfer-ownership="none">
  82926. <doc xml:space="preserve">pointer to a #GVolume</doc>
  82927. <type name="Volume" c:type="GVolume*"/>
  82928. </instance-parameter>
  82929. <parameter name="result" transfer-ownership="none">
  82930. <doc xml:space="preserve">a #GAsyncResult</doc>
  82931. <type name="AsyncResult" c:type="GAsyncResult*"/>
  82932. </parameter>
  82933. </parameters>
  82934. </virtual-method>
  82935. <virtual-method name="eject_with_operation"
  82936. invoker="eject_with_operation"
  82937. version="2.22">
  82938. <doc xml:space="preserve">Ejects a volume. This is an asynchronous operation, and is
  82939. finished by calling g_volume_eject_with_operation_finish() with the @volume
  82940. and #GAsyncResult data returned in the @callback.</doc>
  82941. <return-value transfer-ownership="none">
  82942. <type name="none" c:type="void"/>
  82943. </return-value>
  82944. <parameters>
  82945. <instance-parameter name="volume" transfer-ownership="none">
  82946. <doc xml:space="preserve">a #GVolume</doc>
  82947. <type name="Volume" c:type="GVolume*"/>
  82948. </instance-parameter>
  82949. <parameter name="flags" transfer-ownership="none">
  82950. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  82951. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  82952. </parameter>
  82953. <parameter name="mount_operation"
  82954. transfer-ownership="none"
  82955. nullable="1"
  82956. allow-none="1">
  82957. <doc xml:space="preserve">a #GMountOperation or %NULL to
  82958. avoid user interaction</doc>
  82959. <type name="MountOperation" c:type="GMountOperation*"/>
  82960. </parameter>
  82961. <parameter name="cancellable"
  82962. transfer-ownership="none"
  82963. nullable="1"
  82964. allow-none="1">
  82965. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  82966. <type name="Cancellable" c:type="GCancellable*"/>
  82967. </parameter>
  82968. <parameter name="callback"
  82969. transfer-ownership="none"
  82970. nullable="1"
  82971. allow-none="1"
  82972. scope="async"
  82973. closure="4">
  82974. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  82975. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  82976. </parameter>
  82977. <parameter name="user_data"
  82978. transfer-ownership="none"
  82979. nullable="1"
  82980. allow-none="1"
  82981. closure="4">
  82982. <doc xml:space="preserve">user data passed to @callback</doc>
  82983. <type name="gpointer" c:type="gpointer"/>
  82984. </parameter>
  82985. </parameters>
  82986. </virtual-method>
  82987. <virtual-method name="eject_with_operation_finish"
  82988. invoker="eject_with_operation_finish"
  82989. version="2.22"
  82990. throws="1">
  82991. <doc xml:space="preserve">Finishes ejecting a volume. If any errors occurred during the operation,
  82992. @error will be set to contain the errors and %FALSE will be returned.</doc>
  82993. <return-value transfer-ownership="none">
  82994. <doc xml:space="preserve">%TRUE if the volume was successfully ejected. %FALSE otherwise</doc>
  82995. <type name="gboolean" c:type="gboolean"/>
  82996. </return-value>
  82997. <parameters>
  82998. <instance-parameter name="volume" transfer-ownership="none">
  82999. <doc xml:space="preserve">a #GVolume</doc>
  83000. <type name="Volume" c:type="GVolume*"/>
  83001. </instance-parameter>
  83002. <parameter name="result" transfer-ownership="none">
  83003. <doc xml:space="preserve">a #GAsyncResult</doc>
  83004. <type name="AsyncResult" c:type="GAsyncResult*"/>
  83005. </parameter>
  83006. </parameters>
  83007. </virtual-method>
  83008. <virtual-method name="enumerate_identifiers"
  83009. invoker="enumerate_identifiers">
  83010. <doc xml:space="preserve">Gets the kinds of [identifiers][volume-identifier] that @volume has.
  83011. Use g_volume_get_identifier() to obtain the identifiers themselves.</doc>
  83012. <return-value transfer-ownership="full">
  83013. <doc xml:space="preserve">a %NULL-terminated array
  83014. of strings containing kinds of identifiers. Use g_strfreev() to free.</doc>
  83015. <array c:type="char**">
  83016. <type name="utf8"/>
  83017. </array>
  83018. </return-value>
  83019. <parameters>
  83020. <instance-parameter name="volume" transfer-ownership="none">
  83021. <doc xml:space="preserve">a #GVolume</doc>
  83022. <type name="Volume" c:type="GVolume*"/>
  83023. </instance-parameter>
  83024. </parameters>
  83025. </virtual-method>
  83026. <virtual-method name="get_activation_root"
  83027. invoker="get_activation_root"
  83028. version="2.18">
  83029. <doc xml:space="preserve">Gets the activation root for a #GVolume if it is known ahead of
  83030. mount time. Returns %NULL otherwise. If not %NULL and if @volume
  83031. is mounted, then the result of g_mount_get_root() on the
  83032. #GMount object obtained from g_volume_get_mount() will always
  83033. either be equal or a prefix of what this function returns. In
  83034. other words, in code
  83035. |[&lt;!-- language="C" --&gt;
  83036. GMount *mount;
  83037. GFile *mount_root
  83038. GFile *volume_activation_root;
  83039. mount = g_volume_get_mount (volume); // mounted, so never NULL
  83040. mount_root = g_mount_get_root (mount);
  83041. volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL
  83042. ]|
  83043. then the expression
  83044. |[&lt;!-- language="C" --&gt;
  83045. (g_file_has_prefix (volume_activation_root, mount_root) ||
  83046. g_file_equal (volume_activation_root, mount_root))
  83047. ]|
  83048. will always be %TRUE.
  83049. Activation roots are typically used in #GVolumeMonitor
  83050. implementations to find the underlying mount to shadow, see
  83051. g_mount_is_shadowed() for more details.</doc>
  83052. <return-value transfer-ownership="full" nullable="1">
  83053. <doc xml:space="preserve">the activation root of @volume
  83054. or %NULL. Use g_object_unref() to free.</doc>
  83055. <type name="File" c:type="GFile*"/>
  83056. </return-value>
  83057. <parameters>
  83058. <instance-parameter name="volume" transfer-ownership="none">
  83059. <doc xml:space="preserve">a #GVolume</doc>
  83060. <type name="Volume" c:type="GVolume*"/>
  83061. </instance-parameter>
  83062. </parameters>
  83063. </virtual-method>
  83064. <virtual-method name="get_drive" invoker="get_drive">
  83065. <doc xml:space="preserve">Gets the drive for the @volume.</doc>
  83066. <return-value transfer-ownership="full">
  83067. <doc xml:space="preserve">a #GDrive or %NULL if @volume is not
  83068. associated with a drive. The returned object should be unreffed
  83069. with g_object_unref() when no longer needed.</doc>
  83070. <type name="Drive" c:type="GDrive*"/>
  83071. </return-value>
  83072. <parameters>
  83073. <instance-parameter name="volume" transfer-ownership="none">
  83074. <doc xml:space="preserve">a #GVolume</doc>
  83075. <type name="Volume" c:type="GVolume*"/>
  83076. </instance-parameter>
  83077. </parameters>
  83078. </virtual-method>
  83079. <virtual-method name="get_icon" invoker="get_icon">
  83080. <doc xml:space="preserve">Gets the icon for @volume.</doc>
  83081. <return-value transfer-ownership="full">
  83082. <doc xml:space="preserve">a #GIcon.
  83083. The returned object should be unreffed with g_object_unref()
  83084. when no longer needed.</doc>
  83085. <type name="Icon" c:type="GIcon*"/>
  83086. </return-value>
  83087. <parameters>
  83088. <instance-parameter name="volume" transfer-ownership="none">
  83089. <doc xml:space="preserve">a #GVolume</doc>
  83090. <type name="Volume" c:type="GVolume*"/>
  83091. </instance-parameter>
  83092. </parameters>
  83093. </virtual-method>
  83094. <virtual-method name="get_identifier" invoker="get_identifier">
  83095. <doc xml:space="preserve">Gets the identifier of the given kind for @volume.
  83096. See the [introduction][volume-identifier] for more
  83097. information about volume identifiers.</doc>
  83098. <return-value transfer-ownership="full">
  83099. <doc xml:space="preserve">a newly allocated string containing the
  83100. requested identfier, or %NULL if the #GVolume
  83101. doesn't have this kind of identifier</doc>
  83102. <type name="utf8" c:type="char*"/>
  83103. </return-value>
  83104. <parameters>
  83105. <instance-parameter name="volume" transfer-ownership="none">
  83106. <doc xml:space="preserve">a #GVolume</doc>
  83107. <type name="Volume" c:type="GVolume*"/>
  83108. </instance-parameter>
  83109. <parameter name="kind" transfer-ownership="none">
  83110. <doc xml:space="preserve">the kind of identifier to return</doc>
  83111. <type name="utf8" c:type="const char*"/>
  83112. </parameter>
  83113. </parameters>
  83114. </virtual-method>
  83115. <virtual-method name="get_mount" invoker="get_mount">
  83116. <doc xml:space="preserve">Gets the mount for the @volume.</doc>
  83117. <return-value transfer-ownership="full">
  83118. <doc xml:space="preserve">a #GMount or %NULL if @volume isn't mounted.
  83119. The returned object should be unreffed with g_object_unref()
  83120. when no longer needed.</doc>
  83121. <type name="Mount" c:type="GMount*"/>
  83122. </return-value>
  83123. <parameters>
  83124. <instance-parameter name="volume" transfer-ownership="none">
  83125. <doc xml:space="preserve">a #GVolume</doc>
  83126. <type name="Volume" c:type="GVolume*"/>
  83127. </instance-parameter>
  83128. </parameters>
  83129. </virtual-method>
  83130. <virtual-method name="get_name" invoker="get_name">
  83131. <doc xml:space="preserve">Gets the name of @volume.</doc>
  83132. <return-value transfer-ownership="full">
  83133. <doc xml:space="preserve">the name for the given @volume. The returned string should
  83134. be freed with g_free() when no longer needed.</doc>
  83135. <type name="utf8" c:type="char*"/>
  83136. </return-value>
  83137. <parameters>
  83138. <instance-parameter name="volume" transfer-ownership="none">
  83139. <doc xml:space="preserve">a #GVolume</doc>
  83140. <type name="Volume" c:type="GVolume*"/>
  83141. </instance-parameter>
  83142. </parameters>
  83143. </virtual-method>
  83144. <virtual-method name="get_sort_key"
  83145. invoker="get_sort_key"
  83146. version="2.32">
  83147. <doc xml:space="preserve">Gets the sort key for @volume, if any.</doc>
  83148. <return-value transfer-ownership="none">
  83149. <doc xml:space="preserve">Sorting key for @volume or %NULL if no such key is available</doc>
  83150. <type name="utf8" c:type="const gchar*"/>
  83151. </return-value>
  83152. <parameters>
  83153. <instance-parameter name="volume" transfer-ownership="none">
  83154. <doc xml:space="preserve">a #GVolume</doc>
  83155. <type name="Volume" c:type="GVolume*"/>
  83156. </instance-parameter>
  83157. </parameters>
  83158. </virtual-method>
  83159. <virtual-method name="get_symbolic_icon"
  83160. invoker="get_symbolic_icon"
  83161. version="2.34">
  83162. <doc xml:space="preserve">Gets the symbolic icon for @volume.</doc>
  83163. <return-value transfer-ownership="full">
  83164. <doc xml:space="preserve">a #GIcon.
  83165. The returned object should be unreffed with g_object_unref()
  83166. when no longer needed.</doc>
  83167. <type name="Icon" c:type="GIcon*"/>
  83168. </return-value>
  83169. <parameters>
  83170. <instance-parameter name="volume" transfer-ownership="none">
  83171. <doc xml:space="preserve">a #GVolume</doc>
  83172. <type name="Volume" c:type="GVolume*"/>
  83173. </instance-parameter>
  83174. </parameters>
  83175. </virtual-method>
  83176. <virtual-method name="get_uuid" invoker="get_uuid">
  83177. <doc xml:space="preserve">Gets the UUID for the @volume. The reference is typically based on
  83178. the file system UUID for the volume in question and should be
  83179. considered an opaque string. Returns %NULL if there is no UUID
  83180. available.</doc>
  83181. <return-value transfer-ownership="full">
  83182. <doc xml:space="preserve">the UUID for @volume or %NULL if no UUID can be computed.
  83183. The returned string should be freed with g_free()
  83184. when no longer needed.</doc>
  83185. <type name="utf8" c:type="char*"/>
  83186. </return-value>
  83187. <parameters>
  83188. <instance-parameter name="volume" transfer-ownership="none">
  83189. <doc xml:space="preserve">a #GVolume</doc>
  83190. <type name="Volume" c:type="GVolume*"/>
  83191. </instance-parameter>
  83192. </parameters>
  83193. </virtual-method>
  83194. <virtual-method name="mount_finish" invoker="mount_finish" throws="1">
  83195. <doc xml:space="preserve">Finishes mounting a volume. If any errors occurred during the operation,
  83196. @error will be set to contain the errors and %FALSE will be returned.
  83197. If the mount operation succeeded, g_volume_get_mount() on @volume
  83198. is guaranteed to return the mount right after calling this
  83199. function; there's no need to listen for the 'mount-added' signal on
  83200. #GVolumeMonitor.</doc>
  83201. <return-value transfer-ownership="none">
  83202. <doc xml:space="preserve">%TRUE, %FALSE if operation failed</doc>
  83203. <type name="gboolean" c:type="gboolean"/>
  83204. </return-value>
  83205. <parameters>
  83206. <instance-parameter name="volume" transfer-ownership="none">
  83207. <doc xml:space="preserve">a #GVolume</doc>
  83208. <type name="Volume" c:type="GVolume*"/>
  83209. </instance-parameter>
  83210. <parameter name="result" transfer-ownership="none">
  83211. <doc xml:space="preserve">a #GAsyncResult</doc>
  83212. <type name="AsyncResult" c:type="GAsyncResult*"/>
  83213. </parameter>
  83214. </parameters>
  83215. </virtual-method>
  83216. <virtual-method name="mount_fn" invoker="mount">
  83217. <doc xml:space="preserve">Mounts a volume. This is an asynchronous operation, and is
  83218. finished by calling g_volume_mount_finish() with the @volume
  83219. and #GAsyncResult returned in the @callback.</doc>
  83220. <return-value transfer-ownership="none">
  83221. <type name="none" c:type="void"/>
  83222. </return-value>
  83223. <parameters>
  83224. <instance-parameter name="volume" transfer-ownership="none">
  83225. <doc xml:space="preserve">a #GVolume</doc>
  83226. <type name="Volume" c:type="GVolume*"/>
  83227. </instance-parameter>
  83228. <parameter name="flags" transfer-ownership="none">
  83229. <doc xml:space="preserve">flags affecting the operation</doc>
  83230. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  83231. </parameter>
  83232. <parameter name="mount_operation"
  83233. transfer-ownership="none"
  83234. nullable="1"
  83235. allow-none="1">
  83236. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid user interaction</doc>
  83237. <type name="MountOperation" c:type="GMountOperation*"/>
  83238. </parameter>
  83239. <parameter name="cancellable"
  83240. transfer-ownership="none"
  83241. nullable="1"
  83242. allow-none="1">
  83243. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  83244. <type name="Cancellable" c:type="GCancellable*"/>
  83245. </parameter>
  83246. <parameter name="callback"
  83247. transfer-ownership="none"
  83248. nullable="1"
  83249. allow-none="1"
  83250. scope="async"
  83251. closure="4">
  83252. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  83253. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  83254. </parameter>
  83255. <parameter name="user_data"
  83256. transfer-ownership="none"
  83257. nullable="1"
  83258. allow-none="1"
  83259. closure="4">
  83260. <doc xml:space="preserve">user data that gets passed to @callback</doc>
  83261. <type name="gpointer" c:type="gpointer"/>
  83262. </parameter>
  83263. </parameters>
  83264. </virtual-method>
  83265. <virtual-method name="removed">
  83266. <return-value transfer-ownership="none">
  83267. <type name="none" c:type="void"/>
  83268. </return-value>
  83269. <parameters>
  83270. <instance-parameter name="volume" transfer-ownership="none">
  83271. <type name="Volume" c:type="GVolume*"/>
  83272. </instance-parameter>
  83273. </parameters>
  83274. </virtual-method>
  83275. <virtual-method name="should_automount" invoker="should_automount">
  83276. <doc xml:space="preserve">Returns whether the volume should be automatically mounted.</doc>
  83277. <return-value transfer-ownership="none">
  83278. <doc xml:space="preserve">%TRUE if the volume should be automatically mounted</doc>
  83279. <type name="gboolean" c:type="gboolean"/>
  83280. </return-value>
  83281. <parameters>
  83282. <instance-parameter name="volume" transfer-ownership="none">
  83283. <doc xml:space="preserve">a #GVolume</doc>
  83284. <type name="Volume" c:type="GVolume*"/>
  83285. </instance-parameter>
  83286. </parameters>
  83287. </virtual-method>
  83288. <method name="can_eject" c:identifier="g_volume_can_eject">
  83289. <doc xml:space="preserve">Checks if a volume can be ejected.</doc>
  83290. <return-value transfer-ownership="none">
  83291. <doc xml:space="preserve">%TRUE if the @volume can be ejected. %FALSE otherwise</doc>
  83292. <type name="gboolean" c:type="gboolean"/>
  83293. </return-value>
  83294. <parameters>
  83295. <instance-parameter name="volume" transfer-ownership="none">
  83296. <doc xml:space="preserve">a #GVolume</doc>
  83297. <type name="Volume" c:type="GVolume*"/>
  83298. </instance-parameter>
  83299. </parameters>
  83300. </method>
  83301. <method name="can_mount" c:identifier="g_volume_can_mount">
  83302. <doc xml:space="preserve">Checks if a volume can be mounted.</doc>
  83303. <return-value transfer-ownership="none">
  83304. <doc xml:space="preserve">%TRUE if the @volume can be mounted. %FALSE otherwise</doc>
  83305. <type name="gboolean" c:type="gboolean"/>
  83306. </return-value>
  83307. <parameters>
  83308. <instance-parameter name="volume" transfer-ownership="none">
  83309. <doc xml:space="preserve">a #GVolume</doc>
  83310. <type name="Volume" c:type="GVolume*"/>
  83311. </instance-parameter>
  83312. </parameters>
  83313. </method>
  83314. <method name="eject"
  83315. c:identifier="g_volume_eject"
  83316. deprecated="1"
  83317. deprecated-version="2.22">
  83318. <doc xml:space="preserve">Ejects a volume. This is an asynchronous operation, and is
  83319. finished by calling g_volume_eject_finish() with the @volume
  83320. and #GAsyncResult returned in the @callback.</doc>
  83321. <doc-deprecated xml:space="preserve">Use g_volume_eject_with_operation() instead.</doc-deprecated>
  83322. <return-value transfer-ownership="none">
  83323. <type name="none" c:type="void"/>
  83324. </return-value>
  83325. <parameters>
  83326. <instance-parameter name="volume" transfer-ownership="none">
  83327. <doc xml:space="preserve">a #GVolume</doc>
  83328. <type name="Volume" c:type="GVolume*"/>
  83329. </instance-parameter>
  83330. <parameter name="flags" transfer-ownership="none">
  83331. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  83332. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  83333. </parameter>
  83334. <parameter name="cancellable"
  83335. transfer-ownership="none"
  83336. nullable="1"
  83337. allow-none="1">
  83338. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  83339. <type name="Cancellable" c:type="GCancellable*"/>
  83340. </parameter>
  83341. <parameter name="callback"
  83342. transfer-ownership="none"
  83343. nullable="1"
  83344. allow-none="1"
  83345. scope="async"
  83346. closure="3">
  83347. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  83348. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  83349. </parameter>
  83350. <parameter name="user_data"
  83351. transfer-ownership="none"
  83352. nullable="1"
  83353. allow-none="1">
  83354. <doc xml:space="preserve">user data that gets passed to @callback</doc>
  83355. <type name="gpointer" c:type="gpointer"/>
  83356. </parameter>
  83357. </parameters>
  83358. </method>
  83359. <method name="eject_finish"
  83360. c:identifier="g_volume_eject_finish"
  83361. deprecated="1"
  83362. deprecated-version="2.22"
  83363. throws="1">
  83364. <doc xml:space="preserve">Finishes ejecting a volume. If any errors occurred during the operation,
  83365. @error will be set to contain the errors and %FALSE will be returned.</doc>
  83366. <doc-deprecated xml:space="preserve">Use g_volume_eject_with_operation_finish() instead.</doc-deprecated>
  83367. <return-value transfer-ownership="none">
  83368. <doc xml:space="preserve">%TRUE, %FALSE if operation failed</doc>
  83369. <type name="gboolean" c:type="gboolean"/>
  83370. </return-value>
  83371. <parameters>
  83372. <instance-parameter name="volume" transfer-ownership="none">
  83373. <doc xml:space="preserve">pointer to a #GVolume</doc>
  83374. <type name="Volume" c:type="GVolume*"/>
  83375. </instance-parameter>
  83376. <parameter name="result" transfer-ownership="none">
  83377. <doc xml:space="preserve">a #GAsyncResult</doc>
  83378. <type name="AsyncResult" c:type="GAsyncResult*"/>
  83379. </parameter>
  83380. </parameters>
  83381. </method>
  83382. <method name="eject_with_operation"
  83383. c:identifier="g_volume_eject_with_operation"
  83384. version="2.22">
  83385. <doc xml:space="preserve">Ejects a volume. This is an asynchronous operation, and is
  83386. finished by calling g_volume_eject_with_operation_finish() with the @volume
  83387. and #GAsyncResult data returned in the @callback.</doc>
  83388. <return-value transfer-ownership="none">
  83389. <type name="none" c:type="void"/>
  83390. </return-value>
  83391. <parameters>
  83392. <instance-parameter name="volume" transfer-ownership="none">
  83393. <doc xml:space="preserve">a #GVolume</doc>
  83394. <type name="Volume" c:type="GVolume*"/>
  83395. </instance-parameter>
  83396. <parameter name="flags" transfer-ownership="none">
  83397. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  83398. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  83399. </parameter>
  83400. <parameter name="mount_operation"
  83401. transfer-ownership="none"
  83402. nullable="1"
  83403. allow-none="1">
  83404. <doc xml:space="preserve">a #GMountOperation or %NULL to
  83405. avoid user interaction</doc>
  83406. <type name="MountOperation" c:type="GMountOperation*"/>
  83407. </parameter>
  83408. <parameter name="cancellable"
  83409. transfer-ownership="none"
  83410. nullable="1"
  83411. allow-none="1">
  83412. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  83413. <type name="Cancellable" c:type="GCancellable*"/>
  83414. </parameter>
  83415. <parameter name="callback"
  83416. transfer-ownership="none"
  83417. nullable="1"
  83418. allow-none="1"
  83419. scope="async"
  83420. closure="4">
  83421. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  83422. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  83423. </parameter>
  83424. <parameter name="user_data"
  83425. transfer-ownership="none"
  83426. nullable="1"
  83427. allow-none="1">
  83428. <doc xml:space="preserve">user data passed to @callback</doc>
  83429. <type name="gpointer" c:type="gpointer"/>
  83430. </parameter>
  83431. </parameters>
  83432. </method>
  83433. <method name="eject_with_operation_finish"
  83434. c:identifier="g_volume_eject_with_operation_finish"
  83435. version="2.22"
  83436. throws="1">
  83437. <doc xml:space="preserve">Finishes ejecting a volume. If any errors occurred during the operation,
  83438. @error will be set to contain the errors and %FALSE will be returned.</doc>
  83439. <return-value transfer-ownership="none">
  83440. <doc xml:space="preserve">%TRUE if the volume was successfully ejected. %FALSE otherwise</doc>
  83441. <type name="gboolean" c:type="gboolean"/>
  83442. </return-value>
  83443. <parameters>
  83444. <instance-parameter name="volume" transfer-ownership="none">
  83445. <doc xml:space="preserve">a #GVolume</doc>
  83446. <type name="Volume" c:type="GVolume*"/>
  83447. </instance-parameter>
  83448. <parameter name="result" transfer-ownership="none">
  83449. <doc xml:space="preserve">a #GAsyncResult</doc>
  83450. <type name="AsyncResult" c:type="GAsyncResult*"/>
  83451. </parameter>
  83452. </parameters>
  83453. </method>
  83454. <method name="enumerate_identifiers"
  83455. c:identifier="g_volume_enumerate_identifiers">
  83456. <doc xml:space="preserve">Gets the kinds of [identifiers][volume-identifier] that @volume has.
  83457. Use g_volume_get_identifier() to obtain the identifiers themselves.</doc>
  83458. <return-value transfer-ownership="full">
  83459. <doc xml:space="preserve">a %NULL-terminated array
  83460. of strings containing kinds of identifiers. Use g_strfreev() to free.</doc>
  83461. <array c:type="char**">
  83462. <type name="utf8"/>
  83463. </array>
  83464. </return-value>
  83465. <parameters>
  83466. <instance-parameter name="volume" transfer-ownership="none">
  83467. <doc xml:space="preserve">a #GVolume</doc>
  83468. <type name="Volume" c:type="GVolume*"/>
  83469. </instance-parameter>
  83470. </parameters>
  83471. </method>
  83472. <method name="get_activation_root"
  83473. c:identifier="g_volume_get_activation_root"
  83474. version="2.18">
  83475. <doc xml:space="preserve">Gets the activation root for a #GVolume if it is known ahead of
  83476. mount time. Returns %NULL otherwise. If not %NULL and if @volume
  83477. is mounted, then the result of g_mount_get_root() on the
  83478. #GMount object obtained from g_volume_get_mount() will always
  83479. either be equal or a prefix of what this function returns. In
  83480. other words, in code
  83481. |[&lt;!-- language="C" --&gt;
  83482. GMount *mount;
  83483. GFile *mount_root
  83484. GFile *volume_activation_root;
  83485. mount = g_volume_get_mount (volume); // mounted, so never NULL
  83486. mount_root = g_mount_get_root (mount);
  83487. volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL
  83488. ]|
  83489. then the expression
  83490. |[&lt;!-- language="C" --&gt;
  83491. (g_file_has_prefix (volume_activation_root, mount_root) ||
  83492. g_file_equal (volume_activation_root, mount_root))
  83493. ]|
  83494. will always be %TRUE.
  83495. Activation roots are typically used in #GVolumeMonitor
  83496. implementations to find the underlying mount to shadow, see
  83497. g_mount_is_shadowed() for more details.</doc>
  83498. <return-value transfer-ownership="full" nullable="1">
  83499. <doc xml:space="preserve">the activation root of @volume
  83500. or %NULL. Use g_object_unref() to free.</doc>
  83501. <type name="File" c:type="GFile*"/>
  83502. </return-value>
  83503. <parameters>
  83504. <instance-parameter name="volume" transfer-ownership="none">
  83505. <doc xml:space="preserve">a #GVolume</doc>
  83506. <type name="Volume" c:type="GVolume*"/>
  83507. </instance-parameter>
  83508. </parameters>
  83509. </method>
  83510. <method name="get_drive" c:identifier="g_volume_get_drive">
  83511. <doc xml:space="preserve">Gets the drive for the @volume.</doc>
  83512. <return-value transfer-ownership="full">
  83513. <doc xml:space="preserve">a #GDrive or %NULL if @volume is not
  83514. associated with a drive. The returned object should be unreffed
  83515. with g_object_unref() when no longer needed.</doc>
  83516. <type name="Drive" c:type="GDrive*"/>
  83517. </return-value>
  83518. <parameters>
  83519. <instance-parameter name="volume" transfer-ownership="none">
  83520. <doc xml:space="preserve">a #GVolume</doc>
  83521. <type name="Volume" c:type="GVolume*"/>
  83522. </instance-parameter>
  83523. </parameters>
  83524. </method>
  83525. <method name="get_icon" c:identifier="g_volume_get_icon">
  83526. <doc xml:space="preserve">Gets the icon for @volume.</doc>
  83527. <return-value transfer-ownership="full">
  83528. <doc xml:space="preserve">a #GIcon.
  83529. The returned object should be unreffed with g_object_unref()
  83530. when no longer needed.</doc>
  83531. <type name="Icon" c:type="GIcon*"/>
  83532. </return-value>
  83533. <parameters>
  83534. <instance-parameter name="volume" transfer-ownership="none">
  83535. <doc xml:space="preserve">a #GVolume</doc>
  83536. <type name="Volume" c:type="GVolume*"/>
  83537. </instance-parameter>
  83538. </parameters>
  83539. </method>
  83540. <method name="get_identifier" c:identifier="g_volume_get_identifier">
  83541. <doc xml:space="preserve">Gets the identifier of the given kind for @volume.
  83542. See the [introduction][volume-identifier] for more
  83543. information about volume identifiers.</doc>
  83544. <return-value transfer-ownership="full">
  83545. <doc xml:space="preserve">a newly allocated string containing the
  83546. requested identfier, or %NULL if the #GVolume
  83547. doesn't have this kind of identifier</doc>
  83548. <type name="utf8" c:type="char*"/>
  83549. </return-value>
  83550. <parameters>
  83551. <instance-parameter name="volume" transfer-ownership="none">
  83552. <doc xml:space="preserve">a #GVolume</doc>
  83553. <type name="Volume" c:type="GVolume*"/>
  83554. </instance-parameter>
  83555. <parameter name="kind" transfer-ownership="none">
  83556. <doc xml:space="preserve">the kind of identifier to return</doc>
  83557. <type name="utf8" c:type="const char*"/>
  83558. </parameter>
  83559. </parameters>
  83560. </method>
  83561. <method name="get_mount" c:identifier="g_volume_get_mount">
  83562. <doc xml:space="preserve">Gets the mount for the @volume.</doc>
  83563. <return-value transfer-ownership="full">
  83564. <doc xml:space="preserve">a #GMount or %NULL if @volume isn't mounted.
  83565. The returned object should be unreffed with g_object_unref()
  83566. when no longer needed.</doc>
  83567. <type name="Mount" c:type="GMount*"/>
  83568. </return-value>
  83569. <parameters>
  83570. <instance-parameter name="volume" transfer-ownership="none">
  83571. <doc xml:space="preserve">a #GVolume</doc>
  83572. <type name="Volume" c:type="GVolume*"/>
  83573. </instance-parameter>
  83574. </parameters>
  83575. </method>
  83576. <method name="get_name" c:identifier="g_volume_get_name">
  83577. <doc xml:space="preserve">Gets the name of @volume.</doc>
  83578. <return-value transfer-ownership="full">
  83579. <doc xml:space="preserve">the name for the given @volume. The returned string should
  83580. be freed with g_free() when no longer needed.</doc>
  83581. <type name="utf8" c:type="char*"/>
  83582. </return-value>
  83583. <parameters>
  83584. <instance-parameter name="volume" transfer-ownership="none">
  83585. <doc xml:space="preserve">a #GVolume</doc>
  83586. <type name="Volume" c:type="GVolume*"/>
  83587. </instance-parameter>
  83588. </parameters>
  83589. </method>
  83590. <method name="get_sort_key"
  83591. c:identifier="g_volume_get_sort_key"
  83592. version="2.32">
  83593. <doc xml:space="preserve">Gets the sort key for @volume, if any.</doc>
  83594. <return-value transfer-ownership="none">
  83595. <doc xml:space="preserve">Sorting key for @volume or %NULL if no such key is available</doc>
  83596. <type name="utf8" c:type="const gchar*"/>
  83597. </return-value>
  83598. <parameters>
  83599. <instance-parameter name="volume" transfer-ownership="none">
  83600. <doc xml:space="preserve">a #GVolume</doc>
  83601. <type name="Volume" c:type="GVolume*"/>
  83602. </instance-parameter>
  83603. </parameters>
  83604. </method>
  83605. <method name="get_symbolic_icon"
  83606. c:identifier="g_volume_get_symbolic_icon"
  83607. version="2.34">
  83608. <doc xml:space="preserve">Gets the symbolic icon for @volume.</doc>
  83609. <return-value transfer-ownership="full">
  83610. <doc xml:space="preserve">a #GIcon.
  83611. The returned object should be unreffed with g_object_unref()
  83612. when no longer needed.</doc>
  83613. <type name="Icon" c:type="GIcon*"/>
  83614. </return-value>
  83615. <parameters>
  83616. <instance-parameter name="volume" transfer-ownership="none">
  83617. <doc xml:space="preserve">a #GVolume</doc>
  83618. <type name="Volume" c:type="GVolume*"/>
  83619. </instance-parameter>
  83620. </parameters>
  83621. </method>
  83622. <method name="get_uuid" c:identifier="g_volume_get_uuid">
  83623. <doc xml:space="preserve">Gets the UUID for the @volume. The reference is typically based on
  83624. the file system UUID for the volume in question and should be
  83625. considered an opaque string. Returns %NULL if there is no UUID
  83626. available.</doc>
  83627. <return-value transfer-ownership="full">
  83628. <doc xml:space="preserve">the UUID for @volume or %NULL if no UUID can be computed.
  83629. The returned string should be freed with g_free()
  83630. when no longer needed.</doc>
  83631. <type name="utf8" c:type="char*"/>
  83632. </return-value>
  83633. <parameters>
  83634. <instance-parameter name="volume" transfer-ownership="none">
  83635. <doc xml:space="preserve">a #GVolume</doc>
  83636. <type name="Volume" c:type="GVolume*"/>
  83637. </instance-parameter>
  83638. </parameters>
  83639. </method>
  83640. <method name="mount" c:identifier="g_volume_mount">
  83641. <doc xml:space="preserve">Mounts a volume. This is an asynchronous operation, and is
  83642. finished by calling g_volume_mount_finish() with the @volume
  83643. and #GAsyncResult returned in the @callback.</doc>
  83644. <return-value transfer-ownership="none">
  83645. <type name="none" c:type="void"/>
  83646. </return-value>
  83647. <parameters>
  83648. <instance-parameter name="volume" transfer-ownership="none">
  83649. <doc xml:space="preserve">a #GVolume</doc>
  83650. <type name="Volume" c:type="GVolume*"/>
  83651. </instance-parameter>
  83652. <parameter name="flags" transfer-ownership="none">
  83653. <doc xml:space="preserve">flags affecting the operation</doc>
  83654. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  83655. </parameter>
  83656. <parameter name="mount_operation"
  83657. transfer-ownership="none"
  83658. nullable="1"
  83659. allow-none="1">
  83660. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid user interaction</doc>
  83661. <type name="MountOperation" c:type="GMountOperation*"/>
  83662. </parameter>
  83663. <parameter name="cancellable"
  83664. transfer-ownership="none"
  83665. nullable="1"
  83666. allow-none="1">
  83667. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  83668. <type name="Cancellable" c:type="GCancellable*"/>
  83669. </parameter>
  83670. <parameter name="callback"
  83671. transfer-ownership="none"
  83672. nullable="1"
  83673. allow-none="1"
  83674. scope="async"
  83675. closure="4">
  83676. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  83677. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  83678. </parameter>
  83679. <parameter name="user_data"
  83680. transfer-ownership="none"
  83681. nullable="1"
  83682. allow-none="1">
  83683. <doc xml:space="preserve">user data that gets passed to @callback</doc>
  83684. <type name="gpointer" c:type="gpointer"/>
  83685. </parameter>
  83686. </parameters>
  83687. </method>
  83688. <method name="mount_finish"
  83689. c:identifier="g_volume_mount_finish"
  83690. throws="1">
  83691. <doc xml:space="preserve">Finishes mounting a volume. If any errors occurred during the operation,
  83692. @error will be set to contain the errors and %FALSE will be returned.
  83693. If the mount operation succeeded, g_volume_get_mount() on @volume
  83694. is guaranteed to return the mount right after calling this
  83695. function; there's no need to listen for the 'mount-added' signal on
  83696. #GVolumeMonitor.</doc>
  83697. <return-value transfer-ownership="none">
  83698. <doc xml:space="preserve">%TRUE, %FALSE if operation failed</doc>
  83699. <type name="gboolean" c:type="gboolean"/>
  83700. </return-value>
  83701. <parameters>
  83702. <instance-parameter name="volume" transfer-ownership="none">
  83703. <doc xml:space="preserve">a #GVolume</doc>
  83704. <type name="Volume" c:type="GVolume*"/>
  83705. </instance-parameter>
  83706. <parameter name="result" transfer-ownership="none">
  83707. <doc xml:space="preserve">a #GAsyncResult</doc>
  83708. <type name="AsyncResult" c:type="GAsyncResult*"/>
  83709. </parameter>
  83710. </parameters>
  83711. </method>
  83712. <method name="should_automount" c:identifier="g_volume_should_automount">
  83713. <doc xml:space="preserve">Returns whether the volume should be automatically mounted.</doc>
  83714. <return-value transfer-ownership="none">
  83715. <doc xml:space="preserve">%TRUE if the volume should be automatically mounted</doc>
  83716. <type name="gboolean" c:type="gboolean"/>
  83717. </return-value>
  83718. <parameters>
  83719. <instance-parameter name="volume" transfer-ownership="none">
  83720. <doc xml:space="preserve">a #GVolume</doc>
  83721. <type name="Volume" c:type="GVolume*"/>
  83722. </instance-parameter>
  83723. </parameters>
  83724. </method>
  83725. <glib:signal name="changed" when="last">
  83726. <doc xml:space="preserve">Emitted when the volume has been changed.</doc>
  83727. <return-value transfer-ownership="none">
  83728. <type name="none" c:type="void"/>
  83729. </return-value>
  83730. </glib:signal>
  83731. <glib:signal name="removed" when="last">
  83732. <doc xml:space="preserve">This signal is emitted when the #GVolume have been removed. If
  83733. the recipient is holding references to the object they should
  83734. release them so the object can be finalized.</doc>
  83735. <return-value transfer-ownership="none">
  83736. <type name="none" c:type="void"/>
  83737. </return-value>
  83738. </glib:signal>
  83739. </interface>
  83740. <record name="VolumeIface"
  83741. c:type="GVolumeIface"
  83742. glib:is-gtype-struct-for="Volume">
  83743. <doc xml:space="preserve">Interface for implementing operations for mountable volumes.</doc>
  83744. <field name="g_iface">
  83745. <doc xml:space="preserve">The parent interface.</doc>
  83746. <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
  83747. </field>
  83748. <field name="changed">
  83749. <callback name="changed">
  83750. <return-value transfer-ownership="none">
  83751. <type name="none" c:type="void"/>
  83752. </return-value>
  83753. <parameters>
  83754. <parameter name="volume" transfer-ownership="none">
  83755. <type name="Volume" c:type="GVolume*"/>
  83756. </parameter>
  83757. </parameters>
  83758. </callback>
  83759. </field>
  83760. <field name="removed">
  83761. <callback name="removed">
  83762. <return-value transfer-ownership="none">
  83763. <type name="none" c:type="void"/>
  83764. </return-value>
  83765. <parameters>
  83766. <parameter name="volume" transfer-ownership="none">
  83767. <type name="Volume" c:type="GVolume*"/>
  83768. </parameter>
  83769. </parameters>
  83770. </callback>
  83771. </field>
  83772. <field name="get_name">
  83773. <callback name="get_name">
  83774. <return-value transfer-ownership="full">
  83775. <doc xml:space="preserve">the name for the given @volume. The returned string should
  83776. be freed with g_free() when no longer needed.</doc>
  83777. <type name="utf8" c:type="char*"/>
  83778. </return-value>
  83779. <parameters>
  83780. <parameter name="volume" transfer-ownership="none">
  83781. <doc xml:space="preserve">a #GVolume</doc>
  83782. <type name="Volume" c:type="GVolume*"/>
  83783. </parameter>
  83784. </parameters>
  83785. </callback>
  83786. </field>
  83787. <field name="get_icon">
  83788. <callback name="get_icon">
  83789. <return-value transfer-ownership="full">
  83790. <doc xml:space="preserve">a #GIcon.
  83791. The returned object should be unreffed with g_object_unref()
  83792. when no longer needed.</doc>
  83793. <type name="Icon" c:type="GIcon*"/>
  83794. </return-value>
  83795. <parameters>
  83796. <parameter name="volume" transfer-ownership="none">
  83797. <doc xml:space="preserve">a #GVolume</doc>
  83798. <type name="Volume" c:type="GVolume*"/>
  83799. </parameter>
  83800. </parameters>
  83801. </callback>
  83802. </field>
  83803. <field name="get_uuid">
  83804. <callback name="get_uuid">
  83805. <return-value transfer-ownership="full">
  83806. <doc xml:space="preserve">the UUID for @volume or %NULL if no UUID can be computed.
  83807. The returned string should be freed with g_free()
  83808. when no longer needed.</doc>
  83809. <type name="utf8" c:type="char*"/>
  83810. </return-value>
  83811. <parameters>
  83812. <parameter name="volume" transfer-ownership="none">
  83813. <doc xml:space="preserve">a #GVolume</doc>
  83814. <type name="Volume" c:type="GVolume*"/>
  83815. </parameter>
  83816. </parameters>
  83817. </callback>
  83818. </field>
  83819. <field name="get_drive">
  83820. <callback name="get_drive">
  83821. <return-value transfer-ownership="full">
  83822. <doc xml:space="preserve">a #GDrive or %NULL if @volume is not
  83823. associated with a drive. The returned object should be unreffed
  83824. with g_object_unref() when no longer needed.</doc>
  83825. <type name="Drive" c:type="GDrive*"/>
  83826. </return-value>
  83827. <parameters>
  83828. <parameter name="volume" transfer-ownership="none">
  83829. <doc xml:space="preserve">a #GVolume</doc>
  83830. <type name="Volume" c:type="GVolume*"/>
  83831. </parameter>
  83832. </parameters>
  83833. </callback>
  83834. </field>
  83835. <field name="get_mount">
  83836. <callback name="get_mount">
  83837. <return-value transfer-ownership="full">
  83838. <doc xml:space="preserve">a #GMount or %NULL if @volume isn't mounted.
  83839. The returned object should be unreffed with g_object_unref()
  83840. when no longer needed.</doc>
  83841. <type name="Mount" c:type="GMount*"/>
  83842. </return-value>
  83843. <parameters>
  83844. <parameter name="volume" transfer-ownership="none">
  83845. <doc xml:space="preserve">a #GVolume</doc>
  83846. <type name="Volume" c:type="GVolume*"/>
  83847. </parameter>
  83848. </parameters>
  83849. </callback>
  83850. </field>
  83851. <field name="can_mount">
  83852. <callback name="can_mount">
  83853. <return-value transfer-ownership="none">
  83854. <doc xml:space="preserve">%TRUE if the @volume can be mounted. %FALSE otherwise</doc>
  83855. <type name="gboolean" c:type="gboolean"/>
  83856. </return-value>
  83857. <parameters>
  83858. <parameter name="volume" transfer-ownership="none">
  83859. <doc xml:space="preserve">a #GVolume</doc>
  83860. <type name="Volume" c:type="GVolume*"/>
  83861. </parameter>
  83862. </parameters>
  83863. </callback>
  83864. </field>
  83865. <field name="can_eject">
  83866. <callback name="can_eject">
  83867. <return-value transfer-ownership="none">
  83868. <doc xml:space="preserve">%TRUE if the @volume can be ejected. %FALSE otherwise</doc>
  83869. <type name="gboolean" c:type="gboolean"/>
  83870. </return-value>
  83871. <parameters>
  83872. <parameter name="volume" transfer-ownership="none">
  83873. <doc xml:space="preserve">a #GVolume</doc>
  83874. <type name="Volume" c:type="GVolume*"/>
  83875. </parameter>
  83876. </parameters>
  83877. </callback>
  83878. </field>
  83879. <field name="mount_fn">
  83880. <callback name="mount_fn">
  83881. <return-value transfer-ownership="none">
  83882. <type name="none" c:type="void"/>
  83883. </return-value>
  83884. <parameters>
  83885. <parameter name="volume" transfer-ownership="none">
  83886. <doc xml:space="preserve">a #GVolume</doc>
  83887. <type name="Volume" c:type="GVolume*"/>
  83888. </parameter>
  83889. <parameter name="flags" transfer-ownership="none">
  83890. <doc xml:space="preserve">flags affecting the operation</doc>
  83891. <type name="MountMountFlags" c:type="GMountMountFlags"/>
  83892. </parameter>
  83893. <parameter name="mount_operation"
  83894. transfer-ownership="none"
  83895. nullable="1"
  83896. allow-none="1">
  83897. <doc xml:space="preserve">a #GMountOperation or %NULL to avoid user interaction</doc>
  83898. <type name="MountOperation" c:type="GMountOperation*"/>
  83899. </parameter>
  83900. <parameter name="cancellable"
  83901. transfer-ownership="none"
  83902. nullable="1"
  83903. allow-none="1">
  83904. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  83905. <type name="Cancellable" c:type="GCancellable*"/>
  83906. </parameter>
  83907. <parameter name="callback"
  83908. transfer-ownership="none"
  83909. nullable="1"
  83910. allow-none="1"
  83911. scope="async"
  83912. closure="5">
  83913. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  83914. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  83915. </parameter>
  83916. <parameter name="user_data"
  83917. transfer-ownership="none"
  83918. nullable="1"
  83919. allow-none="1"
  83920. closure="5">
  83921. <doc xml:space="preserve">user data that gets passed to @callback</doc>
  83922. <type name="gpointer" c:type="gpointer"/>
  83923. </parameter>
  83924. </parameters>
  83925. </callback>
  83926. </field>
  83927. <field name="mount_finish">
  83928. <callback name="mount_finish" throws="1">
  83929. <return-value transfer-ownership="none">
  83930. <doc xml:space="preserve">%TRUE, %FALSE if operation failed</doc>
  83931. <type name="gboolean" c:type="gboolean"/>
  83932. </return-value>
  83933. <parameters>
  83934. <parameter name="volume" transfer-ownership="none">
  83935. <doc xml:space="preserve">a #GVolume</doc>
  83936. <type name="Volume" c:type="GVolume*"/>
  83937. </parameter>
  83938. <parameter name="result" transfer-ownership="none">
  83939. <doc xml:space="preserve">a #GAsyncResult</doc>
  83940. <type name="AsyncResult" c:type="GAsyncResult*"/>
  83941. </parameter>
  83942. </parameters>
  83943. </callback>
  83944. </field>
  83945. <field name="eject">
  83946. <callback name="eject">
  83947. <return-value transfer-ownership="none">
  83948. <type name="none" c:type="void"/>
  83949. </return-value>
  83950. <parameters>
  83951. <parameter name="volume" transfer-ownership="none">
  83952. <doc xml:space="preserve">a #GVolume</doc>
  83953. <type name="Volume" c:type="GVolume*"/>
  83954. </parameter>
  83955. <parameter name="flags" transfer-ownership="none">
  83956. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  83957. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  83958. </parameter>
  83959. <parameter name="cancellable"
  83960. transfer-ownership="none"
  83961. nullable="1"
  83962. allow-none="1">
  83963. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  83964. <type name="Cancellable" c:type="GCancellable*"/>
  83965. </parameter>
  83966. <parameter name="callback"
  83967. transfer-ownership="none"
  83968. nullable="1"
  83969. allow-none="1"
  83970. scope="async"
  83971. closure="4">
  83972. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  83973. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  83974. </parameter>
  83975. <parameter name="user_data"
  83976. transfer-ownership="none"
  83977. nullable="1"
  83978. allow-none="1"
  83979. closure="4">
  83980. <doc xml:space="preserve">user data that gets passed to @callback</doc>
  83981. <type name="gpointer" c:type="gpointer"/>
  83982. </parameter>
  83983. </parameters>
  83984. </callback>
  83985. </field>
  83986. <field name="eject_finish">
  83987. <callback name="eject_finish" throws="1">
  83988. <return-value transfer-ownership="none">
  83989. <doc xml:space="preserve">%TRUE, %FALSE if operation failed</doc>
  83990. <type name="gboolean" c:type="gboolean"/>
  83991. </return-value>
  83992. <parameters>
  83993. <parameter name="volume" transfer-ownership="none">
  83994. <doc xml:space="preserve">pointer to a #GVolume</doc>
  83995. <type name="Volume" c:type="GVolume*"/>
  83996. </parameter>
  83997. <parameter name="result" transfer-ownership="none">
  83998. <doc xml:space="preserve">a #GAsyncResult</doc>
  83999. <type name="AsyncResult" c:type="GAsyncResult*"/>
  84000. </parameter>
  84001. </parameters>
  84002. </callback>
  84003. </field>
  84004. <field name="get_identifier">
  84005. <callback name="get_identifier">
  84006. <return-value transfer-ownership="full">
  84007. <doc xml:space="preserve">a newly allocated string containing the
  84008. requested identfier, or %NULL if the #GVolume
  84009. doesn't have this kind of identifier</doc>
  84010. <type name="utf8" c:type="char*"/>
  84011. </return-value>
  84012. <parameters>
  84013. <parameter name="volume" transfer-ownership="none">
  84014. <doc xml:space="preserve">a #GVolume</doc>
  84015. <type name="Volume" c:type="GVolume*"/>
  84016. </parameter>
  84017. <parameter name="kind" transfer-ownership="none">
  84018. <doc xml:space="preserve">the kind of identifier to return</doc>
  84019. <type name="utf8" c:type="const char*"/>
  84020. </parameter>
  84021. </parameters>
  84022. </callback>
  84023. </field>
  84024. <field name="enumerate_identifiers">
  84025. <callback name="enumerate_identifiers">
  84026. <return-value transfer-ownership="full">
  84027. <doc xml:space="preserve">a %NULL-terminated array
  84028. of strings containing kinds of identifiers. Use g_strfreev() to free.</doc>
  84029. <array c:type="char**">
  84030. <type name="utf8"/>
  84031. </array>
  84032. </return-value>
  84033. <parameters>
  84034. <parameter name="volume" transfer-ownership="none">
  84035. <doc xml:space="preserve">a #GVolume</doc>
  84036. <type name="Volume" c:type="GVolume*"/>
  84037. </parameter>
  84038. </parameters>
  84039. </callback>
  84040. </field>
  84041. <field name="should_automount">
  84042. <callback name="should_automount">
  84043. <return-value transfer-ownership="none">
  84044. <doc xml:space="preserve">%TRUE if the volume should be automatically mounted</doc>
  84045. <type name="gboolean" c:type="gboolean"/>
  84046. </return-value>
  84047. <parameters>
  84048. <parameter name="volume" transfer-ownership="none">
  84049. <doc xml:space="preserve">a #GVolume</doc>
  84050. <type name="Volume" c:type="GVolume*"/>
  84051. </parameter>
  84052. </parameters>
  84053. </callback>
  84054. </field>
  84055. <field name="get_activation_root">
  84056. <callback name="get_activation_root">
  84057. <return-value transfer-ownership="full" nullable="1">
  84058. <doc xml:space="preserve">the activation root of @volume
  84059. or %NULL. Use g_object_unref() to free.</doc>
  84060. <type name="File" c:type="GFile*"/>
  84061. </return-value>
  84062. <parameters>
  84063. <parameter name="volume" transfer-ownership="none">
  84064. <doc xml:space="preserve">a #GVolume</doc>
  84065. <type name="Volume" c:type="GVolume*"/>
  84066. </parameter>
  84067. </parameters>
  84068. </callback>
  84069. </field>
  84070. <field name="eject_with_operation">
  84071. <callback name="eject_with_operation">
  84072. <return-value transfer-ownership="none">
  84073. <type name="none" c:type="void"/>
  84074. </return-value>
  84075. <parameters>
  84076. <parameter name="volume" transfer-ownership="none">
  84077. <doc xml:space="preserve">a #GVolume</doc>
  84078. <type name="Volume" c:type="GVolume*"/>
  84079. </parameter>
  84080. <parameter name="flags" transfer-ownership="none">
  84081. <doc xml:space="preserve">flags affecting the unmount if required for eject</doc>
  84082. <type name="MountUnmountFlags" c:type="GMountUnmountFlags"/>
  84083. </parameter>
  84084. <parameter name="mount_operation"
  84085. transfer-ownership="none"
  84086. nullable="1"
  84087. allow-none="1">
  84088. <doc xml:space="preserve">a #GMountOperation or %NULL to
  84089. avoid user interaction</doc>
  84090. <type name="MountOperation" c:type="GMountOperation*"/>
  84091. </parameter>
  84092. <parameter name="cancellable"
  84093. transfer-ownership="none"
  84094. nullable="1"
  84095. allow-none="1">
  84096. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  84097. <type name="Cancellable" c:type="GCancellable*"/>
  84098. </parameter>
  84099. <parameter name="callback"
  84100. transfer-ownership="none"
  84101. nullable="1"
  84102. allow-none="1"
  84103. scope="async"
  84104. closure="5">
  84105. <doc xml:space="preserve">a #GAsyncReadyCallback, or %NULL</doc>
  84106. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  84107. </parameter>
  84108. <parameter name="user_data"
  84109. transfer-ownership="none"
  84110. nullable="1"
  84111. allow-none="1"
  84112. closure="5">
  84113. <doc xml:space="preserve">user data passed to @callback</doc>
  84114. <type name="gpointer" c:type="gpointer"/>
  84115. </parameter>
  84116. </parameters>
  84117. </callback>
  84118. </field>
  84119. <field name="eject_with_operation_finish">
  84120. <callback name="eject_with_operation_finish" throws="1">
  84121. <return-value transfer-ownership="none">
  84122. <doc xml:space="preserve">%TRUE if the volume was successfully ejected. %FALSE otherwise</doc>
  84123. <type name="gboolean" c:type="gboolean"/>
  84124. </return-value>
  84125. <parameters>
  84126. <parameter name="volume" transfer-ownership="none">
  84127. <doc xml:space="preserve">a #GVolume</doc>
  84128. <type name="Volume" c:type="GVolume*"/>
  84129. </parameter>
  84130. <parameter name="result" transfer-ownership="none">
  84131. <doc xml:space="preserve">a #GAsyncResult</doc>
  84132. <type name="AsyncResult" c:type="GAsyncResult*"/>
  84133. </parameter>
  84134. </parameters>
  84135. </callback>
  84136. </field>
  84137. <field name="get_sort_key">
  84138. <callback name="get_sort_key">
  84139. <return-value transfer-ownership="none">
  84140. <doc xml:space="preserve">Sorting key for @volume or %NULL if no such key is available</doc>
  84141. <type name="utf8" c:type="const gchar*"/>
  84142. </return-value>
  84143. <parameters>
  84144. <parameter name="volume" transfer-ownership="none">
  84145. <doc xml:space="preserve">a #GVolume</doc>
  84146. <type name="Volume" c:type="GVolume*"/>
  84147. </parameter>
  84148. </parameters>
  84149. </callback>
  84150. </field>
  84151. <field name="get_symbolic_icon">
  84152. <callback name="get_symbolic_icon">
  84153. <return-value transfer-ownership="full">
  84154. <doc xml:space="preserve">a #GIcon.
  84155. The returned object should be unreffed with g_object_unref()
  84156. when no longer needed.</doc>
  84157. <type name="Icon" c:type="GIcon*"/>
  84158. </return-value>
  84159. <parameters>
  84160. <parameter name="volume" transfer-ownership="none">
  84161. <doc xml:space="preserve">a #GVolume</doc>
  84162. <type name="Volume" c:type="GVolume*"/>
  84163. </parameter>
  84164. </parameters>
  84165. </callback>
  84166. </field>
  84167. </record>
  84168. <class name="VolumeMonitor"
  84169. c:symbol-prefix="volume_monitor"
  84170. c:type="GVolumeMonitor"
  84171. parent="GObject.Object"
  84172. glib:type-name="GVolumeMonitor"
  84173. glib:get-type="g_volume_monitor_get_type"
  84174. glib:type-struct="VolumeMonitorClass">
  84175. <doc xml:space="preserve">#GVolumeMonitor is for listing the user interesting devices and volumes
  84176. on the computer. In other words, what a file selector or file manager
  84177. would show in a sidebar.
  84178. #GVolumeMonitor is not
  84179. [thread-default-context aware][g-main-context-push-thread-default],
  84180. and so should not be used other than from the main thread, with no
  84181. thread-default-context active.</doc>
  84182. <function name="adopt_orphan_mount"
  84183. c:identifier="g_volume_monitor_adopt_orphan_mount"
  84184. deprecated="1"
  84185. deprecated-version="2.20">
  84186. <doc xml:space="preserve">This function should be called by any #GVolumeMonitor
  84187. implementation when a new #GMount object is created that is not
  84188. associated with a #GVolume object. It must be called just before
  84189. emitting the @mount_added signal.
  84190. If the return value is not %NULL, the caller must associate the
  84191. returned #GVolume object with the #GMount. This involves returning
  84192. it in its g_mount_get_volume() implementation. The caller must
  84193. also listen for the "removed" signal on the returned object
  84194. and give up its reference when handling that signal
  84195. Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
  84196. the implementor must take a reference to @mount and return it in
  84197. its g_volume_get_mount() implemented. Also, the implementor must
  84198. listen for the "unmounted" signal on @mount and give up its
  84199. reference upon handling that signal.
  84200. There are two main use cases for this function.
  84201. One is when implementing a user space file system driver that reads
  84202. blocks of a block device that is already represented by the native
  84203. volume monitor (for example a CD Audio file system driver). Such
  84204. a driver will generate its own #GMount object that needs to be
  84205. associated with the #GVolume object that represents the volume.
  84206. The other is for implementing a #GVolumeMonitor whose sole purpose
  84207. is to return #GVolume objects representing entries in the users
  84208. "favorite servers" list or similar.</doc>
  84209. <doc-deprecated xml:space="preserve">Instead of using this function, #GVolumeMonitor
  84210. implementations should instead create shadow mounts with the URI of
  84211. the mount they intend to adopt. See the proxy volume monitor in
  84212. gvfs for an example of this. Also see g_mount_is_shadowed(),
  84213. g_mount_shadow() and g_mount_unshadow() functions.</doc-deprecated>
  84214. <return-value transfer-ownership="full">
  84215. <doc xml:space="preserve">the #GVolume object that is the parent for @mount or %NULL
  84216. if no wants to adopt the #GMount.</doc>
  84217. <type name="Volume" c:type="GVolume*"/>
  84218. </return-value>
  84219. <parameters>
  84220. <parameter name="mount" transfer-ownership="none">
  84221. <doc xml:space="preserve">a #GMount object to find a parent for</doc>
  84222. <type name="Mount" c:type="GMount*"/>
  84223. </parameter>
  84224. </parameters>
  84225. </function>
  84226. <function name="get" c:identifier="g_volume_monitor_get">
  84227. <doc xml:space="preserve">Gets the volume monitor used by gio.</doc>
  84228. <return-value transfer-ownership="full">
  84229. <doc xml:space="preserve">a reference to the #GVolumeMonitor used by gio. Call
  84230. g_object_unref() when done with it.</doc>
  84231. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84232. </return-value>
  84233. </function>
  84234. <virtual-method name="drive_changed">
  84235. <return-value transfer-ownership="none">
  84236. <type name="none" c:type="void"/>
  84237. </return-value>
  84238. <parameters>
  84239. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84240. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84241. </instance-parameter>
  84242. <parameter name="drive" transfer-ownership="none">
  84243. <type name="Drive" c:type="GDrive*"/>
  84244. </parameter>
  84245. </parameters>
  84246. </virtual-method>
  84247. <virtual-method name="drive_connected">
  84248. <return-value transfer-ownership="none">
  84249. <type name="none" c:type="void"/>
  84250. </return-value>
  84251. <parameters>
  84252. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84253. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84254. </instance-parameter>
  84255. <parameter name="drive" transfer-ownership="none">
  84256. <type name="Drive" c:type="GDrive*"/>
  84257. </parameter>
  84258. </parameters>
  84259. </virtual-method>
  84260. <virtual-method name="drive_disconnected">
  84261. <return-value transfer-ownership="none">
  84262. <type name="none" c:type="void"/>
  84263. </return-value>
  84264. <parameters>
  84265. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84266. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84267. </instance-parameter>
  84268. <parameter name="drive" transfer-ownership="none">
  84269. <type name="Drive" c:type="GDrive*"/>
  84270. </parameter>
  84271. </parameters>
  84272. </virtual-method>
  84273. <virtual-method name="drive_eject_button">
  84274. <return-value transfer-ownership="none">
  84275. <type name="none" c:type="void"/>
  84276. </return-value>
  84277. <parameters>
  84278. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84279. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84280. </instance-parameter>
  84281. <parameter name="drive" transfer-ownership="none">
  84282. <type name="Drive" c:type="GDrive*"/>
  84283. </parameter>
  84284. </parameters>
  84285. </virtual-method>
  84286. <virtual-method name="drive_stop_button">
  84287. <return-value transfer-ownership="none">
  84288. <type name="none" c:type="void"/>
  84289. </return-value>
  84290. <parameters>
  84291. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84292. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84293. </instance-parameter>
  84294. <parameter name="drive" transfer-ownership="none">
  84295. <type name="Drive" c:type="GDrive*"/>
  84296. </parameter>
  84297. </parameters>
  84298. </virtual-method>
  84299. <virtual-method name="get_connected_drives"
  84300. invoker="get_connected_drives">
  84301. <doc xml:space="preserve">Gets a list of drives connected to the system.
  84302. The returned list should be freed with g_list_free(), after
  84303. its elements have been unreffed with g_object_unref().</doc>
  84304. <return-value transfer-ownership="full">
  84305. <doc xml:space="preserve">a #GList of connected #GDrive objects.</doc>
  84306. <type name="GLib.List" c:type="GList*">
  84307. <type name="Drive"/>
  84308. </type>
  84309. </return-value>
  84310. <parameters>
  84311. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84312. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84313. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84314. </instance-parameter>
  84315. </parameters>
  84316. </virtual-method>
  84317. <virtual-method name="get_mount_for_uuid" invoker="get_mount_for_uuid">
  84318. <doc xml:space="preserve">Finds a #GMount object by its UUID (see g_mount_get_uuid())</doc>
  84319. <return-value transfer-ownership="full">
  84320. <doc xml:space="preserve">a #GMount or %NULL if no such mount is available.
  84321. Free the returned object with g_object_unref().</doc>
  84322. <type name="Mount" c:type="GMount*"/>
  84323. </return-value>
  84324. <parameters>
  84325. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84326. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84327. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84328. </instance-parameter>
  84329. <parameter name="uuid" transfer-ownership="none">
  84330. <doc xml:space="preserve">the UUID to look for</doc>
  84331. <type name="utf8" c:type="const char*"/>
  84332. </parameter>
  84333. </parameters>
  84334. </virtual-method>
  84335. <virtual-method name="get_mounts" invoker="get_mounts">
  84336. <doc xml:space="preserve">Gets a list of the mounts on the system.
  84337. The returned list should be freed with g_list_free(), after
  84338. its elements have been unreffed with g_object_unref().</doc>
  84339. <return-value transfer-ownership="full">
  84340. <doc xml:space="preserve">a #GList of #GMount objects.</doc>
  84341. <type name="GLib.List" c:type="GList*">
  84342. <type name="Mount"/>
  84343. </type>
  84344. </return-value>
  84345. <parameters>
  84346. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84347. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84348. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84349. </instance-parameter>
  84350. </parameters>
  84351. </virtual-method>
  84352. <virtual-method name="get_volume_for_uuid" invoker="get_volume_for_uuid">
  84353. <doc xml:space="preserve">Finds a #GVolume object by its UUID (see g_volume_get_uuid())</doc>
  84354. <return-value transfer-ownership="full">
  84355. <doc xml:space="preserve">a #GVolume or %NULL if no such volume is available.
  84356. Free the returned object with g_object_unref().</doc>
  84357. <type name="Volume" c:type="GVolume*"/>
  84358. </return-value>
  84359. <parameters>
  84360. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84361. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84362. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84363. </instance-parameter>
  84364. <parameter name="uuid" transfer-ownership="none">
  84365. <doc xml:space="preserve">the UUID to look for</doc>
  84366. <type name="utf8" c:type="const char*"/>
  84367. </parameter>
  84368. </parameters>
  84369. </virtual-method>
  84370. <virtual-method name="get_volumes" invoker="get_volumes">
  84371. <doc xml:space="preserve">Gets a list of the volumes on the system.
  84372. The returned list should be freed with g_list_free(), after
  84373. its elements have been unreffed with g_object_unref().</doc>
  84374. <return-value transfer-ownership="full">
  84375. <doc xml:space="preserve">a #GList of #GVolume objects.</doc>
  84376. <type name="GLib.List" c:type="GList*">
  84377. <type name="Volume"/>
  84378. </type>
  84379. </return-value>
  84380. <parameters>
  84381. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84382. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84383. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84384. </instance-parameter>
  84385. </parameters>
  84386. </virtual-method>
  84387. <virtual-method name="mount_added">
  84388. <return-value transfer-ownership="none">
  84389. <type name="none" c:type="void"/>
  84390. </return-value>
  84391. <parameters>
  84392. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84393. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84394. </instance-parameter>
  84395. <parameter name="mount" transfer-ownership="none">
  84396. <type name="Mount" c:type="GMount*"/>
  84397. </parameter>
  84398. </parameters>
  84399. </virtual-method>
  84400. <virtual-method name="mount_changed">
  84401. <return-value transfer-ownership="none">
  84402. <type name="none" c:type="void"/>
  84403. </return-value>
  84404. <parameters>
  84405. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84406. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84407. </instance-parameter>
  84408. <parameter name="mount" transfer-ownership="none">
  84409. <type name="Mount" c:type="GMount*"/>
  84410. </parameter>
  84411. </parameters>
  84412. </virtual-method>
  84413. <virtual-method name="mount_pre_unmount">
  84414. <return-value transfer-ownership="none">
  84415. <type name="none" c:type="void"/>
  84416. </return-value>
  84417. <parameters>
  84418. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84419. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84420. </instance-parameter>
  84421. <parameter name="mount" transfer-ownership="none">
  84422. <type name="Mount" c:type="GMount*"/>
  84423. </parameter>
  84424. </parameters>
  84425. </virtual-method>
  84426. <virtual-method name="mount_removed">
  84427. <return-value transfer-ownership="none">
  84428. <type name="none" c:type="void"/>
  84429. </return-value>
  84430. <parameters>
  84431. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84432. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84433. </instance-parameter>
  84434. <parameter name="mount" transfer-ownership="none">
  84435. <type name="Mount" c:type="GMount*"/>
  84436. </parameter>
  84437. </parameters>
  84438. </virtual-method>
  84439. <virtual-method name="volume_added">
  84440. <return-value transfer-ownership="none">
  84441. <type name="none" c:type="void"/>
  84442. </return-value>
  84443. <parameters>
  84444. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84445. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84446. </instance-parameter>
  84447. <parameter name="volume" transfer-ownership="none">
  84448. <type name="Volume" c:type="GVolume*"/>
  84449. </parameter>
  84450. </parameters>
  84451. </virtual-method>
  84452. <virtual-method name="volume_changed">
  84453. <return-value transfer-ownership="none">
  84454. <type name="none" c:type="void"/>
  84455. </return-value>
  84456. <parameters>
  84457. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84458. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84459. </instance-parameter>
  84460. <parameter name="volume" transfer-ownership="none">
  84461. <type name="Volume" c:type="GVolume*"/>
  84462. </parameter>
  84463. </parameters>
  84464. </virtual-method>
  84465. <virtual-method name="volume_removed">
  84466. <return-value transfer-ownership="none">
  84467. <type name="none" c:type="void"/>
  84468. </return-value>
  84469. <parameters>
  84470. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84471. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84472. </instance-parameter>
  84473. <parameter name="volume" transfer-ownership="none">
  84474. <type name="Volume" c:type="GVolume*"/>
  84475. </parameter>
  84476. </parameters>
  84477. </virtual-method>
  84478. <method name="get_connected_drives"
  84479. c:identifier="g_volume_monitor_get_connected_drives">
  84480. <doc xml:space="preserve">Gets a list of drives connected to the system.
  84481. The returned list should be freed with g_list_free(), after
  84482. its elements have been unreffed with g_object_unref().</doc>
  84483. <return-value transfer-ownership="full">
  84484. <doc xml:space="preserve">a #GList of connected #GDrive objects.</doc>
  84485. <type name="GLib.List" c:type="GList*">
  84486. <type name="Drive"/>
  84487. </type>
  84488. </return-value>
  84489. <parameters>
  84490. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84491. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84492. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84493. </instance-parameter>
  84494. </parameters>
  84495. </method>
  84496. <method name="get_mount_for_uuid"
  84497. c:identifier="g_volume_monitor_get_mount_for_uuid">
  84498. <doc xml:space="preserve">Finds a #GMount object by its UUID (see g_mount_get_uuid())</doc>
  84499. <return-value transfer-ownership="full">
  84500. <doc xml:space="preserve">a #GMount or %NULL if no such mount is available.
  84501. Free the returned object with g_object_unref().</doc>
  84502. <type name="Mount" c:type="GMount*"/>
  84503. </return-value>
  84504. <parameters>
  84505. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84506. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84507. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84508. </instance-parameter>
  84509. <parameter name="uuid" transfer-ownership="none">
  84510. <doc xml:space="preserve">the UUID to look for</doc>
  84511. <type name="utf8" c:type="const char*"/>
  84512. </parameter>
  84513. </parameters>
  84514. </method>
  84515. <method name="get_mounts" c:identifier="g_volume_monitor_get_mounts">
  84516. <doc xml:space="preserve">Gets a list of the mounts on the system.
  84517. The returned list should be freed with g_list_free(), after
  84518. its elements have been unreffed with g_object_unref().</doc>
  84519. <return-value transfer-ownership="full">
  84520. <doc xml:space="preserve">a #GList of #GMount objects.</doc>
  84521. <type name="GLib.List" c:type="GList*">
  84522. <type name="Mount"/>
  84523. </type>
  84524. </return-value>
  84525. <parameters>
  84526. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84527. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84528. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84529. </instance-parameter>
  84530. </parameters>
  84531. </method>
  84532. <method name="get_volume_for_uuid"
  84533. c:identifier="g_volume_monitor_get_volume_for_uuid">
  84534. <doc xml:space="preserve">Finds a #GVolume object by its UUID (see g_volume_get_uuid())</doc>
  84535. <return-value transfer-ownership="full">
  84536. <doc xml:space="preserve">a #GVolume or %NULL if no such volume is available.
  84537. Free the returned object with g_object_unref().</doc>
  84538. <type name="Volume" c:type="GVolume*"/>
  84539. </return-value>
  84540. <parameters>
  84541. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84542. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84543. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84544. </instance-parameter>
  84545. <parameter name="uuid" transfer-ownership="none">
  84546. <doc xml:space="preserve">the UUID to look for</doc>
  84547. <type name="utf8" c:type="const char*"/>
  84548. </parameter>
  84549. </parameters>
  84550. </method>
  84551. <method name="get_volumes" c:identifier="g_volume_monitor_get_volumes">
  84552. <doc xml:space="preserve">Gets a list of the volumes on the system.
  84553. The returned list should be freed with g_list_free(), after
  84554. its elements have been unreffed with g_object_unref().</doc>
  84555. <return-value transfer-ownership="full">
  84556. <doc xml:space="preserve">a #GList of #GVolume objects.</doc>
  84557. <type name="GLib.List" c:type="GList*">
  84558. <type name="Volume"/>
  84559. </type>
  84560. </return-value>
  84561. <parameters>
  84562. <instance-parameter name="volume_monitor" transfer-ownership="none">
  84563. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84564. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84565. </instance-parameter>
  84566. </parameters>
  84567. </method>
  84568. <field name="parent_instance">
  84569. <type name="GObject.Object" c:type="GObject"/>
  84570. </field>
  84571. <field name="priv" readable="0" private="1">
  84572. <type name="gpointer" c:type="gpointer"/>
  84573. </field>
  84574. <glib:signal name="drive-changed" when="last">
  84575. <doc xml:space="preserve">Emitted when a drive changes.</doc>
  84576. <return-value transfer-ownership="none">
  84577. <type name="none" c:type="void"/>
  84578. </return-value>
  84579. <parameters>
  84580. <parameter name="drive" transfer-ownership="none">
  84581. <doc xml:space="preserve">the drive that changed</doc>
  84582. <type name="Drive"/>
  84583. </parameter>
  84584. </parameters>
  84585. </glib:signal>
  84586. <glib:signal name="drive-connected" when="last">
  84587. <doc xml:space="preserve">Emitted when a drive is connected to the system.</doc>
  84588. <return-value transfer-ownership="none">
  84589. <type name="none" c:type="void"/>
  84590. </return-value>
  84591. <parameters>
  84592. <parameter name="drive" transfer-ownership="none">
  84593. <doc xml:space="preserve">a #GDrive that was connected.</doc>
  84594. <type name="Drive"/>
  84595. </parameter>
  84596. </parameters>
  84597. </glib:signal>
  84598. <glib:signal name="drive-disconnected" when="last">
  84599. <doc xml:space="preserve">Emitted when a drive is disconnected from the system.</doc>
  84600. <return-value transfer-ownership="none">
  84601. <type name="none" c:type="void"/>
  84602. </return-value>
  84603. <parameters>
  84604. <parameter name="drive" transfer-ownership="none">
  84605. <doc xml:space="preserve">a #GDrive that was disconnected.</doc>
  84606. <type name="Drive"/>
  84607. </parameter>
  84608. </parameters>
  84609. </glib:signal>
  84610. <glib:signal name="drive-eject-button" when="last" version="2.18">
  84611. <doc xml:space="preserve">Emitted when the eject button is pressed on @drive.</doc>
  84612. <return-value transfer-ownership="none">
  84613. <type name="none" c:type="void"/>
  84614. </return-value>
  84615. <parameters>
  84616. <parameter name="drive" transfer-ownership="none">
  84617. <doc xml:space="preserve">the drive where the eject button was pressed</doc>
  84618. <type name="Drive"/>
  84619. </parameter>
  84620. </parameters>
  84621. </glib:signal>
  84622. <glib:signal name="drive-stop-button" when="last" version="2.22">
  84623. <doc xml:space="preserve">Emitted when the stop button is pressed on @drive.</doc>
  84624. <return-value transfer-ownership="none">
  84625. <type name="none" c:type="void"/>
  84626. </return-value>
  84627. <parameters>
  84628. <parameter name="drive" transfer-ownership="none">
  84629. <doc xml:space="preserve">the drive where the stop button was pressed</doc>
  84630. <type name="Drive"/>
  84631. </parameter>
  84632. </parameters>
  84633. </glib:signal>
  84634. <glib:signal name="mount-added" when="last">
  84635. <doc xml:space="preserve">Emitted when a mount is added.</doc>
  84636. <return-value transfer-ownership="none">
  84637. <type name="none" c:type="void"/>
  84638. </return-value>
  84639. <parameters>
  84640. <parameter name="mount" transfer-ownership="none">
  84641. <doc xml:space="preserve">a #GMount that was added.</doc>
  84642. <type name="Mount"/>
  84643. </parameter>
  84644. </parameters>
  84645. </glib:signal>
  84646. <glib:signal name="mount-changed" when="last">
  84647. <doc xml:space="preserve">Emitted when a mount changes.</doc>
  84648. <return-value transfer-ownership="none">
  84649. <type name="none" c:type="void"/>
  84650. </return-value>
  84651. <parameters>
  84652. <parameter name="mount" transfer-ownership="none">
  84653. <doc xml:space="preserve">a #GMount that changed.</doc>
  84654. <type name="Mount"/>
  84655. </parameter>
  84656. </parameters>
  84657. </glib:signal>
  84658. <glib:signal name="mount-pre-unmount" when="last">
  84659. <doc xml:space="preserve">Emitted when a mount is about to be removed.</doc>
  84660. <return-value transfer-ownership="none">
  84661. <type name="none" c:type="void"/>
  84662. </return-value>
  84663. <parameters>
  84664. <parameter name="mount" transfer-ownership="none">
  84665. <doc xml:space="preserve">a #GMount that is being unmounted.</doc>
  84666. <type name="Mount"/>
  84667. </parameter>
  84668. </parameters>
  84669. </glib:signal>
  84670. <glib:signal name="mount-removed" when="last">
  84671. <doc xml:space="preserve">Emitted when a mount is removed.</doc>
  84672. <return-value transfer-ownership="none">
  84673. <type name="none" c:type="void"/>
  84674. </return-value>
  84675. <parameters>
  84676. <parameter name="mount" transfer-ownership="none">
  84677. <doc xml:space="preserve">a #GMount that was removed.</doc>
  84678. <type name="Mount"/>
  84679. </parameter>
  84680. </parameters>
  84681. </glib:signal>
  84682. <glib:signal name="volume-added" when="last">
  84683. <doc xml:space="preserve">Emitted when a mountable volume is added to the system.</doc>
  84684. <return-value transfer-ownership="none">
  84685. <type name="none" c:type="void"/>
  84686. </return-value>
  84687. <parameters>
  84688. <parameter name="volume" transfer-ownership="none">
  84689. <doc xml:space="preserve">a #GVolume that was added.</doc>
  84690. <type name="Volume"/>
  84691. </parameter>
  84692. </parameters>
  84693. </glib:signal>
  84694. <glib:signal name="volume-changed" when="last">
  84695. <doc xml:space="preserve">Emitted when mountable volume is changed.</doc>
  84696. <return-value transfer-ownership="none">
  84697. <type name="none" c:type="void"/>
  84698. </return-value>
  84699. <parameters>
  84700. <parameter name="volume" transfer-ownership="none">
  84701. <doc xml:space="preserve">a #GVolume that changed.</doc>
  84702. <type name="Volume"/>
  84703. </parameter>
  84704. </parameters>
  84705. </glib:signal>
  84706. <glib:signal name="volume-removed" when="last">
  84707. <doc xml:space="preserve">Emitted when a mountable volume is removed from the system.</doc>
  84708. <return-value transfer-ownership="none">
  84709. <type name="none" c:type="void"/>
  84710. </return-value>
  84711. <parameters>
  84712. <parameter name="volume" transfer-ownership="none">
  84713. <doc xml:space="preserve">a #GVolume that was removed.</doc>
  84714. <type name="Volume"/>
  84715. </parameter>
  84716. </parameters>
  84717. </glib:signal>
  84718. </class>
  84719. <record name="VolumeMonitorClass"
  84720. c:type="GVolumeMonitorClass"
  84721. glib:is-gtype-struct-for="VolumeMonitor">
  84722. <field name="parent_class">
  84723. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  84724. </field>
  84725. <field name="volume_added">
  84726. <callback name="volume_added">
  84727. <return-value transfer-ownership="none">
  84728. <type name="none" c:type="void"/>
  84729. </return-value>
  84730. <parameters>
  84731. <parameter name="volume_monitor" transfer-ownership="none">
  84732. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84733. </parameter>
  84734. <parameter name="volume" transfer-ownership="none">
  84735. <type name="Volume" c:type="GVolume*"/>
  84736. </parameter>
  84737. </parameters>
  84738. </callback>
  84739. </field>
  84740. <field name="volume_removed">
  84741. <callback name="volume_removed">
  84742. <return-value transfer-ownership="none">
  84743. <type name="none" c:type="void"/>
  84744. </return-value>
  84745. <parameters>
  84746. <parameter name="volume_monitor" transfer-ownership="none">
  84747. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84748. </parameter>
  84749. <parameter name="volume" transfer-ownership="none">
  84750. <type name="Volume" c:type="GVolume*"/>
  84751. </parameter>
  84752. </parameters>
  84753. </callback>
  84754. </field>
  84755. <field name="volume_changed">
  84756. <callback name="volume_changed">
  84757. <return-value transfer-ownership="none">
  84758. <type name="none" c:type="void"/>
  84759. </return-value>
  84760. <parameters>
  84761. <parameter name="volume_monitor" transfer-ownership="none">
  84762. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84763. </parameter>
  84764. <parameter name="volume" transfer-ownership="none">
  84765. <type name="Volume" c:type="GVolume*"/>
  84766. </parameter>
  84767. </parameters>
  84768. </callback>
  84769. </field>
  84770. <field name="mount_added">
  84771. <callback name="mount_added">
  84772. <return-value transfer-ownership="none">
  84773. <type name="none" c:type="void"/>
  84774. </return-value>
  84775. <parameters>
  84776. <parameter name="volume_monitor" transfer-ownership="none">
  84777. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84778. </parameter>
  84779. <parameter name="mount" transfer-ownership="none">
  84780. <type name="Mount" c:type="GMount*"/>
  84781. </parameter>
  84782. </parameters>
  84783. </callback>
  84784. </field>
  84785. <field name="mount_removed">
  84786. <callback name="mount_removed">
  84787. <return-value transfer-ownership="none">
  84788. <type name="none" c:type="void"/>
  84789. </return-value>
  84790. <parameters>
  84791. <parameter name="volume_monitor" transfer-ownership="none">
  84792. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84793. </parameter>
  84794. <parameter name="mount" transfer-ownership="none">
  84795. <type name="Mount" c:type="GMount*"/>
  84796. </parameter>
  84797. </parameters>
  84798. </callback>
  84799. </field>
  84800. <field name="mount_pre_unmount">
  84801. <callback name="mount_pre_unmount">
  84802. <return-value transfer-ownership="none">
  84803. <type name="none" c:type="void"/>
  84804. </return-value>
  84805. <parameters>
  84806. <parameter name="volume_monitor" transfer-ownership="none">
  84807. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84808. </parameter>
  84809. <parameter name="mount" transfer-ownership="none">
  84810. <type name="Mount" c:type="GMount*"/>
  84811. </parameter>
  84812. </parameters>
  84813. </callback>
  84814. </field>
  84815. <field name="mount_changed">
  84816. <callback name="mount_changed">
  84817. <return-value transfer-ownership="none">
  84818. <type name="none" c:type="void"/>
  84819. </return-value>
  84820. <parameters>
  84821. <parameter name="volume_monitor" transfer-ownership="none">
  84822. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84823. </parameter>
  84824. <parameter name="mount" transfer-ownership="none">
  84825. <type name="Mount" c:type="GMount*"/>
  84826. </parameter>
  84827. </parameters>
  84828. </callback>
  84829. </field>
  84830. <field name="drive_connected">
  84831. <callback name="drive_connected">
  84832. <return-value transfer-ownership="none">
  84833. <type name="none" c:type="void"/>
  84834. </return-value>
  84835. <parameters>
  84836. <parameter name="volume_monitor" transfer-ownership="none">
  84837. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84838. </parameter>
  84839. <parameter name="drive" transfer-ownership="none">
  84840. <type name="Drive" c:type="GDrive*"/>
  84841. </parameter>
  84842. </parameters>
  84843. </callback>
  84844. </field>
  84845. <field name="drive_disconnected">
  84846. <callback name="drive_disconnected">
  84847. <return-value transfer-ownership="none">
  84848. <type name="none" c:type="void"/>
  84849. </return-value>
  84850. <parameters>
  84851. <parameter name="volume_monitor" transfer-ownership="none">
  84852. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84853. </parameter>
  84854. <parameter name="drive" transfer-ownership="none">
  84855. <type name="Drive" c:type="GDrive*"/>
  84856. </parameter>
  84857. </parameters>
  84858. </callback>
  84859. </field>
  84860. <field name="drive_changed">
  84861. <callback name="drive_changed">
  84862. <return-value transfer-ownership="none">
  84863. <type name="none" c:type="void"/>
  84864. </return-value>
  84865. <parameters>
  84866. <parameter name="volume_monitor" transfer-ownership="none">
  84867. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84868. </parameter>
  84869. <parameter name="drive" transfer-ownership="none">
  84870. <type name="Drive" c:type="GDrive*"/>
  84871. </parameter>
  84872. </parameters>
  84873. </callback>
  84874. </field>
  84875. <field name="is_supported">
  84876. <callback name="is_supported">
  84877. <return-value transfer-ownership="none">
  84878. <type name="gboolean" c:type="gboolean"/>
  84879. </return-value>
  84880. </callback>
  84881. </field>
  84882. <field name="get_connected_drives">
  84883. <callback name="get_connected_drives">
  84884. <return-value transfer-ownership="full">
  84885. <doc xml:space="preserve">a #GList of connected #GDrive objects.</doc>
  84886. <type name="GLib.List" c:type="GList*">
  84887. <type name="Drive"/>
  84888. </type>
  84889. </return-value>
  84890. <parameters>
  84891. <parameter name="volume_monitor" transfer-ownership="none">
  84892. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84893. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84894. </parameter>
  84895. </parameters>
  84896. </callback>
  84897. </field>
  84898. <field name="get_volumes">
  84899. <callback name="get_volumes">
  84900. <return-value transfer-ownership="full">
  84901. <doc xml:space="preserve">a #GList of #GVolume objects.</doc>
  84902. <type name="GLib.List" c:type="GList*">
  84903. <type name="Volume"/>
  84904. </type>
  84905. </return-value>
  84906. <parameters>
  84907. <parameter name="volume_monitor" transfer-ownership="none">
  84908. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84909. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84910. </parameter>
  84911. </parameters>
  84912. </callback>
  84913. </field>
  84914. <field name="get_mounts">
  84915. <callback name="get_mounts">
  84916. <return-value transfer-ownership="full">
  84917. <doc xml:space="preserve">a #GList of #GMount objects.</doc>
  84918. <type name="GLib.List" c:type="GList*">
  84919. <type name="Mount"/>
  84920. </type>
  84921. </return-value>
  84922. <parameters>
  84923. <parameter name="volume_monitor" transfer-ownership="none">
  84924. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84925. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84926. </parameter>
  84927. </parameters>
  84928. </callback>
  84929. </field>
  84930. <field name="get_volume_for_uuid">
  84931. <callback name="get_volume_for_uuid">
  84932. <return-value transfer-ownership="full">
  84933. <doc xml:space="preserve">a #GVolume or %NULL if no such volume is available.
  84934. Free the returned object with g_object_unref().</doc>
  84935. <type name="Volume" c:type="GVolume*"/>
  84936. </return-value>
  84937. <parameters>
  84938. <parameter name="volume_monitor" transfer-ownership="none">
  84939. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84940. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84941. </parameter>
  84942. <parameter name="uuid" transfer-ownership="none">
  84943. <doc xml:space="preserve">the UUID to look for</doc>
  84944. <type name="utf8" c:type="const char*"/>
  84945. </parameter>
  84946. </parameters>
  84947. </callback>
  84948. </field>
  84949. <field name="get_mount_for_uuid">
  84950. <callback name="get_mount_for_uuid">
  84951. <return-value transfer-ownership="full">
  84952. <doc xml:space="preserve">a #GMount or %NULL if no such mount is available.
  84953. Free the returned object with g_object_unref().</doc>
  84954. <type name="Mount" c:type="GMount*"/>
  84955. </return-value>
  84956. <parameters>
  84957. <parameter name="volume_monitor" transfer-ownership="none">
  84958. <doc xml:space="preserve">a #GVolumeMonitor.</doc>
  84959. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84960. </parameter>
  84961. <parameter name="uuid" transfer-ownership="none">
  84962. <doc xml:space="preserve">the UUID to look for</doc>
  84963. <type name="utf8" c:type="const char*"/>
  84964. </parameter>
  84965. </parameters>
  84966. </callback>
  84967. </field>
  84968. <field name="adopt_orphan_mount" introspectable="0">
  84969. <callback name="adopt_orphan_mount" introspectable="0">
  84970. <return-value>
  84971. <type name="Volume" c:type="GVolume*"/>
  84972. </return-value>
  84973. <parameters>
  84974. <parameter name="mount" transfer-ownership="none">
  84975. <type name="Mount" c:type="GMount*"/>
  84976. </parameter>
  84977. <parameter name="volume_monitor" transfer-ownership="none">
  84978. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84979. </parameter>
  84980. </parameters>
  84981. </callback>
  84982. </field>
  84983. <field name="drive_eject_button">
  84984. <callback name="drive_eject_button">
  84985. <return-value transfer-ownership="none">
  84986. <type name="none" c:type="void"/>
  84987. </return-value>
  84988. <parameters>
  84989. <parameter name="volume_monitor" transfer-ownership="none">
  84990. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  84991. </parameter>
  84992. <parameter name="drive" transfer-ownership="none">
  84993. <type name="Drive" c:type="GDrive*"/>
  84994. </parameter>
  84995. </parameters>
  84996. </callback>
  84997. </field>
  84998. <field name="drive_stop_button">
  84999. <callback name="drive_stop_button">
  85000. <return-value transfer-ownership="none">
  85001. <type name="none" c:type="void"/>
  85002. </return-value>
  85003. <parameters>
  85004. <parameter name="volume_monitor" transfer-ownership="none">
  85005. <type name="VolumeMonitor" c:type="GVolumeMonitor*"/>
  85006. </parameter>
  85007. <parameter name="drive" transfer-ownership="none">
  85008. <type name="Drive" c:type="GDrive*"/>
  85009. </parameter>
  85010. </parameters>
  85011. </callback>
  85012. </field>
  85013. <field name="_g_reserved1" introspectable="0">
  85014. <callback name="_g_reserved1">
  85015. <return-value transfer-ownership="none">
  85016. <type name="none" c:type="void"/>
  85017. </return-value>
  85018. </callback>
  85019. </field>
  85020. <field name="_g_reserved2" introspectable="0">
  85021. <callback name="_g_reserved2">
  85022. <return-value transfer-ownership="none">
  85023. <type name="none" c:type="void"/>
  85024. </return-value>
  85025. </callback>
  85026. </field>
  85027. <field name="_g_reserved3" introspectable="0">
  85028. <callback name="_g_reserved3">
  85029. <return-value transfer-ownership="none">
  85030. <type name="none" c:type="void"/>
  85031. </return-value>
  85032. </callback>
  85033. </field>
  85034. <field name="_g_reserved4" introspectable="0">
  85035. <callback name="_g_reserved4">
  85036. <return-value transfer-ownership="none">
  85037. <type name="none" c:type="void"/>
  85038. </return-value>
  85039. </callback>
  85040. </field>
  85041. <field name="_g_reserved5" introspectable="0">
  85042. <callback name="_g_reserved5">
  85043. <return-value transfer-ownership="none">
  85044. <type name="none" c:type="void"/>
  85045. </return-value>
  85046. </callback>
  85047. </field>
  85048. <field name="_g_reserved6" introspectable="0">
  85049. <callback name="_g_reserved6">
  85050. <return-value transfer-ownership="none">
  85051. <type name="none" c:type="void"/>
  85052. </return-value>
  85053. </callback>
  85054. </field>
  85055. </record>
  85056. <class name="ZlibCompressor"
  85057. c:symbol-prefix="zlib_compressor"
  85058. c:type="GZlibCompressor"
  85059. parent="GObject.Object"
  85060. glib:type-name="GZlibCompressor"
  85061. glib:get-type="g_zlib_compressor_get_type"
  85062. glib:type-struct="ZlibCompressorClass">
  85063. <doc xml:space="preserve">Zlib decompression</doc>
  85064. <implements name="Converter"/>
  85065. <constructor name="new"
  85066. c:identifier="g_zlib_compressor_new"
  85067. version="2.24">
  85068. <doc xml:space="preserve">Creates a new #GZlibCompressor.</doc>
  85069. <return-value transfer-ownership="full">
  85070. <doc xml:space="preserve">a new #GZlibCompressor</doc>
  85071. <type name="ZlibCompressor" c:type="GZlibCompressor*"/>
  85072. </return-value>
  85073. <parameters>
  85074. <parameter name="format" transfer-ownership="none">
  85075. <doc xml:space="preserve">The format to use for the compressed data</doc>
  85076. <type name="ZlibCompressorFormat" c:type="GZlibCompressorFormat"/>
  85077. </parameter>
  85078. <parameter name="level" transfer-ownership="none">
  85079. <doc xml:space="preserve">compression level (0-9), -1 for default</doc>
  85080. <type name="gint" c:type="int"/>
  85081. </parameter>
  85082. </parameters>
  85083. </constructor>
  85084. <method name="get_file_info"
  85085. c:identifier="g_zlib_compressor_get_file_info"
  85086. version="2.26">
  85087. <doc xml:space="preserve">Returns the #GZlibCompressor:file-info property.</doc>
  85088. <return-value transfer-ownership="none">
  85089. <doc xml:space="preserve">a #GFileInfo, or %NULL</doc>
  85090. <type name="FileInfo" c:type="GFileInfo*"/>
  85091. </return-value>
  85092. <parameters>
  85093. <instance-parameter name="compressor" transfer-ownership="none">
  85094. <doc xml:space="preserve">a #GZlibCompressor</doc>
  85095. <type name="ZlibCompressor" c:type="GZlibCompressor*"/>
  85096. </instance-parameter>
  85097. </parameters>
  85098. </method>
  85099. <method name="set_file_info"
  85100. c:identifier="g_zlib_compressor_set_file_info"
  85101. version="2.26">
  85102. <doc xml:space="preserve">Sets @file_info in @compressor. If non-%NULL, and @compressor's
  85103. #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
  85104. it will be used to set the file name and modification time in
  85105. the GZIP header of the compressed data.
  85106. Note: it is an error to call this function while a compression is in
  85107. progress; it may only be called immediately after creation of @compressor,
  85108. or after resetting it with g_converter_reset().</doc>
  85109. <return-value transfer-ownership="none">
  85110. <type name="none" c:type="void"/>
  85111. </return-value>
  85112. <parameters>
  85113. <instance-parameter name="compressor" transfer-ownership="none">
  85114. <doc xml:space="preserve">a #GZlibCompressor</doc>
  85115. <type name="ZlibCompressor" c:type="GZlibCompressor*"/>
  85116. </instance-parameter>
  85117. <parameter name="file_info"
  85118. transfer-ownership="none"
  85119. nullable="1"
  85120. allow-none="1">
  85121. <doc xml:space="preserve">a #GFileInfo</doc>
  85122. <type name="FileInfo" c:type="GFileInfo*"/>
  85123. </parameter>
  85124. </parameters>
  85125. </method>
  85126. <property name="file-info"
  85127. version="2.26"
  85128. writable="1"
  85129. transfer-ownership="none">
  85130. <doc xml:space="preserve">If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
  85131. %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
  85132. and modification time from the file info to the GZIP header.</doc>
  85133. <type name="FileInfo"/>
  85134. </property>
  85135. <property name="format"
  85136. writable="1"
  85137. construct-only="1"
  85138. transfer-ownership="none">
  85139. <type name="ZlibCompressorFormat"/>
  85140. </property>
  85141. <property name="level"
  85142. writable="1"
  85143. construct-only="1"
  85144. transfer-ownership="none">
  85145. <type name="gint" c:type="gint"/>
  85146. </property>
  85147. </class>
  85148. <record name="ZlibCompressorClass"
  85149. c:type="GZlibCompressorClass"
  85150. glib:is-gtype-struct-for="ZlibCompressor">
  85151. <field name="parent_class">
  85152. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  85153. </field>
  85154. </record>
  85155. <enumeration name="ZlibCompressorFormat"
  85156. version="2.24"
  85157. glib:type-name="GZlibCompressorFormat"
  85158. glib:get-type="g_zlib_compressor_format_get_type"
  85159. c:type="GZlibCompressorFormat">
  85160. <doc xml:space="preserve">Used to select the type of data format to use for #GZlibDecompressor
  85161. and #GZlibCompressor.</doc>
  85162. <member name="zlib"
  85163. value="0"
  85164. c:identifier="G_ZLIB_COMPRESSOR_FORMAT_ZLIB"
  85165. glib:nick="zlib">
  85166. <doc xml:space="preserve">deflate compression with zlib header</doc>
  85167. </member>
  85168. <member name="gzip"
  85169. value="1"
  85170. c:identifier="G_ZLIB_COMPRESSOR_FORMAT_GZIP"
  85171. glib:nick="gzip">
  85172. <doc xml:space="preserve">gzip file format</doc>
  85173. </member>
  85174. <member name="raw"
  85175. value="2"
  85176. c:identifier="G_ZLIB_COMPRESSOR_FORMAT_RAW"
  85177. glib:nick="raw">
  85178. <doc xml:space="preserve">deflate compression with no header</doc>
  85179. </member>
  85180. </enumeration>
  85181. <class name="ZlibDecompressor"
  85182. c:symbol-prefix="zlib_decompressor"
  85183. c:type="GZlibDecompressor"
  85184. parent="GObject.Object"
  85185. glib:type-name="GZlibDecompressor"
  85186. glib:get-type="g_zlib_decompressor_get_type"
  85187. glib:type-struct="ZlibDecompressorClass">
  85188. <doc xml:space="preserve">Zlib decompression</doc>
  85189. <implements name="Converter"/>
  85190. <constructor name="new"
  85191. c:identifier="g_zlib_decompressor_new"
  85192. version="2.24">
  85193. <doc xml:space="preserve">Creates a new #GZlibDecompressor.</doc>
  85194. <return-value transfer-ownership="full">
  85195. <doc xml:space="preserve">a new #GZlibDecompressor</doc>
  85196. <type name="ZlibDecompressor" c:type="GZlibDecompressor*"/>
  85197. </return-value>
  85198. <parameters>
  85199. <parameter name="format" transfer-ownership="none">
  85200. <doc xml:space="preserve">The format to use for the compressed data</doc>
  85201. <type name="ZlibCompressorFormat" c:type="GZlibCompressorFormat"/>
  85202. </parameter>
  85203. </parameters>
  85204. </constructor>
  85205. <method name="get_file_info"
  85206. c:identifier="g_zlib_decompressor_get_file_info"
  85207. version="2.26">
  85208. <doc xml:space="preserve">Retrieves the #GFileInfo constructed from the GZIP header data
  85209. of compressed data processed by @compressor, or %NULL if @decompressor's
  85210. #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
  85211. or the header data was not fully processed yet, or it not present in the
  85212. data stream at all.</doc>
  85213. <return-value transfer-ownership="none">
  85214. <doc xml:space="preserve">a #GFileInfo, or %NULL</doc>
  85215. <type name="FileInfo" c:type="GFileInfo*"/>
  85216. </return-value>
  85217. <parameters>
  85218. <instance-parameter name="decompressor" transfer-ownership="none">
  85219. <doc xml:space="preserve">a #GZlibDecompressor</doc>
  85220. <type name="ZlibDecompressor" c:type="GZlibDecompressor*"/>
  85221. </instance-parameter>
  85222. </parameters>
  85223. </method>
  85224. <property name="file-info" version="2.26" transfer-ownership="none">
  85225. <doc xml:space="preserve">A #GFileInfo containing the information found in the GZIP header
  85226. of the data stream processed, or %NULL if the header was not yet
  85227. fully processed, is not present at all, or the compressor's
  85228. #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.</doc>
  85229. <type name="FileInfo"/>
  85230. </property>
  85231. <property name="format"
  85232. writable="1"
  85233. construct-only="1"
  85234. transfer-ownership="none">
  85235. <type name="ZlibCompressorFormat"/>
  85236. </property>
  85237. </class>
  85238. <record name="ZlibDecompressorClass"
  85239. c:type="GZlibDecompressorClass"
  85240. glib:is-gtype-struct-for="ZlibDecompressor">
  85241. <field name="parent_class">
  85242. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  85243. </field>
  85244. </record>
  85245. <function name="action_name_is_valid"
  85246. c:identifier="g_action_name_is_valid"
  85247. moved-to="Action.name_is_valid"
  85248. version="2.38">
  85249. <doc xml:space="preserve">Checks if @action_name is valid.
  85250. @action_name is valid if it consists only of alphanumeric characters,
  85251. plus '-' and '.'. The empty string is not a valid action name.
  85252. It is an error to call this function with a non-utf8 @action_name.
  85253. @action_name must not be %NULL.</doc>
  85254. <return-value transfer-ownership="none">
  85255. <doc xml:space="preserve">%TRUE if @action_name is valid</doc>
  85256. <type name="gboolean" c:type="gboolean"/>
  85257. </return-value>
  85258. <parameters>
  85259. <parameter name="action_name" transfer-ownership="none">
  85260. <doc xml:space="preserve">an potential action name</doc>
  85261. <type name="utf8" c:type="const gchar*"/>
  85262. </parameter>
  85263. </parameters>
  85264. </function>
  85265. <function name="action_parse_detailed_name"
  85266. c:identifier="g_action_parse_detailed_name"
  85267. moved-to="Action.parse_detailed_name"
  85268. version="2.38"
  85269. throws="1">
  85270. <doc xml:space="preserve">Parses a detailed action name into its separate name and target
  85271. components.
  85272. Detailed action names can have three formats.
  85273. The first format is used to represent an action name with no target
  85274. value and consists of just an action name containing no whitespace
  85275. nor the characters ':', '(' or ')'. For example: "app.action".
  85276. The second format is used to represent an action with a target value
  85277. that is a non-empty string consisting only of alphanumerics, plus '-'
  85278. and '.'. In that case, the action name and target value are
  85279. separated by a double colon ("::"). For example:
  85280. "app.action::target".
  85281. The third format is used to represent an action with any type of
  85282. target value, including strings. The target value follows the action
  85283. name, surrounded in parens. For example: "app.action(42)". The
  85284. target value is parsed using g_variant_parse(). If a tuple-typed
  85285. value is desired, it must be specified in the same way, resulting in
  85286. two sets of parens, for example: "app.action((1,2,3))". A string
  85287. target can be specified this way as well: "app.action('target')".
  85288. For strings, this third format must be used if * target value is
  85289. empty or contains characters other than alphanumerics, '-' and '.'.</doc>
  85290. <return-value transfer-ownership="none">
  85291. <doc xml:space="preserve">%TRUE if successful, else %FALSE with @error set</doc>
  85292. <type name="gboolean" c:type="gboolean"/>
  85293. </return-value>
  85294. <parameters>
  85295. <parameter name="detailed_name" transfer-ownership="none">
  85296. <doc xml:space="preserve">a detailed action name</doc>
  85297. <type name="utf8" c:type="const gchar*"/>
  85298. </parameter>
  85299. <parameter name="action_name"
  85300. direction="out"
  85301. caller-allocates="0"
  85302. transfer-ownership="full">
  85303. <doc xml:space="preserve">the action name</doc>
  85304. <type name="utf8" c:type="gchar**"/>
  85305. </parameter>
  85306. <parameter name="target_value"
  85307. direction="out"
  85308. caller-allocates="0"
  85309. transfer-ownership="full">
  85310. <doc xml:space="preserve">the target value, or %NULL for no target</doc>
  85311. <type name="GLib.Variant" c:type="GVariant**"/>
  85312. </parameter>
  85313. </parameters>
  85314. </function>
  85315. <function name="action_print_detailed_name"
  85316. c:identifier="g_action_print_detailed_name"
  85317. moved-to="Action.print_detailed_name"
  85318. version="2.38">
  85319. <doc xml:space="preserve">Formats a detailed action name from @action_name and @target_value.
  85320. It is an error to call this function with an invalid action name.
  85321. This function is the opposite of
  85322. g_action_parse_detailed_action_name(). It will produce a string that
  85323. can be parsed back to the @action_name and @target_value by that
  85324. function.
  85325. See that function for the types of strings that will be printed by
  85326. this function.</doc>
  85327. <return-value transfer-ownership="full">
  85328. <doc xml:space="preserve">a detailed format string</doc>
  85329. <type name="utf8" c:type="gchar*"/>
  85330. </return-value>
  85331. <parameters>
  85332. <parameter name="action_name" transfer-ownership="none">
  85333. <doc xml:space="preserve">a valid action name</doc>
  85334. <type name="utf8" c:type="const gchar*"/>
  85335. </parameter>
  85336. <parameter name="target_value"
  85337. transfer-ownership="none"
  85338. nullable="1"
  85339. allow-none="1">
  85340. <doc xml:space="preserve">a #GVariant target value, or %NULL</doc>
  85341. <type name="GLib.Variant" c:type="GVariant*"/>
  85342. </parameter>
  85343. </parameters>
  85344. </function>
  85345. <function name="app_info_create_from_commandline"
  85346. c:identifier="g_app_info_create_from_commandline"
  85347. moved-to="AppInfo.create_from_commandline"
  85348. throws="1">
  85349. <doc xml:space="preserve">Creates a new #GAppInfo from the given information.
  85350. Note that for @commandline, the quoting rules of the Exec key of the
  85351. [freedesktop.org Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec)
  85352. are applied. For example, if the @commandline contains
  85353. percent-encoded URIs, the percent-character must be doubled in order to prevent it from
  85354. being swallowed by Exec key unquoting. See the specification for exact quoting rules.</doc>
  85355. <return-value transfer-ownership="full">
  85356. <doc xml:space="preserve">new #GAppInfo for given command.</doc>
  85357. <type name="AppInfo" c:type="GAppInfo*"/>
  85358. </return-value>
  85359. <parameters>
  85360. <parameter name="commandline" transfer-ownership="none">
  85361. <doc xml:space="preserve">the commandline to use</doc>
  85362. <type name="utf8" c:type="const char*"/>
  85363. </parameter>
  85364. <parameter name="application_name"
  85365. transfer-ownership="none"
  85366. nullable="1"
  85367. allow-none="1">
  85368. <doc xml:space="preserve">the application name, or %NULL to use @commandline</doc>
  85369. <type name="utf8" c:type="const char*"/>
  85370. </parameter>
  85371. <parameter name="flags" transfer-ownership="none">
  85372. <doc xml:space="preserve">flags that can specify details of the created #GAppInfo</doc>
  85373. <type name="AppInfoCreateFlags" c:type="GAppInfoCreateFlags"/>
  85374. </parameter>
  85375. </parameters>
  85376. </function>
  85377. <function name="app_info_get_all"
  85378. c:identifier="g_app_info_get_all"
  85379. moved-to="AppInfo.get_all">
  85380. <doc xml:space="preserve">Gets a list of all of the applications currently registered
  85381. on this system.
  85382. For desktop files, this includes applications that have
  85383. `NoDisplay=true` set or are excluded from display by means
  85384. of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show().
  85385. The returned list does not include applications which have
  85386. the `Hidden` key set.</doc>
  85387. <return-value transfer-ownership="full">
  85388. <doc xml:space="preserve">a newly allocated #GList of references to #GAppInfos.</doc>
  85389. <type name="GLib.List" c:type="GList*">
  85390. <type name="AppInfo"/>
  85391. </type>
  85392. </return-value>
  85393. </function>
  85394. <function name="app_info_get_all_for_type"
  85395. c:identifier="g_app_info_get_all_for_type"
  85396. moved-to="AppInfo.get_all_for_type">
  85397. <doc xml:space="preserve">Gets a list of all #GAppInfos for a given content type,
  85398. including the recommended and fallback #GAppInfos. See
  85399. g_app_info_get_recommended_for_type() and
  85400. g_app_info_get_fallback_for_type().</doc>
  85401. <return-value transfer-ownership="full">
  85402. <doc xml:space="preserve">#GList of #GAppInfos
  85403. for given @content_type or %NULL on error.</doc>
  85404. <type name="GLib.List" c:type="GList*">
  85405. <type name="AppInfo"/>
  85406. </type>
  85407. </return-value>
  85408. <parameters>
  85409. <parameter name="content_type" transfer-ownership="none">
  85410. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  85411. <type name="utf8" c:type="const char*"/>
  85412. </parameter>
  85413. </parameters>
  85414. </function>
  85415. <function name="app_info_get_default_for_type"
  85416. c:identifier="g_app_info_get_default_for_type"
  85417. moved-to="AppInfo.get_default_for_type">
  85418. <doc xml:space="preserve">Gets the default #GAppInfo for a given content type.</doc>
  85419. <return-value transfer-ownership="full">
  85420. <doc xml:space="preserve">#GAppInfo for given @content_type or
  85421. %NULL on error.</doc>
  85422. <type name="AppInfo" c:type="GAppInfo*"/>
  85423. </return-value>
  85424. <parameters>
  85425. <parameter name="content_type" transfer-ownership="none">
  85426. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  85427. <type name="utf8" c:type="const char*"/>
  85428. </parameter>
  85429. <parameter name="must_support_uris" transfer-ownership="none">
  85430. <doc xml:space="preserve">if %TRUE, the #GAppInfo is expected to
  85431. support URIs</doc>
  85432. <type name="gboolean" c:type="gboolean"/>
  85433. </parameter>
  85434. </parameters>
  85435. </function>
  85436. <function name="app_info_get_default_for_uri_scheme"
  85437. c:identifier="g_app_info_get_default_for_uri_scheme"
  85438. moved-to="AppInfo.get_default_for_uri_scheme">
  85439. <doc xml:space="preserve">Gets the default application for handling URIs with
  85440. the given URI scheme. A URI scheme is the initial part
  85441. of the URI, up to but not including the ':', e.g. "http",
  85442. "ftp" or "sip".</doc>
  85443. <return-value transfer-ownership="full">
  85444. <doc xml:space="preserve">#GAppInfo for given @uri_scheme or %NULL on error.</doc>
  85445. <type name="AppInfo" c:type="GAppInfo*"/>
  85446. </return-value>
  85447. <parameters>
  85448. <parameter name="uri_scheme" transfer-ownership="none">
  85449. <doc xml:space="preserve">a string containing a URI scheme.</doc>
  85450. <type name="utf8" c:type="const char*"/>
  85451. </parameter>
  85452. </parameters>
  85453. </function>
  85454. <function name="app_info_get_fallback_for_type"
  85455. c:identifier="g_app_info_get_fallback_for_type"
  85456. moved-to="AppInfo.get_fallback_for_type"
  85457. version="2.28">
  85458. <doc xml:space="preserve">Gets a list of fallback #GAppInfos for a given content type, i.e.
  85459. those applications which claim to support the given content type
  85460. by MIME type subclassing and not directly.</doc>
  85461. <return-value transfer-ownership="full">
  85462. <doc xml:space="preserve">#GList of #GAppInfos
  85463. for given @content_type or %NULL on error.</doc>
  85464. <type name="GLib.List" c:type="GList*">
  85465. <type name="AppInfo"/>
  85466. </type>
  85467. </return-value>
  85468. <parameters>
  85469. <parameter name="content_type" transfer-ownership="none">
  85470. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  85471. <type name="utf8" c:type="const gchar*"/>
  85472. </parameter>
  85473. </parameters>
  85474. </function>
  85475. <function name="app_info_get_recommended_for_type"
  85476. c:identifier="g_app_info_get_recommended_for_type"
  85477. moved-to="AppInfo.get_recommended_for_type"
  85478. version="2.28">
  85479. <doc xml:space="preserve">Gets a list of recommended #GAppInfos for a given content type, i.e.
  85480. those applications which claim to support the given content type exactly,
  85481. and not by MIME type subclassing.
  85482. Note that the first application of the list is the last used one, i.e.
  85483. the last one for which g_app_info_set_as_last_used_for_type() has been
  85484. called.</doc>
  85485. <return-value transfer-ownership="full">
  85486. <doc xml:space="preserve">#GList of #GAppInfos
  85487. for given @content_type or %NULL on error.</doc>
  85488. <type name="GLib.List" c:type="GList*">
  85489. <type name="AppInfo"/>
  85490. </type>
  85491. </return-value>
  85492. <parameters>
  85493. <parameter name="content_type" transfer-ownership="none">
  85494. <doc xml:space="preserve">the content type to find a #GAppInfo for</doc>
  85495. <type name="utf8" c:type="const gchar*"/>
  85496. </parameter>
  85497. </parameters>
  85498. </function>
  85499. <function name="app_info_launch_default_for_uri"
  85500. c:identifier="g_app_info_launch_default_for_uri"
  85501. moved-to="AppInfo.launch_default_for_uri"
  85502. throws="1">
  85503. <doc xml:space="preserve">Utility function that launches the default application
  85504. registered to handle the specified uri. Synchronous I/O
  85505. is done on the uri to detect the type of the file if
  85506. required.</doc>
  85507. <return-value transfer-ownership="none">
  85508. <doc xml:space="preserve">%TRUE on success, %FALSE on error.</doc>
  85509. <type name="gboolean" c:type="gboolean"/>
  85510. </return-value>
  85511. <parameters>
  85512. <parameter name="uri" transfer-ownership="none">
  85513. <doc xml:space="preserve">the uri to show</doc>
  85514. <type name="utf8" c:type="const char*"/>
  85515. </parameter>
  85516. <parameter name="launch_context"
  85517. transfer-ownership="none"
  85518. nullable="1"
  85519. allow-none="1">
  85520. <doc xml:space="preserve">an optional #GAppLaunchContext.</doc>
  85521. <type name="AppLaunchContext" c:type="GAppLaunchContext*"/>
  85522. </parameter>
  85523. </parameters>
  85524. </function>
  85525. <function name="app_info_reset_type_associations"
  85526. c:identifier="g_app_info_reset_type_associations"
  85527. moved-to="AppInfo.reset_type_associations"
  85528. version="2.20">
  85529. <doc xml:space="preserve">Removes all changes to the type associations done by
  85530. g_app_info_set_as_default_for_type(),
  85531. g_app_info_set_as_default_for_extension(),
  85532. g_app_info_add_supports_type() or
  85533. g_app_info_remove_supports_type().</doc>
  85534. <return-value transfer-ownership="none">
  85535. <type name="none" c:type="void"/>
  85536. </return-value>
  85537. <parameters>
  85538. <parameter name="content_type" transfer-ownership="none">
  85539. <doc xml:space="preserve">a content type</doc>
  85540. <type name="utf8" c:type="const char*"/>
  85541. </parameter>
  85542. </parameters>
  85543. </function>
  85544. <function name="async_initable_newv_async"
  85545. c:identifier="g_async_initable_newv_async"
  85546. moved-to="AsyncInitable.newv_async"
  85547. version="2.22">
  85548. <doc xml:space="preserve">Helper function for constructing #GAsyncInitable object. This is
  85549. similar to g_object_newv() but also initializes the object asynchronously.
  85550. When the initialization is finished, @callback will be called. You can
  85551. then call g_async_initable_new_finish() to get the new object and check
  85552. for any errors.</doc>
  85553. <return-value transfer-ownership="none">
  85554. <type name="none" c:type="void"/>
  85555. </return-value>
  85556. <parameters>
  85557. <parameter name="object_type" transfer-ownership="none">
  85558. <doc xml:space="preserve">a #GType supporting #GAsyncInitable.</doc>
  85559. <type name="GType" c:type="GType"/>
  85560. </parameter>
  85561. <parameter name="n_parameters" transfer-ownership="none">
  85562. <doc xml:space="preserve">the number of parameters in @parameters</doc>
  85563. <type name="guint" c:type="guint"/>
  85564. </parameter>
  85565. <parameter name="parameters" transfer-ownership="none">
  85566. <doc xml:space="preserve">the parameters to use to construct the object</doc>
  85567. <type name="GObject.Parameter" c:type="GParameter*"/>
  85568. </parameter>
  85569. <parameter name="io_priority" transfer-ownership="none">
  85570. <doc xml:space="preserve">the [I/O priority][io-priority] of the operation</doc>
  85571. <type name="gint" c:type="int"/>
  85572. </parameter>
  85573. <parameter name="cancellable"
  85574. transfer-ownership="none"
  85575. nullable="1"
  85576. allow-none="1">
  85577. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  85578. <type name="Cancellable" c:type="GCancellable*"/>
  85579. </parameter>
  85580. <parameter name="callback"
  85581. transfer-ownership="none"
  85582. nullable="1"
  85583. allow-none="1"
  85584. scope="async"
  85585. closure="6">
  85586. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the initialization is
  85587. finished</doc>
  85588. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  85589. </parameter>
  85590. <parameter name="user_data"
  85591. transfer-ownership="none"
  85592. nullable="1"
  85593. allow-none="1">
  85594. <doc xml:space="preserve">the data to pass to callback function</doc>
  85595. <type name="gpointer" c:type="gpointer"/>
  85596. </parameter>
  85597. </parameters>
  85598. </function>
  85599. <function name="bus_get" c:identifier="g_bus_get" version="2.26">
  85600. <doc xml:space="preserve">Asynchronously connects to the message bus specified by @bus_type.
  85601. When the operation is finished, @callback will be invoked. You can
  85602. then call g_bus_get_finish() to get the result of the operation.
  85603. This is a asynchronous failable function. See g_bus_get_sync() for
  85604. the synchronous version.</doc>
  85605. <return-value transfer-ownership="none">
  85606. <type name="none" c:type="void"/>
  85607. </return-value>
  85608. <parameters>
  85609. <parameter name="bus_type" transfer-ownership="none">
  85610. <doc xml:space="preserve">a #GBusType</doc>
  85611. <type name="BusType" c:type="GBusType"/>
  85612. </parameter>
  85613. <parameter name="cancellable"
  85614. transfer-ownership="none"
  85615. nullable="1"
  85616. allow-none="1">
  85617. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  85618. <type name="Cancellable" c:type="GCancellable*"/>
  85619. </parameter>
  85620. <parameter name="callback"
  85621. transfer-ownership="none"
  85622. nullable="1"
  85623. allow-none="1"
  85624. scope="async"
  85625. closure="3">
  85626. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the request is satisfied</doc>
  85627. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  85628. </parameter>
  85629. <parameter name="user_data"
  85630. transfer-ownership="none"
  85631. nullable="1"
  85632. allow-none="1">
  85633. <doc xml:space="preserve">the data to pass to @callback</doc>
  85634. <type name="gpointer" c:type="gpointer"/>
  85635. </parameter>
  85636. </parameters>
  85637. </function>
  85638. <function name="bus_get_finish"
  85639. c:identifier="g_bus_get_finish"
  85640. version="2.26"
  85641. throws="1">
  85642. <doc xml:space="preserve">Finishes an operation started with g_bus_get().
  85643. The returned object is a singleton, that is, shared with other
  85644. callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
  85645. event that you need a private message bus connection, use
  85646. g_dbus_address_get_for_bus_sync() and
  85647. g_dbus_connection_new_for_address().
  85648. Note that the returned #GDBusConnection object will (usually) have
  85649. the #GDBusConnection:exit-on-close property set to %TRUE.</doc>
  85650. <return-value transfer-ownership="full">
  85651. <doc xml:space="preserve">a #GDBusConnection or %NULL if @error is set.
  85652. Free with g_object_unref().</doc>
  85653. <type name="DBusConnection" c:type="GDBusConnection*"/>
  85654. </return-value>
  85655. <parameters>
  85656. <parameter name="res" transfer-ownership="none">
  85657. <doc xml:space="preserve">a #GAsyncResult obtained from the #GAsyncReadyCallback passed
  85658. to g_bus_get()</doc>
  85659. <type name="AsyncResult" c:type="GAsyncResult*"/>
  85660. </parameter>
  85661. </parameters>
  85662. </function>
  85663. <function name="bus_get_sync"
  85664. c:identifier="g_bus_get_sync"
  85665. version="2.26"
  85666. throws="1">
  85667. <doc xml:space="preserve">Synchronously connects to the message bus specified by @bus_type.
  85668. Note that the returned object may shared with other callers,
  85669. e.g. if two separate parts of a process calls this function with
  85670. the same @bus_type, they will share the same object.
  85671. This is a synchronous failable function. See g_bus_get() and
  85672. g_bus_get_finish() for the asynchronous version.
  85673. The returned object is a singleton, that is, shared with other
  85674. callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
  85675. event that you need a private message bus connection, use
  85676. g_dbus_address_get_for_bus_sync() and
  85677. g_dbus_connection_new_for_address().
  85678. Note that the returned #GDBusConnection object will (usually) have
  85679. the #GDBusConnection:exit-on-close property set to %TRUE.</doc>
  85680. <return-value transfer-ownership="full">
  85681. <doc xml:space="preserve">a #GDBusConnection or %NULL if @error is set.
  85682. Free with g_object_unref().</doc>
  85683. <type name="DBusConnection" c:type="GDBusConnection*"/>
  85684. </return-value>
  85685. <parameters>
  85686. <parameter name="bus_type" transfer-ownership="none">
  85687. <doc xml:space="preserve">a #GBusType</doc>
  85688. <type name="BusType" c:type="GBusType"/>
  85689. </parameter>
  85690. <parameter name="cancellable"
  85691. transfer-ownership="none"
  85692. nullable="1"
  85693. allow-none="1">
  85694. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  85695. <type name="Cancellable" c:type="GCancellable*"/>
  85696. </parameter>
  85697. </parameters>
  85698. </function>
  85699. <function name="bus_own_name"
  85700. c:identifier="g_bus_own_name"
  85701. shadowed-by="bus_own_name_with_closures"
  85702. version="2.26"
  85703. introspectable="0">
  85704. <doc xml:space="preserve">Starts acquiring @name on the bus specified by @bus_type and calls
  85705. @name_acquired_handler and @name_lost_handler when the name is
  85706. acquired respectively lost. Callbacks will be invoked in the
  85707. [thread-default main context][g-main-context-push-thread-default]
  85708. of the thread you are calling this function from.
  85709. You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
  85710. callbacks will be invoked after calling this function - there are three
  85711. possible cases:
  85712. - @name_lost_handler with a %NULL connection (if a connection to the bus
  85713. can't be made).
  85714. - @bus_acquired_handler then @name_lost_handler (if the name can't be
  85715. obtained)
  85716. - @bus_acquired_handler then @name_acquired_handler (if the name was
  85717. obtained).
  85718. When you are done owning the name, just call g_bus_unown_name()
  85719. with the owner id this function returns.
  85720. If the name is acquired or lost (for example another application
  85721. could acquire the name if you allow replacement or the application
  85722. currently owning the name exits), the handlers are also invoked.
  85723. If the #GDBusConnection that is used for attempting to own the name
  85724. closes, then @name_lost_handler is invoked since it is no longer
  85725. possible for other processes to access the process.
  85726. You cannot use g_bus_own_name() several times for the same name (unless
  85727. interleaved with calls to g_bus_unown_name()) - only the first call
  85728. will work.
  85729. Another guarantee is that invocations of @name_acquired_handler
  85730. and @name_lost_handler are guaranteed to alternate; that
  85731. is, if @name_acquired_handler is invoked then you are
  85732. guaranteed that the next time one of the handlers is invoked, it
  85733. will be @name_lost_handler. The reverse is also true.
  85734. If you plan on exporting objects (using e.g.
  85735. g_dbus_connection_register_object()), note that it is generally too late
  85736. to export the objects in @name_acquired_handler. Instead, you can do this
  85737. in @bus_acquired_handler since you are guaranteed that this will run
  85738. before @name is requested from the bus.
  85739. This behavior makes it very simple to write applications that wants
  85740. to [own names][gdbus-owning-names] and export objects.
  85741. Simply register objects to be exported in @bus_acquired_handler and
  85742. unregister the objects (if any) in @name_lost_handler.</doc>
  85743. <return-value transfer-ownership="none">
  85744. <doc xml:space="preserve">an identifier (never 0) that an be used with
  85745. g_bus_unown_name() to stop owning the name.</doc>
  85746. <type name="guint" c:type="guint"/>
  85747. </return-value>
  85748. <parameters>
  85749. <parameter name="bus_type" transfer-ownership="none">
  85750. <doc xml:space="preserve">the type of bus to own a name on</doc>
  85751. <type name="BusType" c:type="GBusType"/>
  85752. </parameter>
  85753. <parameter name="name" transfer-ownership="none">
  85754. <doc xml:space="preserve">the well-known name to own</doc>
  85755. <type name="utf8" c:type="const gchar*"/>
  85756. </parameter>
  85757. <parameter name="flags" transfer-ownership="none">
  85758. <doc xml:space="preserve">a set of flags from the #GBusNameOwnerFlags enumeration</doc>
  85759. <type name="BusNameOwnerFlags" c:type="GBusNameOwnerFlags"/>
  85760. </parameter>
  85761. <parameter name="bus_acquired_handler"
  85762. transfer-ownership="none"
  85763. nullable="1"
  85764. allow-none="1">
  85765. <doc xml:space="preserve">handler to invoke when connected to the bus of type @bus_type or %NULL</doc>
  85766. <type name="BusAcquiredCallback" c:type="GBusAcquiredCallback"/>
  85767. </parameter>
  85768. <parameter name="name_acquired_handler"
  85769. transfer-ownership="none"
  85770. nullable="1"
  85771. allow-none="1">
  85772. <doc xml:space="preserve">handler to invoke when @name is acquired or %NULL</doc>
  85773. <type name="BusNameAcquiredCallback"
  85774. c:type="GBusNameAcquiredCallback"/>
  85775. </parameter>
  85776. <parameter name="name_lost_handler"
  85777. transfer-ownership="none"
  85778. nullable="1"
  85779. allow-none="1"
  85780. scope="notified"
  85781. closure="6"
  85782. destroy="7">
  85783. <doc xml:space="preserve">handler to invoke when @name is lost or %NULL</doc>
  85784. <type name="BusNameLostCallback" c:type="GBusNameLostCallback"/>
  85785. </parameter>
  85786. <parameter name="user_data"
  85787. transfer-ownership="none"
  85788. nullable="1"
  85789. allow-none="1">
  85790. <doc xml:space="preserve">user data to pass to handlers</doc>
  85791. <type name="gpointer" c:type="gpointer"/>
  85792. </parameter>
  85793. <parameter name="user_data_free_func"
  85794. transfer-ownership="none"
  85795. nullable="1"
  85796. allow-none="1"
  85797. scope="async">
  85798. <doc xml:space="preserve">function for freeing @user_data or %NULL</doc>
  85799. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  85800. </parameter>
  85801. </parameters>
  85802. </function>
  85803. <function name="bus_own_name_on_connection"
  85804. c:identifier="g_bus_own_name_on_connection"
  85805. shadowed-by="bus_own_name_on_connection_with_closures"
  85806. version="2.26"
  85807. introspectable="0">
  85808. <doc xml:space="preserve">Like g_bus_own_name() but takes a #GDBusConnection instead of a
  85809. #GBusType.</doc>
  85810. <return-value transfer-ownership="none">
  85811. <doc xml:space="preserve">an identifier (never 0) that an be used with
  85812. g_bus_unown_name() to stop owning the name</doc>
  85813. <type name="guint" c:type="guint"/>
  85814. </return-value>
  85815. <parameters>
  85816. <parameter name="connection" transfer-ownership="none">
  85817. <doc xml:space="preserve">a #GDBusConnection</doc>
  85818. <type name="DBusConnection" c:type="GDBusConnection*"/>
  85819. </parameter>
  85820. <parameter name="name" transfer-ownership="none">
  85821. <doc xml:space="preserve">the well-known name to own</doc>
  85822. <type name="utf8" c:type="const gchar*"/>
  85823. </parameter>
  85824. <parameter name="flags" transfer-ownership="none">
  85825. <doc xml:space="preserve">a set of flags from the #GBusNameOwnerFlags enumeration</doc>
  85826. <type name="BusNameOwnerFlags" c:type="GBusNameOwnerFlags"/>
  85827. </parameter>
  85828. <parameter name="name_acquired_handler"
  85829. transfer-ownership="none"
  85830. nullable="1"
  85831. allow-none="1">
  85832. <doc xml:space="preserve">handler to invoke when @name is acquired or %NULL</doc>
  85833. <type name="BusNameAcquiredCallback"
  85834. c:type="GBusNameAcquiredCallback"/>
  85835. </parameter>
  85836. <parameter name="name_lost_handler"
  85837. transfer-ownership="none"
  85838. nullable="1"
  85839. allow-none="1"
  85840. scope="notified"
  85841. closure="5"
  85842. destroy="6">
  85843. <doc xml:space="preserve">handler to invoke when @name is lost or %NULL</doc>
  85844. <type name="BusNameLostCallback" c:type="GBusNameLostCallback"/>
  85845. </parameter>
  85846. <parameter name="user_data"
  85847. transfer-ownership="none"
  85848. nullable="1"
  85849. allow-none="1">
  85850. <doc xml:space="preserve">user data to pass to handlers</doc>
  85851. <type name="gpointer" c:type="gpointer"/>
  85852. </parameter>
  85853. <parameter name="user_data_free_func"
  85854. transfer-ownership="none"
  85855. nullable="1"
  85856. allow-none="1"
  85857. scope="async">
  85858. <doc xml:space="preserve">function for freeing @user_data or %NULL</doc>
  85859. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  85860. </parameter>
  85861. </parameters>
  85862. </function>
  85863. <function name="bus_own_name_on_connection_with_closures"
  85864. c:identifier="g_bus_own_name_on_connection_with_closures"
  85865. shadows="bus_own_name_on_connection"
  85866. version="2.26">
  85867. <doc xml:space="preserve">Version of g_bus_own_name_on_connection() using closures instead of
  85868. callbacks for easier binding in other languages.</doc>
  85869. <return-value transfer-ownership="none">
  85870. <doc xml:space="preserve">an identifier (never 0) that an be used with
  85871. g_bus_unown_name() to stop owning the name.</doc>
  85872. <type name="guint" c:type="guint"/>
  85873. </return-value>
  85874. <parameters>
  85875. <parameter name="connection" transfer-ownership="none">
  85876. <doc xml:space="preserve">a #GDBusConnection</doc>
  85877. <type name="DBusConnection" c:type="GDBusConnection*"/>
  85878. </parameter>
  85879. <parameter name="name" transfer-ownership="none">
  85880. <doc xml:space="preserve">the well-known name to own</doc>
  85881. <type name="utf8" c:type="const gchar*"/>
  85882. </parameter>
  85883. <parameter name="flags" transfer-ownership="none">
  85884. <doc xml:space="preserve">a set of flags from the #GBusNameOwnerFlags enumeration</doc>
  85885. <type name="BusNameOwnerFlags" c:type="GBusNameOwnerFlags"/>
  85886. </parameter>
  85887. <parameter name="name_acquired_closure"
  85888. transfer-ownership="none"
  85889. nullable="1"
  85890. allow-none="1">
  85891. <doc xml:space="preserve">#GClosure to invoke when @name is
  85892. acquired or %NULL</doc>
  85893. <type name="GObject.Closure" c:type="GClosure*"/>
  85894. </parameter>
  85895. <parameter name="name_lost_closure"
  85896. transfer-ownership="none"
  85897. nullable="1"
  85898. allow-none="1">
  85899. <doc xml:space="preserve">#GClosure to invoke when @name is lost
  85900. or %NULL</doc>
  85901. <type name="GObject.Closure" c:type="GClosure*"/>
  85902. </parameter>
  85903. </parameters>
  85904. </function>
  85905. <function name="bus_own_name_with_closures"
  85906. c:identifier="g_bus_own_name_with_closures"
  85907. shadows="bus_own_name"
  85908. version="2.26">
  85909. <doc xml:space="preserve">Version of g_bus_own_name() using closures instead of callbacks for
  85910. easier binding in other languages.</doc>
  85911. <return-value transfer-ownership="none">
  85912. <doc xml:space="preserve">an identifier (never 0) that an be used with
  85913. g_bus_unown_name() to stop owning the name.</doc>
  85914. <type name="guint" c:type="guint"/>
  85915. </return-value>
  85916. <parameters>
  85917. <parameter name="bus_type" transfer-ownership="none">
  85918. <doc xml:space="preserve">the type of bus to own a name on</doc>
  85919. <type name="BusType" c:type="GBusType"/>
  85920. </parameter>
  85921. <parameter name="name" transfer-ownership="none">
  85922. <doc xml:space="preserve">the well-known name to own</doc>
  85923. <type name="utf8" c:type="const gchar*"/>
  85924. </parameter>
  85925. <parameter name="flags" transfer-ownership="none">
  85926. <doc xml:space="preserve">a set of flags from the #GBusNameOwnerFlags enumeration</doc>
  85927. <type name="BusNameOwnerFlags" c:type="GBusNameOwnerFlags"/>
  85928. </parameter>
  85929. <parameter name="bus_acquired_closure"
  85930. transfer-ownership="none"
  85931. nullable="1"
  85932. allow-none="1">
  85933. <doc xml:space="preserve">#GClosure to invoke when connected to
  85934. the bus of type @bus_type or %NULL</doc>
  85935. <type name="GObject.Closure" c:type="GClosure*"/>
  85936. </parameter>
  85937. <parameter name="name_acquired_closure"
  85938. transfer-ownership="none"
  85939. nullable="1"
  85940. allow-none="1">
  85941. <doc xml:space="preserve">#GClosure to invoke when @name is
  85942. acquired or %NULL</doc>
  85943. <type name="GObject.Closure" c:type="GClosure*"/>
  85944. </parameter>
  85945. <parameter name="name_lost_closure"
  85946. transfer-ownership="none"
  85947. nullable="1"
  85948. allow-none="1">
  85949. <doc xml:space="preserve">#GClosure to invoke when @name is lost or
  85950. %NULL</doc>
  85951. <type name="GObject.Closure" c:type="GClosure*"/>
  85952. </parameter>
  85953. </parameters>
  85954. </function>
  85955. <function name="bus_unown_name"
  85956. c:identifier="g_bus_unown_name"
  85957. version="2.26">
  85958. <doc xml:space="preserve">Stops owning a name.</doc>
  85959. <return-value transfer-ownership="none">
  85960. <type name="none" c:type="void"/>
  85961. </return-value>
  85962. <parameters>
  85963. <parameter name="owner_id" transfer-ownership="none">
  85964. <doc xml:space="preserve">an identifier obtained from g_bus_own_name()</doc>
  85965. <type name="guint" c:type="guint"/>
  85966. </parameter>
  85967. </parameters>
  85968. </function>
  85969. <function name="bus_unwatch_name"
  85970. c:identifier="g_bus_unwatch_name"
  85971. version="2.26">
  85972. <doc xml:space="preserve">Stops watching a name.</doc>
  85973. <return-value transfer-ownership="none">
  85974. <type name="none" c:type="void"/>
  85975. </return-value>
  85976. <parameters>
  85977. <parameter name="watcher_id" transfer-ownership="none">
  85978. <doc xml:space="preserve">An identifier obtained from g_bus_watch_name()</doc>
  85979. <type name="guint" c:type="guint"/>
  85980. </parameter>
  85981. </parameters>
  85982. </function>
  85983. <function name="bus_watch_name"
  85984. c:identifier="g_bus_watch_name"
  85985. shadowed-by="bus_watch_name_with_closures"
  85986. version="2.26"
  85987. introspectable="0">
  85988. <doc xml:space="preserve">Starts watching @name on the bus specified by @bus_type and calls
  85989. @name_appeared_handler and @name_vanished_handler when the name is
  85990. known to have a owner respectively known to lose its
  85991. owner. Callbacks will be invoked in the
  85992. [thread-default main context][g-main-context-push-thread-default]
  85993. of the thread you are calling this function from.
  85994. You are guaranteed that one of the handlers will be invoked after
  85995. calling this function. When you are done watching the name, just
  85996. call g_bus_unwatch_name() with the watcher id this function
  85997. returns.
  85998. If the name vanishes or appears (for example the application owning
  85999. the name could restart), the handlers are also invoked. If the
  86000. #GDBusConnection that is used for watching the name disconnects, then
  86001. @name_vanished_handler is invoked since it is no longer
  86002. possible to access the name.
  86003. Another guarantee is that invocations of @name_appeared_handler
  86004. and @name_vanished_handler are guaranteed to alternate; that
  86005. is, if @name_appeared_handler is invoked then you are
  86006. guaranteed that the next time one of the handlers is invoked, it
  86007. will be @name_vanished_handler. The reverse is also true.
  86008. This behavior makes it very simple to write applications that want
  86009. to take action when a certain [name exists][gdbus-watching-names].
  86010. Basically, the application should create object proxies in
  86011. @name_appeared_handler and destroy them again (if any) in
  86012. @name_vanished_handler.</doc>
  86013. <return-value transfer-ownership="none">
  86014. <doc xml:space="preserve">An identifier (never 0) that an be used with
  86015. g_bus_unwatch_name() to stop watching the name.</doc>
  86016. <type name="guint" c:type="guint"/>
  86017. </return-value>
  86018. <parameters>
  86019. <parameter name="bus_type" transfer-ownership="none">
  86020. <doc xml:space="preserve">The type of bus to watch a name on.</doc>
  86021. <type name="BusType" c:type="GBusType"/>
  86022. </parameter>
  86023. <parameter name="name" transfer-ownership="none">
  86024. <doc xml:space="preserve">The name (well-known or unique) to watch.</doc>
  86025. <type name="utf8" c:type="const gchar*"/>
  86026. </parameter>
  86027. <parameter name="flags" transfer-ownership="none">
  86028. <doc xml:space="preserve">Flags from the #GBusNameWatcherFlags enumeration.</doc>
  86029. <type name="BusNameWatcherFlags" c:type="GBusNameWatcherFlags"/>
  86030. </parameter>
  86031. <parameter name="name_appeared_handler"
  86032. transfer-ownership="none"
  86033. nullable="1"
  86034. allow-none="1">
  86035. <doc xml:space="preserve">Handler to invoke when @name is known to exist or %NULL.</doc>
  86036. <type name="BusNameAppearedCallback"
  86037. c:type="GBusNameAppearedCallback"/>
  86038. </parameter>
  86039. <parameter name="name_vanished_handler"
  86040. transfer-ownership="none"
  86041. nullable="1"
  86042. allow-none="1"
  86043. scope="notified"
  86044. closure="5"
  86045. destroy="6">
  86046. <doc xml:space="preserve">Handler to invoke when @name is known to not exist or %NULL.</doc>
  86047. <type name="BusNameVanishedCallback"
  86048. c:type="GBusNameVanishedCallback"/>
  86049. </parameter>
  86050. <parameter name="user_data"
  86051. transfer-ownership="none"
  86052. nullable="1"
  86053. allow-none="1">
  86054. <doc xml:space="preserve">User data to pass to handlers.</doc>
  86055. <type name="gpointer" c:type="gpointer"/>
  86056. </parameter>
  86057. <parameter name="user_data_free_func"
  86058. transfer-ownership="none"
  86059. nullable="1"
  86060. allow-none="1"
  86061. scope="async">
  86062. <doc xml:space="preserve">Function for freeing @user_data or %NULL.</doc>
  86063. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  86064. </parameter>
  86065. </parameters>
  86066. </function>
  86067. <function name="bus_watch_name_on_connection"
  86068. c:identifier="g_bus_watch_name_on_connection"
  86069. shadowed-by="bus_watch_name_on_connection_with_closures"
  86070. version="2.26"
  86071. introspectable="0">
  86072. <doc xml:space="preserve">Like g_bus_watch_name() but takes a #GDBusConnection instead of a
  86073. #GBusType.</doc>
  86074. <return-value transfer-ownership="none">
  86075. <doc xml:space="preserve">An identifier (never 0) that an be used with
  86076. g_bus_unwatch_name() to stop watching the name.</doc>
  86077. <type name="guint" c:type="guint"/>
  86078. </return-value>
  86079. <parameters>
  86080. <parameter name="connection" transfer-ownership="none">
  86081. <doc xml:space="preserve">A #GDBusConnection.</doc>
  86082. <type name="DBusConnection" c:type="GDBusConnection*"/>
  86083. </parameter>
  86084. <parameter name="name" transfer-ownership="none">
  86085. <doc xml:space="preserve">The name (well-known or unique) to watch.</doc>
  86086. <type name="utf8" c:type="const gchar*"/>
  86087. </parameter>
  86088. <parameter name="flags" transfer-ownership="none">
  86089. <doc xml:space="preserve">Flags from the #GBusNameWatcherFlags enumeration.</doc>
  86090. <type name="BusNameWatcherFlags" c:type="GBusNameWatcherFlags"/>
  86091. </parameter>
  86092. <parameter name="name_appeared_handler"
  86093. transfer-ownership="none"
  86094. nullable="1"
  86095. allow-none="1">
  86096. <doc xml:space="preserve">Handler to invoke when @name is known to exist or %NULL.</doc>
  86097. <type name="BusNameAppearedCallback"
  86098. c:type="GBusNameAppearedCallback"/>
  86099. </parameter>
  86100. <parameter name="name_vanished_handler"
  86101. transfer-ownership="none"
  86102. nullable="1"
  86103. allow-none="1"
  86104. scope="notified"
  86105. closure="5"
  86106. destroy="6">
  86107. <doc xml:space="preserve">Handler to invoke when @name is known to not exist or %NULL.</doc>
  86108. <type name="BusNameVanishedCallback"
  86109. c:type="GBusNameVanishedCallback"/>
  86110. </parameter>
  86111. <parameter name="user_data"
  86112. transfer-ownership="none"
  86113. nullable="1"
  86114. allow-none="1">
  86115. <doc xml:space="preserve">User data to pass to handlers.</doc>
  86116. <type name="gpointer" c:type="gpointer"/>
  86117. </parameter>
  86118. <parameter name="user_data_free_func"
  86119. transfer-ownership="none"
  86120. nullable="1"
  86121. allow-none="1"
  86122. scope="async">
  86123. <doc xml:space="preserve">Function for freeing @user_data or %NULL.</doc>
  86124. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  86125. </parameter>
  86126. </parameters>
  86127. </function>
  86128. <function name="bus_watch_name_on_connection_with_closures"
  86129. c:identifier="g_bus_watch_name_on_connection_with_closures"
  86130. shadows="bus_watch_name_on_connection"
  86131. version="2.26">
  86132. <doc xml:space="preserve">Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
  86133. easier binding in other languages.</doc>
  86134. <return-value transfer-ownership="none">
  86135. <doc xml:space="preserve">An identifier (never 0) that an be used with
  86136. g_bus_unwatch_name() to stop watching the name.</doc>
  86137. <type name="guint" c:type="guint"/>
  86138. </return-value>
  86139. <parameters>
  86140. <parameter name="connection" transfer-ownership="none">
  86141. <doc xml:space="preserve">A #GDBusConnection.</doc>
  86142. <type name="DBusConnection" c:type="GDBusConnection*"/>
  86143. </parameter>
  86144. <parameter name="name" transfer-ownership="none">
  86145. <doc xml:space="preserve">The name (well-known or unique) to watch.</doc>
  86146. <type name="utf8" c:type="const gchar*"/>
  86147. </parameter>
  86148. <parameter name="flags" transfer-ownership="none">
  86149. <doc xml:space="preserve">Flags from the #GBusNameWatcherFlags enumeration.</doc>
  86150. <type name="BusNameWatcherFlags" c:type="GBusNameWatcherFlags"/>
  86151. </parameter>
  86152. <parameter name="name_appeared_closure"
  86153. transfer-ownership="none"
  86154. nullable="1"
  86155. allow-none="1">
  86156. <doc xml:space="preserve">#GClosure to invoke when @name is known
  86157. to exist or %NULL.</doc>
  86158. <type name="GObject.Closure" c:type="GClosure*"/>
  86159. </parameter>
  86160. <parameter name="name_vanished_closure"
  86161. transfer-ownership="none"
  86162. nullable="1"
  86163. allow-none="1">
  86164. <doc xml:space="preserve">#GClosure to invoke when @name is known
  86165. to not exist or %NULL.</doc>
  86166. <type name="GObject.Closure" c:type="GClosure*"/>
  86167. </parameter>
  86168. </parameters>
  86169. </function>
  86170. <function name="bus_watch_name_with_closures"
  86171. c:identifier="g_bus_watch_name_with_closures"
  86172. shadows="bus_watch_name"
  86173. version="2.26">
  86174. <doc xml:space="preserve">Version of g_bus_watch_name() using closures instead of callbacks for
  86175. easier binding in other languages.</doc>
  86176. <return-value transfer-ownership="none">
  86177. <doc xml:space="preserve">An identifier (never 0) that an be used with
  86178. g_bus_unwatch_name() to stop watching the name.</doc>
  86179. <type name="guint" c:type="guint"/>
  86180. </return-value>
  86181. <parameters>
  86182. <parameter name="bus_type" transfer-ownership="none">
  86183. <doc xml:space="preserve">The type of bus to watch a name on.</doc>
  86184. <type name="BusType" c:type="GBusType"/>
  86185. </parameter>
  86186. <parameter name="name" transfer-ownership="none">
  86187. <doc xml:space="preserve">The name (well-known or unique) to watch.</doc>
  86188. <type name="utf8" c:type="const gchar*"/>
  86189. </parameter>
  86190. <parameter name="flags" transfer-ownership="none">
  86191. <doc xml:space="preserve">Flags from the #GBusNameWatcherFlags enumeration.</doc>
  86192. <type name="BusNameWatcherFlags" c:type="GBusNameWatcherFlags"/>
  86193. </parameter>
  86194. <parameter name="name_appeared_closure"
  86195. transfer-ownership="none"
  86196. nullable="1"
  86197. allow-none="1">
  86198. <doc xml:space="preserve">#GClosure to invoke when @name is known
  86199. to exist or %NULL.</doc>
  86200. <type name="GObject.Closure" c:type="GClosure*"/>
  86201. </parameter>
  86202. <parameter name="name_vanished_closure"
  86203. transfer-ownership="none"
  86204. nullable="1"
  86205. allow-none="1">
  86206. <doc xml:space="preserve">#GClosure to invoke when @name is known
  86207. to not exist or %NULL.</doc>
  86208. <type name="GObject.Closure" c:type="GClosure*"/>
  86209. </parameter>
  86210. </parameters>
  86211. </function>
  86212. <function name="content_type_can_be_executable"
  86213. c:identifier="g_content_type_can_be_executable">
  86214. <doc xml:space="preserve">Checks if a content type can be executable. Note that for instance
  86215. things like text files can be executables (i.e. scripts and batch files).</doc>
  86216. <return-value transfer-ownership="none">
  86217. <doc xml:space="preserve">%TRUE if the file type corresponds to a type that
  86218. can be executable, %FALSE otherwise.</doc>
  86219. <type name="gboolean" c:type="gboolean"/>
  86220. </return-value>
  86221. <parameters>
  86222. <parameter name="type" transfer-ownership="none">
  86223. <doc xml:space="preserve">a content type string</doc>
  86224. <type name="utf8" c:type="const gchar*"/>
  86225. </parameter>
  86226. </parameters>
  86227. </function>
  86228. <function name="content_type_equals" c:identifier="g_content_type_equals">
  86229. <doc xml:space="preserve">Compares two content types for equality.</doc>
  86230. <return-value transfer-ownership="none">
  86231. <doc xml:space="preserve">%TRUE if the two strings are identical or equivalent,
  86232. %FALSE otherwise.</doc>
  86233. <type name="gboolean" c:type="gboolean"/>
  86234. </return-value>
  86235. <parameters>
  86236. <parameter name="type1" transfer-ownership="none">
  86237. <doc xml:space="preserve">a content type string</doc>
  86238. <type name="utf8" c:type="const gchar*"/>
  86239. </parameter>
  86240. <parameter name="type2" transfer-ownership="none">
  86241. <doc xml:space="preserve">a content type string</doc>
  86242. <type name="utf8" c:type="const gchar*"/>
  86243. </parameter>
  86244. </parameters>
  86245. </function>
  86246. <function name="content_type_from_mime_type"
  86247. c:identifier="g_content_type_from_mime_type"
  86248. version="2.18">
  86249. <doc xml:space="preserve">Tries to find a content type based on the mime type name.</doc>
  86250. <return-value transfer-ownership="full" nullable="1">
  86251. <doc xml:space="preserve">Newly allocated string with content type or
  86252. %NULL. Free with g_free()</doc>
  86253. <type name="utf8" c:type="gchar*"/>
  86254. </return-value>
  86255. <parameters>
  86256. <parameter name="mime_type" transfer-ownership="none">
  86257. <doc xml:space="preserve">a mime type string</doc>
  86258. <type name="utf8" c:type="const gchar*"/>
  86259. </parameter>
  86260. </parameters>
  86261. </function>
  86262. <function name="content_type_get_description"
  86263. c:identifier="g_content_type_get_description">
  86264. <doc xml:space="preserve">Gets the human readable description of the content type.</doc>
  86265. <return-value transfer-ownership="full">
  86266. <doc xml:space="preserve">a short description of the content type @type. Free the
  86267. returned string with g_free()</doc>
  86268. <type name="utf8" c:type="gchar*"/>
  86269. </return-value>
  86270. <parameters>
  86271. <parameter name="type" transfer-ownership="none">
  86272. <doc xml:space="preserve">a content type string</doc>
  86273. <type name="utf8" c:type="const gchar*"/>
  86274. </parameter>
  86275. </parameters>
  86276. </function>
  86277. <function name="content_type_get_generic_icon_name"
  86278. c:identifier="g_content_type_get_generic_icon_name"
  86279. version="2.34">
  86280. <doc xml:space="preserve">Gets the generic icon name for a content type.
  86281. See the
  86282. [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
  86283. specification for more on the generic icon name.</doc>
  86284. <return-value transfer-ownership="full" nullable="1">
  86285. <doc xml:space="preserve">the registered generic icon name for the given @type,
  86286. or %NULL if unknown. Free with g_free()</doc>
  86287. <type name="utf8" c:type="gchar*"/>
  86288. </return-value>
  86289. <parameters>
  86290. <parameter name="type" transfer-ownership="none">
  86291. <doc xml:space="preserve">a content type string</doc>
  86292. <type name="utf8" c:type="const gchar*"/>
  86293. </parameter>
  86294. </parameters>
  86295. </function>
  86296. <function name="content_type_get_icon"
  86297. c:identifier="g_content_type_get_icon">
  86298. <doc xml:space="preserve">Gets the icon for a content type.</doc>
  86299. <return-value transfer-ownership="full">
  86300. <doc xml:space="preserve">#GIcon corresponding to the content type. Free the returned
  86301. object with g_object_unref()</doc>
  86302. <type name="Icon" c:type="GIcon*"/>
  86303. </return-value>
  86304. <parameters>
  86305. <parameter name="type" transfer-ownership="none">
  86306. <doc xml:space="preserve">a content type string</doc>
  86307. <type name="utf8" c:type="const gchar*"/>
  86308. </parameter>
  86309. </parameters>
  86310. </function>
  86311. <function name="content_type_get_mime_type"
  86312. c:identifier="g_content_type_get_mime_type">
  86313. <doc xml:space="preserve">Gets the mime type for the content type, if one is registered.</doc>
  86314. <return-value transfer-ownership="full" nullable="1">
  86315. <doc xml:space="preserve">the registered mime type for the given @type,
  86316. or %NULL if unknown.</doc>
  86317. <type name="utf8" c:type="gchar*"/>
  86318. </return-value>
  86319. <parameters>
  86320. <parameter name="type" transfer-ownership="none">
  86321. <doc xml:space="preserve">a content type string</doc>
  86322. <type name="utf8" c:type="const gchar*"/>
  86323. </parameter>
  86324. </parameters>
  86325. </function>
  86326. <function name="content_type_get_symbolic_icon"
  86327. c:identifier="g_content_type_get_symbolic_icon"
  86328. version="2.34">
  86329. <doc xml:space="preserve">Gets the symbolic icon for a content type.</doc>
  86330. <return-value transfer-ownership="full">
  86331. <doc xml:space="preserve">symbolic #GIcon corresponding to the content type.
  86332. Free the returned object with g_object_unref()</doc>
  86333. <type name="Icon" c:type="GIcon*"/>
  86334. </return-value>
  86335. <parameters>
  86336. <parameter name="type" transfer-ownership="none">
  86337. <doc xml:space="preserve">a content type string</doc>
  86338. <type name="utf8" c:type="const gchar*"/>
  86339. </parameter>
  86340. </parameters>
  86341. </function>
  86342. <function name="content_type_guess" c:identifier="g_content_type_guess">
  86343. <doc xml:space="preserve">Guesses the content type based on example data. If the function is
  86344. uncertain, @result_uncertain will be set to %TRUE. Either @filename
  86345. or @data may be %NULL, in which case the guess will be based solely
  86346. on the other argument.</doc>
  86347. <return-value transfer-ownership="full">
  86348. <doc xml:space="preserve">a string indicating a guessed content type for the
  86349. given data. Free with g_free()</doc>
  86350. <type name="utf8" c:type="gchar*"/>
  86351. </return-value>
  86352. <parameters>
  86353. <parameter name="filename"
  86354. transfer-ownership="none"
  86355. nullable="1"
  86356. allow-none="1">
  86357. <doc xml:space="preserve">a string, or %NULL</doc>
  86358. <type name="utf8" c:type="const gchar*"/>
  86359. </parameter>
  86360. <parameter name="data"
  86361. transfer-ownership="none"
  86362. nullable="1"
  86363. allow-none="1">
  86364. <doc xml:space="preserve">a stream of data, or %NULL</doc>
  86365. <array length="2" zero-terminated="0" c:type="guchar*">
  86366. <type name="guint8" c:type="guchar"/>
  86367. </array>
  86368. </parameter>
  86369. <parameter name="data_size" transfer-ownership="none">
  86370. <doc xml:space="preserve">the size of @data</doc>
  86371. <type name="gsize" c:type="gsize"/>
  86372. </parameter>
  86373. <parameter name="result_uncertain"
  86374. direction="out"
  86375. caller-allocates="0"
  86376. transfer-ownership="full"
  86377. optional="1"
  86378. allow-none="1">
  86379. <doc xml:space="preserve">return location for the certainty
  86380. of the result, or %NULL</doc>
  86381. <type name="gboolean" c:type="gboolean*"/>
  86382. </parameter>
  86383. </parameters>
  86384. </function>
  86385. <function name="content_type_guess_for_tree"
  86386. c:identifier="g_content_type_guess_for_tree"
  86387. version="2.18">
  86388. <doc xml:space="preserve">Tries to guess the type of the tree with root @root, by
  86389. looking at the files it contains. The result is an array
  86390. of content types, with the best guess coming first.
  86391. The types returned all have the form x-content/foo, e.g.
  86392. x-content/audio-cdda (for audio CDs) or x-content/image-dcf
  86393. (for a camera memory card). See the
  86394. [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
  86395. specification for more on x-content types.
  86396. This function is useful in the implementation of
  86397. g_mount_guess_content_type().</doc>
  86398. <return-value transfer-ownership="full">
  86399. <doc xml:space="preserve">an %NULL-terminated
  86400. array of zero or more content types. Free with g_strfreev()</doc>
  86401. <array c:type="gchar**">
  86402. <type name="utf8"/>
  86403. </array>
  86404. </return-value>
  86405. <parameters>
  86406. <parameter name="root" transfer-ownership="none">
  86407. <doc xml:space="preserve">the root of the tree to guess a type for</doc>
  86408. <type name="File" c:type="GFile*"/>
  86409. </parameter>
  86410. </parameters>
  86411. </function>
  86412. <function name="content_type_is_a" c:identifier="g_content_type_is_a">
  86413. <doc xml:space="preserve">Determines if @type is a subset of @supertype.</doc>
  86414. <return-value transfer-ownership="none">
  86415. <doc xml:space="preserve">%TRUE if @type is a kind of @supertype,
  86416. %FALSE otherwise.</doc>
  86417. <type name="gboolean" c:type="gboolean"/>
  86418. </return-value>
  86419. <parameters>
  86420. <parameter name="type" transfer-ownership="none">
  86421. <doc xml:space="preserve">a content type string</doc>
  86422. <type name="utf8" c:type="const gchar*"/>
  86423. </parameter>
  86424. <parameter name="supertype" transfer-ownership="none">
  86425. <doc xml:space="preserve">a content type string</doc>
  86426. <type name="utf8" c:type="const gchar*"/>
  86427. </parameter>
  86428. </parameters>
  86429. </function>
  86430. <function name="content_type_is_unknown"
  86431. c:identifier="g_content_type_is_unknown">
  86432. <doc xml:space="preserve">Checks if the content type is the generic "unknown" type.
  86433. On UNIX this is the "application/octet-stream" mimetype,
  86434. while on win32 it is "*".</doc>
  86435. <return-value transfer-ownership="none">
  86436. <doc xml:space="preserve">%TRUE if the type is the unknown type.</doc>
  86437. <type name="gboolean" c:type="gboolean"/>
  86438. </return-value>
  86439. <parameters>
  86440. <parameter name="type" transfer-ownership="none">
  86441. <doc xml:space="preserve">a content type string</doc>
  86442. <type name="utf8" c:type="const gchar*"/>
  86443. </parameter>
  86444. </parameters>
  86445. </function>
  86446. <function name="content_types_get_registered"
  86447. c:identifier="g_content_types_get_registered">
  86448. <doc xml:space="preserve">Gets a list of strings containing all the registered content types
  86449. known to the system. The list and its data should be freed using
  86450. g_list_free_full (list, g_free).</doc>
  86451. <return-value transfer-ownership="full">
  86452. <doc xml:space="preserve">list of the registered
  86453. content types</doc>
  86454. <type name="GLib.List" c:type="GList*">
  86455. <type name="utf8"/>
  86456. </type>
  86457. </return-value>
  86458. </function>
  86459. <function name="dbus_address_escape_value"
  86460. c:identifier="g_dbus_address_escape_value"
  86461. version="2.36">
  86462. <doc xml:space="preserve">Escape @string so it can appear in a D-Bus address as the value
  86463. part of a key-value pair.
  86464. For instance, if @string is "/run/bus-for-:0",
  86465. this function would return "/run/bus-for-%3A0",
  86466. which could be used in a D-Bus address like
  86467. "unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0".</doc>
  86468. <return-value transfer-ownership="full">
  86469. <doc xml:space="preserve">a copy of @string with all
  86470. non-optionally-escaped bytes escaped</doc>
  86471. <type name="utf8" c:type="gchar*"/>
  86472. </return-value>
  86473. <parameters>
  86474. <parameter name="string" transfer-ownership="none">
  86475. <doc xml:space="preserve">an unescaped string to be included in a D-Bus address
  86476. as the value in a key-value pair</doc>
  86477. <type name="utf8" c:type="const gchar*"/>
  86478. </parameter>
  86479. </parameters>
  86480. </function>
  86481. <function name="dbus_address_get_for_bus_sync"
  86482. c:identifier="g_dbus_address_get_for_bus_sync"
  86483. version="2.26"
  86484. throws="1">
  86485. <doc xml:space="preserve">Synchronously looks up the D-Bus address for the well-known message
  86486. bus instance specified by @bus_type. This may involve using various
  86487. platform specific mechanisms.</doc>
  86488. <return-value transfer-ownership="full">
  86489. <doc xml:space="preserve">a valid D-Bus address string for @bus_type or %NULL if
  86490. @error is set</doc>
  86491. <type name="utf8" c:type="gchar*"/>
  86492. </return-value>
  86493. <parameters>
  86494. <parameter name="bus_type" transfer-ownership="none">
  86495. <doc xml:space="preserve">a #GBusType</doc>
  86496. <type name="BusType" c:type="GBusType"/>
  86497. </parameter>
  86498. <parameter name="cancellable"
  86499. transfer-ownership="none"
  86500. nullable="1"
  86501. allow-none="1">
  86502. <doc xml:space="preserve">a #GCancellable or %NULL</doc>
  86503. <type name="Cancellable" c:type="GCancellable*"/>
  86504. </parameter>
  86505. </parameters>
  86506. </function>
  86507. <function name="dbus_address_get_stream"
  86508. c:identifier="g_dbus_address_get_stream"
  86509. version="2.26">
  86510. <doc xml:space="preserve">Asynchronously connects to an endpoint specified by @address and
  86511. sets up the connection so it is in a state to run the client-side
  86512. of the D-Bus authentication conversation.
  86513. When the operation is finished, @callback will be invoked. You can
  86514. then call g_dbus_address_get_stream_finish() to get the result of
  86515. the operation.
  86516. This is an asynchronous failable function. See
  86517. g_dbus_address_get_stream_sync() for the synchronous version.</doc>
  86518. <return-value transfer-ownership="none">
  86519. <type name="none" c:type="void"/>
  86520. </return-value>
  86521. <parameters>
  86522. <parameter name="address" transfer-ownership="none">
  86523. <doc xml:space="preserve">A valid D-Bus address.</doc>
  86524. <type name="utf8" c:type="const gchar*"/>
  86525. </parameter>
  86526. <parameter name="cancellable"
  86527. transfer-ownership="none"
  86528. nullable="1"
  86529. allow-none="1">
  86530. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  86531. <type name="Cancellable" c:type="GCancellable*"/>
  86532. </parameter>
  86533. <parameter name="callback"
  86534. transfer-ownership="none"
  86535. nullable="1"
  86536. allow-none="1"
  86537. scope="async"
  86538. closure="3">
  86539. <doc xml:space="preserve">A #GAsyncReadyCallback to call when the request is satisfied.</doc>
  86540. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  86541. </parameter>
  86542. <parameter name="user_data"
  86543. transfer-ownership="none"
  86544. nullable="1"
  86545. allow-none="1">
  86546. <doc xml:space="preserve">Data to pass to @callback.</doc>
  86547. <type name="gpointer" c:type="gpointer"/>
  86548. </parameter>
  86549. </parameters>
  86550. </function>
  86551. <function name="dbus_address_get_stream_finish"
  86552. c:identifier="g_dbus_address_get_stream_finish"
  86553. version="2.26"
  86554. throws="1">
  86555. <doc xml:space="preserve">Finishes an operation started with g_dbus_address_get_stream().</doc>
  86556. <return-value transfer-ownership="full">
  86557. <doc xml:space="preserve">A #GIOStream or %NULL if @error is set.</doc>
  86558. <type name="IOStream" c:type="GIOStream*"/>
  86559. </return-value>
  86560. <parameters>
  86561. <parameter name="res" transfer-ownership="none">
  86562. <doc xml:space="preserve">A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().</doc>
  86563. <type name="AsyncResult" c:type="GAsyncResult*"/>
  86564. </parameter>
  86565. <parameter name="out_guid"
  86566. direction="out"
  86567. caller-allocates="0"
  86568. transfer-ownership="full"
  86569. optional="1"
  86570. allow-none="1">
  86571. <doc xml:space="preserve">%NULL or return location to store the GUID extracted from @address, if any.</doc>
  86572. <type name="utf8" c:type="gchar**"/>
  86573. </parameter>
  86574. </parameters>
  86575. </function>
  86576. <function name="dbus_address_get_stream_sync"
  86577. c:identifier="g_dbus_address_get_stream_sync"
  86578. version="2.26"
  86579. throws="1">
  86580. <doc xml:space="preserve">Synchronously connects to an endpoint specified by @address and
  86581. sets up the connection so it is in a state to run the client-side
  86582. of the D-Bus authentication conversation.
  86583. This is a synchronous failable function. See
  86584. g_dbus_address_get_stream() for the asynchronous version.</doc>
  86585. <return-value transfer-ownership="full">
  86586. <doc xml:space="preserve">A #GIOStream or %NULL if @error is set.</doc>
  86587. <type name="IOStream" c:type="GIOStream*"/>
  86588. </return-value>
  86589. <parameters>
  86590. <parameter name="address" transfer-ownership="none">
  86591. <doc xml:space="preserve">A valid D-Bus address.</doc>
  86592. <type name="utf8" c:type="const gchar*"/>
  86593. </parameter>
  86594. <parameter name="out_guid"
  86595. direction="out"
  86596. caller-allocates="0"
  86597. transfer-ownership="full"
  86598. optional="1"
  86599. allow-none="1">
  86600. <doc xml:space="preserve">%NULL or return location to store the GUID extracted from @address, if any.</doc>
  86601. <type name="utf8" c:type="gchar**"/>
  86602. </parameter>
  86603. <parameter name="cancellable"
  86604. transfer-ownership="none"
  86605. nullable="1"
  86606. allow-none="1">
  86607. <doc xml:space="preserve">A #GCancellable or %NULL.</doc>
  86608. <type name="Cancellable" c:type="GCancellable*"/>
  86609. </parameter>
  86610. </parameters>
  86611. </function>
  86612. <function name="dbus_annotation_info_lookup"
  86613. c:identifier="g_dbus_annotation_info_lookup"
  86614. moved-to="DBusAnnotationInfo.lookup"
  86615. version="2.26">
  86616. <doc xml:space="preserve">Looks up the value of an annotation.
  86617. The cost of this function is O(n) in number of annotations.</doc>
  86618. <return-value transfer-ownership="none">
  86619. <doc xml:space="preserve">The value or %NULL if not found. Do not free, it is owned by @annotations.</doc>
  86620. <type name="utf8" c:type="const gchar*"/>
  86621. </return-value>
  86622. <parameters>
  86623. <parameter name="annotations"
  86624. transfer-ownership="none"
  86625. nullable="1"
  86626. allow-none="1">
  86627. <doc xml:space="preserve">A %NULL-terminated array of annotations or %NULL.</doc>
  86628. <array c:type="GDBusAnnotationInfo**">
  86629. <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
  86630. </array>
  86631. </parameter>
  86632. <parameter name="name" transfer-ownership="none">
  86633. <doc xml:space="preserve">The name of the annotation to look up.</doc>
  86634. <type name="utf8" c:type="const gchar*"/>
  86635. </parameter>
  86636. </parameters>
  86637. </function>
  86638. <function name="dbus_error_encode_gerror"
  86639. c:identifier="g_dbus_error_encode_gerror"
  86640. moved-to="DBusError.encode_gerror"
  86641. version="2.26">
  86642. <doc xml:space="preserve">Creates a D-Bus error name to use for @error. If @error matches
  86643. a registered error (cf. g_dbus_error_register_error()), the corresponding
  86644. D-Bus error name will be returned.
  86645. Otherwise the a name of the form
  86646. `org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE`
  86647. will be used. This allows other GDBus applications to map the error
  86648. on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
  86649. This function is typically only used in object mappings to put a
  86650. #GError on the wire. Regular applications should not use it.</doc>
  86651. <return-value transfer-ownership="full">
  86652. <doc xml:space="preserve">A D-Bus error name (never %NULL). Free with g_free().</doc>
  86653. <type name="utf8" c:type="gchar*"/>
  86654. </return-value>
  86655. <parameters>
  86656. <parameter name="error" transfer-ownership="none">
  86657. <doc xml:space="preserve">A #GError.</doc>
  86658. <type name="GLib.Error" c:type="const GError*"/>
  86659. </parameter>
  86660. </parameters>
  86661. </function>
  86662. <function name="dbus_error_get_remote_error"
  86663. c:identifier="g_dbus_error_get_remote_error"
  86664. moved-to="DBusError.get_remote_error"
  86665. version="2.26">
  86666. <doc xml:space="preserve">Gets the D-Bus error name used for @error, if any.
  86667. This function is guaranteed to return a D-Bus error name for all
  86668. #GErrors returned from functions handling remote method calls
  86669. (e.g. g_dbus_connection_call_finish()) unless
  86670. g_dbus_error_strip_remote_error() has been used on @error.</doc>
  86671. <return-value transfer-ownership="full">
  86672. <doc xml:space="preserve">an allocated string or %NULL if the D-Bus error name
  86673. could not be found. Free with g_free().</doc>
  86674. <type name="utf8" c:type="gchar*"/>
  86675. </return-value>
  86676. <parameters>
  86677. <parameter name="error" transfer-ownership="none">
  86678. <doc xml:space="preserve">a #GError</doc>
  86679. <type name="GLib.Error" c:type="const GError*"/>
  86680. </parameter>
  86681. </parameters>
  86682. </function>
  86683. <function name="dbus_error_is_remote_error"
  86684. c:identifier="g_dbus_error_is_remote_error"
  86685. moved-to="DBusError.is_remote_error"
  86686. version="2.26">
  86687. <doc xml:space="preserve">Checks if @error represents an error received via D-Bus from a remote peer. If so,
  86688. use g_dbus_error_get_remote_error() to get the name of the error.</doc>
  86689. <return-value transfer-ownership="none">
  86690. <doc xml:space="preserve">%TRUE if @error represents an error from a remote peer,
  86691. %FALSE otherwise.</doc>
  86692. <type name="gboolean" c:type="gboolean"/>
  86693. </return-value>
  86694. <parameters>
  86695. <parameter name="error" transfer-ownership="none">
  86696. <doc xml:space="preserve">A #GError.</doc>
  86697. <type name="GLib.Error" c:type="const GError*"/>
  86698. </parameter>
  86699. </parameters>
  86700. </function>
  86701. <function name="dbus_error_new_for_dbus_error"
  86702. c:identifier="g_dbus_error_new_for_dbus_error"
  86703. moved-to="DBusError.new_for_dbus_error"
  86704. version="2.26">
  86705. <doc xml:space="preserve">Creates a #GError based on the contents of @dbus_error_name and
  86706. @dbus_error_message.
  86707. Errors registered with g_dbus_error_register_error() will be looked
  86708. up using @dbus_error_name and if a match is found, the error domain
  86709. and code is used. Applications can use g_dbus_error_get_remote_error()
  86710. to recover @dbus_error_name.
  86711. If a match against a registered error is not found and the D-Bus
  86712. error name is in a form as returned by g_dbus_error_encode_gerror()
  86713. the error domain and code encoded in the name is used to
  86714. create the #GError. Also, @dbus_error_name is added to the error message
  86715. such that it can be recovered with g_dbus_error_get_remote_error().
  86716. Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
  86717. in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
  86718. added to the error message such that it can be recovered with
  86719. g_dbus_error_get_remote_error().
  86720. In all three cases, @dbus_error_name can always be recovered from the
  86721. returned #GError using the g_dbus_error_get_remote_error() function
  86722. (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
  86723. This function is typically only used in object mappings to prepare
  86724. #GError instances for applications. Regular applications should not use
  86725. it.</doc>
  86726. <return-value transfer-ownership="full">
  86727. <doc xml:space="preserve">An allocated #GError. Free with g_error_free().</doc>
  86728. <type name="GLib.Error" c:type="GError*"/>
  86729. </return-value>
  86730. <parameters>
  86731. <parameter name="dbus_error_name" transfer-ownership="none">
  86732. <doc xml:space="preserve">D-Bus error name.</doc>
  86733. <type name="utf8" c:type="const gchar*"/>
  86734. </parameter>
  86735. <parameter name="dbus_error_message" transfer-ownership="none">
  86736. <doc xml:space="preserve">D-Bus error message.</doc>
  86737. <type name="utf8" c:type="const gchar*"/>
  86738. </parameter>
  86739. </parameters>
  86740. </function>
  86741. <function name="dbus_error_quark"
  86742. c:identifier="g_dbus_error_quark"
  86743. moved-to="DBusError.quark">
  86744. <return-value transfer-ownership="none">
  86745. <type name="GLib.Quark" c:type="GQuark"/>
  86746. </return-value>
  86747. </function>
  86748. <function name="dbus_error_register_error"
  86749. c:identifier="g_dbus_error_register_error"
  86750. moved-to="DBusError.register_error"
  86751. version="2.26">
  86752. <doc xml:space="preserve">Creates an association to map between @dbus_error_name and
  86753. #GErrors specified by @error_domain and @error_code.
  86754. This is typically done in the routine that returns the #GQuark for
  86755. an error domain.</doc>
  86756. <return-value transfer-ownership="none">
  86757. <doc xml:space="preserve">%TRUE if the association was created, %FALSE if it already
  86758. exists.</doc>
  86759. <type name="gboolean" c:type="gboolean"/>
  86760. </return-value>
  86761. <parameters>
  86762. <parameter name="error_domain" transfer-ownership="none">
  86763. <doc xml:space="preserve">A #GQuark for a error domain.</doc>
  86764. <type name="GLib.Quark" c:type="GQuark"/>
  86765. </parameter>
  86766. <parameter name="error_code" transfer-ownership="none">
  86767. <doc xml:space="preserve">An error code.</doc>
  86768. <type name="gint" c:type="gint"/>
  86769. </parameter>
  86770. <parameter name="dbus_error_name" transfer-ownership="none">
  86771. <doc xml:space="preserve">A D-Bus error name.</doc>
  86772. <type name="utf8" c:type="const gchar*"/>
  86773. </parameter>
  86774. </parameters>
  86775. </function>
  86776. <function name="dbus_error_register_error_domain"
  86777. c:identifier="g_dbus_error_register_error_domain"
  86778. moved-to="DBusError.register_error_domain"
  86779. version="2.26">
  86780. <doc xml:space="preserve">Helper function for associating a #GError error domain with D-Bus error names.</doc>
  86781. <return-value transfer-ownership="none">
  86782. <type name="none" c:type="void"/>
  86783. </return-value>
  86784. <parameters>
  86785. <parameter name="error_domain_quark_name" transfer-ownership="none">
  86786. <doc xml:space="preserve">The error domain name.</doc>
  86787. <type name="utf8" c:type="const gchar*"/>
  86788. </parameter>
  86789. <parameter name="quark_volatile" transfer-ownership="none">
  86790. <doc xml:space="preserve">A pointer where to store the #GQuark.</doc>
  86791. <type name="gsize" c:type="volatile gsize*"/>
  86792. </parameter>
  86793. <parameter name="entries" transfer-ownership="none">
  86794. <doc xml:space="preserve">A pointer to @num_entries #GDBusErrorEntry struct items.</doc>
  86795. <type name="DBusErrorEntry" c:type="const GDBusErrorEntry*"/>
  86796. </parameter>
  86797. <parameter name="num_entries" transfer-ownership="none">
  86798. <doc xml:space="preserve">Number of items to register.</doc>
  86799. <type name="guint" c:type="guint"/>
  86800. </parameter>
  86801. </parameters>
  86802. </function>
  86803. <function name="dbus_error_strip_remote_error"
  86804. c:identifier="g_dbus_error_strip_remote_error"
  86805. moved-to="DBusError.strip_remote_error"
  86806. version="2.26">
  86807. <doc xml:space="preserve">Looks for extra information in the error message used to recover
  86808. the D-Bus error name and strips it if found. If stripped, the
  86809. message field in @error will correspond exactly to what was
  86810. received on the wire.
  86811. This is typically used when presenting errors to the end user.</doc>
  86812. <return-value transfer-ownership="none">
  86813. <doc xml:space="preserve">%TRUE if information was stripped, %FALSE otherwise.</doc>
  86814. <type name="gboolean" c:type="gboolean"/>
  86815. </return-value>
  86816. <parameters>
  86817. <parameter name="error" transfer-ownership="none">
  86818. <doc xml:space="preserve">A #GError.</doc>
  86819. <type name="GLib.Error" c:type="GError*"/>
  86820. </parameter>
  86821. </parameters>
  86822. </function>
  86823. <function name="dbus_error_unregister_error"
  86824. c:identifier="g_dbus_error_unregister_error"
  86825. moved-to="DBusError.unregister_error"
  86826. version="2.26">
  86827. <doc xml:space="preserve">Destroys an association previously set up with g_dbus_error_register_error().</doc>
  86828. <return-value transfer-ownership="none">
  86829. <doc xml:space="preserve">%TRUE if the association was destroyed, %FALSE if it wasn't found.</doc>
  86830. <type name="gboolean" c:type="gboolean"/>
  86831. </return-value>
  86832. <parameters>
  86833. <parameter name="error_domain" transfer-ownership="none">
  86834. <doc xml:space="preserve">A #GQuark for a error domain.</doc>
  86835. <type name="GLib.Quark" c:type="GQuark"/>
  86836. </parameter>
  86837. <parameter name="error_code" transfer-ownership="none">
  86838. <doc xml:space="preserve">An error code.</doc>
  86839. <type name="gint" c:type="gint"/>
  86840. </parameter>
  86841. <parameter name="dbus_error_name" transfer-ownership="none">
  86842. <doc xml:space="preserve">A D-Bus error name.</doc>
  86843. <type name="utf8" c:type="const gchar*"/>
  86844. </parameter>
  86845. </parameters>
  86846. </function>
  86847. <function name="dbus_generate_guid"
  86848. c:identifier="g_dbus_generate_guid"
  86849. version="2.26">
  86850. <doc xml:space="preserve">Generate a D-Bus GUID that can be used with
  86851. e.g. g_dbus_connection_new().
  86852. See the D-Bus specification regarding what strings are valid D-Bus
  86853. GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).</doc>
  86854. <return-value transfer-ownership="full">
  86855. <doc xml:space="preserve">A valid D-Bus GUID. Free with g_free().</doc>
  86856. <type name="utf8" c:type="gchar*"/>
  86857. </return-value>
  86858. </function>
  86859. <function name="dbus_gvalue_to_gvariant"
  86860. c:identifier="g_dbus_gvalue_to_gvariant"
  86861. version="2.30">
  86862. <doc xml:space="preserve">Converts a #GValue to a #GVariant of the type indicated by the @type
  86863. parameter.
  86864. The conversion is using the following rules:
  86865. - #G_TYPE_STRING: 's', 'o', 'g' or 'ay'
  86866. - #G_TYPE_STRV: 'as', 'ao' or 'aay'
  86867. - #G_TYPE_BOOLEAN: 'b'
  86868. - #G_TYPE_UCHAR: 'y'
  86869. - #G_TYPE_INT: 'i', 'n'
  86870. - #G_TYPE_UINT: 'u', 'q'
  86871. - #G_TYPE_INT64 'x'
  86872. - #G_TYPE_UINT64: 't'
  86873. - #G_TYPE_DOUBLE: 'd'
  86874. - #G_TYPE_VARIANT: Any #GVariantType
  86875. This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type
  86876. is ['i'][G-VARIANT-TYPE-INT32:CAPS]. It will also fail for any #GType
  86877. (including e.g. #G_TYPE_OBJECT and #G_TYPE_BOXED derived-types) not
  86878. in the table above.
  86879. Note that if @gvalue is of type #G_TYPE_VARIANT and its value is
  86880. %NULL, the empty #GVariant instance (never %NULL) for @type is
  86881. returned (e.g. 0 for scalar types, the empty string for string types,
  86882. '/' for object path types, the empty array for any array type and so on).
  86883. See the g_dbus_gvariant_to_gvalue() function for how to convert a
  86884. #GVariant to a #GValue.</doc>
  86885. <return-value transfer-ownership="full">
  86886. <doc xml:space="preserve">A #GVariant (never floating) of #GVariantType @type holding
  86887. the data from @gvalue or %NULL in case of failure. Free with
  86888. g_variant_unref().</doc>
  86889. <type name="GLib.Variant" c:type="GVariant*"/>
  86890. </return-value>
  86891. <parameters>
  86892. <parameter name="gvalue" transfer-ownership="none">
  86893. <doc xml:space="preserve">A #GValue to convert to a #GVariant</doc>
  86894. <type name="GObject.Value" c:type="const GValue*"/>
  86895. </parameter>
  86896. <parameter name="type" transfer-ownership="none">
  86897. <doc xml:space="preserve">A #GVariantType</doc>
  86898. <type name="GLib.VariantType" c:type="const GVariantType*"/>
  86899. </parameter>
  86900. </parameters>
  86901. </function>
  86902. <function name="dbus_gvariant_to_gvalue"
  86903. c:identifier="g_dbus_gvariant_to_gvalue"
  86904. version="2.30">
  86905. <doc xml:space="preserve">Converts a #GVariant to a #GValue. If @value is floating, it is consumed.
  86906. The rules specified in the g_dbus_gvalue_to_gvariant() function are
  86907. used - this function is essentially its reverse form.
  86908. The conversion never fails - a valid #GValue is always returned in
  86909. @out_gvalue.</doc>
  86910. <return-value transfer-ownership="none">
  86911. <type name="none" c:type="void"/>
  86912. </return-value>
  86913. <parameters>
  86914. <parameter name="value" transfer-ownership="none">
  86915. <doc xml:space="preserve">A #GVariant.</doc>
  86916. <type name="GLib.Variant" c:type="GVariant*"/>
  86917. </parameter>
  86918. <parameter name="out_gvalue"
  86919. direction="out"
  86920. caller-allocates="1"
  86921. transfer-ownership="none">
  86922. <doc xml:space="preserve">Return location pointing to a zero-filled (uninitialized) #GValue.</doc>
  86923. <type name="GObject.Value" c:type="GValue*"/>
  86924. </parameter>
  86925. </parameters>
  86926. </function>
  86927. <function name="dbus_is_address"
  86928. c:identifier="g_dbus_is_address"
  86929. version="2.26">
  86930. <doc xml:space="preserve">Checks if @string is a D-Bus address.
  86931. This doesn't check if @string is actually supported by #GDBusServer
  86932. or #GDBusConnection - use g_dbus_is_supported_address() to do more
  86933. checks.</doc>
  86934. <return-value transfer-ownership="none">
  86935. <doc xml:space="preserve">%TRUE if @string is a valid D-Bus address, %FALSE otherwise.</doc>
  86936. <type name="gboolean" c:type="gboolean"/>
  86937. </return-value>
  86938. <parameters>
  86939. <parameter name="string" transfer-ownership="none">
  86940. <doc xml:space="preserve">A string.</doc>
  86941. <type name="utf8" c:type="const gchar*"/>
  86942. </parameter>
  86943. </parameters>
  86944. </function>
  86945. <function name="dbus_is_guid" c:identifier="g_dbus_is_guid" version="2.26">
  86946. <doc xml:space="preserve">Checks if @string is a D-Bus GUID.
  86947. See the D-Bus specification regarding what strings are valid D-Bus
  86948. GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).</doc>
  86949. <return-value transfer-ownership="none">
  86950. <doc xml:space="preserve">%TRUE if @string is a guid, %FALSE otherwise.</doc>
  86951. <type name="gboolean" c:type="gboolean"/>
  86952. </return-value>
  86953. <parameters>
  86954. <parameter name="string" transfer-ownership="none">
  86955. <doc xml:space="preserve">The string to check.</doc>
  86956. <type name="utf8" c:type="const gchar*"/>
  86957. </parameter>
  86958. </parameters>
  86959. </function>
  86960. <function name="dbus_is_interface_name"
  86961. c:identifier="g_dbus_is_interface_name"
  86962. version="2.26">
  86963. <doc xml:space="preserve">Checks if @string is a valid D-Bus interface name.</doc>
  86964. <return-value transfer-ownership="none">
  86965. <doc xml:space="preserve">%TRUE if valid, %FALSE otherwise.</doc>
  86966. <type name="gboolean" c:type="gboolean"/>
  86967. </return-value>
  86968. <parameters>
  86969. <parameter name="string" transfer-ownership="none">
  86970. <doc xml:space="preserve">The string to check.</doc>
  86971. <type name="utf8" c:type="const gchar*"/>
  86972. </parameter>
  86973. </parameters>
  86974. </function>
  86975. <function name="dbus_is_member_name"
  86976. c:identifier="g_dbus_is_member_name"
  86977. version="2.26">
  86978. <doc xml:space="preserve">Checks if @string is a valid D-Bus member (e.g. signal or method) name.</doc>
  86979. <return-value transfer-ownership="none">
  86980. <doc xml:space="preserve">%TRUE if valid, %FALSE otherwise.</doc>
  86981. <type name="gboolean" c:type="gboolean"/>
  86982. </return-value>
  86983. <parameters>
  86984. <parameter name="string" transfer-ownership="none">
  86985. <doc xml:space="preserve">The string to check.</doc>
  86986. <type name="utf8" c:type="const gchar*"/>
  86987. </parameter>
  86988. </parameters>
  86989. </function>
  86990. <function name="dbus_is_name" c:identifier="g_dbus_is_name" version="2.26">
  86991. <doc xml:space="preserve">Checks if @string is a valid D-Bus bus name (either unique or well-known).</doc>
  86992. <return-value transfer-ownership="none">
  86993. <doc xml:space="preserve">%TRUE if valid, %FALSE otherwise.</doc>
  86994. <type name="gboolean" c:type="gboolean"/>
  86995. </return-value>
  86996. <parameters>
  86997. <parameter name="string" transfer-ownership="none">
  86998. <doc xml:space="preserve">The string to check.</doc>
  86999. <type name="utf8" c:type="const gchar*"/>
  87000. </parameter>
  87001. </parameters>
  87002. </function>
  87003. <function name="dbus_is_supported_address"
  87004. c:identifier="g_dbus_is_supported_address"
  87005. version="2.26"
  87006. throws="1">
  87007. <doc xml:space="preserve">Like g_dbus_is_address() but also checks if the library suppors the
  87008. transports in @string and that key/value pairs for each transport
  87009. are valid.</doc>
  87010. <return-value transfer-ownership="none">
  87011. <doc xml:space="preserve">%TRUE if @string is a valid D-Bus address that is
  87012. supported by this library, %FALSE if @error is set.</doc>
  87013. <type name="gboolean" c:type="gboolean"/>
  87014. </return-value>
  87015. <parameters>
  87016. <parameter name="string" transfer-ownership="none">
  87017. <doc xml:space="preserve">A string.</doc>
  87018. <type name="utf8" c:type="const gchar*"/>
  87019. </parameter>
  87020. </parameters>
  87021. </function>
  87022. <function name="dbus_is_unique_name"
  87023. c:identifier="g_dbus_is_unique_name"
  87024. version="2.26">
  87025. <doc xml:space="preserve">Checks if @string is a valid D-Bus unique bus name.</doc>
  87026. <return-value transfer-ownership="none">
  87027. <doc xml:space="preserve">%TRUE if valid, %FALSE otherwise.</doc>
  87028. <type name="gboolean" c:type="gboolean"/>
  87029. </return-value>
  87030. <parameters>
  87031. <parameter name="string" transfer-ownership="none">
  87032. <doc xml:space="preserve">The string to check.</doc>
  87033. <type name="utf8" c:type="const gchar*"/>
  87034. </parameter>
  87035. </parameters>
  87036. </function>
  87037. <function name="dtls_client_connection_new"
  87038. c:identifier="g_dtls_client_connection_new"
  87039. moved-to="DtlsClientConnection.new"
  87040. version="2.48"
  87041. throws="1">
  87042. <doc xml:space="preserve">Creates a new #GDtlsClientConnection wrapping @base_socket which is
  87043. assumed to communicate with the server identified by @server_identity.</doc>
  87044. <return-value transfer-ownership="full">
  87045. <doc xml:space="preserve">the new
  87046. #GDtlsClientConnection, or %NULL on error</doc>
  87047. <type name="DtlsClientConnection" c:type="GDatagramBased*"/>
  87048. </return-value>
  87049. <parameters>
  87050. <parameter name="base_socket" transfer-ownership="none">
  87051. <doc xml:space="preserve">the #GDatagramBased to wrap</doc>
  87052. <type name="DatagramBased" c:type="GDatagramBased*"/>
  87053. </parameter>
  87054. <parameter name="server_identity"
  87055. transfer-ownership="none"
  87056. nullable="1"
  87057. allow-none="1">
  87058. <doc xml:space="preserve">the expected identity of the server</doc>
  87059. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  87060. </parameter>
  87061. </parameters>
  87062. </function>
  87063. <function name="dtls_server_connection_new"
  87064. c:identifier="g_dtls_server_connection_new"
  87065. moved-to="DtlsServerConnection.new"
  87066. version="2.48"
  87067. throws="1">
  87068. <doc xml:space="preserve">Creates a new #GDtlsServerConnection wrapping @base_socket.</doc>
  87069. <return-value transfer-ownership="full">
  87070. <doc xml:space="preserve">the new
  87071. #GDtlsServerConnection, or %NULL on error</doc>
  87072. <type name="DtlsServerConnection" c:type="GDatagramBased*"/>
  87073. </return-value>
  87074. <parameters>
  87075. <parameter name="base_socket" transfer-ownership="none">
  87076. <doc xml:space="preserve">the #GDatagramBased to wrap</doc>
  87077. <type name="DatagramBased" c:type="GDatagramBased*"/>
  87078. </parameter>
  87079. <parameter name="certificate"
  87080. transfer-ownership="none"
  87081. nullable="1"
  87082. allow-none="1">
  87083. <doc xml:space="preserve">the default server certificate, or %NULL</doc>
  87084. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  87085. </parameter>
  87086. </parameters>
  87087. </function>
  87088. <function name="file_new_for_commandline_arg"
  87089. c:identifier="g_file_new_for_commandline_arg"
  87090. moved-to="File.new_for_commandline_arg">
  87091. <doc xml:space="preserve">Creates a #GFile with the given argument from the command line.
  87092. The value of @arg can be either a URI, an absolute path or a
  87093. relative path resolved relative to the current working directory.
  87094. This operation never fails, but the returned object might not
  87095. support any I/O operation if @arg points to a malformed path.
  87096. Note that on Windows, this function expects its argument to be in
  87097. UTF-8 -- not the system code page. This means that you
  87098. should not use this function with string from argv as it is passed
  87099. to main(). g_win32_get_command_line() will return a UTF-8 version of
  87100. the commandline. #GApplication also uses UTF-8 but
  87101. g_application_command_line_create_file_for_arg() may be more useful
  87102. for you there. It is also always possible to use this function with
  87103. #GOptionContext arguments of type %G_OPTION_ARG_FILENAME.</doc>
  87104. <return-value transfer-ownership="full">
  87105. <doc xml:space="preserve">a new #GFile.
  87106. Free the returned object with g_object_unref().</doc>
  87107. <type name="File" c:type="GFile*"/>
  87108. </return-value>
  87109. <parameters>
  87110. <parameter name="arg" transfer-ownership="none">
  87111. <doc xml:space="preserve">a command line string</doc>
  87112. <type name="utf8" c:type="const char*"/>
  87113. </parameter>
  87114. </parameters>
  87115. </function>
  87116. <function name="file_new_for_commandline_arg_and_cwd"
  87117. c:identifier="g_file_new_for_commandline_arg_and_cwd"
  87118. moved-to="File.new_for_commandline_arg_and_cwd"
  87119. version="2.36">
  87120. <doc xml:space="preserve">Creates a #GFile with the given argument from the command line.
  87121. This function is similar to g_file_new_for_commandline_arg() except
  87122. that it allows for passing the current working directory as an
  87123. argument instead of using the current working directory of the
  87124. process.
  87125. This is useful if the commandline argument was given in a context
  87126. other than the invocation of the current process.
  87127. See also g_application_command_line_create_file_for_arg().</doc>
  87128. <return-value transfer-ownership="full">
  87129. <doc xml:space="preserve">a new #GFile</doc>
  87130. <type name="File" c:type="GFile*"/>
  87131. </return-value>
  87132. <parameters>
  87133. <parameter name="arg" transfer-ownership="none">
  87134. <doc xml:space="preserve">a command line string</doc>
  87135. <type name="utf8" c:type="const gchar*"/>
  87136. </parameter>
  87137. <parameter name="cwd" transfer-ownership="none">
  87138. <doc xml:space="preserve">the current working directory of the commandline</doc>
  87139. <type name="utf8" c:type="const gchar*"/>
  87140. </parameter>
  87141. </parameters>
  87142. </function>
  87143. <function name="file_new_for_path"
  87144. c:identifier="g_file_new_for_path"
  87145. moved-to="File.new_for_path">
  87146. <doc xml:space="preserve">Constructs a #GFile for a given path. This operation never
  87147. fails, but the returned object might not support any I/O
  87148. operation if @path is malformed.</doc>
  87149. <return-value transfer-ownership="full">
  87150. <doc xml:space="preserve">a new #GFile for the given @path.
  87151. Free the returned object with g_object_unref().</doc>
  87152. <type name="File" c:type="GFile*"/>
  87153. </return-value>
  87154. <parameters>
  87155. <parameter name="path" transfer-ownership="none">
  87156. <doc xml:space="preserve">a string containing a relative or absolute path.
  87157. The string must be encoded in the glib filename encoding.</doc>
  87158. <type name="utf8" c:type="const char*"/>
  87159. </parameter>
  87160. </parameters>
  87161. </function>
  87162. <function name="file_new_for_uri"
  87163. c:identifier="g_file_new_for_uri"
  87164. moved-to="File.new_for_uri">
  87165. <doc xml:space="preserve">Constructs a #GFile for a given URI. This operation never
  87166. fails, but the returned object might not support any I/O
  87167. operation if @uri is malformed or if the uri type is
  87168. not supported.</doc>
  87169. <return-value transfer-ownership="full">
  87170. <doc xml:space="preserve">a new #GFile for the given @uri.
  87171. Free the returned object with g_object_unref().</doc>
  87172. <type name="File" c:type="GFile*"/>
  87173. </return-value>
  87174. <parameters>
  87175. <parameter name="uri" transfer-ownership="none">
  87176. <doc xml:space="preserve">a UTF-8 string containing a URI</doc>
  87177. <type name="utf8" c:type="const char*"/>
  87178. </parameter>
  87179. </parameters>
  87180. </function>
  87181. <function name="file_new_tmp"
  87182. c:identifier="g_file_new_tmp"
  87183. moved-to="File.new_tmp"
  87184. version="2.32"
  87185. throws="1">
  87186. <doc xml:space="preserve">Opens a file in the preferred directory for temporary files (as
  87187. returned by g_get_tmp_dir()) and returns a #GFile and
  87188. #GFileIOStream pointing to it.
  87189. @tmpl should be a string in the GLib file name encoding
  87190. containing a sequence of six 'X' characters, and containing no
  87191. directory components. If it is %NULL, a default template is used.
  87192. Unlike the other #GFile constructors, this will return %NULL if
  87193. a temporary file could not be created.</doc>
  87194. <return-value transfer-ownership="full">
  87195. <doc xml:space="preserve">a new #GFile.
  87196. Free the returned object with g_object_unref().</doc>
  87197. <type name="File" c:type="GFile*"/>
  87198. </return-value>
  87199. <parameters>
  87200. <parameter name="tmpl"
  87201. transfer-ownership="none"
  87202. nullable="1"
  87203. allow-none="1">
  87204. <doc xml:space="preserve">Template for the file
  87205. name, as in g_file_open_tmp(), or %NULL for a default template</doc>
  87206. <type name="filename" c:type="char*"/>
  87207. </parameter>
  87208. <parameter name="iostream"
  87209. direction="out"
  87210. caller-allocates="0"
  87211. transfer-ownership="full">
  87212. <doc xml:space="preserve">on return, a #GFileIOStream for the created file</doc>
  87213. <type name="FileIOStream" c:type="GFileIOStream**"/>
  87214. </parameter>
  87215. </parameters>
  87216. </function>
  87217. <function name="file_parse_name"
  87218. c:identifier="g_file_parse_name"
  87219. moved-to="File.parse_name">
  87220. <doc xml:space="preserve">Constructs a #GFile with the given @parse_name (i.e. something
  87221. given by g_file_get_parse_name()). This operation never fails,
  87222. but the returned object might not support any I/O operation if
  87223. the @parse_name cannot be parsed.</doc>
  87224. <return-value transfer-ownership="full">
  87225. <doc xml:space="preserve">a new #GFile.</doc>
  87226. <type name="File" c:type="GFile*"/>
  87227. </return-value>
  87228. <parameters>
  87229. <parameter name="parse_name" transfer-ownership="none">
  87230. <doc xml:space="preserve">a file name or path to be parsed</doc>
  87231. <type name="utf8" c:type="const char*"/>
  87232. </parameter>
  87233. </parameters>
  87234. </function>
  87235. <function name="icon_deserialize"
  87236. c:identifier="g_icon_deserialize"
  87237. moved-to="Icon.deserialize"
  87238. version="2.38">
  87239. <doc xml:space="preserve">Deserializes a #GIcon previously serialized using g_icon_serialize().</doc>
  87240. <return-value transfer-ownership="full">
  87241. <doc xml:space="preserve">a #GIcon, or %NULL when deserialization fails.</doc>
  87242. <type name="Icon" c:type="GIcon*"/>
  87243. </return-value>
  87244. <parameters>
  87245. <parameter name="value" transfer-ownership="none">
  87246. <doc xml:space="preserve">a #GVariant created with g_icon_serialize()</doc>
  87247. <type name="GLib.Variant" c:type="GVariant*"/>
  87248. </parameter>
  87249. </parameters>
  87250. </function>
  87251. <function name="icon_hash" c:identifier="g_icon_hash" moved-to="Icon.hash">
  87252. <doc xml:space="preserve">Gets a hash for an icon.</doc>
  87253. <return-value transfer-ownership="none">
  87254. <doc xml:space="preserve">a #guint containing a hash for the @icon, suitable for
  87255. use in a #GHashTable or similar data structure.</doc>
  87256. <type name="guint" c:type="guint"/>
  87257. </return-value>
  87258. <parameters>
  87259. <parameter name="icon" transfer-ownership="none">
  87260. <doc xml:space="preserve">#gconstpointer to an icon object.</doc>
  87261. <type name="gpointer" c:type="gconstpointer"/>
  87262. </parameter>
  87263. </parameters>
  87264. </function>
  87265. <function name="icon_new_for_string"
  87266. c:identifier="g_icon_new_for_string"
  87267. moved-to="Icon.new_for_string"
  87268. version="2.20"
  87269. throws="1">
  87270. <doc xml:space="preserve">Generate a #GIcon instance from @str. This function can fail if
  87271. @str is not valid - see g_icon_to_string() for discussion.
  87272. If your application or library provides one or more #GIcon
  87273. implementations you need to ensure that each #GType is registered
  87274. with the type system prior to calling g_icon_new_for_string().</doc>
  87275. <return-value transfer-ownership="full">
  87276. <doc xml:space="preserve">An object implementing the #GIcon
  87277. interface or %NULL if @error is set.</doc>
  87278. <type name="Icon" c:type="GIcon*"/>
  87279. </return-value>
  87280. <parameters>
  87281. <parameter name="str" transfer-ownership="none">
  87282. <doc xml:space="preserve">A string obtained via g_icon_to_string().</doc>
  87283. <type name="utf8" c:type="const gchar*"/>
  87284. </parameter>
  87285. </parameters>
  87286. </function>
  87287. <function name="initable_newv"
  87288. c:identifier="g_initable_newv"
  87289. moved-to="Initable.newv"
  87290. version="2.22"
  87291. throws="1">
  87292. <doc xml:space="preserve">Helper function for constructing #GInitable object. This is
  87293. similar to g_object_newv() but also initializes the object
  87294. and returns %NULL, setting an error on failure.</doc>
  87295. <return-value transfer-ownership="full">
  87296. <doc xml:space="preserve">a newly allocated
  87297. #GObject, or %NULL on error</doc>
  87298. <type name="GObject.Object" c:type="gpointer"/>
  87299. </return-value>
  87300. <parameters>
  87301. <parameter name="object_type" transfer-ownership="none">
  87302. <doc xml:space="preserve">a #GType supporting #GInitable.</doc>
  87303. <type name="GType" c:type="GType"/>
  87304. </parameter>
  87305. <parameter name="n_parameters" transfer-ownership="none">
  87306. <doc xml:space="preserve">the number of parameters in @parameters</doc>
  87307. <type name="guint" c:type="guint"/>
  87308. </parameter>
  87309. <parameter name="parameters" transfer-ownership="none">
  87310. <doc xml:space="preserve">the parameters to use to construct the object</doc>
  87311. <array length="1" zero-terminated="0" c:type="GParameter*">
  87312. <type name="GObject.Parameter" c:type="GParameter"/>
  87313. </array>
  87314. </parameter>
  87315. <parameter name="cancellable"
  87316. transfer-ownership="none"
  87317. nullable="1"
  87318. allow-none="1">
  87319. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  87320. <type name="Cancellable" c:type="GCancellable*"/>
  87321. </parameter>
  87322. </parameters>
  87323. </function>
  87324. <function name="io_error_from_errno" c:identifier="g_io_error_from_errno">
  87325. <doc xml:space="preserve">Converts errno.h error codes into GIO error codes. The fallback
  87326. value %G_IO_ERROR_FAILED is returned for error codes not currently
  87327. handled (but note that future GLib releases may return a more
  87328. specific value instead).</doc>
  87329. <return-value transfer-ownership="none">
  87330. <doc xml:space="preserve">#GIOErrorEnum value for the given errno.h error number.</doc>
  87331. <type name="IOErrorEnum" c:type="GIOErrorEnum"/>
  87332. </return-value>
  87333. <parameters>
  87334. <parameter name="err_no" transfer-ownership="none">
  87335. <doc xml:space="preserve">Error number as defined in errno.h.</doc>
  87336. <type name="gint" c:type="gint"/>
  87337. </parameter>
  87338. </parameters>
  87339. </function>
  87340. <function name="io_error_quark" c:identifier="g_io_error_quark">
  87341. <doc xml:space="preserve">Gets the GIO Error Quark.</doc>
  87342. <return-value transfer-ownership="none">
  87343. <doc xml:space="preserve">a #GQuark.</doc>
  87344. <type name="GLib.Quark" c:type="GQuark"/>
  87345. </return-value>
  87346. </function>
  87347. <function name="io_extension_point_implement"
  87348. c:identifier="g_io_extension_point_implement"
  87349. moved-to="IOExtensionPoint.implement">
  87350. <doc xml:space="preserve">Registers @type as extension for the extension point with name
  87351. @extension_point_name.
  87352. If @type has already been registered as an extension for this
  87353. extension point, the existing #GIOExtension object is returned.</doc>
  87354. <return-value transfer-ownership="none">
  87355. <doc xml:space="preserve">a #GIOExtension object for #GType</doc>
  87356. <type name="IOExtension" c:type="GIOExtension*"/>
  87357. </return-value>
  87358. <parameters>
  87359. <parameter name="extension_point_name" transfer-ownership="none">
  87360. <doc xml:space="preserve">the name of the extension point</doc>
  87361. <type name="utf8" c:type="const char*"/>
  87362. </parameter>
  87363. <parameter name="type" transfer-ownership="none">
  87364. <doc xml:space="preserve">the #GType to register as extension</doc>
  87365. <type name="GType" c:type="GType"/>
  87366. </parameter>
  87367. <parameter name="extension_name" transfer-ownership="none">
  87368. <doc xml:space="preserve">the name for the extension</doc>
  87369. <type name="utf8" c:type="const char*"/>
  87370. </parameter>
  87371. <parameter name="priority" transfer-ownership="none">
  87372. <doc xml:space="preserve">the priority for the extension</doc>
  87373. <type name="gint" c:type="gint"/>
  87374. </parameter>
  87375. </parameters>
  87376. </function>
  87377. <function name="io_extension_point_lookup"
  87378. c:identifier="g_io_extension_point_lookup"
  87379. moved-to="IOExtensionPoint.lookup">
  87380. <doc xml:space="preserve">Looks up an existing extension point.</doc>
  87381. <return-value transfer-ownership="none">
  87382. <doc xml:space="preserve">the #GIOExtensionPoint, or %NULL if there
  87383. is no registered extension point with the given name.</doc>
  87384. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  87385. </return-value>
  87386. <parameters>
  87387. <parameter name="name" transfer-ownership="none">
  87388. <doc xml:space="preserve">the name of the extension point</doc>
  87389. <type name="utf8" c:type="const char*"/>
  87390. </parameter>
  87391. </parameters>
  87392. </function>
  87393. <function name="io_extension_point_register"
  87394. c:identifier="g_io_extension_point_register"
  87395. moved-to="IOExtensionPoint.register">
  87396. <doc xml:space="preserve">Registers an extension point.</doc>
  87397. <return-value transfer-ownership="none">
  87398. <doc xml:space="preserve">the new #GIOExtensionPoint. This object is
  87399. owned by GIO and should not be freed.</doc>
  87400. <type name="IOExtensionPoint" c:type="GIOExtensionPoint*"/>
  87401. </return-value>
  87402. <parameters>
  87403. <parameter name="name" transfer-ownership="none">
  87404. <doc xml:space="preserve">The name of the extension point</doc>
  87405. <type name="utf8" c:type="const char*"/>
  87406. </parameter>
  87407. </parameters>
  87408. </function>
  87409. <function name="io_modules_load_all_in_directory"
  87410. c:identifier="g_io_modules_load_all_in_directory">
  87411. <doc xml:space="preserve">Loads all the modules in the specified directory.
  87412. If don't require all modules to be initialized (and thus registering
  87413. all gtypes) then you can use g_io_modules_scan_all_in_directory()
  87414. which allows delayed/lazy loading of modules.</doc>
  87415. <return-value transfer-ownership="full">
  87416. <doc xml:space="preserve">a list of #GIOModules loaded
  87417. from the directory,
  87418. All the modules are loaded into memory, if you want to
  87419. unload them (enabling on-demand loading) you must call
  87420. g_type_module_unuse() on all the modules. Free the list
  87421. with g_list_free().</doc>
  87422. <type name="GLib.List" c:type="GList*">
  87423. <type name="IOModule"/>
  87424. </type>
  87425. </return-value>
  87426. <parameters>
  87427. <parameter name="dirname" transfer-ownership="none">
  87428. <doc xml:space="preserve">pathname for a directory containing modules to load.</doc>
  87429. <type name="utf8" c:type="const gchar*"/>
  87430. </parameter>
  87431. </parameters>
  87432. </function>
  87433. <function name="io_modules_load_all_in_directory_with_scope"
  87434. c:identifier="g_io_modules_load_all_in_directory_with_scope"
  87435. version="2.30">
  87436. <doc xml:space="preserve">Loads all the modules in the specified directory.
  87437. If don't require all modules to be initialized (and thus registering
  87438. all gtypes) then you can use g_io_modules_scan_all_in_directory()
  87439. which allows delayed/lazy loading of modules.</doc>
  87440. <return-value transfer-ownership="full">
  87441. <doc xml:space="preserve">a list of #GIOModules loaded
  87442. from the directory,
  87443. All the modules are loaded into memory, if you want to
  87444. unload them (enabling on-demand loading) you must call
  87445. g_type_module_unuse() on all the modules. Free the list
  87446. with g_list_free().</doc>
  87447. <type name="GLib.List" c:type="GList*">
  87448. <type name="IOModule"/>
  87449. </type>
  87450. </return-value>
  87451. <parameters>
  87452. <parameter name="dirname" transfer-ownership="none">
  87453. <doc xml:space="preserve">pathname for a directory containing modules to load.</doc>
  87454. <type name="utf8" c:type="const gchar*"/>
  87455. </parameter>
  87456. <parameter name="scope" transfer-ownership="none">
  87457. <doc xml:space="preserve">a scope to use when scanning the modules.</doc>
  87458. <type name="IOModuleScope" c:type="GIOModuleScope*"/>
  87459. </parameter>
  87460. </parameters>
  87461. </function>
  87462. <function name="io_modules_scan_all_in_directory"
  87463. c:identifier="g_io_modules_scan_all_in_directory"
  87464. version="2.24">
  87465. <doc xml:space="preserve">Scans all the modules in the specified directory, ensuring that
  87466. any extension point implemented by a module is registered.
  87467. This may not actually load and initialize all the types in each
  87468. module, some modules may be lazily loaded and initialized when
  87469. an extension point it implementes is used with e.g.
  87470. g_io_extension_point_get_extensions() or
  87471. g_io_extension_point_get_extension_by_name().
  87472. If you need to guarantee that all types are loaded in all the modules,
  87473. use g_io_modules_load_all_in_directory().</doc>
  87474. <return-value transfer-ownership="none">
  87475. <type name="none" c:type="void"/>
  87476. </return-value>
  87477. <parameters>
  87478. <parameter name="dirname" transfer-ownership="none">
  87479. <doc xml:space="preserve">pathname for a directory containing modules to scan.</doc>
  87480. <type name="utf8" c:type="const char*"/>
  87481. </parameter>
  87482. </parameters>
  87483. </function>
  87484. <function name="io_modules_scan_all_in_directory_with_scope"
  87485. c:identifier="g_io_modules_scan_all_in_directory_with_scope"
  87486. version="2.30">
  87487. <doc xml:space="preserve">Scans all the modules in the specified directory, ensuring that
  87488. any extension point implemented by a module is registered.
  87489. This may not actually load and initialize all the types in each
  87490. module, some modules may be lazily loaded and initialized when
  87491. an extension point it implementes is used with e.g.
  87492. g_io_extension_point_get_extensions() or
  87493. g_io_extension_point_get_extension_by_name().
  87494. If you need to guarantee that all types are loaded in all the modules,
  87495. use g_io_modules_load_all_in_directory().</doc>
  87496. <return-value transfer-ownership="none">
  87497. <type name="none" c:type="void"/>
  87498. </return-value>
  87499. <parameters>
  87500. <parameter name="dirname" transfer-ownership="none">
  87501. <doc xml:space="preserve">pathname for a directory containing modules to scan.</doc>
  87502. <type name="utf8" c:type="const gchar*"/>
  87503. </parameter>
  87504. <parameter name="scope" transfer-ownership="none">
  87505. <doc xml:space="preserve">a scope to use when scanning the modules</doc>
  87506. <type name="IOModuleScope" c:type="GIOModuleScope*"/>
  87507. </parameter>
  87508. </parameters>
  87509. </function>
  87510. <function name="io_scheduler_cancel_all_jobs"
  87511. c:identifier="g_io_scheduler_cancel_all_jobs"
  87512. deprecated="1">
  87513. <doc xml:space="preserve">Cancels all cancellable I/O jobs.
  87514. A job is cancellable if a #GCancellable was passed into
  87515. g_io_scheduler_push_job().</doc>
  87516. <doc-deprecated xml:space="preserve">You should never call this function, since you don't
  87517. know how other libraries in your program might be making use of
  87518. gioscheduler.</doc-deprecated>
  87519. <return-value transfer-ownership="none">
  87520. <type name="none" c:type="void"/>
  87521. </return-value>
  87522. </function>
  87523. <function name="io_scheduler_push_job"
  87524. c:identifier="g_io_scheduler_push_job"
  87525. deprecated="1">
  87526. <doc xml:space="preserve">Schedules the I/O job to run in another thread.
  87527. @notify will be called on @user_data after @job_func has returned,
  87528. regardless whether the job was cancelled or has run to completion.
  87529. If @cancellable is not %NULL, it can be used to cancel the I/O job
  87530. by calling g_cancellable_cancel() or by calling
  87531. g_io_scheduler_cancel_all_jobs().</doc>
  87532. <doc-deprecated xml:space="preserve">use #GThreadPool or g_task_run_in_thread()</doc-deprecated>
  87533. <return-value transfer-ownership="none">
  87534. <type name="none" c:type="void"/>
  87535. </return-value>
  87536. <parameters>
  87537. <parameter name="job_func"
  87538. transfer-ownership="none"
  87539. scope="notified"
  87540. closure="1"
  87541. destroy="2">
  87542. <doc xml:space="preserve">a #GIOSchedulerJobFunc.</doc>
  87543. <type name="IOSchedulerJobFunc" c:type="GIOSchedulerJobFunc"/>
  87544. </parameter>
  87545. <parameter name="user_data"
  87546. transfer-ownership="none"
  87547. nullable="1"
  87548. allow-none="1">
  87549. <doc xml:space="preserve">data to pass to @job_func</doc>
  87550. <type name="gpointer" c:type="gpointer"/>
  87551. </parameter>
  87552. <parameter name="notify"
  87553. transfer-ownership="none"
  87554. nullable="1"
  87555. allow-none="1"
  87556. scope="async">
  87557. <doc xml:space="preserve">a #GDestroyNotify for @user_data, or %NULL</doc>
  87558. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  87559. </parameter>
  87560. <parameter name="io_priority" transfer-ownership="none">
  87561. <doc xml:space="preserve">the [I/O priority][io-priority]
  87562. of the request.</doc>
  87563. <type name="gint" c:type="gint"/>
  87564. </parameter>
  87565. <parameter name="cancellable"
  87566. transfer-ownership="none"
  87567. nullable="1"
  87568. allow-none="1">
  87569. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  87570. <type name="Cancellable" c:type="GCancellable*"/>
  87571. </parameter>
  87572. </parameters>
  87573. </function>
  87574. <function name="network_monitor_get_default"
  87575. c:identifier="g_network_monitor_get_default"
  87576. moved-to="NetworkMonitor.get_default"
  87577. version="2.32">
  87578. <doc xml:space="preserve">Gets the default #GNetworkMonitor for the system.</doc>
  87579. <return-value transfer-ownership="none">
  87580. <doc xml:space="preserve">a #GNetworkMonitor</doc>
  87581. <type name="NetworkMonitor" c:type="GNetworkMonitor*"/>
  87582. </return-value>
  87583. </function>
  87584. <function name="networking_init"
  87585. c:identifier="g_networking_init"
  87586. version="2.36">
  87587. <doc xml:space="preserve">Initializes the platform networking libraries (eg, on Windows, this
  87588. calls WSAStartup()). GLib will call this itself if it is needed, so
  87589. you only need to call it if you directly call system networking
  87590. functions (without calling any GLib networking functions first).</doc>
  87591. <return-value transfer-ownership="none">
  87592. <type name="none" c:type="void"/>
  87593. </return-value>
  87594. </function>
  87595. <function name="pollable_source_new"
  87596. c:identifier="g_pollable_source_new"
  87597. version="2.28">
  87598. <doc xml:space="preserve">Utility method for #GPollableInputStream and #GPollableOutputStream
  87599. implementations. Creates a new #GSource that expects a callback of
  87600. type #GPollableSourceFunc. The new source does not actually do
  87601. anything on its own; use g_source_add_child_source() to add other
  87602. sources to it to cause it to trigger.</doc>
  87603. <return-value transfer-ownership="full">
  87604. <doc xml:space="preserve">the new #GSource.</doc>
  87605. <type name="GLib.Source" c:type="GSource*"/>
  87606. </return-value>
  87607. <parameters>
  87608. <parameter name="pollable_stream" transfer-ownership="none">
  87609. <doc xml:space="preserve">the stream associated with the new source</doc>
  87610. <type name="GObject.Object" c:type="GObject*"/>
  87611. </parameter>
  87612. </parameters>
  87613. </function>
  87614. <function name="pollable_source_new_full"
  87615. c:identifier="g_pollable_source_new_full"
  87616. version="2.34">
  87617. <doc xml:space="preserve">Utility method for #GPollableInputStream and #GPollableOutputStream
  87618. implementations. Creates a new #GSource, as with
  87619. g_pollable_source_new(), but also attaching @child_source (with a
  87620. dummy callback), and @cancellable, if they are non-%NULL.</doc>
  87621. <return-value transfer-ownership="full">
  87622. <doc xml:space="preserve">the new #GSource.</doc>
  87623. <type name="GLib.Source" c:type="GSource*"/>
  87624. </return-value>
  87625. <parameters>
  87626. <parameter name="pollable_stream" transfer-ownership="none">
  87627. <doc xml:space="preserve">the stream associated with the
  87628. new source</doc>
  87629. <type name="GObject.Object" c:type="gpointer"/>
  87630. </parameter>
  87631. <parameter name="child_source"
  87632. transfer-ownership="none"
  87633. nullable="1"
  87634. allow-none="1">
  87635. <doc xml:space="preserve">optional child source to attach</doc>
  87636. <type name="GLib.Source" c:type="GSource*"/>
  87637. </parameter>
  87638. <parameter name="cancellable"
  87639. transfer-ownership="none"
  87640. nullable="1"
  87641. allow-none="1">
  87642. <doc xml:space="preserve">optional #GCancellable to attach</doc>
  87643. <type name="Cancellable" c:type="GCancellable*"/>
  87644. </parameter>
  87645. </parameters>
  87646. </function>
  87647. <function name="pollable_stream_read"
  87648. c:identifier="g_pollable_stream_read"
  87649. version="2.34"
  87650. throws="1">
  87651. <doc xml:space="preserve">Tries to read from @stream, as with g_input_stream_read() (if
  87652. @blocking is %TRUE) or g_pollable_input_stream_read_nonblocking()
  87653. (if @blocking is %FALSE). This can be used to more easily share
  87654. code between blocking and non-blocking implementations of a method.
  87655. If @blocking is %FALSE, then @stream must be a
  87656. #GPollableInputStream for which g_pollable_input_stream_can_poll()
  87657. returns %TRUE, or else the behavior is undefined. If @blocking is
  87658. %TRUE, then @stream does not need to be a #GPollableInputStream.</doc>
  87659. <return-value transfer-ownership="none">
  87660. <doc xml:space="preserve">the number of bytes read, or -1 on error.</doc>
  87661. <type name="gssize" c:type="gssize"/>
  87662. </return-value>
  87663. <parameters>
  87664. <parameter name="stream" transfer-ownership="none">
  87665. <doc xml:space="preserve">a #GInputStream</doc>
  87666. <type name="InputStream" c:type="GInputStream*"/>
  87667. </parameter>
  87668. <parameter name="buffer" transfer-ownership="none">
  87669. <doc xml:space="preserve">a buffer to
  87670. read data into</doc>
  87671. <array length="2" zero-terminated="0" c:type="void*">
  87672. <type name="guint8"/>
  87673. </array>
  87674. </parameter>
  87675. <parameter name="count" transfer-ownership="none">
  87676. <doc xml:space="preserve">the number of bytes to read</doc>
  87677. <type name="gsize" c:type="gsize"/>
  87678. </parameter>
  87679. <parameter name="blocking" transfer-ownership="none">
  87680. <doc xml:space="preserve">whether to do blocking I/O</doc>
  87681. <type name="gboolean" c:type="gboolean"/>
  87682. </parameter>
  87683. <parameter name="cancellable"
  87684. transfer-ownership="none"
  87685. nullable="1"
  87686. allow-none="1">
  87687. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  87688. <type name="Cancellable" c:type="GCancellable*"/>
  87689. </parameter>
  87690. </parameters>
  87691. </function>
  87692. <function name="pollable_stream_write"
  87693. c:identifier="g_pollable_stream_write"
  87694. version="2.34"
  87695. throws="1">
  87696. <doc xml:space="preserve">Tries to write to @stream, as with g_output_stream_write() (if
  87697. @blocking is %TRUE) or g_pollable_output_stream_write_nonblocking()
  87698. (if @blocking is %FALSE). This can be used to more easily share
  87699. code between blocking and non-blocking implementations of a method.
  87700. If @blocking is %FALSE, then @stream must be a
  87701. #GPollableOutputStream for which
  87702. g_pollable_output_stream_can_poll() returns %TRUE or else the
  87703. behavior is undefined. If @blocking is %TRUE, then @stream does not
  87704. need to be a #GPollableOutputStream.</doc>
  87705. <return-value transfer-ownership="none">
  87706. <doc xml:space="preserve">the number of bytes written, or -1 on error.</doc>
  87707. <type name="gssize" c:type="gssize"/>
  87708. </return-value>
  87709. <parameters>
  87710. <parameter name="stream" transfer-ownership="none">
  87711. <doc xml:space="preserve">a #GOutputStream.</doc>
  87712. <type name="OutputStream" c:type="GOutputStream*"/>
  87713. </parameter>
  87714. <parameter name="buffer" transfer-ownership="none">
  87715. <doc xml:space="preserve">the buffer
  87716. containing the data to write.</doc>
  87717. <array length="2" zero-terminated="0" c:type="void*">
  87718. <type name="guint8"/>
  87719. </array>
  87720. </parameter>
  87721. <parameter name="count" transfer-ownership="none">
  87722. <doc xml:space="preserve">the number of bytes to write</doc>
  87723. <type name="gsize" c:type="gsize"/>
  87724. </parameter>
  87725. <parameter name="blocking" transfer-ownership="none">
  87726. <doc xml:space="preserve">whether to do blocking I/O</doc>
  87727. <type name="gboolean" c:type="gboolean"/>
  87728. </parameter>
  87729. <parameter name="cancellable"
  87730. transfer-ownership="none"
  87731. nullable="1"
  87732. allow-none="1">
  87733. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  87734. <type name="Cancellable" c:type="GCancellable*"/>
  87735. </parameter>
  87736. </parameters>
  87737. </function>
  87738. <function name="pollable_stream_write_all"
  87739. c:identifier="g_pollable_stream_write_all"
  87740. version="2.34"
  87741. throws="1">
  87742. <doc xml:space="preserve">Tries to write @count bytes to @stream, as with
  87743. g_output_stream_write_all(), but using g_pollable_stream_write()
  87744. rather than g_output_stream_write().
  87745. On a successful write of @count bytes, %TRUE is returned, and
  87746. @bytes_written is set to @count.
  87747. If there is an error during the operation (including
  87748. %G_IO_ERROR_WOULD_BLOCK in the non-blocking case), %FALSE is
  87749. returned and @error is set to indicate the error status,
  87750. @bytes_written is updated to contain the number of bytes written
  87751. into the stream before the error occurred.
  87752. As with g_pollable_stream_write(), if @blocking is %FALSE, then
  87753. @stream must be a #GPollableOutputStream for which
  87754. g_pollable_output_stream_can_poll() returns %TRUE or else the
  87755. behavior is undefined. If @blocking is %TRUE, then @stream does not
  87756. need to be a #GPollableOutputStream.</doc>
  87757. <return-value transfer-ownership="none">
  87758. <doc xml:space="preserve">%TRUE on success, %FALSE if there was an error</doc>
  87759. <type name="gboolean" c:type="gboolean"/>
  87760. </return-value>
  87761. <parameters>
  87762. <parameter name="stream" transfer-ownership="none">
  87763. <doc xml:space="preserve">a #GOutputStream.</doc>
  87764. <type name="OutputStream" c:type="GOutputStream*"/>
  87765. </parameter>
  87766. <parameter name="buffer" transfer-ownership="none">
  87767. <doc xml:space="preserve">the buffer
  87768. containing the data to write.</doc>
  87769. <array length="2" zero-terminated="0" c:type="void*">
  87770. <type name="guint8"/>
  87771. </array>
  87772. </parameter>
  87773. <parameter name="count" transfer-ownership="none">
  87774. <doc xml:space="preserve">the number of bytes to write</doc>
  87775. <type name="gsize" c:type="gsize"/>
  87776. </parameter>
  87777. <parameter name="blocking" transfer-ownership="none">
  87778. <doc xml:space="preserve">whether to do blocking I/O</doc>
  87779. <type name="gboolean" c:type="gboolean"/>
  87780. </parameter>
  87781. <parameter name="bytes_written"
  87782. direction="out"
  87783. caller-allocates="0"
  87784. transfer-ownership="full">
  87785. <doc xml:space="preserve">location to store the number of bytes that was
  87786. written to the stream</doc>
  87787. <type name="gsize" c:type="gsize*"/>
  87788. </parameter>
  87789. <parameter name="cancellable"
  87790. transfer-ownership="none"
  87791. nullable="1"
  87792. allow-none="1">
  87793. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
  87794. <type name="Cancellable" c:type="GCancellable*"/>
  87795. </parameter>
  87796. </parameters>
  87797. </function>
  87798. <function name="proxy_get_default_for_protocol"
  87799. c:identifier="g_proxy_get_default_for_protocol"
  87800. moved-to="Proxy.get_default_for_protocol"
  87801. version="2.26">
  87802. <doc xml:space="preserve">Lookup "gio-proxy" extension point for a proxy implementation that supports
  87803. specified protocol.</doc>
  87804. <return-value transfer-ownership="full">
  87805. <doc xml:space="preserve">return a #GProxy or NULL if protocol
  87806. is not supported.</doc>
  87807. <type name="Proxy" c:type="GProxy*"/>
  87808. </return-value>
  87809. <parameters>
  87810. <parameter name="protocol" transfer-ownership="none">
  87811. <doc xml:space="preserve">the proxy protocol name (e.g. http, socks, etc)</doc>
  87812. <type name="utf8" c:type="const gchar*"/>
  87813. </parameter>
  87814. </parameters>
  87815. </function>
  87816. <function name="proxy_resolver_get_default"
  87817. c:identifier="g_proxy_resolver_get_default"
  87818. moved-to="ProxyResolver.get_default"
  87819. version="2.26">
  87820. <doc xml:space="preserve">Gets the default #GProxyResolver for the system.</doc>
  87821. <return-value transfer-ownership="none">
  87822. <doc xml:space="preserve">the default #GProxyResolver.</doc>
  87823. <type name="ProxyResolver" c:type="GProxyResolver*"/>
  87824. </return-value>
  87825. </function>
  87826. <function name="resolver_error_quark"
  87827. c:identifier="g_resolver_error_quark"
  87828. moved-to="ResolverError.quark"
  87829. version="2.22">
  87830. <doc xml:space="preserve">Gets the #GResolver Error Quark.</doc>
  87831. <return-value transfer-ownership="none">
  87832. <doc xml:space="preserve">a #GQuark.</doc>
  87833. <type name="GLib.Quark" c:type="GQuark"/>
  87834. </return-value>
  87835. </function>
  87836. <function name="resource_error_quark"
  87837. c:identifier="g_resource_error_quark"
  87838. moved-to="ResourceError.quark"
  87839. version="2.32">
  87840. <doc xml:space="preserve">Gets the #GResource Error Quark.</doc>
  87841. <return-value transfer-ownership="none">
  87842. <doc xml:space="preserve">a #GQuark</doc>
  87843. <type name="GLib.Quark" c:type="GQuark"/>
  87844. </return-value>
  87845. </function>
  87846. <function name="resource_load"
  87847. c:identifier="g_resource_load"
  87848. moved-to="Resource.load"
  87849. version="2.32"
  87850. throws="1">
  87851. <doc xml:space="preserve">Loads a binary resource bundle and creates a #GResource representation of it, allowing
  87852. you to query it for data.
  87853. If you want to use this resource in the global resource namespace you need
  87854. to register it with g_resources_register().</doc>
  87855. <return-value transfer-ownership="full">
  87856. <doc xml:space="preserve">a new #GResource, or %NULL on error</doc>
  87857. <type name="Resource" c:type="GResource*"/>
  87858. </return-value>
  87859. <parameters>
  87860. <parameter name="filename" transfer-ownership="none">
  87861. <doc xml:space="preserve">the path of a filename to load, in the GLib filename encoding</doc>
  87862. <type name="filename" c:type="gchar*"/>
  87863. </parameter>
  87864. </parameters>
  87865. </function>
  87866. <function name="resources_enumerate_children"
  87867. c:identifier="g_resources_enumerate_children"
  87868. version="2.32"
  87869. throws="1">
  87870. <doc xml:space="preserve">Returns all the names of children at the specified @path in the set of
  87871. globally registered resources.
  87872. The return result is a %NULL terminated list of strings which should
  87873. be released with g_strfreev().
  87874. @lookup_flags controls the behaviour of the lookup.</doc>
  87875. <return-value transfer-ownership="full">
  87876. <doc xml:space="preserve">an array of constant strings</doc>
  87877. <array c:type="char**">
  87878. <type name="utf8"/>
  87879. </array>
  87880. </return-value>
  87881. <parameters>
  87882. <parameter name="path" transfer-ownership="none">
  87883. <doc xml:space="preserve">A pathname inside the resource</doc>
  87884. <type name="utf8" c:type="const char*"/>
  87885. </parameter>
  87886. <parameter name="lookup_flags" transfer-ownership="none">
  87887. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  87888. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  87889. </parameter>
  87890. </parameters>
  87891. </function>
  87892. <function name="resources_get_info"
  87893. c:identifier="g_resources_get_info"
  87894. version="2.32"
  87895. throws="1">
  87896. <doc xml:space="preserve">Looks for a file at the specified @path in the set of
  87897. globally registered resources and if found returns information about it.
  87898. @lookup_flags controls the behaviour of the lookup.</doc>
  87899. <return-value transfer-ownership="none">
  87900. <doc xml:space="preserve">%TRUE if the file was found. %FALSE if there were errors</doc>
  87901. <type name="gboolean" c:type="gboolean"/>
  87902. </return-value>
  87903. <parameters>
  87904. <parameter name="path" transfer-ownership="none">
  87905. <doc xml:space="preserve">A pathname inside the resource</doc>
  87906. <type name="utf8" c:type="const char*"/>
  87907. </parameter>
  87908. <parameter name="lookup_flags" transfer-ownership="none">
  87909. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  87910. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  87911. </parameter>
  87912. <parameter name="size"
  87913. direction="out"
  87914. caller-allocates="0"
  87915. transfer-ownership="full"
  87916. optional="1"
  87917. allow-none="1">
  87918. <doc xml:space="preserve">a location to place the length of the contents of the file,
  87919. or %NULL if the length is not needed</doc>
  87920. <type name="gsize" c:type="gsize*"/>
  87921. </parameter>
  87922. <parameter name="flags"
  87923. direction="out"
  87924. caller-allocates="0"
  87925. transfer-ownership="full"
  87926. optional="1"
  87927. allow-none="1">
  87928. <doc xml:space="preserve">a location to place the flags about the file,
  87929. or %NULL if the length is not needed</doc>
  87930. <type name="guint32" c:type="guint32*"/>
  87931. </parameter>
  87932. </parameters>
  87933. </function>
  87934. <function name="resources_lookup_data"
  87935. c:identifier="g_resources_lookup_data"
  87936. version="2.32"
  87937. throws="1">
  87938. <doc xml:space="preserve">Looks for a file at the specified @path in the set of
  87939. globally registered resources and returns a #GBytes that
  87940. lets you directly access the data in memory.
  87941. The data is always followed by a zero byte, so you
  87942. can safely use the data as a C string. However, that byte
  87943. is not included in the size of the GBytes.
  87944. For uncompressed resource files this is a pointer directly into
  87945. the resource bundle, which is typically in some readonly data section
  87946. in the program binary. For compressed files we allocate memory on
  87947. the heap and automatically uncompress the data.
  87948. @lookup_flags controls the behaviour of the lookup.</doc>
  87949. <return-value transfer-ownership="full">
  87950. <doc xml:space="preserve">#GBytes or %NULL on error.
  87951. Free the returned object with g_bytes_unref()</doc>
  87952. <type name="GLib.Bytes" c:type="GBytes*"/>
  87953. </return-value>
  87954. <parameters>
  87955. <parameter name="path" transfer-ownership="none">
  87956. <doc xml:space="preserve">A pathname inside the resource</doc>
  87957. <type name="utf8" c:type="const char*"/>
  87958. </parameter>
  87959. <parameter name="lookup_flags" transfer-ownership="none">
  87960. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  87961. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  87962. </parameter>
  87963. </parameters>
  87964. </function>
  87965. <function name="resources_open_stream"
  87966. c:identifier="g_resources_open_stream"
  87967. version="2.32"
  87968. throws="1">
  87969. <doc xml:space="preserve">Looks for a file at the specified @path in the set of
  87970. globally registered resources and returns a #GInputStream
  87971. that lets you read the data.
  87972. @lookup_flags controls the behaviour of the lookup.</doc>
  87973. <return-value transfer-ownership="full">
  87974. <doc xml:space="preserve">#GInputStream or %NULL on error.
  87975. Free the returned object with g_object_unref()</doc>
  87976. <type name="InputStream" c:type="GInputStream*"/>
  87977. </return-value>
  87978. <parameters>
  87979. <parameter name="path" transfer-ownership="none">
  87980. <doc xml:space="preserve">A pathname inside the resource</doc>
  87981. <type name="utf8" c:type="const char*"/>
  87982. </parameter>
  87983. <parameter name="lookup_flags" transfer-ownership="none">
  87984. <doc xml:space="preserve">A #GResourceLookupFlags</doc>
  87985. <type name="ResourceLookupFlags" c:type="GResourceLookupFlags"/>
  87986. </parameter>
  87987. </parameters>
  87988. </function>
  87989. <function name="resources_register"
  87990. c:identifier="g_resources_register"
  87991. version="2.32">
  87992. <doc xml:space="preserve">Registers the resource with the process-global set of resources.
  87993. Once a resource is registered the files in it can be accessed
  87994. with the global resource lookup functions like g_resources_lookup_data().</doc>
  87995. <return-value transfer-ownership="none">
  87996. <type name="none" c:type="void"/>
  87997. </return-value>
  87998. <parameters>
  87999. <parameter name="resource" transfer-ownership="none">
  88000. <doc xml:space="preserve">A #GResource</doc>
  88001. <type name="Resource" c:type="GResource*"/>
  88002. </parameter>
  88003. </parameters>
  88004. </function>
  88005. <function name="resources_unregister"
  88006. c:identifier="g_resources_unregister"
  88007. version="2.32">
  88008. <doc xml:space="preserve">Unregisters the resource from the process-global set of resources.</doc>
  88009. <return-value transfer-ownership="none">
  88010. <type name="none" c:type="void"/>
  88011. </return-value>
  88012. <parameters>
  88013. <parameter name="resource" transfer-ownership="none">
  88014. <doc xml:space="preserve">A #GResource</doc>
  88015. <type name="Resource" c:type="GResource*"/>
  88016. </parameter>
  88017. </parameters>
  88018. </function>
  88019. <function name="settings_schema_source_get_default"
  88020. c:identifier="g_settings_schema_source_get_default"
  88021. moved-to="SettingsSchemaSource.get_default"
  88022. version="2.32">
  88023. <doc xml:space="preserve">Gets the default system schema source.
  88024. This function is not required for normal uses of #GSettings but it
  88025. may be useful to authors of plugin management systems or to those who
  88026. want to introspect the content of schemas.
  88027. If no schemas are installed, %NULL will be returned.
  88028. The returned source may actually consist of multiple schema sources
  88029. from different directories, depending on which directories were given
  88030. in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all
  88031. lookups performed against the default source should probably be done
  88032. recursively.</doc>
  88033. <return-value transfer-ownership="none">
  88034. <doc xml:space="preserve">the default schema source</doc>
  88035. <type name="SettingsSchemaSource" c:type="GSettingsSchemaSource*"/>
  88036. </return-value>
  88037. </function>
  88038. <function name="simple_async_report_error_in_idle"
  88039. c:identifier="g_simple_async_report_error_in_idle"
  88040. introspectable="0"
  88041. deprecated="1"
  88042. deprecated-version="2.46">
  88043. <doc xml:space="preserve">Reports an error in an asynchronous function in an idle function by
  88044. directly setting the contents of the #GAsyncResult with the given error
  88045. information.</doc>
  88046. <doc-deprecated xml:space="preserve">Use g_task_report_error().</doc-deprecated>
  88047. <return-value transfer-ownership="none">
  88048. <type name="none" c:type="void"/>
  88049. </return-value>
  88050. <parameters>
  88051. <parameter name="object"
  88052. transfer-ownership="none"
  88053. nullable="1"
  88054. allow-none="1">
  88055. <doc xml:space="preserve">a #GObject, or %NULL.</doc>
  88056. <type name="GObject.Object" c:type="GObject*"/>
  88057. </parameter>
  88058. <parameter name="callback"
  88059. transfer-ownership="none"
  88060. nullable="1"
  88061. allow-none="1"
  88062. scope="async"
  88063. closure="2">
  88064. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  88065. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  88066. </parameter>
  88067. <parameter name="user_data"
  88068. transfer-ownership="none"
  88069. nullable="1"
  88070. allow-none="1">
  88071. <doc xml:space="preserve">user data passed to @callback.</doc>
  88072. <type name="gpointer" c:type="gpointer"/>
  88073. </parameter>
  88074. <parameter name="domain" transfer-ownership="none">
  88075. <doc xml:space="preserve">a #GQuark containing the error domain (usually #G_IO_ERROR).</doc>
  88076. <type name="GLib.Quark" c:type="GQuark"/>
  88077. </parameter>
  88078. <parameter name="code" transfer-ownership="none">
  88079. <doc xml:space="preserve">a specific error code.</doc>
  88080. <type name="gint" c:type="gint"/>
  88081. </parameter>
  88082. <parameter name="format" transfer-ownership="none">
  88083. <doc xml:space="preserve">a formatted error reporting string.</doc>
  88084. <type name="utf8" c:type="const char*"/>
  88085. </parameter>
  88086. <parameter name="..." transfer-ownership="none">
  88087. <doc xml:space="preserve">a list of variables to fill in @format.</doc>
  88088. <varargs/>
  88089. </parameter>
  88090. </parameters>
  88091. </function>
  88092. <function name="simple_async_report_gerror_in_idle"
  88093. c:identifier="g_simple_async_report_gerror_in_idle"
  88094. deprecated="1"
  88095. deprecated-version="2.46">
  88096. <doc xml:space="preserve">Reports an error in an idle function. Similar to
  88097. g_simple_async_report_error_in_idle(), but takes a #GError rather
  88098. than building a new one.</doc>
  88099. <doc-deprecated xml:space="preserve">Use g_task_report_error().</doc-deprecated>
  88100. <return-value transfer-ownership="none">
  88101. <type name="none" c:type="void"/>
  88102. </return-value>
  88103. <parameters>
  88104. <parameter name="object"
  88105. transfer-ownership="none"
  88106. nullable="1"
  88107. allow-none="1">
  88108. <doc xml:space="preserve">a #GObject, or %NULL</doc>
  88109. <type name="GObject.Object" c:type="GObject*"/>
  88110. </parameter>
  88111. <parameter name="callback"
  88112. transfer-ownership="none"
  88113. nullable="1"
  88114. allow-none="1"
  88115. scope="async"
  88116. closure="2">
  88117. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  88118. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  88119. </parameter>
  88120. <parameter name="user_data"
  88121. transfer-ownership="none"
  88122. nullable="1"
  88123. allow-none="1">
  88124. <doc xml:space="preserve">user data passed to @callback.</doc>
  88125. <type name="gpointer" c:type="gpointer"/>
  88126. </parameter>
  88127. <parameter name="error" transfer-ownership="none">
  88128. <doc xml:space="preserve">the #GError to report</doc>
  88129. <type name="GLib.Error" c:type="const GError*"/>
  88130. </parameter>
  88131. </parameters>
  88132. </function>
  88133. <function name="simple_async_report_take_gerror_in_idle"
  88134. c:identifier="g_simple_async_report_take_gerror_in_idle"
  88135. version="2.28"
  88136. introspectable="0"
  88137. deprecated="1"
  88138. deprecated-version="2.46">
  88139. <doc xml:space="preserve">Reports an error in an idle function. Similar to
  88140. g_simple_async_report_gerror_in_idle(), but takes over the caller's
  88141. ownership of @error, so the caller does not have to free it any more.</doc>
  88142. <doc-deprecated xml:space="preserve">Use g_task_report_error().</doc-deprecated>
  88143. <return-value transfer-ownership="none">
  88144. <type name="none" c:type="void"/>
  88145. </return-value>
  88146. <parameters>
  88147. <parameter name="object"
  88148. transfer-ownership="none"
  88149. nullable="1"
  88150. allow-none="1">
  88151. <doc xml:space="preserve">a #GObject, or %NULL</doc>
  88152. <type name="GObject.Object" c:type="GObject*"/>
  88153. </parameter>
  88154. <parameter name="callback"
  88155. transfer-ownership="none"
  88156. nullable="1"
  88157. allow-none="1"
  88158. scope="async"
  88159. closure="2">
  88160. <doc xml:space="preserve">a #GAsyncReadyCallback.</doc>
  88161. <type name="AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  88162. </parameter>
  88163. <parameter name="user_data"
  88164. transfer-ownership="none"
  88165. nullable="1"
  88166. allow-none="1">
  88167. <doc xml:space="preserve">user data passed to @callback.</doc>
  88168. <type name="gpointer" c:type="gpointer"/>
  88169. </parameter>
  88170. <parameter name="error" transfer-ownership="none">
  88171. <doc xml:space="preserve">the #GError to report</doc>
  88172. <type name="GLib.Error" c:type="GError*"/>
  88173. </parameter>
  88174. </parameters>
  88175. </function>
  88176. <function name="srv_target_list_sort"
  88177. c:identifier="g_srv_target_list_sort"
  88178. moved-to="SrvTarget.list_sort"
  88179. version="2.22"
  88180. introspectable="0">
  88181. <doc xml:space="preserve">Sorts @targets in place according to the algorithm in RFC 2782.</doc>
  88182. <return-value transfer-ownership="full">
  88183. <doc xml:space="preserve">the head of the sorted list.</doc>
  88184. <type name="GLib.List" c:type="GList*">
  88185. <type name="gpointer" c:type="gpointer"/>
  88186. </type>
  88187. </return-value>
  88188. <parameters>
  88189. <parameter name="targets" transfer-ownership="none">
  88190. <doc xml:space="preserve">a #GList of #GSrvTarget</doc>
  88191. <type name="GLib.List" c:type="GList*">
  88192. <type name="gpointer" c:type="gpointer"/>
  88193. </type>
  88194. </parameter>
  88195. </parameters>
  88196. </function>
  88197. <function name="tls_backend_get_default"
  88198. c:identifier="g_tls_backend_get_default"
  88199. moved-to="TlsBackend.get_default"
  88200. version="2.28">
  88201. <doc xml:space="preserve">Gets the default #GTlsBackend for the system.</doc>
  88202. <return-value transfer-ownership="none">
  88203. <doc xml:space="preserve">a #GTlsBackend</doc>
  88204. <type name="TlsBackend" c:type="GTlsBackend*"/>
  88205. </return-value>
  88206. </function>
  88207. <function name="tls_client_connection_new"
  88208. c:identifier="g_tls_client_connection_new"
  88209. moved-to="TlsClientConnection.new"
  88210. version="2.28"
  88211. throws="1">
  88212. <doc xml:space="preserve">Creates a new #GTlsClientConnection wrapping @base_io_stream (which
  88213. must have pollable input and output streams) which is assumed to
  88214. communicate with the server identified by @server_identity.
  88215. See the documentation for #GTlsConnection:base-io-stream for restrictions
  88216. on when application code can run operations on the @base_io_stream after
  88217. this function has returned.</doc>
  88218. <return-value transfer-ownership="full">
  88219. <doc xml:space="preserve">the new
  88220. #GTlsClientConnection, or %NULL on error</doc>
  88221. <type name="TlsClientConnection" c:type="GIOStream*"/>
  88222. </return-value>
  88223. <parameters>
  88224. <parameter name="base_io_stream" transfer-ownership="none">
  88225. <doc xml:space="preserve">the #GIOStream to wrap</doc>
  88226. <type name="IOStream" c:type="GIOStream*"/>
  88227. </parameter>
  88228. <parameter name="server_identity"
  88229. transfer-ownership="none"
  88230. nullable="1"
  88231. allow-none="1">
  88232. <doc xml:space="preserve">the expected identity of the server</doc>
  88233. <type name="SocketConnectable" c:type="GSocketConnectable*"/>
  88234. </parameter>
  88235. </parameters>
  88236. </function>
  88237. <function name="tls_error_quark"
  88238. c:identifier="g_tls_error_quark"
  88239. moved-to="TlsError.quark"
  88240. version="2.28">
  88241. <doc xml:space="preserve">Gets the TLS error quark.</doc>
  88242. <return-value transfer-ownership="none">
  88243. <doc xml:space="preserve">a #GQuark.</doc>
  88244. <type name="GLib.Quark" c:type="GQuark"/>
  88245. </return-value>
  88246. </function>
  88247. <function name="tls_file_database_new"
  88248. c:identifier="g_tls_file_database_new"
  88249. moved-to="TlsFileDatabase.new"
  88250. version="2.30"
  88251. throws="1">
  88252. <doc xml:space="preserve">Creates a new #GTlsFileDatabase which uses anchor certificate authorities
  88253. in @anchors to verify certificate chains.
  88254. The certificates in @anchors must be PEM encoded.</doc>
  88255. <return-value transfer-ownership="full">
  88256. <doc xml:space="preserve">the new
  88257. #GTlsFileDatabase, or %NULL on error</doc>
  88258. <type name="TlsFileDatabase" c:type="GTlsDatabase*"/>
  88259. </return-value>
  88260. <parameters>
  88261. <parameter name="anchors" transfer-ownership="none">
  88262. <doc xml:space="preserve">filename of anchor certificate authorities.</doc>
  88263. <type name="utf8" c:type="const gchar*"/>
  88264. </parameter>
  88265. </parameters>
  88266. </function>
  88267. <function name="tls_server_connection_new"
  88268. c:identifier="g_tls_server_connection_new"
  88269. moved-to="TlsServerConnection.new"
  88270. version="2.28"
  88271. throws="1">
  88272. <doc xml:space="preserve">Creates a new #GTlsServerConnection wrapping @base_io_stream (which
  88273. must have pollable input and output streams).
  88274. See the documentation for #GTlsConnection:base-io-stream for restrictions
  88275. on when application code can run operations on the @base_io_stream after
  88276. this function has returned.</doc>
  88277. <return-value transfer-ownership="full">
  88278. <doc xml:space="preserve">the new
  88279. #GTlsServerConnection, or %NULL on error</doc>
  88280. <type name="TlsServerConnection" c:type="GIOStream*"/>
  88281. </return-value>
  88282. <parameters>
  88283. <parameter name="base_io_stream" transfer-ownership="none">
  88284. <doc xml:space="preserve">the #GIOStream to wrap</doc>
  88285. <type name="IOStream" c:type="GIOStream*"/>
  88286. </parameter>
  88287. <parameter name="certificate"
  88288. transfer-ownership="none"
  88289. nullable="1"
  88290. allow-none="1">
  88291. <doc xml:space="preserve">the default server certificate, or %NULL</doc>
  88292. <type name="TlsCertificate" c:type="GTlsCertificate*"/>
  88293. </parameter>
  88294. </parameters>
  88295. </function>
  88296. <function name="unix_is_mount_path_system_internal"
  88297. c:identifier="g_unix_is_mount_path_system_internal">
  88298. <doc xml:space="preserve">Determines if @mount_path is considered an implementation of the
  88299. OS. This is primarily used for hiding mountable and mounted volumes
  88300. that only are used in the OS and has little to no relevance to the
  88301. casual user.</doc>
  88302. <return-value transfer-ownership="none">
  88303. <doc xml:space="preserve">%TRUE if @mount_path is considered an implementation detail
  88304. of the OS.</doc>
  88305. <type name="gboolean" c:type="gboolean"/>
  88306. </return-value>
  88307. <parameters>
  88308. <parameter name="mount_path" transfer-ownership="none">
  88309. <doc xml:space="preserve">a mount path, e.g. `/media/disk` or `/usr`</doc>
  88310. <type name="utf8" c:type="const char*"/>
  88311. </parameter>
  88312. </parameters>
  88313. </function>
  88314. <function name="unix_mount_at"
  88315. c:identifier="g_unix_mount_at"
  88316. introspectable="0">
  88317. <doc xml:space="preserve">Gets a #GUnixMountEntry for a given mount path. If @time_read
  88318. is set, it will be filled with a unix timestamp for checking
  88319. if the mounts have changed since with g_unix_mounts_changed_since().</doc>
  88320. <return-value transfer-ownership="full">
  88321. <doc xml:space="preserve">a #GUnixMountEntry.</doc>
  88322. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88323. </return-value>
  88324. <parameters>
  88325. <parameter name="mount_path" transfer-ownership="none">
  88326. <doc xml:space="preserve">path for a possible unix mount.</doc>
  88327. <type name="utf8" c:type="const char*"/>
  88328. </parameter>
  88329. <parameter name="time_read"
  88330. direction="out"
  88331. caller-allocates="0"
  88332. transfer-ownership="full"
  88333. optional="1"
  88334. allow-none="1">
  88335. <doc xml:space="preserve">guint64 to contain a timestamp.</doc>
  88336. <type name="guint64" c:type="guint64*"/>
  88337. </parameter>
  88338. </parameters>
  88339. </function>
  88340. <function name="unix_mount_compare" c:identifier="g_unix_mount_compare">
  88341. <doc xml:space="preserve">Compares two unix mounts.</doc>
  88342. <return-value transfer-ownership="none">
  88343. <doc xml:space="preserve">1, 0 or -1 if @mount1 is greater than, equal to,
  88344. or less than @mount2, respectively.</doc>
  88345. <type name="gint" c:type="gint"/>
  88346. </return-value>
  88347. <parameters>
  88348. <parameter name="mount1" transfer-ownership="none">
  88349. <doc xml:space="preserve">first #GUnixMountEntry to compare.</doc>
  88350. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88351. </parameter>
  88352. <parameter name="mount2" transfer-ownership="none">
  88353. <doc xml:space="preserve">second #GUnixMountEntry to compare.</doc>
  88354. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88355. </parameter>
  88356. </parameters>
  88357. </function>
  88358. <function name="unix_mount_free" c:identifier="g_unix_mount_free">
  88359. <doc xml:space="preserve">Frees a unix mount.</doc>
  88360. <return-value transfer-ownership="none">
  88361. <type name="none" c:type="void"/>
  88362. </return-value>
  88363. <parameters>
  88364. <parameter name="mount_entry" transfer-ownership="none">
  88365. <doc xml:space="preserve">a #GUnixMountEntry.</doc>
  88366. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88367. </parameter>
  88368. </parameters>
  88369. </function>
  88370. <function name="unix_mount_get_device_path"
  88371. c:identifier="g_unix_mount_get_device_path">
  88372. <doc xml:space="preserve">Gets the device path for a unix mount.</doc>
  88373. <return-value transfer-ownership="none">
  88374. <doc xml:space="preserve">a string containing the device path.</doc>
  88375. <type name="utf8" c:type="const char*"/>
  88376. </return-value>
  88377. <parameters>
  88378. <parameter name="mount_entry" transfer-ownership="none">
  88379. <doc xml:space="preserve">a #GUnixMount.</doc>
  88380. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88381. </parameter>
  88382. </parameters>
  88383. </function>
  88384. <function name="unix_mount_get_fs_type"
  88385. c:identifier="g_unix_mount_get_fs_type">
  88386. <doc xml:space="preserve">Gets the filesystem type for the unix mount.</doc>
  88387. <return-value transfer-ownership="none">
  88388. <doc xml:space="preserve">a string containing the file system type.</doc>
  88389. <type name="utf8" c:type="const char*"/>
  88390. </return-value>
  88391. <parameters>
  88392. <parameter name="mount_entry" transfer-ownership="none">
  88393. <doc xml:space="preserve">a #GUnixMount.</doc>
  88394. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88395. </parameter>
  88396. </parameters>
  88397. </function>
  88398. <function name="unix_mount_get_mount_path"
  88399. c:identifier="g_unix_mount_get_mount_path">
  88400. <doc xml:space="preserve">Gets the mount path for a unix mount.</doc>
  88401. <return-value transfer-ownership="none">
  88402. <doc xml:space="preserve">the mount path for @mount_entry.</doc>
  88403. <type name="utf8" c:type="const char*"/>
  88404. </return-value>
  88405. <parameters>
  88406. <parameter name="mount_entry" transfer-ownership="none">
  88407. <doc xml:space="preserve">input #GUnixMountEntry to get the mount path for.</doc>
  88408. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88409. </parameter>
  88410. </parameters>
  88411. </function>
  88412. <function name="unix_mount_guess_can_eject"
  88413. c:identifier="g_unix_mount_guess_can_eject">
  88414. <doc xml:space="preserve">Guesses whether a Unix mount can be ejected.</doc>
  88415. <return-value transfer-ownership="none">
  88416. <doc xml:space="preserve">%TRUE if @mount_entry is deemed to be ejectable.</doc>
  88417. <type name="gboolean" c:type="gboolean"/>
  88418. </return-value>
  88419. <parameters>
  88420. <parameter name="mount_entry" transfer-ownership="none">
  88421. <doc xml:space="preserve">a #GUnixMountEntry</doc>
  88422. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88423. </parameter>
  88424. </parameters>
  88425. </function>
  88426. <function name="unix_mount_guess_icon"
  88427. c:identifier="g_unix_mount_guess_icon">
  88428. <doc xml:space="preserve">Guesses the icon of a Unix mount.</doc>
  88429. <return-value transfer-ownership="full">
  88430. <doc xml:space="preserve">a #GIcon</doc>
  88431. <type name="Icon" c:type="GIcon*"/>
  88432. </return-value>
  88433. <parameters>
  88434. <parameter name="mount_entry" transfer-ownership="none">
  88435. <doc xml:space="preserve">a #GUnixMountEntry</doc>
  88436. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88437. </parameter>
  88438. </parameters>
  88439. </function>
  88440. <function name="unix_mount_guess_name"
  88441. c:identifier="g_unix_mount_guess_name">
  88442. <doc xml:space="preserve">Guesses the name of a Unix mount.
  88443. The result is a translated string.</doc>
  88444. <return-value transfer-ownership="full">
  88445. <doc xml:space="preserve">A newly allocated string that must
  88446. be freed with g_free()</doc>
  88447. <type name="utf8" c:type="char*"/>
  88448. </return-value>
  88449. <parameters>
  88450. <parameter name="mount_entry" transfer-ownership="none">
  88451. <doc xml:space="preserve">a #GUnixMountEntry</doc>
  88452. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88453. </parameter>
  88454. </parameters>
  88455. </function>
  88456. <function name="unix_mount_guess_should_display"
  88457. c:identifier="g_unix_mount_guess_should_display">
  88458. <doc xml:space="preserve">Guesses whether a Unix mount should be displayed in the UI.</doc>
  88459. <return-value transfer-ownership="none">
  88460. <doc xml:space="preserve">%TRUE if @mount_entry is deemed to be displayable.</doc>
  88461. <type name="gboolean" c:type="gboolean"/>
  88462. </return-value>
  88463. <parameters>
  88464. <parameter name="mount_entry" transfer-ownership="none">
  88465. <doc xml:space="preserve">a #GUnixMountEntry</doc>
  88466. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88467. </parameter>
  88468. </parameters>
  88469. </function>
  88470. <function name="unix_mount_guess_symbolic_icon"
  88471. c:identifier="g_unix_mount_guess_symbolic_icon"
  88472. version="2.34">
  88473. <doc xml:space="preserve">Guesses the symbolic icon of a Unix mount.</doc>
  88474. <return-value transfer-ownership="full">
  88475. <doc xml:space="preserve">a #GIcon</doc>
  88476. <type name="Icon" c:type="GIcon*"/>
  88477. </return-value>
  88478. <parameters>
  88479. <parameter name="mount_entry" transfer-ownership="none">
  88480. <doc xml:space="preserve">a #GUnixMountEntry</doc>
  88481. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88482. </parameter>
  88483. </parameters>
  88484. </function>
  88485. <function name="unix_mount_is_readonly"
  88486. c:identifier="g_unix_mount_is_readonly">
  88487. <doc xml:space="preserve">Checks if a unix mount is mounted read only.</doc>
  88488. <return-value transfer-ownership="none">
  88489. <doc xml:space="preserve">%TRUE if @mount_entry is read only.</doc>
  88490. <type name="gboolean" c:type="gboolean"/>
  88491. </return-value>
  88492. <parameters>
  88493. <parameter name="mount_entry" transfer-ownership="none">
  88494. <doc xml:space="preserve">a #GUnixMount.</doc>
  88495. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88496. </parameter>
  88497. </parameters>
  88498. </function>
  88499. <function name="unix_mount_is_system_internal"
  88500. c:identifier="g_unix_mount_is_system_internal">
  88501. <doc xml:space="preserve">Checks if a unix mount is a system path.</doc>
  88502. <return-value transfer-ownership="none">
  88503. <doc xml:space="preserve">%TRUE if the unix mount is for a system path.</doc>
  88504. <type name="gboolean" c:type="gboolean"/>
  88505. </return-value>
  88506. <parameters>
  88507. <parameter name="mount_entry" transfer-ownership="none">
  88508. <doc xml:space="preserve">a #GUnixMount.</doc>
  88509. <type name="UnixMountEntry" c:type="GUnixMountEntry*"/>
  88510. </parameter>
  88511. </parameters>
  88512. </function>
  88513. <function name="unix_mount_points_changed_since"
  88514. c:identifier="g_unix_mount_points_changed_since">
  88515. <doc xml:space="preserve">Checks if the unix mount points have changed since a given unix time.</doc>
  88516. <return-value transfer-ownership="none">
  88517. <doc xml:space="preserve">%TRUE if the mount points have changed since @time.</doc>
  88518. <type name="gboolean" c:type="gboolean"/>
  88519. </return-value>
  88520. <parameters>
  88521. <parameter name="time" transfer-ownership="none">
  88522. <doc xml:space="preserve">guint64 to contain a timestamp.</doc>
  88523. <type name="guint64" c:type="guint64"/>
  88524. </parameter>
  88525. </parameters>
  88526. </function>
  88527. <function name="unix_mount_points_get"
  88528. c:identifier="g_unix_mount_points_get"
  88529. introspectable="0">
  88530. <doc xml:space="preserve">Gets a #GList of #GUnixMountPoint containing the unix mount points.
  88531. If @time_read is set, it will be filled with the mount timestamp,
  88532. allowing for checking if the mounts have changed with
  88533. g_unix_mount_points_changed_since().</doc>
  88534. <return-value transfer-ownership="full">
  88535. <doc xml:space="preserve">
  88536. a #GList of the UNIX mountpoints.</doc>
  88537. <type name="GLib.List" c:type="GList*">
  88538. <type name="UnixMountPoint"/>
  88539. </type>
  88540. </return-value>
  88541. <parameters>
  88542. <parameter name="time_read"
  88543. direction="out"
  88544. caller-allocates="0"
  88545. transfer-ownership="full"
  88546. optional="1"
  88547. allow-none="1">
  88548. <doc xml:space="preserve">guint64 to contain a timestamp.</doc>
  88549. <type name="guint64" c:type="guint64*"/>
  88550. </parameter>
  88551. </parameters>
  88552. </function>
  88553. <function name="unix_mounts_changed_since"
  88554. c:identifier="g_unix_mounts_changed_since">
  88555. <doc xml:space="preserve">Checks if the unix mounts have changed since a given unix time.</doc>
  88556. <return-value transfer-ownership="none">
  88557. <doc xml:space="preserve">%TRUE if the mounts have changed since @time.</doc>
  88558. <type name="gboolean" c:type="gboolean"/>
  88559. </return-value>
  88560. <parameters>
  88561. <parameter name="time" transfer-ownership="none">
  88562. <doc xml:space="preserve">guint64 to contain a timestamp.</doc>
  88563. <type name="guint64" c:type="guint64"/>
  88564. </parameter>
  88565. </parameters>
  88566. </function>
  88567. <function name="unix_mounts_get"
  88568. c:identifier="g_unix_mounts_get"
  88569. introspectable="0">
  88570. <doc xml:space="preserve">Gets a #GList of #GUnixMountEntry containing the unix mounts.
  88571. If @time_read is set, it will be filled with the mount
  88572. timestamp, allowing for checking if the mounts have changed
  88573. with g_unix_mounts_changed_since().</doc>
  88574. <return-value transfer-ownership="full">
  88575. <doc xml:space="preserve">
  88576. a #GList of the UNIX mounts.</doc>
  88577. <type name="GLib.List" c:type="GList*">
  88578. <type name="UnixMountEntry"/>
  88579. </type>
  88580. </return-value>
  88581. <parameters>
  88582. <parameter name="time_read"
  88583. direction="out"
  88584. caller-allocates="0"
  88585. transfer-ownership="full"
  88586. optional="1"
  88587. allow-none="1">
  88588. <doc xml:space="preserve">guint64 to contain a timestamp, or %NULL</doc>
  88589. <type name="guint64" c:type="guint64*"/>
  88590. </parameter>
  88591. </parameters>
  88592. </function>
  88593. </namespace>
  88594. </repository>