modem-manager-gui-0.0.17.1/help/C/figures/network-info.png0000644000175000017500000024154112275670236021624 0ustar alexalexPNG  IHDR_uتsBIT|d pHYs+ IDATx}ySs.r F M"xGM|&OgJԨxF@O@Dio<FE#$" ]cfz9vمzp}ߩq-z[:zU[AAAAAAAACJ+((((((((l)laQp`\^W],sDy \/ pGtY(_5Op0xBQ?^.t0fQ}BW E/ Sb\AAAAAAAA:,X݃'$ʻGGxI|_1`ǧ}"%biز7&p+K\*ʻAw %{Ec" 5!:c"G7G>~ޖ]+vBܝ wpܨz?mJ+((((((((B?XYn^a,yw .!.ˆDxtAxOQۤDBuHe|CqHfM&/,y !B|0+ ܨLJ# x>IY BEsz%ax:[N|]7KY>!_ΆDxRKxc+A VVrp)'Mͥ)IuZIR(pK'ʂ B\1ƺF5'3&z \8sn9($,0ޞȳth޴Ar^D爇 vS4J:m&)eyB#$s0egTf\AAAAAAAA!O4Pj؄lB !$TA5"VX+nPk 0YA4k6綖d6M2[rqƙqd, *cmoIL_44\R-kj %TӒMKlNL1mB Y7ꜛ6qFmpfrTҶ1nxL!KAb'z>A7S~}!+N)H:A( մSS!8L0` 4M$ITO0\Au(1 Iu׀nX*uZR-Qɥ)(iLB(!v˚ 3Wx|!LS3TiJY1t 5DtPhƫֈmqB2yguJe`f jp3fR&AgF64`FqFHn%4% :WTJT'%OQYb KT@>IF ! 1B6sjPK'3sBt4&H1&iuD @AӠ g*((((((((&I@PnR:a,KYٜPjs fQb fr90A*#R*׍WN\BKKT@NRZXy$fQZcM$AA&MMF4HShq+((((((((l5 $KA LA`s0%`mQ b9&4ba$8dAa̷Te^@x7׻r oHB!vd(5)T5Yx8% ijJi#!4犝#`6^ŷ3ačwYHUjjr=b9԰oBj߻ kk7%@.yW {|k !_%! '\꽪j㿋NMWa 6]/hʖnfo!6ש9l0)N4AMPQpF\pNlYזPZ7>'b(U@cp5r !&!Hbh >>;ϮM`\.#D*B&!L"HVr9wddܶH J!45]nRcn!攔"Cwb3ԤX)除>}kZצ4otk:pj<[nQ" -PEv?Z]B(-mB\XW.ߑB<>㏍YcUn\ Z#iB 41rޟftP,BlbSBuh( ,4 N8{IM4aF9 !6(kVƲeп?QQ/Csqo؈#F`A5|uX9Us+ڼVq텇QSƵF8'xh}ZAAkv}"@0/P&5@b'!E@ކlm3n[.SDӡR& +ث>W(h{IFLs-3 m[\.cwn- _s3O>L&c] O+^ B7؊ K:CvcM[\8|=L{6zISv):cđ)spJT(=_ޓvoh϶-tvTza6j cnj@\|!دʯV"ΓXLFȝd@0_ʕq!&رJQz!t*U!=6q'&r qí".[Y6L'xs^Xý&k0h zp!|SEnx6JTɄUTY,`xr֊KUą]& ҐzǮ {Q_ecƌ)v}~b!;&n ?<gh~sEC݆>qH@6A|dIKRMpS>DZ)śï,J *=eY΍m@۠qyչtsUо'n^WR3fcM0 L& #ǜ93fGŨQ`H&ظq!9s&.btvt2\{<ܛ6n޴qګw]|1f>oaǝvrxne:@."|0m4lh9Q=IڈQU/??!S*tqlExa_$Z ,lRB&̊wU2Xh$ھՠ@7,+ڿݼtSFPs3HW/Yb\M \y3Ǻuk04C1o|L2f*=3tT477c@K .zE9<O<8*iE:E_^|й睇D!?!2 >$~b….ņ(ݰaðv_f~{3=I'A4S)wx7];k:d '9<4it]C:]7P> ~{eh0-෗_Vxٸ1l0464K.1h80 mܸZ8*oqΫp >>78S/ ;q 8p {+8 N;)\_Z\6u*Jw\_z~ hiӦaʩS?|Hp umBjcoz7avk+Ͳ5>K&q.6sk2GЭ2_c%H&hz`z6ЎՠA۸c-hWAkA:7ebG?MŁ+>Α`,t&;g~7-줟J<+Cw>>0N8zʩ۷?=7|>͝z?w6-cv=އ{̝/xf.q '|^lt9F{^Į4qN];Op6'~-Bxd"\ܽcz`lWʗNqOxxB\ǚ7q i 8_i*Ej*o6'6 imcahدmj3o0ʗ4: N1J(B eeXJxpEnØ8R2 ?byn;FR ~ rjګT-"m*p}zK]F\1|jf!^}>h 瀎Bv<chfJp-nWf IDATh4 }Ai0`L=m=Bsx0LW+ЧO#,s= ~1C1G?P]1?9 #_}d: 0;2xp?=އ ` "S>_yX"/k;l__t>[o$ZRqXօ 692;Ry$U!Pę EϏ.sevvKrăR QD(ŝ˚?6n$+gecĉO{XQPbԃ[[/u_, ΋C˥_| oa`8 ^Y^39sJpgÙg)3OS6co},]>R}a׾5_,K6|NgA5q$+8_H.1}Sgaȑ>*Nzp 3~~HӘrAr0a_g|㍘y]qV`޼yx套/!aAK/'r~zQwZ6aSPzېfrrQxk'+á#Qia}_8V&l >@y&MAy hհM 6.;㗩@)E1k| #=t=#?Q֌SM'UKcXt ~ylڰkWr~n!Zn|g ?[?)s o5NxQEřh%%UL"dAMG3Nh`%3pQKZh //Yy<>L 4 _,YK. kd2hhlk)] Ӯ{qѱy3>?qg;30㳱fd3Y]\^Gw\O?]\.E.uc_>@ւfַpS_J)~{ŎNAq\aҋ/QL6_.n \lӦlwnZV:["yOxAR:3qKXEtt)jA6gJ#-*2k徱AQ"?bH<`v,uV:3&p<]m@Ӻ..Fό i҂ )\zad2Xe_b8`exЧZZ0w{1nW<}r3G0Y^֐.n}0`@xܞ唣(o0C^p 2W-,+Jzid*oރZ+_pxqW [gO){Ζ{PP̛1w7T6,XGĜ~?/0qQG!8t.?/0pď~]qiv41 B=,_ Fƹクps>0M]{ =l 4v^zEƔvH}~뮽 'p";w8쳰|2=1cqݳ0qC1.=zi>LSNq,,3`807f3o };yeض˲l 0 qAB0dR;WIn %( *EQv]nHGB1'(WD׃ 2c#hZt?lLX[d c-xA |D|%P]t;~Gj<ȸa KhAZJKuJ4]N9CA jX4@iKkCAhE#ktGY*1X }10ax<,3٠TC"Hl >2ԅ["9t䄢<`(#$4csЬP +HB y۲<+D2ܸZ H X]A(c iJtLcN7 N9ΥiG RRj sؖU%laG2r>.%qZ[O_^xѩ4 9,rd1֨K.%8Jؕ=Wjò,XV9nh(|9J?F0ΎL2赋xs#+PGn}E$pU\-ٟ±BHbv[axs߰ob\ 4 /?9Yg:Xm:hlbY@넙dElҒ&o綖-n[v&aӛL]j,[||ga q 4J1dPE `hmmLirr, 47c 2dh7 fQ5b萡s^Q%_,EKK3Oع];Aכ;Xh/JW{ys slݓv:y{_P)謹_lHĹ6om"_.r҈s^!kC2a'$h/x"\B;#p x۶k~ zwl9?q"c-m|lVqQbEW4}Or[AP[hT"*mc@mŢ9Nx;Ex"\Z(R91ϧ8 }vG[ߝt(uE`9}`h ˖-+\9G&ӎ6t8ZZ[n #Q=+Էo{p>Ph"'}6CIX717/ʣm-;U\!N/vJLk8Y\~q^-k){87n+H|<5_d~/3un#i8q9 /e-ՈSKmt,.Rh.آ"ܻ!*9u"-}tuG: avf`Z ]G*FccW[ە%/YzGB6uqv{Zh-@ b cCUxm%Uf"&[Ex<9 z D"D". r:߈,KB%[A,]-|v\%r`sw9P8/Dk?.]qw`6** 9+*LWznY&,ˬ2PE]XP__|BŷJl-{(a 1ouUqlIQl$R6k\Rm spw7"q:sYt`/ΠBpE4$`yDjQ.. .uG=L$MBO~qm+E߂nXwςW&w&%ķztH֒W@t~űU2AM<>x|HodZ@@nʭGEΟшc_ _l9 ]6b92vb\ĸ8~ U+CTs '- Qp P{8,V\*;8D8>Ol ]* "٪+8 ,Kɻi@D.7J&DRhg?)9mxCswT9Gcn@p;pN }aFI^~DG'sg eqzĿ@|)G]Q_E»`e- NMx؂xR"s]6Ql+PxzEx ^!Vv1NH! r/akg+8w4U ݈6ьK|^u@wREZ2weXbtw-ǻ{߀=A};Zg#0\,%oڊo⹯Xck<>m  8{:74) p<J?RV5-^#ƷԼQ]βy<^px)9JWh+r(W΅.2X\Y0a.ظGtUe=>a4*D ŋ2ZU򈛀QdVgtmˢWrz+}ƒ'0cdc+l3Ŵ/ų-|{3VR1qF41<GF[e{z&7S0,t s \Q,7 #0#tPy˶ X.X>EQ. /}rZtq2?ai*ZMѮȪ=I[녊Es8Y״j!*PiU~>r_rX.b+z ޡ|ք8GА=^Km5g_T/i]=Dlz~ $͆V}Lp^JQMDUw#.t䨂4u)BxWv 9*ux}K'lk"܃^/{&O^{mP k-aqyT-H*^ETG e+:s^n| {zқ^ dKա߯xKcCD^'7N`ˍk|[ZU"K,m_\X૧SԦ"tF/[@pJ<-%HY{*]ăAҎLs~f˝H3r .W߹HϨÊ'%Kؽ%#?q{uB)W5ODV" JcnVx#)%TDWw檺 ܪ;0CQ#-Y%'tRG8~ɓBUXtΛc=|5֭ŭނ: 'O!y.B;$Q uO^Hŗ{0GQ". o{@l?Q:9/oOR.^~I<񰗄]-,VhE*3=V[;FΕE)D8߼7`Km'Ľ4]"Qd l2㫙K~)Lx8R~{|H[0?5/aqOVo4F֬^O?pnF 2lO<=+\KCZ}**}ՅL8{^hC֑JrlӅgyfϞ59s{A~~SH&{aLNxiU Ǡ0/܍ q޸8 {^L.61VA NKy_Fpžrꄮ|d3VhjDpK*щ1l*UF\W.%w,R T8zÆ0y>;6c}uqw;g}|ȩlrs=;;xܹ>},|O<z+~aؖ~;fQ#X׾,};?4︿e(\Ux˿v^2?Iv$_Kb z_ޯ0>d\} rY\^+~r ,%וU %rW6|yUKbDm q9QqK_'))>q=6m6.X抺.x9z<@l˜*u|mUгxLPJqGG<#8A/2 -*{vfSOŻԿ+830p 8gqF8<80tP455W_g |䆍0h`;/9>x\2eo In+nϵ S4 f hgX1BR,96K݆PD^2U^`ՙxgUnHk#+T8hh%5<6쨍gJpNYUxzz28x /^k6`vZ :>|8֬YlY&PF[[~ӟzyT|Sҟ Ƨ~viO$r3-,Xwux V^O8Ӟ<~}aժ61yJŜ?`QI4,)*!tMT9+q\9,ojVpUi5ODԆ`3pYn34_că}ISʿ?8ʋb r[~ToĪ!DvWL4DfۓG{ZT˺J+3˹ %lUb0 qi8 (+WbԨQ˗{ԯX?x`p 2dH8kp'+@cc#:::(x_se>}  X+Vzho8E<nIs1 ?] ;-S j+A@4a^ |cA6! !7QFĺk%knz:bՁ+N 2e*%s̱x饗p1LoWիqϘ1k֬5k0c ӧ/²,,^W_}O6Ecc4V-Rǿ LA31sLao_|,şꫯ|O‹/;/\xQ&8q7Ï梣pqbudqFsEtTІ2A_¥mBSᇃR++Wbȑ8䓺%׿̙3qWa8kث/Nnq;N>dh#?# 1u{x>Q_2 cƌ8星4M̜qg_-ʫ\B's35g2 >IJ9 y@F]~SWl>WDގ4=(xUqw%c bEUQ{\XV|5: o/U;z>WĐ!C_4Ͼ'~ʯ]o?u"y\DT(nYz-#vҺB$N`.ðKI\N*DH">JM^Юa"[E]!ko8ܢ:5^U=޵qɳ[NPb\!?񏏈6䂋PYs/:luڐM!wrX1+@qIO)1t7ׅ+Cv};P =Fc5wE=0Qk&_.؜ª8DYE,a}!އpqQYEXo/*@ 2::۫N8䚸~gIWec.bw B\'yH&ᮎcΟwc) hQU"x#^!}Uz"X3Y:ҨT: P:.t5SPGQօ#r{8zW!*ˤꈅ|ou& +!mE-#\}W uő-{H u̖w[Awfv+r曋:Cu: ..Jx+(1#QW^&-yI oՓJ7DW-,@<K0l q˗-?.6ml 0q>bdw6{U{ձH.Zb`T[a u[%-][R.hkʨ ,\e?{ --- ^5Ͼ5z--&AWY1Dl HK.ɞ޶'-OF=~{VC<k 0blmM)k<5z EхBju A.l3BV%zszWPFؤ\e.ΦVS殏]&e11ڗY1HSFZcNtrnU3wcFAt+P)1bX~,PJJ&1z(sIׯvĖɼ]Hw*`]e(Gc]v^{WV][:D"0, l^>.k>l>f veSu;]D2t*Y75wGx v:ﱖJaG삽S~nvz^c@[*ϰb o R ]v;F$ܒuڜG:͡NjqڦN<3x?aq1堃\Kblʕxù܌SӎwbGOݵ) 6Vx+nvvv?={)g"|!{ 4㔓~;`,{/Ջx?,^^3ycpBih_~t} :;;O 'ځS?ǣƀzI?~0.G}2K+O? @kk+FwT _&f?1|4 w挺n@~PPSʗ#]5d0E4 -:%yM'MD휡s͠5,N Jtj4e5M4Ei ڢ5:p7#Wj8̗_yk/0 /6a *65^U նuM˯>^}0ߢ?ne1^aàr o5i*/O=}ڗZ`YXR/fSӸW\~Xk7>|8A)yAA6ƍòL{֙=zt t@Ϳ^#z8'6[csγu,72v$uL'c٤Ų 3Lئ%Mm-a[ܶLby;k7|X`FYUq4qc zt4 /o+.;OPhmVA"4M{8^WM;UݢjE|\1nYM T6v *#/Jb| Ÿi8`u<֮]v޹ީ- QDoyĔ)S`3.Q0 ,\~~)2yr]f=zP^1Uջ+t2 dXIhTM rR$r[ш@4i6%A !A@D')4%HC ׷l6cO)va0Mem*ՕMD>}N;Y`~=}~L6c?u׬Y2@y/EQ|mjTjˮدc#>lXU1ccw@&z\u= [`nVgrFon>㌁Z.m\۶ӎR]#Ǟ* B ๯|y'pgsF29t-ڔpgpƨΐg[6ckہ#]gUWUg_3^8y4Mӟaĉ5jlƗHR8q"(xwdwsr!k=HcҤ;}ٍih&;UcL/םf!Nc=%=1&({gY.XcJqiJ9<䟐Jn!qG4Ms J0j(9}mX~=,Y+W"/wߍtC{G)Yl7aĈayf9i۶p!R\-ga`ĉ3nʏ>XEw=$1p@HRXx1.\4#ܚ ]pbs~1dr9⯸R;83f ~tvv ORކ7݈#Ftqoz'Je[>e )Sॗ^ʕ+6|Sxۉۉ[bikk+88J)}Q[.]ܛsΕˈ#߱uߔGxꩧi&-P߂[OȑݼR\KԄLSWbذa>|8d2 6oތUVaɒ%[RxOOc#xgrBBUPDD(* Rދ P ҕ:B \ᖻr |gvggf);4ȓg/myF:ߟu|r8w(%>!Z>6pz6mڠؾ};={F.]7ozHd͚526[O+{gv2ȩ$I]v+V EQh߾=ӦM0(ʦAQ %_B:ave*I۷u̝;F鞌24}M΅\?(Y!>>ZjY<(ooo gϞ=ܸqVKj(S Fҥ W\a˖-HI. Y[R\t)))zYRX1*UD*U$))z=$Oʕ '22GrYZ*+VRŊ8|d;>h4ҲeK .`h4ҽ{w͛4Q'Rmw8 ̙;MS)SRJa4ر#...(Brr2IIIK/m6El|e m#Z97ʠ^zTVFG_"p ~w`AVuڢ0EQW^Hz=nnn&ymڼٮC e1HJJfպ h4raWnf׮]]jY/,cq/37\dY_~h4nݺŚ5k0TZʶlhDٓob!y]k&"c(/]oSreSEQeիMdd$OuHEY&=z={XFINpFyP|yt:~`0PbE9 #œu 'PƳHmN…NI+B…/@;bbb J*8q"S7RJXV3d,bŊQvmoGSgϞU1 1URjx^ɞ7u֑2S1ٳ@dstFRSSAV5*Ub;hǪYw܎͒E s-n\t:>,믿A~jHDdd$vB$zƍQJ ,EJXb%[\.`h4rF$\Ix]6,_˗/[743Y8@׮]Sqqq戴$I" ]GN8yɓ/#GNJxV_ac&V˯ʡC`hZΟ?ϴiXf nݢgϞh4,Y7(]4ǎҥKѴiSu]JuN|@RR8%''S\96lȽ{?>gϞEJDD{k׮T\^}U^~e|}}Y|9#<<OOO5T4 G-*K-ab3HjzO[_d z///zڵ; 'cd /^{ ٱcݺu#,, Hݿ?{QFу &XXd4g߾4ǯ#$ Svm:vꀟ_lH9Zt:ujh4NSBZZZVuUFP2̧7mAbb"WaꪥZmӆZ˩t|BEQ_qUUΎ2|iii4k֌^xA 5Zk0P:l2\]]Ugm)kQكcmёg9$Ss|}}y7qwwGQYp::^[GR?uXv5Ws(lv9zX&)R???ܹþ}T9h4֬YÿCe6o˗ׯ 4`ҥ75ke˖tEL.{y3ms߾5~mó9hK9őī׮ [ܿ+ߜ͛7s=ʕ+GU=88>)SX۬:ub~.υ [>הq ;82n[>wjj~qI4hN㭷zt|| ӻWo/^L۶m`0|rv$wNǎឮl=ro,ի.\ߠeW.\SbbbHLLdĉ2 *'OӵxyyW&MӤBΝ:fZ e|횵t܅cf;Ǒ4h믧9feiFɒ%1 [g++{m$;\rզL3|@Gk&URSSU9V?`[}f7[ᅬ7d0kV!6>3tPʔ-cqB$ZV]a4tT\NӧIHH瞣RJ VZŅ h4F~'ׯNܹsj\_k;*cUYp?6gͤZj,Y@5eYh۶u1b̧v[oy6iC1aRRRP@Jќ9sHNN@bxhc:իWz*oYԍ_`ƍԩS_~vu&$Y///t\|f͛9sFUMm?Ν;` -- ooodY&--Muh^7Sk8~_?ܙ~9]oG"7Pc43m,˲:k.8ov满/WM6ڵk,^F;csx(ƒ6q >ުK5.ܽ{僡8moYnnnxyyѻwoeޣXѢxӱc.\#?O{.O7ol!%KҤrYmsNH3QEvU%8p V@LrJLL5Y>5~u H` E4`"LvZVe]y;@(N; ؖijܶX3qD$I"**5ks=ijC~iOXXua̘1 >\3 v.n kիEYQ%KRtiOMطUy#1wRj;f4Wd0p@ԩc%&X+Ӈ(1vX]^299oooϟ3ܹs,\ 'HL/vsw'555b`Qfh6)q~^|EF#Ƣ(WjB$vi1(aJֻEM@ߎ(cܶ~+`σtϢe)6lgϞXיڢzKݻݻw)R11٪kͪlw/_g82n  ;bzK0m4ѣG\ށ2CxbT?-[dǎdjjF~ܱg{Vɓm.l׮˖/q&|{|SjU$I>c͚5 u$L2pt:Ȳl18m^6~zu /OOh.ancBQܹhD?+QF]بQ#T(ܺuBCC֭AAA,Y(\]]-Fsmm:eu57ed,>OQ}]}m > &S5pssYVVZٻ]̳@nޤTD݈"H;#Y=y[/'s >III4qssO>!>>zK7oRf<==֭z#Gj%!! (… ;w.'zzUV̜1+Wt"OP׮IIl޲wBC[M-jWܼE||$5%Yw$ g1܎dR9b@QNf~tR9GecqcP{4=c1ޠ\71\\$Ψ3A׸xŠq5ސ7R q:{(Q֯|lsEj?2YrlLZ{lt1` vΝ;*$N:O5eAzA(GlRR=z7ߴ^gVqg#T\ /SsѨ.f4ίqLk6x`V^M˖-1 hт 6иqc<==Yxk[$Io4oޜ-[Yti5 ^ʔ)/qq9EQpwwgxyyѦMƎ˞={Xr%;v@,\~+W+*Uk׮4i҄… 3~x ETN͚6}R'L&F͛7E۶m-ysM2; roziSѶ5k9UOwYr%uԡZtƖ_mog-GRWfͬYFU WXSBuVy9aBxɡ:hs*k38իS;$wVݻǥK([,k&$$ƍs,>dYfڵorJ4 C `ժU>V B]a'4.%%/(x ڶmKv8{,Gڵk$%%!2 lٲԮ]ŋ ѣ4ꛛ,arT&kܽ{WWWZMEZ:Zq7ueO\fϞӞ2n:oMQ5S܎[ {eQ6W@e Ν;Ud[ JIIuӇΝ;[3(pk,/Gh!ڪSO3z}RX$Vz?III̚5 EQv:Z)IM6e9r#G"2ϧTR\te˖ezT,4<{#11eѢEܹ6mPjU-JΝT=3t:wǏȑ#lڴx\\\,ꢢ(4CiA"c=|@<Oxxx<-Pt<ʸY2PF N<2nogΜnmdڡmD=dQVM6l۶ wwwQ"""hٲ%e˖UmNʎ;\2sAe^J^n{_PZ<_mՔÃhΝ7AAAnIHH@fEf^1 q3o{O?O?Y d1(J6[v3hyfWa~^ժʙޚۻ7E)`cϜ9-2ȉE!))^{~WWWDž 2}SouLeYfmۖ &0zhZjŮ]TfrQ۶!?ϟ)7XLZRJFyw)_<$l2zIɒ%ٶmՕ[һwoxAkoC!??6h¤8\zSN_qA<_ũSvx0Oulߎ6(;t{8W|MeN ];o~QijI(R:j0yŗu%ܽ{jY!4cFHlO t:M-p2xyFXos;:Ig:$ӌK$ҥJހ~g:P4M[uMQʗ/ԩS j;v>L b]3sFgs$'J޶ [[z(>,Xk7Qƍ(>͘q3uYty)3gl^O3 X%/kDyBpsY'2-g#=q*`TJ,Iݺu `0pn߾4/2Y܉zնM]|\tD'Dw"3šJJL;&-4-o 3j6?z*bږAnDA#+ːs]Bًɕ9q ,`̘1?+VpM\˕Qhw͑#$ݻѩC'|!ddne@A}J*OFP2ҡ=ɭ=1k&/Þ[լ4z َ7_<8QZ>֎ΊG8㮍!Y-)))ٞk ѭ~~9J[(!eL%#G`U3ّigkW-.8D]9Νg߁qO,{(gTAiEӎBe0Sq׆9AiPy8o%J&6.iiO6@ <%-5ػw)U4G1*VDgyq+ ۇ4P@ ~} ÓcF)))(FإS )h4h4(S;ȸ@ @e\ @P@CN`5Q:}@ 8DFطoΉ@ opf&F g.@iP9mBCٴirLnݚ)#G͂o1r$/\`)P IDATw> 82nmg%sc {!qq4n(a ~z D 8fqɲl5~8"E/ƽfL/^ԩSѹ>˛}7n͞oE]ذaC~wxp]f;8đ\w@ 8޽G{oݼ @pbbEj)\"Epuu}t.0x!@f&ѭ{7x_9h4L 82n ?b)Ky&J[eh@ebܱokq)R7oqUv4O&sTս@ tsp]޽9s2+P޳g/ ,viwyn{3w? )9??0[ IG''Kƍ3ۻw/Fѭ[7Jбs'Js@`IAX9qqb  3HǞ{E@ ȟo* @ ApyFƳrm,@ vƝS @ ҟ@ q@  G4q/"@ A.8Lj@ d<xR>36O)TP/h$={vzXÓ~!"#iED6T cԩO:+|DPpbڵ;bŊR1bƝ?ǛXj^^^ ^ʂsG2m'3rHF8|}}tvQƟH"lڰ\,X}tw8&HŋN:t҉B~3{n'D?/A~~ :F9GxpvgPN7 7oBL2Ͽ3bHooLݾ}=zdm{EƏի0 Hڵ=py/Y#;W{ k~-|>sgϡ7$…ԩ#tV\沒%Ń2e*%K}uV.X 9>sy-Ejժ| G>g7wƎP:̙3^/(V]Esݷ/?-?laDi7{v;}),[Lx&X"Gd3o| :>@4nܘFgFa%-F=Iq^|ብHYO4K/2/D^dK ہ 3Σ+V2͋^tL7Vسg/Aoy^AP.|}^3,_]ҺUkNJrR2qhцxxѶM[Gn |wtԙVbuYrG=MF՘0~ʖ\r7jի2}t5\xpFA4 oJ޽IINQA_zlRb}ח›RxS/IIaǏO^"I8ڒ;0k,~?pCt=C[OINᅬ0Ave5n8*UPR2$^o-s6z~H4)= ^UyrԨQR3 Z*Ӭc-m{yw~ONjN4p[mv\1u4nߎVϭXօѣGպj*mxVlܸMiݺu@Jr {~Gd>n8?y-MF󗚫)S;1;ݽGx&mׁ:k,xKDGղ޵;5WFtڝ[$w헝8w*C'!+N&!23f|KM㧟6bDk7lcG1c+WDoгd|}}iܸ1۶nm4k Wĉ̜9UVqΝ,rBۼL{o߶8̟7s#F{n9hΝܹsu#?ic̜%6mbJL2u$?)~4h?qqqWVlٲMдi8;w&-5M7n@Z}Z˪9w1|ΝS'-wDGaڴilڴի/9!NΦML&oYeʕS;Z':w֭[-f&OLj M8RIɄ7Q7oDrrEcp`VC8qn޺9t/Fb0\ (=zcǏ q>s{2㢑7+*TeMW۷mgȐ.7cᄑBؼe3zPla+;ϔ7x0ŋJCaTB+f:_|991|8a+VÆ}NY\s/#bTTÆ?Z6u ժUpB|63==Sl?4=ztgmv}z;$΅GN۞\<|QFQz51a.D+k1cG|؏dNZr4]bŊ2w"""hּ#NCeQ&ϝ;a ;ƃq P߯q qhoŋW޴)..Sut~Gd>mTj֪I…5jTSUz.!1AY9~Gh\\3g_r#&#>'eT4H]h1Z q8~d%Gip7y&ŊС?{8yqss?(\؟ȋݻݷOOx9nnn wc,\'޾}FMKJ*EeؿoۻgysM[z{iE$.?OZ,_D$sժWSQFF z5kt9B~~=s ڴmǖ[ha7llX;|JZ^},ӑ%RvݻcmO:ÇgT\9pG1mks9)Rٳfk<ܹyw~#$<==-IHH$I-Z)Sg^f>bUϟǼs>ǐЪUkf5x )LV7CCCMm';EH}Yѡ}[֮YG> ^lEzYѷoSdInݾlyPƳ PTIJׇSREJ.E䥋4_~uuEQHIMP!*U+W(Wl#ϙu^AAAL:bŊY ߡ},]Bxx87ndȐ ƍ-[6,CPPK- K 8wI7qqӸh,?vX;)͋fmvX;aztP:Ŋ以xV8uq_PZ5Cܒ#ɋYiذ!tQ~ZCW[Z߻w֔„Ν=ٳ,?}z1sPvL5..׏?nqN@vg]9R{ͺuxobbb$*kOvC=ػ{޳"E+}A9*1p1MsGhzkz._&--'N2| =u}ņr66m$&&6nٳ['돦yQ_&EFj7c)+Nz=+WR٢L:Bu=o8heV^34kp^,p1J(ϜJhZ Cd\]%!!Ѣ6M$ wwt?upB 3"2}7oޤdɒ":0c &Oqt҅ BJJ:hԭ[?3f gd\L2Ls'(ȉ&ސ! 00re- >9۶2,˼+u+[gDgaW4i AQ>81~>3t:=t<;kg\nzuشiPt)|f'b,Z_ݝ`CLcׯֵk_o9I8`ZW)?vhh\pѸCr#e3p FJ>#~z< &RA(};!GWAXjy9W+j5i.q4.q1j]VZ"kA"{ʲFx>q5h"th̔4ZnߊʹP\(Ȳ%9v8ł9vʕxyyQN;NRR"e˔3ȲLx&?AY>v8Ŋ?%#[=}r1w6m?Ѱa\8ϾӸIcfmvT)λh~hlߺ aaj˲LP }d0!xϘ<0b7$1MoL4ɨ3:d5n:%^1h\ zŠ7$iGN)^x6 %_xJR x^OC(ϑ#G\IIIu-"&!!"$'ʍ7󯿈FԬ^˗/g_'V%i tz=SN%!!<>B]))N[e hxHŋdx *DJJ \L2QpaN>/2ZF#'N޽{ yh;-Zh裏и>| 3|$݊aaT S~hUVVjfP xٵKKD𴓏Ie܄5*d;_y@ ( A՛GϊN@ة@ <58q@ ʸ$@ dgYf*㱱\zYdٻ(˥$ tPXh[Hdž"b/?)CHX"@B-!Rv$9r%9J}5p3;;M7UUEAU[,g**d'B!nA֑ w/Q_t2jԨFBT}̛h{Cut]CtbѯOwWP(: v:=?"g8CrG9_o>cAɓ'o 9u$ƽɐ!Cx7INNbܹ`|ӦMk'wߥL2nڮ ҾC;ϛM.8SϏ3k V.Q%JڵEyѽ;v"VDгG;r|!D駟ҤI%<+pEѳ͚=?7M[֭[4h(ƠAغu]O]pߝí(/a[ ̌a=V{&J"M!B8#9%kRv-:w&-5ҥiۺ ;d2knʔ-Knᤧh<7j~~~`*Tỳ̞MN|Z^: 1ʧd]EUUw 'bE|+Gн{C!+k dKƊt=ʌ39{#GKbs̜9^{ e~~$''۞HHH੧vTt2+9JJyh{ʧΜ3E:tGТys~_I$&}lXɤI<{cl2^^^1 ,^F;l\KL=xYsf1bp(1A^AK$.9qq7gZ/11QUfN;t|ǎ-(z|}} ڕÇ繏vcMJ~/9~I{ܚ9%9 !N 4?ĉhyu[~&MǜrsB!DT29 3v?!s̍VmIAe tyL!B38p2@0lɋf=h< :B!(j @~y;;Fϟ֧RJرU}ѲEsƲc8yOOOTyB!n _Lʕ+q%~}'L`ԯ_%ym{*_'xƍiB!(nfÝg`܍x@s̶=/]45Wǟ~o^x{{DӦ_n*Vߢy3Zm-BqW1F,~tԛzT-UUǯX1OV-*:g(B6m4hm,deJ7;~ ضxeg)Y$}JڵڽeKQvmus'1UwjN:9sƬoGYwu}ftH}"V{nvo/CLٲ<<(HӦM4yRm믿[Su׭ɓ?$It{#C@}v{/^ݻSOGPƎt| #,,m6[IШq#Ǘ.]:sϞ-֮]GN?{w`ȑ#ٲum+Qu_1{;z|Gǔ$(%n ƍ 5.]}o&Mp92$$Ҹqcj֬gS~RSS bo~jg5χ'?j:U۽{7*U{G=ڥ+Lիל.<8U~1˦vzjժt}ͷԪU!!7]#{Ec|zk׮q5"W]ûѾ}{}vk׬1V7TM y4M{NK`\ weeD$.+" q **ϧS.Q&MӻW/+hʗ?y-Z^-Ϣ7R͚U-fРѿa3mۮ\I$6f`Y̞=ѣ_q|JJ lINNU6k dg9ݾ,Ż㰬3;hz̞5aÇ0{lfˏ1_|KP*4)S85s1f͚Mll,G wB8:t;W^~`v$2`<1*_d̜2X{hΒ%K8v(n}|}}߿?GuN?AdT&L5ܹ?lm57Yx_իWBÄg/// #G`g.͵W (^WU~۶$%%j*>OO?)W˗wx~՟#F0s ك;íZ~ e`<<& ;`Ϭ Iܶn:ߙrÃ;0I }C!c'W};C8+3{LyUOzC ! O?9_;o`*vɊCװm1PCzϡTp׽]:w&2+sF;Ux} 6d,M杷ݻѣGOsRQ0{e\ENfpZs1q„@7-Z2gl._Nf͚MGu|Xp!Ʋ`BZ4ond$N8j ,Xڵj:]?d\˛jr;_'rE^Ə?HHz}WXQ\&|H*?@LL 'N2>qK-(jtwgqG}Sn:ܵn={닦k蚆g?z>Ǻ~en#n{ƹshղMݧ7ׯcڴiL3fLvMPM&-[-7\v;qo9u.B3狹 :nke;!>nhGyv0붠[ٳ5 ֭вUK[Gms WD[pcIA6ewYc\uxv*UUwߥ\rf̙Uѣoܸ1&|S' )“Mg2"WOrPWERDa59xM>ib0YLb򰦚=tY5fzdTT[)nTMԐ)] =s'9|_wĩoqJ"?*RYUUAAA﹢**ʁd`s(vL: ӱSGW7E!wreT|?f9WAex`(Ū]J5MR -њ\@MNҴ/ikŚn1y뉺iV5ӢYS>WޕCgCѣ"~Ew6_fvѩB!Aq'-2B!\c3}lB!Sq1CC\ME!BHq!B!\헩B!Ÿ!fƍЍB!B8Č; B!Rܸ3F0n>B!T LE!BIq!BQDԸ1P*Y2.Bq1j<}0~ DsB![q%2e*B!BόSB!6ʆloB! 2!B!\Dq!B!\d~JVmw/B!.=ۗQ̸B!.bqݙ B!\M(3n?3r5B! CbfFx#B!Dv ?B!";0B!"; ƳF6!Bbh?iB!.`Q!BcFYqanB!_ &#wz[!Bl LE!B03.)|!BQtbAǁ7p !B0Fh`\!BTgw?B!v2v3RE)Bqu UQɿϛ((f$ B!Xa񼮦**jw?B!隆aqUUt!BqC,UU!q Z`ZэB!ЬVT$σLhfB!fL_xojLjƚqƅB!aR0nqHEQPUB!aլ)ϫ%64D0HU4Q\!B*͚yqc, ϓa+&VN7H!BUPL&.͊iV%B![hUU2l״gջ1d,SB!Ҭ֌e*3}Sӌ~U!Bq8x>r7)j8%B!kV  LEuT͊.B!]AuV CČgݙ::VMp !B-,V+W6`ft-[:V>=ε}֯6}%KdℏS$I$Aʋƚq0Dg !:4_fO=Ŋ+xvy0bvEϜ9{,Fjfbݤ0f+GNlFr/\ 00t,s+80X`t]_>SBq& ! k,M ro z !Bcs,S)!!B!G G!Bl ^Pbq!BK64:|q!Bqw)w`xѸB!?w`y&!B㺓W6X\!Bd2ʕ?w\P!BaVg !B-8{1L0o zgײ!( w竨7#( Xqq( JE!.wB܌ 'NxR<C>H޽PK%;dH!N ƍlj'l,>:u`˯J}=BN)wz̑1Nq3;50EV-h׶m[۶tȯ5}bhF&п?z:{W V~@lظ8"Wp/`h,V+5jTgİ5Gf|@zK믿иq#q"˺u2d^o|&k\h[…1LkxB; r`~TtY{-W_9ږSd_*_%_+uGhY<w1pqRJm'߮BK=/VKq.\_CUU%J{~Q.[F̱^LQ|\];Jٵq"K~\snf|k@ܥ\cWC"N^2ըQlgZ5Ν;GremKCBJ0nXBKq3xzgSޥ3"$%%1pP>{d׎سg8B%q,C'Ljj ^^^\|ٮ|N%ǮXCܹ*S(8Gѕ>w goشq3 $'ifn.]l,ZK_g<ޤ-e̙=ӧ`MrI>l]NMIo/.Ĝ9s3vekԄ w1q|pM58$IcǏƧJ+a&RS9_̙k ƍ펽pb C%It{RAwBB3 N*[45%K"2 T7Qt}kTΫc^jҸQc:wd{UKTUaO9<˔gng,ZO?BPP ڵcwԞqoŵkI|2 ]tbe 6kη/E_~XvO/zZcŇ/T oB!O=}XRdq-BK!EڅسJ)re*B!Bܨhd-c-sB!w`vLvs3/k _!BM:`r5!ͺQάyqq;tً] !B2cDzc]K , !x^ݍ!q ɓ'Yl9ЧWOʗ/vuы8ϒF{oȡCW:kӻWOm?βe+8!ҽ{7|Su]gي;EY٣;J]vn{??j֨I=)^ ! w20X{#:vha_y|FB6nL6my*223gkpY&~2^=z'%%eWdӦNٻw/?O|FR<ԓ֭߰ZW0 7}i\B1@0%?@nA9z?f֩Fdɒ~UhѲmڴmk&]#j*5={ӻgO6nڄUhܨ!#A4֬[?@rR2<V_>lܼx"/ٳXXVWư!C{@zl+nl ~w5lH=1gqrZZ~d:uD/~¢KL&ڵi\Y*amۧ'G>o{-G~ڷIF+Ζ_P~ݺQ24ݺzZz ~>nm6([b 񜟔uP\s/[bWXZ5j0`pN:]߻w7y,=}me'Nf|3[[o2mT.9]u9чڽg~$I;}B 1C1cl%%;]ԩSTXb:yaٔ4ljU$I* 'cDL^xbIgO4{I<+FϨI!11\ۃx56دAA1__~[A /}?+?`@_m>1ժ>__ztƮ={l_~e`~&D0_~89O?ogЀ*_1_t۷b뇬,$InXL ,d~m??>%¢ŋ.o1b$*۽g/M"I$V* L.?> =/Z8 /ˣPUծ|Hp Geيk۵#T];'K.V*>+?{;!>ϨQ[E}`@~k^Od@kU~e$''qffϙ˻oU+Ȕwhn x\/^$dIt`מ -IRR~G Kb0^z5~vb۩^];eCJ`Sd]=v}(vϧL: u%))! ((Ȯgcc89(Qs= ?88.?9tnd2^~%TuZ|ytkW3N/W=JZ8r)p,MlظI !S~ d yy"EwiT>G@ӭ4}1.\bõz*Q2چ.];of.'\re6}m~K. ,ZK_b%lo޼_̛3X9qSO+ة)Nj .0w<9}]ƍpb.wӨQ|35m -܅s\K%Kqd1 I$Eڴy˖`ܸ\MxKp%1+ ,ZuMX 9<+##ifqiK.2r%U>~$ȧq81+`fٮtm*U*U*e7nՂdTɤ<";a*v)[^g"1.fwի1fXV5j@ǎm-[6CU> .Snݺhy 6%ٔҮm:tho˵$"Vd;g& >JN=NN۵!-5ԔT:w^;uEK،m޽ndiƇ_ ͓O<ŋx1hV֦o^d *OryƎ͸jO?œO>n+_nN3gPxqԮŨÐB 2TnʅwC=_J)i6ydM3y(ÚjMfլ-jg4YSQUoS 6)znRC>'6ԉ㤧jFzc1hզgN^MEzi?}łxzzݗeK\ !BV\l}އٜ{~E{*橰(Ū]J5MR -њ\@MNҴ/ikŚn1y뉺iV5ӢYS>WޕCgCѣ"lUf< q[̸v뤧}5kTwqpB!(47Lofڹk7>>x{{vj!Bq8;Z?3QWfbwZsBK]-b/!B#Fe`t=Xէ+Uoބr˗.v{>cg pkpw|d,"˨ ݻ׻7K:gF]z0~$&^e˶̚vW!B8ڮѮ]{xv@.YF1__Ual֌6л{oDf?+FgaӦA4u6O?#u>x{y`XXt;&Dgaʕ,_^ͲΜ9C:uO4Wfg/ۧWO6oJ||<-ll,+>pJ2h ֓bGc֋_e/R\Y~oSN3yLԹ?ݱc1L2v[ӪeQM#̘0$ŷwOOOXL |ڵ#55???J1uL_7W^e-/we?_̳/Ys0_?ԩMBeVYSO>%ٷ+S큃w `ۛQÇcZbeTCη6]gN31{k7l sg۾oߟ͛˅ yn7$F^ϻv1c(X-[2qT{*63}`!o{1ϑƌs4fծY{Kx#x{pAj׬(N{3v͜xv [½' l~WEtԉ}1X>ǚ4ZR9\mٷ=c舑<(t~d@,Ybի_[_A޽ "0(}zǪj">>Ja˾߾ٶM!=fOO|||XO_~~}LPp0~wEp,N$I\r&y ˋV-[ ߣGme 51Q_5>p(~ ٓvd}5kps[y 藩[˿ג$"ę}܁fuônՒM_oa$''k:#II'!+wOnL%K~eɪiĜ8AŊٳw/KWDV*e0bV>jK~ Ju4{i~gbjHm\E&WnpQJp|}}lSj5>._N?}!΂p)lٲwzS^BaE5קwopzf۞AY~9%ikN>ͧS٤I( ^ fy%vfBgu}gLX_; Q`!'Xt16ld /O0_?/dF# T(mʸKڶmډ=BBqQʛLC򋄄$9fzfbX.>>˗xRFd#￧O^|m+ZBU}۵{վ~y9?~Wl޲ϴ*WW3%49֭Y?Ⱦ,ʓM:s] y(-UnƬsy~i<|Oj՝Ͽط7ߤdHHn뤰8/-gޭ篝h ]G>yN MXfM8aYEzz*yp, 7M7)׿@ٿ笰Y?k}f~>!,]a{㕗'ɜ4o֔/,0 ){Ι+eaΙk]Q $4|ϯLϻ;pn*7/}=u W~Yol۾А} a卼-5eӏ?ҿO"@f:&>$Wgnߐ_y  b0Y ~ṧ"$8H)?3~0WC?īS3lCEz<3ly'ڮ'Əg݆ _qqsw>9~a͟Hń7n ι8Ͽ<ݪ1qʗsVu8RT@}˳v={$F3Oʯi:ow_rmy|HKK3 Jw=-WYu_`^r]a4l؀+VРޤ lNc۶_;};:L]ѿRyvAA$]Ӎy/OO0&P## Gn^H/Ǚ}Μ]9+Zfr&ٗ#G_}.#!0Wlh}(Gp Kfh֬)`f[ڶmÊW<}<ZBB"a*8LHHȕ}.܋VUE,G2/_ǀugϲv>SͰQ)Hx :$%]я9ЃN "!1 B~u>ȹc(=u!>sƏ}իʿc.*UHʕݗ7))Z󒜒MA-&LǏ<7E-\pO?O\r._}0iϠYԯW77jȂ(t`_#ZqQ7Cq9"n :,Z'N ^^dddLQ\oEy [7Sl\eC˲b*V|5Ay}-Z0w||}(>l13__r)WV/x\7`Ο@*8w!Vr˞~yˆ:H( UTaİ<̳i>333ٲ:\/\i3?<==smwm} پc'ыOPR׬]GJ*5 'Z-+ԩUa')ZPR0Ək^~:<ݷ!\9\;?&9+ɬ9>40??_RRR;qϞ9+VGJQqM~9rժV\x_-u˖B:y{t~}/Bvms^Νcߋ^C^7޽{:MDFǐ@BB1sw{ZD^}N|bh>}s>L7^Ξ[c.$%i.^dԯW}m߱:ujV au[ vt-Zsn[P9EQ,ZI/@ڵk^_vmڰl .\ȅYbڶq92uҙ_.äΡÇtɥs]r_{KAVBYӬiS-ͽ( s7FӼiSE!%%Xu?##'O7of7}/>\ϗ;QkTg+3W>gi׮q{BGn]q/lnbCSNmݸ!4swzɶ\vmޙ1 8u =ue޽ @U`Kۧ1KʫSJ}{JݛQ18L&^ݻo~#kΨ TTAI_7q\>|i__@FF!A4o֔cxڹcGV^M{͕;YDll,Q}}ƯcKxzz9ء=Ο)th–݇1@Ŋݽmr:k;/<;ѵ G;{{Gnd?+tnЃԯr2툚ZS2|3~cF5y*jP&g9qe{_é\Y(] Nd0rbNϿkY]!DYv->󶱼V__@J.]QӠ~=zYU)U׬5y[Mug/[f(K|˸n/1K0-tClSL39u!L/1B>v#qڻ?w'wD1r`ҩ#]:udۯ2wB-䑈t>>Lfgb K/:}B[UBC{[֭u\i G͙|0#֬[O@@{n][B!D6xq[uVص/,d^d$5W̙3xg~bB!(9&/ Cܴn6B!s`\ڛ¹вh_[HK(*#EU q@47??7~Jb⮒n}D !D7}?5L'LY=TTd`RLIUQU-+*&UǤ*x**u;LXUպlRdWm(r4MGX4yMl,P0k MǢ)Xt :`ѬMǂ};H7k\No>R'^^^2ntF+Dq`{!D}N*Dg ]@tL*x(5VlA-VPTUZVU[IQPT۶5vlk5duMfMٶuf]7yX4yu "h7l!OOO׫];ѸQ#̻uY\Bfѭb Pm~M4T@hقnEATMì`Z籶+k}[ 5ڇ\]㲥ٺ{xCeB}=f )[{ws'ӐoYzlh(Gâe+@j׺ͨ`m~Һ]nul&2j;vĤ~/]fxQ`͚\rի1QTZظ8.[CX,4nԈ 000[ i:׮7C1gyɼΛ[] &߷>.A[GY_ѱ6ek֨]b頠A}޺Jּ}5Z2+ {0m^w{m#t]3u*z$̗IߟcN5kTXvngm\tu:ыluY+ڷkCŊUp'ro(O0.6/s.ԬQ=smj\tfgg~^"l[W_ Y3b=(f+bgùʯ|dҋ/Z5CH[wo,5`L]׳aC˲`<fc\0u4;ui֯@ٲ9z:_,۶ =#ڵƣs3roHM0ˀL?60a$qqsםw@>Fk9d_~s!88Æ#  {YHct#'0p@^ʱ}~=6SOR|y i2d0]vGn0LX,~'^:JۺR!n% \+b6d ڵt.~CXF޺b/{㼢C0_UHB-,|~ ={̓Яw> K|{?O0l@jתud{Emq>> ׏:gϞe |ɧ<ӹ'&&f b#x{yǏx2N+UJ*7Zlɮݻ[eC‘n1GUwlEYԫL/ 밦F7]X<gNS_}-]яPn^53OSGʗ+Ǘ Կ/_^O?YTG(`\QUtL# UTbİ<5yϏu>88SRE.\8琞{q?y8|}IIMe܄']1lh(?7򶯂swڅ^Eww1r\!n`VQ-ȋWuX3CWEV߮^g|7sǟ7ҥx? oXroKӭq`iWoižf`|z {wԱ# 'ߟ֮_OuϏm֭YGF!=|uŋ,^Եsu>7CQBgcYv-~]޸ ыqPz ym bPˇb?J2)ebgQP0g/Cԡ_9·uֽŚ=VL\\,u6;k]rejL|r1B$bYNy*m(xATUEhk!7ҷo6ny App͛6eϏm>a+S0*]:wfN:QD,f֜  g[Hҵ32s,_HJؿöݺva<3]V !tRmM! C*- -2Wlc,۟iY*붰[>l! e#bXpt]GYb5o @@*tOHp>g[[E15-ց`=zJ('ӎe</7CUL&KC TLtOzf]W㧪>f4_>JK 5)znRMtzٓ'HU 3gi۾=gN_Y:}f}"(B+V98Pa 1³ܣyTxЏd2<,6ڗ5m|e|k )tw›\ɽŘ-Νݹ[JeOTRɔ+ۛUZ\eEhѕxK5$Kr55EҼZxdx(ZeK䝩'Ŭ[̖T/aI^ԫE;li>[VBpqZBDa,ZB4^[s)0Yo֖q[l=(۞ik9WU{pnMS쏽M<ПOz5tr{U>XT57قלּ;IUe8B1i.[4htMtնlʖfMWet[h_5%xiI⧪ f)K;ӵsgǕr.p+jE`4i k&L56i &:)56nbom9S\W˸E>b4MAU,f uknVk>{@EQѰ6ko93(EAB;]P/ qMbBժU'[\|"ʅa&lA}RW[vڶۗUZ]#liu XE߶s #m(/:IܥD*75NuM>wE,tS) UE,eB!5%.zGv48,ڭHL*=T^Af"&O4iB5I$Y4M/ LŢBMӰdf0r@F{yEK](u4M### h|k+T㊢غhٞ!"8wL1D!Y\oTJR.Bqkn*%e\4SB!-AXe( ƶwS^*B!] LiK~0^bX4e$B! :łIn*N1huDY]DžB!n MC1`VB!7 >--x-ުݢB!UivO-IJu7EQ0LX⮊B!,f3&qJu0@ɴX0gʣB!ܕ&A8I0n6QLTY ?⮎B!AR8s$ٌGeKb6cuԫOB$^IB!77u}(f3RRMu\JFMx̌⮒B!2҉tj5jg͔T4+W@\!?W$i{:hKqWE!BDnƁ%>/ݧW!B>$jB!LoBqɐ#B!rpqVQ >]W !܅J~0r"( Jʽȱ1Q BVy%?wU?B[A"Mlڴ.Q64.:ѥKgT5;XbcÀx_#}÷ -1t>> ep|L5ٗ]}=׫pEV̨֭[4K!nqnޅ#{ƍXEg,[QQ(t+~ 4c,]'Nl!I tL&k\ !JRrr`p!^Jܹ8.'^&44ˉ(jlS.4.pTkf}ąynD5 ǜɨGDž]O{B 馢(2$L7t/jڥd vzthѽQ_"9*1t%9˖*700[?W+L2]M˸4!J!s?X'&j!zDu6o?H >.]]PL /Mׇ&eHxӧQ=ϠY|%OO|(;;{>Ws !(kB׍=zJ('ӎe</7CUL&KC TLtOzf]W㧪>f4_>JK 5)znRMpjPdddF̿Sp>ςB!(U*Vb7Rxzn_RժL=W}b.Zt%ޒkie -ɒ\@MMѴ4oejfŒi6ygIe1%ˬeX,W2>ug/[f(npqiB!56 !BQ\&q!BQڔ`0[q!BE/a)]%TB!D6 !BQڸMx)B!BnK8.B!J ƥǸB!(mϸB!mZƥB!(m#W5CGD!B7׺G0\p5kr1o҄!"L#Oˬkk PV-uJfM:2T M3|P\JibY1 ȵ"B}q~&6lIUXw̞3_z ^:Z =KrHȑ|wF0AlBB1,d¸q. !BM0.{t5fs=<4hˋ-ӢEssh !bHBWlf%};wn͐a4- +Wb-ٽqq,]bXhܨ1E`` lVhFF=ld<5k| 5WgjժB!J|0e+%+WHHHfR~Zz:}F fϞ$UP!BB(JXx2l߾o~0no .S&iSrReCBUmyZ&Mp4gzNymf"!D}!Y⟷leSOaC} c?^A>*8Yd 8Irr2 8._!  A!r??_ Hvm]3|{.=rJ ?Q;1_?#AAQ||P>pzF``>3gr6|Ϥ$&OyKҳo( eiԨ?Dhhh<#(~ wO^qɛZO>޽{QBYn=600`@Nb}/WLx wa+}7 hFEqݭڵa~d$M_\ňVt||K,^ء@NǞJNRPyջ]kBug<[,[O>瞝X`>ࡇIKKcђo֥Gxpt%hQ 6XGGF`6[xX0l}vFhoJӉc-^{u ˕˕o؈\3g٧_ѹ},Y>7͛3{ƞ%L0͚5eccsSlY*+V䭷$|}iP>^Rp_k ð[j.o>,^+S^UV=HOKgoN=h>Aуv}zdIII1FP^8Kе&Dqyyoo yǟzxX^zrwmw>:zޣE?oM@"FÙh6+oM59~~,_qc8?3g#3gמ}֛,Y7(gJg^a0q[<>~,/MCY̨d%%]o7 2ɓ^t'B? o=&--QѬZ˗Қ5k+ 8?mBP ЇO{BfD,♧vv^:tׅkݻCrzoXn3?ƍ54j԰~?3M73%3kO#ԩSLCa#&z|u (C7g\RAao3 *:W n24kVd21^Ͽ bcgMB|C%Lz۷kKTL W$qJQ1odbcc[O?ٳX,.]h԰A|)񤤤Y}:= =qȨ~y3wϙYfӧOc6[8s,~>V~pd_WY~5UsBmenNEgҩ#]:uG,hƂ?#9% md? O0gx ?/CGFqݺۙ5ceUkVGhhY?Їvmۺ~oTБu<u-Lrxw矧ix”QPuIҹ$%KS}|Ю/^I4ۛ7gƽ:8D0e}Dhт}lռYS=6iƍ餤Pn=})*WPְ( ^T +Opz}e:>nYcvwuםwǟr66Piݚ~3,gԯ[ :˞Ndr`f䋹,1p`Cz:'Oc4kSh1QiFu7s6))~mOUhٲ%i:_ZeٻKG[W._f5mƥtvҲ> *Oii=sY?:!KR,Z{c@~ iZ~ٷ&YjyZ,g۷kCvmr-L˛=O^Yp&zB;? #ǗGG"rV3kO˪5뮯';vvܑ54-Ϫk1ƍ&|cFttصk7-2]OΎ?=-'Ə --(0Co_4j̨ٴ~M$N#qL2TMM0( ܳ oܘU*$?qT|5Wg·P^]#fs\Oarj4Mc <>s 繏O8QekӖW=ƺ)Y~RjUׯ~2 ʟթSqq7I&w>x=VrI& 7 o^}u4M^:|޻;d'N8g<=##WMb\s}4nDвcʕ-GF ިvڕ+VWTU behZuV3[n={ٺ"/C!(M0ߠ+VKu8鯾::CܹsF^դ뛫n'O&9%wܳ?1ቓ'wTWy:Av;C?^Gj*ߢE3زmKW'&f~CGF09?k*Ύ#TT1J?'s`F`ɲraT5|Tz>"98xT.]NYQN6O>ыkQZ5ΛKժUs=Ч7 Fo~38<}>ץNa,ݕ2>zy`1j}|yn3 5nȖؗ)J+WQкxYz fSOr15 g,&9ʕ+Gzs.*nԺ6.]2sUZ5F氮ͽ`azt+t'grJ]FRB!K$ݿݻv@dќ9;2y 2K\h^~gv]`qC̩AFֹ.LYW#BS]F[ǟ΢i:9?gպv[M~W4mk?&}z3n8#%*f!_{ wbnQ]w޶>feq !B@)]WԹstMOOOf3VS{$8ABBbTUeYA[leֹfLJURҡC{|=f39bd2q !BmqE&5M豣_z̋ƌ%==Ŷ[NCyyCHhY6hLRRdϞ=k\M&33㺏O!B,n_=sY_ȅpiixx̤f͚(UTdR1<0*IŤPM*a2u;1QC*ULlY8>rDh׮AAelC*" $s91j?ˆB!(&N*MÛЪUK?.ɓ٣'ի׸a BCBQ:5kTFuT^],BQʹM0~mOEIMI&5%Kk=<=t|Gxx8͛7Yfjò+/O棏[oӏ?\ ===4=y]6n !B6xQ632QuuJ*Y[񳵤{dUAy);Цm[~{64(/Oը^:ը^3g2֯Oo"&z⮆B!D>xb ĝ))\dco~f-%%],[t(L*Ur}.cNZ7ܑ! BҪ5 ߈={jj='W1'㏓gyO9zٷߘU5S|j|||]wBfM?L›3l)Y]#>!OOO׫];ӸQ<˾#&*G`~I@!7]JA0ѥO[lkZEK9e+➻Au^^hޜ͛;6#FIƺC 0 [u˖ɖf6Yd)nݭ[3m4baUl޺4Cc8tBF=j ikJn*=,ay8krjVGFQjBi!BQ ]S~gab# d2ѨAs#-5ٌ7 d:<32fgcck_'Lٳvm\Ӷ5lP/#G(Æ^g0cTfLS'z#}ͺu:7_㍴?Kz}f>!!,Y ϳxAegL'ͦYӦ̝(BQܦeTf4j؀:3y`Zy5jZco,6yzP붚g>&9˓ZoCNlؿsY֮?ṉOS 3+T#!!XB0yq-YƉ'INN5 TXRnB%Di>T7 -}hMMII'V3#ꓓrnLxY٧q o柷:Oq>j<cά32NSPR # Сym!?wX>wl3sqgG{wan IDAT|lQ*rdU#GCtiOqˍ87E/Xd&7> VZ5}k>>ހ{ _צs)#_ڵsm{j1Q}qxWśӧr{fUm,^̙dddU;l߱W`X8".sM3nMdt4dz0:[2۶mÂ(Ο@rr2Qыt||K̝7a9{e !n.?6~CqWC!J,7r;6n؈S2etRSSif~ڼ͚q_vԩSx))b?p1})Ӧr{]re1uk~]._Iח1uQ_nF-XHFF!4k֔qc滝=>}Xd S^@V-ۧޫG23ۤGbb9{Aރ]w{`3HII1޸ke}i\aTDMNƍ\RT> v(H{tUս/sG$@PPR,o[[oOr=m=h;V*Thmj1N[;S|RGZd'<$3fg\B;?a%s:mzUyQ455a1>c{~>A-\|).7GN9 ܠ cSO%i{__N<\h!D8֬80s #]͝<f$қmjL]Uek\|ƸgbX6DL`&#Hh [cfzg^-smz]=(–mgwwaۼ ߻vd2v<裘?~9^*Q,\X^kY/ι>c?_\r]?GM>u=ۗµXwvڅ>8^vYwKpꊥ܋L ?p Xxjӆ'\~ƒVc1X0bc?|s3b)TwJuSOcS z/q4:nxY)i%6TH:IPB #%BmS>RT!|;M ck_s6 ~pQ~֣ <籨ugr0XZlŮW?K\(zQc#jPW[E n% 9^ cT(,bKg{>?qso*U *Sy;T|S?3%6:ؼ]{+8dD5}:Ay'0~ܸ"ΚhԧpsLOZ[[0aBĉ;vAky'cQX؈c5㻏c3qa_+---=!W9a~%_˸[7\%$"͌:mW_y%n|ӲںZ4oێɓ'mnoS/|?Opm?b1da] P0~?_DvM뾄 zuuu{c[ z唩w%]ŨQN#}>rg>g64fsfc;z~3}̙I&aM7cM7ɓ9s(woW\} 1|ʫ}-ӟpg?o|[5¹9cnXvz2Llht@>vMgyN8x۱q)r4Lް 7, fV!*L~Kwὶ#>o^Oȸ=_‡N>91{_z1c r ǰxa#/lO4ο{pj3k&=_8֪VV=z՘ut|p|҉ysqߊ}[l3S?k+W\QS9yʥ؊*CɯZ{tZx&b)I̙}.G,'yw773W_d>O}}_#?ބ,>[zuJTN̎syQlmڊ{Xk?!3U@DDr8xshRpAT q}}mZɩ:/ uݽ5W=~{Vĥ,¬gKLt9 TQ_B>L<))>ciT'7>U몪$mϿ0/2ҙ ?ӏ;Yxxݶ;v oH<7}^k6E:GX;}C=g666666mrV+e-x@C%O?1W_k{{p|ذi?D2q}6nX T=/Š+1{9]Ըwy6> xZr=pѼ/"N>Z_n8g3`_mj`gLVzMKl` ϺL,P1ƀ( ldr1maklҌuq[֫㗍M]݄Q-ۂ> ԯ{<_W^Ʋr8RBDDD96|iL=b*bAx$ӾjwS&hëuk!A Z%IqK2oEhULgaxylAp0^w ؐMlmHDDDDT*feE*DDDDԝAB08NDDDDb¸a8ү7UYgf'"""rS1aQ0\'"""R5DDDDDW?$ʼnܔ|,cX3NDDDDb8kƉܰfH*geU*DDDDTf2NDDDDT$2Κq""""*3\'""""*XԚ76$"""ʠp+DDDDDER+S?uS9aYLńqFDDDDTfX3NDDDDT$e2nc\=""""!9̕u71@YBDDDt0Ɣ}rYqB$hTvq->:c`@o6 ?8б20NDDDtю0^J?VDDa5P8CU`m/V@$""": ,eƍPQ3^ :kƙƉP![ӹ2^DDDD4x,S)]v*DDDD۹20NDDDtPn*% Z?T=a/::wS$""":H+0^W`w"""" @EX⅗^|褓1S"cƧ S; -ɓկX){p1{n<|3xsf|עz(|]cl؈Mγ~߸3'?oz _Q3z4ů5u_T/~+ƛEuu~Qh}*a@ۗ{FDDDDsP<yE]]\tQ֡uvލz\zɢ|s_ &`Tu5.7krc^,8?n> > .Ƅ0>i+[o:߾3""""reǏϿnh{?ē1z_4 hii]zZc俎Ȇw؉nz1[o:߾3""""2b8C۶mS**ϛm@}]븻[;`mkǵ_Ə{?s{}gDDDD%AK#2S>t2^c]{sn dO)X#ضm;n9䓱ѵhiiAKK ֬]|Ґ]i<*4m';{Fܧ=#"""9(Wϟ}.~tnVXpYg^,k9v܉C9W\vYB&]d31=n7't"Ο}]8 Xyض}8^phs}YwTA΁η/g`換;yI0o7Ԙָ Lqu1Hm &MF*&Xh:;.lv.*[<Ǹ FuvfNI.мE҉H@ JF.jzȧd}WuJrmxn-$?1\Se*_CDDDD%\cɇqS """2_)+0.نJ2 -HDDDDFƇp]ذJ)g# ղ(w.0^?Q)E2/YaDDDD/(DDDD?2>XBDDDDL,VƃbO` iu$+Te= xT UjcI ;JC@:QpjU^jvPuHDDDDmWdTC56Bl˝NTF DjcI |U.&V]W:M Q+=& N T@U54/#G H:v+1tDDDDtj?BHG^E%4F5A.xir|ۙwgec-{O6wQA":+;5!2FNLVM LJa{뫎fװ%mb%""""*e6ۆ-< )I)'&k"L3( O\^A";,VcHjfB4t~/1Fš=jjUBջd  NTBa̺l#g4M0wjLl(KDDDD˨40{=>2Q8L6. NTĨlL$x\KBUq TVU$cDS-] 0M>ס}s&T}xVբZ5fTfZIz+E*"YIH50-41#RQqj% #ӮHbAVz0R6EӪL PԋhkZk4z_5F_:3I3mf<&qCR #F0+>D*!42 X")ZZx *pK""""WDjl* 5e#MC$E6#T̺ȫDF4 Dx۱2VuVU%Wb{Vm݌I3 g~ՏJ_ΝURs4Mb)DhKKLZ*F\<>k#Ĭ( a0)E D>&TbƔDDDDT\M8LV,2Qd3EYb7l' ^ jTSV%QRW'*-xÛUn?9$e3f@18TͪqHT$uUjcdgX EV$ LN"0NDDDDx4˕B#E4⢸H6zU0}V%r+@C}^%*uՋq`(k;KUZm[s*5fv'b-XU #Z8:@"N#ۘfū MS5V@ """\r(4jq/. YAK&C"TgTAyGGJr6=KTnu}T6EumVcTQ3FdT";YX `HCԫ;>&+lLa8 @b ĉ|\rAzhb(k5=*ZpOnU|.ц6 Pw/U-j3)fkڝH&^bC-A&@(LF4&P 1F&WbqeMPU@Ĩ##(zHטzJ]U\nU<IUCBD80Ǯ*@Ox$Y8cRkU ՚(TELB]$5p.M#Fܶ6QjE#Էz aJED*PQ%658UkFkU|vQ~ @0~a^ Ӽ f$қmjLd- lXgZUk`1L`ce`Sc# `%2F-?DDDD4@GK lLQI@=z@EE|&&I[<+UC&UMС*QLe@H  "bU챈q587KgƌqgBol<#a  (sqX/jCI&v80!asRGBbKGD pHYs B(xtIME Z IDATxweu[ksn{7`7"ɬ%ZJHɦd%?EI%RϦŏh* XeQ, !6fz){>)*>ܹ^~gѥ;HnQ$ؔ;%.`ϤήѷWGNl}j:?߫fkZY|,BbSgDur=R2"\>ǰbh?&]qٛrvnmciq^@HVAB2yl29/`Oy=h{\~ @Dݒ&&'2eܵogSݺ:nd;j=ά/Kci{lF`YER{G/^813'_'{n5–sy_^tz{?](*{ťQ7q}y+b !(%"@`~d~Ńsx%_v_ŭZg'l M<{i;yIGTzUGOLPX A{fYH]7]]ǥ%awl~nzW,Nw{'XovOtxkg>_D\1z;o:='v4:(&0EM0_unt1-><޷}CƍF0D).rA vqmJ#ur,Gl~ 0 7` ˟ȇ֧qwɂ@ҸEv (0 Mi|ۗƧ=zP2wff@Qh"w?{<]s4Eɏ߽ȵ7o\h@CHIB:_X&y%[,`Ϭ-*b23%!d5}xv|lU!h4}PNQ5<[d7/Ю-yW|l^PSY[B\ sJ%xھKHZZ}Wgeʈ3;pBs7o]ݵ<)©{-F>K^&܅y .>HPJ`T/٬yuny@N.>Ƴٖ@ m*> 4Q; FZtd{1f+7ZK 䢔"@Ad!2э}<`i@ B%wv,88Lg[(>c08\|E'58h!h+QF3(Dj_+ݶXZ|{ʇp97|LRĥWĶ,\ C`\T(8>nխɏ` j1 OGu`L$W {ؗMj,=p(>Uy(q5%q/ CWvg~j^rM%%+8ϩF\7,=K/zz+u1g #^U"֢qa尵c[糗,0 O Joqܽqb_r)k!Z]V \}xe.BO6'FI2<2ܮCa*SmZlgzGj|FRC9ǴʧP}5$^]R $[2{P.9ጡD 4LPbK琄h9x&~*@O:<*pp"ײ&,1y ^ْc^(bh^ Ez{iU7,8Skh+Z=hZv RM$*F"3 Iy Ύg&!ȣ$+s-s)1y"BDݹĤA0b@\|&$ rEg-,!C\?N7{ `O AjOeୈieWa2QIBppD@B0 ,HM$s݇d 5Yŵ K5D(Z'bd\9YtaN&( a+(_]ǁ==}e5mncn) ܿ,Q8;Mq T,|,yaE٦#K$ BS9G`4C)(0o}zeDvbQPBY$|agNݷ6n-PÑ%U"ǁ'W_mi=>>vv$ŶK!8tE+ zo$  / /~W[SA*7V!{H8Y ^`]4)/}٥,S*!s G/X|0=ӋfoD%qּ@~xkC΢F 53Y ۈ/=F_6f^JJ 0ȥA(J|;B"W" Q1OIտɶպnAΘL#r` ! Y=q+tT{z2?% :|rQ:Dk0!komg]%heCw Hy8o7m, .RmI2ȿ@ x x1:ԙ!OȾrsT߲+={jJ `H#|'r7E Nm] `FzcHKSl8baуH=W^r@$f_ t>CM-․}m}t!jL:evx^!лUF$GF÷5<^@ːMi.GȨ"D>R[>mxB Ģa5Qdr|sSKhL hMkD@ض ׍mѰO~B9G`PRq˘@[GDAk(x}CI D1 I M5IiP^{!ՅrV U=  J$`y|>Bn0}T*zT!9X̼ãݑ4;Rߩd vAN=ap؊ȓB=ƩeAURÌm1 A |뮏aD8$(bF/ccBq+ YXa0( * Y_~YҥK@G,`Kpn̩F@; ܳ.۩축!ÛiL柫A H9 \<)?KY/`%YS_iIB/ Ay`HTt5ݴ3>x,$S6Pl8%FzH]$dP4k\d/l%tA!G\JKT%WD S0hhz㱣@ RZ z E⺍ź&Pl$<˧RH[}.q=Wމ5qOeI\ 7@I>baC!YycSCJp `Eh5|ɥJTP_PaG53䣈y|@$/ Tq*qE}&L ۧ]Φ聩)jHyE^Jp)ŁNFm8,@XD7fpl~>>@y&b rB5B =s>Bځͫ ,  ¿NN5F$:c5JMkwhgÇJЩ R?⚅kq/i+SYѭ eoIWՐ9wyI;㇨j]ee$p4SaX_9"ɂ}=2&E hmB+UӠ"j'9 X%m!`<)ĕ`=;/s]|D{&P L˫0 @a8@`h.(Q d4yW14 U.`X0-`W4o+yGwz G8,'p vb (OԔ)2$-`W֩Owd= df)¨K(ziIV>D쉁6ӯy"}9JNߥ+]@`P{Of4fDnJ3 x.*l)'C_(4WjF"Pb/@ADZjNjUA J@ylU\_[38}uw<\َT3P#TBs5{8t.iMf5:Y xV(`*NR(KMzAW@XO[;墚^Wa.l=#D  _ZyW+`ݺ>?"[xB)R/i&fC-nE칎Ic5fTv]?( T^Y)GhHʣ]v[}.GKg[ %GlQT͑7"&z䉞B ).(.BD5-5y^ܙ !ǛS~TM\J*LT\Y@TJb?9=&5QWRuv_pɇ7.<MOeMz!BMF4-ZQV>{vRdj'Nhz8r4v ~L%?K%R{hWN/]l,)C( !%T7坋ZR];iq|u,2(P 9H]zp߇fT2+i;7Hȉ|#HA)>Y_9Y+ÇrL3۲qv^/FsMݼP| !Ɇa*(D:=>tw`h,)TPU~; } ~iTڭeXN[(5ϫE'r|L RTӆ9[h!Nh0\0皓[` XE =J լ/;Ch.d_qZhOGds(ل7`ٳc cfMD"d#cA+O j6!3_.McOpA@5j.-u_XN0`MM7,Jezz[~^-)+m`.Ai,@G=Il#Y5phi3TMf]5L0z5UXA0E@AݫBl҆)`9S1g6GAb\<$=֞==3pE\ JnhU=ڟ,O)j#07/.x<=bn$L\ /QҀJ/DbٜPSC"*&!lm,}eShG($Ui8USC13ASYG66A4*2%rb;T&]r֍;BDzo7Qz3s=VGv\l`J2pzBK8*0'k!`\8ȥEa1 2a?L3.~|ဆN3cj:EAŅV eH jv9~@$LJ: tLRِx=$툜;Ȯ95&e>Z@} zqgW&t1HR7gۋ@M:WI[/6TިႹC-uآիG8ʷsX(I:Cª E* B f/D""D^mZ6)esnlkJz4aT^`G}VU ]s7һ{g.yUy@ax:́H.d/2`Η'bt6AhUѵI~ΜOvTR0xTDq<^- ==;A\i KE $ADԣ6)?[;_<'գ_PC!>Ц ;݄) [iUaT$@~jWX.&TxM:gRE 6셚6}o} 輨.@ _ڞN[<rmyG R5ADދ.,G A" );:Xv]~G$h2(J'jD,T:J. zXziD^}PӭT3@vhFvCϿ쯐t8Ξz&|õO(+*+1$_f%uxʼ;UƗz+*؅-6sWGFVlJ5 Pĥz!kH4ޗxԎp),ayB`m陁+QV`0j';ajb@F(D8yuli16ADdA[8S_Tڔ)m~pHtQ{vKtyEDGCܼPxoGw⌕ =oFEA.%Ի-?ݴ~Cv|aR,\+ج!=޹ޮ{K *Rnvye(zVHodz"nmBZ'5}vQŎܵYHdTKZ+ѓUHk4[N@ߏ3d[ =~'óHY)''ĀC [Wޞ<:x`Vaʇ0hM?|c̲n +"UC]Yҟ j9>uP4Pb2{,Bd+ʚoPEVtI{Suyhke!HU0,TJًᫀ-^j>ht_K8Z+JBd92+ʌ=0S\GlF$ JI;%"dvYO&>h.TBQTSB7("@_>m7{YGˆ]fQ]nξN"w`;!? ;#@IF $7OGAPp*#*nO BƥSJ9 IDAT>'S^:@ОXm[-e\ 7G۵S"hg|DA*t~p#ߵwB ;].7QtBV}3_϶!UOQ߰fjqb┮jw+9*0F.{ϓEUJ VMIDYpp g$}d7dz·mꁱ墭E%UQԭS8%ayt`أP\wp){ݒw$k:_|vѪz3J4~GMDX78(O`+=yb7$(J8JC &B?]@[A:Vy0ss ;VbiKe:.)-cWlD5E\wz~CRy&x({5}W9K_~~vb*ȨreY!Ұg\>xV ]tw,jkSbaj(Oʧ#c OTB;ae7h羙_o;z5sO(SOf/yL*؅T;䉁7Gw}x MܡEV^k*JwFq߸1l8Z|ˁ?M/n}G"\=9>!IPPz55"3sJ[XV9pzK㿮wnm1Deؽ?Qdߖ>4 שa>z2ˀ#TэлgEL T~b߼<|'? 5'7w\g6OF3>ڍKUN3W'tϏ^ʾgUoڱ!.~ec0V-( d5sebTҁʈWQ$Fn'~Q$S+C$<`"{];%Tkt;R1*]ؾwԯ^}5TX\r9ΞmIZ_07 M:V YCQ=}|x1}p귭8>bni#'\-Fœ8d sxm|N_ϭe[Ҫ g #z|U!wF$+en%o}sSv)>wFHK1FZ)t6N}{ޱ뾕 )!Wvf3#ǣ[y E^`Wk1Ł_;?_ӾILwBYpJџiעYT — Rߎѵ ?57J($̥/ }egԯQߍtW}buie.dP\̭U],ȌK4K}ǹno<(Q=Zl̳(5Dze SJwрOU&Ḅ&ca'ΕfS/7O6_"!d2'!yp_ߺܼ@P'KT$gnW+9WSɓC'>YSwVZd)䛣/w<&{>ryr6޽-֗.n~ʟ噅6:ja:{tx?nڍ3ɼMU>I%-f셁d嵛[vw-,PO'zWf/ÅVO#7s``B-j'cJWlSx#;U WìF{7~6:ڮ" Z1\;rzɅ}~lu^Moһmst:-7dr'2V~vP7K|!;/T"&dž3j,'FI#G?w߭u~YAS+{;8K?P)"ynGGEM7\}o4Լs.nPYoN./~{??c]u+@Ñ?_* 匆2:lOٺ/ GwU1Yӵ  5[*7 G2N@z~LMqtEI'{v9>߻wT3V3Y.ܟg|v;~XH|{h_@P'b']AR=2NrJzt}z^cu9zyf}s{t 65nH mUPң!OO6.7l^ÃTTNRH!?Ժj}Xv 8'v[e__־S%!N@vC!}fgXrD~[I`ףo.԰mx{4|UݲىZ\m-<]#f- dDm0yB~80lv5jkt_g7˿_۽nG_zݴyP%kiWg؝*RNz ˺N.njw*Ҁd_ᱬ8),E޽cǶ>y/)vlx礣[;W d"!mʞxܼWow#Y.Ő1e5Wk \g_7KXƢ`!=*TU="ȮF'eKGjw6}ug{ƑM-<߭XdzO,7pvIe@(1rڔktT^d/B+tv5NinC[EvQ n@\(<,,%KQNm獲ϟה\eWZjy2QIaUaK(OX8fbRPB)EmOg/ |zD_rB2>W|HM%[nOҢXtH(P#1LRЃ\ڂW822f1Z#3Ko}i N,8s_nywz&9C8eC*N:pA E#pbhlՖZl7OO._IjIcr{K[_y DW2,vMT$(lTEcA3=|Y_ֽ>j,;#aJIFd;@ ) MVJXs~cә[#V?-T25 hR'0G.d%6X]9ø/T0ڻ Sg!tIaۺ1`͝I UVѤ d qN|>Dțɾ\` nhZgk}ևg@r  ^N+;/o@:m~\|,nE9gH&/)|GT>| 97wh'=w|@-]@_  tF~Y|r~w@ QeЗs/tIENDB`modem-manager-gui-0.0.17.1/help/C/figures/startup-window.png0000644000175000017500000015637112275670236022217 0ustar alexalexPNG  IHDR_uتsBIT|d pHYs+ IDATx}gŵ ZI + %d A 6Ɂl ~Dh6 d$*K ]U=a#ԭwj{9HO 76BxO BJ|+((((((((tz8yDBOEy ~e,7 }'" /,X标Dy \/ pGtV(_5_p0tRQ?R.t0fQ}BW E/'Pb\AAAAAAAA:,\C'$ʻGGxI|_1`$ǧ}b%bi?#&q+K\*ʻAw I %{# 5!:cbG7G>q~!ΆE_mHfV6P%b!9q,|N7|U0wrw;y \eK"<\ (mR"\AAAAAAAA:$3!8$3{&Dydy!>aI{KɄmH&JJ<$,Q\AAAAAAAA"t9D0Od<-r'S.ϛGL,yw \/KqgK"}N1A ip q+DB8wDsgs\sޑ$7fom1Ge+uQf~ IS>AsiJyDxҦ4  i+W*((((((((l(Iɹ-;&xNc$3 %3',:7mGwu\9aBN[vJB@) vPI'@!i`WPPPPPPPPny';Nr˃rF4pJAv;5F&m3Lp>I@I;KOȄMguڞhh"!AH"`)Bme:!IH*3J+(((((((()fZQs[lέ,g&,s઼֙aϛcm!醙1P[ra^WU pwщSӾ*`lf\bsj@MC6 N Y%voqqy}Dy">Jh"NH}A\.S<VWo/VH!%7L KWa",ۅ0NALxgIVofmҴw̳!(9ٔdNrtf[@ӘEH"b3B(6dSnXuܲpq]z Jl@4ym@ P_^EiBAdoM4ezj1amےr9]o=t@.wnL }!d2J/ \):L= 0Gᖪn@ThǑU5mdDmTtmHhM0B(ݻ9E*KYdvm8&m-|0TpDc'h}t`+.7.aٍQ7 oqQP{72B7-O BaGWB:±+Q~yO:"?۶i%S-k *m+7Ns9+C9+Z8Obsg3!w6!o~+WV=n*E]@ЩVR [TTBKk3J+"0z/A:6A_ _t]m͗ՋϊM6_&hl]x!nq|f>O=N蚎FlڴbUN74ns\)NCg.tvmBtRӧr W2+'`x. hL^Qڞ 1#$:|q G+}VܛO>' bQ v.1ð-X];g!v^"]zqo Ɯ/I'}Ͻ"ޝ.Ex'vUޅD՟'K{xg` S؝U}6/*TW^Nz.zۄ o`SZ!]PQɜnÊ5rJ3Bxn=sl@YPs K`,zt ЍˡArkAg }R6ڵk0tPd3pg_|r,.2X|{M 5k`!w/ğ<فC;@l?ܩ 5N©YVυ! L8!]- DyIyBm`gq^{u.ƍW61k{akF>wxLĕW\=vkOG̗pۭSbɻ_Lg p۬Yu]=+/o MS/&+zIG.Ν f{HgNŮ;;{'~)Xn#&|S~?aѢg}O; wN8Snz'\>K];{fϾ/cƭ3gb`/8Nv㞻}ۓv Y3oɿ:( R㎘9֢Er @^f?Os=Q~wuяu3!uaDڔ{KP 4n $. J6M<Ǧ\oH+).#ڷDe;7B_)%mo־W:mWA_>ݼ1t3gƍ`“M}1slpVXgq98?0 \E7^<y=ᄌt4Gϝy8cƛo Í_[gĊ+_O>My΁{oVa ˲_7(~睷{ >]RE[a388gl qKŷm 6j?e .@0F!fvaq7v9<78 >>}:;`oFCxmĨD܊] )@:M86xs/I_~-F6)J!GVE\UfŻ*N, 4 mom_ mjMm^_n^ Zn#$٧z1.ߦis|.GcݺH~tA?NXffbٶmQ"KMCg&iӦ}s;|R\}5>np\\s5?㮻q-33OLj[>?Oэ'ЏaMu |zBFb'`/O(kܦp5QWB/6FK/W_f=Oi܌f\2RMCss3i#/GVS)x=uH$ #3D"aG?1/ZRl(؍1G?_~ N'~w ]ӐNp9_wL+Da0 'p"̟`u t_CI>Ee _rqi'㑇˯#Ѐ .Ke|(qF j䨼&8qR:w˂\Lbb{܋/söm[p{pi({.E{0M)˦My qkpqqׂ~ ^U: %>b8ڜ0.Gĵb (c 1~еB_c?!ϗQp̱k+e,{}̸z{oA4Mdl֑潏WZ#;#cP_b9?~g hmmW իV[/ 0[;̛0e4M:Hu f&rl y\x1nqη̶Xf@i|w>8zj0-UnHJ"o\^jǦWrDa 1_ZYWv}żZ9ϮXڹ4\KD(r IDATHd 4So[/AE7 $i| ˴<zCqCspaTpώ@H`W_!NC7 's<~sp]wc5شqx7 8>t1`Kmo?. #V~ThAA.u!p̎T. 'uUT:q&HDlg)7g<(ƌ."n3uk|gxgi:]ʩseh \ܟ..)*|T# k駞Jpg86s ^p.n(dMeR1k_?q бy3>׿pƩ;S1#sfd3YY\^ɡW^O>Y\.ş,WS_>@ւfwp%fJ)~ݟ7͘{>LvBa .Q̸f/N \lӦlwnZV:["yOxAR:3qKXEtt)jA6gJ#-*2k徱A1;"?r2H<`v,?V3&p<]@Ӻ..Fό i҂ )<$td2Xg˾aq?{_@ a"b|5۫/y. f`Ľ!ޟ]"aР=)GQr`4b_AdbqMi[XkW 9\U;W}Ad)RΝ-֗7cnlY؉9)~_a 7q~\b_aWПēOƛoh#< uXlƌ>{qޣ/,J= |.?JKa~-Ju2dNEB&NP>+0 5 ah ˖-+\9G&lݶ1|+4Cw.SGzW,G[R|@ \Th'QVb_ޔTެ(TqL;Iر*a3,gsyGᐊZߐ"| |Aվ̬׹Fg43^Lc70Z8 71! *hX\](#mv"\zkѣ"ܻ!*9u"-{:OquC 0fXdCבJnq%K1f..ZyO"J{36Gx[TнP쳓CDt aP0q sy8c!A +x"ekžM,#JRc=ǟpB&c^S @ALa| 2Wݲ7 ܬR$/PB>/Ɓ>H H;K% ܡ7~.KRPVKW0;_&W'|Ia5j[h^E2FEE!gEJo-˄e_Cj *^tWV"_^mub%¿n"xd-yL[DyU=)ʃDfKX^aV$}?T'q5Ξt_ΰ蒆,>H!ʔšżPp /m»hؽ[PMPδYtD8xq^xmId-ypLWk ^)プ׈ThItzT_$Z=A8EFh0i#йeC qC!c'A;P%}1DL=ǻJPJ|b`? 0 wnUR .CoMı ى#c6?ڥрK-b~ H߂!XRs +ϒ1Y h8O:rd`M1,v,MqlBQIӆ>d<|GCz9#+w7oD`I$qt;? _6 +(G T͗}ԕUd- V\֒ф-I*%F!Z{f oٶZa^6 t˧7E~}\AR2.nS',-VE I#Y'`r~Ph'CM"Y*-_5:j>oQG+PVEl[O";T_7!74ds끚3^ڸb2Q.XG J?TΘE/[o*—.h~"=J{?cf_kI&]aBsG`/W(&*U]:UrTA!+ck: oO^/{LW^yK[sKX\U |y,8>~'¼lYΜ[)_*ȞA3t l#>! Af%Ru+ko.A*ɍr(஁C_V*V: p DW(%2?)Ho">z}>A\sKX |I\ުUO<$<'i选T8/.++Y{r ;xB[r Q> W' rUSDdFqf82>ZNqJDpu?1o+S<5r)"Q2e~~ās_2e:(D+w嫉_n-nFq2e qyo!{P+B"/܃@=>"Av}pxۓe\չyy{"rK%qw$bnYgyB.zUg1-pڊ1"fp,Jq7\>v'EW} u\j[.ώ>!=фX|$c'aA_\OweÑJ{oC*GԼ=q[KXшQ*Zz5N9Tᄌ0|0dY̟>(vm7/pwH,ak̓c#᮪>U2yo YG^(fYg]}_;/bf!!WKZXqh辋6[B-V%p">yiB,!ձ`O<{wahdR^ p@RU7w(CQ?|A> ~v䑸4qw_~~ 0ea-WB4~c3Ϡ{N?tөߔpgk0rH}X|9Z mߝ>F]s-wξ ̓eYws= ~N眍ׯǸqpo[o rٗs~ÀA`&n[0w+x~\g<~<^{3<ta}9s`5xe܀"󮻱_%I}=S4Bt(zoF1(K>!w#BoA|7n;NžSDw DURޗ\@_,:k/1̺>ڡm0RJnt"t;uv{;7FQ0וK 8T2|oアah>æ{\<}{>svm駟w~,[wy'n6[??g|0of̸wl='/O`ԩ o`un.+?0~a <wΞ]g~7|3{q:yW8Fi㐃9s0g <t/j[w1^.;j/W{|/||OҦÿޗ+ߩw_jVxE_܂8Km umUBjɱܕ 8c^ՒQ[cF\ΠTxR' =m|Jǁ/p\zMo_|K*: ^N#0jJc*}b<&(8ЃxA~_|v !CONj/Կ 80x`ލ~gy&&׿k9s1b)?E&眃Ç;eq]s睳N;!L'x~gaHR8ñx]wboO:$NK/SO9pꩧ*sSO=:ÇGSS~s)xW=qA{{;@4d\Ι.\;n]vw(}/qi?C jUF(|դiLtm&*ɸ nx{`Mp5Ja+*C'"jC,sO 1>$ũF_ZRE1ۖ~NOT?*7bՇ"o+`& |EN|I=C-*e]Rg(1n=\stp ʕ+1f=Y{WX:t(Z 6 {R@\y8p饗O~M^<ɯ⊲~v .Wi}+=4Cu]WɃ".3◿tFE,Ƥ&z@y` TKoKlw uk\B>ɱ (TrPxjb]ѵNj~7J}Np{bnAwH Y'\ÍAK 3e*%yQxpG N[nWիq-`Ϝ9k֬5k0sLA3f/²,,YW\qe'͢tmVoֆgPzlY5k 7܀/ebɒOq{RZMq ǭ_|\.v(pr!ىN?}\u8'm1w|8":*hs [ /YҶE~ٲuq/9װDփzUj_]cM±T IDATtׇs;.f`TK="._ pNQ_C`lsV–-*3s nv׿8c<2'x"4MGw}ש?C@)ťNʕ+1j(pޏ~b֬Y1h q5U'9̼'p4Máwsǡ6='ZoGkk+fΚ{{.֯_~㷾:J%qYXl`䨑8#Aӡ+6כ'_Y"'H >IXFg%QЬKS[d!(@bfVۙ.5ecQ1˫bT/CM3mrz*?!N%nerᠫ&L4f$t^D5;餉h3tԠũXNS ,f~-A[4[FmvUm(!GqDߊ95UX -1=C5Y _e[\QUJX?x˵q9)J1xP}b56'<[Dz|#kMYt2MZ, y0̴mZZm$,vzGƳ+.d"T_̸B9sCa-Qߔ1p#@"MbϠq$ !yU]:%GQmԞ!/&_xwwNK_%"1l074Mמe9ɇ_kOHކ,>$[^ 񈝴@.70/CR)W,Sa Rh|-/uIh0r]"ܵ7nQY8T_˳[NPb\!?O6䂋PYs/:luڐM!wrX1+@qIO)1t7ׅ+Kv};P }Fc5wE=0Qk&_.؜ª8DYE,a}!އpqQYEXo/*@ 2::۫N8䚸~gIWe}}c.bo B\'yH&ᮎcΟwc) hQU"x#^!}Uz"X3Y:ҨT: P:.t5SPGQ#r{9W!*ˤꈅ|ou& +!mE-#\}W uő-{H u̖w[Awfv+r曋:Cu: ..Jx+91b ?Ѿi3VO?|;;cĈz]z%-UO*e^Hc,j2b]"Bd>SW>jKgwW%d]Wۋd%&F%fSb˥K[o[Zz:- 1y1z~[7~K]JmMuaQ|^e01̼cxV%YҶ]\d]o*K7h}ݕuݱķB_B [ A!0z:-t2E ѣGt8tIL^X&U=yhQ}2srEUoz_%S7 [PHY7tҎ8-dU[G7>$ rK@өktZCK@lPb#lR2gK^X[+)sxXr^ݲ6~2+M7ꪙ1^Ys VP }JSI$ɪ.Z ϿM哛F7ǍÎ;LB~uF"D:UaEX~,PJJ&1vm0`@y=rU@;c…Xn=,Pǎ;lw?*&/,& ]!}}}|B];˜~[;`v+i6[0ox…X?.)lX|k.\]Ok:c hk[w|)VX͛C*1z($Ln;466"HTgOfԝ®ks5BA8GmSM6Ks_Ks_رc?qVc+WĢE+sѯc|c뱵vkN<ēx8`KÜGfckSlVcyx7U>^|}<ȣhiiƉ.xY_';;;\c:U:=<#҂N8'4huq4_ظ\cؖ./ >Sp3v,aR)B`&:::~zaV#k=L7gԥ-uctkBE_|[yᠫ&L4f$t^D5;餉h3tԠũXNS ,f~-A[4[F}UmcxWՈxoi1X@|90 mmmx嗑J&N@ò,,_{}o_|e̾A&\ <u>KW&Lhnn1^S/G/w8q%9c}Ͽ"nq\ŏ; Oxǎ; s bƍaY&:4;?]R R ҊSi9Yg:Xm:hlbY@넙dElҒ&o綖-n[v&aӛL>:5-\>t#sʍV -R[3n4tA 2j[4,YN9DU W_Fb4Muo>IuPH7Mgs:.wxUi8s;Nol¸ ۮ\V{6߀+򦉩S0 g\ģaXhz-1uʔ?Y]z5B{WĸVU.̹Lzc&:b%5Q6%RmJIPmjD#ٔ!:7IFҔ J'uvtc/п Rih\R7{4MX۶gTW7Mvm|V=c =zlll69f}awbРAzLX{6 f޺];Ƣ(xeYq1;fcp l72,8q)TWӸT=cpua`s3sOg Dwmr8p j+<_a66B*uks[5B[A(ACc?<]@8 n yHX&θP8T qKc7r A|m;иXpLk ';u[/ ƌl6[e&RvePJo#H98cA*·%ػw5MGAgO}p;NɕuG4qq?zcl|in=t/(э1QeG|`& +WD>vŸUO!Kܾy3f:Fm7om XB@)uqfveɧ 7GQsբVu|;wয়kN;#lq4)Le|}}8p *JiL&<== Vzzuzݭ1 TpWrRt͘钦={PN46mRRcMՒ"IC AVȊ+X,ԪUC(ƶGe˖e̙3nBť6s꙳g۱5jؽ9eIxᇩS>}Ǐs 6hRJԫW8-[Zo6Ыg|F#]dYRJF!LjؿK!(.cv_HlTR_I˲LR'PΈ#Z*111>|8Oͳz]K>p̢˯Axx8 6Tێ~wFq z,Yv:ȭWAo #G111ӛL}M6R4h˗IMM%&&^xsڵ []7Khb!nN|}}QTv#*͛ӰaCYx1Ν ohMg| ӧ5"55;w*T*ٴy O?~wiG3Oz*0yd_7ޕcB׼jժa2X,_ٵk* JpLayAIh*Th4b07o޴(رDڷoϣ>``T*|IJ*`pL&|}}ٽw}9_|_~ѮFQ~F~gؼ ^۬`Ã#F(-VlfTuv/X.kjݬ׮]####_ jǦ""2aK(gwt|8}qzs{࿅' 9þ}xꩧX,\tXKժU׸۷og˖-hт3qDnAAATX eJӓҡԪU'ho,%Cyh4*-r5 4Zmaz3((mhcv`l߾$Z kסk.oPȹ+WٍȲ̋/ +ݩ^X`0жm[7o95ȲLYhZauW۶휎sEW:LD 6G/H]{9t:,y:uvڵT3Ф݉Hv۶mStPլXcǎ)kHի9w֭cȐ!4k֌ 2~xի?cH}l۶khڜѵ З+.^$33SYIP'y&k֬!%%ooo:wLʕQ՜={NGΝILLthZK||<GI&^MhղR Žf;{9~7F ?oի~:+V_~[o'|bo AN~7>t̬,*VH^ib9%!?ANcɊ,dgg3bF#̝;իSZ5ömۖ#GKdd$*T`РA̜9Fޜ8q>M+ɇw!$9‘GԁmRRhҫW/8~87M4a޽駟Nzرj[u0aBJ3iDHC,Yxyk.6msN Kƍ)_<_k4N>cW[#N ;?]_nܸCד`4ܹg$I^`ڴiyv/_AϞ=6lJq)[،q01e t:'}X,8p;vVm۶E$ϟo7x 6mJdd$ǏW&2]Vt#ڇ-[e˖JZŋٰa#׏=p%jj]X=uFŰX,FjԨh㤧CQzuf3˖-ԩSj, ׯiӦFN:|C^ks].ZD.ΥF|ч+* IDATתgAי;s… *H~ҡ:XwwfRR`f6^: 6D$,X@RRÇ`0uhadff2}t4 -Z ::ZI]Mh4扺-[4cǔ6nN071z >>4z[n۶M t_csIF&S&y_駘5}*6؏!;ԁmb㏳yf&M7&0=׺ȠA9\[l}r6o΍;z d8t7SSi#vR~e4bРAtbr?lZ1vYZ仲^!tpU{GwxI_Z[SG+*ShM}{~Fŗ_ o̹qcg.]ʹ5cf3,[Xt.pk.&N^GeBCCd2E3f ++nE+W9HKKSoX#G)SXh1I׮)ƍONY|9˗-#$8vIn T*Nh4r9z3?> 9A'Ol6c0E$ Ѷm:lSN֡C>m7l(PwWꢸl&3335ORVP?8@m-sڕLogM<~}|?~H@on{d꼹s$Iyi&xgjh+VM6\x Vy嗝.]^`!!xӻg3!}lڼY!0l޲۷͓oΝחҥCo^.#ܸqTs.-iivu`oػw/GGJH~Hd"##W_vZZH1^PD-ԩS309s-s={`@΅gϞy\\ͯzYvYq[6kn}~>I͍+:܉V!ܼZ`:G84ڶ9P^N4} KG:ui?a %$4Wl*]ʖ-$I=zT0DFFGѲeK '=='qcݵHǏ;Ν6lQ ~~JEsP^]<==aРAg?0ZG-lȬ$d deeK1n ӧj9q2EÇ '&.+J~uQv9|pZkްaÔ{\:edd8ߑ7SS4s+m)ޒڃdnPtoFȲ[nεou@[bĤIPTdzb ZnC=gێjC~qoNժUiԨcǎeHuQ,bgܸy.TUvi[e'2 OF_TT࠼).x5ګy/f->ۛ:k9+lumqaÆvVɬ,|}}={65kTgܶrۛ{{Yp<+[Ť?f„ vԮ}{-ZĦ͛8s cǍ|*L~H/0rL\rmǙ^jј `02 }n (uәXcv.o$i X*S#;;nd#"""ːtǺȲ,s 6l,,YIxgر@7*, 7nPϝͤk׈,|O<ɼy8}iiJW. fٮmÇZFCG}BJJ )))F*VHQTlذnPzgmJ9ҡv](wξW!i62d][} LJ`=}d+ONiРG6((^CVX_lVF˗/F $IJx~&Ndn>>)S^{Ν;3l0{9hwW^\r,_]y+^WBζϷ9_]WQ#gunԩdggSZ5^z%eutxzz?~'UF8θqc4ۚ//T䧷&Ną0M|^y7GDDp5O?,ju?Wr)m?1RwSff& ==]1zr/ ΉIXhjbg$Mɵ$~m۲pb^| thP.f ):J/^_]R{ѹsgz(h?quٳvَ;;g./_rzAv,ZkJNGdD5jȬٳ 3*i("qɰַ1n?^J~};oÆE˖+[ܺX#Rx"I.L&.Ӭ[nc9y}knRY@R~j56l`̌_ޝK8V *gAS絵u"ŋ=z4>:X+)}Sլ]LeǴcǎy¡w(ɚ#^tiVZE^ذa͛7fӦMv1z=ժUcСԮ];1d2Xd -R~/麸ѿfďB ZGGIٿ?ӦM/_UR8s Ν#225j 2 9rJEvҥ &Sr;|rLX(%gV#T*ӧOg>TRg:} G1m9YפQb8ߟ:k87K.QFԮ,,˴.;Ww˗zjVX+^P6nUNW5u9{,*TaÆDFFҲeK]F||$I\ vҥKQՌ9e˖yX)麸4kƺk^{ mkց$I 6 6(FgQԭ[2*V/^ONxի= {; Y };ꃻjHAf䫯Be.^VT*ڴiѣؿ?.$1{l9{,-t)IhanFFF{_͆ ҥ j",,^zDf2dddpu:IKKî-ʲL(+>HnO5A<*Ub?[.T"V|ڡ࿁e,SժrS.6j=d/Wzur[Gŭ:NǛoVt'E/e˖?(7{JEvv^PM- ~J0_(Kj[ۦkHFC.]_tDDD 2IIItܙ:PBO?%665j0c $I… 8+TT4MyyyqUfΜ/KNggzn޼իWIOOG }۶9Q1lq=YY~=ׯw0cE |(a<߯]h7+j<#wF*g;zkG.݅po^m:b{jhٳgۥ] "bGBQeLz)֬YVe۶m:u*σ-^દ$1w\vĉ3f ;vdӦM\u>|tQ*eXhݺ5**UBRh" @TT fBղvZ w']\^ 0 Z(3.\ѣ۷??}qQ.^Hvv*VS==CXX=={Iq#mqxڡGSQڕDdyrU>s/kIIޮvLo: nڹUXÇ晠e} ,U*WVrԨqcN+ eɭyԪYӦ%4-~]DoܸÇ;w.cǎe„ ,YSN,Vb>|(#WJ_Ihw{FƸ딋b{P*0pճ3dYwn Bq?Aʕ=c!{WJBGhꘂtFn{tqҥK3/hhsٮ7~.O?VtWDnFn*WJn:~RMXԓv>5n4/r;Ŝy6پ} / W#4uХL*Wv([Hn*nP"=:ԯ[uɓ?x'N0J|t4ujդqR? ),͚>Lsavqfô$Qre7jHV-}Ы:FRtVBʕգ;Ϝa}8yD%ʇ,SB֩MÇ}.}BC1! ^*իV-R= =<֩C:ud>BGhKѐ$ ???խKuwqUQ:_r5EBVU]A%@p7qmFM#!!!xj$ǓmлJVI՘ĵG @Ptet}|Y-Yg C\ .6Ƹ}V&] @ )Ƹ;uٓ {߿2 @ JLD*;=)Ƹً)GIMn @ J<#'LEQӹהxcvQӝr(adQ]u,̞@ !lU$. n0&C7mIzP)~G @PR@8Y.Ip+c<7Y@ cTo=-@ @c\ @ Oc ?.%<@ ;}|\EȒ6 ' ~[~C ܶ>x!`#)9 FCڵܹ3ջeFiFz:>{QvJ^ϥ˗ٰq#C GXXXV  ̹P= ~tr70 ϑGYl)>>>u_ IDATҲe ZlX,XFfFM5ct<l6dR~;ۗݞ'PZ 3L̞=-[Vӽ[LJzc.ܣNrJTT oo.Zoo9F#^7_f$>--ftC9_g@ zn9N|9u*}lNjz5O&&-Z\+G'oI6[|v%+Vpe̚iسoK睖R:g<rhĮun@w @ bνB{ɷwh{w)ޣ' IP2ᄅˋGnWn;Æ #L<%61tBB aСs-7W& fjKҥ k׮d6#&_]Gn]#?} Blb&6͕M̙Sp뻻@x{{3` ,\pUO>eܸ\z_l٤III)S_rR2wW{TlIL@@K匊*KtrG-NLL JΓo~@ yQF oYV#@㶨T*ʕ+ǐClP&Ndł҆OHtt4 rT||}\JiPڥ+K,EgtSz@ CESy ~k4[n# f3|7ԬUSISO_qEL&ΞeҤ+(mm9s& 3g\e.\,T~[b9$'%s <̌ ~e賳9u4g6C d͚輼\cOaA z}gox~}yOF@PP5do+i:u$I?+D-s6-ѣz}6oYzիEzFoM,(>}0{ CMn9pJGM'DRQ&"'3 F]vai?ӧ0 @n*B^ WezDZTJYVS{<$Cm6=T~*9[!5FҘdI&m$ Z#JH~NJAj$u =&&`1[Murr:!\th@ Q%dqN!?Hjаp^=Je$eurݢoZtLEiࡲ-FѤ2MjO&ZI6YZ`֛RrDG ~f|Gbh5ϻ&#=|TY9WS>,k~^ #)UV6We˖DTJV-Y[d!2wl^|q0`dYfYd@ J/$f@zZ7o$=- lE+?wd/2s[vU4MKOcM?/oeddZnݻ]{nktb615k{_<|,_ΈVU6̛;T4ǎLdǏ݃ @ p?f7nLVV://yy"997nhSO=3KRᵑR*t@Vؽ{z[̖͛bϞݷ6ƿf#FϏ/ o)9ZGmЪuk._C&1qx>BINJ@vjK o01~?1 \rFCPPjHI&=-Z"((FÕ+W0  Cb8}Рn*Rr$&$дY3Z-{e-dff_Mػw/4mL…z9Rf gϞ)9x)V]G7GQ6*I|?|_4!!J[ t"@ 1#h$11@fJ2L&łdD͔d@&44DF)p$ ٬艉yҼ2lqqۙ9y4sm{yyѤ\ONfioЀV[ࡇ5cII4n0:N3,, ]{ЧΞg-םByt"/PF])@ hh3(b+a4d,Ňt=\r#+_IMMsb6D͔O&Ic?tt3ݺqaZ |E&HOgׯάp<ۧ7m"##k;f {,T^q ?JCܳs࿌%-彗43#L<= Դ;?Pi<0;wazܹ/JFyu@Pܸ)p,+ף'TʠWרj!jAS=Y4$K0i=$$LXWBtV R Y-Lq51\&%b|hVzOQ&>2j:O.bGcHLL$""cRNmeˋL=f2e"]R"@ (.et؜l%Hj5#qTJe$eurݢoZtLEiࡲ-FѤ2MjO&ZI6YZ`֛RrD\8l&pVTq;HǗ7h\prx^lG ࿈XCVX hwZM&c빚OzjO#)9H``)j=.mΞ9Csrb=6 Z꾠9~#ZU4|VPɲIS3j\.\ NԌᅁs…"6\֯F>J:Jj{p%4>1ZdwFAߖg0htޝ?姟|Ro%6[rmc}WQ#?w.Uw~Kl,z1~ozwc!HIaE9v[ѹK~]:ϝ gsC0m@F:,_ϛGƍ8z U#Mfv ƎӰ~}Ǝ`v2{L_zkc4]/~gt҅>U(Umˢ%K C1{Lf͜ɐaBF4ORZ5Uݻ]Ϟhj1->{u׳wUAjZk]u~_z5uգBŊ||v'˿[ɶ;1|gvw굿pEF6W^cYO:Odu]gƴivinVqZn{S ;HDPv-5Te'SN:Ov@Rr?$%%'|c;#$`j sƮcժUƮsDGᇩCppp9W;{oa˖1~D ? 6x3v,aaawW\!))2|2M{O?ѸDDDqYӏvi&~1e楗pw{Ju.^@oc #ƌQgffoc|pX~cjPf ?Wt¦r|mJQvҢe+||Yf gϞe֭c&+Vߣnx&L3nX.F |RO0Ͽg̸z>Kxx8|8v,?ϕ뀭ׯ_'Lh;>$Cukt|CB3v,MѐQܥ >῏ѹK :^aඁQ%ƎJWF/l6w|u&$t)x' bE`.T{(PPxz߳"X~*!3!!!m3_{;gf|3}4ҡ(D )VXXX=^?3SW]s޿Ś̳ZnF\>zu7o gpGԾCIezv+|]nyEX$>tf>7^8̔J3?C &0~Ҕ6m(''G쳏rrrԦMeggbxe'/qzmRQtgeOIJ2QOM|ZV7r _yZK,Q-jjvھ/7[Him۵ӷ|SoU۶Je +3f|ܯv>ս^ޞ-?zx?Ԩqeɜ۟{?HEe*zcSZ4{[\PlЂ˭`|lYeYj۶nubwƍuС7zS#.'Tj$iK)|vđGjZ%7WIKKŗUW\g*H~NxX%qD8NRosVX֪G,¾x"q}6thۻ˴hJ$TO9UcnE+VЊ+4斛SS{MYz{}>K6Fk׬5k4[u1ǖ,?3ujٲZl^yֶq;t?M6iӦMzԡ~;\^oUWޏbGΏFxѢrϗޏTeY6||q]>bhɲ~_V_|6jsn>3pݵ_ߒrg9So֬^D_^O>-5&|℧tرzqKU%JU#I:F+Wʕ+uۭcti,Kst_u՚+{Zh qr3>^vDV?aY L^}2.bٶjҥs=uV?NosrTX#t;ԫgOIɽNְwj_J_ꖗv_ӱG:c4[JwZtN:ᄒgsNzXeq}ߦY{hАK qŕ3y *((PftT˽'J,u9k2wlsLʬ7*C;T'xz>E]mT?ZnxS??]VzAY]mڱ.]cJsUek)ki";AJs8m9Ǎ9+r"na4b cGDZaĮS׶$e8QSߖiױ:iv#2c7!Ϫy&8ƶחZgHip.XO=%olqf1#/-,}@m[ZԈ-[kyf'/׍[#< =HX^܋',7p&׸N0nOKx17.i@f4mʲRC8$ԩe:Woj_Ehx8=wU[cO>vDmaʍ a#@8Զ!Om_Rr#'OOO3f|+7P֯_F׈+Fh]vIy{`/\r|FmsSvf7kLu!kgeeg'U֭]w9iׯV-[iW߾Mժuk[T4-Y4%IF߬ ^~EQj޼yɲ+W=+wk3 C Gx1ЖN?t}{ŗ_λG~3N;]+VZhџ >3MyŤG"WҔO}q$E ׭әSh5{>=[vo` IDATDǧjGowީFO?ZjS,n>Pڷ=d1FS(q8Ly1MT&Nx*Tc"O,0CК5nx[VW^u?pG+Jk׮ѸǕ-^I'Tt 'hel_ǞWN_'p<+k3^q:޽yIݏݧK&&guկw}W6l(y~zT~}笤𸇵tR ~:,egg^:g\7)V1۴'逿M'^|ᅤ[qx#O۶Iձ_yL]+$I;vTZZ밟yv&M5r(I̷.y~Μt1裏O?Izz$}zto;ϙg> EKE]U,͛i&m޼YXL]J}'Gv/|$tVuwgi]hțڌW%ž}T?33m}%I'BRKK}:&ԩ=jٷ>tNMk׬mK_V }+ qexCkVvmsчjImwvI')S_~ԩSt9gE&s&?[>մiS5m*-tWAf;箼J5ԑ[//1wnLEh¸bV^YF#ڜQ֯MD#j֬֫իW+]2zŏ˭Ӫu߲U+IҲeMԤq㢿4 CHi7%-I{8=~\8uZn?^,Yќ9//d)qةOudٲa:sN$IK܎ltT꘬T}}Rz |etrf>5Kcܦ }%o.V{y;F\y 2G[Qn~qoӦurinֱkإ0WFYf!/IE_yq)q'IzW)Y^*S1)C|i0:K^;ZdQuME-tyi$Iy[,+c% eiٲ|h-}= zѨb^^4ѣJBͣƕO>=[VXs=ҋdWEP9UZv2O3xիVY esp۲YX4mիVhC>YҖ͛5Yzըqc1:w}V^5kV{$]t%ˋ{ӗ-[Vk~钤zzb4sn[i< [Vِ7uY>uEl#nvzf$=pZd~jM};&}]$I箻~zmټY|.j뱳u|?8;3vq޽{Kƍ [_t)kZ~9r=r֯[wfLz{醛))ۯ)>V^ᆱܶH\2 -zyt=$ɓ庮gfjCJTwL]O4IϔN;V*ceCeQuMFL=xZn դiS{yK\>|"шf=S|$u6~ dxHE^z}(>ghΜzui^m:乮&?7Y}v}7]|heg^^V,D4ؖqܘ2-'F#ƉQ;0vTJF:umNB^5mٙvf7r,8vg乮&]G4O]W-=XE+NF=˨׭-[UP]viYӠ "f其sF[GQ]ZM\okun[\7nmW Ebˋ{q/xI\:in¸ 7?-7cSZ'[\Ӵm(e|a*ED" 6*;+KXaS/VXlmذ1P?W~0 ScH4"sS;sF/RJcFlJ|y ]gx '$T/lV4-Wv8~[hZd~] kRm8zI iF~h|jK۶U~=OU$iiZgի_/Ɠӳ<owU@X7x&M FQ寗8f@k׬UZZzRiuz(am=`V|Snz|6nTGu,W﷟;&mذ˖-Ӑt`N:S' <ʹэ1t`Nڹ M8AG\ZUhg_:S'e.'GmS{ݧju .'G/\]u:KuUG;;?[^|Jڗ-=~m_TWd~IZSsԱ~z'C믻ϧd$VI=Vnf=p:cյsg R}6gNITMue͚sqQڹ̏%rrt҉=1F=O8fT0^ UVl=Sm OKKS<9ժu+5lҥfj_2Eojؠ\̤I> [r"J_sڧݾzmv|ۛ˚3{^{ xu͞^^5=ƛF)Swt'{~E4kly*,,P^_f̵;x,w}W3yG?X3^R;;?[xM:sڗU8ώwq:={׳gO}zx]۪,6W\6S&yNK>hITM]}:u4aku-)̾KRFt}e{nF?cwB~IKKSVպek֬͜]FeY$Ke+*n=ZV3g֭ڨUJKKe 2DLT.0q 0`ᇲ¥7gtD#T^=5jX_w_U ^ TL5ԠA+-?⪫ԺunFW\uUO>D 4ԅ}/TvVf}2U%k̭.]tH+e/߫E[ڷoFO,[>lE8@Æ%mk{;/J[[n^xA?ce*;G6lܨn]fƍ:[5j(5nD4Ѩѣ/NϯΏdΟbx\?]|QǢ]NN:Jo{sk3^q[^+}\jx>HҏYldں{@o*ۼys|-5kC2?k+{o?U=wj̷lc:C96}뮿QᄏѨ5RϞ=‹/I}P.'G&K2ztk}ty5IݬMzz޽{/Zw,yܱ~Z2eLyA@tO=Z9sf>*˯YFM6Mj}9g<>rO'ԼE =p}TGX2Eudfnu\D,KjPǟx^~2姽z7:t˲,-aaH)kAԼy듊>PL/J'ꭁ_?==i>KC7|sI85{+PzzzeuMi֬VZ'yXfiKգxL#<])A]u󨑚7wnw$S9o7g?'xl'O?z%tkzvίΏ{j=^{~ߢdddHVǻ&s]e̘2ll[פUVUT{Q:Cum%y칽# O={?ƍ׀J )ϭ~ b1ZGM8A\}|ӧ&Muu-ݎڦL;z.geei}=J+nTi~K _ǟ`Z?]Ʃp4eeeu{Զm[^jݺċ 2D&]?=i m.-[?,s*;tG\nin _YfZli_~Y_˿L]}UǣˁVYv޼m9ВWBvZ⫯nO2EѨ^9Z[6EwEdIg'~ݬ u˹s5ԠA|USUbO=n@ <5at9V8ZJkjVeu(Qe|n^b2=裕_sM^7'go5JԽ5qlkv\l;z.vz51R^,--M}^]|weYrGHD$a=z+k:K{y5r~\Xx\ +G\QJ-^d@e'Kco+Wjʕ{:ydg&{ճ'WU~} )7Wrs5aoJ˟viz3ΐ$3mS֭ˬߺuu츟+d[wK~wyU?G޻.ׂ 4v>}FQ,//O3nF/_KIRVv~\sɜ 9:suysז͹zUn=o~MWګʕ+)7W3g'|R ViίΏdK}:Թsuk곚>;ybɴuMwQGwTv**SseiС8q^vhpw5kt}sN%e96թe>;ޥ޽O)YN=z|_:dYrV4mt~n:կ__x^6-}Gp)7X1%9Kڵ` j9uXĶƜi901NԎфR"0bשku2oδX 4cFƱ<>+U:}j)-@z'4wWzjBj uen 3hur|zKINNJ?TVv99_3B[9d~s8hJW-̜nXܘ+0=yny @"^!f'7>q?_Xc8P[& Sn MRP0nJT(L1$a}qQ 1ሐ GC 8’C%EЄ)|0nBt7, <1aOMQ@ʂCƋ.lߘ)5HЅ )ȏ!@D|0n;b࣐q Q |0&”C4*20R! & 6SgdH8P>A 0^" (7#3 l*0 @rcxHc@#? oBCM?Ќ~7L40Rq'! & 2 o00% D1a|[xZ> On |jq̆HMXc8PK&>+M% &+D1a a a a a a a a a aIø# 0Rq'q'q'q'q'q'a0Vq'q'q'q'q'q'qRh000$a |j+88q`?H?a a aOK"!>!>!>!>!>!> A$0Nq'q'q'q'q'q'qRh000$aCڊ00$aABډ0000000ZɄjOOO?h000$a< C;"aOOOOOOBƙh G Aj'888j%aq'q'q'q'q'q'q'qRh000$aCڊ00$aABډ000)P+ '>!> ~  ~j)8880 q">!>!>!>!>!> Egq,!2aOOOOOOL&'>!> ~  ~j)8880 q">!>!>!>!> ]7P^sb *IJ$b۞A8Uo\^?xjwU cҢ15o*) UoB}ܼ>5W9 JKKeY~W >1(+Ԣ1RJB6ꨕa[})[R*w騍Q&=ff@xgSj 8LIq">!>!>!>!>!> |gqV@mE|B|B|B|B|B|B|B@dq'q'q' K| |\* < ~<`5„40^<ϣ_)#B1a;H{0˜P wA ' !oD?G"3b0gmK߲JLzg֯/bpF,IKwݘPԶD".qxRHUTRI"IQ.tKciyP79 ,2gKK7dOck\Q]iOgr Yh3Ee!&bjB}Ž߭y9&S)T9Es{ٯ,B|66?W''Kqi]A>. [(R4I!f1!͆á&U kŁ{:crjO/[{SE$ŸtG_8 vbR!tl-¬*d1Kl,3b[i䗒b'{c>Nކsysǔ?ٗ; qig1lYE.~^牤YlJ8{ I,0ղQi捬YARֽcpoZwO$q]B; qi[6!{nG{rm66Yw4Jl\^?< 튡/cuE~Ѻe>ˣ:]g/B\zrFKʛ3T^e7=ksI:*p|EWW/# &Z?~~zc" )$=96#kj}tG$mN%!.3ƥX[E/&uKI'S=ήk_E$m]KҾc\5ȥSrrI sZ pIZpi4\kKqA2%_moL='p/$ZK}/C\:TK7\ڈrIa.]9V[piKK q1pKKt3zrz p`<BKajѽ.<—>ġkD9W5D9#| `7`ÿz mIENDB`modem-manager-gui-0.0.17.1/help/C/usage-ussd.page0000644000175000017500000000275612377354740017753 0ustar alexalex Use Modem Manager GUI for send USSD codes and receive the answers. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

USSD codes

Modem Manager GUI is able to send USSD codes. These codes are controlling some network functions, for example the visibility of your phone number when sending a SMS.

To use the USSD functions, click on the USSD button in the toolbar.

In the text entry on top of the window, the code *100# is already displayed. This code is the usual one for requesting the balance for a prepaid card. If you like to send another code, click on the Edit button on the right

.

USSD codes are only available in networks which use the 3GPP standards .

You can use such codes for many purposes.

modem-manager-gui-0.0.17.1/help/C/usage-modem.page0000644000175000017500000000302012377354670020061 0ustar alexalex Activate your modem devices. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Modems

After starting Modem Manager GUI, the following window will be displayed:

The startup window of Modem Manager GUI.

You can see the modem devices available on your system. Click on one of the entries to use that device.

After clicking on a device, it might be needed to activate it first, if it was not otherwise activated on your system. Modem Manager GUI will ask you for confirmation in that case.

Be patient after connecting a removable device such as an USB stick or PCMCIA card. It may take a while until the system detects it.

You cannot use multiple modems at the same time. If you click on another entry in the device list, the previously activated one will be disabled.

modem-manager-gui-0.0.17.1/help/C/usage-getinfo.page0000644000175000017500000000256012377354655020426 0ustar alexalex Get info about the mobile network. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Network info

Your network operator provides some info which you can view in Modem Manager GUI. Click on the Info button in the toolbar.

In the following window you see all available information as provided from your operator:

Network information window of Modem Manager GUI.

The most informations are self-explained and well known from traditional mobile phones or smartphones. Note, the GPS based location detection (in the lower part of the window) won't work in most cases because mobile broadband devices usually don't have a GPS sensor.

modem-manager-gui-0.0.17.1/help/C/report-bugs.page0000644000175000017500000000227212377354616020137 0ustar alexalex Report bugs and request new features. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Report bugs

If you found a bug in Modem Manager GUI, you can use the Bug Tracker.

Before filing a new bug, please have a look at the existing ones first. Maybe someone else has already encountered the same problem? Then you might write your comments there.

You can also use the Bug Tracker for feature requests.

modem-manager-gui-0.0.17.1/help/C/usage-netsearch.page0000644000175000017500000000117212377354702020736 0ustar alexalex Search for available networks. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Network Search

modem-manager-gui-0.0.17.1/help/C/index.page0000644000175000017500000000325612275670236016774 0ustar alexalex Help for Modem Manager GUI. <media type="image" src="figures/gnome-hello-logo.png"/> Modem Manager GUI Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

<media type="image" src="figures/modem-manager-gui-logo.png">GNOME Hello logo</media>Modem Manager GUI manual

Modem Manager GUI is a graphical frontend for the ModemManager daemon which is able to control specific modem functions.

You can use Modem Manager GUI for the following tasks:

Send and receive SMS messages with messages concatenation

Send USSD requests and receive answers in system encoding

Get modem and SIM information (device info, operator name, mode, IMEI, IMSI/ESN, Signal level)

Scan available mobile networks

Control data transmission process and set session traffic and time limits

Usage
Contribute to the project
modem-manager-gui-0.0.17.1/help/C/usage-config.page0000644000175000017500000000120612377354631020226 0ustar alexalex Configure the application to match your needs. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Configuration

modem-manager-gui-0.0.17.1/help/C/contrib-code.page0000644000175000017500000000174512377352472020240 0ustar alexalex How you can help make Modem Manager GUI better. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Provide code

Modem Manager GUI has a version control system at SourceForge.net. You can clone the repository with the following command:

hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-manager-gui-code-0

Note, this clone command doesn't give you write access to the repository.

modem-manager-gui-0.0.17.1/help/C/about.page0000644000175000017500000000304712377354474017003 0ustar alexalex Information about Modem Manager GUI. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

About <app>Modem Manager GUI</app>

Modem Manager GUI was written by Alex. To find more information about Modem Manager GUI, please visit the Modem Manager GUI Web page.

To report a bug or make a suggestion regarding this application or this manual, follow the directions at the Modem Manager GUI bug tracker.

This program is distributed under the terms of the GNU General Public license version 3, as published by the Free Software Foundation. A copy of this license can be found at this link, or in the file COPYING included with the source code of this program.

modem-manager-gui-0.0.17.1/help/C/usage-traffic.page0000644000175000017500000000120012377354726020376 0ustar alexalex Get statistics about network traffic. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Network traffic

modem-manager-gui-0.0.17.1/help/C/usage-sms.page0000644000175000017500000000121212377354714017562 0ustar alexalex Use Modem Manager GUI for sending and receiving SMS. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

SMS

modem-manager-gui-0.0.17.1/help/C/contrib-translations.page0000644000175000017500000000315212377354535022043 0ustar alexalex Translate Modem Manager GUI into your native language. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Translations

The graphical user interface, the traditional man page and the Gnome-style user manual of Modem Manager GUI can be translated into your language.

There is a project page on Transifex where existing translations are hosted and also new ones can be provided.

For general help on how Transifex works, see the Transifex Help Desk.

For your work you should have a look at the rules and dictionaries of the local Gnome translation teams . Although Modem Manager GUI shouldn't be considered as pure Gnome software, it will be often used in GTK based environments and should match the conceptual world of such applications.

modem-manager-gui-0.0.17.1/help/C/usage-contacts.page0000644000175000017500000000116112377354643020602 0ustar alexalex Use your contact lists. Mario Blättermann mario.blaettermann@gmail.com

Creative Commons Share Alike 3.0

Contact lists

modem-manager-gui-0.0.17.1/help/C/license.page0000644000175000017500000000350112275670236017300 0ustar alexalex Legal information. License

This work is distributed under a CreativeCommons Attribution-Share Alike 3.0 Unported license.

You are free:

<em>To share</em>

To copy, distribute and transmit the work.

<em>To remix</em>

To adapt the work.

Under the following conditions:

<em>Attribution</em>

You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

<em>Share Alike</em>

If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.

For the full text of the license, see the CreativeCommons website, or read the full Commons Deed.

modem-manager-gui-0.0.17.1/src/plugins/ofonohistory.c0000644000175000017500000003760712375670442021102 0ustar alexalex/* * ofonohistory.c * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #define OFONO_API_SUBJECT_TO_CHANGE #include #include #include #include #include #include "../modules/historyshm.h" #define MMGUI_HISTORY_SHM_DB_MESSAGE "\n\t%" G_GUINT64_FORMAT "\n\t%" G_GUINT64_FORMAT "\n\t%s\n\t%s\n\t%s\n\n\n" /*Driver*/ struct _mmgui_history_driver { /*Name*/ gchar *name; /*Reference count*/ guint refcount; /*Shared memory segment*/ gint shmid; mmgui_history_shm_t shmaddr; }; typedef struct _mmgui_history_driver *mmgui_history_driver_t; /*Modem*/ struct _mmgui_history_modem { /*Modem pointer*/ gpointer ofonoid; /*Modem identifier*/ gint identifier; /*Ofono driver name*/ mmgui_history_driver_t driver; }; typedef struct _mmgui_history_modem *mmgui_history_modem_t; /*Plugin internal data structure*/ struct _mmgui_history_data { /*Database*/ GDBM_FILE db; /*Current modems data*/ GHashTable *modems; /*Current drivers data*/ GHashTable *drivers; }; typedef struct _mmgui_history_data *mmgui_history_data_t; /*Global data*/ static mmgui_history_data_t historydata = NULL; guint64 mmgui_history_get_driver_from_key(const gchar *key, const gsize keylen, gchar *buf, gsize buflen) { gchar *drvstr, *timestr; gsize drvlen; guint64 localts; if ((key == NULL) || (keylen == 0) || (buf == NULL) || (buflen == 0)) return 0; drvstr = strchr(key, '@'); if (drvstr == NULL) return 0; timestr = strchr(drvstr+1, '@'); if (timestr == NULL) return 0; drvlen = timestr - drvstr - 1; if (drvlen > buflen) { drvlen = buflen; } localts = atol(timestr+1); memset(buf, 0, buflen); if (strncpy(buf, drvstr+1, drvlen) != NULL) { return localts; } else { return 0; } } gchar *mmgui_history_parse_driver_string(const gchar *path, gint *identifier) { gsize pathlen, driverlen; guint idpos; gchar *drivername; if (path == NULL) return NULL; if ((path[0] != '/') || (strchr(path+1, '_') == NULL)) return NULL; pathlen = strlen(path); driverlen = 0; /*Find delimiter (driver string is in format: /driver_identifier)*/ for (idpos=pathlen; idpos>0; idpos--) { if (path[idpos] == '_') { driverlen = idpos-1; } } if (driverlen > 0) { /*Allocate driver name buffer and copy name*/ drivername = g_try_malloc0(driverlen+1); if (drivername != NULL) { memcpy(drivername, path+1, driverlen); /*Return identifier if needed*/ if (identifier != NULL) { *identifier = atoi(path+idpos+1); } } return drivername; } return NULL; } static void mmgui_history_remove_driver(gpointer data) { mmgui_history_driver_t driver; if (data == NULL) return; driver = (mmgui_history_driver_t)data; if (driver->name != NULL) { g_free(driver->name); } g_free(driver); } static void mmgui_history_remove_modem(gpointer data) { mmgui_history_modem_t modem; if (data == NULL) return; modem = (mmgui_history_modem_t)data; g_free(modem); } static gboolean mmgui_history_create_driver_shm(mmgui_history_driver_t driver) { gchar shmname[64]; mode_t old_umask; if (driver == NULL) return FALSE; /*Shared memory segment name*/ memset(shmname, 0, sizeof(shmname)); snprintf(shmname, sizeof(shmname), MMGUI_HISTORY_SHM_SEGMENT_NAME, driver->name); /*Shared memory object*/ old_umask = umask(0); driver->shmid = shm_open(shmname, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH/*MMGUI_HISTORY_SHM_SEGMENT_PERM*/); umask(old_umask); if (driver->shmid == -1) { driver->shmaddr = NULL; return FALSE; } /*Set shared memory fragment size*/ if (ftruncate(driver->shmid, sizeof(struct _mmgui_history_shm)) == -1 ) { driver->shmaddr = NULL; close(driver->shmid); shm_unlink(shmname); return FALSE; } /*Map shared memory fragment*/ driver->shmaddr = (mmgui_history_shm_t)mmap(0, sizeof(struct _mmgui_history_shm), PROT_WRITE|PROT_READ, MAP_SHARED, driver->shmid, 0); if ((char *)driver->shmaddr == (char*)-1) { driver->shmaddr = NULL; close(driver->shmid); shm_unlink(shmname); return FALSE; } /*Set initial values*/ driver->shmaddr->flags = MMGUI_HISTORY_SHM_FLAGS_NONE; driver->shmaddr->identifier = -1; driver->shmaddr->synctime = 0; return TRUE; } static void mmgui_history_remove_synchronized_messages_foreach(gpointer data, gpointer user_data) { gchar *rmkeystr; datum key; rmkeystr = (gchar *)data; key.dptr = rmkeystr; key.dsize = strlen(rmkeystr); if (gdbm_exists(historydata->db, key)) { if (gdbm_delete(historydata->db, key) == 0) { ofono_debug("[HISTORY PLUGIN] Removed syncronized message: %s", rmkeystr); } } } static void mmgui_history_remove_driver_shm(mmgui_history_driver_t driver) { gchar shmname[64]; GSList *rmkeys; gchar *rmkeystr; datum key; gchar drvstr[128]; guint64 localts; if (driver == NULL) return; /*Shared memory segment name*/ memset(shmname, 0, sizeof(shmname)); snprintf(shmname, sizeof(shmname), MMGUI_HISTORY_SHM_SEGMENT_NAME, driver->name); /*Remove shared memory segment*/ if (driver->shmaddr != NULL) { /*Remove messages if data is synchronized*/ if (driver->shmaddr->flags & MMGUI_HISTORY_SHM_FLAGS_SYNC) { /*Form list of keys to remove*/ rmkeys = NULL; key = gdbm_firstkey(historydata->db); if (key.dptr != NULL) { do { localts = mmgui_history_get_driver_from_key(key.dptr, key.dsize, (gchar *)&drvstr, sizeof(drvstr)); if (localts != 0) { if ((g_str_equal(drvstr, driver->name)) && ((driver->shmaddr->synctime == 0) || ((driver->shmaddr->synctime != 0) && (localts <= driver->shmaddr->synctime)))) { rmkeystr = g_try_malloc0(key.dsize+1); memcpy(rmkeystr, key.dptr, key.dsize); if (rmkeystr != NULL) { rmkeys = g_slist_prepend(rmkeys, rmkeystr); } } } key = gdbm_nextkey(historydata->db, key); } while (key.dptr != NULL); } /*Work with list*/ if (rmkeys != NULL) { /*Remove messages from database*/ g_slist_foreach(rmkeys, mmgui_history_remove_synchronized_messages_foreach, NULL); /*Free list*/ g_slist_foreach(rmkeys, (GFunc)g_free, NULL); /*Reorganize*/ gdbm_reorganize(historydata->db); ofono_debug("[HISTORY PLUGIN] Messages removed for driver: %s", driver->name); } } /*Remove memory segment*/ munmap(driver->shmaddr, sizeof(struct _mmgui_history_shm)); close(driver->shmid); shm_unlink(shmname); } } static int mmgui_history_probe(struct ofono_history_context *context) { const gchar *path; mmgui_history_modem_t modem; mmgui_history_driver_t driver; gchar *drivername; if (context->modem == NULL) return 0; path = ofono_modem_get_path(context->modem); if ((path != NULL) && (historydata != NULL)) { if (historydata->modems != NULL) { modem = g_try_new0(struct _mmgui_history_modem, 1); if (modem != NULL) { /*New modem*/ modem->ofonoid = context->modem; /*Driver*/ drivername = mmgui_history_parse_driver_string(path, &(modem->identifier)); driver = g_hash_table_lookup(historydata->modems, context->modem); if (driver == NULL) { /*New driver*/ driver = g_try_new0(struct _mmgui_history_driver, 1); if (driver != NULL) { driver->name = drivername; driver->refcount = 0; /*Create shared memory segment*/ mmgui_history_create_driver_shm(driver); /*Connect modem with driver*/ modem->driver = driver; driver->refcount++; /*Insert driver into hash table*/ g_hash_table_insert(historydata->drivers, driver->name, driver); } else { modem->driver = NULL; g_free(drivername); } } else { /*Existing driver*/ modem->driver = driver; driver->refcount++; g_free(drivername); } /*Insert modem into hash table*/ g_hash_table_insert(historydata->modems, modem->ofonoid, modem); /*Debug output*/ ofono_debug("[HISTORY PLUGIN] Probe for modem: %p (%s - %i)", modem->ofonoid, modem->driver->name, modem->identifier); } } } return 0; } static void mmgui_history_remove(struct ofono_history_context *context) { mmgui_history_modem_t modem; if (historydata != NULL) { if (historydata->modems != NULL) { modem = g_hash_table_lookup(historydata->modems, context->modem); if (modem != NULL) { /*Modem exists*/ if (modem->driver != NULL) { /*Debug output*/ ofono_debug("[HISTORY PLUGIN] Remove modem: %p (%s)", modem->ofonoid, modem->driver->name); modem->driver->refcount--; if (modem->driver->refcount == 0) { /*Remove shared memory segment*/ mmgui_history_remove_driver_shm(modem->driver); /*Remove driver*/ g_hash_table_remove(historydata->drivers, modem->driver->name); } } /*Remove from hash table*/ g_hash_table_remove(historydata->modems, context->modem); } } } } static void mmgui_history_call_ended(struct ofono_history_context *context, const struct ofono_call *call, time_t start, time_t end) { ofono_debug("[HISTORY PLUGIN] Call Ended on modem: %p", context->modem); } static void mmgui_history_call_missed(struct ofono_history_context *context, const struct ofono_call *call, time_t when) { ofono_debug("[HISTORY PLUGIN] Call Missed on modem: %p", context->modem); } static void mmgui_history_sms_received(struct ofono_history_context *context, const struct ofono_uuid *uuid, const char *from, const struct tm *remote, const struct tm *local, const char *text) { mmgui_history_modem_t modem; datum key, data; const gchar *uuidstr; gchar msgid[128]; gsize msgidlen; guint64 localts, remotets; gchar *messagexml; if (historydata == NULL) return; if (historydata->modems == NULL) return; modem = g_hash_table_lookup(historydata->modems, context->modem); if (modem == NULL) return; if ((modem->driver != NULL) && (historydata->db != NULL)) { /*Test if modem already opened with application - no need to cache message*/ if ((modem->driver->shmaddr->identifier != -1) && (modem->driver->shmaddr->identifier == modem->identifier) && (modem->driver->shmaddr->flags & MMGUI_HISTORY_SHM_FLAGS_SYNC)) { return; } /*Message identifier (uuid@driver@timestamp)*/ uuidstr = ofono_uuid_to_str(uuid); localts = (guint64)time(NULL); memset(msgid, 0, sizeof(msgid)); msgidlen = snprintf(msgid, sizeof(msgid), "%s@%s@%" G_GUINT64_FORMAT, uuidstr, modem->driver->name, localts); key.dptr = (gchar *)msgid; key.dsize = msgidlen; /*Timestamp*/ localts = (guint64)mktime((struct tm *)local); remotets = (guint64)mktime((struct tm *)remote); /*Form XML*/ messagexml = g_strdup_printf(MMGUI_HISTORY_SHM_DB_MESSAGE, localts, remotets, modem->driver->name, from, text); data.dptr = messagexml; data.dsize = strlen(messagexml); /*Save to database*/ if (gdbm_store(historydata->db, key, data, GDBM_REPLACE) == -1) { gdbm_close(historydata->db); g_free(messagexml); return; } /*Synchronize database*/ gdbm_sync(historydata->db); g_free(messagexml); /*Set driver state unsynchronized*/ modem->driver->shmaddr->flags = MMGUI_HISTORY_SHM_FLAGS_NONE; ofono_debug("[HISTORY PLUGIN] Incoming SMS on modem: %p (%s)", context->modem, modem->driver->name); } } static void mmgui_history_sms_send_pending(struct ofono_history_context *context, const struct ofono_uuid *uuid, const char *to, time_t when, const char *text) { char buf[128]; ofono_debug("[HISTORY PLUGIN] Sending SMS on modem: %p", context->modem); ofono_debug("InternalMessageId: %s", ofono_uuid_to_str(uuid)); ofono_debug("To: %s:", to); strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&when)); buf[127] = '\0'; ofono_debug("Local Time: %s", buf); ofono_debug("Text: %s", text); } static void mmgui_history_sms_send_status(struct ofono_history_context *context, const struct ofono_uuid *uuid, time_t when, enum ofono_history_sms_status s) { char buf[128]; strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&when)); buf[127] = '\0'; switch (s) { case OFONO_HISTORY_SMS_STATUS_PENDING: break; case OFONO_HISTORY_SMS_STATUS_SUBMITTED: ofono_debug("SMS %s submitted successfully", ofono_uuid_to_str(uuid)); ofono_debug("Submission Time: %s", buf); break; case OFONO_HISTORY_SMS_STATUS_SUBMIT_FAILED: ofono_debug("Sending SMS %s failed", ofono_uuid_to_str(uuid)); ofono_debug("Failure Time: %s", buf); break; case OFONO_HISTORY_SMS_STATUS_SUBMIT_CANCELLED: ofono_debug("Submission of SMS %s was canceled", ofono_uuid_to_str(uuid)); ofono_debug("Cancel time: %s", buf); break; case OFONO_HISTORY_SMS_STATUS_DELIVERED: ofono_debug("SMS delivered, msg_id: %s, time: %s", ofono_uuid_to_str(uuid), buf); break; case OFONO_HISTORY_SMS_STATUS_DELIVER_FAILED: ofono_debug("SMS undeliverable, msg_id: %s, time: %s", ofono_uuid_to_str(uuid), buf); break; default: break; } } static struct ofono_history_driver mmgui_driver = { .name = "MMGUI SMS History", .probe = mmgui_history_probe, .remove = mmgui_history_remove, .call_ended = mmgui_history_call_ended, .call_missed = mmgui_history_call_missed, .sms_received = mmgui_history_sms_received, .sms_send_pending = mmgui_history_sms_send_pending, .sms_send_status = mmgui_history_sms_send_status, }; static int mmgui_history_init(void) { int res; ofono_debug("[HISTORY PLUGIN] Init"); if (historydata == NULL) { /*Global data segment*/ historydata = g_try_new0(struct _mmgui_history_data, 1); if (historydata == NULL) { return -ENOMEM; } /*Create database directory if not exists*/ if (g_mkdir_with_parents(MMGUI_HISTORY_SHM_DB_PATH, MMGUI_HISTORY_SHM_DB_PERM) != 0) { ofono_debug("Error while creating database directory: %s", strerror(errno)); return -ENOENT; } /*Open database*/ historydata->db = gdbm_open(MMGUI_HISTORY_SHM_DB_FILE, 0, GDBM_WRCREAT, MMGUI_HISTORY_SHM_DB_PERM, 0); if (historydata->db == NULL) { ofono_debug("Error while opening database"); return -ENOENT; } /*Create modems hash table*/ historydata->modems = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, mmgui_history_remove_modem); /*Create drivers hash table*/ historydata->drivers = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, mmgui_history_remove_driver); } res = ofono_history_driver_register(&mmgui_driver); return res; } static void mmgui_history_exit(void) { ofono_debug("[HISTORY PLUGIN] Exit"); if (historydata != NULL) { /*Close database*/ if (historydata->db != NULL) { gdbm_sync(historydata->db); gdbm_close(historydata->db); } /*Destroy modems hash table*/ if (historydata->modems != NULL) { g_hash_table_destroy(historydata->modems); } /*Destroy drivers hash table*/ if (historydata->drivers != NULL) { g_hash_table_destroy(historydata->drivers); } /*Free memory segment*/ g_free(historydata); historydata = NULL; } ofono_history_driver_unregister(&mmgui_driver); } OFONO_PLUGIN_DEFINE(mmgui_history, "MMGUI SMS History Plugin", OFONO_VERSION, OFONO_PLUGIN_PRIORITY_DEFAULT, mmgui_history_init, mmgui_history_exit) modem-manager-gui-0.0.17.1/src/plugins/Makefile0000644000175000017500000000145412400622076017610 0ustar alexalexinclude ../../Makefile_h GCCMOD = gcc -fPIC GCCLMOD = gcc -shared INCMOD = `pkg-config --cflags glib-2.0` `pkg-config --cflags ofono` LIBMOD = `pkg-config --libs glib-2.0` -lgdbm -lrt OFONOOBJMOD = ofonohistory.o OFONOLIBDIR = $(LIBPATH)/ofono/plugins/ FILES_OFONO:= $(wildcard mmgui-ofono*.so) all: ofonohistory ifeq ($(OFONOPLUGIN),true) ofonohistory: $(OFONOOBJMOD) $(GCCLMOD) $(INCMOD) $(LDFLAGS) $(OFONOOBJMOD) $(LIBMOD) -o mmgui-ofono-history.so else ofonohistory: endif .c.o: $(GCCMOD) $(INCMOD) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ install: mkdir -p $(INSTALLPREFIX)$(DESTDIR)$(OFONOLIBDIR) for f in $(FILES_OFONO); do \ cp $$f $(INSTALLPREFIX)$(DESTDIR)$(OFONOLIBDIR); \ done uninstall: rm -f $(INSTALLPREFIX)$(DESTDIR)$(OFONOLIBDIR)/*.so clean: rm -f *.o rm -f *.so modem-manager-gui-0.0.17.1/src/modules/historyshm.h0000644000175000017500000000463012310656662020530 0ustar alexalex/* * historyshm.h * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __HISTORYSHM_H__ #define __HISTORYSHM_H__ #include #include #define MMGUI_HISTORY_SHM_DB_PATH "/var/lib/modem-manager-gui/" #define MMGUI_HISTORY_SHM_DB_FILE "/var/lib/modem-manager-gui/history.db" #define MMGUI_HISTORY_SHM_DB_PERM 0755 #define MMGUI_HISTORY_SHM_SEGMENT_NAME "mmgui_%s" #define MMGUI_HISTORY_SHM_SEGMENT_PERM 0777 /*Shm flags*/ enum _mmgui_history_shm_flags { MMGUI_HISTORY_SHM_FLAGS_NONE = 0x00, MMGUI_HISTORY_SHM_FLAGS_SYNC = 0x01 }; /*Shm structure*/ struct _mmgui_history_shm { /*Driver flags (syncronized)*/ gint flags; /*Current device identifier*/ gint identifier; /*Synchronization timesatamp*/ guint64 synctime; }; typedef struct _mmgui_history_shm *mmgui_history_shm_t; struct _mmgui_history_shm_client { /*Database*/ GDBM_FILE db; /*Current device*/ gchar *drivername; gboolean devopened; /*Memory segment*/ gint shmid; mmgui_history_shm_t shmaddr; }; typedef struct _mmgui_history_shm_client *mmgui_history_shm_client_t; mmgui_history_shm_client_t mmgui_history_client_new(void); void mmgui_history_client_close(mmgui_history_shm_client_t client); gboolean mmgui_history_client_open_device(mmgui_history_shm_client_t client, const gchar *devpath); gboolean mmgui_history_client_close_device(mmgui_history_shm_client_t client); GSList *mmgui_history_client_enum_messages(mmgui_history_shm_client_t client); /*General purpose functions*/ guint64 mmgui_history_get_driver_from_key(const gchar *key, const gsize keylen, gchar *buf, gsize buflen); gchar *mmgui_history_parse_driver_string(const gchar *path, gint *identifier); #endif /* __HISTORYSHM_H__ */ modem-manager-gui-0.0.17.1/src/modules/historyshm.c0000644000175000017500000002421112375676400020523 0ustar alexalex/* * historyshm.c * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include "historyshm.h" #include "../smsdb.h" #include "../encoding.h" enum _mmgui_history_shm_client_xml_elements { MMGUI_HISTORY_SHM_XML_PARAM_LOCALTIME = 0, MMGUI_HISTORY_SHM_XML_PARAM_REMOTETIME, MMGUI_HISTORY_SHM_XML_PARAM_DRIVER, MMGUI_HISTORY_SHM_XML_PARAM_SENDER, MMGUI_HISTORY_SHM_XML_PARAM_TEXT, MMGUI_HISTORY_SHM_XML_PARAM_NULL }; static gint mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_NULL; static mmgui_sms_message_t mmgui_history_client_xml_parse(gchar *xml, gsize size); static void mmgui_history_client_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error); static void mmgui_history_client_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error); static void mmgui_history_client_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error); mmgui_history_shm_client_t mmgui_history_client_new(void) { GDBM_FILE db; mmgui_history_shm_client_t client; db = gdbm_open(MMGUI_HISTORY_SHM_DB_FILE, 0, GDBM_READER|GDBM_NOLOCK, MMGUI_HISTORY_SHM_DB_PERM, 0); if (db == NULL) return NULL; client = (mmgui_history_shm_client_t)g_new0(struct _mmgui_history_shm_client, 1); client->db = db; return client; } void mmgui_history_client_close(mmgui_history_shm_client_t client) { if (client == NULL) return; if (client->db != NULL) { gdbm_close(client->db); } } gboolean mmgui_history_client_open_device(mmgui_history_shm_client_t client, const gchar *devpath) { gchar *drivername; gint identifier; gchar shmname[64]; if ((client == NULL) || (devpath == NULL)) return FALSE; if (client->devopened) return FALSE; /*Driver name and identifier*/ drivername = mmgui_history_parse_driver_string(devpath, &identifier); if (drivername == NULL) return FALSE; /*Shared memory segment name*/ memset(shmname, 0, sizeof(shmname)); snprintf(shmname, sizeof(shmname), MMGUI_HISTORY_SHM_SEGMENT_NAME, drivername); /*Shared memory object*/ client->shmid = shm_open(shmname, O_RDWR, 0); if (client->shmid == -1) { client->devopened = FALSE; client->shmaddr = NULL; g_free(drivername); return FALSE; } /*Map shared memory fragment*/ client->shmaddr = (mmgui_history_shm_t)mmap(0, sizeof(struct _mmgui_history_shm), PROT_WRITE|PROT_READ, MAP_SHARED, client->shmid, 0); if ((char *)client->shmaddr == (char*)-1) { client->devopened = FALSE; client->shmaddr = NULL; close(client->shmid); g_free(drivername); return FALSE; } /*Set device identifier*/ client->shmaddr->identifier = identifier; client->drivername = drivername; /*Device opened*/ client->devopened = TRUE; return TRUE; } gboolean mmgui_history_client_close_device(mmgui_history_shm_client_t client) { if (client == NULL) return FALSE; if (!client->devopened) return FALSE; /*Drop device identifier*/ client->shmaddr->identifier = -1; /*Remove shared memory segment*/ if (client->shmaddr != NULL) { /*Remove memory segment*/ munmap(client->shmaddr, sizeof(struct _mmgui_history_shm)); close(client->shmid); } if (client->drivername != NULL) { g_free(client->drivername); } /*Device closed*/ client->devopened = FALSE; return TRUE; } GSList *mmgui_history_client_enum_messages(mmgui_history_shm_client_t client) { GSList *messages; mmgui_sms_message_t message; datum key, data; gchar drvstr[128]; guint64 localts, maxts; if (client == NULL) return NULL; if ((!client->devopened) || (client->db == NULL) || (client->shmaddr == NULL) || (client->drivername == NULL)) return NULL; messages = NULL; maxts = 0; key = gdbm_firstkey(client->db); if (key.dptr != NULL) { do { localts = mmgui_history_get_driver_from_key(key.dptr, key.dsize, (gchar *)&drvstr, sizeof(drvstr)); if (localts != 0) { if ((g_str_equal(drvstr, client->drivername)) && ((client->shmaddr->synctime == 0) || ((client->shmaddr->synctime != 0) && (localts > client->shmaddr->synctime)))) { data = gdbm_fetch(client->db, key); if (data.dptr != NULL) { message = mmgui_history_client_xml_parse(data.dptr, data.dsize); if (message != NULL) { messages = g_slist_prepend(messages, message); if (localts > maxts) { maxts = localts; } } } } } key = gdbm_nextkey(client->db, key); } while (key.dptr != NULL); } /*Maximum timestamp for next synchronizations*/ if (messages != NULL) { client->shmaddr->synctime = maxts; } /*Set synchronized*/ client->shmaddr->flags |= MMGUI_HISTORY_SHM_FLAGS_SYNC; return messages; } static mmgui_sms_message_t mmgui_history_client_xml_parse(gchar *xml, gsize size) { mmgui_sms_message_t message; GMarkupParser mp; GMarkupParseContext *mpc; GError *error = NULL; message = mmgui_smsdb_message_create(); mp.start_element = mmgui_history_client_xml_get_element; mp.end_element = mmgui_history_client_xml_end_element; mp.text = mmgui_history_client_xml_get_value; mp.passthrough = NULL; mp.error = NULL; mpc = g_markup_parse_context_new(&mp, 0, (gpointer)message, NULL); g_markup_parse_context_parse(mpc, xml, size, &error); if (error != NULL) { g_debug("Error parsing XML: %s", error->message); g_error_free(error); g_markup_parse_context_free(mpc); mmgui_smsdb_message_free(message); return NULL; } g_markup_parse_context_free(mpc); return message; } static void mmgui_history_client_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error) { if (g_str_equal(element, "localtime")) { mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_LOCALTIME; } else if (g_str_equal(element, "remotetime")) { mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_REMOTETIME; } else if (g_str_equal(element, "driver")) { mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_DRIVER; } else if (g_str_equal(element, "sender")) { mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_SENDER; } else if (g_str_equal(element, "text")) { mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_TEXT; } else { mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_NULL; } } static void mmgui_history_client_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error) { mmgui_sms_message_t message; time_t timestamp; gchar *escstr; message = (mmgui_sms_message_t)data; if (mmgui_history_shm_client_xml_parameter == MMGUI_HISTORY_SHM_XML_PARAM_NULL) return; switch (mmgui_history_shm_client_xml_parameter) { case MMGUI_HISTORY_SHM_XML_PARAM_LOCALTIME: timestamp = (time_t)atol(text); mmgui_smsdb_message_set_timestamp(message, timestamp); break; case MMGUI_HISTORY_SHM_XML_PARAM_REMOTETIME: //not needed now break; case MMGUI_HISTORY_SHM_XML_PARAM_DRIVER: //not needed now break; case MMGUI_HISTORY_SHM_XML_PARAM_SENDER: escstr = encoding_unescape_xml_markup(text, size); if (escstr != NULL) { mmgui_smsdb_message_set_number(message, (const gchar *)escstr); g_free(escstr); } else { mmgui_smsdb_message_set_number(message, text); } break; case MMGUI_HISTORY_SHM_XML_PARAM_TEXT: escstr = encoding_unescape_xml_markup(text, size); if (escstr != NULL) { mmgui_smsdb_message_set_text(message, (const gchar *)escstr, FALSE); g_free(escstr); } else { mmgui_smsdb_message_set_text(message, text, FALSE); } break; default: break; } } static void mmgui_history_client_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error) { if (!g_str_equal(element, "message")) { mmgui_history_shm_client_xml_parameter = MMGUI_HISTORY_SHM_XML_PARAM_NULL; } } guint64 mmgui_history_get_driver_from_key(const gchar *key, const gsize keylen, gchar *buf, gsize buflen) { gchar *drvstr, *timestr; gsize drvlen; guint64 localts; if ((key == NULL) || (keylen == 0) || (buf == NULL) || (buflen == 0)) return 0; drvstr = strchr(key, '@'); if (drvstr == NULL) return 0; timestr = strchr(drvstr+1, '@'); if (timestr == NULL) return 0; drvlen = timestr - drvstr - 1; if (drvlen > buflen) { drvlen = buflen; } localts = atol(timestr+1); memset(buf, 0, buflen); if (strncpy(buf, drvstr+1, drvlen) != NULL) { return localts; } else { return 0; } } gchar *mmgui_history_parse_driver_string(const gchar *path, gint *identifier) { gsize pathlen, driverlen; guint idpos; gchar *drivername; if (path == NULL) return NULL; if ((path[0] != '/') || (strchr(path+1, '_') == NULL)) return NULL; pathlen = strlen(path); driverlen = 0; /*Find delimiter (driver string is in format: /driver_identifier)*/ for (idpos=pathlen; idpos>0; idpos--) { if (path[idpos] == '_') { driverlen = idpos-1; } } if (driverlen > 0) { /*Allocate driver name buffer and copy name*/ drivername = g_try_malloc0(driverlen+1); if (drivername != NULL) { memcpy(drivername, path+1, driverlen); /*Return identifier if needed*/ if (identifier != NULL) { *identifier = atoi(path+idpos+1); } } return drivername; } return NULL; } modem-manager-gui-0.0.17.1/src/modules/Makefile0000644000175000017500000000417612400622107017576 0ustar alexalexinclude ../../Makefile_h GCCMOD = gcc -fPIC GCCLMOD = gcc -shared INCMOD = `pkg-config --cflags glib-2.0` `pkg-config --cflags gmodule-2.0` `pkg-config --cflags gio-2.0` LIBMOD = `pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0` `pkg-config --libs gio-2.0` LIBMOD1 = `pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0` `pkg-config --libs gio-2.0` -lgdbm LIBMOD2 = `pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0` `pkg-config --libs gio-2.0` -lgdbm LIBMOD5 = `pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0` `pkg-config --libs gio-2.0` -lgdbm -lrt OBJMOD1 = smsdb.o encoding.o mm06.o OBJMOD2 = smsdb.o encoding.o mm07.o OBJMOD3 = nm09.o OBJMOD4 = pppd245.o OBJMOD5 = smsdb.o encoding.o historyshm.o vcard.o ofono109.o OBJMOD6 = connman112.o LIBDIR = $(LIBPATH)/modem-manager-gui/modules/ all: mm06 mm07 nm09 pppd245 ofono109 connman112 #Modem Manager <= 0.6.2 mm06: $(OBJMOD1) $(GCCLMOD) $(INCMOD) $(LDFLAGS) $(OBJMOD1) $(LIBMOD1) -o modmm_mm06.so #Modem Manager >= 0.7.0 mm07: $(OBJMOD2) $(GCCLMOD) $(INCMOD) $(LDFLAGS) $(OBJMOD2) $(LIBMOD2) -o modmm_mm07.so #Network Manager >= 0.9.0 nm09: $(OBJMOD3) $(GCCLMOD) $(INCMOD) $(LDFLAGS) $(OBJMOD3) $(LIBMOD) -o modcm_nm09.so #PPPD >= 2.4.5 pppd245: $(OBJMOD4) $(GCCLMOD) $(INCMOD) $(LDFLAGS) $(OBJMOD4) $(LIBMOD) -o modcm_pppd245.so #oFono >= 1.9 ofono109: $(OBJMOD5) $(GCCLMOD) $(INCMOD) $(LDFLAGS) $(OBJMOD5) $(LIBMOD5) -o modmm_ofono109.so #Connman >= 1.12 connman112: $(OBJMOD6) $(GCCLMOD) $(INCMOD) $(LDFLAGS) $(OBJMOD6) $(LIBMOD) -o modcm_connman112.so #Shared SMS database smsdb.o: ../smsdb.c $(GCCMOD) $(INCMOD) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ #Shared string encoding functions encoding.o: ../encoding.c $(GCCMOD) $(INCMOD) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ #Shared VCard format parser vcard.o: ../vcard.c $(GCCMOD) $(INCMOD) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ .c.o: $(GCCMOD) $(INCMOD) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ install: mkdir -p $(INSTALLPREFIX)$(DESTDIR)$(LIBDIR) cp *.so $(INSTALLPREFIX)$(DESTDIR)$(LIBDIR) uninstall: rm -f $(INSTALLPREFIX)$(DESTDIR)$(LIBDIR)/*.so clean: rm -f *.o rm -f *.so modem-manager-gui-0.0.17.1/src/modules/mm06.c0000644000175000017500000024627312377333343017105 0ustar alexalex/* * mm06.c * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "../mmguicore.h" #include "../smsdb.h" #include "../encoding.h" #define MMGUI_MODULE_SERVICE_NAME "org.freedesktop.ModemManager" #define MMGUI_MODULE_IDENTIFIER 60 #define MMGUI_MODULE_DESCRIPTION "Modem Manager <= 0.6.0/Wader" #define MMGUI_MODULE_ENABLE_OPERATION_TIMEOUT 20000 #define MMGUI_MODULE_SEND_SMS_OPERATION_TIMEOUT 35000 #define MMGUI_MODULE_SEND_USSD_OPERATION_TIMEOUT 25000 #define MMGUI_MODULE_NETWORKS_SCAN_OPERATION_TIMEOUT 60000 #define MMGUI_MODULE_SMS_POLL_INTERVAL 3 //Location types internal flags typedef enum { MODULE_INT_MODEM_LOCATION_CAPABILITY_UNKNOWN = 0x0, MODULE_INT_MODEM_LOCATION_CAPABILITY_GPS_NMEA = 0x1, MODULE_INT_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI = 0x2 } ModuleIntModemLocationCapability; /*Registration types internal flags*/ typedef enum { MODULE_INT_GSM_NETWORK_REG_STATUS_IDLE = 0, MODULE_INT_GSM_NETWORK_REG_STATUS_HOME = 1, MODULE_INT_GSM_NETWORK_REG_STATUS_SEARCHING = 2, MODULE_INT_GSM_NETWORK_REG_STATUS_DENIED = 3, MODULE_INT_GSM_NETWORK_REG_STATUS_UNKNOWN = 4, MODULE_INT_GSM_NETWORK_REG_STATUS_ROAMING = 5 } ModuleIntGsmNetworkRegStatus; /*State internal flags*/ typedef enum { MODULE_INT_MODEM_STATE_UNKNOWN = 0, MODULE_INT_MODEM_STATE_DISABLED = 10, MODULE_INT_MODEM_STATE_DISABLING = 20, MODULE_INT_MODEM_STATE_ENABLING = 30, MODULE_INT_MODEM_STATE_ENABLED = 40, MODULE_INT_MODEM_STATE_SEARCHING = 50, MODULE_INT_MODEM_STATE_REGISTERED = 60, MODULE_INT_MODEM_STATE_DISCONNECTING = 70, MODULE_INT_MODEM_STATE_CONNECTING = 80, MODULE_INT_MODEM_STATE_CONNECTED = 90 }ModuleIntModemState; /*Service type*/ typedef enum { MODULE_INT_SERVICE_UNDEFINED = 0x0, MODULE_INT_SERVICE_MODEM_MANAGER = 0x1, MODULE_INT_SERVICE_WADER = 0x2 } ModuleIntService; //Private module variables struct _mmguimoduledata { //DBus connection GDBusConnection *connection; //DBus proxy objects GDBusProxy *managerproxy; GDBusProxy *cardproxy; GDBusProxy *netproxy; GDBusProxy *modemproxy; GDBusProxy *smsproxy; GDBusProxy *ussdproxy; GDBusProxy *locationproxy; GDBusProxy *timeproxy; GDBusProxy *contactsproxy; //Attached signal handlers gulong statesignal; gulong smssignal; //Property change signal gulong netpropsignal; gulong locationpropsignal; //Service type ModuleIntService service; //Legacy ModemManager versions gboolean needsmspolling; time_t polltimestamp; //USSD reencoding flag gboolean reencodeussd; //Last error message gchar *errormessage; //Cancellable GCancellable *cancellable; //Operations timeouts guint timeouts[MMGUI_DEVICE_OPERATIONS]; }; typedef struct _mmguimoduledata *moduledata_t; static void mmgui_module_handle_error_message(mmguicore_t mmguicore, GError *error); static guint mmgui_module_device_id(const gchar *devpath); static gint mmgui_module_gsm_operator_code(const gchar *opcodestr); static gboolean mmgui_module_device_registered_from_status(guint status); static mmguidevice_t mmgui_module_device_new(mmguicore_t mmguicore, const gchar *devpath); static gboolean mmgui_module_devices_update_registration(gpointer mmguicore, guint regstatus, gchar *operatorcode, gchar *operatorname); static gboolean mmgui_module_devices_update_device_mode(gpointer mmguicore, gint oldstate, gint newstate, guint changereason); static gboolean mmgui_module_devices_update_location(gpointer mmguicore, mmguidevice_t device); static gboolean mmgui_module_devices_enable_location(gpointer mmguicore, mmguidevice_t device, gboolean enable); static void mmgui_module_handle_error_message(mmguicore_t mmguicore, GError *error) { moduledata_t moduledata; if ((mmguicore == NULL) || (error == NULL)) return; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return; if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (error->message != NULL) { moduledata->errormessage = g_strdup(error->message); } else { moduledata->errormessage = g_strdup("Unknown error"); } g_warning("%s: %s", MMGUI_MODULE_DESCRIPTION, moduledata->errormessage); } static guint mmgui_module_device_id(const gchar *devpath) { guint id; gchar *devidstr; devidstr = strrchr(devpath, '/') + 1; if ((devidstr != NULL) && (devidstr[0] != '\0')) { id = atoi(devidstr); } else { id = 0; } return id; } static gint mmgui_module_gsm_operator_code(const gchar *opcodestr) { gsize length; gchar codepartbuf[4]; gint operatorcode; if (opcodestr == NULL) return 0; length = strlen(opcodestr); if (length < 5) return 0; operatorcode = 0; /*MCC*/ memset(codepartbuf, 0, sizeof(codepartbuf)); memcpy(codepartbuf, opcodestr, 3); operatorcode |= (atoi(codepartbuf) & 0x0000ffff) << 16; /*MNC*/ memset(codepartbuf, 0, sizeof(codepartbuf)); memcpy(codepartbuf, opcodestr + 3, length - 3); operatorcode |= atoi(codepartbuf) & 0x0000ffff; return operatorcode; } static void mmgui_signal_handler(GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters, gpointer data) { mmguicore_t mmguicore; moduledata_t moduledata; gchar *devpath, *operatorcode, *operatorname; mmguidevice_t device; guint id, oldstate, newstate, changereason, regstatus; gboolean status; mmguicore = (mmguicore_t)data; if (mmguicore == NULL) return; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return; if (mmguicore->eventcb != NULL) { if (g_str_equal(signal_name, "DeviceAdded")) { g_variant_get(parameters, "(o)", &devpath); if (devpath != NULL) { device = mmgui_module_device_new(mmguicore, devpath); (mmguicore->eventcb)(MMGUI_EVENT_DEVICE_ADDED, mmguicore, device); } } else if (g_str_equal(signal_name, "DeviceRemoved")) { g_variant_get(parameters, "(o)", &devpath); if (devpath != NULL) { id = mmgui_module_device_id(devpath); (mmguicore->eventcb)(MMGUI_EVENT_DEVICE_REMOVED, mmguicore, GUINT_TO_POINTER(id)); } } else if (g_str_equal(signal_name, "Completed")) { g_variant_get(parameters, "(ub)", &id, &status); if ((status) && (!moduledata->needsmspolling)) { (mmguicore->eventcb)(MMGUI_EVENT_SMS_COMPLETED, mmguicore, GUINT_TO_POINTER(id)); } } else if (g_str_equal(signal_name, "SignalQuality")) { g_variant_get(parameters, "(u)", &id); if (mmguicore->device != NULL) { mmguicore->device->siglevel = id; (mmguicore->eventcb)(MMGUI_EVENT_SIGNAL_LEVEL_CHANGE, mmguicore, mmguicore->device); } } else if (g_str_equal(signal_name, "RegistrationInfo")) { if (mmguicore->device != NULL) { g_variant_get(parameters, "(uss)", ®status, &operatorcode, &operatorname); if (mmgui_module_devices_update_registration(mmguicore, regstatus, operatorcode, operatorname)) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE, mmguicore, mmguicore->device); } } } else if (g_str_equal(signal_name, "StateChanged")) { if (mmguicore->device != NULL) { g_variant_get(parameters, "(uuu)", &oldstate, &newstate, &changereason); mmgui_module_devices_update_device_mode(mmguicore, oldstate, newstate, changereason); } } } g_debug("SIGNAL: %s (%s) argtype: %s\n", signal_name, sender_name, g_variant_get_type_string(parameters)); } static void mmgui_property_change_handler(GDBusProxy *proxy, GVariant *changed_properties, GStrv invalidated_properties, gpointer data) { mmguicore_t mmguicore; mmguidevice_t device; GVariantIter *iter; const gchar *key; GVariant *value; if ((changed_properties == NULL) || (data == NULL)) return; mmguicore = (mmguicore_t)data; if (mmguicore->device == NULL) return; device = mmguicore->device; if (g_variant_n_children(changed_properties) > 0) { g_variant_get(changed_properties, "a{sv}", &iter); while (g_variant_iter_loop(iter, "{&sv}", &key, &value)) { if (g_str_equal(key, "Location")) { /*Enable location interface and update location*/ if (mmgui_module_devices_enable_location(mmguicore, device, TRUE)) { if (mmgui_module_devices_update_location(mmguicore, device)) { if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_LOCATION_CHANGE, mmguicore, device); } } } } else if (g_str_equal(key, "AllowedMode")) { /*Update allowed mode*/ device->allmode = g_variant_get_uint32(value); if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_MODE_CHANGE, mmguicore, device); } } else if (g_str_equal(key, "AccessTechnology")) { /*Update access technology*/ device->mode = g_variant_get_uint32(value); if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_MODE_CHANGE, mmguicore, device); } } g_debug("Property changed: %s\n", key); } g_variant_iter_free(iter); } } static gboolean mmgui_module_device_enabled_from_state(guint state) { gboolean enabled; switch (state) { case MODULE_INT_MODEM_STATE_UNKNOWN: case MODULE_INT_MODEM_STATE_DISABLED: case MODULE_INT_MODEM_STATE_DISABLING: case MODULE_INT_MODEM_STATE_ENABLING: enabled = FALSE; break; case MODULE_INT_MODEM_STATE_ENABLED: case MODULE_INT_MODEM_STATE_SEARCHING: case MODULE_INT_MODEM_STATE_REGISTERED: case MODULE_INT_MODEM_STATE_DISCONNECTING: case MODULE_INT_MODEM_STATE_CONNECTING: case MODULE_INT_MODEM_STATE_CONNECTED: enabled = TRUE; break; default: enabled = FALSE; break; } return enabled; } static gboolean mmgui_module_device_locked_from_unlock_string(gchar *ustring) { gboolean locked; if (ustring == NULL) return FALSE; if (ustring[0] == '\0') { locked = FALSE; } else { locked = TRUE; } return locked; } static gboolean mmgui_module_device_connected_from_state(gint state) { gboolean connected; switch (state) { case MODULE_INT_MODEM_STATE_UNKNOWN: case MODULE_INT_MODEM_STATE_DISABLED: case MODULE_INT_MODEM_STATE_DISABLING: case MODULE_INT_MODEM_STATE_ENABLING: case MODULE_INT_MODEM_STATE_ENABLED: case MODULE_INT_MODEM_STATE_SEARCHING: case MODULE_INT_MODEM_STATE_REGISTERED: case MODULE_INT_MODEM_STATE_DISCONNECTING: case MODULE_INT_MODEM_STATE_CONNECTING: connected = FALSE; break; case MODULE_INT_MODEM_STATE_CONNECTED: connected = TRUE; break; default: connected = FALSE; break; } return connected; } static gboolean mmgui_module_device_registered_from_status(guint status) { gboolean registered; switch (status) { case MODULE_INT_GSM_NETWORK_REG_STATUS_IDLE: registered = FALSE; break; case MODULE_INT_GSM_NETWORK_REG_STATUS_HOME: registered = TRUE; break; case MODULE_INT_GSM_NETWORK_REG_STATUS_SEARCHING: case MODULE_INT_GSM_NETWORK_REG_STATUS_DENIED: case MODULE_INT_GSM_NETWORK_REG_STATUS_UNKNOWN: registered = FALSE; break; case MODULE_INT_GSM_NETWORK_REG_STATUS_ROAMING: registered = TRUE; break; default: registered = FALSE; break; } return registered; } static mmguidevice_t mmgui_module_device_new(mmguicore_t mmguicore, const gchar *devpath) { mmguidevice_t device; moduledata_t moduledata; GDBusProxy *deviceproxy; GError *error; GVariant *deviceinfo; gchar *manufacturer, *model, *version, *blockstr; gsize strsize; if ((mmguicore == NULL) || (devpath == NULL)) return NULL; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return NULL; if (moduledata->connection == NULL) return NULL; device = g_new0(struct _mmguidevice, 1); //Save device identifier and object path device->id = mmgui_module_device_id(devpath); device->objectpath = g_strdup(devpath); //If service type not defined, guess it using device object path if (devpath != NULL) { if (moduledata->service == MODULE_INT_SERVICE_UNDEFINED) { if (strstr(devpath, "Modems") != NULL) { moduledata->service = MODULE_INT_SERVICE_MODEM_MANAGER; } else if (strstr(devpath, "Devices") != NULL) { moduledata->service = MODULE_INT_SERVICE_WADER; } } } device->operation = MMGUI_DEVICE_OPERATION_IDLE; //Zero values we can't get this moment //SMS device->smscaps = MMGUI_SMS_CAPS_NONE; device->smsdb = NULL; //Networks //Info device->operatorname = NULL; device->operatorcode = 0; device->imei = NULL; device->imsi = NULL; //USSD device->ussdcaps = MMGUI_USSD_CAPS_NONE; device->ussdencoding = MMGUI_USSD_ENCODING_GSM7; //Location device->locationcaps = MMGUI_LOCATION_CAPS_NONE; memset(device->loc3gppdata, 0, sizeof(device->loc3gppdata)); memset(device->locgpsdata, 0, sizeof(device->locgpsdata)); //Scan device->scancaps = MMGUI_SCAN_CAPS_NONE; //Traffic device->rxbytes = 0; device->txbytes = 0; device->sessiontime = 0; device->speedchecktime = 0; device->smschecktime = 0; device->speedindex = 0; device->connected = FALSE; memset(device->speedvalues, 0, sizeof(device->speedvalues)); memset(device->interface, 0, sizeof(device->interface)); //Contacts device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; device->contactslist = NULL; error = NULL; deviceproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", devpath, "org.freedesktop.ModemManager.Modem", NULL, &error); if ((deviceproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_object_unref(deviceproxy); //Fill default values device->manufacturer = g_strdup(_("Unknown")); device->model = g_strdup(_("Unknown")); device->version = g_strdup(_("Unknown")); device->port = g_strdup(_("Unknown")); device->type = MMGUI_DEVICE_TYPE_GSM; return device; } //Is device enabled deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "Enabled"); if (deviceinfo != NULL) { device->enabled = g_variant_get_boolean(deviceinfo); g_variant_unref(deviceinfo); } else { device->enabled = TRUE; g_debug("Failed to retrieve device enabled state, assuming enabled\n"); } //Is device blocked deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "UnlockRequired"); if (deviceinfo != NULL) { strsize = 256; blockstr = (gchar *)g_variant_get_string(deviceinfo, &strsize); device->blocked = mmgui_module_device_locked_from_unlock_string(blockstr); g_variant_unref(deviceinfo); } else { device->blocked = FALSE; g_debug("Failed to retrieve device blocked state, assuming not blocked\n"); } /*Wader needs to enable modem before working with it*/ if (moduledata->service == MODULE_INT_SERVICE_WADER) { if (!device->enabled) { error = NULL; g_dbus_proxy_call_sync(deviceproxy, "Enable", g_variant_new("(b)", TRUE), 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_object_unref(deviceproxy); //Fill default values device->manufacturer = g_strdup(_("Unknown")); device->model = g_strdup(_("Unknown")); device->version = g_strdup(_("Unknown")); device->port = g_strdup(_("Unknown")); device->type = MMGUI_DEVICE_TYPE_GSM; return device; } } } error = NULL; deviceinfo = g_dbus_proxy_call_sync(deviceproxy, "GetInfo", NULL, 0, -1, NULL, &error); if ((deviceinfo == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_object_unref(deviceproxy); //Fill default values device->manufacturer = g_strdup(_("Unknown")); device->model = g_strdup(_("Unknown")); device->version = g_strdup(_("Unknown")); device->port = g_strdup(_("Unknown")); device->type = MMGUI_DEVICE_TYPE_GSM; return device; } g_variant_get(deviceinfo, "((sss))", &manufacturer, &model, &version); if (manufacturer != NULL) { device->manufacturer = g_strdup(manufacturer); } else { device->manufacturer = g_strdup(_("Unknown")); } if (model != NULL) { device->model = g_strdup(model); } else { device->model = g_strdup(_("Unknown")); } if (version != NULL) { device->version = g_strdup(version); } else { device->version = g_strdup(_("Unknown")); } g_variant_unref(deviceinfo); //Device path deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "Device"); if (deviceinfo != NULL) { strsize = 256; device->port = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->sysfspath = NULL; g_debug("Failed to retrieve device path\n"); } //Need to get usb device serial for fallback traffic monitoring deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "MasterDevice"); if (deviceinfo != NULL) { strsize = 256; device->sysfspath = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->sysfspath = NULL; g_debug("Failed to retrieve device serial specification\n"); } //Device type deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "Type"); if (deviceinfo != NULL) { device->type = g_variant_get_uint32(deviceinfo); g_variant_unref(deviceinfo); } else { device->type = MMGUI_DEVICE_TYPE_GSM; g_debug("Failed to retrieve device type, assuming GSM\n"); } //Internal Modem Manager identifier (some services, e.g. Wader not using it) if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "DeviceIdentifier"); if (deviceinfo != NULL) { strsize = 256; device->internalid = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->internalid = NULL; g_debug("Failed to retrieve device internal identifier\n"); } } else { device->internalid = NULL; } //Persistent device identifier blockstr = g_strdup_printf("%s_%s_%s", device->manufacturer, device->model, device->version); device->persistentid = g_compute_checksum_for_string(G_CHECKSUM_MD5, (const gchar *)blockstr, -1); g_free(blockstr); g_object_unref(deviceproxy); return device; } G_MODULE_EXPORT gboolean mmgui_module_init(mmguimodule_t module) { if (module == NULL) return FALSE; module->type = MMGUI_MODULE_TYPE_MODEM_MANAGER; module->requirement = MMGUI_MODULE_REQUIREMENT_SERVICE; module->priority = MMGUI_MODULE_PRIORITY_LOW; module->identifier = MMGUI_MODULE_IDENTIFIER; module->functions = MMGUI_MODULE_FUNCTION_BASIC; g_snprintf(module->servicename, sizeof(module->servicename), MMGUI_MODULE_SERVICE_NAME); g_snprintf(module->description, sizeof(module->description), MMGUI_MODULE_DESCRIPTION); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_open(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t *moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t *)&mmguicorelc->moduledata; (*moduledata) = g_new0(struct _mmguimoduledata, 1); error = NULL; (*moduledata)->connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); (*moduledata)->errormessage = NULL; if (((*moduledata)->connection == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_free(mmguicorelc->moduledata); return FALSE; } error = NULL; (*moduledata)->managerproxy = g_dbus_proxy_new_sync((*moduledata)->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", "/org/freedesktop/ModemManager", "org.freedesktop.ModemManager", NULL, &error); if (((*moduledata)->managerproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_object_unref((*moduledata)->connection); g_free(mmguicorelc->moduledata); return FALSE; } g_signal_connect(G_OBJECT((*moduledata)->managerproxy), "g-signal", G_CALLBACK(mmgui_signal_handler), mmguicore); //Set service type to undefined before using any functions (*moduledata)->service = MODULE_INT_SERVICE_UNDEFINED; /*Cancellable*/ (*moduledata)->cancellable = g_cancellable_new(); /*Operations timeouts*/ (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_ENABLE] = MMGUI_MODULE_ENABLE_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SEND_SMS] = MMGUI_MODULE_SEND_SMS_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SEND_USSD] = MMGUI_MODULE_SEND_USSD_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SCAN] = MMGUI_MODULE_NETWORKS_SCAN_OPERATION_TIMEOUT; return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->moduledata); //Close device //Stop subsystems if (moduledata != NULL) { if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (moduledata->cancellable != NULL) { g_object_unref(moduledata->cancellable); moduledata->cancellable = NULL; } if (moduledata->managerproxy != NULL) { g_object_unref(moduledata->managerproxy); moduledata->managerproxy = NULL; } if (moduledata->connection != NULL) { g_object_unref(moduledata->connection); moduledata->connection = NULL; } g_free(moduledata); } return TRUE; } G_MODULE_EXPORT gchar *mmgui_module_last_error(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->moduledata); return moduledata->errormessage; } G_MODULE_EXPORT gboolean mmgui_module_interrupt_operation(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (device->operation == MMGUI_DEVICE_OPERATION_IDLE) return FALSE; if (moduledata->cancellable != NULL) { g_cancellable_cancel(moduledata->cancellable); return TRUE; } else { return FALSE; } } G_MODULE_EXPORT gboolean mmgui_module_set_timeout(gpointer mmguicore, guint operation, guint timeout) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (timeout < 1000) timeout *= 1000; if (operation < MMGUI_DEVICE_OPERATIONS) { moduledata->timeouts[operation] = timeout; return TRUE; } else { return FALSE; } } G_MODULE_EXPORT guint mmgui_module_devices_enum(gpointer mmguicore, GSList **devicelist) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *devices; guint devnum; GVariantIter diterl1, diterl2; GVariant *dnodel1, *dnodel2; gsize devpathsize; const gchar *devpath; if ((mmguicore == NULL) || (devicelist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; devices = g_dbus_proxy_call_sync(moduledata->managerproxy, "EnumerateDevices", NULL, 0, -1, NULL, &error); if ((devices == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return 0; } devnum = 0; g_variant_iter_init(&diterl1, devices); while ((dnodel1 = g_variant_iter_next_value(&diterl1)) != NULL) { g_variant_iter_init(&diterl2, dnodel1); while ((dnodel2 = g_variant_iter_next_value(&diterl2)) != NULL) { devpathsize = 256; devpath = g_variant_get_string(dnodel2, &devpathsize); if (devpath != NULL) { //Add device to list *devicelist = g_slist_prepend(*devicelist, mmgui_module_device_new(mmguicore, devpath)); devnum++; g_variant_unref(dnodel2); } } g_variant_unref(dnodel1); } g_variant_unref(devices); return devnum; } G_MODULE_EXPORT gboolean mmgui_module_devices_state(gpointer mmguicore, enum _mmgui_device_state_request request) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GVariant *data; GError *error; gsize strsize = 256; gchar *lockstr, *operatorcode, *operatorname; guint regstatus; gboolean res; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; switch (request) { case MMGUI_DEVICE_STATE_REQUEST_ENABLED: /*Is device enabled*/ if (moduledata->modemproxy != NULL) { data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "Enabled"); if (data != NULL) { res = g_variant_get_boolean(data); if (device->operation != MMGUI_DEVICE_OPERATION_ENABLE) { device->enabled = res; } g_variant_unref(data); } else { res = FALSE; } } else { res = FALSE; } break; case MMGUI_DEVICE_STATE_REQUEST_LOCKED: /*Is device blocked*/ if (moduledata->modemproxy != NULL) { data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "UnlockRequired"); if (data != NULL) { lockstr = (gchar *)g_variant_get_string(data, &strsize); res = mmgui_module_device_locked_from_unlock_string(lockstr); device->blocked = res; g_variant_unref(data); } else { res = FALSE; } } else { res = FALSE; } break; case MMGUI_DEVICE_STATE_REQUEST_REGISTERED: /*Is device registered in network*/ if (moduledata->netproxy != NULL) { error = NULL; data = g_dbus_proxy_call_sync(moduledata->netproxy, "GetRegistrationInfo", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); res = FALSE; } else { g_variant_get(data, "((uss))", ®status, &operatorcode, &operatorname); if (mmgui_module_devices_update_registration(mmguicore, regstatus, operatorcode, operatorname)) { res = mmgui_module_device_registered_from_status(device->regstatus); } else { res = mmgui_module_device_registered_from_status(regstatus); } g_variant_unref(data); } } else { res = FALSE; } break; case MMGUI_DEVICE_STATE_REQUEST_CONNECTED: /*Is device connected (modem manager state)*/ if (moduledata->modemproxy != NULL) { data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "State"); if (data != NULL) { res = mmgui_module_device_connected_from_state(g_variant_get_uint32(data)); g_variant_unref(data); } else { res = FALSE; } } else { res = FALSE; } break; default: res = FALSE; break; } return res; } G_MODULE_EXPORT gboolean mmgui_module_devices_update_state(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; time_t currenttime; guint msgnum; GError *error; GVariant *messages; GVariantIter miterl1, miterl2; GVariant *mnodel1, *mnodel2; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->smsproxy == NULL) return FALSE; if (!device->enabled) return FALSE; if (!(device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return FALSE; if (moduledata->needsmspolling) { currenttime = time(NULL); if (abs((gint)difftime(moduledata->polltimestamp, currenttime)) >= MMGUI_MODULE_SMS_POLL_INTERVAL) { moduledata->polltimestamp = currenttime; error = NULL; messages = g_dbus_proxy_call_sync(moduledata->smsproxy, "List", NULL, 0, -1, NULL, &error); if ((messages == NULL) && (error != NULL)) { g_error_free(error); msgnum = 0; } else { msgnum = 0; g_variant_iter_init(&miterl1, messages); while ((mnodel1 = g_variant_iter_next_value(&miterl1)) != NULL) { g_variant_iter_init(&miterl2, mnodel1); while ((mnodel2 = g_variant_iter_next_value(&miterl2)) != NULL) { msgnum++; g_variant_unref(mnodel2); } g_variant_unref(mnodel1); } g_variant_unref(messages); } g_debug("SMS messages number from polling handler: %u\n", msgnum); if (msgnum > 0) { if (mmguicorelc->eventcb != NULL) { (mmguicorelc->eventcb)(MMGUI_EVENT_SMS_LIST_READY, mmguicore, GUINT_TO_POINTER(TRUE)); } } } } return TRUE; } static gboolean mmgui_module_devices_update_registration(gpointer mmguicore, guint regstatus, gchar *operatorcode, gchar *operatorname) { mmguicore_t mmguicorelc; mmguidevice_t device; if ((mmguicore == NULL) || (operatorcode == NULL) || (operatorname == NULL)) return FALSE; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (device->operatorname != NULL) { g_free(device->operatorname); } device->registered = mmgui_module_device_registered_from_status(regstatus); device->operatorcode = mmgui_module_gsm_operator_code(operatorcode); device->operatorname = g_strdup(operatorname); return TRUE; } static gboolean mmgui_module_devices_update_device_mode(gpointer mmguicore, gint oldstate, gint newstate, guint changereason) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; gboolean enabledsignal, blockedsignal, oldenabled, oldblocked; gsize strsize; GVariant *data; GError *error; gchar *blockstr; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; /*Upadate state flags*/ if (device->operation != MMGUI_DEVICE_OPERATION_ENABLE) { oldenabled = device->enabled; device->enabled = mmgui_module_device_enabled_from_state(newstate); } oldblocked = device->blocked; if (moduledata->modemproxy != NULL) { /*Device blocked status*/ data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "UnlockRequired"); if (data != NULL) { blockstr = (gchar *)g_variant_get_string(data, &strsize); device->blocked = mmgui_module_device_locked_from_unlock_string(blockstr); g_variant_unref(data); } else { device->blocked = FALSE; } } /*Is enabled signal needed */ if ((device->operation != MMGUI_DEVICE_OPERATION_ENABLE) && (oldenabled = device->enabled)) { enabledsignal = TRUE; } else { enabledsignal = FALSE; } /*Is blocked signal needed */ if (oldblocked != device->blocked) { blockedsignal = TRUE; } else { blockedsignal = FALSE; } /*Return if no signals will be sent*/ if ((!enabledsignal) && (!blockedsignal)) return TRUE; if (moduledata->cardproxy != NULL) { if (device->type == MMGUI_DEVICE_TYPE_GSM) { if (device->enabled) { //IMEI if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } error = NULL; data = g_dbus_proxy_call_sync(moduledata->cardproxy, "GetImei", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "(s)", &device->imei); device->imei = g_strdup(device->imei); g_variant_unref(data); } } if (device->enabled) { //IMSI if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } error = NULL; data = g_dbus_proxy_call_sync(moduledata->cardproxy, "GetImsi", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "(s)", &device->imsi); device->imsi = g_strdup(device->imsi); g_variant_unref(data); } } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { if (device->enabled) { //ESN if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } error = NULL; data = g_dbus_proxy_call_sync(moduledata->cardproxy, "GetEsn", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "(s)", &device->imsi); device->imsi = g_strdup(device->imsi); g_variant_unref(data); } } //No IMSI in CDMA if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } } } /*Enabled signal */ if (enabledsignal) { if (mmguicorelc->eventcb != NULL) { (mmguicorelc->eventcb)(MMGUI_EVENT_DEVICE_ENABLED_STATUS, mmguicorelc, GUINT_TO_POINTER(device->enabled)); } } /*Is blocked signal needed */ if (blockedsignal) { if (mmguicorelc->eventcb != NULL) { (mmguicorelc->eventcb)(MMGUI_EVENT_DEVICE_BLOCKED_STATUS, mmguicorelc, GUINT_TO_POINTER(device->blocked)); } } return TRUE; } static gboolean mmgui_module_devices_update_location(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *data; GVariantIter *iter; guint32 locationtype; GVariant *locationdata; gchar *locationstring; gsize strlength; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if ((!(device->locationcaps & MMGUI_LOCATION_CAPS_3GPP)) && (!(device->locationcaps & MMGUI_LOCATION_CAPS_GPS))) return FALSE; error = NULL; data = g_dbus_proxy_call_sync(moduledata->locationproxy, "GetLocation", NULL, 0, -1, NULL, &error); if ((data != NULL) && (error == NULL)) { g_variant_get(data, "(a{uv})", &iter); while (g_variant_iter_next(iter, "{uv}", &locationtype, &locationdata)) { if ((locationtype == MODULE_INT_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI) && (locationdata != NULL)) { //3GPP location strlength = 256; locationstring = g_strdup(g_variant_get_string(locationdata, &strlength)); device->loc3gppdata[0] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); device->loc3gppdata[1] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); device->loc3gppdata[2] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); device->loc3gppdata[3] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); g_free(locationstring); g_variant_unref(locationdata); g_debug("3GPP location: %u, %u, %4x, %4x", device->loc3gppdata[0], device->loc3gppdata[1], device->loc3gppdata[2], device->loc3gppdata[3]); } } g_variant_unref(data); return TRUE; } else { if (device->locationcaps & MMGUI_LOCATION_CAPS_3GPP) { memset(device->loc3gppdata, 0, sizeof(device->loc3gppdata)); } if (device->locationcaps & MMGUI_LOCATION_CAPS_GPS) { memset(device->locgpsdata, 0, sizeof(device->locgpsdata)); } mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } } static gboolean mmgui_module_devices_enable_location(gpointer mmguicore, mmguidevice_t device, gboolean enable) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *properties; guint locationtypes; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (!device->enabled) return FALSE; if (moduledata->locationproxy == NULL) return FALSE; if ((enable) && ((device->locationcaps & MMGUI_LOCATION_CAPS_3GPP) || (device->locationcaps & MMGUI_LOCATION_CAPS_GPS))) return TRUE; if ((!enable) && ((!(device->locationcaps & MMGUI_LOCATION_CAPS_3GPP)) && (!(device->locationcaps & MMGUI_LOCATION_CAPS_GPS)))) return TRUE; if (enable) { //Determine supported capabilities and turn on location engine properties = g_dbus_proxy_get_cached_property(moduledata->locationproxy, "Capabilities"); if (properties != NULL) { locationtypes = g_variant_get_uint32(properties); if (locationtypes & MODULE_INT_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI) { error = NULL; //Apply new settings g_dbus_proxy_call_sync(moduledata->locationproxy, "Enable", g_variant_new("(bb)", TRUE, TRUE), 0, -1, NULL, &error); //Set enabled properties if (error == NULL) { //3gpp location if (locationtypes & MODULE_INT_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI) { device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; } return TRUE; } else { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } g_variant_unref(properties); } } else { error = NULL; g_dbus_proxy_call_sync(moduledata->locationproxy, "Enable", g_variant_new("(bb)", FALSE, FALSE), 0, -1, NULL, &error); if (error == NULL) { return TRUE; } else { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } return FALSE; } G_MODULE_EXPORT gboolean mmgui_module_devices_information(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GVariant *data; GError *error; gchar *blockstr, *operatorcode; gsize strsize = 256; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->modemproxy != NULL) { //Is device enabled data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "Enabled"); if (data != NULL) { device->enabled = g_variant_get_boolean(data); g_variant_unref(data); } else { device->enabled = TRUE; g_debug("Failed to get device enabled state\n"); } //Is device blocked data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "UnlockRequired"); if (data != NULL) { blockstr = (gchar *)g_variant_get_string(data, &strsize); device->blocked = mmgui_module_device_locked_from_unlock_string(blockstr); g_variant_unref(data); } else { device->blocked = FALSE; g_debug("Failed to get device blocked state\n"); } } if (moduledata->netproxy != NULL) { if (device->enabled) { //Signal level device->siglevel = 0; error = NULL; data = g_dbus_proxy_call_sync(moduledata->netproxy, "GetSignalQuality", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "(u)", &device->siglevel); g_variant_unref(data); } } //Operator device->operatorcode = 0; if (device->operatorname != NULL) { g_free(device->operatorname); device->operatorname = NULL; } device->regstatus = 0; error = NULL; data = g_dbus_proxy_call_sync(moduledata->netproxy, "GetRegistrationInfo", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "((uss))", &device->regstatus, &operatorcode, &device->operatorname); device->registered = mmgui_module_device_registered_from_status(device->regstatus); device->operatorcode = mmgui_module_gsm_operator_code(operatorcode); device->operatorname = g_strdup(device->operatorname); g_variant_unref(data); } //Allowed mode data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "AllowedMode"); if (data != NULL) { device->allmode = g_variant_get_uint32(data); g_variant_unref(data); } else { device->allmode = 0; g_debug("Failed to get device allowed mode\n"); } //Access technology data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "AccessTechnology"); if (data != NULL) { device->mode = g_variant_get_uint32(data); g_variant_unref(data); } else { device->mode = 0; g_debug("Failed to get device access mode\n"); } } if (moduledata->cardproxy != NULL) { if (device->type == MMGUI_DEVICE_TYPE_GSM) { if (device->enabled) { //IMEI if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } error = NULL; data = g_dbus_proxy_call_sync(moduledata->cardproxy, "GetImei", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "(s)", &device->imei); device->imei = g_strdup(device->imei); g_variant_unref(data); } } if (device->enabled) { //IMSI if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } error = NULL; data = g_dbus_proxy_call_sync(moduledata->cardproxy, "GetImsi", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "(s)", &device->imsi); device->imsi = g_strdup(device->imsi); g_variant_unref(data); } } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { if (device->enabled) { //ESN if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } error = NULL; data = g_dbus_proxy_call_sync(moduledata->cardproxy, "GetEsn", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { g_variant_get(data, "(s)", &device->imsi); device->imsi = g_strdup(device->imsi); g_variant_unref(data); } } //No IMSI in CDMA if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } } } //Update location if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { mmgui_module_devices_update_location(mmguicore, device); } //Network time. This code makes ModemManager crash, so it commented out /*gchar *timev; if (moduledata->timeproxy != NULL) { error = NULL; data = g_dbus_proxy_call_sync(moduledata->timeproxy, "GetNetworkTime", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_print_error_message(error); g_error_free(error); } else { g_variant_get(data, "(s)", &timev); //device->imsi = g_strdup(device->imsi); g_variant_unref(data); } }*/ return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_devices_open(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *data; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; //ModemManager uses 'Modems' prefix and Wader uses 'Devices' prefix //SIM card interface if (device->type == MMGUI_DEVICE_TYPE_GSM) { error = NULL; moduledata->cardproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Gsm.Card", NULL, &error); if ((moduledata->cardproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { error = NULL; moduledata->cardproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Cdma", NULL, &error); if ((moduledata->cardproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } //Mobile network interface error = NULL; moduledata->netproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Gsm.Network", NULL, &error); if ((moduledata->netproxy == NULL) && (error != NULL)) { device->scancaps = MMGUI_SCAN_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->scancaps = MMGUI_SCAN_CAPS_OBSERVE; moduledata->netpropsignal = g_signal_connect(moduledata->netproxy, "g-properties-changed", G_CALLBACK(mmgui_property_change_handler), mmguicore); } //Modem interface error = NULL; moduledata->modemproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem", NULL, &error); if ((moduledata->modemproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { moduledata->statesignal = g_signal_connect(moduledata->modemproxy, "g-signal", G_CALLBACK(mmgui_signal_handler), mmguicore); } //SMS interface error = NULL; moduledata->smsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Gsm.SMS", NULL, &error); if ((moduledata->smsproxy == NULL) && (error != NULL)) { device->smscaps = MMGUI_SMS_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->smscaps = MMGUI_SMS_CAPS_RECEIVE | MMGUI_SMS_CAPS_SEND; moduledata->smssignal = g_signal_connect(moduledata->smsproxy, "g-signal", G_CALLBACK(mmgui_signal_handler), mmguicore); } //Assume fully-fuctional modem manager moduledata->needsmspolling = FALSE; if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { //USSD interface error = NULL; moduledata->ussdproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Gsm.Ussd", NULL, &error); if ((moduledata->ussdproxy == NULL) && (error != NULL)) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->ussdcaps = MMGUI_USSD_CAPS_SEND; } //Location interface (capabilities will be defined later) error = NULL; moduledata->locationproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Location", NULL, &error); if ((moduledata->locationproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { moduledata->locationpropsignal = g_signal_connect(moduledata->locationproxy, "g-properties-changed", G_CALLBACK(mmgui_property_change_handler), mmguicore); mmgui_module_devices_enable_location(mmguicore, device, TRUE); } //Time interface error = NULL; moduledata->timeproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Time", NULL, &error); if ((moduledata->timeproxy == NULL) && (error != NULL)) { moduledata->needsmspolling = TRUE; moduledata->polltimestamp = time(NULL); device->smscaps &= ~MMGUI_SMS_CAPS_SEND; g_error_free(error); } else { data = g_dbus_proxy_get_cached_property(moduledata->timeproxy, "NetworkTimezone"); if (data != NULL) { g_debug("SMS messages polling disabled\n"); moduledata->needsmspolling = FALSE; g_object_unref(data); } else { g_debug("SMS messages polling enabled\n"); moduledata->needsmspolling = TRUE; moduledata->polltimestamp = time(NULL); device->smscaps &= ~MMGUI_SMS_CAPS_SEND; } } //No contacts API device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; } else if (moduledata->service == MODULE_INT_SERVICE_WADER) { //Contacts manipulation interface supported only by Wader error = NULL; moduledata->contactsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Gsm.Contacts", NULL, &error); if ((moduledata->contactsproxy == NULL) && (error != NULL)) { device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->contactscaps = MMGUI_CONTACTS_CAPS_EXPORT | MMGUI_CONTACTS_CAPS_EDIT; } //USSD interface is broken device->ussdcaps = MMGUI_USSD_CAPS_NONE; //No location API device->locationcaps = MMGUI_LOCATION_CAPS_NONE; } //Update device information using created proxy objects mmgui_module_devices_information(mmguicore); //Initialize SMS database return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_devices_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; //Close SMS database //Free resources //Change device pointer if (moduledata->cardproxy != NULL) { g_object_unref(moduledata->cardproxy); moduledata->cardproxy = NULL; } if (moduledata->netproxy != NULL) { if (g_signal_handler_is_connected(moduledata->netproxy, moduledata->netpropsignal)) { g_signal_handler_disconnect(moduledata->netproxy, moduledata->netpropsignal); } g_object_unref(moduledata->netproxy); moduledata->netproxy = NULL; } if (moduledata->modemproxy != NULL) { if (g_signal_handler_is_connected(moduledata->modemproxy, moduledata->statesignal)) { g_signal_handler_disconnect(moduledata->modemproxy, moduledata->statesignal); } g_object_unref(moduledata->modemproxy); moduledata->modemproxy = NULL; } if (moduledata->smsproxy != NULL) { if (g_signal_handler_is_connected(moduledata->smsproxy, moduledata->smssignal)) { g_signal_handler_disconnect(moduledata->smsproxy, moduledata->smssignal); } g_object_unref(moduledata->smsproxy); moduledata->smsproxy = NULL; } if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { if (moduledata->ussdproxy != NULL) { g_object_unref(moduledata->ussdproxy); moduledata->ussdproxy = NULL; } } if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { if (moduledata->locationproxy != NULL) { if (g_signal_handler_is_connected(moduledata->locationproxy, moduledata->locationpropsignal)) { g_signal_handler_disconnect(moduledata->locationproxy, moduledata->locationpropsignal); } g_object_unref(moduledata->locationproxy); moduledata->locationproxy = NULL; } if (moduledata->timeproxy != NULL) { g_object_unref(moduledata->timeproxy); moduledata->timeproxy = NULL; } } else if (moduledata->service == MODULE_INT_SERVICE_WADER) { if (moduledata->contactsproxy != NULL) { g_object_unref(moduledata->contactsproxy); moduledata->contactsproxy = NULL; } } return TRUE; } static gboolean mmgui_module_devices_restart_ussd(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->ussdproxy != NULL) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; g_object_unref(moduledata->ussdproxy); } if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { error = NULL; moduledata->ussdproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager", device->objectpath, "org.freedesktop.ModemManager.Modem.Gsm.Ussd", NULL, &error); if ((moduledata->ussdproxy == NULL) && (error != NULL)) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { device->ussdcaps = MMGUI_USSD_CAPS_SEND; return TRUE; } } return FALSE; } static void mmgui_module_devices_enable_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; gboolean newstate; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); newstate = FALSE; } else { g_variant_unref(result); newstate = mmguicorelc->device->enabled; //Update device state result = g_dbus_proxy_get_cached_property(proxy, "Enabled"); mmguicorelc->device->enabled = g_variant_get_boolean(result); g_variant_unref(result); //If device state changed - return TRUE if (newstate != mmguicorelc->device->enabled) { if (mmguicorelc->device->enabled) { /*Enable location interface*/ mmgui_module_devices_enable_location(mmguicorelc, mmguicorelc->device, TRUE); /*Update device mode*/ //mmgui_module_devices_update_mode(mmguicorelc); } newstate = TRUE; } else { newstate = FALSE; } } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_MODEM_ENABLE_RESULT, user_data, GUINT_TO_POINTER(newstate)); } } G_MODULE_EXPORT gboolean mmgui_module_devices_enable(gpointer mmguicore, gboolean enabled) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->modemproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; //Device already in requested state if (mmguicorelc->device->enabled == enabled) return TRUE; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_ENABLE; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->modemproxy, "Enable", g_variant_new("(b)", enabled), G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_ENABLE], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_devices_enable_handler, mmguicore); return TRUE; } static time_t mmgui_module_str_to_time(const gchar *str) { guint i, len; gchar strbuf[3]; struct tm btime; time_t timestamp; gint *fields[] = {&btime.tm_year, &btime.tm_mon, &btime.tm_mday, &btime.tm_hour, &btime.tm_min, &btime.tm_sec}; timestamp = time(NULL); if (str == NULL) return timestamp; len = strlen(str); if (len > 12) { if (str[12] == '+') { //v.0.4.998 timestamp format for (i=0; i<6; i++) { strncpy(strbuf, str+(i*2), 2); strbuf[2] = '\0'; *fields[i] = atoi(strbuf); } } else if (str[8] == ',') { //v.0.5.2 timestamp format for (i=0; i<6; i++) { strncpy(strbuf, str+(i*3), 2); strbuf[2] = '\0'; *fields[i] = atoi(strbuf); } } btime.tm_year += 100; btime.tm_mon -= 1; timestamp = mktime(&btime); } return timestamp; } static mmgui_sms_message_t mmgui_module_sms_retrieve(mmguicore_t mmguicore, GVariant *messagev) { moduledata_t moduledata; mmgui_sms_message_t message; GVariant *value; gsize strlength, declength; const gchar *valuestr; gchar *decstr; gboolean gottext, gotindex; guint index; if ((mmguicore == NULL) || (messagev == NULL)) return NULL; if (mmguicore->moduledata == NULL) return NULL; moduledata = (moduledata_t)mmguicore->moduledata; index = 0; message = mmgui_smsdb_message_create(); //Sender number value = g_variant_lookup_value(messagev, "number", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); if (moduledata->needsmspolling) { /*Old ModemManager versions tend to not bcd-decode sender numbers, doing it*/ decstr = (gchar *)bcd_to_utf8_ascii_part((const guchar *)valuestr, strlength, &declength); if (decstr != NULL) { mmgui_smsdb_message_set_number(message, decstr); g_debug("SMS number: %s\n", decstr); g_free(decstr); } else { mmgui_smsdb_message_set_number(message, valuestr); g_debug("SMS number: %s\n", valuestr); } } g_variant_unref(value); } else { mmgui_smsdb_message_set_number(message, "--"); } //Service center number value = g_variant_lookup_value(messagev, "smsc", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); mmgui_smsdb_message_set_service_number(message, valuestr); g_debug("SMS service center number: %s\n", valuestr); g_variant_unref(value); } else { mmgui_smsdb_message_set_service_number(message, "--"); } //Decoded message text gottext = FALSE; value = g_variant_lookup_value(messagev, "text", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256*160; valuestr = g_variant_get_string(value, &strlength); g_debug("SMS text: %s\n", valuestr); mmgui_smsdb_message_set_text(message, valuestr, FALSE); gottext = TRUE; g_variant_unref(value); } else { value = g_variant_lookup_value(messagev, "data", G_VARIANT_TYPE_BYTESTRING); if (value != NULL) { strlength = g_variant_get_size(value); if (strlength > 0) { valuestr = g_variant_get_data(value); mmgui_smsdb_message_set_binary(message, TRUE); mmgui_smsdb_message_set_data(message, valuestr, strlength, FALSE); gottext = TRUE; } g_variant_unref(value); } } //Message timestamp (ModemManager uses string, Wader uses double) if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { value = g_variant_lookup_value(messagev, "timestamp", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); mmgui_smsdb_message_set_timestamp(message, mmgui_module_str_to_time(valuestr)); //g_debug("SMS timestamp: %ul\n", message->timestamp); g_variant_unref(value); } } else if (moduledata->service == MODULE_INT_SERVICE_WADER) { value = g_variant_lookup_value(messagev, "timestamp", G_VARIANT_TYPE_DOUBLE); if (value != NULL) { mmgui_smsdb_message_set_timestamp(message, (time_t)g_variant_get_double(value)); //g_debug("SMS timestamp: %ul\n", message->timestamp); g_variant_unref(value); } } /*Message index (ModemManager uses unsigned integer, Wader uses signed one.) This is a critical parameter, so message will be skipped if index value unknown.*/ gotindex = FALSE; if (moduledata->service == MODULE_INT_SERVICE_MODEM_MANAGER) { value = g_variant_lookup_value(messagev, "index", G_VARIANT_TYPE_UINT32); if (value != NULL) { index = g_variant_get_uint32(value); g_variant_unref(value); gotindex = TRUE; } } else if (moduledata->service == MODULE_INT_SERVICE_WADER) { value = g_variant_lookup_value(messagev, "index", G_VARIANT_TYPE_INT32); if (value != NULL) { index = (guint)g_variant_get_int32(value); g_variant_unref(value); gotindex = TRUE; } } if ((!gotindex) || (!gottext)) { //Message identifier unknown or no text - skip it mmgui_smsdb_message_free(message); return NULL; } //Return message mmgui_smsdb_message_set_identifier(message, index, FALSE); g_debug("SMS index: %u\n", index); return message; } G_MODULE_EXPORT guint mmgui_module_sms_enum(gpointer mmguicore, GSList **smslist) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *messages; guint msgnum; GVariantIter miterl1, miterl2; GVariant *mnodel1, *mnodel2; mmgui_sms_message_t message; if ((mmguicore == NULL) || (smslist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return 0; if (mmguicorelc->device == NULL) return 0; if (!mmguicorelc->device->enabled) return 0; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return 0; error = NULL; messages = g_dbus_proxy_call_sync(moduledata->smsproxy, "List", NULL, 0, -1, NULL, &error); if ((messages == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return 0; } msgnum = 0; g_variant_iter_init(&miterl1, messages); while ((mnodel1 = g_variant_iter_next_value(&miterl1)) != NULL) { g_variant_iter_init(&miterl2, mnodel1); while ((mnodel2 = g_variant_iter_next_value(&miterl2)) != NULL) { message = mmgui_module_sms_retrieve(mmguicore, mnodel2); if (message != NULL) { *smslist = g_slist_prepend(*smslist, message); msgnum++; } g_variant_unref(mnodel2); } g_variant_unref(mnodel1); } g_variant_unref(messages); return msgnum; } G_MODULE_EXPORT mmgui_sms_message_t mmgui_module_sms_get(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *indexv; GVariant *messagevt, *messagev; mmgui_sms_message_t message; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return NULL; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return NULL; if (mmguicorelc->device == NULL) return NULL; if (!mmguicorelc->device->enabled) return NULL; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return NULL; error = NULL; indexv = g_variant_new("(u)", index); messagevt = g_dbus_proxy_call_sync(moduledata->smsproxy, "Get", indexv, 0, -1, NULL, &error); if ((messagevt == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return NULL; } messagev = g_variant_get_child_value(messagevt, 0); message = mmgui_module_sms_retrieve(mmguicore, messagev); g_variant_unref(messagev); g_variant_unref(messagevt); return message; } G_MODULE_EXPORT gboolean mmgui_module_sms_delete(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *indexv; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return FALSE; error = NULL; indexv = g_variant_new("(u)", index); g_dbus_proxy_call_sync(moduledata->smsproxy, "Delete", indexv, 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } return TRUE; } static void mmgui_module_sms_send_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; gboolean sent; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); sent = FALSE; } else { g_variant_unref(result); sent = TRUE; } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_SMS_SENT, user_data, GUINT_TO_POINTER(sent)); } } G_MODULE_EXPORT gboolean mmgui_module_sms_send(gpointer mmguicore, gchar* number, gchar *text, gint validity, gboolean report) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariantBuilder *builder; GVariant *array, *message; if ((number == NULL) || (text == NULL)) return FALSE; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_SEND)) return FALSE; builder = g_variant_builder_new(G_VARIANT_TYPE_ARRAY); g_variant_builder_add_parsed(builder, "{'number', <%s>}", number); g_variant_builder_add_parsed(builder, "{'text', <%s>}", text); if ((validity > -1) && (validity <= 255)) { g_variant_builder_add_parsed(builder, "{'validity', <%u>}", (guint)validity); } array = g_variant_builder_end(builder); builder = g_variant_builder_new(G_VARIANT_TYPE_TUPLE); g_variant_builder_add_value(builder, array); message = g_variant_builder_end(builder); mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SEND_SMS; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->smsproxy, "Send", message, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SEND_SMS], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_sms_send_handler, mmguicore); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_ussd_cancel_session(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return FALSE; error = NULL; g_dbus_proxy_call_sync(moduledata->ussdproxy, "Cancel", NULL, 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } return TRUE; } G_MODULE_EXPORT enum _mmgui_ussd_state mmgui_module_ussd_get_state(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *session; gchar *state; enum _mmgui_ussd_state stateid; gsize strsize; stateid = MMGUI_USSD_STATE_UNKNOWN; if (mmguicore == NULL) return stateid; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return stateid; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return stateid; if (mmguicorelc->device == NULL) return stateid; if (!mmguicorelc->device->enabled) return stateid; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return stateid; session = g_dbus_proxy_get_cached_property(moduledata->ussdproxy, "State"); if (session == NULL) return stateid; strsize = 256; state = (gchar *)g_variant_get_string(session, &strsize); if (state != NULL) { if (g_str_equal(state, "idle")) { stateid = MMGUI_USSD_STATE_IDLE; } else if (g_str_equal(state, "active")) { stateid = MMGUI_USSD_STATE_ACTIVE; } else if (g_str_equal(state, "user-response")) { stateid = MMGUI_USSD_STATE_USER_RESPONSE; } } g_variant_unref(session); return stateid; } static void mmgui_module_ussd_send_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; gchar *answer; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; answer = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { /*For some reason after timeout ussd does not work - restart it*/ mmgui_module_devices_restart_ussd(mmguicorelc); if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); } else { g_variant_get(result, "(s)", &answer); if (moduledata->reencodeussd) { /*Fix answer broken encoding*/ answer = encoding_ussd_gsm7_to_ucs2(answer); } else { /*Do not touch answer*/ answer = g_strdup(answer); } g_variant_unref(result); } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_USSD_RESULT, user_data, answer); } } G_MODULE_EXPORT gboolean mmgui_module_ussd_send(gpointer mmguicore, gchar *request, enum _mmgui_ussd_validation validationid, gboolean reencode) { mmguicore_t mmguicorelc; moduledata_t moduledata; enum _mmgui_ussd_state sessionstate; GVariant *ussdreq; gchar *command; if ((mmguicore == NULL) || (request == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return FALSE; sessionstate = mmgui_module_ussd_get_state(mmguicore); if ((sessionstate == MMGUI_USSD_STATE_UNKNOWN) || (sessionstate == MMGUI_USSD_STATE_ACTIVE)) { mmgui_module_ussd_cancel_session(mmguicore); } ussdreq = g_variant_new("(s)", request); command = NULL; if (sessionstate == MMGUI_USSD_STATE_IDLE) { command = "Initiate"; } else if (sessionstate == MMGUI_USSD_STATE_USER_RESPONSE) { if (validationid == MMGUI_USSD_VALIDATION_REQUEST) { mmgui_module_ussd_cancel_session(mmguicore); command = "Initiate"; } else { command = "Respond"; } } moduledata->reencodeussd = reencode; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SEND_USSD; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->ussdproxy, command, ussdreq, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SEND_USSD], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_ussd_send_handler, mmguicore); return TRUE; } static mmgui_scanned_network_t mmgui_module_network_retrieve(GVariant *networkv) { mmgui_scanned_network_t network; GVariant *value; gsize strlength; const gchar *valuestr; /*guint i;*/ if (networkv == NULL) return NULL; network = g_new0(struct _mmgui_scanned_network, 1); //Mobile operator code (MCCMNC) value = g_variant_lookup_value(networkv, "operator-num", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->operator_num = atoi(valuestr); g_variant_unref(value); } else { network->operator_num = 0; } //Network access technology value = g_variant_lookup_value(networkv, "access-tech", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->access_tech = atoi(valuestr); g_variant_unref(value); } else { network->access_tech = MMGUI_ACCESS_TECH_GSM; } //Long-format name of operator value = g_variant_lookup_value(networkv, "operator-long", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->operator_long = g_strdup(valuestr); g_variant_unref(value); } else { network->operator_long = g_strdup("--"); } //Short-format name of operator value = g_variant_lookup_value(networkv, "operator-short", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->operator_short = g_strdup(valuestr); g_variant_unref(value); } else { network->operator_short = g_strdup("--"); } //Network availability status (this is a critical parameter, so entry will be skipped if value is unknown) value = g_variant_lookup_value(networkv, "status", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->status = atoi(valuestr); g_variant_unref(value); return network; } else { if (network->operator_long != NULL) g_free(network->operator_long); if (network->operator_short != NULL) g_free(network->operator_short); g_free(network); return NULL; } } static void mmgui_module_networks_scan_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; GSList *networks; GVariantIter niterl1, niterl2; GVariant *nnodel1, *nnodel2; mmgui_scanned_network_t network; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; networks = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); } else { g_variant_iter_init(&niterl1, result); while ((nnodel1 = g_variant_iter_next_value(&niterl1)) != NULL) { g_variant_iter_init(&niterl2, nnodel1); while ((nnodel2 = g_variant_iter_next_value(&niterl2)) != NULL) { network = mmgui_module_network_retrieve(nnodel2); if (network != NULL) { networks = g_slist_prepend(networks, network); } g_variant_unref(nnodel2); } g_variant_unref(nnodel1); } g_variant_unref(result); } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_SCAN_RESULT, user_data, networks); } } G_MODULE_EXPORT gboolean mmgui_module_networks_scan(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->netproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->scancaps & MMGUI_SCAN_CAPS_OBSERVE)) return FALSE; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SCAN; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->netproxy, "Scan", NULL, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SCAN], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_networks_scan_handler, mmguicore); return TRUE; } static mmgui_contact_t mmgui_module_contact_retrieve(GVariant *contactv) { mmgui_contact_t contact; if (contactv == NULL) return NULL; contact = g_new0(struct _mmgui_contact, 1); g_variant_get(contactv, "(uss)", &contact->id, &contact->name, &contact->number); //Full name of the contact if (contact->name != NULL) { contact->name = g_strdup(contact->name); } else { g_free(contact); return NULL; } //Telephone number if (contact->number != NULL) { contact->number = g_strdup(contact->number); } else { g_free(contact->name); g_free(contact); return NULL; } //Email address contact->email = NULL; //Group this contact belongs to contact->group = g_strdup("SIM"); //Additional contact name contact->name2 = NULL; //Additional contact telephone number contact->number2 = NULL; //Boolean flag to specify whether this entry is hidden or not contact->hidden = FALSE; //Phonebook in which the contact is stored contact->storage = MMGUI_MODEM_CONTACTS_STORAGE_ME; return contact; } G_MODULE_EXPORT guint mmgui_module_contacts_enum(gpointer mmguicore, GSList **contactslist) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *contacts; guint contactsnum; GVariantIter citerl1, citerl2; GVariant *cnodel1, *cnodel2; mmgui_contact_t contact; if ((mmguicore == NULL) || (contactslist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->service != MODULE_INT_SERVICE_WADER) return 0; if (moduledata->contactsproxy == NULL) return 0; if (mmguicorelc->device == NULL) return 0; if (!mmguicorelc->device->enabled) return 0; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EXPORT)) return 0; error = NULL; contacts = g_dbus_proxy_call_sync(moduledata->contactsproxy, "List", NULL, 0, -1, NULL, &error); if ((contacts == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return 0; } contactsnum = 0; g_variant_iter_init(&citerl1, contacts); while ((cnodel1 = g_variant_iter_next_value(&citerl1)) != NULL) { g_variant_iter_init(&citerl2, cnodel1); while ((cnodel2 = g_variant_iter_next_value(&citerl2)) != NULL) { contact = mmgui_module_contact_retrieve(cnodel2); if (contact != NULL) { *contactslist = g_slist_prepend(*contactslist, contact); contactsnum++; } g_variant_unref(cnodel2); } g_variant_unref(cnodel1); } g_variant_unref(contacts); if (contactsnum > 0) { *contactslist = g_slist_reverse(*contactslist); } return contactsnum; } G_MODULE_EXPORT gboolean mmgui_module_contacts_delete(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->contactsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return FALSE; error = NULL; g_dbus_proxy_call_sync(moduledata->contactsproxy, "Delete", g_variant_new("(u)", index), 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } return TRUE; } G_MODULE_EXPORT gint mmgui_module_contacts_add(gpointer mmguicore, mmgui_contact_t contact) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *contactv, *idv; GError *error; guint id; if ((mmguicore == NULL) || (contact == NULL)) return -1; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return -1; moduledata = (moduledata_t)mmguicorelc->moduledata; if ((contact->name == NULL) || (contact->number == NULL)) return -1; if (moduledata->contactsproxy == NULL) return -1; if (mmguicorelc->device == NULL) return -1; if (!mmguicorelc->device->enabled) return -1; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return -1; contactv = g_variant_new("(ss)", contact->name, contact->number); error = NULL; idv = g_dbus_proxy_call_sync(moduledata->contactsproxy, "Add", contactv, 0, -1, NULL, &error); if ((idv == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return -1; } g_variant_get(idv, "(u)", &id); g_variant_unref(idv); contact->id = id; return id; } modem-manager-gui-0.0.17.1/src/modules/connman112.c0000644000175000017500000003725712375672754020215 0ustar alexalex/* * connman112.c * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include "../mmguicore.h" #define MMGUI_MODULE_SERVICE_NAME "net.connman" #define MMGUI_MODULE_IDENTIFIER 112 #define MMGUI_MODULE_DESCRIPTION "Connman >= 1.12" //Internal definitions #define MODULE_INT_PPPD_LOCK_FILE_PATH "/var/run/%s.pid" //Internal enumerations //Private module variables struct _mmguimoduledata { //DBus connection GDBusConnection *connection; //DBus proxy objects GDBusProxy *connmanproxy; GDBusProxy *ofonoproxy; //Dbus object paths gchar *cnsvcpath; //Last error message gchar *errormessage; }; typedef struct _mmguimoduledata *moduledata_t; static void mmgui_module_handle_error_message(mmguicore_t mmguicore, GError *error) { moduledata_t moduledata; if ((mmguicore == NULL) || (error == NULL)) return; moduledata = (moduledata_t)mmguicore->cmoduledata; if (moduledata == NULL) return; if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (error->message != NULL) { moduledata->errormessage = g_strdup(error->message); } else { moduledata->errormessage = g_strdup("Unknown error"); } g_warning("%s: %s", MMGUI_MODULE_DESCRIPTION, moduledata->errormessage); } static gboolean mmgui_module_get_network_interface(mmguicore_t mmguicorelc, gchar *intname, gsize intnamesize) { moduledata_t moduledata; GError *error; GDBusProxy *ofonoconnproxy; GVariant *ofonoconns; GVariantIter ofonoconniterl1, ofonoconniterl2; GVariant *ofonoconnnodel1, *ofonoconnnodel2; GVariant *ofonoconnparams; gsize strlength; const gchar *valuestr; GVariant *parameters, *parameter; gboolean connstate, conninttype; if ((mmguicorelc == NULL) || (intname == NULL) || (intnamesize == 0)) return FALSE; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (mmguicorelc->device->objectpath == NULL) return FALSE; /*Initial state*/ conninttype = FALSE; connstate = FALSE; /*oFono connection proxy*/ error = NULL; ofonoconnproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", mmguicorelc->device->objectpath, "org.ofono.ConnectionManager", NULL, &error); if ((ofonoconnproxy != NULL) && (error == NULL)) { /*Connection contexts*/ error = NULL; ofonoconns = g_dbus_proxy_call_sync(ofonoconnproxy, "GetContexts", NULL, 0, -1, NULL, &error); if ((ofonoconns != NULL) && (error == NULL)) { g_variant_iter_init(&ofonoconniterl1, ofonoconns); while ((ofonoconnnodel1 = g_variant_iter_next_value(&ofonoconniterl1)) != NULL) { g_variant_iter_init(&ofonoconniterl2, ofonoconnnodel1); while ((ofonoconnnodel2 = g_variant_iter_next_value(&ofonoconniterl2)) != NULL) { /*Parameters*/ ofonoconnparams = g_variant_get_child_value(ofonoconnnodel2, 1); if (ofonoconnparams != NULL) { /*Type*/ parameter = g_variant_lookup_value(ofonoconnparams, "Type", G_VARIANT_TYPE_STRING); if (parameter != NULL) { strlength = 256; valuestr = g_variant_get_string(parameter, &strlength); conninttype = g_str_equal(valuestr, "internet"); g_variant_unref(parameter); } /*State*/ parameter = g_variant_lookup_value(ofonoconnparams, "Active", G_VARIANT_TYPE_BOOLEAN); if (parameter != NULL) { connstate = g_variant_get_boolean(parameter); g_variant_unref(parameter); } /*Set network interface*/ if ((conninttype) && (connstate)) { /*Parameters*/ parameters = g_variant_lookup_value(ofonoconnparams, "Settings", G_VARIANT_TYPE_ARRAY); if (parameters != NULL) { /*Interface*/ parameter = g_variant_lookup_value(parameters, "Interface", G_VARIANT_TYPE_STRING); if (parameter != NULL) { strlength = 256; valuestr = g_variant_get_string(parameter, &strlength); /*Save interface name if connected*/ memset(intname, 0, intnamesize); strncpy(intname, valuestr, intnamesize); g_variant_unref(parameter); } g_variant_unref(parameters); } } else { /*Zero interface name if disconnected*/ memset(intname, 0, intnamesize); } g_variant_unref(ofonoconnparams); } g_variant_unref(ofonoconnnodel2); } g_variant_unref(ofonoconnnodel1); } g_variant_unref(ofonoconns); } else if ((ofonoconns == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } g_object_unref(ofonoconnproxy); } else if ((ofonoconnproxy != NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } if ((conninttype) && (connstate)) { return TRUE; } else { return FALSE; } } static gchar *mmgui_module_get_service_name(mmguicore_t mmguicorelc) { moduledata_t moduledata; GError *error; GVariant *cnsvcs; GVariantIter cnsvciterl1, cnsvciterl2; GVariant *cnsvcnodel1, *cnsvcnodel2; GVariant *cnsvcid, *cnsvcparams; gsize strlength; const gchar *valuestr; GVariant *parameter, *parameters; gchar *svcname; gboolean isonline, iscelluar; if (mmguicorelc == NULL) return NULL; if (mmguicorelc->cmoduledata == NULL) return NULL; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return NULL; if (mmguicorelc->device->objectpath == NULL) return NULL; svcname = NULL; error = NULL; //Connman interface if (moduledata->connmanproxy != NULL) { cnsvcs = g_dbus_proxy_call_sync(moduledata->connmanproxy, "GetServices", NULL, 0, -1, NULL, &error); if ((cnsvcs != NULL) && (error == NULL)) { g_variant_iter_init(&cnsvciterl1, cnsvcs); while ((cnsvcnodel1 = g_variant_iter_next_value(&cnsvciterl1)) != NULL) { g_variant_iter_init(&cnsvciterl2, cnsvcnodel1); while ((cnsvcnodel2 = g_variant_iter_next_value(&cnsvciterl2)) != NULL) { isonline = FALSE; iscelluar = FALSE; /*Parameters*/ cnsvcparams = g_variant_get_child_value(cnsvcnodel2, 1); if (cnsvcparams != NULL) { /*State*/ parameter = g_variant_lookup_value(cnsvcparams, "State", G_VARIANT_TYPE_STRING); if (parameter != NULL) { strlength = 256; valuestr = g_variant_get_string(parameter, &strlength); isonline = g_str_equal(valuestr, "online"); g_variant_unref(parameter); } /*Type*/ parameter = g_variant_lookup_value(cnsvcparams, "Type", G_VARIANT_TYPE_STRING); if (parameter != NULL) { strlength = 256; valuestr = g_variant_get_string(parameter, &strlength); iscelluar = g_str_equal(valuestr, "cellular"); g_variant_unref(parameter); } if ((isonline) && (iscelluar)) { /*Parameters*/ parameters = g_variant_lookup_value(cnsvcparams, "Ethernet", G_VARIANT_TYPE_ARRAY); if (parameters != NULL) { /*Interface*/ parameter = g_variant_lookup_value(parameters, "Interface", G_VARIANT_TYPE_STRING); if (parameter != NULL) { strlength = 256; valuestr = g_variant_get_string(parameter, &strlength); if (g_str_equal(valuestr, mmguicorelc->device->interface)) { /*Save service identifier*/ cnsvcid = g_variant_get_child_value(cnsvcnodel2, 0); if (cnsvcid != NULL) { /*Identifier*/ strlength = 256; valuestr = g_variant_get_string(cnsvcid, &strlength); svcname = g_strdup(valuestr); g_variant_unref(cnsvcid); } } g_variant_unref(parameter); } g_variant_unref(parameters); } } g_variant_unref(cnsvcparams); } } g_variant_unref(cnsvcnodel1); } g_variant_unref(cnsvcs); } else if ((cnsvcs == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return NULL; } } return svcname; } G_MODULE_EXPORT gboolean mmgui_module_init(mmguimodule_t module) { if (module == NULL) return FALSE; module->type = MMGUI_MODULE_TYPE_CONNECTION_MANGER; module->requirement = MMGUI_MODULE_REQUIREMENT_SERVICE; module->priority = MMGUI_MODULE_PRIORITY_NORMAL; module->identifier = MMGUI_MODULE_IDENTIFIER; module->functions = MMGUI_MODULE_FUNCTION_BASIC; g_snprintf(module->servicename, sizeof(module->servicename), MMGUI_MODULE_SERVICE_NAME); g_snprintf(module->description, sizeof(module->description), MMGUI_MODULE_DESCRIPTION); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_connection_open(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t *moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t *)&mmguicorelc->cmoduledata; (*moduledata) = g_new0(struct _mmguimoduledata, 1); error = NULL; (*moduledata)->connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); (*moduledata)->errormessage = NULL; if (((*moduledata)->connection == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_free(mmguicorelc->moduledata); return FALSE; } error = NULL; (*moduledata)->connmanproxy = g_dbus_proxy_new_sync((*moduledata)->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "net.connman", "/", "net.connman.Manager", NULL, &error); if (((*moduledata)->connmanproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_object_unref((*moduledata)->connection); g_free(mmguicorelc->cmoduledata); return FALSE; } (*moduledata)->cnsvcpath = NULL; return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_connection_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->cmoduledata); if (moduledata != NULL) { if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (moduledata->connmanproxy != NULL) { g_object_unref(moduledata->connmanproxy); moduledata->connmanproxy = NULL; } if (moduledata->connection != NULL) { g_object_unref(moduledata->connection); moduledata->connection = NULL; } g_free(moduledata); } return TRUE; } G_MODULE_EXPORT gchar *mmgui_module_connection_last_error(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->cmoduledata); return moduledata->errormessage; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_open(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (device == NULL) return FALSE; if (device->objectpath == NULL) return FALSE; moduledata->cnsvcpath = NULL; /*Nothing to precache there*/ return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (moduledata->cnsvcpath != NULL) { g_free(moduledata->cnsvcpath); moduledata->cnsvcpath = NULL; } return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_status(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (mmguicorelc->device->objectpath == NULL) return FALSE; /*Get interface information*/ mmguicorelc->device->connected = mmgui_module_get_network_interface(mmguicorelc, (gchar *)&mmguicorelc->device->interface, IFNAMSIZ); /*Precache service path for future disconnect*/ if (mmguicorelc->device->connected) { if (moduledata->cnsvcpath != NULL) { g_free(moduledata->cnsvcpath); } moduledata->cnsvcpath = mmgui_module_get_service_name(mmguicorelc); } return TRUE; } G_MODULE_EXPORT guint64 mmgui_module_device_connection_timestamp(gpointer mmguicore) { mmguicore_t mmguicorelc; gchar intname[IFNAMSIZ]; gchar lockfilepath[128]; guint64 timestamp; struct stat statbuf; if (mmguicore == NULL) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->device == NULL) return 0; if (mmguicorelc->device->objectpath == NULL) return 0; /*Get current timestamp*/ timestamp = (guint64)time(NULL); if (mmgui_module_get_network_interface(mmguicorelc, (gchar *)&intname, IFNAMSIZ)) { /*Form lock file path*/ memset(lockfilepath, 0, sizeof(lockfilepath)); g_snprintf(lockfilepath, sizeof(lockfilepath), MODULE_INT_PPPD_LOCK_FILE_PATH, intname); /*Get lock file modification timestamp*/ if (stat(lockfilepath, &statbuf) == 0) { timestamp = (guint64)statbuf.st_mtime; } } return timestamp; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_disconnect(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GDBusProxy *cnsvcproxy; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->cnsvcpath == NULL) return FALSE; /*If device already disconnected, return TRUE*/ if (!mmguicorelc->device->connected) return TRUE; /*Service proxy*/ error = NULL; cnsvcproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "net.connman", moduledata->cnsvcpath, "net.connman.Service", NULL, &error); if ((cnsvcproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } //Call disconnect method g_dbus_proxy_call_sync(cnsvcproxy, "Disconnect", NULL, 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_object_unref(cnsvcproxy); return FALSE; } g_object_unref(cnsvcproxy); //Update device state mmguicorelc->device->connected = FALSE; return TRUE; } modem-manager-gui-0.0.17.1/src/modules/nm09.c0000644000175000017500000004156312374457600017104 0ustar alexalex/* * nm09.c * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include "../mmguicore.h" #define MMGUI_MODULE_SERVICE_NAME "org.freedesktop.NetworkManager" #define MMGUI_MODULE_IDENTIFIER 90 #define MMGUI_MODULE_DESCRIPTION "Network Manager >= 0.9.0" //Internal definitions #define MODULE_INT_PPPD_LOCK_FILE_PATH "/var/run/%s.pid" //Internal enumerations //Modem state internal flags typedef enum { MODULE_INT_DEVICE_STATE_UNKNOWN = 0, //The device is in an unknown state. MODULE_INT_DEVICE_STATE_UNMANAGED = 10, //The device is recognized but not managed by NetworkManager. MODULE_INT_DEVICE_STATE_UNAVAILABLE = 20, //The device cannot be used (carrier off, rfkill, etc). MODULE_INT_DEVICE_STATE_DISCONNECTED = 30, //The device is not connected. MODULE_INT_DEVICE_STATE_PREPARE = 40, //The device is preparing to connect. MODULE_INT_DEVICE_STATE_CONFIG = 50, //The device is being configured. MODULE_INT_DEVICE_STATE_NEED_AUTH = 60, //The device is awaiting secrets necessary to continue connection. MODULE_INT_DEVICE_STATE_IP_CONFIG = 70, //The IP settings of the device are being requested and configured. MODULE_INT_DEVICE_STATE_IP_CHECK = 80, //The device's IP connectivity ability is being determined. MODULE_INT_DEVICE_STATE_SECONDARIES = 90, //The device is waiting for secondary connections to be activated. MODULE_INT_DEVICE_STATE_ACTIVATED = 100, //The device is active. MODULE_INT_DEVICE_STATE_DEACTIVATING = 110, //The device's network connection is being torn down. MODULE_INT_DEVICE_STATE_FAILED = 120 //The device is in a failure state following an attempt to activate it. } ModuleIntDeviceState; //Device type internal flags typedef enum { MODULE_INT_DEVICE_TYPE_UNKNOWN = 0, //The device type is unknown. MODULE_INT_DEVICE_TYPE_ETHERNET = 1, //The device is wired Ethernet device. MODULE_INT_DEVICE_TYPE_WIFI = 2, //The device is an 802.11 WiFi device. MODULE_INT_DEVICE_TYPE_UNUSED1 = 3, //Unused MODULE_INT_DEVICE_TYPE_UNUSED2 = 4, //Unused MODULE_INT_DEVICE_TYPE_BT = 5, //The device is Bluetooth device that provides PAN or DUN capabilities. MODULE_INT_DEVICE_TYPE_OLPC_MESH = 6, //The device is an OLPC mesh networking device. MODULE_INT_DEVICE_TYPE_WIMAX = 7, //The device is an 802.16e Mobile WiMAX device. MODULE_INT_DEVICE_TYPE_MODEM = 8, //The device is a modem supporting one or more of analog telephone, CDMA/EVDO, GSM/UMTS/HSPA, or LTE standards to access a cellular or wireline data network. MODULE_INT_DEVICE_TYPE_INFINIBAND = 9, //The device is an IP-capable InfiniBand interface. MODULE_INT_DEVICE_TYPE_BOND = 10, //The device is a bond master interface. MODULE_INT_DEVICE_TYPE_VLAN = 11, //The device is a VLAN interface. MODULE_INT_DEVICE_TYPE_ADSL = 12, //The device is an ADSL device supporting PPPoE and PPPoATM protocols. MODULE_INT_DEVICE_TYPE_BRIDGE = 13 //The device is a bridge interface. } ModuleIntDeviceType; //Active connection state internal flags typedef enum { MODULE_INT_ACTIVE_CONNECTION_STATE_UNKNOWN = 0, /*The active connection is in an unknown state.*/ MODULE_INT_ACTIVE_CONNECTION_STATE_ACTIVATING = 1, /*The connection is activating.*/ MODULE_INT_ACTIVE_CONNECTION_STATE_ACTIVATED = 2, /*The connection is activated.*/ MODULE_INT_ACTIVE_CONNECTION_STATE_DEACTIVATING = 3, /*The connection is being torn down and cleaned up.*/ MODULE_INT_ACTIVE_CONNECTION_STATE_DEACTIVATED = 4 /*The connection is no longer active.*/ } ModuleIntActiveConnectionState; //Private module variables struct _mmguimoduledata { //DBus connection GDBusConnection *connection; //DBus proxy objects GDBusProxy *nmproxy; //Dbus object paths gchar *nmdevpath; //Last error message gchar *errormessage; }; typedef struct _mmguimoduledata *moduledata_t; static void mmgui_module_handle_error_message(mmguicore_t mmguicore, GError *error) { moduledata_t moduledata; if ((mmguicore == NULL) || (error == NULL)) return; moduledata = (moduledata_t)mmguicore->cmoduledata; if (moduledata == NULL) return; if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (error->message != NULL) { moduledata->errormessage = g_strdup(error->message); } else { moduledata->errormessage = g_strdup("Unknown error"); } g_warning("%s: %s", MMGUI_MODULE_DESCRIPTION, moduledata->errormessage); } G_MODULE_EXPORT gboolean mmgui_module_init(mmguimodule_t module) { if (module == NULL) return FALSE; module->type = MMGUI_MODULE_TYPE_CONNECTION_MANGER; module->requirement = MMGUI_MODULE_REQUIREMENT_SERVICE; module->priority = MMGUI_MODULE_PRIORITY_NORMAL; module->identifier = MMGUI_MODULE_IDENTIFIER; module->functions = MMGUI_MODULE_FUNCTION_BASIC; g_snprintf(module->servicename, sizeof(module->servicename), MMGUI_MODULE_SERVICE_NAME); g_snprintf(module->description, sizeof(module->description), MMGUI_MODULE_DESCRIPTION); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_connection_open(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t *moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t *)&mmguicorelc->cmoduledata; (*moduledata) = g_new0(struct _mmguimoduledata, 1); error = NULL; (*moduledata)->connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); (*moduledata)->errormessage = NULL; if (((*moduledata)->connection == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_free(mmguicorelc->moduledata); return FALSE; } error = NULL; (*moduledata)->nmproxy = g_dbus_proxy_new_sync((*moduledata)->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager", NULL, &error); if (((*moduledata)->nmproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_object_unref((*moduledata)->connection); g_free(mmguicorelc->cmoduledata); return FALSE; } (*moduledata)->nmdevpath = NULL; return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_connection_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->cmoduledata); if (moduledata != NULL) { if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (moduledata->nmproxy != NULL) { g_object_unref(moduledata->nmproxy); moduledata->nmproxy = NULL; } if (moduledata->connection != NULL) { g_object_unref(moduledata->connection); moduledata->connection = NULL; } g_free(moduledata); } return TRUE; } G_MODULE_EXPORT gchar *mmgui_module_connection_last_error(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->cmoduledata); return moduledata->errormessage; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_open(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *nmdevices; GVariantIter nmdeviterl1, nmdeviterl2; GVariant *nmdevnodel1, *nmdevnodel2; gsize strlength; const gchar *valuestr; GDBusProxy *nmdevproxy; GVariant *devproperties; const gchar *nmdevpath/*, *nmactconnpath*/; guint nmdevtype; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (device == NULL) return FALSE; if (device->objectpath == NULL) return FALSE; error = NULL; //First time just set it to NULL moduledata->nmdevpath = NULL; /*Initialize local variables*/ nmdevtype = MODULE_INT_DEVICE_TYPE_UNKNOWN; nmdevpath = NULL; //Network Manager interface if (moduledata->nmproxy != NULL) { nmdevices = g_dbus_proxy_call_sync(moduledata->nmproxy, "GetDevices", NULL, 0, -1, NULL, &error); if ((nmdevices != NULL) && (error == NULL)) { g_variant_iter_init(&nmdeviterl1, nmdevices); while ((nmdevnodel1 = g_variant_iter_next_value(&nmdeviterl1)) != NULL) { g_variant_iter_init(&nmdeviterl2, nmdevnodel1); while ((nmdevnodel2 = g_variant_iter_next_value(&nmdeviterl2)) != NULL) { //Device path strlength = 256; valuestr = g_variant_get_string(nmdevnodel2, &strlength); //Device proxy error = NULL; nmdevproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.NetworkManager", valuestr, "org.freedesktop.NetworkManager.Device", NULL, &error); if ((nmdevproxy != NULL) && (error == NULL)) { /*Device path*/ devproperties = g_dbus_proxy_get_cached_property(nmdevproxy, "Udi"); if (devproperties != NULL) { strlength = 256; nmdevpath = g_variant_get_string(devproperties, &strlength); g_variant_unref(devproperties); } /*Device type*/ devproperties = g_dbus_proxy_get_cached_property(nmdevproxy, "DeviceType"); if (devproperties != NULL) { nmdevtype = g_variant_get_uint32(devproperties); g_variant_unref(devproperties); } /*Active connection*/ /*devproperties = g_dbus_proxy_get_cached_property(nmdevproxy, "ActiveConnection"); if (devproperties != NULL) { strlength = 256; nmactconnpath = g_variant_get_string(devproperties, &strlength); g_variant_unref(devproperties); }*/ /*Is it device we looking for*/ if ((nmdevtype == MODULE_INT_DEVICE_TYPE_MODEM) && (g_str_equal(device->objectpath, nmdevpath))) { /*Cache device path*/ moduledata->nmdevpath = g_strdup(valuestr); g_object_unref(nmdevproxy); break; } else { g_object_unref(nmdevproxy); } } else { //Failed to create Network Manager device proxy /*mmgui_module_device_connection_get_timestamp(mmguicorelc);*/ g_error_free(error); } g_variant_unref(nmdevnodel2); } g_variant_unref(nmdevnodel1); } g_variant_unref(nmdevices); } else { //No devices found by Network Manager mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } if (moduledata->nmdevpath != NULL) { return TRUE; } else { return FALSE; } } G_MODULE_EXPORT gboolean mmgui_module_device_connection_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (moduledata->nmdevpath != NULL) { g_free(moduledata->nmdevpath); moduledata->nmdevpath = NULL; } return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_status(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GDBusProxy *nmdevproxy; GVariant *devproperty; const gchar *devinterface; guint devstate; gsize strlength; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->nmdevpath == NULL) return FALSE; error = NULL; //Device proxy nmdevproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.NetworkManager", moduledata->nmdevpath, "org.freedesktop.NetworkManager.Device", NULL, &error); if ((nmdevproxy != NULL) && (error == NULL)) { devproperty = g_dbus_proxy_get_cached_property(nmdevproxy, "State"); devstate = g_variant_get_uint32(devproperty); g_variant_unref(devproperty); //If device connected, get interface name if (devstate == MODULE_INT_DEVICE_STATE_ACTIVATED) { devproperty = g_dbus_proxy_get_cached_property(nmdevproxy, "IpInterface"); strlength = 256; devinterface = g_variant_get_string(devproperty, &strlength); memset(mmguicorelc->device->interface, 0, IFNAMSIZ); strncpy(mmguicorelc->device->interface, devinterface, IFNAMSIZ); mmguicorelc->device->connected = TRUE; g_variant_unref(devproperty); } else { memset(mmguicorelc->device->interface, 0, IFNAMSIZ); mmguicorelc->device->connected = FALSE; } g_object_unref(nmdevproxy); } else { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } return TRUE; } G_MODULE_EXPORT guint64 mmgui_module_device_connection_timestamp(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GDBusProxy *nmdevproxy; GVariant *devproperty; const gchar *devinterface; guint devstate; gsize strlength; gchar lockfilepath[128]; guint64 timestamp; struct stat statbuf; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->nmdevpath == NULL) return FALSE; /*Get current timestamp*/ timestamp = (guint64)time(NULL); error = NULL; /*Device proxy*/ nmdevproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.NetworkManager", moduledata->nmdevpath, "org.freedesktop.NetworkManager.Device", NULL, &error); if ((nmdevproxy != NULL) && (error == NULL)) { devproperty = g_dbus_proxy_get_cached_property(nmdevproxy, "State"); devstate = g_variant_get_uint32(devproperty); g_variant_unref(devproperty); /*If device connected, get interface name*/ if (devstate == MODULE_INT_DEVICE_STATE_ACTIVATED) { devproperty = g_dbus_proxy_get_cached_property(nmdevproxy, "IpInterface"); if (devproperty != NULL) { strlength = 256; devinterface = g_variant_get_string(devproperty, &strlength); /*Form lock file path*/ memset(lockfilepath, 0, sizeof(lockfilepath)); g_snprintf(lockfilepath, sizeof(lockfilepath), MODULE_INT_PPPD_LOCK_FILE_PATH, devinterface); /*Get lock file modification timestamp*/ if (stat(lockfilepath, &statbuf) == 0) { timestamp = (guint64)statbuf.st_mtime; } g_variant_unref(devproperty); } } g_object_unref(nmdevproxy); } return timestamp; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_disconnect(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GDBusProxy *nmdevproxy; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->nmdevpath == NULL) return FALSE; //If device already disconnected, return TRUE if (!mmguicorelc->device->connected) return TRUE; error = NULL; //Device proxy nmdevproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.NetworkManager", moduledata->nmdevpath, "org.freedesktop.NetworkManager.Device", NULL, &error); if ((nmdevproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } //Call disconnect method g_dbus_proxy_call_sync(nmdevproxy, "Disconnect", NULL, 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_object_unref(nmdevproxy); return FALSE; } g_object_unref(nmdevproxy); //Update device state mmguicorelc->device->connected = FALSE; return TRUE; } modem-manager-gui-0.0.17.1/src/modules/ofono109.c0000664000175000017500000025411412377337102017670 0ustar alexalex/* * ofono109.c * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "historyshm.h" #include "../vcard.h" #include "../mmguicore.h" #include "../smsdb.h" #define MMGUI_MODULE_SERVICE_NAME "org.ofono" #define MMGUI_MODULE_IDENTIFIER 109 #define MMGUI_MODULE_DESCRIPTION "oFono >= 1.9" #define MMGUI_MODULE_ENABLE_OPERATION_TIMEOUT 20000 #define MMGUI_MODULE_SEND_SMS_OPERATION_TIMEOUT 35000 #define MMGUI_MODULE_SEND_USSD_OPERATION_TIMEOUT 25000 #define MMGUI_MODULE_NETWORKS_SCAN_OPERATION_TIMEOUT 60000 //Location data bitmask typedef enum { MODULE_INT_MODEM_LOCATION_NULL = 0x00, MODULE_INT_MODEM_LOCATION_MCC = 0x01, MODULE_INT_MODEM_LOCATION_MNC = 0x02, MODULE_INT_MODEM_LOCATION_LAC = 0x04, MODULE_INT_MODEM_LOCATION_CID = 0x08, MODULE_INT_MODEM_LOCATION_ALL = 0x0f, } ModuleIntModemLocationBitmask; //Private module variables struct _mmguimoduledata { //DBus connection GDBusConnection *connection; //DBus proxy objects GDBusProxy *managerproxy; GDBusProxy *cardproxy; GDBusProxy *netproxy; GDBusProxy *modemproxy; GDBusProxy *smsproxy; GDBusProxy *ussdproxy; GDBusProxy *contactsproxy; //Attached signal handlers gulong netsignal; gulong netopsignal; gulong modemsignal; gulong cardsignal; gulong smssignal; //Error message gchar *errormessage; //Pending power devices queue, sms messages queue GList *devqueue, *msgqueue; //Available location data gint location; //History storage mmgui_history_shm_client_t historyshm; //Cancellable GCancellable *cancellable; //Operations timeouts guint timeouts[MMGUI_DEVICE_OPERATIONS]; }; typedef struct _mmguimoduledata *moduledata_t; static enum _mmgui_device_modes mmgui_module_access_mode_translate(const gchar *mode); static enum _mmgui_reg_status mmgui_module_registration_status_translate(const gchar *status); static GVariant *mmgui_module_proxy_get_property(GDBusProxy *proxy, const gchar *name, const GVariantType *type); static gboolean mmgui_module_device_get_enabled(mmguicore_t mmguicore); static mmguidevice_t mmgui_module_device_new(mmguicore_t mmguicore, const gchar *devpath, GVariant *devprops); static gboolean mmgui_module_devices_queue_remove(mmguicore_t mmguicore, const gchar *devpath); static mmgui_sms_message_t mmgui_module_sms_retrieve(mmguicore_t mmguicore, GVariant *smsdata); gboolean mmgui_module_devices_information(gpointer mmguicore); /*Dynamic interfaces*/ static gboolean mmgui_module_open_network_registration_interface(gpointer mmguicore, mmguidevice_t device); static gboolean mmgui_module_open_sim_manager_interface(gpointer mmguicore, mmguidevice_t device); static gboolean mmgui_module_open_message_manager_interface(gpointer mmguicore, mmguidevice_t device); static gboolean mmgui_module_open_supplementary_services_interface(gpointer mmguicore, mmguidevice_t device); static gboolean mmgui_module_open_phonebook_interface(gpointer mmguicore, mmguidevice_t device); static void mmgui_module_handle_error_message(mmguicore_t mmguicore, GError *error) { moduledata_t moduledata; if ((mmguicore == NULL) || (error == NULL)) return; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return; if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (error->message != NULL) { moduledata->errormessage = g_strdup(error->message); } else { moduledata->errormessage = g_strdup("Unknown error"); } g_warning("%s: %s", MMGUI_MODULE_DESCRIPTION, moduledata->errormessage); } static guint mmgui_module_device_id(const gchar *devpath) { guint pathlen; guint id; guint i; id = 0; i = 0; if (devpath == NULL) return id; pathlen = strlen(devpath); if (pathlen == 0) return id; /*SDBM Hash Function*/ for (i=0; imoduledata; if (moduledata == NULL) return; if (mmguicore->eventcb != NULL) { if (g_str_equal(signal_name, "ModemAdded")) { devpathv = g_variant_get_child_value(parameters, 0); devpropsv = g_variant_get_child_value(parameters, 1); if ((devpathv != NULL) && (devpropsv != NULL)) { /*Determine if modem is not emulated*/ devreal = FALSE; devtypev = g_variant_lookup_value(devpropsv, "Type", G_VARIANT_TYPE_STRING); if (devtypev != NULL) { typestrsize = 256; typestr = g_variant_get_string(devtypev, &typestrsize); if (typestr != NULL) { if (g_str_equal(typestr, "hardware")) { devreal = TRUE; } } g_variant_unref(devtypev); } /*If modem is not emulated, work with it*/ if (devreal) { /*Determine path and add device to queue*/ devpathsize = 256; devpath = g_variant_get_string(devpathv, &devpathsize); if (devpath != NULL) { moduledata->devqueue = g_list_prepend(moduledata->devqueue, g_strdup(devpath)); } } g_variant_unref(devpathv); g_variant_unref(devpropsv); } } else if (g_str_equal(signal_name, "ModemRemoved")) { g_variant_get(parameters, "(o)", &devpath); if (devpath != NULL) { /*First we need to test devices queue*/ if (!mmgui_module_devices_queue_remove(mmguicore, devpath)) { /*Then remove already opened device*/ id = mmgui_module_device_id(devpath); (mmguicore->eventcb)(MMGUI_EVENT_DEVICE_REMOVED, mmguicore, GUINT_TO_POINTER(id)); } } } } g_debug("SIGNAL: %s (%s) argtype: %s\n", signal_name, sender_name, g_variant_get_type_string(parameters)); } static void mmgui_module_network_signal_handler(GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters, gpointer data) { mmguicore_t mmguicore; moduledata_t moduledata; GVariant *propname, *propvalue, *value; const gchar *parameter; gsize strsize; gint oldlocation; mmguicore = (mmguicore_t)data; if (mmguicore == NULL) return; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return; if (g_str_equal(signal_name, "PropertyChanged")) { /*Property name and value*/ propname = g_variant_get_child_value(parameters, 0); propvalue = g_variant_get_child_value(parameters, 1); if ((propname != NULL) && (propvalue != NULL)) { /*Unboxed parameter and value*/ strsize = 256; parameter = g_variant_get_string(propname, &strsize); value = g_variant_get_variant(propvalue); if ((parameter != NULL) && (value != NULL)) { g_debug("SIGNAL: %s: %s\n", parameter, g_variant_print(value, TRUE)); if (g_str_equal(parameter, "Strength")) { //Signal level if (mmguicore->device != NULL) { mmguicore->device->siglevel = g_variant_get_byte(value); if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_SIGNAL_LEVEL_CHANGE, mmguicore, mmguicore->device); } } } else if (g_str_equal(parameter, "Status")) { //Registration state if (mmguicore->device != NULL) { strsize = 256; mmguicore->device->regstatus = mmgui_module_registration_status_translate(g_variant_get_string(value, &strsize)); if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE, mmguicore, mmguicore->device); } } } else if (g_str_equal(parameter, "MobileCountryCode")) { //Registration state if (mmguicore->device != NULL) { /*Operator code*/ strsize = 256; mmguicore->device->operatorcode |= (atoi(g_variant_get_string(value, &strsize)) & 0x0000ffff) << 16; /*Location*/ strsize = 256; mmguicore->device->loc3gppdata[0] = atoi(g_variant_get_string(value, &strsize)); oldlocation = moduledata->location; moduledata->location |= MODULE_INT_MODEM_LOCATION_MCC; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { mmguicore->device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; /*Location capabilities updated*/ if ((oldlocation != MODULE_INT_MODEM_LOCATION_ALL) && (mmguicore->eventcb != NULL)) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_LOCATION)); } /*Update location*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_LOCATION_CHANGE, mmguicore, mmguicore->device); } } if ((moduledata->location & MODULE_INT_MODEM_LOCATION_MCC) && (moduledata->location & MODULE_INT_MODEM_LOCATION_MNC)) { /*Update operator code*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE, mmguicore, mmguicore->device); } } } } else if (g_str_equal(parameter, "MobileNetworkCode")) { //Registration state if (mmguicore->device != NULL) { /*Operator code*/ strsize = 256; mmguicore->device->operatorcode |= atoi(g_variant_get_string(value, &strsize)) & 0x0000ffff; //Location strsize = 256; mmguicore->device->loc3gppdata[1] = atoi(g_variant_get_string(value, &strsize)); oldlocation = moduledata->location; moduledata->location |= MODULE_INT_MODEM_LOCATION_MNC; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { mmguicore->device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; /*Location capabilities updated*/ if ((oldlocation != MODULE_INT_MODEM_LOCATION_ALL) && (mmguicore->eventcb != NULL)) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_LOCATION)); } /*Update location*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_LOCATION_CHANGE, mmguicore, mmguicore->device); } } if ((moduledata->location & MODULE_INT_MODEM_LOCATION_MCC) && (moduledata->location & MODULE_INT_MODEM_LOCATION_MNC)) { /*Update operator code*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE, mmguicore, mmguicore->device); } } } } else if (g_str_equal(parameter, "LocationAreaCode")) { //Location if (mmguicore->device != NULL) { mmguicore->device->loc3gppdata[2] = g_variant_get_uint16(value); oldlocation = moduledata->location; moduledata->location |= MODULE_INT_MODEM_LOCATION_LAC; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { mmguicore->device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; /*Location capabilities updated*/ if ((oldlocation != MODULE_INT_MODEM_LOCATION_ALL) && (mmguicore->eventcb != NULL)) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_LOCATION)); } /*Update location*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_LOCATION_CHANGE, mmguicore, mmguicore->device); } } } } else if (g_str_equal(parameter, "CellId")) { //Location if (mmguicore->device != NULL) { mmguicore->device->loc3gppdata[3] = g_variant_get_uint32(value); oldlocation = moduledata->location; moduledata->location |= MODULE_INT_MODEM_LOCATION_CID; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { mmguicore->device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; /*Location capabilities updated*/ if ((oldlocation != MODULE_INT_MODEM_LOCATION_ALL) && (mmguicore->eventcb != NULL)) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_LOCATION)); } /*Update location*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_LOCATION_CHANGE, mmguicore, mmguicore->device); } } } } else if (g_str_equal(parameter, "Name")) { //Registration state if (mmguicore->device != NULL) { if (mmguicore->device->operatorname != NULL) { g_free(mmguicore->device->operatorname); } strsize = 256; mmguicore->device->operatorname = g_strdup(g_variant_get_string(value, &strsize)); if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE, mmguicore, mmguicore->device); } } } else if (g_str_equal(parameter, "Technology")) { //Network mode if (mmguicore->device != NULL) { strsize = 256; mmguicore->device->mode = mmgui_module_access_mode_translate(g_variant_get_string(value, &strsize)); if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_MODE_CHANGE, mmguicore, mmguicore->device); } } } g_variant_unref(value); } } } } static void mmgui_module_modem_signal_handler(GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters, gpointer data) { mmguicore_t mmguicore; moduledata_t moduledata; GVariant *propname, *propvalue, *value; const gchar *parameter; gsize strsize; GVariantIter iterl1; GVariant *nodel1; const gchar *interface; mmguicore = (mmguicore_t)data; if (mmguicore == NULL) return; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return; if (g_str_equal(signal_name, "PropertyChanged")) { /*Property name and value*/ propname = g_variant_get_child_value(parameters, 0); propvalue = g_variant_get_child_value(parameters, 1); if ((propname != NULL) && (propvalue != NULL)) { /*Unboxed parameter and value*/ strsize = 256; parameter = g_variant_get_string(propname, &strsize); value = g_variant_get_variant(propvalue); if ((parameter != NULL) && (value != NULL)) { if (g_str_equal(parameter, "Interfaces")) { if (mmguicore->device != NULL) { g_variant_iter_init(&iterl1, value); while ((nodel1 = g_variant_iter_next_value(&iterl1)) != NULL) { interface = g_variant_get_string(nodel1, &strsize); if ((moduledata->netproxy == NULL) && (g_str_equal(interface, "org.ofono.NetworkRegistration"))) { if (mmgui_module_open_network_registration_interface(mmguicore, mmguicore->device)) { /*Scan capabilities updated*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_SCAN)); } mmgui_module_devices_information(mmguicore); } } else if ((moduledata->cardproxy == NULL) && (g_str_equal(interface, "org.ofono.SimManager"))) { if (mmgui_module_open_sim_manager_interface(mmguicore, mmguicore->device)) { mmgui_module_devices_information(mmguicore); } } else if ((moduledata->smsproxy == NULL) && (g_str_equal(interface, "org.ofono.MessageManager"))) { if (mmgui_module_open_message_manager_interface(mmguicore, mmguicore->device)) { /*SMS messaging capabilities updated*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_SMS)); } } } else if ((moduledata->ussdproxy == NULL) && (g_str_equal(interface, "org.ofono.SupplementaryServices"))) { if (mmgui_module_open_supplementary_services_interface(mmguicore, mmguicore->device)) { /*Supplimentary services capabilities updated*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_USSD)); } } } else if ((moduledata->contactsproxy == NULL) && (g_str_equal(interface, "org.ofono.Phonebook"))) { if (mmgui_module_open_phonebook_interface(mmguicore, mmguicore->device)) { /*Contacts capabilities updated*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_EXTEND_CAPABILITIES, mmguicore, GINT_TO_POINTER(MMGUI_CAPS_CONTACTS)); } } } g_variant_unref(nodel1); } } } g_variant_unref(value); } } } } static void mmgui_module_card_signal_handler(GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters, gpointer data) { /*Nothing to do there at moment*/ } static void mmgui_module_sms_signal_handler(GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters, gpointer data) { mmguicore_t mmguicore; mmgui_sms_message_t message; moduledata_t moduledata; guint messageid; mmguicore = (mmguicore_t)data; if (mmguicore == NULL) return; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return; if (mmguicore->eventcb != NULL) { if ((g_str_equal(signal_name, "IncomingMessage")) || (g_str_equal(signal_name, "ImmediateMessage"))) { /*Receive message*/ message = mmgui_module_sms_retrieve(mmguicore, parameters); if (message != NULL) { /*Store message in list*/ messageid = g_list_length(moduledata->msgqueue); moduledata->msgqueue = g_list_append(moduledata->msgqueue, message); /*Send signal*/ if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_SMS_COMPLETED, mmguicore, GUINT_TO_POINTER(messageid)); } } } } } static enum _mmgui_device_modes mmgui_module_access_mode_translate(const gchar *mode) { enum _mmgui_device_modes tmode; if (mode == NULL) return MMGUI_DEVICE_MODE_UNKNOWN; if (g_str_equal(mode, "gsm")) { tmode = MMGUI_DEVICE_MODE_GSM; } else if (g_str_equal(mode, "edge")) { tmode = MMGUI_DEVICE_MODE_EDGE; } else if (g_str_equal(mode, "umts")) { tmode = MMGUI_DEVICE_MODE_UMTS; } else if (g_str_equal(mode, "hspa")) { tmode = MMGUI_DEVICE_MODE_HSPA; } else if (g_str_equal(mode, "lte")) { tmode = MMGUI_DEVICE_MODE_LTE; } else { tmode = MMGUI_DEVICE_MODE_UNKNOWN; } return tmode; } static enum _mmgui_reg_status mmgui_module_registration_status_translate(const gchar *status) { enum _mmgui_reg_status tstatus; if (status == NULL) return MMGUI_REG_STATUS_UNKNOWN; if (g_str_equal(status, "unregistered")) { tstatus = MMGUI_REG_STATUS_IDLE; } else if (g_str_equal(status, "registered")) { tstatus = MMGUI_REG_STATUS_HOME; } else if (g_str_equal(status, "searching")) { tstatus = MMGUI_REG_STATUS_SEARCHING; } else if (g_str_equal(status, "denied")) { tstatus = MMGUI_REG_STATUS_DENIED; } else if (g_str_equal(status, "unknown")) { tstatus = MMGUI_REG_STATUS_UNKNOWN; } else if (g_str_equal(status, "roaming")) { tstatus = MMGUI_REG_STATUS_ROAMING; } else { tstatus = MMGUI_REG_STATUS_UNKNOWN; } return tstatus; } static enum _mmgui_network_availability mmgui_module_network_availability_status_translate(const gchar* status) { guint tstatus; if (status == NULL) return MMGUI_REG_STATUS_UNKNOWN; if (g_str_equal(status, "unknown")) { tstatus = MMGUI_NA_UNKNOWN; } else if (g_str_equal(status, "available")) { tstatus = MMGUI_NA_AVAILABLE; } else if (g_str_equal(status, "current")) { tstatus = MMGUI_NA_CURRENT; } else if (g_str_equal(status, "forbidden")) { tstatus = MMGUI_NA_FORBIDDEN; } else { tstatus = MMGUI_NA_UNKNOWN; } return tstatus; } static enum _mmgui_access_tech mmgui_module_access_technology_translate(const gchar *technology) { enum _mmgui_access_tech ttechnology; if (technology == NULL) return MMGUI_ACCESS_TECH_UNKNOWN; if (g_str_equal(technology, "gsm")) { ttechnology = MMGUI_ACCESS_TECH_GSM; } else if (g_str_equal(technology, "edge")) { ttechnology = MMGUI_ACCESS_TECH_EDGE; } else if (g_str_equal(technology, "umts")) { ttechnology = MMGUI_ACCESS_TECH_UMTS; } else if (g_str_equal(technology, "hspa")) { ttechnology = MMGUI_ACCESS_TECH_HSPA; } else if (g_str_equal(technology, "lte")) { ttechnology = MMGUI_ACCESS_TECH_LTE; } else { ttechnology = MMGUI_ACCESS_TECH_UNKNOWN; } return ttechnology; } static GVariant *mmgui_module_proxy_get_property(GDBusProxy *proxy, const gchar *name, const GVariantType *type) { GError *error; GVariant *data, *dict, *property; if ((proxy == NULL) || (name == NULL) || (type == NULL)) return NULL; error = NULL; data = g_dbus_proxy_call_sync(proxy, "GetProperties", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { g_error_free(error); return NULL; } dict = g_variant_get_child_value(data, 0); if (dict == NULL) { g_variant_unref(data); return NULL; } property = g_variant_lookup_value(dict, name, type); if (property == NULL) { g_variant_unref(dict); g_variant_unref(data); return NULL; } g_variant_unref(dict); g_variant_unref(data); return property; } static gboolean mmgui_module_device_get_enabled(mmguicore_t mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *deviceinfo, *propdict, *propenabled; gboolean enabled; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->modemproxy == NULL) return FALSE; error = NULL; deviceinfo = g_dbus_proxy_call_sync(moduledata->modemproxy, "GetProperties", NULL, 0, -1, NULL, &error); if ((deviceinfo == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); return FALSE; } /*Properties dictionary (not dbus properties)*/ propdict = g_variant_get_child_value(deviceinfo, 0); if (propdict == NULL) { g_variant_unref(deviceinfo); return FALSE; } propenabled = g_variant_lookup_value(propdict, "Online", G_VARIANT_TYPE_BOOLEAN); if (propenabled == NULL) { g_variant_unref(propdict); g_variant_unref(deviceinfo); return FALSE; } enabled = g_variant_get_boolean(propenabled); g_variant_unref(propenabled); g_variant_unref(propdict); g_variant_unref(deviceinfo); return enabled; } static gboolean mmgui_module_device_get_locked(mmguicore_t mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *deviceinfo, *propdict, *proplocked; const gchar *pinstring; gsize pinstringsize; gboolean locked; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->cardproxy == NULL) return FALSE; error = NULL; deviceinfo = g_dbus_proxy_call_sync(moduledata->cardproxy, "GetProperties", NULL, 0, -1, NULL, &error); if ((deviceinfo == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); return FALSE; } /*Properties dictionary (not dbus properties)*/ propdict = g_variant_get_child_value(deviceinfo, 0); if (propdict == NULL) { g_variant_unref(deviceinfo); return FALSE; } proplocked = g_variant_lookup_value(propdict, "PinRequired", G_VARIANT_TYPE_STRING); if (proplocked == NULL) { g_variant_unref(propdict); g_variant_unref(deviceinfo); return FALSE; } pinstringsize = 256; pinstring = g_variant_get_string(proplocked, &pinstringsize); if (pinstring == NULL) { g_variant_unref(proplocked); g_variant_unref(propdict); g_variant_unref(deviceinfo); return FALSE; } if (g_str_equal(pinstring, "none")) { locked = FALSE; } else { locked = TRUE; } g_variant_unref(proplocked); g_variant_unref(propdict); g_variant_unref(deviceinfo); return locked; } static gboolean mmgui_module_device_get_registered(mmguicore_t mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *deviceinfo, *propdict, *propreg; const gchar *regstr; gsize regstrsize; gboolean registered; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->netproxy == NULL) return FALSE; error = NULL; deviceinfo = g_dbus_proxy_call_sync(moduledata->netproxy, "GetProperties", NULL, 0, -1, NULL, &error); if ((deviceinfo == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); return FALSE; } /*Properties dictionary (not dbus properties)*/ propdict = g_variant_get_child_value(deviceinfo, 0); if (propdict == NULL) { g_variant_unref(deviceinfo); return FALSE; } propreg = g_variant_lookup_value(propdict, "Status", G_VARIANT_TYPE_STRING); if (propreg == NULL) { g_variant_unref(propdict); g_variant_unref(deviceinfo); return FALSE; } regstrsize = 256; regstr = g_variant_get_string(propreg, ®strsize); if (regstr == NULL) { g_variant_unref(propreg); g_variant_unref(propdict); g_variant_unref(deviceinfo); return FALSE; } if (g_str_equal(regstr, "registered") || g_str_equal(regstr, "roaming")) { registered = TRUE; } else { registered = FALSE; } g_variant_unref(propreg); g_variant_unref(propdict); g_variant_unref(deviceinfo); return registered; } static GVariant *mmgui_module_device_queue_get_properties(mmguicore_t mmguicore, const gchar *devpath) { moduledata_t moduledata; GDBusProxy *deviceproxy; GError *error; GVariant *deviceinfo, *propdict, *devproppow, *devpropman, *devpropmod, *devproprev; gboolean powered; if ((mmguicore == NULL) || (devpath == NULL)) return NULL; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return NULL; if (moduledata->connection == NULL) return NULL; error = NULL; deviceproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", devpath, "org.ofono.Modem", NULL, &error); if ((deviceproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_object_unref(deviceproxy); return NULL; } error = NULL; deviceinfo = g_dbus_proxy_call_sync(deviceproxy, "GetProperties", NULL, 0, -1, NULL, &error); if ((deviceinfo == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_object_unref(deviceproxy); return NULL; } /*Properties dictionary (not dbus properties)*/ propdict = g_variant_get_child_value(deviceinfo, 0); if (propdict == NULL) { g_variant_unref(deviceinfo); g_object_unref(deviceproxy); return NULL; } /*If device is powered*/ devproppow = g_variant_lookup_value(propdict, "Powered", G_VARIANT_TYPE_BOOLEAN); if (devproppow != NULL) { /*Test if modem powered*/ powered = g_variant_get_boolean(devproppow); g_variant_unref(devproppow); if (!powered) { /*If modem is not powered try to power on*/ error = NULL; g_dbus_proxy_call_sync(deviceproxy, "SetProperty", g_variant_new("(sv)", "Powered", g_variant_new_boolean(TRUE)), 0, -1, NULL, &error); /*If powered on, return properties*/ if (error != NULL) { /*Proxy is not needed anymore*/ g_object_unref(deviceproxy); mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); return NULL; } } } /*These values are strictly required, so test existence*/ devpropman = g_variant_lookup_value(propdict, "Manufacturer", G_VARIANT_TYPE_STRING); devpropmod = g_variant_lookup_value(propdict, "Model", G_VARIANT_TYPE_STRING); devproprev = g_variant_lookup_value(propdict, "Revision", G_VARIANT_TYPE_STRING); if ((devpropman != NULL) && (devpropmod != NULL) && (devproprev != NULL)) { g_variant_unref(devpropman); g_variant_unref(devpropmod); g_variant_unref(devproprev); g_object_unref(deviceproxy); return propdict; } if (devpropman != NULL) { g_variant_unref(devpropman); } if (devpropmod != NULL) { g_variant_unref(devpropmod); } if (devproprev != NULL) { g_variant_unref(devproprev); } g_variant_unref(propdict); g_variant_unref(deviceinfo); g_object_unref(deviceproxy); return NULL; } static mmguidevice_t mmgui_module_device_new(mmguicore_t mmguicore, const gchar *devpath, GVariant *devprops) { mmguidevice_t device; moduledata_t moduledata; GVariant *devprop, *interfaces; GVariantIter iterl1; GVariant *nodel1; gsize strsize; const gchar *interface; if ((mmguicore == NULL) || (devpath == NULL) || (devprops == NULL)) return NULL; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return NULL; if (moduledata->connection == NULL) return NULL; device = g_new0(struct _mmguidevice, 1); //Save device identifier and object path device->id = mmgui_module_device_id(devpath); device->objectpath = g_strdup(devpath); device->operation = MMGUI_DEVICE_OPERATION_IDLE; //Zero values we can't get this moment //SMS device->smscaps = MMGUI_SMS_CAPS_NONE; device->smsdb = NULL; //Networks //Info device->operatorname = NULL; device->operatorcode = 0; device->imei = NULL; device->imsi = NULL; //USSD device->ussdcaps = MMGUI_USSD_CAPS_NONE; device->ussdencoding = MMGUI_USSD_ENCODING_GSM7; //Location device->locationcaps = MMGUI_LOCATION_CAPS_NONE; memset(device->loc3gppdata, 0, sizeof(device->loc3gppdata)); memset(device->locgpsdata, 0, sizeof(device->locgpsdata)); //Scan device->scancaps = MMGUI_SCAN_CAPS_NONE; //Traffic device->rxbytes = 0; device->txbytes = 0; device->sessiontime = 0; device->speedchecktime = 0; device->smschecktime = 0; device->speedindex = 0; device->connected = FALSE; memset(device->speedvalues, 0, sizeof(device->speedvalues)); memset(device->interface, 0, sizeof(device->interface)); //Contacts device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; device->contactslist = NULL; devprop = g_variant_lookup_value(devprops, "Online", G_VARIANT_TYPE_BOOLEAN); if (devprop != NULL) { device->enabled = g_variant_get_boolean(devprop); g_variant_unref(devprop); } else { device->enabled = FALSE; } //Blocked must be retrived from SIM interface device->blocked = FALSE; devprop = g_variant_lookup_value(devprops, "Manufacturer", G_VARIANT_TYPE_STRING); if (devprop != NULL) { strsize = 256; device->manufacturer = g_strdup(g_variant_get_string(devprop, &strsize)); g_variant_unref(devprop); } else { device->manufacturer = g_strdup(_("Unknown")); } devprop = g_variant_lookup_value(devprops, "Model", G_VARIANT_TYPE_STRING); if (devprop != NULL) { strsize = 256; device->model = g_strdup(g_variant_get_string(devprop, &strsize)); g_variant_unref(devprop); } else { device->model = g_strdup(_("Unknown")); } devprop = g_variant_lookup_value(devprops, "Revision", G_VARIANT_TYPE_STRING); if (devprop != NULL) { strsize = 256; device->version = g_strdup(g_variant_get_string(devprop, &strsize)); g_variant_unref(devprop); } else { device->version = g_strdup(_("Unknown")); } //No port information can be obtained from oFono device->port = g_strdup(_("Unknown")); //No sysfs path can be obtained from oFono device->sysfspath = NULL; //Internal identifier is MM-only thing device->internalid = NULL; //Device type device->type = MMGUI_DEVICE_TYPE_GSM; interfaces = g_variant_lookup_value(devprops, "Interfaces", G_VARIANT_TYPE_STRING); if (interfaces != NULL) { g_variant_iter_init(&iterl1, interfaces); while ((nodel1 = g_variant_iter_next_value(&iterl1)) != NULL) { strsize = 256; interface = g_variant_get_string(nodel1, &strsize); if ((g_str_equal(interface, "org.ofono.cdma.ConnectionManager")) || (g_str_equal(interface, "org.ofono.cdma.VoiceCallManager"))) { device->type = MMGUI_DEVICE_TYPE_CDMA; break; } g_variant_unref(nodel1); } } //Persistent device identifier interface = g_strdup_printf("%s_%s_%s", device->manufacturer, device->model, device->version); device->persistentid = g_compute_checksum_for_string(G_CHECKSUM_MD5, interface, -1); g_free((gchar *)interface); return device; } G_MODULE_EXPORT gboolean mmgui_module_init(mmguimodule_t module) { if (module == NULL) return FALSE; module->type = MMGUI_MODULE_TYPE_MODEM_MANAGER; module->requirement = MMGUI_MODULE_REQUIREMENT_SERVICE; module->priority = MMGUI_MODULE_PRIORITY_LOW; module->identifier = MMGUI_MODULE_IDENTIFIER; module->functions = MMGUI_MODULE_FUNCTION_BASIC; g_snprintf(module->servicename, sizeof(module->servicename), MMGUI_MODULE_SERVICE_NAME); g_snprintf(module->description, sizeof(module->description), MMGUI_MODULE_DESCRIPTION); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_open(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t *moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t *)&mmguicorelc->moduledata; (*moduledata) = g_new0(struct _mmguimoduledata, 1); error = NULL; (*moduledata)->connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); (*moduledata)->errormessage = NULL; /*Initialize queues*/ (*moduledata)->devqueue = NULL; (*moduledata)->msgqueue = NULL; if (((*moduledata)->connection == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_free(mmguicorelc->moduledata); return FALSE; } error = NULL; (*moduledata)->managerproxy = g_dbus_proxy_new_sync((*moduledata)->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", "/", "org.ofono.Manager", NULL, &error); if (((*moduledata)->managerproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_object_unref((*moduledata)->connection); g_free(mmguicorelc->moduledata); return FALSE; } g_signal_connect(G_OBJECT((*moduledata)->managerproxy), "g-signal", G_CALLBACK(mmgui_module_signal_handler), mmguicore); /*History storage*/ (*moduledata)->historyshm = mmgui_history_client_new(); /*Cancellable*/ (*moduledata)->cancellable = g_cancellable_new(); /*Operations timeouts*/ (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_ENABLE] = MMGUI_MODULE_ENABLE_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SEND_SMS] = MMGUI_MODULE_SEND_SMS_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SEND_USSD] = MMGUI_MODULE_SEND_USSD_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SCAN] = MMGUI_MODULE_NETWORKS_SCAN_OPERATION_TIMEOUT; return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->moduledata); //Close device //Stop subsystems if (moduledata != NULL) { if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (moduledata->cancellable != NULL) { g_object_unref(moduledata->cancellable); moduledata->cancellable = NULL; } if (moduledata->historyshm != NULL) { mmgui_history_client_close(moduledata->historyshm); moduledata->historyshm = NULL; } if (moduledata->managerproxy != NULL) { g_object_unref(moduledata->managerproxy); moduledata->managerproxy = NULL; } if (moduledata->connection != NULL) { g_object_unref(moduledata->connection); moduledata->connection = NULL; } g_free(moduledata); } return TRUE; } G_MODULE_EXPORT gchar *mmgui_module_last_error(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->moduledata); return moduledata->errormessage; } G_MODULE_EXPORT gboolean mmgui_module_interrupt_operation(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (device->operation == MMGUI_DEVICE_OPERATION_IDLE) return FALSE; if (moduledata->cancellable != NULL) { g_cancellable_cancel(moduledata->cancellable); return TRUE; } else { return FALSE; } } G_MODULE_EXPORT gboolean mmgui_module_set_timeout(gpointer mmguicore, guint operation, guint timeout) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (timeout < 1000) timeout *= 1000; if (operation < MMGUI_DEVICE_OPERATIONS) { moduledata->timeouts[operation] = timeout; return TRUE; } else { return FALSE; } } G_MODULE_EXPORT guint mmgui_module_devices_enum(gpointer mmguicore, GSList **devicelist) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *devices; guint devnum; GVariantIter diterl1, diterl2; GVariant *dnodel1, *dnodel2; GVariant *devpathv, *devprops; const gchar *devpath; gsize devpathsize; GVariant *devtypev; const gchar *typestr; gsize typestrsize; gboolean devreal; GVariant *devpoweredv; gboolean devpowered; if ((mmguicore == NULL) || (devicelist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; devices = g_dbus_proxy_call_sync(moduledata->managerproxy, "GetModems", NULL, 0, -1, NULL, &error); if ((devices == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return 0; } devnum = 0; g_variant_iter_init(&diterl1, devices); while ((dnodel1 = g_variant_iter_next_value(&diterl1)) != NULL) { g_variant_iter_init(&diterl2, dnodel1); while ((dnodel2 = g_variant_iter_next_value(&diterl2)) != NULL) { devpathv = g_variant_get_child_value(dnodel2, 0); devprops = g_variant_get_child_value(dnodel2, 1); if ((devpathv != NULL) && (devprops != NULL)) { devpathsize = 256; devpath = g_variant_get_string(devpathv, &devpathsize); if ((devpath != NULL) && (devprops != NULL)) { /*Determine if modem is not emulated*/ devreal = FALSE; devtypev = g_variant_lookup_value(devprops, "Type", G_VARIANT_TYPE_STRING); if (devtypev != NULL) { typestrsize = 256; typestr = g_variant_get_string(devtypev, &typestrsize); if (typestr != NULL) { if (g_str_equal(typestr, "hardware")) { devreal = TRUE; } } g_variant_unref(devtypev); } /*If modem is not emulated, work with it*/ if (devreal) { /*Determine if modem is powered*/ devpoweredv = g_variant_lookup_value(devprops, "Powered", G_VARIANT_TYPE_BOOLEAN); if (devpoweredv != NULL) { devpowered = g_variant_get_boolean(devpoweredv); g_variant_unref(devpoweredv); } else { devpowered = FALSE; } /*Add device to apporitate list*/ if (!devpowered) { /*Add device to waiting queue if not powered*/ moduledata->devqueue = g_list_prepend(moduledata->devqueue, g_strdup(devpath)); } else { /*Add device to list if already powered*/ *devicelist = g_slist_prepend(*devicelist, mmgui_module_device_new(mmguicore, devpath, devprops)); devnum++; } } g_variant_unref(devpathv); g_variant_unref(devprops); } } g_variant_unref(dnodel2); } g_variant_unref(dnodel1); } g_variant_unref(devices); return devnum; } G_MODULE_EXPORT gboolean mmgui_module_devices_state(gpointer mmguicore, enum _mmgui_device_state_request request) { mmguicore_t mmguicorelc; /*moduledata_t moduledata;*/ mmguidevice_t device; gboolean res; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; /*moduledata = (moduledata_t)mmguicorelc->moduledata;*/ if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; switch (request) { case MMGUI_DEVICE_STATE_REQUEST_ENABLED: /*Is device enabled*/ res = mmgui_module_device_get_enabled(mmguicorelc); if (device->operation != MMGUI_DEVICE_OPERATION_ENABLE) { device->enabled = res; } break; case MMGUI_DEVICE_STATE_REQUEST_LOCKED: /*Is device blocked*/ res = mmgui_module_device_get_locked(mmguicorelc); device->blocked = res; break; case MMGUI_DEVICE_STATE_REQUEST_REGISTERED: /*Is device registered in network*/ res = mmgui_module_device_get_registered(mmguicorelc); device->registered = res; break; case MMGUI_DEVICE_STATE_REQUEST_CONNECTED: /*Is device connected (modem manager state)*/ res = FALSE;/*mmgui_module_device_connected_from_state(statevalue);*/ break; default: res = FALSE; break; } return res; } static gboolean mmgui_module_devices_queue_remove(mmguicore_t mmguicore, const gchar *devpath) { moduledata_t moduledata; GList *dqlnode; GList *dqlnext; gchar *dqlpath; gboolean res; if ((mmguicore == NULL) || (devpath == NULL)) return FALSE; if (mmguicore->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicore->moduledata; res = FALSE; //Search for specified device and remove if any if (moduledata->devqueue != NULL) { dqlnode = moduledata->devqueue; while (dqlnode != NULL) { dqlpath = (gchar *)dqlnode->data; dqlnext = g_list_next(dqlnode); if (g_str_equal(devpath, dqlpath)) { //Free resources g_free(dqlpath); //Remove list node moduledata->devqueue = g_list_delete_link(moduledata->devqueue, dqlnode); //Set flag and break res = TRUE; break; } dqlnode = dqlnext; } } return res; } G_MODULE_EXPORT gboolean mmgui_module_devices_update_state(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GList *dqlnode; GList *dqlnext; gchar *dqlpath; GVariant *devprops; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; //Search for ready devices if ((moduledata->devqueue != NULL) && (mmguicorelc->eventcb != NULL)) { dqlnode = moduledata->devqueue; while (dqlnode != NULL) { dqlpath = (gchar *)dqlnode->data; dqlnext = g_list_next(dqlnode); //If device is not ready, NULL returned devprops = mmgui_module_device_queue_get_properties(mmguicore, dqlpath); if (devprops != NULL) { device = mmgui_module_device_new(mmguicore, dqlpath, devprops); if (device != NULL) { //Free resources g_free(dqlpath); g_variant_unref(devprops); //Remove list node moduledata->devqueue = g_list_delete_link(moduledata->devqueue, dqlnode); //Send notification (mmguicorelc->eventcb)(MMGUI_EVENT_DEVICE_ADDED, mmguicore, device); } } dqlnode = dqlnext; } } return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_devices_information(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GVariant *data; /*GError *error;*/ //gchar opcode[6]; //guchar locvalues; gsize strsize = 256; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->modemproxy != NULL) { //Is device enabled and blocked device->enabled = mmgui_module_device_get_enabled(mmguicorelc); device->blocked = mmgui_module_device_get_locked(mmguicorelc); device->registered = mmgui_module_device_get_registered(mmguicorelc); if (device->enabled) { //Device identifier (IMEI) if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } data = mmgui_module_proxy_get_property(moduledata->modemproxy, "Serial", G_VARIANT_TYPE_STRING); if (data != NULL) { strsize = 256; device->imei = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imei = NULL; } } } if (moduledata->netproxy != NULL) { //Operator information device->operatorcode = 0; if (device->operatorname != NULL) { g_free(device->operatorname); device->operatorname = NULL; } //Signal level data = mmgui_module_proxy_get_property(moduledata->netproxy, "Strength", G_VARIANT_TYPE_BYTE); if (data != NULL) { device->siglevel = g_variant_get_byte(data); g_variant_unref(data); } else { device->siglevel = 0; } //Used access technology data = mmgui_module_proxy_get_property(moduledata->netproxy, "Technology", G_VARIANT_TYPE_STRING); if (data != NULL) { strsize = 256; device->mode = mmgui_module_access_mode_translate(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->mode = MMGUI_DEVICE_MODE_UNKNOWN; } //Registration state data = mmgui_module_proxy_get_property(moduledata->netproxy, "Status", G_VARIANT_TYPE_STRING); if (data != NULL) { strsize = 256; device->regstatus = mmgui_module_registration_status_translate(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->regstatus = MMGUI_REG_STATUS_UNKNOWN; } //Operator name data = mmgui_module_proxy_get_property(moduledata->netproxy, "Name", G_VARIANT_TYPE_STRING); if (data != NULL) { strsize = 256; device->operatorname = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->operatorname = NULL; } //3gpp location, Operator code data = mmgui_module_proxy_get_property(moduledata->netproxy, "MobileCountryCode", G_VARIANT_TYPE_STRING); if (data != NULL) { strsize = 256; device->loc3gppdata[0] = atoi(g_variant_get_string(data, &strsize)); device->operatorcode |= (device->loc3gppdata[0] & 0x0000ffff) << 16; moduledata->location |= MODULE_INT_MODEM_LOCATION_MCC; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; } g_variant_unref(data); } data = mmgui_module_proxy_get_property(moduledata->netproxy, "MobileNetworkCode", G_VARIANT_TYPE_STRING); if (data != NULL) { strsize = 256; device->loc3gppdata[1] = atoi(g_variant_get_string(data, &strsize)); device->operatorcode |= device->loc3gppdata[1] & 0x0000ffff; moduledata->location |= MODULE_INT_MODEM_LOCATION_MNC; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; } g_variant_unref(data); } data = mmgui_module_proxy_get_property(moduledata->netproxy, "LocationAreaCode", G_VARIANT_TYPE_UINT16); if (data != NULL) { strsize = 256; device->loc3gppdata[2] = g_variant_get_uint16(data); moduledata->location |= MODULE_INT_MODEM_LOCATION_LAC; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; } g_variant_unref(data); } data = mmgui_module_proxy_get_property(moduledata->netproxy, "CellId", G_VARIANT_TYPE_UINT32); if (data != NULL) { strsize = 256; device->loc3gppdata[3] = g_variant_get_uint32(data); moduledata->location |= MODULE_INT_MODEM_LOCATION_CID; if (moduledata->location == MODULE_INT_MODEM_LOCATION_ALL) { device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; } g_variant_unref(data); } } if (moduledata->cardproxy != NULL) { if (device->type == MMGUI_DEVICE_TYPE_GSM) { if (device->enabled) { //IMSI if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } //IMSI data = mmgui_module_proxy_get_property(moduledata->cardproxy, "SubscriberIdentity", G_VARIANT_TYPE_STRING); if (data != NULL) { strsize = 256; device->imsi = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imsi = NULL; } } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { //No IMSI in CDMA if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } } } return TRUE; } static gboolean mmgui_module_open_network_registration_interface(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (device->objectpath == NULL) return FALSE; error = NULL; moduledata->location = MODULE_INT_MODEM_LOCATION_NULL; moduledata->netproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", device->objectpath, "org.ofono.NetworkRegistration", NULL, &error); if ((moduledata->netproxy == NULL) && (error != NULL)) { device->scancaps = MMGUI_SCAN_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { device->scancaps = MMGUI_SCAN_CAPS_OBSERVE; moduledata->netsignal = g_signal_connect(G_OBJECT(moduledata->netproxy), "g-signal", G_CALLBACK(mmgui_module_network_signal_handler), mmguicore); return TRUE; } } static gboolean mmgui_module_open_sim_manager_interface(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (device->objectpath == NULL) return FALSE; error = NULL; moduledata->cardproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", device->objectpath, "org.ofono.SimManager", NULL, &error); if ((moduledata->cardproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { moduledata->cardsignal = g_signal_connect(G_OBJECT(moduledata->cardproxy), "g-signal", G_CALLBACK(mmgui_module_card_signal_handler), mmguicore); return TRUE; } } static gboolean mmgui_module_open_message_manager_interface(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (device->objectpath == NULL) return FALSE; error = NULL; moduledata->smsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", device->objectpath, "org.ofono.MessageManager", NULL, &error); if ((moduledata->smsproxy == NULL) && (error != NULL)) { device->smscaps = MMGUI_SMS_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { device->smscaps = MMGUI_SMS_CAPS_RECEIVE | MMGUI_SMS_CAPS_SEND; moduledata->smssignal = g_signal_connect(moduledata->smsproxy, "g-signal", G_CALLBACK(mmgui_module_sms_signal_handler), mmguicore); return TRUE; } } static gboolean mmgui_module_open_supplementary_services_interface(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (device->objectpath == NULL) return FALSE; error = NULL; moduledata->ussdproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", device->objectpath, "org.ofono.SupplementaryServices", NULL, &error); if ((moduledata->ussdproxy == NULL) && (error != NULL)) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { device->ussdcaps = MMGUI_USSD_CAPS_SEND; return TRUE; } } static gboolean mmgui_module_open_phonebook_interface(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (device->objectpath == NULL) return FALSE; error = NULL; moduledata->contactsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", device->objectpath, "org.ofono.Phonebook", NULL, &error); if ((moduledata->contactsproxy == NULL) && (error != NULL)) { device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { device->contactscaps = MMGUI_CONTACTS_CAPS_EXPORT | MMGUI_CONTACTS_CAPS_EXTENDED; return TRUE; } } G_MODULE_EXPORT gboolean mmgui_module_devices_open(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *interfaces; GVariantIter iterl1; GVariant *nodel1; const gchar *interface; gsize strsize; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (device == NULL) return FALSE; if (device->objectpath == NULL) return FALSE; /*Interfaces can appear suddenly*/ moduledata->netproxy = NULL; moduledata->cardproxy = NULL; moduledata->smsproxy = NULL; moduledata->ussdproxy = NULL; moduledata->contactsproxy = NULL; error = NULL; moduledata->modemproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", device->objectpath, "org.ofono.Modem", NULL, &error); if ((moduledata->modemproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { moduledata->modemsignal = g_signal_connect(G_OBJECT(moduledata->modemproxy), "g-signal", G_CALLBACK(mmgui_module_modem_signal_handler), mmguicore); /*Get available interfaces*/ interfaces = mmgui_module_proxy_get_property(moduledata->modemproxy, "Interfaces", G_VARIANT_TYPE_ARRAY); if (interfaces != NULL) { g_variant_iter_init(&iterl1, interfaces); while ((nodel1 = g_variant_iter_next_value(&iterl1)) != NULL) { interface = g_variant_get_string(nodel1, &strsize); if (g_str_equal(interface, "org.ofono.NetworkRegistration")) { mmgui_module_open_network_registration_interface(mmguicore, device); } else if (g_str_equal(interface, "org.ofono.SimManager")) { mmgui_module_open_sim_manager_interface(mmguicore, device); } else if (g_str_equal(interface, "org.ofono.MessageManager")) { mmgui_module_open_message_manager_interface(mmguicore, device); } else if (g_str_equal(interface, "org.ofono.SupplementaryServices")) { mmgui_module_open_supplementary_services_interface(mmguicore, device); } else if (g_str_equal(interface, "org.ofono.Phonebook")) { mmgui_module_open_phonebook_interface(mmguicore, device); } g_variant_unref(nodel1); } g_variant_unref(interfaces); } } /*Update device information using created proxy objects*/ mmgui_module_devices_information(mmguicore); /*Open device history storage*/ if (moduledata->historyshm != NULL) { mmgui_history_client_open_device(moduledata->historyshm, device->objectpath); } return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_devices_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; /*Close proxy objects*/ if (moduledata->cardproxy != NULL) { if (g_signal_handler_is_connected(moduledata->cardproxy, moduledata->cardsignal)) { g_signal_handler_disconnect(moduledata->cardproxy, moduledata->cardsignal); } g_object_unref(moduledata->cardproxy); moduledata->cardproxy = NULL; } if (moduledata->netproxy != NULL) { if (g_signal_handler_is_connected(moduledata->netproxy, moduledata->netsignal)) { g_signal_handler_disconnect(moduledata->netproxy, moduledata->netsignal); } g_object_unref(moduledata->netproxy); moduledata->netproxy = NULL; } if (moduledata->modemproxy != NULL) { if (g_signal_handler_is_connected(moduledata->modemproxy, moduledata->modemsignal)) { g_signal_handler_disconnect(moduledata->modemproxy, moduledata->modemsignal); } g_object_unref(moduledata->modemproxy); moduledata->modemproxy = NULL; } if (moduledata->smsproxy != NULL) { if (g_signal_handler_is_connected(moduledata->smsproxy, moduledata->smssignal)) { g_signal_handler_disconnect(moduledata->smsproxy, moduledata->smssignal); } g_object_unref(moduledata->smsproxy); moduledata->smsproxy = NULL; } if (moduledata->ussdproxy != NULL) { g_object_unref(moduledata->ussdproxy); moduledata->ussdproxy = NULL; } if (moduledata->contactsproxy != NULL) { g_object_unref(moduledata->contactsproxy); moduledata->contactsproxy = NULL; } /*Close device history storage*/ if (moduledata->historyshm != NULL) { mmgui_history_client_close_device(moduledata->historyshm); } return TRUE; } static gboolean mmgui_module_devices_restart_ussd(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->ussdproxy != NULL) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; g_object_unref(moduledata->ussdproxy); } error = NULL; moduledata->ussdproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", device->objectpath, "org.ofono.SupplementaryServices", NULL, &error); if ((moduledata->ussdproxy == NULL) && (error != NULL)) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { device->ussdcaps = MMGUI_USSD_CAPS_SEND; return TRUE; } } static void mmgui_module_devices_enable_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *data, *deviceinfo, *propdict, *devonline; gboolean newstate; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; data = g_dbus_proxy_call_finish(proxy, res, &error); if ((data == NULL) && (error != NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); newstate = FALSE; } else { g_variant_unref(data); newstate = mmguicorelc->device->enabled; //Update device state error = NULL; deviceinfo = g_dbus_proxy_call_sync(proxy, "GetProperties", NULL, 0, -1, NULL, &error); if ((deviceinfo == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); newstate = FALSE; } else { propdict = g_variant_get_child_value(deviceinfo, 0); if (propdict != NULL) { devonline = g_variant_lookup_value(propdict, "Online", G_VARIANT_TYPE_BOOLEAN); if (devonline != NULL) { mmguicorelc->device->enabled = g_variant_get_boolean(devonline); g_variant_unref(devonline); } g_variant_unref(propdict); } g_variant_unref(deviceinfo); //If device state changed - return TRUE if (newstate != mmguicorelc->device->enabled) { newstate = TRUE; } else { newstate = FALSE; } } } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_MODEM_ENABLE_RESULT, user_data, GUINT_TO_POINTER(newstate)); } } G_MODULE_EXPORT gboolean mmgui_module_devices_enable(gpointer mmguicore, gboolean enabled) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *value; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->modemproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; //Device already in requested state if (mmguicorelc->device->enabled == enabled) return TRUE; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_ENABLE; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } value = g_variant_new_boolean(enabled); g_dbus_proxy_call(moduledata->modemproxy, "SetProperty", g_variant_new("(sv)", "Online", value), G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_ENABLE], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_devices_enable_handler, mmguicore); return TRUE; } /*Time format: 2013-10-18T22:22:22+0400*/ static time_t mmgui_module_str_to_time(const gchar *str) { guint i, len, field, fieldlen; gint prevptr, curptr; gchar strbuf[5]; struct tm btime; time_t timestamp; gint *fields[] = {&btime.tm_year, &btime.tm_mon, &btime.tm_mday, &btime.tm_hour, &btime.tm_min, &btime.tm_sec}; timestamp = time(NULL); if (str == NULL) return timestamp; len = strlen(str); if (len == 0) return timestamp; prevptr = 0; curptr = -1; field = 0; fieldlen = 0; for (i=0; i 1900) { btime.tm_year -= 1900; } btime.tm_mon -= 1; timestamp = mktime(&btime); return timestamp; } static mmgui_sms_message_t mmgui_module_sms_retrieve(mmguicore_t mmguicore, GVariant *smsdata) { mmgui_sms_message_t message; GVariant *smsmessagev, *smsparamsv, *value; gsize strlength; const gchar *valuestr; gboolean gottext; if ((mmguicore == NULL) || (smsdata == NULL)) return NULL; /*Message text and parameters*/ smsmessagev = g_variant_get_child_value(smsdata, 0); smsparamsv = g_variant_get_child_value(smsdata, 1); if ((smsmessagev != NULL) || (smsparamsv != NULL)) { message = mmgui_smsdb_message_create(); /*Message text*/ gottext = FALSE; strlength = 160*256; valuestr = g_variant_get_string(smsmessagev, &strlength); if (valuestr != NULL) { mmgui_smsdb_message_set_text(message, valuestr, FALSE); gottext = TRUE; } g_variant_unref(smsmessagev); /*Message sender*/ value = g_variant_lookup_value(smsparamsv, "Sender", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_strdup(g_variant_get_string(value, &strlength)); mmgui_smsdb_message_set_number(message, valuestr); g_debug("SMS number: %s\n", valuestr); g_variant_unref(value); } else { mmgui_smsdb_message_set_number(message, _("Unknown")); } /*Message local time*/ value = g_variant_lookup_value(smsparamsv, "LocalSentTime", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); mmgui_smsdb_message_set_timestamp(message, mmgui_module_str_to_time(valuestr)); g_debug("SMS local timestamp: %lu\n", (gulong)message->timestamp); g_variant_unref(value); } else { mmgui_smsdb_message_set_timestamp(message, (gulong)time(NULL)); } /*Return message*/ if (!gottext) { /*Message has no text - skip it*/ mmgui_smsdb_message_free(message); return NULL; } else { /*Return message*/ mmgui_smsdb_message_set_identifier(message, 0, FALSE); //g_debug("SMS index: %u\n", index); return message; } } return NULL; } G_MODULE_EXPORT guint mmgui_module_sms_enum(gpointer mmguicore, GSList **smslist) { mmguicore_t mmguicorelc; moduledata_t moduledata; guint msgnum; GSList *messages; if ((mmguicore == NULL) || (smslist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return 0; if (moduledata->historyshm == NULL) return 0; messages = NULL; msgnum = 0; /*Get messages from history storage*/ messages = mmgui_history_client_enum_messages(moduledata->historyshm); if (messages != NULL) { msgnum = g_slist_length(messages); *smslist = messages; } return msgnum; } G_MODULE_EXPORT mmgui_sms_message_t mmgui_module_sms_get(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmgui_sms_message_t message; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return NULL; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return NULL; if (mmguicorelc->device == NULL) return NULL; if (!mmguicorelc->device->enabled) return NULL; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return NULL; /*Message queue is not initialized*/ if (moduledata->msgqueue == NULL) return NULL; /*Message queue is shorter than assumed*/ if (g_list_length(moduledata->msgqueue) <= index) return NULL; /*Retrieve message*/ message = g_list_nth_data(moduledata->msgqueue, index); /*And remove it from queue*/ moduledata->msgqueue = g_list_remove(moduledata->msgqueue, message); return message; } G_MODULE_EXPORT gboolean mmgui_module_sms_delete(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return FALSE; /*Ofono automatically removes messages, so doing nothing there*/ return TRUE; } static void mmgui_module_sms_send_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *data; gboolean sent; const gchar *smspath; GDBusProxy *smsproxy; GVariant *smsinfo, *smsdict, *smsstatev; gsize smsstatesize; const gchar *smsstate; if (user_data == NULL) return; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; data = g_dbus_proxy_call_finish(proxy, res, &error); sent = FALSE; /*Operation result*/ if ((error != NULL) && (data == NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); } else if (data != NULL) { /*Get message object path*/ g_variant_get(data, "(o)", &smspath); if (smspath != NULL) { /*Message proxy*/ error = NULL; smsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.ofono", smspath, "org.ofono.Message", NULL, &error); if ((smsproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { /*Message properties*/ error = NULL; smsinfo = g_dbus_proxy_call_sync(smsproxy, "GetProperties", NULL, 0, -1, NULL, &error); if ((smsinfo == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { smsdict = g_variant_get_child_value(smsinfo, 0); if (smsdict != NULL) { /*Message state*/ smsstatev = g_variant_lookup_value(smsdict, "State", G_VARIANT_TYPE_STRING); if (smsstatev != NULL) { smsstatesize = 256; smsstate = g_variant_get_string(smsstatev, &smsstatesize); if (smsstate != NULL) { /*Message must be already sent or pending*/ if ((g_str_equal(smsstate, "pending")) || (g_str_equal(smsstate, "sent"))) { sent = TRUE; } } g_variant_unref(smsstatev); } g_variant_unref(smsdict); } g_variant_unref(smsinfo); } g_object_unref(smsproxy); } } g_variant_unref(data); } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_SMS_SENT, user_data, GUINT_TO_POINTER(sent)); } } G_MODULE_EXPORT gboolean mmgui_module_sms_send(gpointer mmguicore, gchar* number, gchar *text, gint validity, gboolean report) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *message; if ((number == NULL) || (text == NULL)) return FALSE; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_SEND)) return FALSE; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SEND_SMS; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } /*Set delivery reports state*/ error = NULL; g_dbus_proxy_call_sync(moduledata->smsproxy, "SetProperty", g_variant_new("(sv)", "UseDeliveryReports", g_variant_new_boolean(report)), 0, -1, NULL, &error); /*Save error message if something going wrong*/ if (error != NULL) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); } /*Form message and send it*/ message = g_variant_new("(ss)", number, text); g_dbus_proxy_call(moduledata->smsproxy, "SendMessage", message, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SEND_SMS], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_sms_send_handler, mmguicore); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_ussd_cancel_session(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return FALSE; error = NULL; g_dbus_proxy_call_sync(moduledata->ussdproxy, "Cancel", NULL, 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } return TRUE; } G_MODULE_EXPORT enum _mmgui_ussd_state mmgui_module_ussd_get_state(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *session; gchar *state; enum _mmgui_ussd_state stateid; gsize strsize; stateid = MMGUI_USSD_STATE_UNKNOWN; if (mmguicore == NULL) return stateid; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return stateid; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return stateid; if (mmguicorelc->device == NULL) return stateid; if (!mmguicorelc->device->enabled) return stateid; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return stateid; session = mmgui_module_proxy_get_property(moduledata->ussdproxy, "State", G_VARIANT_TYPE_STRING); if (session == NULL) return stateid; strsize = 256; state = (gchar *)g_variant_get_string(session, &strsize); if (state != NULL) { if (g_str_equal(state, "idle")) { stateid = MMGUI_USSD_STATE_IDLE; } else if (g_str_equal(state, "active")) { stateid = MMGUI_USSD_STATE_ACTIVE; } else if (g_str_equal(state, "user-response")) { stateid = MMGUI_USSD_STATE_USER_RESPONSE; } } g_variant_unref(session); return stateid; } static void mmgui_module_ussd_send_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; const gchar *restype; gchar *reqtype, *answer; gsize strsize; GVariant *data; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; answer = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { /*For some reason after timeout ussd does not work - restart it*/ mmgui_module_devices_restart_ussd(mmguicorelc); if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); } else { restype = g_variant_get_type_string(result); if (g_str_equal(restype, "(sv)")) { /*Initiate*/ g_variant_get(result, "(sv)", &reqtype, &data); if (g_str_equal(reqtype, "USSD")) { strsize = 4096; answer = g_strdup(g_variant_get_string(data, &strsize)); } g_variant_unref(data); } else if (g_str_equal(restype, "(s)")) { /*Response*/ g_variant_get(result, "(s)", &answer); answer = g_strdup(answer); } g_variant_unref(result); } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_USSD_RESULT, user_data, answer); } } G_MODULE_EXPORT gboolean mmgui_module_ussd_send(gpointer mmguicore, gchar *request, enum _mmgui_ussd_validation validationid, gboolean reencode) { mmguicore_t mmguicorelc; moduledata_t moduledata; enum _mmgui_ussd_state sessionstate; GVariant *ussdreq; gchar *command; if ((mmguicore == NULL) || (request == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return FALSE; sessionstate = mmgui_module_ussd_get_state(mmguicore); if ((sessionstate == MMGUI_USSD_STATE_UNKNOWN) || (sessionstate == MMGUI_USSD_STATE_ACTIVE)) { mmgui_module_ussd_cancel_session(mmguicore); } ussdreq = g_variant_new("(s)", request); command = "Initiate"; if (sessionstate == MMGUI_USSD_STATE_IDLE) { command = "Initiate"; } else if (sessionstate == MMGUI_USSD_STATE_USER_RESPONSE) { if (validationid == MMGUI_USSD_VALIDATION_REQUEST) { mmgui_module_ussd_cancel_session(mmguicore); command = "Initiate"; } else { command = "Respond"; } } /*No problems with USSD in oFono, so just ignore the 'reencode' argument*/ mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SEND_USSD; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->ussdproxy, command, ussdreq, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SEND_USSD], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_ussd_send_handler, mmguicore); return TRUE; } static guint mmgui_module_network_retrieve(GVariant *networkv, GSList **networks) { mmgui_scanned_network_t network; gsize technologies; GVariant *dict, *techs, *value; gchar opcode[6]; gsize strlength; guint i; if ((networkv == NULL) || (networks == NULL)) return 0; dict = g_variant_get_child_value(networkv, 1); techs = g_variant_lookup_value(dict, "Technologies", G_VARIANT_TYPE_ARRAY); if (techs != NULL) { technologies = g_variant_n_children(techs); } else { technologies = 0; } if (technologies > 0) { for (i=0; ioperator_num = atoi(opcode); //Network access technology value = g_variant_get_child_value(techs, i); if (value != NULL) { strlength = 256; network->access_tech = mmgui_module_access_technology_translate(g_variant_get_string(value, &strlength)); g_variant_unref(value); } else { network->access_tech = MMGUI_ACCESS_TECH_GSM; } //Long-format name of operator value = g_variant_lookup_value(dict, "Name", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; network->operator_long = g_strdup(g_variant_get_string(value, &strlength)); //Short-format name of operator strlength = 256; network->operator_short = g_strdup(g_variant_get_string(value, &strlength)); g_variant_unref(value); } else { network->operator_long = g_strdup(_("Unknown")); } //Network availability status value = g_variant_lookup_value(dict, "Status", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; network->status = mmgui_module_network_availability_status_translate(g_variant_get_string(value, &strlength)); g_variant_unref(value); //Add network to list *networks = g_slist_prepend(*networks, network); return 1; } else { if (network->operator_long != NULL) g_free(network->operator_long); if (network->operator_short != NULL) g_free(network->operator_short); g_free(network); } } g_variant_unref(techs); } return 0; } static void mmgui_module_networks_scan_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; GSList *networks; GVariantIter niterl1, niterl2; GVariant *nnodel1, *nnodel2; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; networks = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); } else { g_variant_iter_init(&niterl1, result); while ((nnodel1 = g_variant_iter_next_value(&niterl1)) != NULL) { g_variant_iter_init(&niterl2, nnodel1); while ((nnodel2 = g_variant_iter_next_value(&niterl2)) != NULL) { mmgui_module_network_retrieve(nnodel2, &networks); g_variant_unref(nnodel2); } g_variant_unref(nnodel1); } g_variant_unref(result); } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_SCAN_RESULT, user_data, networks); } } G_MODULE_EXPORT gboolean mmgui_module_networks_scan(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->netproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->scancaps & MMGUI_SCAN_CAPS_OBSERVE)) return FALSE; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SCAN; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->netproxy, "Scan", NULL, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SCAN], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_networks_scan_handler, mmguicore); return TRUE; } G_MODULE_EXPORT guint mmgui_module_contacts_enum(gpointer mmguicore, GSList **contactslist) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *contacts, *contpayload; guint contactsnum; gsize vcardstrlen; const gchar *vcardstr; if ((mmguicore == NULL) || (contactslist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->contactsproxy == NULL) return 0; if (mmguicorelc->device == NULL) return 0; //if (!mmguicorelc->device->enabled) return 0; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EXPORT)) return 0; error = NULL; contacts = g_dbus_proxy_call_sync(moduledata->contactsproxy, "Import", NULL, 0, -1, NULL, &error); if ((contacts == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return 0; } contactsnum = 0; /*Get vcard string*/ contpayload = g_variant_get_child_value(contacts, 0); if (contpayload != NULL) { /*Convert to string*/ vcardstrlen = 16384; vcardstr = g_variant_get_string(contpayload, &vcardstrlen); /*Enumerate contacts*/ contactsnum = vcard_parse_string(vcardstr, contactslist, "SIM"); /*Free resources*/ g_variant_unref(contpayload); } g_variant_unref(contacts); return contactsnum; } G_MODULE_EXPORT gboolean mmgui_module_contacts_delete(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->contactsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return FALSE; /*oFono can only export contacts, so do nothing here*/ return TRUE; } G_MODULE_EXPORT gint mmgui_module_contacts_add(gpointer mmguicore, mmgui_contact_t contact) { mmguicore_t mmguicorelc; moduledata_t moduledata; if ((mmguicore == NULL) || (contact == NULL)) return -1; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return -1; moduledata = (moduledata_t)mmguicorelc->moduledata; if ((contact->name == NULL) || (contact->number == NULL)) return -1; if (moduledata->contactsproxy == NULL) return -1; if (mmguicorelc->device == NULL) return -1; if (!mmguicorelc->device->enabled) return -1; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return -1; /*oFono can only export contacts, so do nothing here*/ return 0; } modem-manager-gui-0.0.17.1/src/modules/pppd245.c0000644000175000017500000004031212262265360017502 0ustar alexalex/* * pppd245.c * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../mmguicore.h" #define MMGUI_MODULE_SERVICE_NAME "/usr/sbin/pppd" #define MMGUI_MODULE_IDENTIFIER 245 #define MMGUI_MODULE_DESCRIPTION "pppd >= 2.4.5" //Internal definitions #define MODULE_INT_PPPD_DB_FILE_PATH_1 "/var/run/pppd2.tdb" #define MODULE_INT_PPPD_DB_FILE_PATH_2 "/var/run/ppp/pppd2.tdb" #define MODULE_INT_PPPD_LOCK_FILE_PATH "/var/run/%s.pid" #define MODULE_INT_PPPD_DB_FILE_START_PARAMETER "ORIG_UID=" #define MODULE_INT_PPPD_DB_FILE_END_PARAMETER "USEPEERDNS=" #define MODULE_INT_PPPD_DB_FILE_DEVICE_PARAMETER "DEVICE=" #define MODULE_INT_PPPD_DB_FILE_INTERFACE_PARAMETER "IFNAME=" #define MODULE_INT_PPPD_DB_FILE_PID_PARAMETER "PPPD_PID=" #define MODULE_INT_PPPD_SYSFS_DEVICE_PATH "/sys/dev/char/%u:%u" #define MODULE_INT_PPPD_SYSFS_START_PARAMETER "devices/pci" #define MODULE_INT_PPPD_SYSFS_END_PARAMETER '/' //Private module variables struct _mmguimoduledata { //Device serial gchar devserial[32]; //Connected device information gchar conndevice[256]; gchar connserial[32]; gchar connifname[IFNAMSIZ]; //pppd service pid pid_t pid; //Last error message gchar *errormessage; }; typedef struct _mmguimoduledata *moduledata_t; static void mmgui_module_handle_error_message(mmguicore_t mmguicore, gchar *message) { moduledata_t moduledata; if (mmguicore == NULL) return; moduledata = (moduledata_t)mmguicore->cmoduledata; if (moduledata == NULL) return; if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (message != NULL) { moduledata->errormessage = g_strdup(message); } else { moduledata->errormessage = g_strdup("Unknown error"); } g_warning("%s: %s", MMGUI_MODULE_DESCRIPTION, moduledata->errormessage); } static gchar *mmgui_module_pppd_strrstr(gchar *source, gsize sourcelen, gchar *entry, gsize entrylen) { gboolean found; gchar *sourceptr, *curptr; gsize ind; if ((source == NULL) || (entry == NULL)) return NULL; if ((sourcelen == 0) || (entrylen == 0)) return source; sourceptr = source + sourcelen - entrylen; for (curptr=sourceptr; curptr>=source; curptr--) { found = TRUE; for (ind=0; ind (bufsize - 1)) datalen = bufsize - 1; memcpy(buffer, segstart+paramlen, datalen); buffer[datalen] = '\0'; return buffer; } static gchar *mmgui_module_pppd_get_config_string(gpointer dbmapping, gsize dbsize) { gchar *segend, *segstart; gchar *result; if ((dbmapping == NULL) || (dbsize == 0)) return NULL; segend = mmgui_module_pppd_strrstr(dbmapping, dbsize, MODULE_INT_PPPD_DB_FILE_END_PARAMETER, strlen(MODULE_INT_PPPD_DB_FILE_END_PARAMETER)); if ((segend == NULL) || ((segend != NULL) && ((*segend) >= dbsize))) return NULL; segstart = mmgui_module_pppd_strrstr(dbmapping, dbsize-(*segend), MODULE_INT_PPPD_DB_FILE_START_PARAMETER, strlen(MODULE_INT_PPPD_DB_FILE_START_PARAMETER)); if ((segstart == NULL) || ((segstart != NULL) && (segend <= segstart))) return NULL; result = g_malloc0(segend-segstart+1); if (result == NULL) return NULL; memcpy(result, segstart, segend-segstart); return result; } static gchar *mmgui_module_pppd_get_device_serial(gchar *string, gchar *buffer, gsize bufsize) { gchar *segend, *segstart; gsize datalen, paramlen; if ((string == NULL) || (buffer == NULL) || (bufsize == 0)) return NULL; paramlen = strlen(MODULE_INT_PPPD_SYSFS_START_PARAMETER); segstart = strstr(string, MODULE_INT_PPPD_SYSFS_START_PARAMETER); if (segstart == NULL) return NULL; segstart = strchr(segstart + paramlen, MODULE_INT_PPPD_SYSFS_END_PARAMETER); if (segstart == NULL) return NULL; segend = strchr(segstart+paramlen, MODULE_INT_PPPD_SYSFS_END_PARAMETER); if (segend == NULL) return NULL; datalen = segend - segstart - 1; if (datalen > (bufsize - 1)) datalen = bufsize - 1; memcpy(buffer, segstart + 1, datalen); buffer[datalen] = '\0'; return buffer; } static gboolean mmgui_module_pppd_get_daemon_running(moduledata_t moduledata) { gchar pidfilepath[32], pidfiledata[32]; gint pidfilefd, status; /*struct flock pidfilelock;*/ if (moduledata == NULL) return FALSE; if (moduledata->connifname[0] == '\0') return FALSE; memset(pidfilepath, 0, sizeof(pidfilepath)); memset(pidfiledata, 0, sizeof(pidfiledata)); snprintf(pidfilepath, sizeof(pidfilepath), MODULE_INT_PPPD_LOCK_FILE_PATH, moduledata->connifname); pidfilefd = open(pidfilepath, O_RDONLY); if (pidfilefd == -1) return FALSE; status = read(pidfilefd, pidfiledata, sizeof(pidfiledata)); close(pidfilefd); if ((status != -1) && ((pid_t)atoi(pidfiledata) == moduledata->pid)) { return TRUE; } else { return FALSE; } } static void mmgui_module_pppd_set_connection_status(gpointer mmguicore, gboolean connected) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return; if (connected) { memset(mmguicorelc->device->interface, 0, IFNAMSIZ); strncpy(mmguicorelc->device->interface, moduledata->connifname, IFNAMSIZ); mmguicorelc->device->connected = TRUE; } else { memset(mmguicorelc->device->interface, 0, IFNAMSIZ); mmguicorelc->device->connected = FALSE; } } G_MODULE_EXPORT gboolean mmgui_module_init(mmguimodule_t module) { if (module == NULL) return FALSE; module->type = MMGUI_MODULE_TYPE_CONNECTION_MANGER; module->requirement = MMGUI_MODULE_REQUIREMENT_FILE; module->priority = MMGUI_MODULE_PRIORITY_LOW; module->identifier = MMGUI_MODULE_IDENTIFIER; module->functions = MMGUI_MODULE_FUNCTION_BASIC; g_snprintf(module->servicename, sizeof(module->servicename), MMGUI_MODULE_SERVICE_NAME); g_snprintf(module->description, sizeof(module->description), MMGUI_MODULE_DESCRIPTION); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_connection_open(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t *moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t *)&mmguicorelc->cmoduledata; (*moduledata) = g_new0(struct _mmguimoduledata, 1); (*moduledata)->errormessage = NULL; return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_connection_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->cmoduledata); if (moduledata != NULL) { if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } g_free(moduledata); } return TRUE; } G_MODULE_EXPORT gchar *mmgui_module_connection_last_error(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->cmoduledata); return moduledata->errormessage; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_open(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (device->sysfspath == NULL) { mmgui_module_handle_error_message(mmguicorelc, "Device data not available"); return FALSE; } if (mmgui_module_pppd_get_device_serial(device->sysfspath, moduledata->devserial, sizeof(moduledata->devserial)) == NULL) { mmgui_module_handle_error_message(mmguicorelc, "Device serial not available"); return FALSE; } return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; memset(moduledata->devserial, 0, sizeof(moduledata->devserial)); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_status(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; gint dbfd, state; struct stat statbuf; gpointer dbmapping; gchar *pppdconfig; gchar intbuf[16], sysfspath[128], sysfslink[128]; gchar *parameter; gint status, devmajor, devminor; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->devserial[0] == '\0') return FALSE; /*Usual PPPD database path*/ dbfd = open(MODULE_INT_PPPD_DB_FILE_PATH_1, O_RDONLY); /*Try special path first*/ if (dbfd == -1) { /*Special PPPD database path (Fedora uses it)*/ dbfd = open(MODULE_INT_PPPD_DB_FILE_PATH_2, O_RDONLY); /*No database found*/ if (dbfd == -1) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); g_debug("Failed to open PPPD database file\n"); return TRUE; } } state = fstat(dbfd, &statbuf); if (state == -1) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); g_debug("Failed to get PPPD database file size\n"); close(dbfd); return TRUE; } dbmapping = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, dbfd, 0); if(dbmapping == (void *)-1) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); mmgui_module_handle_error_message(mmguicorelc, "Failed to map PPPD database file into memory"); close(dbfd); return TRUE; } pppdconfig = mmgui_module_pppd_get_config_string(dbmapping, statbuf.st_size); if (pppdconfig == NULL) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); mmgui_module_handle_error_message(mmguicorelc, "Failed to get config"); munmap(dbmapping, statbuf.st_size); close(dbfd); return TRUE; } munmap(dbmapping, statbuf.st_size); close(dbfd); parameter = mmgui_module_pppd_get_config_fragment(pppdconfig, MODULE_INT_PPPD_DB_FILE_DEVICE_PARAMETER, moduledata->conndevice, sizeof(moduledata->conndevice)); if (parameter == NULL) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); g_debug("Device entry not found in PPPD database\n"); g_free(pppdconfig); return TRUE; } parameter = mmgui_module_pppd_get_config_fragment(pppdconfig, MODULE_INT_PPPD_DB_FILE_INTERFACE_PARAMETER, moduledata->connifname, sizeof(moduledata->connifname)); if (parameter == NULL) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); g_debug("Interface entry not found in PPPD database\n"); g_free(pppdconfig); return TRUE; } parameter = mmgui_module_pppd_get_config_fragment(pppdconfig, MODULE_INT_PPPD_DB_FILE_PID_PARAMETER, intbuf, sizeof(intbuf)); if (parameter == NULL) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); g_debug("PPPD pid not found in PPPD database\n"); g_free(pppdconfig); return TRUE; } else { moduledata->pid = (pid_t)atoi(parameter); } g_free(pppdconfig); if (!mmgui_module_pppd_get_daemon_running(moduledata)) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); g_debug("PPPD daemon is not running\n"); return TRUE; } status = stat(moduledata->conndevice, &statbuf); if ((status == -1) || ((status == 0) && (!S_ISCHR(statbuf.st_mode)))) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); g_debug("Device not suitable\n"); return TRUE; } devmajor = major(statbuf.st_rdev); devminor = minor(statbuf.st_rdev); memset(sysfspath, 0, sizeof(sysfspath)); memset(sysfslink, 0, sizeof(sysfslink)); snprintf(sysfspath, sizeof(sysfspath), MODULE_INT_PPPD_SYSFS_DEVICE_PATH, devmajor, devminor); status = readlink((const char *)sysfspath, sysfslink, sizeof(sysfslink)); if (status == -1) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); mmgui_module_handle_error_message(mmguicorelc, "Device sysfs path not available"); return TRUE; } sysfslink[status] = '\0'; if (mmgui_module_pppd_get_device_serial(sysfslink, moduledata->connserial, sizeof(moduledata->connserial)) == NULL) { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); mmgui_module_handle_error_message(mmguicorelc, "Device serial not available"); return TRUE; } if (g_str_equal(moduledata->connserial, moduledata->devserial)) { mmgui_module_pppd_set_connection_status(mmguicore, TRUE); } else { mmgui_module_pppd_set_connection_status(mmguicore, FALSE); } return TRUE; } G_MODULE_EXPORT guint64 mmgui_module_device_connection_timestamp(gpointer mmguicore) { mmguicore_t mmguicorelc; /*moduledata_t moduledata;*/ gchar lockfilepath[128]; guint64 timestamp; struct stat statbuf; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; /*if (mmguicorelc->cmoduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata;*/ if (mmguicorelc->device == NULL) return FALSE; /*Get current timestamp*/ timestamp = (guint64)time(NULL); /*Form lock file path*/ memset(lockfilepath, 0, sizeof(lockfilepath)); g_snprintf(lockfilepath, sizeof(lockfilepath), MODULE_INT_PPPD_LOCK_FILE_PATH, mmguicorelc->device->interface); /*Get lock file modification timestamp*/ if (stat(lockfilepath, &statbuf) == 0) { timestamp = (guint64)statbuf.st_mtime; } return timestamp; } G_MODULE_EXPORT gboolean mmgui_module_device_connection_disconnect(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; gchar *stderrdata = NULL; gint exitstatus = 0; gchar *argv[3] = {"/sbin/ifdown", NULL, NULL}; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->cmoduledata; if (mmguicorelc->device == NULL) return FALSE; if (moduledata->devserial[0] == '\0') return FALSE; //If device already disconnected, return TRUE if (!mmguicorelc->device->connected) return TRUE; error = NULL; argv[1] = mmguicorelc->device->interface; if(g_spawn_sync(NULL, argv, NULL, G_SPAWN_STDOUT_TO_DEV_NULL, NULL, NULL, NULL, &stderrdata, &exitstatus, &error)) { //Disconnected - update device state memset(mmguicorelc->device->interface, 0, sizeof(mmguicorelc->device->interface)); mmguicorelc->device->connected = FALSE; return TRUE; } else { //Failed to disconnect if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error->message); g_error_free(error); } else if (stderrdata != NULL) { mmgui_module_handle_error_message(mmguicorelc, stderrdata); g_free(stderrdata); } return FALSE; } } modem-manager-gui-0.0.17.1/src/modules/mm07.c0000644000175000017500000031231212374503630017065 0ustar alexalex/* * mm07.c * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "../mmguicore.h" #include "../smsdb.h" #include "../encoding.h" #define MMGUI_MODULE_SERVICE_NAME "org.freedesktop.ModemManager1" #define MMGUI_MODULE_IDENTIFIER 70 #define MMGUI_MODULE_DESCRIPTION "Modem Manager >= 0.7.0" #define MMGUI_MODULE_ENABLE_OPERATION_TIMEOUT 20000 #define MMGUI_MODULE_SEND_SMS_OPERATION_TIMEOUT 35000 #define MMGUI_MODULE_SEND_USSD_OPERATION_TIMEOUT 25000 #define MMGUI_MODULE_NETWORKS_SCAN_OPERATION_TIMEOUT 60000 //Internal enumerations //Modem state internal flags typedef enum { MODULE_INT_MODEM_STATE_FAILED = -1, MODULE_INT_MODEM_STATE_UNKNOWN = 0, MODULE_INT_MODEM_STATE_INITIALIZING = 1, MODULE_INT_MODEM_STATE_LOCKED = 2, MODULE_INT_MODEM_STATE_DISABLED = 3, MODULE_INT_MODEM_STATE_DISABLING = 4, MODULE_INT_MODEM_STATE_ENABLING = 5, MODULE_INT_MODEM_STATE_ENABLED = 6, MODULE_INT_MODEM_STATE_SEARCHING = 7, MODULE_INT_MODEM_STATE_REGISTERED = 8, MODULE_INT_MODEM_STATE_DISCONNECTING = 9, MODULE_INT_MODEM_STATE_CONNECTING = 10, MODULE_INT_MODEM_STATE_CONNECTED = 11 } ModuleIntModemState; //Modem capability internal flags typedef enum { MODULE_INT_MODEM_CAPABILITY_NONE = 0, MODULE_INT_MODEM_CAPABILITY_POTS = 1 << 0, MODULE_INT_MODEM_CAPABILITY_CDMA_EVDO = 1 << 1, MODULE_INT_MODEM_CAPABILITY_GSM_UMTS = 1 << 2, MODULE_INT_MODEM_CAPABILITY_LTE = 1 << 3, MODULE_INT_MODEM_CAPABILITY_LTE_ADVANCED = 1 << 4, MODULE_INT_MODEM_CAPABILITY_IRIDIUM = 1 << 5, } ModuleIntModemCapability; //Modem registration internal flags typedef enum { MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_IDLE = 0, MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_HOME = 1, MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_SEARCHING = 2, MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_DENIED = 3, MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN = 4, MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_ROAMING = 5, } ModuleIntModem3gppRegistrationState; //CDMA modem registration internal flags typedef enum { MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN = 0, MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_REGISTERED = 1, MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_HOME = 2, MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_ROAMING = 3, } ModuleIntModemCdmaRegistrationState; //Modem USSD state internal flags typedef enum { MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN = 0, MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_IDLE = 1, MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_ACTIVE = 2, MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_USER_RESPONSE = 3, } ModuleIntModem3gppUssdSessionState; //Modem network availability internal flags typedef enum { MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN = 0, MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE = 1, MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT = 2, MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN = 3, } ModuleIntModem3gppNetworkAvailability; //Modem acess technology internal flags typedef enum { MODULE_INT_MODEM_ACCESS_TECHNOLOGY_UNKNOWN = 0, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_POTS = 1 << 0, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GSM = 1 << 1, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT = 1 << 2, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GPRS = 1 << 3, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EDGE = 1 << 4, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_UMTS = 1 << 5, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSDPA = 1 << 6, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSUPA = 1 << 7, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSPA = 1 << 8, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS = 1 << 9, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_1XRTT = 1 << 10, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDO0 = 1 << 11, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDOA = 1 << 12, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDOB = 1 << 13, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_LTE = 1 << 14, MODULE_INT_MODEM_ACCESS_TECHNOLOGY_ANY = 0xFFFFFFFF, } ModuleIntModemAccessTechnology; //Location types internal flags typedef enum { MODULE_INT_MODEM_LOCATION_SOURCE_NONE = 0, MODULE_INT_MODEM_LOCATION_SOURCE_3GPP_LAC_CI = 1 << 0, MODULE_INT_MODEM_LOCATION_SOURCE_GPS_RAW = 1 << 1, MODULE_INT_MODEM_LOCATION_SOURCE_GPS_NMEA = 1 << 2, } ModuleIntModemLocationSource; //SMS message state internal flags typedef enum { MODULE_INT_SMS_STATE_UNKNOWN = 0, MODULE_INT_SMS_STATE_STORED = 1, MODULE_INT_SMS_STATE_RECEIVING = 2, MODULE_INT_SMS_STATE_RECEIVED = 3, MODULE_INT_SMS_STATE_SENDING = 4, MODULE_INT_SMS_STATE_SENT = 5, } ModuleIntSmsState; //SMS message internal type typedef enum { MODULE_INT_PDU_TYPE_UNKNOWN = 0, MODULE_INT_PDU_TYPE_DELIVER = 1, MODULE_INT_PDU_TYPE_SUBMIT = 2, MODULE_INT_PDU_TYPE_STATUS_REPORT = 3 } ModuleIntSmsPduType; //SMS validity internal types typedef enum { MODULE_INT_SMS_VALIDITY_TYPE_UNKNOWN = 0, MODULE_INT_SMS_VALIDITY_TYPE_RELATIVE = 1, MODULE_INT_SMS_VALIDITY_TYPE_ABSOLUTE = 2, MODULE_INT_SMS_VALIDITY_TYPE_ENHANCED = 3, } ModuleIntSmsValidityType; //Private module variables struct _mmguimoduledata { //DBus connection GDBusConnection *connection; //DBus proxy objects GDBusObjectManager *objectmanager; GDBusProxy *cardproxy; GDBusProxy *netproxy; GDBusProxy *modemproxy; GDBusProxy *smsproxy; GDBusProxy *ussdproxy; GDBusProxy *locationproxy; GDBusProxy *timeproxy; GDBusProxy *contactsproxy; GDBusProxy *signalproxy; //Attached signal handlers gulong netpropsignal; gulong statesignal; gulong modempropsignal; gulong smssignal; gulong locationpropsignal; gulong timesignal; //Partial SMS messages GList *partialsms; //USSD reencoding flag gboolean reencodeussd; //Last error message gchar *errormessage; //Cancellable GCancellable *cancellable; //Operations timeouts guint timeouts[MMGUI_DEVICE_OPERATIONS]; }; typedef struct _mmguimoduledata *moduledata_t; static void mmgui_module_handle_error_message(mmguicore_t mmguicore, GError *error); static guint mmgui_module_get_object_path_index(const gchar *objectpath); static gint mmgui_module_gsm_operator_code(const gchar *opcodestr); static void mmgui_signal_handler(GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters, gpointer data); static void mmgui_property_change_handler(GDBusProxy *proxy, GVariant *changed_properties, GStrv invalidated_properties, gpointer data); static void mmgui_objectmanager_added_signal_handler(GDBusObjectManager *manager, GDBusObject *object, gpointer user_data); static void mmgui_objectmanager_removed_signal_handler(GDBusObjectManager *manager, GDBusObject *object, gpointer user_data); static gboolean mmgui_module_device_enabled_from_state(gint state); static gboolean mmgui_module_device_locked_from_state(gint state); static gboolean mmgui_module_device_connected_from_state(gint state); static gboolean mmgui_module_device_registered_from_state(gint state); static enum _mmgui_device_types mmgui_module_device_type_from_caps(gint caps); static enum _mmgui_reg_status mmgui_module_registration_status_translate(guint status); static enum _mmgui_reg_status mmgui_module_cdma_registration_status_translate(guint status); static enum _mmgui_network_availability mmgui_module_network_availability_status_translate(guint status); static enum _mmgui_access_tech mmgui_module_access_technology_translate(guint technology); static enum _mmgui_device_modes mmgui_module_access_mode_translate(guint mode); static gboolean mmgui_module_devices_update_device_mode(gpointer mmguicore, gint oldstate, gint newstate, guint changereason); static gboolean mmgui_module_devices_update_location(gpointer mmguicore, mmguidevice_t device); static gboolean mmgui_module_devices_enable_location(gpointer mmguicore, mmguidevice_t device, gboolean enable); static mmguidevice_t mmgui_module_device_new(mmguicore_t mmguicore, const gchar *devpath); static mmgui_sms_message_t mmgui_module_sms_retrieve(mmguicore_t mmguicore, const gchar *smspath); static gint mmgui_module_sms_get_id(mmguicore_t mmguicore, const gchar *smspath); static void mmgui_module_handle_error_message(mmguicore_t mmguicore, GError *error) { moduledata_t moduledata; if ((mmguicore == NULL) || (error == NULL)) return; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata == NULL) return; if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (error->message != NULL) { moduledata->errormessage = g_strdup(error->message); } else { moduledata->errormessage = g_strdup("Unknown error"); } g_warning("%s: %s", MMGUI_MODULE_DESCRIPTION, moduledata->errormessage); } static guint mmgui_module_get_object_path_index(const gchar *objectpath) { guint id; gchar *objectpathid; objectpathid = strrchr(objectpath, '/') + 1; if ((objectpathid != NULL) && (objectpathid[0] != '\0')) { id = atoi(objectpathid); } else { id = 0; } return id; } static gint mmgui_module_gsm_operator_code(const gchar *opcodestr) { gsize length; gchar codepartbuf[4]; gint operatorcode; if (opcodestr == NULL) return 0; length = strlen(opcodestr); if (length < 5) return 0; operatorcode = 0; /*MCC*/ memset(codepartbuf, 0, sizeof(codepartbuf)); memcpy(codepartbuf, opcodestr, 3); operatorcode |= (atoi(codepartbuf) & 0x0000ffff) << 16; /*MNC*/ memset(codepartbuf, 0, sizeof(codepartbuf)); memcpy(codepartbuf, opcodestr + 3, length - 3); operatorcode |= atoi(codepartbuf) & 0x0000ffff; return operatorcode; } static void mmgui_signal_handler(GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters, gpointer data) { mmguicore_t mmguicore; moduledata_t moduledata; gchar *statusstr; gboolean statusflag; gint oldstate, newstate; guint changereason; if (data == NULL) return; mmguicore = (mmguicore_t)data; moduledata = (moduledata_t)mmguicore->moduledata; if (g_str_equal(signal_name, "Added")) { g_variant_get(parameters, "(ob)", &statusstr, &statusflag); if (statusflag) { /*Message received from network*/ moduledata->partialsms = g_list_prepend(moduledata->partialsms, g_strdup(statusstr)); } } else if (g_str_equal(signal_name, "StateChanged")) { g_variant_get(parameters, "(iiu)", &oldstate, &newstate, &changereason); /*Send signals if needed*/ mmgui_module_devices_update_device_mode(mmguicore, oldstate, newstate, changereason); } g_debug("SIGNAL: %s (%s) argtype: %s\n", signal_name, sender_name, g_variant_get_type_string(parameters)); } static void mmgui_property_change_handler(GDBusProxy *proxy, GVariant *changed_properties, GStrv invalidated_properties, gpointer data) { mmguicore_t mmguicore; mmguidevice_t device; GVariantIter *iter; /*GVariant *item;*/ const gchar *key; GVariant *value; guint statevalue; gboolean stateflag; if ((changed_properties == NULL) || (data == NULL)) return; mmguicore = (mmguicore_t)data; if (mmguicore->device == NULL) return; device = mmguicore->device; if (g_variant_n_children(changed_properties) > 0) { g_variant_get(changed_properties, "a{sv}", &iter); while (g_variant_iter_loop(iter, "{&sv}", &key, &value)) { if (g_str_equal(key, "SignalQuality")) { g_variant_get(value, "(ub)", &statevalue, &stateflag); if (statevalue != device->siglevel) { device->siglevel = statevalue; if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_SIGNAL_LEVEL_CHANGE, mmguicore, mmguicore->device); } } } else if (g_str_equal(key, "AccessTechnologies")) { statevalue = mmgui_module_access_mode_translate(g_variant_get_uint32(value)); if (statevalue != device->mode) { device->mode = statevalue; if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_NETWORK_MODE_CHANGE, mmguicore, mmguicore->device); } } } else if (g_str_equal(key, "Location")) { if (mmgui_module_devices_update_location(mmguicore, mmguicore->device)) { if (mmguicore->eventcb != NULL) { (mmguicore->eventcb)(MMGUI_EVENT_LOCATION_CHANGE, mmguicore, mmguicore->device); } } } g_debug("Property changed: %s\n", key); } g_variant_iter_free(iter); } } static void mmgui_objectmanager_added_signal_handler(GDBusObjectManager *manager, GDBusObject *object, gpointer user_data) { mmguicore_t mmguicore; const gchar *devpath; mmguidevice_t device; if ((user_data == NULL) || (object == NULL)) return; mmguicore = (mmguicore_t)user_data; if (mmguicore->eventcb != NULL) { devpath = g_dbus_object_get_object_path(object); g_debug("Device added: %s\n", devpath); if (devpath != NULL) { device = mmgui_module_device_new(mmguicore, devpath); (mmguicore->eventcb)(MMGUI_EVENT_DEVICE_ADDED, mmguicore, device); } } } static void mmgui_objectmanager_removed_signal_handler(GDBusObjectManager *manager, GDBusObject *object, gpointer user_data) { mmguicore_t mmguicore; const gchar *devpath; guint id; if ((user_data == NULL) || (object == NULL)) return; mmguicore = (mmguicore_t)user_data; if (mmguicore->eventcb != NULL) { devpath = g_dbus_object_get_object_path(object); g_debug("Device removed: %s\n", devpath); if (devpath != NULL) { id = mmgui_module_get_object_path_index(devpath); (mmguicore->eventcb)(MMGUI_EVENT_DEVICE_REMOVED, mmguicore, GUINT_TO_POINTER(id)); } } } static gboolean mmgui_module_device_enabled_from_state(gint state) { gboolean enabled; switch (state) { case MODULE_INT_MODEM_STATE_FAILED: case MODULE_INT_MODEM_STATE_UNKNOWN: case MODULE_INT_MODEM_STATE_INITIALIZING: case MODULE_INT_MODEM_STATE_LOCKED: case MODULE_INT_MODEM_STATE_DISABLED: case MODULE_INT_MODEM_STATE_DISABLING: case MODULE_INT_MODEM_STATE_ENABLING: enabled = FALSE; break; case MODULE_INT_MODEM_STATE_ENABLED: case MODULE_INT_MODEM_STATE_SEARCHING: case MODULE_INT_MODEM_STATE_REGISTERED: case MODULE_INT_MODEM_STATE_DISCONNECTING: case MODULE_INT_MODEM_STATE_CONNECTING: case MODULE_INT_MODEM_STATE_CONNECTED: enabled = TRUE; break; default: enabled = FALSE; break; } return enabled; } static gboolean mmgui_module_device_locked_from_state(gint state) { gboolean locked; switch (state) { case MODULE_INT_MODEM_STATE_FAILED: case MODULE_INT_MODEM_STATE_UNKNOWN: case MODULE_INT_MODEM_STATE_INITIALIZING: locked = FALSE; break; case MODULE_INT_MODEM_STATE_LOCKED: locked = TRUE; break; case MODULE_INT_MODEM_STATE_DISABLED: case MODULE_INT_MODEM_STATE_DISABLING: case MODULE_INT_MODEM_STATE_ENABLING: case MODULE_INT_MODEM_STATE_ENABLED: case MODULE_INT_MODEM_STATE_SEARCHING: case MODULE_INT_MODEM_STATE_REGISTERED: case MODULE_INT_MODEM_STATE_DISCONNECTING: case MODULE_INT_MODEM_STATE_CONNECTING: case MODULE_INT_MODEM_STATE_CONNECTED: locked = FALSE; break; default: locked = FALSE; break; } return locked; } static gboolean mmgui_module_device_connected_from_state(gint state) { gboolean connected; switch (state) { case MODULE_INT_MODEM_STATE_FAILED: case MODULE_INT_MODEM_STATE_UNKNOWN: case MODULE_INT_MODEM_STATE_INITIALIZING: case MODULE_INT_MODEM_STATE_LOCKED: case MODULE_INT_MODEM_STATE_DISABLED: case MODULE_INT_MODEM_STATE_DISABLING: case MODULE_INT_MODEM_STATE_ENABLING: case MODULE_INT_MODEM_STATE_ENABLED: case MODULE_INT_MODEM_STATE_SEARCHING: case MODULE_INT_MODEM_STATE_REGISTERED: connected = FALSE; break; case MODULE_INT_MODEM_STATE_DISCONNECTING: connected = TRUE; break; case MODULE_INT_MODEM_STATE_CONNECTING: connected = FALSE; break; case MODULE_INT_MODEM_STATE_CONNECTED: connected = TRUE; break; default: connected = FALSE; break; } return connected; } static gboolean mmgui_module_device_registered_from_state(gint state) { gboolean registered; switch (state) { case MODULE_INT_MODEM_STATE_FAILED: case MODULE_INT_MODEM_STATE_UNKNOWN: case MODULE_INT_MODEM_STATE_INITIALIZING: case MODULE_INT_MODEM_STATE_LOCKED: case MODULE_INT_MODEM_STATE_DISABLED: case MODULE_INT_MODEM_STATE_DISABLING: case MODULE_INT_MODEM_STATE_ENABLING: case MODULE_INT_MODEM_STATE_ENABLED: case MODULE_INT_MODEM_STATE_SEARCHING: registered = FALSE; break; case MODULE_INT_MODEM_STATE_REGISTERED: case MODULE_INT_MODEM_STATE_DISCONNECTING: case MODULE_INT_MODEM_STATE_CONNECTING: case MODULE_INT_MODEM_STATE_CONNECTED: registered = TRUE; break; default: registered = FALSE; break; } return registered; } static enum _mmgui_device_types mmgui_module_device_type_from_caps(gint caps) { enum _mmgui_device_types type; switch (caps) { case MODULE_INT_MODEM_CAPABILITY_NONE: case MODULE_INT_MODEM_CAPABILITY_POTS: type = MMGUI_DEVICE_TYPE_GSM; break; case MODULE_INT_MODEM_CAPABILITY_CDMA_EVDO: type = MMGUI_DEVICE_TYPE_CDMA; break; case MODULE_INT_MODEM_CAPABILITY_GSM_UMTS: case MODULE_INT_MODEM_CAPABILITY_LTE: case MODULE_INT_MODEM_CAPABILITY_LTE_ADVANCED: case MODULE_INT_MODEM_CAPABILITY_IRIDIUM: type = MMGUI_DEVICE_TYPE_GSM; break; default: type = MMGUI_DEVICE_TYPE_GSM; break; } return type; } static enum _mmgui_reg_status mmgui_module_registration_status_translate(guint status) { enum _mmgui_reg_status tstatus; switch (status) { case MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_IDLE: tstatus = MMGUI_REG_STATUS_IDLE; break; case MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_HOME: tstatus = MMGUI_REG_STATUS_HOME; break; case MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_SEARCHING: tstatus = MMGUI_REG_STATUS_SEARCHING; break; case MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_DENIED: tstatus = MMGUI_REG_STATUS_DENIED; break; case MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN: tstatus = MMGUI_REG_STATUS_UNKNOWN; break; case MODULE_INT_MODEM_3GPP_REGISTRATION_STATE_ROAMING: tstatus = MMGUI_REG_STATUS_ROAMING; break; default: tstatus = MMGUI_REG_STATUS_UNKNOWN; break; } return tstatus; } static enum _mmgui_reg_status mmgui_module_cdma_registration_status_translate(guint status) { enum _mmgui_reg_status tstatus; switch (status) { case MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN: tstatus = MMGUI_REG_STATUS_UNKNOWN; break; case MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_REGISTERED: tstatus = MMGUI_REG_STATUS_IDLE; break; case MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_HOME: tstatus = MMGUI_REG_STATUS_HOME; break; case MODULE_INT_MODEM_CDMA_REGISTRATION_STATE_ROAMING: tstatus = MMGUI_REG_STATUS_ROAMING; break; default: tstatus = MMGUI_REG_STATUS_UNKNOWN; break; } return tstatus; } static enum _mmgui_network_availability mmgui_module_network_availability_status_translate(guint status) { guint tstatus; switch (status) { case MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN: tstatus = MMGUI_NA_UNKNOWN; break; case MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE: tstatus = MMGUI_NA_AVAILABLE; break; case MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT: tstatus = MMGUI_NA_CURRENT; break; case MODULE_INT_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN: tstatus = MMGUI_NA_FORBIDDEN; break; default: tstatus = MMGUI_NA_UNKNOWN; break; } return tstatus; } static enum _mmgui_access_tech mmgui_module_access_technology_translate(guint technology) { enum _mmgui_access_tech ttechnology; switch (technology) { case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_UNKNOWN: ttechnology = MMGUI_ACCESS_TECH_UNKNOWN; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_POTS: ttechnology = MMGUI_ACCESS_TECH_UNKNOWN; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GSM: ttechnology = MMGUI_ACCESS_TECH_GSM; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT: ttechnology = MMGUI_ACCESS_TECH_GSM_COMPACT; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GPRS: ttechnology = MMGUI_ACCESS_TECH_EDGE; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EDGE: ttechnology = MMGUI_ACCESS_TECH_EDGE; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_UMTS: ttechnology = MMGUI_ACCESS_TECH_UMTS; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSDPA: ttechnology = MMGUI_ACCESS_TECH_HSDPA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSUPA: ttechnology = MMGUI_ACCESS_TECH_HSUPA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSPA: ttechnology = MMGUI_ACCESS_TECH_HSPA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS: ttechnology = MMGUI_ACCESS_TECH_HSPA_PLUS; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_1XRTT: ttechnology = MMGUI_ACCESS_TECH_1XRTT; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDO0: ttechnology = MMGUI_ACCESS_TECH_EVDO0; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDOA: ttechnology = MMGUI_ACCESS_TECH_EVDOA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDOB: ttechnology = MMGUI_ACCESS_TECH_EVDOB; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_LTE: ttechnology = MMGUI_ACCESS_TECH_LTE; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_ANY: ttechnology = MMGUI_ACCESS_TECH_UNKNOWN; break; default: ttechnology = MMGUI_ACCESS_TECH_UNKNOWN; break; } return ttechnology; } static enum _mmgui_device_modes mmgui_module_access_mode_translate(guint mode) { enum _mmgui_device_modes tmode; switch (mode) { case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_UNKNOWN: tmode = MMGUI_DEVICE_MODE_UNKNOWN; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_POTS: tmode = MMGUI_DEVICE_MODE_UNKNOWN; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GSM: tmode = MMGUI_DEVICE_MODE_GSM; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT: tmode = MMGUI_DEVICE_MODE_GSM_COMPACT; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_GPRS: tmode = MMGUI_DEVICE_MODE_GPRS; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EDGE: tmode = MMGUI_DEVICE_MODE_EDGE; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_UMTS: tmode = MMGUI_DEVICE_MODE_UMTS; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSDPA: tmode = MMGUI_DEVICE_MODE_HSDPA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSUPA: tmode = MMGUI_DEVICE_MODE_HSUPA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSPA: tmode = MMGUI_DEVICE_MODE_HSPA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS: tmode = MMGUI_DEVICE_MODE_HSPA_PLUS; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_1XRTT: tmode = MMGUI_DEVICE_MODE_1XRTT; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDO0: tmode = MMGUI_DEVICE_MODE_EVDO0; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDOA: tmode = MMGUI_DEVICE_MODE_EVDOA; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_EVDOB: tmode = MMGUI_DEVICE_MODE_EVDOB; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_LTE: tmode = MMGUI_DEVICE_MODE_LTE; break; case MODULE_INT_MODEM_ACCESS_TECHNOLOGY_ANY: tmode = MMGUI_DEVICE_MODE_UNKNOWN; break; default: tmode = MMGUI_DEVICE_MODE_UNKNOWN; break; } return tmode; } static mmguidevice_t mmgui_module_device_new(mmguicore_t mmguicore, const gchar *devpath) { mmguidevice_t device; moduledata_t moduledata; GDBusProxy *deviceproxy; GError *error; GVariant *deviceinfo; gsize strsize; guint statevalue; gchar *blockstr; if ((mmguicore == NULL) || (devpath == NULL)) return NULL; moduledata = (moduledata_t)mmguicore->moduledata; if (moduledata->connection == NULL) return NULL; device = g_new0(struct _mmguidevice, 1); device->id = mmgui_module_get_object_path_index(devpath); device->objectpath = g_strdup(devpath); device->operation = MMGUI_DEVICE_OPERATION_IDLE; /*Zero values we can't get this moment*/ /*SMS*/ device->smscaps = MMGUI_SMS_CAPS_NONE; device->smsdb = NULL; /*Networks*/ /*Info*/ device->manufacturer = NULL; device->model = NULL; device->version = NULL; device->operatorname = NULL; device->operatorcode = 0; device->imei = NULL; device->imsi = NULL; device->port = NULL; device->internalid = NULL; device->persistentid = NULL; device->sysfspath = NULL; /*USSD*/ device->ussdcaps = MMGUI_USSD_CAPS_NONE; device->ussdencoding = MMGUI_USSD_ENCODING_GSM7; /*Location*/ device->locationcaps = MMGUI_LOCATION_CAPS_NONE; memset(device->loc3gppdata, 0, sizeof(device->loc3gppdata)); memset(device->locgpsdata, 0, sizeof(device->locgpsdata)); /*Scan*/ device->scancaps = MMGUI_SCAN_CAPS_NONE; /*Traffic*/ device->rxbytes = 0; device->txbytes = 0; device->sessiontime = 0; device->speedchecktime = 0; device->smschecktime = 0; device->speedindex = 0; device->connected = FALSE; memset(device->speedvalues, 0, sizeof(device->speedvalues)); memset(device->interface, 0, sizeof(device->interface)); /*Contacts*/ device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; device->contactslist = NULL; error = NULL; deviceproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", devpath, "org.freedesktop.ModemManager1.Modem", NULL, &error); if ((deviceproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); g_object_unref(deviceproxy); /*Fill default values*/ device->manufacturer = g_strdup(_("Unknown")); device->model = g_strdup(_("Unknown")); device->version = g_strdup(_("Unknown")); device->port = g_strdup(_("Unknown")); device->type = MMGUI_DEVICE_TYPE_GSM; return device; } /*Device manufacturer*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "Manufacturer"); if (deviceinfo != NULL) { strsize = 256; device->manufacturer = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->manufacturer = g_strdup(_("Unknown")); } /*Device model*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "Model"); if (deviceinfo != NULL) { strsize = 256; device->model = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->model = g_strdup(_("Unknown")); } /*Device revision*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "Revision"); if (deviceinfo != NULL) { strsize = 256; device->version = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->version = g_strdup(_("Unknown")); } /*Device port*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "PrimaryPort"); if (deviceinfo != NULL) { strsize = 256; device->port = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->port = g_strdup(""); } /*Need to get usb device serial for fallback traffic monitoring*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "Device"); if (deviceinfo != NULL) { strsize = 256; device->sysfspath = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->sysfspath = g_strdup(""); } /*Device type (version 0.7.990 property)*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "ModemCapabilities"); if (deviceinfo != NULL) { statevalue = g_variant_get_uint32(deviceinfo); device->type = mmgui_module_device_type_from_caps(statevalue); g_variant_unref(deviceinfo); } else { /*Device type (version 0.7.991 property)*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "CurrentCapabilities"); if (deviceinfo != NULL) { statevalue = g_variant_get_uint32(deviceinfo); device->type = mmgui_module_device_type_from_caps(statevalue); g_variant_unref(deviceinfo); } else { device->type = MODULE_INT_MODEM_CAPABILITY_GSM_UMTS; } } /*Is device enabled, blocked and registered*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "State"); if (deviceinfo != NULL) { statevalue = g_variant_get_int32(deviceinfo); device->enabled = mmgui_module_device_enabled_from_state(statevalue); device->blocked = mmgui_module_device_locked_from_state(statevalue); device->registered = mmgui_module_device_registered_from_state(statevalue); g_variant_unref(deviceinfo); } else { device->enabled = TRUE; device->blocked = FALSE; device->registered = TRUE; } /*Internal Modem Manager identifier*/ deviceinfo = g_dbus_proxy_get_cached_property(deviceproxy, "DeviceIdentifier"); if (deviceinfo != NULL) { strsize = 256; device->internalid = g_strdup(g_variant_get_string(deviceinfo, &strsize)); g_variant_unref(deviceinfo); } else { device->internalid = NULL; } /*Persistent device identifier*/ blockstr = g_strdup_printf("%s_%s_%s", device->manufacturer, device->model, device->version); device->persistentid = g_compute_checksum_for_string(G_CHECKSUM_MD5, (const gchar *)blockstr, -1); g_free(blockstr); g_object_unref(deviceproxy); return device; } G_MODULE_EXPORT gboolean mmgui_module_init(mmguimodule_t module) { if (module == NULL) return FALSE; module->type = MMGUI_MODULE_TYPE_MODEM_MANAGER; module->requirement = MMGUI_MODULE_REQUIREMENT_SERVICE; module->priority = MMGUI_MODULE_PRIORITY_NORMAL; module->identifier = MMGUI_MODULE_IDENTIFIER; module->functions = MMGUI_MODULE_FUNCTION_BASIC; g_snprintf(module->servicename, sizeof(module->servicename), MMGUI_MODULE_SERVICE_NAME); g_snprintf(module->description, sizeof(module->description), MMGUI_MODULE_DESCRIPTION); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_open(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t *moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t *)&mmguicorelc->moduledata; (*moduledata) = g_new0(struct _mmguimoduledata, 1); error = NULL; (*moduledata)->connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); (*moduledata)->errormessage = NULL; if (((*moduledata)->connection == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_free(mmguicorelc->moduledata); return FALSE; } error = NULL; (*moduledata)->objectmanager = g_dbus_object_manager_client_new_sync((*moduledata)->connection, G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE, "org.freedesktop.ModemManager1", "/org/freedesktop/ModemManager1", NULL, NULL, NULL, NULL, &error); g_signal_connect(G_OBJECT((*moduledata)->objectmanager), "object-added", G_CALLBACK(mmgui_objectmanager_added_signal_handler), mmguicore); g_signal_connect(G_OBJECT((*moduledata)->objectmanager), "object-removed", G_CALLBACK(mmgui_objectmanager_removed_signal_handler), mmguicore); if (((*moduledata)->objectmanager == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_object_unref((*moduledata)->connection); g_free(mmguicorelc->moduledata); return FALSE; } /*Cancellable*/ (*moduledata)->cancellable = g_cancellable_new(); /*Operations timeouts*/ (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_ENABLE] = MMGUI_MODULE_ENABLE_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SEND_SMS] = MMGUI_MODULE_SEND_SMS_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SEND_USSD] = MMGUI_MODULE_SEND_USSD_OPERATION_TIMEOUT; (*moduledata)->timeouts[MMGUI_DEVICE_OPERATION_SCAN] = MMGUI_MODULE_NETWORKS_SCAN_OPERATION_TIMEOUT; return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; /*GError *error;*/ if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->moduledata); //Close device //Stop subsystems if (moduledata != NULL) { if (moduledata->errormessage != NULL) { g_free(moduledata->errormessage); } if (moduledata->cancellable != NULL) { g_object_unref(moduledata->cancellable); moduledata->cancellable = NULL; } if (moduledata->objectmanager != NULL) { g_object_unref(moduledata->objectmanager); moduledata->objectmanager = NULL; } if (moduledata->connection != NULL) { g_object_unref(moduledata->connection); moduledata->connection = NULL; } g_free(moduledata); } return TRUE; } G_MODULE_EXPORT gchar *mmgui_module_last_error(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; moduledata = (moduledata_t)(mmguicorelc->moduledata); return moduledata->errormessage; } G_MODULE_EXPORT gboolean mmgui_module_interrupt_operation(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (device->operation == MMGUI_DEVICE_OPERATION_IDLE) return FALSE; if (moduledata->cancellable != NULL) { g_cancellable_cancel(moduledata->cancellable); return TRUE; } else { return FALSE; } } G_MODULE_EXPORT gboolean mmgui_module_set_timeout(gpointer mmguicore, guint operation, guint timeout) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (timeout < 1000) timeout *= 1000; if (operation < MMGUI_DEVICE_OPERATIONS) { moduledata->timeouts[operation] = timeout; return TRUE; } else { return FALSE; } } G_MODULE_EXPORT guint mmgui_module_devices_enum(gpointer mmguicore, GSList **devicelist) { mmguicore_t mmguicorelc; moduledata_t moduledata; guint devnum; GList *objects, *object; const gchar *devpath; if ((mmguicore == NULL) || (devicelist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; devnum = 0; objects = g_dbus_object_manager_get_objects(moduledata->objectmanager); for (object = objects; object != NULL; object = object->next) { devpath = g_dbus_object_get_object_path(G_DBUS_OBJECT(object->data)); g_debug("Device object path: %s\n", devpath); *devicelist = g_slist_prepend(*devicelist, mmgui_module_device_new(mmguicore, devpath)); devnum++; } g_list_foreach(objects, (GFunc)g_object_unref, NULL); g_list_free(objects); return devnum; } G_MODULE_EXPORT gboolean mmgui_module_devices_state(gpointer mmguicore, enum _mmgui_device_state_request request) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GVariant *data; gint statevalue; gboolean res; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->modemproxy == NULL) return FALSE; data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "State"); if (data != NULL) { statevalue = g_variant_get_int32(data); g_variant_unref(data); } else { return FALSE; } switch (request) { case MMGUI_DEVICE_STATE_REQUEST_ENABLED: /*Is device enabled*/ res = mmgui_module_device_enabled_from_state(statevalue); if (device->operation != MMGUI_DEVICE_OPERATION_ENABLE) { device->enabled = res; } break; case MMGUI_DEVICE_STATE_REQUEST_LOCKED: /*Is device blocked*/ res = mmgui_module_device_locked_from_state(statevalue); device->blocked = res; break; case MMGUI_DEVICE_STATE_REQUEST_REGISTERED: /*Is device registered in network*/ res = mmgui_module_device_registered_from_state(statevalue); device->registered = res; break; case MMGUI_DEVICE_STATE_REQUEST_CONNECTED: /*Is device connected (modem manager state)*/ res = mmgui_module_device_connected_from_state(statevalue); break; default: res = FALSE; break; } return res; } G_MODULE_EXPORT gboolean mmgui_module_devices_update_state(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; gint messageid; GList *pslnode; GList *pslnext; gchar *pslpath; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (device->enabled) { //Search for completed messages in partial sms list if ((moduledata->partialsms != NULL) && (mmguicorelc->eventcb != NULL)) { pslnode = moduledata->partialsms; while (pslnode != NULL) { pslpath = (gchar *)pslnode->data; pslnext = g_list_next(pslnode); //If messageid is -1 then it is incomplete messageid = mmgui_module_sms_get_id(mmguicore, pslpath); if (messageid != -1) { //Free resources g_free(pslpath); //Remove list node moduledata->partialsms = g_list_delete_link(moduledata->partialsms, pslnode); //Send notification (mmguicorelc->eventcb)(MMGUI_EVENT_SMS_COMPLETED, mmguicore, GUINT_TO_POINTER((guint)messageid)); } pslnode = pslnext; } } } return TRUE; } static gboolean mmgui_module_devices_update_device_mode(gpointer mmguicore, gint oldstate, gint newstate, guint changereason) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; gboolean enabledsignal, blockedsignal, regsignal; gsize strsize; GVariant *data; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; /*Upadate state flags*/ if (device->operation != MMGUI_DEVICE_OPERATION_ENABLE) { device->enabled = mmgui_module_device_enabled_from_state(newstate); } device->blocked = mmgui_module_device_locked_from_state(newstate); device->registered = mmgui_module_device_registered_from_state(newstate); /*Is enabled signal needed */ if ((device->operation != MMGUI_DEVICE_OPERATION_ENABLE) && (mmgui_module_device_enabled_from_state(oldstate) != device->enabled)) { enabledsignal = TRUE; } else { enabledsignal = FALSE; } /*Is blocked signal needed */ if (mmgui_module_device_locked_from_state(oldstate) != device->blocked) { blockedsignal = TRUE; } else { blockedsignal = FALSE; } /*Is registered signal needed */ if (mmgui_module_device_registered_from_state(oldstate) != device->registered) { regsignal = TRUE; } else { regsignal = FALSE; } /*Return if no signals will be sent*/ if ((!enabledsignal) && (!blockedsignal) && (!regsignal)) return TRUE; if (moduledata->netproxy != NULL) { if (device->type == MMGUI_DEVICE_TYPE_GSM) { //Operator information //Registration state data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "RegistrationState"); if (data != NULL) { device->regstatus = mmgui_module_registration_status_translate(g_variant_get_uint32(data)); g_variant_unref(data); } else { device->regstatus = MMGUI_REG_STATUS_UNKNOWN; } //Operator code data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "OperatorCode"); if (data != NULL) { strsize = 256; device->operatorcode = mmgui_module_gsm_operator_code(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->operatorcode = 0; } //Operator name if (device->operatorname != NULL) { g_free(device->operatorname); device->operatorname = NULL; } data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "OperatorName"); if (data != NULL) { strsize = 256; device->operatorname = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->operatorname = NULL; } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { //Operator information //Registration state data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "Cdma1xRegistrationState"); if (data != NULL) { device->regstatus = mmgui_module_cdma_registration_status_translate(g_variant_get_uint32(data)); g_variant_unref(data); } else { data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "EvdoRegistrationState"); if (data != NULL) { device->regstatus = mmgui_module_cdma_registration_status_translate(g_variant_get_uint32(data)); g_variant_unref(data); } else { device->regstatus = MMGUI_REG_STATUS_UNKNOWN; } } //Operator code data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "Sid"); if (data != NULL) { strsize = 256; device->operatorcode = g_variant_get_uint32(data); g_variant_unref(data); } else { device->operatorcode = 0; } //Operator name - no in CDMA if (device->operatorname != NULL) { g_free(device->operatorname); device->operatorname = NULL; } //Device identifier (ESN) if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "Esn"); if (data != NULL) { device->imei = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imei = NULL; } } } if (moduledata->modemproxy != NULL) { if (device->enabled) { //Device identifier (IMEI) if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "EquipmentIdentifier"); if (data != NULL) { device->imei = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imei = NULL; } } } if (moduledata->cardproxy != NULL) { if (device->type == MMGUI_DEVICE_TYPE_GSM) { if (device->enabled) { //IMSI if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } data = g_dbus_proxy_get_cached_property(moduledata->cardproxy, "Imsi"); if (data != NULL) { strsize = 256; device->imsi = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imsi = NULL; } } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { //No IMSI in CDMA if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } } } /*Enabled signal */ if (enabledsignal) { if (mmguicorelc->eventcb != NULL) { (mmguicorelc->eventcb)(MMGUI_EVENT_DEVICE_ENABLED_STATUS, mmguicorelc, GUINT_TO_POINTER(device->enabled)); } } /*Is blocked signal needed */ if (blockedsignal) { if (mmguicorelc->eventcb != NULL) { (mmguicorelc->eventcb)(MMGUI_EVENT_DEVICE_BLOCKED_STATUS, mmguicorelc, GUINT_TO_POINTER(device->blocked)); } } /*Is registered signal needed */ if (regsignal) { if (mmguicorelc->eventcb != NULL) { (mmguicorelc->eventcb)(MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE, mmguicorelc, device); } } return TRUE; } static gboolean mmgui_module_devices_update_location(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *data; GVariantIter *iter; guint32 locationtype; GVariant *locationdata; gchar *locationstring; gsize strlength; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if ((!(device->locationcaps & MMGUI_LOCATION_CAPS_3GPP)) && (!(device->locationcaps & MMGUI_LOCATION_CAPS_GPS))) return FALSE; error = NULL; data = g_dbus_proxy_call_sync(moduledata->locationproxy, "GetLocation", NULL, 0, -1, NULL, &error); if ((data != NULL) && (error == NULL)) { g_variant_get(data, "(a{uv})", &iter); while (g_variant_iter_next(iter, "{uv}", &locationtype, &locationdata)) { if ((locationtype == MODULE_INT_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) && (locationdata != NULL)) { //3GPP location strlength = 256; locationstring = g_strdup(g_variant_get_string(locationdata, &strlength)); device->loc3gppdata[0] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); device->loc3gppdata[1] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); device->loc3gppdata[2] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); device->loc3gppdata[3] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); g_free(locationstring); g_variant_unref(locationdata); g_debug("3GPP location: %u, %u, %4x, %4x", device->loc3gppdata[0], device->loc3gppdata[1], device->loc3gppdata[2], device->loc3gppdata[3]); } else if ((locationtype == MODULE_INT_MODEM_LOCATION_SOURCE_GPS_RAW) && (locationdata != NULL)) { //GPS location locationdata = g_variant_lookup_value(data, "latitude", G_VARIANT_TYPE_STRING); if (locationdata != NULL) { strlength = 256; locationstring = (gchar *)g_variant_get_string(locationdata, &strlength); device->locgpsdata[0] = atof(locationstring); g_variant_unref(locationdata); } else { device->locgpsdata[0] = 0.0; } locationdata = g_variant_lookup_value(data, "longitude", G_VARIANT_TYPE_STRING); if (locationdata != NULL) { strlength = 256; locationstring = (gchar *)g_variant_get_string(locationdata, &strlength); device->locgpsdata[1] = atof(locationstring); g_variant_unref(locationdata); } else { device->locgpsdata[1] = 0.0; } locationdata = g_variant_lookup_value(data, "altitude", G_VARIANT_TYPE_STRING); if (locationdata != NULL) { strlength = 256; locationstring = (gchar *)g_variant_get_string(locationdata, &strlength); device->locgpsdata[2] = atof(locationstring); g_variant_unref(locationdata); } else { device->locgpsdata[2] = 0.0; } locationdata = g_variant_lookup_value(data, "utc-time", G_VARIANT_TYPE_STRING); if (locationdata != NULL) { strlength = 256; locationstring = (gchar *)g_variant_get_string(locationdata, &strlength); device->locgpsdata[3] = atof(locationstring); g_variant_unref(locationdata); } else { device->locgpsdata[3] = 0.0; } g_debug("GPS location: %2.3f, %2.3f, %2.3f, %6.0f", device->locgpsdata[0], device->locgpsdata[1], device->locgpsdata[2], device->locgpsdata[3]); } g_variant_unref(locationdata); } g_variant_unref(data); return TRUE; } else { if (device->locationcaps & MMGUI_LOCATION_CAPS_3GPP) { memset(device->loc3gppdata, 0, sizeof(device->loc3gppdata)); } if (device->locationcaps & MMGUI_LOCATION_CAPS_GPS) { memset(device->locgpsdata, 0, sizeof(device->locgpsdata)); } mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } } static gboolean mmgui_module_devices_enable_location(gpointer mmguicore, mmguidevice_t device, gboolean enable) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *properties; guint locationtypes, enabledtypes; GError *error; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (!device->enabled) return FALSE; if (moduledata->locationproxy == NULL) return FALSE; if ((enable) && ((device->locationcaps & MMGUI_LOCATION_CAPS_3GPP) || (device->locationcaps & MMGUI_LOCATION_CAPS_GPS))) return TRUE; if ((!enable) && ((!(device->locationcaps & MMGUI_LOCATION_CAPS_3GPP)) && (!(device->locationcaps & MMGUI_LOCATION_CAPS_GPS)))) return TRUE; if (enable) { //Determine supported capabilities and turn on location engine properties = g_dbus_proxy_get_cached_property(moduledata->locationproxy, "Capabilities"); if (properties != NULL) { locationtypes = g_variant_get_uint32(properties); if ((locationtypes & MODULE_INT_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) || (locationtypes & MODULE_INT_MODEM_LOCATION_SOURCE_GPS_RAW)) { error = NULL; //Enable only needed capabilities enabledtypes = ((locationtypes & MODULE_INT_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) | (locationtypes & MODULE_INT_MODEM_LOCATION_SOURCE_GPS_RAW)); //Apply new settings g_dbus_proxy_call_sync(moduledata->locationproxy, "Setup", g_variant_new("(ub)", enabledtypes, TRUE), 0, -1, NULL, &error); //Set enabled properties if (error == NULL) { //3gpp location if (locationtypes & MODULE_INT_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) { device->locationcaps |= MMGUI_LOCATION_CAPS_3GPP; } //GPS location if (locationtypes & MODULE_INT_MODEM_LOCATION_SOURCE_GPS_RAW) { device->locationcaps |= MMGUI_LOCATION_CAPS_GPS; } return TRUE; } else { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } g_variant_unref(properties); } } else { error = NULL; g_dbus_proxy_call_sync(moduledata->locationproxy, "Setup", g_variant_new("(ub)", MODULE_INT_MODEM_LOCATION_SOURCE_NONE, FALSE), 0, -1, NULL, &error); if (error == NULL) { return TRUE; } else { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } return FALSE; } G_MODULE_EXPORT gboolean mmgui_module_devices_information(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GVariant *data; /*GError *error; gchar *blockstr;*/ gsize strsize = 256; gint statevalue; gboolean stateflag; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->modemproxy != NULL) { //Is device enabled and blocked data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "State"); if (data != NULL) { statevalue = g_variant_get_int32(data); device->enabled = mmgui_module_device_enabled_from_state(statevalue); device->blocked = mmgui_module_device_locked_from_state(statevalue); device->registered = mmgui_module_device_registered_from_state(statevalue); g_variant_unref(data); } else { device->enabled = FALSE; device->blocked = TRUE; } if (device->enabled) { //Device identifier (IMEI) if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "EquipmentIdentifier"); if (data != NULL) { device->imei = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imei = NULL; } //Signal level data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "SignalQuality"); if (data != NULL) { g_variant_get(data, "(ub)", &statevalue, &stateflag); device->siglevel = statevalue; g_variant_unref(data); } else { device->siglevel = 0; } //Used access technology data = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "AccessTechnologies"); if (data != NULL) { device->mode = mmgui_module_access_mode_translate(g_variant_get_uint32(data)); g_variant_unref(data); } else { device->mode = MMGUI_DEVICE_MODE_UNKNOWN; } } } if (moduledata->netproxy != NULL) { if (device->type == MMGUI_DEVICE_TYPE_GSM) { //Operator information //Registration state data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "RegistrationState"); if (data != NULL) { device->regstatus = mmgui_module_registration_status_translate(g_variant_get_uint32(data)); g_variant_unref(data); } else { device->regstatus = MMGUI_REG_STATUS_UNKNOWN; } //Operator code data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "OperatorCode"); if (data != NULL) { strsize = 256; device->operatorcode = mmgui_module_gsm_operator_code(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->operatorcode = 0; } //Operator name if (device->operatorname != NULL) { g_free(device->operatorname); device->operatorname = NULL; } data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "OperatorName"); if (data != NULL) { strsize = 256; device->operatorname = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->operatorname = NULL; } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { //Operator information //Registration state data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "Cdma1xRegistrationState"); if (data != NULL) { device->regstatus = mmgui_module_cdma_registration_status_translate(g_variant_get_uint32(data)); g_variant_unref(data); } else { data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "EvdoRegistrationState"); if (data != NULL) { device->regstatus = mmgui_module_cdma_registration_status_translate(g_variant_get_uint32(data)); g_variant_unref(data); } else { device->regstatus = MMGUI_REG_STATUS_UNKNOWN; } } //Operator code data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "Sid"); if (data != NULL) { strsize = 256; device->operatorcode = g_variant_get_uint32(data); g_variant_unref(data); } else { device->operatorcode = 0; } //Operator name - no in CDMA if (device->operatorname != NULL) { g_free(device->operatorname); device->operatorname = NULL; } //Device identifier (ESN) if (device->imei != NULL) { g_free(device->imei); device->imei = NULL; } data = g_dbus_proxy_get_cached_property(moduledata->netproxy, "Esn"); if (data != NULL) { device->imei = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imei = NULL; } } } if (moduledata->cardproxy != NULL) { if (device->type == MMGUI_DEVICE_TYPE_GSM) { if (device->enabled) { //IMSI if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } //IMSI data = g_dbus_proxy_get_cached_property(moduledata->cardproxy, "Imsi"); if (data != NULL) { strsize = 256; device->imsi = g_strdup(g_variant_get_string(data, &strsize)); g_variant_unref(data); } else { device->imsi = NULL; } } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { //No IMSI in CDMA if (device->imsi != NULL) { g_free(device->imsi); device->imsi = NULL; } } } //Update location mmgui_module_devices_update_location(mmguicore, device); //Network time. This code makes ModemManager crash, so it commented out /*gchar *timev; if (moduledata->timeproxy != NULL) { error = NULL; data = g_dbus_proxy_call_sync(moduledata->timeproxy, "GetNetworkTime", NULL, 0, -1, NULL, &error); if ((data == NULL) && (error != NULL)) { mmgui_module_print_error_message(error); g_error_free(error); } else { g_variant_get(data, "(s)", &timev); //device->imsi = g_strdup(device->imsi); g_variant_unref(data); } }*/ return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_devices_open(gpointer mmguicore, mmguidevice_t device) { mmguicore_t mmguicorelc; moduledata_t moduledata; const gchar *simpath; GVariant *simdata; GError *error; gsize strlength; if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (device == NULL) return FALSE; if (device->objectpath == NULL) return FALSE; error = NULL; if (device->type == MMGUI_DEVICE_TYPE_GSM) { moduledata->netproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.Modem3gpp", NULL, &error); if ((moduledata->netproxy == NULL) && (error != NULL)) { device->scancaps = MMGUI_SCAN_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->scancaps = MMGUI_SCAN_CAPS_OBSERVE; moduledata->netpropsignal = g_signal_connect(moduledata->netproxy, "g-properties-changed", G_CALLBACK(mmgui_property_change_handler), mmguicore); } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { moduledata->netproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.ModemCdma", NULL, &error); if ((moduledata->netproxy == NULL) && (error != NULL)) { device->scancaps = MMGUI_SCAN_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->scancaps = MMGUI_SCAN_CAPS_NONE; moduledata->netpropsignal = g_signal_connect(moduledata->netproxy, "g-properties-changed", G_CALLBACK(mmgui_property_change_handler), mmguicore); } } error = NULL; moduledata->modemproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem", NULL, &error); if ((moduledata->modemproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { moduledata->statesignal = g_signal_connect(moduledata->modemproxy, "g-signal", G_CALLBACK(mmgui_signal_handler), mmguicore); moduledata->modempropsignal = g_signal_connect(moduledata->modemproxy, "g-properties-changed", G_CALLBACK(mmgui_property_change_handler), mmguicore); //Get path for SIM object simdata = g_dbus_proxy_get_cached_property(moduledata->modemproxy, "Sim"); strlength = 256; simpath = g_variant_get_string(simdata, &strlength); //If SIM object exists if (simpath != NULL) { error = NULL; moduledata->cardproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", simpath, "org.freedesktop.ModemManager1.Sim", NULL, &error); if ((moduledata->cardproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } else { moduledata->cardproxy = NULL; } g_variant_unref(simdata); } error = NULL; moduledata->smsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.Messaging", NULL, &error); if ((moduledata->smsproxy == NULL) && (error != NULL)) { device->smscaps = MMGUI_SMS_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->smscaps = MMGUI_SMS_CAPS_RECEIVE | MMGUI_SMS_CAPS_SEND; moduledata->smssignal = g_signal_connect(moduledata->smsproxy, "g-signal", G_CALLBACK(mmgui_signal_handler), mmguicore); } error = NULL; if (device->type == MMGUI_DEVICE_TYPE_GSM) { moduledata->ussdproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd", NULL, &error); if ((moduledata->ussdproxy == NULL) && (error != NULL)) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->ussdcaps = MMGUI_USSD_CAPS_SEND; } } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { /*No USSD in CDMA*/ moduledata->ussdproxy = NULL; device->ussdcaps = MMGUI_USSD_CAPS_NONE; } error = NULL; moduledata->locationproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.Location", NULL, &error); if ((moduledata->locationproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { if (mmgui_module_devices_enable_location(mmguicore, device, TRUE)) { moduledata->locationpropsignal = g_signal_connect(moduledata->locationproxy, "g-properties-changed", G_CALLBACK(mmgui_property_change_handler), mmguicore); } } error = NULL; moduledata->timeproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.Time", NULL, &error); if ((moduledata->timeproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { moduledata->timesignal = g_signal_connect(moduledata->timeproxy, "g-signal", G_CALLBACK(mmgui_signal_handler), mmguicore); } error = NULL; moduledata->contactsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.Contacts", NULL, &error); if ((moduledata->contactsproxy == NULL) && (error != NULL)) { device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { //Test if we really have working conatacts API error = NULL; simdata = g_dbus_proxy_call_sync(moduledata->contactsproxy, "GetCount", NULL, 0, -1, NULL, &error); if ((error != NULL) && (simdata == NULL)) { device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } else { device->contactscaps = MMGUI_CONTACTS_CAPS_EXPORT | MMGUI_CONTACTS_CAPS_EDIT | MMGUI_CONTACTS_CAPS_EXTENDED; g_variant_unref(simdata); } } //Update device information using created proxy objects mmgui_module_devices_information(mmguicore); //Add fresh partial sms list moduledata->partialsms = NULL; //Initialize SMS database return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_devices_close(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GList *pslnode; GList *pslnext; gchar *pslpath; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; //Close SMS database //Free resources //Change device pointer //Free partial sms list if (moduledata->partialsms != NULL) { pslnode = moduledata->partialsms; while (pslnode != NULL) { pslpath = (gchar *)pslnode->data; pslnext = g_list_next(pslnode); if (pslpath) { g_free(pslpath); } pslnode = pslnext; } g_list_free(moduledata->partialsms); moduledata->partialsms = NULL; } if (moduledata->cardproxy != NULL) { g_object_unref(moduledata->cardproxy); moduledata->cardproxy = NULL; } if (moduledata->netproxy != NULL) { if (g_signal_handler_is_connected(moduledata->netproxy, moduledata->netpropsignal)) { g_signal_handler_disconnect(moduledata->netproxy, moduledata->netpropsignal); } g_object_unref(moduledata->netproxy); moduledata->netproxy = NULL; } if (moduledata->modemproxy != NULL) { if (g_signal_handler_is_connected(moduledata->modemproxy, moduledata->statesignal)) { g_signal_handler_disconnect(moduledata->modemproxy, moduledata->statesignal); } if (g_signal_handler_is_connected(moduledata->modemproxy, moduledata->modempropsignal)) { g_signal_handler_disconnect(moduledata->modemproxy, moduledata->modempropsignal); } g_object_unref(moduledata->modemproxy); moduledata->modemproxy = NULL; } if (moduledata->smsproxy != NULL) { if (g_signal_handler_is_connected(moduledata->smsproxy, moduledata->smssignal)) { g_signal_handler_disconnect(moduledata->smsproxy, moduledata->smssignal); } g_object_unref(moduledata->smsproxy); moduledata->smsproxy = NULL; } if (moduledata->ussdproxy != NULL) { g_object_unref(moduledata->ussdproxy); moduledata->ussdproxy = NULL; } if (moduledata->locationproxy != NULL) { if (g_signal_handler_is_connected(moduledata->locationproxy, moduledata->locationpropsignal)) { g_signal_handler_disconnect(moduledata->locationproxy, moduledata->locationpropsignal); } g_object_unref(moduledata->locationproxy); moduledata->locationproxy = NULL; } if (moduledata->timeproxy != NULL) { if (g_signal_handler_is_connected(moduledata->timeproxy, moduledata->timesignal)) { g_signal_handler_disconnect(moduledata->timeproxy, moduledata->timesignal); } g_object_unref(moduledata->timeproxy); moduledata->timeproxy = NULL; } if (moduledata->contactsproxy != NULL) { g_object_unref(moduledata->contactsproxy); moduledata->contactsproxy = NULL; } return TRUE; } static gboolean mmgui_module_devices_restart_ussd(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; mmguidevice_t device; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (mmguicorelc->device == NULL) return FALSE; device = mmguicorelc->device; if (moduledata->ussdproxy != NULL) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; g_object_unref(moduledata->ussdproxy); } error = NULL; moduledata->ussdproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", device->objectpath, "org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd", NULL, &error); if ((moduledata->ussdproxy == NULL) && (error != NULL)) { device->ussdcaps = MMGUI_USSD_CAPS_NONE; mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } else { device->ussdcaps = MMGUI_USSD_CAPS_SEND; return TRUE; } } static void mmgui_module_devices_enable_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *data; gboolean newstate; guint32 statevalue; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; data = g_dbus_proxy_call_finish(proxy, res, &error); if ((data == NULL) && (error != NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); newstate = FALSE; } else { g_variant_unref(data); newstate = mmguicorelc->device->enabled; //Update device state data = g_dbus_proxy_get_cached_property(proxy, "State"); statevalue = g_variant_get_int32(data); mmguicorelc->device->enabled = mmgui_module_device_enabled_from_state(statevalue); g_variant_unref(data); //If device state changed - return TRUE if (newstate != mmguicorelc->device->enabled) { //Enable location API mmgui_module_devices_enable_location(mmguicorelc, mmguicorelc->device, TRUE); newstate = TRUE; } else { newstate = FALSE; } } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_MODEM_ENABLE_RESULT, user_data, GUINT_TO_POINTER(newstate)); } } G_MODULE_EXPORT gboolean mmgui_module_devices_enable(gpointer mmguicore, gboolean enabled) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->modemproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; //Device already in requested state if (mmguicorelc->device->enabled == enabled) return TRUE; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_ENABLE; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->modemproxy, "Enable", g_variant_new("(b)", enabled), G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_ENABLE], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_devices_enable_handler, mmguicore); return TRUE; } static time_t mmgui_module_str_to_time(const gchar *str) { guint i, len; gchar strbuf[3]; struct tm btime; time_t timestamp; gint *fields[] = {&btime.tm_year, &btime.tm_mon, &btime.tm_mday, &btime.tm_hour, &btime.tm_min, &btime.tm_sec}; timestamp = time(NULL); if (str == NULL) return timestamp; len = strlen(str); if (len > 12) { if (str[12] == '+') { //v.0.4.998 timestamp format for (i=0; i<6; i++) { strncpy(strbuf, str+(i*2), 2); strbuf[2] = '\0'; *fields[i] = atoi(strbuf); } } else if (str[8] == ',') { //v.0.5.2 timestamp format for (i=0; i<6; i++) { strncpy(strbuf, str+(i*3), 2); strbuf[2] = '\0'; *fields[i] = atoi(strbuf); } } btime.tm_year += 100; btime.tm_mon -= 1; timestamp = mktime(&btime); } return timestamp; } static mmgui_sms_message_t mmgui_module_sms_retrieve(mmguicore_t mmguicore, const gchar *smspath/*, gboolean listpartial*/) { moduledata_t moduledata; mmgui_sms_message_t message; GDBusProxy *smsproxy; GError *error; GVariant *value; gsize strlength; const gchar *valuestr; guint index, state; gboolean gottext; if ((mmguicore == NULL) || (smspath == NULL)) return NULL; if (mmguicore->moduledata == NULL) return NULL; moduledata = (moduledata_t)mmguicore->moduledata; error = NULL; smsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", smspath, "org.freedesktop.ModemManager1.Sms", NULL, &error); if ((smsproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); //g_object_unref(smsproxy); return NULL; } //SMS message state value = g_dbus_proxy_get_cached_property(smsproxy, "State"); if (value != NULL) { state = g_variant_get_uint32(value); //g_printf("STATE: %u\n", state); if (state != MODULE_INT_SMS_STATE_RECEIVED) { /*//Message is not fully received - skip it and add to list if needed if ((state == MODULE_INT_SMS_STATE_RECEIVING) && (listpartial)) { moduledata->partialsms = g_list_prepend(moduledata->partialsms, g_strdup(smspath)); }*/ g_variant_unref(value); g_object_unref(smsproxy); return NULL; } g_variant_unref(value); } else { //Something strange with this message - skip it g_object_unref(smsproxy); return NULL; } //SMS message type value = g_dbus_proxy_get_cached_property(smsproxy, "PduType"); if (value != NULL) { state = g_variant_get_uint32(value); //g_printf("PDU: %u\n", state); if ((state == MODULE_INT_PDU_TYPE_UNKNOWN) || (state == MODULE_INT_PDU_TYPE_SUBMIT)) { //Only delivered messages and status reports needed this moment - maybe remove other? //TODO: remove message g_variant_unref(value); g_object_unref(smsproxy); return NULL; } g_variant_unref(value); } else { //Something strange with this message - skip it g_object_unref(smsproxy); return NULL; } message = mmgui_smsdb_message_create(); //Sender number value = g_dbus_proxy_get_cached_property(smsproxy, "Number"); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); mmgui_smsdb_message_set_number(message, valuestr); //g_printf("SMS number: %s\n", valuestr); g_variant_unref(value); } else { mmgui_smsdb_message_set_number(message, _("Unknown")); } //Service center number value = g_dbus_proxy_get_cached_property(smsproxy, "SMSC"); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); mmgui_smsdb_message_set_service_number(message, valuestr); //g_printf("SMS service number: %s\n", valuestr); g_variant_unref(value); } else { mmgui_smsdb_message_set_service_number(message, _("Unknown")); } //Decoded message text gottext = FALSE; value = g_dbus_proxy_get_cached_property(smsproxy, "Text"); if (value != NULL) { strlength = 256*160; valuestr = g_variant_get_string(value, &strlength); //g_printf("SMS text: %s\n", valuestr); mmgui_smsdb_message_set_text(message, valuestr, FALSE); gottext = TRUE; g_variant_unref(value); } else { value = g_dbus_proxy_get_cached_property(smsproxy, "Data"); if (value != NULL) { strlength = g_variant_get_size(value); if (strlength > 0) { valuestr = g_variant_get_data(value); mmgui_smsdb_message_set_binary(message, TRUE); mmgui_smsdb_message_set_data(message, valuestr, strlength, FALSE); gottext = TRUE; } g_variant_unref(value); } } //Message timestamp value = g_dbus_proxy_get_cached_property(smsproxy, "Timestamp"); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); mmgui_smsdb_message_set_timestamp(message, mmgui_module_str_to_time(valuestr)); //g_printf("SMS timestamp: %lu\n", (gulong)message->timestamp); g_variant_unref(value); } //Message index index = mmgui_module_get_object_path_index(smspath); //Return message if (!gottext) { //Message has no text - skip it mmgui_smsdb_message_free(message); return NULL; } else { //Return message mmgui_smsdb_message_set_identifier(message, index, FALSE); //g_printf("SMS index: %u\n", index); return message; } } static gint mmgui_module_sms_get_id(mmguicore_t mmguicore, const gchar *smspath) { moduledata_t moduledata; GDBusProxy *smsproxy; GError *error; GVariant *value; gint state; if ((mmguicore == NULL) || (smspath == NULL)) return -1; if (mmguicore->moduledata == NULL) return -1; moduledata = (moduledata_t)mmguicore->moduledata; error = NULL; smsproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", smspath, "org.freedesktop.ModemManager1.Sms", NULL, &error); if ((smsproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicore, error); g_error_free(error); return -1; } //SMS message state value = g_dbus_proxy_get_cached_property(smsproxy, "State"); if (value != NULL) { state = g_variant_get_uint32(value); if (state == MODULE_INT_SMS_STATE_RECEIVED) { g_variant_unref(value); g_object_unref(smsproxy); return mmgui_module_get_object_path_index(smspath); } else { g_variant_unref(value); g_object_unref(smsproxy); return -1; } g_variant_unref(value); } else { //Something strange with this message g_object_unref(smsproxy); return -1; } } G_MODULE_EXPORT guint mmgui_module_sms_enum(gpointer mmguicore, GSList **smslist) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *messages; guint msgnum; GVariantIter miterl1, miterl2; GVariant *mnodel1, *mnodel2; gsize strlength; const gchar *smspath; mmgui_sms_message_t message; if ((mmguicore == NULL) || (smslist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return 0; if (mmguicorelc->device == NULL) return 0; if (!mmguicorelc->device->enabled) return 0; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return 0; error = NULL; messages = g_dbus_proxy_call_sync(moduledata->smsproxy, "List", NULL, 0, -1, NULL, &error); if ((messages == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return 0; } msgnum = 0; g_variant_iter_init(&miterl1, messages); while ((mnodel1 = g_variant_iter_next_value(&miterl1)) != NULL) { g_variant_iter_init(&miterl2, mnodel1); while ((mnodel2 = g_variant_iter_next_value(&miterl2)) != NULL) { strlength = 256; smspath = g_variant_get_string(mnodel2, &strlength); g_debug("SMS message object path: %s\n", smspath); if (smspath != NULL) { message = mmgui_module_sms_retrieve(mmguicorelc, smspath); if (message != NULL) { *smslist = g_slist_prepend(*smslist, message); msgnum++; } } g_variant_unref(mnodel2); } g_variant_unref(mnodel1); } g_variant_unref(messages); return msgnum; } G_MODULE_EXPORT mmgui_sms_message_t mmgui_module_sms_get(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; /*moduledata_t moduledata;*/ gchar *smspath; mmgui_sms_message_t message; if (mmguicore == NULL) return NULL; mmguicorelc = (mmguicore_t)mmguicore; /*if (mmguicorelc->moduledata == NULL) return NULL; moduledata = (moduledata_t)mmguicorelc->moduledata;*/ if (mmguicorelc->device == NULL) return NULL; if (!mmguicorelc->device->enabled) return NULL; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return NULL; smspath = g_strdup_printf("/org/freedesktop/ModemManager1/SMS/%u", index); message = mmgui_module_sms_retrieve(mmguicorelc, smspath); g_free(smspath); return message; } G_MODULE_EXPORT gboolean mmgui_module_sms_delete(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; gchar *smspath; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_RECEIVE)) return FALSE; smspath = g_strdup_printf("/org/freedesktop/ModemManager1/SMS/%u", index); error = NULL; g_dbus_proxy_call_sync(moduledata->smsproxy, "Delete", g_variant_new("(o)", smspath), 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_free(smspath); return FALSE; } g_free(smspath); return TRUE; } static void mmgui_module_sms_send_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; gboolean sent; const gchar *smspath; if (user_data == NULL) return; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; g_dbus_proxy_call_finish(proxy, res, &error); //Operation result if (error != NULL) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); sent = FALSE; } else { sent = TRUE; } smspath = g_dbus_proxy_get_object_path(proxy); if (smspath != NULL) { error = NULL; //Remove message from storage g_dbus_proxy_call_sync(moduledata->smsproxy, "Delete", g_variant_new("(o)", smspath), 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); } } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_SMS_SENT, user_data, GUINT_TO_POINTER(sent)); } } G_MODULE_EXPORT gboolean mmgui_module_sms_send(gpointer mmguicore, gchar* number, gchar *text, gint validity, gboolean report) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariantBuilder *builder; GVariant *array, *message, *smspathv; GError *error; /*gsize strlength;*/ gchar *smspath; GDBusProxy *messageproxy; if ((number == NULL) || (text == NULL)) return FALSE; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->smsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->smscaps & MMGUI_SMS_CAPS_SEND)) return FALSE; builder = g_variant_builder_new(G_VARIANT_TYPE_ARRAY); g_variant_builder_add_parsed(builder, "{'number', <%s>}", number); g_variant_builder_add_parsed(builder, "{'text', <%s>}", text); if ((validity > -1) && (validity <= 255)) { g_variant_builder_add_parsed(builder, "{'validity', %v}", g_variant_new("(uv)", MODULE_INT_SMS_VALIDITY_TYPE_RELATIVE, g_variant_new_uint32((guint)validity))); } g_variant_builder_add_parsed(builder, "{'delivery-report-request', <%b>}", report); array = g_variant_builder_end(builder); builder = g_variant_builder_new(G_VARIANT_TYPE_TUPLE); g_variant_builder_add_value(builder, array); message = g_variant_builder_end(builder); error = NULL; //Create new message smspathv = g_dbus_proxy_call_sync(moduledata->smsproxy, "Create", message, 0, -1, NULL, &error); if ((smspathv == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } //Created SMS object path g_variant_get(smspathv, "(o)", &smspath); if (smspath == NULL) { g_debug("Failed to obtain object path for saved SMS message\n"); return FALSE; } error = NULL; //Create message proxy messageproxy = g_dbus_proxy_new_sync(moduledata->connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.ModemManager1", smspath, "org.freedesktop.ModemManager1.Sms", NULL, &error); if ((messageproxy == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); g_free(smspath); return FALSE; } g_free(smspath); mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SEND_SMS; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } //Send message g_dbus_proxy_call(messageproxy, "Send", NULL, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SEND_SMS], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_sms_send_handler, mmguicore); return TRUE; } G_MODULE_EXPORT gboolean mmgui_module_ussd_cancel_session(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return FALSE; error = NULL; g_dbus_proxy_call_sync(moduledata->ussdproxy, "Cancel", NULL, 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } return TRUE; } G_MODULE_EXPORT enum _mmgui_ussd_state mmgui_module_ussd_get_state(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariant *session; guint state; enum _mmgui_ussd_state stateid; stateid = MMGUI_USSD_STATE_UNKNOWN; if (mmguicore == NULL) return stateid; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return stateid; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return stateid; if (mmguicorelc->device == NULL) return stateid; if (!mmguicorelc->device->enabled) return stateid; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return stateid; session = g_dbus_proxy_get_cached_property(moduledata->ussdproxy, "State"); if (session == NULL) return stateid; state = g_variant_get_uint32(session); switch (state) { case MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN: stateid = MMGUI_USSD_STATE_UNKNOWN; break; case MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_IDLE: stateid = MMGUI_USSD_STATE_IDLE; break; case MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_ACTIVE: stateid = MMGUI_USSD_STATE_ACTIVE; break; case MODULE_INT_MODEM_3GPP_USSD_SESSION_STATE_USER_RESPONSE: stateid = MMGUI_USSD_STATE_USER_RESPONSE; break; default: stateid = MMGUI_USSD_STATE_UNKNOWN; break; } g_variant_unref(session); return stateid; } static void mmgui_module_ussd_send_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; gchar *answer; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; answer = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { /*For some reason after timeout ussd does not work - restart it*/ mmgui_module_devices_restart_ussd(mmguicorelc); if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); } else { g_variant_get(result, "(s)", &answer); if (moduledata->reencodeussd) { /*Fix answer broken encoding*/ answer = encoding_ussd_gsm7_to_ucs2(answer); } else { /*Do not touch answer*/ answer = g_strdup(answer); } g_variant_unref(result); } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_USSD_RESULT, user_data, answer); } } G_MODULE_EXPORT gboolean mmgui_module_ussd_send(gpointer mmguicore, gchar *request, enum _mmgui_ussd_validation validationid, gboolean reencode) { mmguicore_t mmguicorelc; moduledata_t moduledata; enum _mmgui_ussd_state sessionstate; GVariant *ussdreq; gchar *command; if ((mmguicore == NULL) || (request == NULL)) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->ussdproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->ussdcaps & MMGUI_USSD_CAPS_SEND)) return FALSE; sessionstate = mmgui_module_ussd_get_state(mmguicore); if ((sessionstate == MMGUI_USSD_STATE_UNKNOWN) || (sessionstate == MMGUI_USSD_STATE_ACTIVE)) { mmgui_module_ussd_cancel_session(mmguicore); } ussdreq = g_variant_new("(s)", request); command = NULL; if (sessionstate == MMGUI_USSD_STATE_IDLE) { command = "Initiate"; } else if (sessionstate == MMGUI_USSD_STATE_USER_RESPONSE) { if (validationid == MMGUI_USSD_VALIDATION_REQUEST) { mmgui_module_ussd_cancel_session(mmguicore); command = "Initiate"; } else { command = "Respond"; } } moduledata->reencodeussd = reencode; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SEND_USSD; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->ussdproxy, command, ussdreq, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SEND_USSD], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_ussd_send_handler, mmguicore); return TRUE; } static mmgui_scanned_network_t mmgui_module_network_retrieve(GVariant *networkv) { mmgui_scanned_network_t network; GVariant *value; gsize strlength; const gchar *valuestr; /*guint i;*/ if (networkv == NULL) return NULL; network = g_new0(struct _mmgui_scanned_network, 1); //Mobile operator code (MCCMNC) value = g_variant_lookup_value(networkv, "operator-code", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->operator_num = atoi(valuestr); g_variant_unref(value); } else { network->operator_num = 0; } //Network access technology value = g_variant_lookup_value(networkv, "access-technology", G_VARIANT_TYPE_UINT32); if (value != NULL) { network->access_tech = mmgui_module_access_technology_translate(g_variant_get_uint32(value)); g_variant_unref(value); } else { network->access_tech = MMGUI_ACCESS_TECH_GSM; } //Long-format name of operator value = g_variant_lookup_value(networkv, "operator-long", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->operator_long = g_strdup(valuestr); g_variant_unref(value); } else { network->operator_long = g_strdup(_("Unknown")); } //Short-format name of operator value = g_variant_lookup_value(networkv, "operator-short", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); network->operator_short = g_strdup(valuestr); g_variant_unref(value); } else { network->operator_short = g_strdup(_("Unknown")); } //Network availability status (this is a critical parameter, so entry will be skipped if value is unknown) value = g_variant_lookup_value(networkv, "status", G_VARIANT_TYPE_UINT32); if (value != NULL) { network->status = mmgui_module_network_availability_status_translate(g_variant_get_uint32(value)); g_variant_unref(value); return network; } else { if (network->operator_long != NULL) g_free(network->operator_long); if (network->operator_short != NULL) g_free(network->operator_short); g_free(network); return NULL; } } static void mmgui_module_networks_scan_handler(GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *result; GSList *networks; GVariantIter niterl1, niterl2/*, niterl3*/; GVariant *nnodel1, *nnodel2/*, *nnodel3*/; mmgui_scanned_network_t network; mmguicorelc = (mmguicore_t)user_data; if (mmguicorelc == NULL) return; if (mmguicorelc->moduledata == NULL) return; moduledata = (moduledata_t)mmguicorelc->moduledata; error = NULL; networks = NULL; result = g_dbus_proxy_call_finish(proxy, res, &error); if ((result == NULL) && (error != NULL)) { if ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable)))) { mmgui_module_handle_error_message(mmguicorelc, error); } g_error_free(error); } else { g_variant_iter_init(&niterl1, result); while ((nnodel1 = g_variant_iter_next_value(&niterl1)) != NULL) { g_variant_iter_init(&niterl2, nnodel1); while ((nnodel2 = g_variant_iter_next_value(&niterl2)) != NULL) { network = mmgui_module_network_retrieve(nnodel2); if (network != NULL) { networks = g_slist_prepend(networks, network); } g_variant_unref(nnodel2); } g_variant_unref(nnodel1); } g_variant_unref(result); } if (mmguicorelc->device != NULL) { mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_IDLE; } if ((mmguicorelc->eventcb != NULL) && ((moduledata->cancellable == NULL) || ((moduledata->cancellable != NULL) && (!g_cancellable_is_cancelled(moduledata->cancellable))))) { (mmguicorelc->eventcb)(MMGUI_EVENT_SCAN_RESULT, user_data, networks); } } G_MODULE_EXPORT gboolean mmgui_module_networks_scan(gpointer mmguicore) { mmguicore_t mmguicorelc; moduledata_t moduledata; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->netproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->scancaps & MMGUI_SCAN_CAPS_OBSERVE)) return FALSE; mmguicorelc->device->operation = MMGUI_DEVICE_OPERATION_SCAN; if (moduledata->cancellable != NULL) { g_cancellable_reset(moduledata->cancellable); } g_dbus_proxy_call(moduledata->netproxy, "Scan", NULL, G_DBUS_CALL_FLAGS_NONE, moduledata->timeouts[MMGUI_DEVICE_OPERATION_SCAN], moduledata->cancellable, (GAsyncReadyCallback)mmgui_module_networks_scan_handler, mmguicore); return TRUE; } static mmgui_contact_t mmgui_module_contact_retrieve(GVariant *contactv) { mmgui_contact_t contact; GVariant *value; gsize strlength; const gchar *valuestr; if (contactv == NULL) return NULL; contact = g_new0(struct _mmgui_contact, 1); //Full name of the contact value = g_variant_lookup_value(contactv, "name", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); contact->name = g_strdup(valuestr); g_variant_unref(value); } else { contact->name = g_strdup(_("Unknown")); } //Telephone number value = g_variant_lookup_value(contactv, "number", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); contact->number = g_strdup(valuestr); g_variant_unref(value); } else { contact->number = g_strdup(_("Unknown")); } //Email address value = g_variant_lookup_value(contactv, "email", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); contact->email = g_strdup(valuestr); g_variant_unref(value); } else { contact->email = g_strdup(_("Unknown")); } //Group this contact belongs to value = g_variant_lookup_value(contactv, "group", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); contact->group = g_strdup(valuestr); g_variant_unref(value); } else { contact->group = g_strdup(_("Unknown")); } //Additional contact name value = g_variant_lookup_value(contactv, "name2", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); contact->name2 = g_strdup(valuestr); g_variant_unref(value); } else { contact->name2 = g_strdup(_("Unknown")); } //Additional contact telephone number value = g_variant_lookup_value(contactv, "number2", G_VARIANT_TYPE_STRING); if (value != NULL) { strlength = 256; valuestr = g_variant_get_string(value, &strlength); contact->number2 = g_strdup(valuestr); g_variant_unref(value); } else { contact->number2 = g_strdup(_("Unknown")); } //Boolean flag to specify whether this entry is hidden or not value = g_variant_lookup_value(contactv, "hidden", G_VARIANT_TYPE_BOOLEAN); if (value != NULL) { contact->hidden = g_variant_get_boolean(value); g_variant_unref(value); } else { contact->hidden = FALSE; } //Phonebook in which the contact is stored value = g_variant_lookup_value(contactv, "storage", G_VARIANT_TYPE_UINT32); if (value != NULL) { contact->storage = g_variant_get_uint32(value); g_variant_unref(value); } else { contact->storage = FALSE; } //Internal private number (this is a critical parameter, so entry will be skipped if value is unknown) value = g_variant_lookup_value(contactv, "index", G_VARIANT_TYPE_UINT32); if (value != NULL) { contact->id = g_variant_get_uint32(value); g_variant_unref(value); return contact; } else { if (contact->name != NULL) g_free(contact->name); if (contact->number != NULL) g_free(contact->number); if (contact->email != NULL) g_free(contact->email); if (contact->group != NULL) g_free(contact->group); if (contact->name2 != NULL) g_free(contact->name2); if (contact->number2 != NULL) g_free(contact->number2); g_free(contact); return NULL; } } G_MODULE_EXPORT guint mmgui_module_contacts_enum(gpointer mmguicore, GSList **contactslist) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; GVariant *contacts; guint contactsnum; GVariantIter citerl1, citerl2; GVariant *cnodel1, *cnodel2; mmgui_contact_t contact; if ((mmguicore == NULL) || (contactslist == NULL)) return 0; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return 0; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->contactsproxy == NULL) return 0; if (mmguicorelc->device == NULL) return 0; if (!mmguicorelc->device->enabled) return 0; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EXPORT)) return 0; error = NULL; contacts = g_dbus_proxy_call_sync(moduledata->contactsproxy, "List", NULL, 0, -1, NULL, &error); if ((contacts == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return 0; } contactsnum = 0; g_variant_iter_init(&citerl1, contacts); while ((cnodel1 = g_variant_iter_next_value(&citerl1)) != NULL) { g_variant_iter_init(&citerl2, cnodel1); while ((cnodel2 = g_variant_iter_next_value(&citerl2)) != NULL) { contact = mmgui_module_contact_retrieve(cnodel2); if (contact != NULL) { *contactslist = g_slist_prepend(*contactslist, contact); contactsnum++; } g_variant_unref(cnodel2); } g_variant_unref(cnodel1); } g_variant_unref(contacts); return contactsnum; } G_MODULE_EXPORT gboolean mmgui_module_contacts_delete(gpointer mmguicore, guint index) { mmguicore_t mmguicorelc; moduledata_t moduledata; GError *error; if (mmguicore == NULL) return FALSE; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return FALSE; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->contactsproxy == NULL) return FALSE; if (mmguicorelc->device == NULL) return FALSE; if (!mmguicorelc->device->enabled) return FALSE; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return FALSE; error = NULL; g_dbus_proxy_call_sync(moduledata->contactsproxy, "Delete", g_variant_new("(i)", index), 0, -1, NULL, &error); if (error != NULL) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return FALSE; } return TRUE; } G_MODULE_EXPORT gint mmgui_module_contacts_add(gpointer mmguicore, gchar* name, gchar *number) { mmguicore_t mmguicorelc; moduledata_t moduledata; GVariantBuilder *builder; GVariant *array, *contact; GError *error; GVariant *idv; guint id; if ((mmguicore == NULL) || (name == NULL) || (number == NULL)) return -1; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc->moduledata == NULL) return -1; moduledata = (moduledata_t)mmguicorelc->moduledata; if (moduledata->contactsproxy == NULL) return -1; if (mmguicorelc->device == NULL) return -1; if (!mmguicorelc->device->enabled) return -1; if (!(mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return -1; builder = g_variant_builder_new(G_VARIANT_TYPE_ARRAY); g_variant_builder_add_parsed(builder, "{'name', <%s>}", name); g_variant_builder_add_parsed(builder, "{'number', <%s>}", number); g_variant_builder_add_parsed(builder, "{'hidden', <%b>}", FALSE); array = g_variant_builder_end(builder); builder = g_variant_builder_new(G_VARIANT_TYPE_TUPLE); g_variant_builder_add_value(builder, array); contact = g_variant_builder_end(builder); error = NULL; idv = g_dbus_proxy_call_sync(moduledata->contactsproxy, "Add", contact, 0, -1, NULL, &error); if ((idv == NULL) && (error != NULL)) { mmgui_module_handle_error_message(mmguicorelc, error); g_error_free(error); return -1; } g_variant_get(idv, "(u)", &id); g_variant_unref(idv); return id; } modem-manager-gui-0.0.17.1/packages/gentoo/modem-manager-gui-0.0.15.ebuild0000644000175000017500000000075712070312372024154 0ustar alexalex# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=4 DESCRIPTION="GUI for Modem Manager daemon, capable to read and send SMS, send USSD requests, display modem informaion." HOMEPAGE="http://linuxonly.ru/" SRC_URI="http://download.tuxfamily.org/gsf/source/modem-manager-gui-0.0.15.1.tar.gz" LICENSE="GPL" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND=">=x11-libs/gtk+-3.4.0 x11-libs/libnotify" RDEPEND="${DEPEND}" modem-manager-gui-0.0.17.1/packages/mageia/modem-manager-gui.spec0000644000175000017500000000501612375726076023066 0ustar alexalexSummary: Modem Manager GUI Name: modem-manager-gui Version: 0.0.17 Release: %mkrel 1 License: GPLv3 Group: Communications/Mobile URL: http://linuxonly.ru Source: %{name}-%{version}.tar.gz Vendor: Alex #BuildArch: x86_64 BuildRequires: pkgconfig BuildRequires: libgtk+3.0-devel >= 3.4.0 BuildRequires: glib2-devel >= 2.32.1 BuildRequires: libgdbm-devel >= 1.10 BuildRequires: po4a >= 0.45 BuildRequires: itstool >= 1.2.0 #BuildRequires: libnotify-devel >= 0.7.5 #BuildRequires: desktop-file-utils Requires: gtk+3.0 >= 3.4.0 Requires: glib2 >= 2.32.1 #Requires: libgdbm4 >= 1.10 Requires: modemmanager >= 0.5.0.0 #Requires: libnotify >= 0.7.5 #Suggests: networkmanager Suggests: libnotify >= 0.7.5 Suggests: libcanberra0 >= 0.28 Suggests: evolution-data-server >= 3.4.1 Suggests: mobile-broadband-provider-info >= 20120614 %description This program is simple graphical interface for Modem Manager daemon dbus interface. Current features: - View device information: Operator name, Mode, IMEI, IMSI, Signal level. - Send and receive SMS messages with long massages concatenation and store messages in database. - Send USSD requests and read answers in GSM7 and UCS2 formats converted to system UTF8 charset. - Scan available mobile networks. %prep %setup -q #cp -f %{SOURCE1} ./src/ %build %configure make %{?_smp_mflags} %install rm -rf %{buildroot} make install INSTALLPREFIX=%{buildroot} #desktop-file-install --vendor mageia --dir %{buildroot}%{_datadir}/applications --add-category X-Mageia --delete-original %{buildroot}%{_datadir}/applications/extras-%{name}.desktop %find_lang %{name} %clean rm -rf %{buildroot} %files -f %{name}.lang %defattr(-,root,root,-) %doc LICENSE %doc AUTHORS %doc Changelog %{_bindir}/%{name} %{_libdir}/%{name}/modules/* %{_datadir}/pixmaps/%{name}.png %{_datadir}/%{name}/pixmaps/* %{_datadir}/%{name}/sounds/* %{_datadir}/%{name}/ui/%{name}.ui %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/%{name}.appdata.xml %{_mandir}/man1/%{name}.1* %{_mandir}/*/man1/* %doc %{_datadir}/help/*/%{name}/* %changelog * Tue Jun 18 2013 Alex - Version 0.0.16 changes * Fri Apr 12 2013 AlexL - fixed Group for Mageia - added modemmanager to Requires - added networkmanager to Suggests - added patch modem-manager-gui.ui * Mon Apr 07 2013 Zomby - repack for Mageia Russian Community * Tue Dec 16 2012 Alex - added additional pictures for 0.0.15 release * Wed Aug 08 2012 Alex - released spec modem-manager-gui-0.0.17.1/packages/fedora/modem-manager-gui.spec0000644000175000017500000000477312166111552023075 0ustar alexalexSummary: Modem Manager GUI Name: modem-manager-gui Version: 0.0.16 Release: 1%{dist} License: GPLv3 Group: Applications/Communications URL: http://linuxonly.ru Source: %{name}-%{version}.tar.gz Vendor: Alex #BuildArch: x86_64 Requires: gtk3 >= 3.4.0, glib2 >= 2.32.1, gdbm >= 1.10, libnotify >= 0.7.5 BuildRequires: pkgconfig, gtk3-devel >= 3.4.0, glib2-devel >= 2.32.1, gdbm-devel >= 1.10, desktop-file-utils %description This program is simple graphical interface for Modem Manager daemon dbus interface. Current features: - View device information: Operator name, Mode, IMEI, IMSI, Signal level. - Send and receive SMS messages with long massages concatenation and store messages in database. - Send USSD requests and read answers in GSM7 and UCS2 formats converted to system UTF8 charset. - Scan available mobile networks. %prep %setup -q %build %configure make %{?_smp_mflags} %install rm -rf %{buildroot} make install INSTALLPREFIX=%{buildroot} desktop-file-install --dir %{buildroot}%{_datadir}/applications --delete-original %{buildroot}%{_datadir}/applications/%{name}.desktop %find_lang %{name} %clean rm -rf %{buildroot} %files -f %{name}.lang %defattr(-,root,root,-) %doc LICENSE %doc AUTHORS %doc Changelog %{_bindir}/%{name} %{_libdir}/%{name}/modules/modmm_mm06.so %{_libdir}/%{name}/modules/modmm_mm07.so %{_libdir}/%{name}/modules/modcm_nm09.so %{_libdir}/%{name}/modules/modcm_pppd245.so %{_datadir}/pixmaps/%{name}.png %{_datadir}/%{name}/pixmaps/%{name}.png %{_datadir}/%{name}/pixmaps/cont-tb.png %{_datadir}/%{name}/pixmaps/dev-tb.png %{_datadir}/%{name}/pixmaps/info-tb.png %{_datadir}/%{name}/pixmaps/scan-tb.png %{_datadir}/%{name}/pixmaps/sms-tb.png %{_datadir}/%{name}/pixmaps/ussd-tb.png %{_datadir}/%{name}/pixmaps/traffic-tb.png %{_datadir}/%{name}/pixmaps/sms-read.png %{_datadir}/%{name}/pixmaps/sms-unread.png %{_datadir}/%{name}/pixmaps/message-received.png %{_datadir}/%{name}/pixmaps/message-sent.png %{_datadir}/%{name}/pixmaps/message-drafts.png %{_datadir}/%{name}/pixmaps/info-equipment.png %{_datadir}/%{name}/pixmaps/info-network.png %{_datadir}/%{name}/pixmaps/info-location.png %{_datadir}/%{name}/sounds/message.ogg %{_datadir}/%{name}/ui/%{name}.ui %{_datadir}/applications/%{name}.desktop %{_mandir}/man1/modem-manager-gui.1.gz %changelog * Sat Jul 6 2013 Alex - 0.0.16-1.fc19 - Version 0.0.16 fixes * Tue Dec 16 2012 Alex - added additional pictures for 0.0.15 release * Wed Aug 08 2012 Alex - released spec modem-manager-gui-0.0.17.1/help/id.po0000664000175000017500000003612312401043643015565 0ustar alexalex# # Translators: # Arif Budiman , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-08-27 17:16+0400\n" "PO-Revision-Date: 2014-08-31 02:08+0000\n" "Last-Translator: Arif Budiman \n" "Language-Team: Indonesian (http://www.transifex.com/projects/p/modem-manager-gui/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: id\n" "Plural-Forms: nplurals=1; plural=0;\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "Arif Budiman , 2014" #: C/about.page9(info/desc) msgid "Information about Modem Manager GUI." msgstr "Informasi tentang Modem Manager GUI." #: C/about.page13(credit/name) C/contrib-code.page13(credit/name) #: C/contrib-translations.page13(credit/name) C/index.page11(credit/name) #: C/report-bugs.page13(credit/name) C/usage-config.page13(credit/name) #: C/usage-contacts.page13(credit/name) C/usage-getinfo.page13(credit/name) #: C/usage-modem.page13(credit/name) C/usage-netsearch.page13(credit/name) #: C/usage-sms.page13(credit/name) C/usage-traffic.page13(credit/name) #: C/usage-ussd.page13(credit/name) msgid "Mario Blättermann" msgstr "Mario Blättermann" #: C/about.page17(license/p) C/contrib-code.page17(license/p) #: C/contrib-translations.page17(license/p) C/index.page16(license/p) #: C/report-bugs.page17(license/p) C/usage-config.page17(license/p) #: C/usage-contacts.page17(license/p) C/usage-getinfo.page17(license/p) #: C/usage-modem.page17(license/p) C/usage-netsearch.page17(license/p) #: C/usage-sms.page17(license/p) C/usage-traffic.page17(license/p) #: C/usage-ussd.page17(license/p) msgid "Creative Commons Share Alike 3.0" msgstr "Berbagi Serupa 3.0 Creative Commons" #: C/about.page21(page/title) msgid "About Modem Manager GUI" msgstr "Tentang Modem Manager GUI" #: C/about.page23(page/p) msgid "" "Modem Manager GUI was written by Alex. To find more information " "about Modem Manager GUI, please visit the Modem Manager" " GUI Web page." msgstr "Modem Manager GUI dibuat oleh Alex. Untuk menemukan informasi lebih tentang Modem Manager GUI, silakan kunjungi halaman Web Modem Manager GUI." #: C/about.page29(page/p) msgid "" "To report a bug or make a suggestion regarding this application or this " "manual, follow the directions at the Modem Manager GUI bug tracker." msgstr "Untuk melaporkan galat atau memberikan saran mengenai aplikasi atau panduan ini, ikuti petunjuk di pelacak galat Modem Manager GUI." #: C/about.page35(page/p) msgid "" "This program is distributed under the terms of the GNU General Public " "license version 3, as published by the Free Software Foundation. A copy of " "this license can be found at this link, or in the file COPYING included with the source " "code of this program." msgstr "" #: C/contrib-code.page9(info/desc) msgid "How you can help make Modem Manager GUI better." msgstr "" #: C/contrib-code.page21(page/title) msgid "Provide code" msgstr "" #: C/contrib-code.page22(page/p) msgid "" "Modem Manager GUI has a version control system at " "SourceForge.net. You can clone the repository with the following command:" msgstr "" #: C/contrib-code.page25(page/p) msgid "" "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-" "manager-gui-code-0" msgstr "" #: C/contrib-code.page27(page/p) msgid "" "Note, this clone command doesn't give you write access to the repository." msgstr "" #: C/contrib-translations.page9(info/desc) msgid "Translate Modem Manager GUI into your native language." msgstr "" #: C/contrib-translations.page21(page/title) msgid "Translations" msgstr "" #: C/contrib-translations.page22(page/p) msgid "" "The graphical user interface, the traditional man page and the Gnome-style " "user manual of Modem Manager GUI can be translated into your " "language." msgstr "" #: C/contrib-translations.page25(page/p) msgid "" "There is a project page on Transifex where existing translations are " "hosted and also new ones can be provided." msgstr "" #: C/contrib-translations.page31(page/p) msgid "" "For general help on how Transifex works, see the Transifex Help Desk." msgstr "" #: C/contrib-translations.page35(note/p) msgid "" "For your work you should have a look at the rules and dictionaries of the " "local Gnome translation teams " ". Although Modem Manager GUI shouldn't be considered as " "pure Gnome software, it will be often used in GTK based environments and " "should match the conceptual world of such applications." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page7(media) msgctxt "_" msgid "external ref='figures/gnome-hello-logo.png' md5='__failed__'" msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page21(media) msgctxt "_" msgid "" "external ref='figures/modem-manager-gui-logo.png' " "md5='a5ab22246356ef7c194bb09f1ec8e432'" msgstr "" #: C/index.page6(info/desc) msgid "Help for Modem Manager GUI." msgstr "" #: C/index.page8(info/title) msgctxt "text" msgid "Modem Manager GUI" msgstr "" #: C/index.page21(page/title) msgid "" "GNOME Hello" " logoModem Manager GUI manual" msgstr "" #: C/index.page23(page/p) msgid "" "Modem Manager GUI is a graphical frontend for the ModemManager " "daemon which is able to control specific modem functions." msgstr "" #: C/index.page27(page/p) msgid "You can use Modem Manager GUI for the following tasks:" msgstr "" #: C/index.page32(item/p) msgid "Send and receive SMS messages with messages concatenation" msgstr "" #: C/index.page35(item/p) msgid "Send USSD requests and receive answers in system encoding" msgstr "" #: C/index.page38(item/p) msgid "" "Get modem and SIM information (device info, operator name, mode, IMEI, " "IMSI/ESN, Signal level)" msgstr "" #: C/index.page42(item/p) msgid "Scan available mobile networks" msgstr "" #: C/index.page45(item/p) msgid "" "Control data transmission process and set session traffic and time limits" msgstr "" #: C/index.page50(section/title) msgid "Usage" msgstr "" #: C/index.page54(section/title) msgid "Contribute to the project" msgstr "" #: C/license.page8(info/desc) msgid "Legal information." msgstr "" #: C/license.page11(page/title) msgid "License" msgstr "" #: C/license.page12(page/p) msgid "" "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0" " Unported license." msgstr "" #: C/license.page20(page/p) msgid "You are free:" msgstr "" #: C/license.page25(item/title) msgid "To share" msgstr "" #: C/license.page26(item/p) msgid "To copy, distribute and transmit the work." msgstr "" #: C/license.page29(item/title) msgid "To remix" msgstr "" #: C/license.page30(item/p) msgid "To adapt the work." msgstr "" #: C/license.page33(page/p) msgid "Under the following conditions:" msgstr "" #: C/license.page38(item/title) msgid "Attribution" msgstr "" #: C/license.page39(item/p) msgid "" "You must attribute the work in the manner specified by the author or " "licensor (but not in any way that suggests that they endorse you or your use" " of the work)." msgstr "" #: C/license.page46(item/title) msgid "Share Alike" msgstr "" #: C/license.page47(item/p) msgid "" "If you alter, transform, or build upon this work, you may distribute the " "resulting work only under the same, similar or a compatible license." msgstr "" #: C/license.page53(page/p) msgid "" "For the full text of the license, see the CreativeCommons website, or read the full Commons Deed." msgstr "" #: C/report-bugs.page9(info/desc) msgid "Report bugs and request new features." msgstr "" #: C/report-bugs.page21(page/title) msgid "Report bugs" msgstr "" #: C/report-bugs.page22(page/p) msgid "" "If you found a bug in Modem Manager GUI, you can use the Bug " "Tracker." msgstr "" #: C/report-bugs.page26(page/p) msgid "" "Before filing a new bug, please have a look at " " the existing ones first. Maybe someone else has already encountered " "the same problem? Then you might write your comments there." msgstr "" #: C/report-bugs.page31(note/p) msgid "You can also use the Bug Tracker for feature requests." msgstr "" #: C/usage-config.page9(info/desc) msgid "Configure the application to match your needs." msgstr "" #: C/usage-config.page21(page/title) msgid "Configuration" msgstr "" #: C/usage-contacts.page9(info/desc) msgid "Use your contact lists." msgstr "" #: C/usage-contacts.page21(page/title) msgid "Contact lists" msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-getinfo.page30(media) msgctxt "_" msgid "" "external ref='figures/network-info.png' " "md5='9508df6dd96583049f837b018d8336cd'" msgstr "" #: C/usage-getinfo.page9(info/desc) msgid "Get info about the mobile network." msgstr "" #: C/usage-getinfo.page21(page/title) msgid "Network info" msgstr "" #: C/usage-getinfo.page22(page/p) msgid "" "Your network operator provides some info which you can view in Modem " "Manager GUI. Click on the Info button in " "the toolbar." msgstr "" #: C/usage-getinfo.page26(page/p) msgid "" "In the following window you see all available information as provided from " "your operator:" msgstr "" #: C/usage-getinfo.page29(page/p) msgid "" " " "Network information window of Modem Manager GUI. " msgstr "" #: C/usage-getinfo.page35(page/p) msgid "" "The most informations are self-explained and well known from traditional " "mobile phones or smartphones. Note, the GPS based location detection (in the" " lower part of the window) won't work in most cases because mobile broadband" " devices usually don't have a GPS sensor." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-modem.page25(media) msgctxt "_" msgid "" "external ref='figures/startup-window.png' " "md5='fd641b4e39058e6594e9b0bc0c2c629d'" msgstr "" #: C/usage-modem.page9(info/desc) msgid "Activate your modem devices." msgstr "" #: C/usage-modem.page21(page/title) msgid "Modems" msgstr "" #: C/usage-modem.page22(page/p) msgid "" "After starting Modem Manager GUI, the following window will be " "displayed:" msgstr "" #: C/usage-modem.page24(page/p) msgid "" " " "The startup window of Modem Manager GUI. " msgstr "" #: C/usage-modem.page30(page/p) msgid "" "You can see the modem devices available on your system. Click on one of the " "entries to use that device." msgstr "" #: C/usage-modem.page33(page/p) msgid "" "After clicking on a device, it might be needed to activate it first, if it " "was not otherwise activated on your system. Modem Manager GUI " "will ask you for confirmation in that case." msgstr "" #: C/usage-modem.page37(page/p) msgid "" "Be patient after connecting a removable device such as an USB stick or " "PCMCIA card. It may take a while until the system detects it." msgstr "" #: C/usage-modem.page41(note/p) msgid "" "You cannot use multiple modems at the same time. If you click on another " "entry in the device list, the previously activated one will be disabled." msgstr "" #: C/usage-netsearch.page9(info/desc) msgid "Search for available networks." msgstr "" #: C/usage-netsearch.page21(page/title) msgid "Network Search" msgstr "" #: C/usage-sms.page9(info/desc) msgid "Use Modem Manager GUI for sending and receiving SMS." msgstr "" #: C/usage-sms.page21(page/title) msgid "SMS" msgstr "" #: C/usage-traffic.page9(info/desc) msgid "Get statistics about network traffic." msgstr "" #: C/usage-traffic.page21(page/title) msgid "Network traffic" msgstr "" #: C/usage-ussd.page9(info/desc) msgid "" "Use Modem Manager GUI for send USSD codes and receive the " "answers." msgstr "" #: C/usage-ussd.page21(page/title) msgid "USSD codes" msgstr "" #: C/usage-ussd.page22(page/p) msgid "" "Modem Manager GUI is able to send USSD codes. These codes are " "controlling some network functions, for example the visibility of your phone" " number when sending a SMS." msgstr "" #: C/usage-ussd.page25(page/p) msgid "" "To use the USSD functions, click on the USSD " "button in the toolbar." msgstr "" #: C/usage-ussd.page28(page/p) msgid "" "In the text entry on top of the window, the code *100# is already" " displayed. This code is the usual one for requesting the balance for a " "prepaid card. If you like to send another code, click on the Edit button on the right" msgstr "" #: C/usage-ussd.page33(note/p) msgid "" "USSD codes are only available in networks which use the 3GPP" " standards ." msgstr "" #: C/usage-ussd.page38(page/p) msgid "You can use such codes for many purposes." msgstr "" #: C/usage-ussd.page4(C/usage-ussd.page/page) msgid "" "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" msgstr "" modem-manager-gui-0.0.17.1/help/ru.po0000664000175000017500000007042212377624140015630 0ustar alexalex# # Translators: # Alex , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-08-27 17:16+0400\n" "PO-Revision-Date: 2014-08-28 12:41+0000\n" "Last-Translator: Alex \n" "Language-Team: Russian (http://www.transifex.com/projects/p/modem-manager-gui/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "Alex , 2014" #: C/about.page9(info/desc) msgid "Information about Modem Manager GUI." msgstr "Информация о приложениии Modem Manager GUI." #: C/about.page13(credit/name) C/contrib-code.page13(credit/name) #: C/contrib-translations.page13(credit/name) C/index.page11(credit/name) #: C/report-bugs.page13(credit/name) C/usage-config.page13(credit/name) #: C/usage-contacts.page13(credit/name) C/usage-getinfo.page13(credit/name) #: C/usage-modem.page13(credit/name) C/usage-netsearch.page13(credit/name) #: C/usage-sms.page13(credit/name) C/usage-traffic.page13(credit/name) #: C/usage-ussd.page13(credit/name) msgid "Mario Blättermann" msgstr "Mario Blättermann" #: C/about.page17(license/p) C/contrib-code.page17(license/p) #: C/contrib-translations.page17(license/p) C/index.page16(license/p) #: C/report-bugs.page17(license/p) C/usage-config.page17(license/p) #: C/usage-contacts.page17(license/p) C/usage-getinfo.page17(license/p) #: C/usage-modem.page17(license/p) C/usage-netsearch.page17(license/p) #: C/usage-sms.page17(license/p) C/usage-traffic.page17(license/p) #: C/usage-ussd.page17(license/p) msgid "Creative Commons Share Alike 3.0" msgstr "Creative Commons Share Alike 3.0" #: C/about.page21(page/title) msgid "About Modem Manager GUI" msgstr "О приложении Modem Manager GUI" #: C/about.page23(page/p) msgid "" "Modem Manager GUI was written by Alex. To find more information " "about Modem Manager GUI, please visit the Modem Manager" " GUI Web page." msgstr "Разработчиком приложения Modem Manager GUI является Alex. Для получения дополнительной информации о Modem Manager GUI следует обратиться к веб-странице Modem Manager GUI." #: C/about.page29(page/p) msgid "" "To report a bug or make a suggestion regarding this application or this " "manual, follow the directions at the Modem Manager GUI bug tracker." msgstr "Для того, чтобы сообщить об ошибке в приложении или в данном руководстве, вы должны действовать в соответствии с инструкциями, изложенными на странице системы отслеживания ошибок Modem Manager GUI." #: C/about.page35(page/p) msgid "" "This program is distributed under the terms of the GNU General Public " "license version 3, as published by the Free Software Foundation. A copy of " "this license can be found at this link, or in the file COPYING included with the source " "code of this program." msgstr "Данное приложение распространяентся в соответствии с условиями лицензии GNU General Public license версии 3, опубликованной Free Software Foundation. Копия текста лицензии доступна по ссылке, или в файле COPYING, включенном в комплект постаки исходного кода приложения." #: C/contrib-code.page9(info/desc) msgid "How you can help make Modem Manager GUI better." msgstr "Вы можете сделать приложение Modem Manager GUI лучше." #: C/contrib-code.page21(page/title) msgid "Provide code" msgstr "Разработка кода" #: C/contrib-code.page22(page/p) msgid "" "Modem Manager GUI has a version control system at " "SourceForge.net. You can clone the repository with the following command:" msgstr "Приложение Modem Manager GUI использует стсиему контроля версий на ресурсе SourceForge.net. Вы можете клонировать репозиторий исходного кода с помощью следующей команды:" #: C/contrib-code.page25(page/p) msgid "" "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-" "manager-gui-code-0" msgstr "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-manager-gui-code-0" #: C/contrib-code.page27(page/p) msgid "" "Note, this clone command doesn't give you write access to the repository." msgstr "Учтите, что данная команда клонирования репозитория не предоставляет вам возможности записи данных в репозиторий." #: C/contrib-translations.page9(info/desc) msgid "Translate Modem Manager GUI into your native language." msgstr "Вы можете перести интерфейс Modem Manager GUI на ваш родной язык." #: C/contrib-translations.page21(page/title) msgid "Translations" msgstr "Переводы" #: C/contrib-translations.page22(page/p) msgid "" "The graphical user interface, the traditional man page and the Gnome-style " "user manual of Modem Manager GUI can be translated into your " "language." msgstr "Графический пользовательский интерфейс, традиционная страница руководства и руководство пользователя в стиле Gnome приложения Modem Manager GUI могут быть переведены на ваш язык." #: C/contrib-translations.page25(page/p) msgid "" "There is a project page on Transifex where existing translations are " "hosted and also new ones can be provided." msgstr "Существует страница проекта на ресурсе Transifex, на которой осуществляется работа над всеми существующими переводами, а также могут создаваться новые переводы." #: C/contrib-translations.page31(page/p) msgid "" "For general help on how Transifex works, see the Transifex Help Desk." msgstr "Для ознакомления с общими принципами работы ресурса Transifex, обратитесь к документации проекта Transifex." #: C/contrib-translations.page35(note/p) msgid "" "For your work you should have a look at the rules and dictionaries of the " "local Gnome translation teams " ". Although Modem Manager GUI shouldn't be considered as " "pure Gnome software, it will be often used in GTK based environments and " "should match the conceptual world of such applications." msgstr "При работе следует обращаться правилам и словарям соответствующих команд переводчиков проекта Gnome . Хотя приложение Modem Manager GUI и не следует рассматривать как приложение для окружения рабочего стола Gnome, оно часто используется в окружениях на основе библиотек GTK и должно следовать концепциям, принятым для первода соответствующих приложений." #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page7(media) msgctxt "_" msgid "external ref='figures/gnome-hello-logo.png' md5='__failed__'" msgstr "external ref='figures/gnome-hello-logo.png' md5='__failed__'" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page21(media) msgctxt "_" msgid "" "external ref='figures/modem-manager-gui-logo.png' " "md5='a5ab22246356ef7c194bb09f1ec8e432'" msgstr "external ref='figures/modem-manager-gui-logo.png' md5='a5ab22246356ef7c194bb09f1ec8e432'" #: C/index.page6(info/desc) msgid "Help for Modem Manager GUI." msgstr "Руководство пользователя приложения Modem Manager GUI." #: C/index.page8(info/title) msgctxt "text" msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: C/index.page21(page/title) msgid "" "GNOME Hello" " logoModem Manager GUI manual" msgstr "GNOME Hello logoРуководство пользователя приложения Modem Manager GUI" #: C/index.page23(page/p) msgid "" "Modem Manager GUI is a graphical frontend for the ModemManager " "daemon which is able to control specific modem functions." msgstr "Приложение Modem Manager GUI является графической оболочкой для системной службы ModemManager, позволяющей использовать специфичные функции модемов." #: C/index.page27(page/p) msgid "You can use Modem Manager GUI for the following tasks:" msgstr "Вы можете использовать Modem Manager GUI для выполнения следующих действий:" #: C/index.page32(item/p) msgid "Send and receive SMS messages with messages concatenation" msgstr "Отправки и приема сообщений SMS с их последующим объединением" #: C/index.page35(item/p) msgid "Send USSD requests and receive answers in system encoding" msgstr "Отправки запросов USSD и приема ответов на них в системной кодировке" #: C/index.page38(item/p) msgid "" "Get modem and SIM information (device info, operator name, mode, IMEI, " "IMSI/ESN, Signal level)" msgstr "Получения информации о модемах и SIM-картах (информации о устройстве, названии оператора, режиме работы модема, IMEI, IMSI/ESN, уровне сигнала)" #: C/index.page42(item/p) msgid "Scan available mobile networks" msgstr "Поиска доступных мобильных сетей" #: C/index.page45(item/p) msgid "" "Control data transmission process and set session traffic and time limits" msgstr "Управления процессом передачи данных и установки лимитов объема трфика и времени" #: C/index.page50(section/title) msgid "Usage" msgstr "Использование" #: C/index.page54(section/title) msgid "Contribute to the project" msgstr "Участие в разработке" #: C/license.page8(info/desc) msgid "Legal information." msgstr "Правовая информация." #: C/license.page11(page/title) msgid "License" msgstr "Лицензия" #: C/license.page12(page/p) msgid "" "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0" " Unported license." msgstr "Данная работа распространяется в соостетствии с условиями лицензии CreativeCommons Attribution-Share Alike 3.0 Unported." #: C/license.page20(page/p) msgid "You are free:" msgstr "Вы можете:" #: C/license.page25(item/title) msgid "To share" msgstr "Делиться" #: C/license.page26(item/p) msgid "To copy, distribute and transmit the work." msgstr "Копировать, распространять и передавать данную работу." #: C/license.page29(item/title) msgid "To remix" msgstr "Создавать производные" #: C/license.page30(item/p) msgid "To adapt the work." msgstr "Модифицировать данную работу." #: C/license.page33(page/p) msgid "Under the following conditions:" msgstr "Учитывая следующие условия:" #: C/license.page38(item/title) msgid "Attribution" msgstr "Указание авторства" #: C/license.page39(item/p) msgid "" "You must attribute the work in the manner specified by the author or " "licensor (but not in any way that suggests that they endorse you or your use" " of the work)." msgstr "Вы должны указать авторство данной работы точно таким же образом, как это было сделано автором или лицом, выдавшим лицензию (но не таким образом, чтобы создавалось впечатление, что автор поддеривает вас или ваше стремление использовать данную работу)." #: C/license.page46(item/title) msgid "Share Alike" msgstr "Распространение на тех же условиях" #: C/license.page47(item/p) msgid "" "If you alter, transform, or build upon this work, you may distribute the " "resulting work only under the same, similar or a compatible license." msgstr "В том случае, если вы модифицируете, преобразуете или используете данную работу для создания своей собственной работы, вы должны распространять результирующую работу исключительно в соответствии с условиями этой же, аналогичной или совместимой лицензии." #: C/license.page53(page/p) msgid "" "For the full text of the license, see the CreativeCommons website, or read the full Commons Deed." msgstr "Для ознакомления с полным текстом лицензии перейдите на веб-сайт проекта CreativeCommons, или ознакомьтесь с Commons Deed." #: C/report-bugs.page9(info/desc) msgid "Report bugs and request new features." msgstr "Вы можете сообщить об обнаруженных ошибках и необходимых новых возможностях приложения." #: C/report-bugs.page21(page/title) msgid "Report bugs" msgstr "Сообщения об ошибках" #: C/report-bugs.page22(page/p) msgid "" "If you found a bug in Modem Manager GUI, you can use the Bug " "Tracker." msgstr "В том случае, если вы обнаружили ошибку в приложении Modem Manager GUI, вы можете воспользоваться системой отслеживания ошибок." #: C/report-bugs.page26(page/p) msgid "" "Before filing a new bug, please have a look at " " the existing ones first. Maybe someone else has already encountered " "the same problem? Then you might write your comments there." msgstr "Перед тем, как создать новое сообщение об ошибке, ознакомьтесь с существующими сообщениями. Возможно, кто-то уже столкнулся с этой же проблемой? В этом случае вы можете написать комментарий к уже существующему сообщению." #: C/report-bugs.page31(note/p) msgid "You can also use the Bug Tracker for feature requests." msgstr "Вы можете использовать систему отслеживания ошибок также для сообщения о необходимых новых возможностях приложения." #: C/usage-config.page9(info/desc) msgid "Configure the application to match your needs." msgstr "Настройка приложения в соответствии с вашими потребностями." #: C/usage-config.page21(page/title) msgid "Configuration" msgstr "Настройка" #: C/usage-contacts.page9(info/desc) msgid "Use your contact lists." msgstr "Использование ваших списков контактов." #: C/usage-contacts.page21(page/title) msgid "Contact lists" msgstr "Списки контактов" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-getinfo.page30(media) msgctxt "_" msgid "" "external ref='figures/network-info.png' " "md5='9508df6dd96583049f837b018d8336cd'" msgstr "external ref='figures/network-info.png' md5='9508df6dd96583049f837b018d8336cd'" #: C/usage-getinfo.page9(info/desc) msgid "Get info about the mobile network." msgstr "Получение информации о мобильной сети." #: C/usage-getinfo.page21(page/title) msgid "Network info" msgstr "Информация о сети" #: C/usage-getinfo.page22(page/p) msgid "" "Your network operator provides some info which you can view in Modem " "Manager GUI. Click on the Info button in " "the toolbar." msgstr "Ваш мобильный оператор предоставляет некоторую информацию, с которй вы можете ознакомиться благодаря приложению Modem Manager GUI. Нажмите на кнопку Статус панели инструментов." #: C/usage-getinfo.page26(page/p) msgid "" "In the following window you see all available information as provided from " "your operator:" msgstr "В следующем окне вы увидите всю доступную информацию, представленную вашим мобильным оператором:" #: C/usage-getinfo.page29(page/p) msgid "" " " "Network information window of Modem Manager GUI. " msgstr " Окно с информацией о мобильной сети приложения Modem Manager GUI. " #: C/usage-getinfo.page35(page/p) msgid "" "The most informations are self-explained and well known from traditional " "mobile phones or smartphones. Note, the GPS based location detection (in the" " lower part of the window) won't work in most cases because mobile broadband" " devices usually don't have a GPS sensor." msgstr "Большая часть параметров очевидна и хорошо знакома по мобильным телефонам или смартфонам. Учтите, что нвигационные данные GPS (выводящиеся в нижней части окна) в большинстве случаев не будут доступны, так как устройства для широкополосного доступа к сети чаше всего не имеют модулей GPS-навигации." #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-modem.page25(media) msgctxt "_" msgid "" "external ref='figures/startup-window.png' " "md5='fd641b4e39058e6594e9b0bc0c2c629d'" msgstr "external ref='figures/startup-window.png' md5='fd641b4e39058e6594e9b0bc0c2c629d'" #: C/usage-modem.page9(info/desc) msgid "Activate your modem devices." msgstr "Активация ваших устройств." #: C/usage-modem.page21(page/title) msgid "Modems" msgstr "Модемы" #: C/usage-modem.page22(page/p) msgid "" "After starting Modem Manager GUI, the following window will be " "displayed:" msgstr "После запуска приложения Modem Manager GUI, будет показано следующее окно:" #: C/usage-modem.page24(page/p) msgid "" " " "The startup window of Modem Manager GUI. " msgstr " Начальное окно приложения Modem Manager GUI. " #: C/usage-modem.page30(page/p) msgid "" "You can see the modem devices available on your system. Click on one of the " "entries to use that device." msgstr "Будут отображены все модемы, доступные в вашей системе. Выберите один из элементов списка для использования соответствующего устройства." #: C/usage-modem.page33(page/p) msgid "" "After clicking on a device, it might be needed to activate it first, if it " "was not otherwise activated on your system. Modem Manager GUI " "will ask you for confirmation in that case." msgstr "После выбора устройства может потребоваться его активация в том случае, если оно не было предварительно активировано в рамках вашей системы. В этом случае приложение Modem Manager GUI запросит подтверждение перед активацией устройства." #: C/usage-modem.page37(page/p) msgid "" "Be patient after connecting a removable device such as an USB stick or " "PCMCIA card. It may take a while until the system detects it." msgstr "Проявите терпение при подключении таких устройств, как USB-модем или карта PCMCIA. Для их определения системе понадобится некоторое время." #: C/usage-modem.page41(note/p) msgid "" "You cannot use multiple modems at the same time. If you click on another " "entry in the device list, the previously activated one will be disabled." msgstr "Вы не сможете использовать несколько устройств одновременно. В том случае, если вы выбираете другой элемент списка устройств, работа с ранее активированным устройством прекращается." #: C/usage-netsearch.page9(info/desc) msgid "Search for available networks." msgstr "Поиск доступных мобильных сетей." #: C/usage-netsearch.page21(page/title) msgid "Network Search" msgstr "Поиск сетей" #: C/usage-sms.page9(info/desc) msgid "Use Modem Manager GUI for sending and receiving SMS." msgstr "Использование Modem Manager GUI для отправки и приема сообщений SMS." #: C/usage-sms.page21(page/title) msgid "SMS" msgstr "SMS" #: C/usage-traffic.page9(info/desc) msgid "Get statistics about network traffic." msgstr "Получение статистических данных, относящихся к сетевому трафику." #: C/usage-traffic.page21(page/title) msgid "Network traffic" msgstr "Сетевой трафик" #: C/usage-ussd.page9(info/desc) msgid "" "Use Modem Manager GUI for send USSD codes and receive the " "answers." msgstr "Использование Modem Manager GUI для отправки кодов USSD и приема ответов." #: C/usage-ussd.page21(page/title) msgid "USSD codes" msgstr "Коды USSD" #: C/usage-ussd.page22(page/p) msgid "" "Modem Manager GUI is able to send USSD codes. These codes are " "controlling some network functions, for example the visibility of your phone" " number when sending a SMS." msgstr "Приложение Modem Manager GUI позволяет осуществлять отправку кодов USSD. Эти коды используются для управления некоторыми функциями мобильной сети, к примеру, они позволяют скрывать ваш номер телефона при отправке сообщений SMS." #: C/usage-ussd.page25(page/p) msgid "" "To use the USSD functions, click on the USSD " "button in the toolbar." msgstr "Для использования функций USSD следует нажать на кнопку USSD панели инструментов." #: C/usage-ussd.page28(page/p) msgid "" "In the text entry on top of the window, the code *100# is already" " displayed. This code is the usual one for requesting the balance for a " "prepaid card. If you like to send another code, click on the Edit button on the right" msgstr "В поле ввода строки вверху окна по умолчанию будет введен код *100#. Этот код чаще всего используется для запроса информации о балансе на тарифах с предоплатой. В том случае, если вы хотите отправить другой код, нажмите кнопку Изменить спарава от поля ввода строки." #: C/usage-ussd.page33(note/p) msgid "" "USSD codes are only available in networks which use the 3GPP" " standards ." msgstr "Коды USSD доступны исключительно в мобильных сетях, использующих стандарты 3GPP." #: C/usage-ussd.page38(page/p) msgid "You can use such codes for many purposes." msgstr "Вы можете использовать такие коды для различных целей." #: C/usage-ussd.page4(C/usage-ussd.page/page) msgid "" "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" msgstr "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" modem-manager-gui-0.0.17.1/help/uz@Latn.po0000664000175000017500000003673212377624141016566 0ustar alexalex# # Translators: msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-08-27 17:16+0400\n" "PO-Revision-Date: 2014-08-28 10:59+0000\n" "Last-Translator: Umid Almasov \n" "Language-Team: Uzbek (Latin) (http://www.transifex.com/projects/p/modem-manager-gui/language/uz@Latn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: uz@Latn\n" "Plural-Forms: nplurals=1; plural=0;\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "Umidjon Almasov , 2014" #: C/about.page9(info/desc) msgid "Information about Modem Manager GUI." msgstr "Modem Manager GUI haqida ma'lumot." #: C/about.page13(credit/name) C/contrib-code.page13(credit/name) #: C/contrib-translations.page13(credit/name) C/index.page11(credit/name) #: C/report-bugs.page13(credit/name) C/usage-config.page13(credit/name) #: C/usage-contacts.page13(credit/name) C/usage-getinfo.page13(credit/name) #: C/usage-modem.page13(credit/name) C/usage-netsearch.page13(credit/name) #: C/usage-sms.page13(credit/name) C/usage-traffic.page13(credit/name) #: C/usage-ussd.page13(credit/name) msgid "Mario Blättermann" msgstr "Mario Blättermann" #: C/about.page17(license/p) C/contrib-code.page17(license/p) #: C/contrib-translations.page17(license/p) C/index.page16(license/p) #: C/report-bugs.page17(license/p) C/usage-config.page17(license/p) #: C/usage-contacts.page17(license/p) C/usage-getinfo.page17(license/p) #: C/usage-modem.page17(license/p) C/usage-netsearch.page17(license/p) #: C/usage-sms.page17(license/p) C/usage-traffic.page17(license/p) #: C/usage-ussd.page17(license/p) msgid "Creative Commons Share Alike 3.0" msgstr "Creative Commons Share Alike 3.0" #: C/about.page21(page/title) msgid "About Modem Manager GUI" msgstr "Modem Manager GUI haqida" #: C/about.page23(page/p) msgid "" "Modem Manager GUI was written by Alex. To find more information " "about Modem Manager GUI, please visit the Modem Manager" " GUI Web page." msgstr "Modem Manager GUI Alex tomonidan yozilgan. Modem Manager GUI haqida qo'shimcha ma'lumot olish uchun, iltimos Modem Manager GUI veb-sahifasiga tashrif buyuring." #: C/about.page29(page/p) msgid "" "To report a bug or make a suggestion regarding this application or this " "manual, follow the directions at the Modem Manager GUI bug tracker." msgstr "" #: C/about.page35(page/p) msgid "" "This program is distributed under the terms of the GNU General Public " "license version 3, as published by the Free Software Foundation. A copy of " "this license can be found at this link, or in the file COPYING included with the source " "code of this program." msgstr "" #: C/contrib-code.page9(info/desc) msgid "How you can help make Modem Manager GUI better." msgstr "" #: C/contrib-code.page21(page/title) msgid "Provide code" msgstr "" #: C/contrib-code.page22(page/p) msgid "" "Modem Manager GUI has a version control system at " "SourceForge.net. You can clone the repository with the following command:" msgstr "" #: C/contrib-code.page25(page/p) msgid "" "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-" "manager-gui-code-0" msgstr "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-manager-gui-code-0" #: C/contrib-code.page27(page/p) msgid "" "Note, this clone command doesn't give you write access to the repository." msgstr "" #: C/contrib-translations.page9(info/desc) msgid "Translate Modem Manager GUI into your native language." msgstr "" #: C/contrib-translations.page21(page/title) msgid "Translations" msgstr "Tarjimalar" #: C/contrib-translations.page22(page/p) msgid "" "The graphical user interface, the traditional man page and the Gnome-style " "user manual of Modem Manager GUI can be translated into your " "language." msgstr "" #: C/contrib-translations.page25(page/p) msgid "" "There is a project page on Transifex where existing translations are " "hosted and also new ones can be provided." msgstr "" #: C/contrib-translations.page31(page/p) msgid "" "For general help on how Transifex works, see the Transifex Help Desk." msgstr "" #: C/contrib-translations.page35(note/p) msgid "" "For your work you should have a look at the rules and dictionaries of the " "local Gnome translation teams " ". Although Modem Manager GUI shouldn't be considered as " "pure Gnome software, it will be often used in GTK based environments and " "should match the conceptual world of such applications." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page7(media) msgctxt "_" msgid "external ref='figures/gnome-hello-logo.png' md5='__failed__'" msgstr "external ref='figures/gnome-hello-logo.png' md5='__failed__'" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page21(media) msgctxt "_" msgid "" "external ref='figures/modem-manager-gui-logo.png' " "md5='a5ab22246356ef7c194bb09f1ec8e432'" msgstr "external ref='figures/modem-manager-gui-logo.png' md5='a5ab22246356ef7c194bb09f1ec8e432'" #: C/index.page6(info/desc) msgid "Help for Modem Manager GUI." msgstr "Modem Manager GUI uchun yordam." #: C/index.page8(info/title) msgctxt "text" msgid "Modem Manager GUI" msgstr "" #: C/index.page21(page/title) msgid "" "GNOME Hello" " logoModem Manager GUI manual" msgstr "GNOME Hello logoModem Manager GUI qo'llanmasi" #: C/index.page23(page/p) msgid "" "Modem Manager GUI is a graphical frontend for the ModemManager " "daemon which is able to control specific modem functions." msgstr "" #: C/index.page27(page/p) msgid "You can use Modem Manager GUI for the following tasks:" msgstr "" #: C/index.page32(item/p) msgid "Send and receive SMS messages with messages concatenation" msgstr "" #: C/index.page35(item/p) msgid "Send USSD requests and receive answers in system encoding" msgstr "" #: C/index.page38(item/p) msgid "" "Get modem and SIM information (device info, operator name, mode, IMEI, " "IMSI/ESN, Signal level)" msgstr "" #: C/index.page42(item/p) msgid "Scan available mobile networks" msgstr "" #: C/index.page45(item/p) msgid "" "Control data transmission process and set session traffic and time limits" msgstr "" #: C/index.page50(section/title) msgid "Usage" msgstr "Foydalanish" #: C/index.page54(section/title) msgid "Contribute to the project" msgstr "Loyihaga hissani qo'shish" #: C/license.page8(info/desc) msgid "Legal information." msgstr "" #: C/license.page11(page/title) msgid "License" msgstr "Litsenziya" #: C/license.page12(page/p) msgid "" "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0" " Unported license." msgstr "" #: C/license.page20(page/p) msgid "You are free:" msgstr "" #: C/license.page25(item/title) msgid "To share" msgstr "" #: C/license.page26(item/p) msgid "To copy, distribute and transmit the work." msgstr "" #: C/license.page29(item/title) msgid "To remix" msgstr "" #: C/license.page30(item/p) msgid "To adapt the work." msgstr "" #: C/license.page33(page/p) msgid "Under the following conditions:" msgstr "" #: C/license.page38(item/title) msgid "Attribution" msgstr "" #: C/license.page39(item/p) msgid "" "You must attribute the work in the manner specified by the author or " "licensor (but not in any way that suggests that they endorse you or your use" " of the work)." msgstr "" #: C/license.page46(item/title) msgid "Share Alike" msgstr "" #: C/license.page47(item/p) msgid "" "If you alter, transform, or build upon this work, you may distribute the " "resulting work only under the same, similar or a compatible license." msgstr "" #: C/license.page53(page/p) msgid "" "For the full text of the license, see the CreativeCommons website, or read the full Commons Deed." msgstr "" #: C/report-bugs.page9(info/desc) msgid "Report bugs and request new features." msgstr "" #: C/report-bugs.page21(page/title) msgid "Report bugs" msgstr "Xatolar haqida xabar berish" #: C/report-bugs.page22(page/p) msgid "" "If you found a bug in Modem Manager GUI, you can use the Bug " "Tracker." msgstr "" #: C/report-bugs.page26(page/p) msgid "" "Before filing a new bug, please have a look at " " the existing ones first. Maybe someone else has already encountered " "the same problem? Then you might write your comments there." msgstr "" #: C/report-bugs.page31(note/p) msgid "You can also use the Bug Tracker for feature requests." msgstr "" #: C/usage-config.page9(info/desc) msgid "Configure the application to match your needs." msgstr "" #: C/usage-config.page21(page/title) msgid "Configuration" msgstr "" #: C/usage-contacts.page9(info/desc) msgid "Use your contact lists." msgstr "" #: C/usage-contacts.page21(page/title) msgid "Contact lists" msgstr "Aloqalar ro'yxatlari" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-getinfo.page30(media) msgctxt "_" msgid "" "external ref='figures/network-info.png' " "md5='9508df6dd96583049f837b018d8336cd'" msgstr "" #: C/usage-getinfo.page9(info/desc) msgid "Get info about the mobile network." msgstr "" #: C/usage-getinfo.page21(page/title) msgid "Network info" msgstr "Tarmoq haqida ma'lumot" #: C/usage-getinfo.page22(page/p) msgid "" "Your network operator provides some info which you can view in Modem " "Manager GUI. Click on the Info button in " "the toolbar." msgstr "" #: C/usage-getinfo.page26(page/p) msgid "" "In the following window you see all available information as provided from " "your operator:" msgstr "" #: C/usage-getinfo.page29(page/p) msgid "" " " "Network information window of Modem Manager GUI. " msgstr "" #: C/usage-getinfo.page35(page/p) msgid "" "The most informations are self-explained and well known from traditional " "mobile phones or smartphones. Note, the GPS based location detection (in the" " lower part of the window) won't work in most cases because mobile broadband" " devices usually don't have a GPS sensor." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-modem.page25(media) msgctxt "_" msgid "" "external ref='figures/startup-window.png' " "md5='fd641b4e39058e6594e9b0bc0c2c629d'" msgstr "" #: C/usage-modem.page9(info/desc) msgid "Activate your modem devices." msgstr "" #: C/usage-modem.page21(page/title) msgid "Modems" msgstr "Modemlar" #: C/usage-modem.page22(page/p) msgid "" "After starting Modem Manager GUI, the following window will be " "displayed:" msgstr "" #: C/usage-modem.page24(page/p) msgid "" " " "The startup window of Modem Manager GUI. " msgstr "" #: C/usage-modem.page30(page/p) msgid "" "You can see the modem devices available on your system. Click on one of the " "entries to use that device." msgstr "" #: C/usage-modem.page33(page/p) msgid "" "After clicking on a device, it might be needed to activate it first, if it " "was not otherwise activated on your system. Modem Manager GUI " "will ask you for confirmation in that case." msgstr "" #: C/usage-modem.page37(page/p) msgid "" "Be patient after connecting a removable device such as an USB stick or " "PCMCIA card. It may take a while until the system detects it." msgstr "" #: C/usage-modem.page41(note/p) msgid "" "You cannot use multiple modems at the same time. If you click on another " "entry in the device list, the previously activated one will be disabled." msgstr "" #: C/usage-netsearch.page9(info/desc) msgid "Search for available networks." msgstr "" #: C/usage-netsearch.page21(page/title) msgid "Network Search" msgstr "Tarmoq qidirish" #: C/usage-sms.page9(info/desc) msgid "Use Modem Manager GUI for sending and receiving SMS." msgstr "" #: C/usage-sms.page21(page/title) msgid "SMS" msgstr "SMS" #: C/usage-traffic.page9(info/desc) msgid "Get statistics about network traffic." msgstr "" #: C/usage-traffic.page21(page/title) msgid "Network traffic" msgstr "Tarmoq trafigi" #: C/usage-ussd.page9(info/desc) msgid "" "Use Modem Manager GUI for send USSD codes and receive the " "answers." msgstr "" #: C/usage-ussd.page21(page/title) msgid "USSD codes" msgstr "USSD kodlari" #: C/usage-ussd.page22(page/p) msgid "" "Modem Manager GUI is able to send USSD codes. These codes are " "controlling some network functions, for example the visibility of your phone" " number when sending a SMS." msgstr "" #: C/usage-ussd.page25(page/p) msgid "" "To use the USSD functions, click on the USSD " "button in the toolbar." msgstr "" #: C/usage-ussd.page28(page/p) msgid "" "In the text entry on top of the window, the code *100# is already" " displayed. This code is the usual one for requesting the balance for a " "prepaid card. If you like to send another code, click on the Edit button on the right" msgstr "" #: C/usage-ussd.page33(note/p) msgid "" "USSD codes are only available in networks which use the 3GPP" " standards ." msgstr "" #: C/usage-ussd.page38(page/p) msgid "You can use such codes for many purposes." msgstr "" #: C/usage-ussd.page4(C/usage-ussd.page/page) msgid "" "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" msgstr "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" modem-manager-gui-0.0.17.1/help/Makefile0000644000175000017500000000222612400622000016251 0ustar alexalexinclude ../Makefile_h FILES_PO:=$(wildcard *.po) HELPDIR = $(PREFIX)/share/help APPDIR = modem-manager-gui all: for f in $(FILES_PO); do \ mkdir `basename $$f .po`;\ msgfmt $$f -f -v -o `basename $$f .po`.mo;\ itstool -m `basename $$f .po`.mo -o `basename $$f .po`/ C/*.page; \ done install: install -d $(INSTALLPREFIX)$(DESTDIR)$(HELPDIR)/C/$(APPDIR); cp -r C/* $(INSTALLPREFIX)$(DESTDIR)$(HELPDIR)/C/$(APPDIR); for f in $(FILES_PO); do \ install -d $(INSTALLPREFIX)$(DESTDIR)$(HELPDIR)/`basename $$f .po`/$(APPDIR)/figures; \ cp C/figures/* $(INSTALLPREFIX)$(DESTDIR)$(HELPDIR)/`basename $$f .po`/$(APPDIR)/figures/; \ cp `basename $$f .po`/*.page $(INSTALLPREFIX)$(DESTDIR)$(HELPDIR)/`basename $$f .po`/$(APPDIR)/; \ done uninstall: rm -rf $(INSTALLPREFIX)$(DESTDIR)$(HELPDIR)/C/$(APPDIR); for f in $(FILES_PO); do \ rm -rf $(INSTALLPREFIX)$(DESTDIR)$(HELPDIR)/`basename $$f .po`/$(APPDIR); \ done messages: itstool -o modem-manager-gui-help.pot C/*.page; for f in $(FILES_PO); do \ msgmerge -U $$f modem-manager-gui-help.pot; done clean: for f in $(FILES_PO); do \ rm -rf `basename $$f .po`; \ rm -f `basename $$f .po`.mo; \ done modem-manager-gui-0.0.17.1/help/en_US.po0000664000175000017500000005276212377603626016230 0ustar alexalex# # Translators: msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-08-27 17:16+0400\n" "PO-Revision-Date: 2014-08-27 13:19+0000\n" "Last-Translator: Alex \n" "Language-Team: English (United States) (http://www.transifex.com/projects/p/modem-manager-gui/language/en_US/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en_US\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "translator-credits" #: C/about.page9(info/desc) msgid "Information about Modem Manager GUI." msgstr "Information about Modem Manager GUI." #: C/about.page13(credit/name) C/contrib-code.page13(credit/name) #: C/contrib-translations.page13(credit/name) C/index.page11(credit/name) #: C/report-bugs.page13(credit/name) C/usage-config.page13(credit/name) #: C/usage-contacts.page13(credit/name) C/usage-getinfo.page13(credit/name) #: C/usage-modem.page13(credit/name) C/usage-netsearch.page13(credit/name) #: C/usage-sms.page13(credit/name) C/usage-traffic.page13(credit/name) #: C/usage-ussd.page13(credit/name) msgid "Mario Blättermann" msgstr "Mario Blättermann" #: C/about.page17(license/p) C/contrib-code.page17(license/p) #: C/contrib-translations.page17(license/p) C/index.page16(license/p) #: C/report-bugs.page17(license/p) C/usage-config.page17(license/p) #: C/usage-contacts.page17(license/p) C/usage-getinfo.page17(license/p) #: C/usage-modem.page17(license/p) C/usage-netsearch.page17(license/p) #: C/usage-sms.page17(license/p) C/usage-traffic.page17(license/p) #: C/usage-ussd.page17(license/p) msgid "Creative Commons Share Alike 3.0" msgstr "Creative Commons Share Alike 3.0" #: C/about.page21(page/title) msgid "About Modem Manager GUI" msgstr "About Modem Manager GUI" #: C/about.page23(page/p) msgid "" "Modem Manager GUI was written by Alex. To find more information " "about Modem Manager GUI, please visit the Modem Manager" " GUI Web page." msgstr "Modem Manager GUI was written by Alex. To find more information about Modem Manager GUI, please visit the Modem Manager GUI Web page." #: C/about.page29(page/p) msgid "" "To report a bug or make a suggestion regarding this application or this " "manual, follow the directions at the Modem Manager GUI bug tracker." msgstr "To report a bug or make a suggestion regarding this application or this manual, follow the directions at the Modem Manager GUI bug tracker." #: C/about.page35(page/p) msgid "" "This program is distributed under the terms of the GNU General Public " "license version 3, as published by the Free Software Foundation. A copy of " "this license can be found at this link, or in the file COPYING included with the source " "code of this program." msgstr "This program is distributed under the terms of the GNU General Public license version 3, as published by the Free Software Foundation. A copy of this license can be found at this link, or in the file COPYING included with the source code of this program." #: C/contrib-code.page9(info/desc) msgid "How you can help make Modem Manager GUI better." msgstr "How you can help make Modem Manager GUI better." #: C/contrib-code.page21(page/title) msgid "Provide code" msgstr "Provide code" #: C/contrib-code.page22(page/p) msgid "" "Modem Manager GUI has a version control system at " "SourceForge.net. You can clone the repository with the following command:" msgstr "Modem Manager GUI has a version control system at SourceForge.net. You can clone the repository with the following command:" #: C/contrib-code.page25(page/p) msgid "" "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-" "manager-gui-code-0" msgstr "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-manager-gui-code-0" #: C/contrib-code.page27(page/p) msgid "" "Note, this clone command doesn't give you write access to the repository." msgstr "Note, this clone command doesn't give you write access to the repository." #: C/contrib-translations.page9(info/desc) msgid "Translate Modem Manager GUI into your native language." msgstr "Translate Modem Manager GUI into your native language." #: C/contrib-translations.page21(page/title) msgid "Translations" msgstr "Translations" #: C/contrib-translations.page22(page/p) msgid "" "The graphical user interface, the traditional man page and the Gnome-style " "user manual of Modem Manager GUI can be translated into your " "language." msgstr "The graphical user interface, the traditional man page and the Gnome-style user manual of Modem Manager GUI can be translated into your language." #: C/contrib-translations.page25(page/p) msgid "" "There is a project page on Transifex where existing translations are " "hosted and also new ones can be provided." msgstr "There is a project page on Transifex where existing translations are hosted and also new ones can be provided." #: C/contrib-translations.page31(page/p) msgid "" "For general help on how Transifex works, see the Transifex Help Desk." msgstr "For general help on how Transifex works, see the Transifex Help Desk." #: C/contrib-translations.page35(note/p) msgid "" "For your work you should have a look at the rules and dictionaries of the " "local Gnome translation teams " ". Although Modem Manager GUI shouldn't be considered as " "pure Gnome software, it will be often used in GTK based environments and " "should match the conceptual world of such applications." msgstr "For your work you should have a look at the rules and dictionaries of the local Gnome translation teams . Although Modem Manager GUI shouldn't be considered as pure Gnome software, it will be often used in GTK based environments and should match the conceptual world of such applications." #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page7(media) msgctxt "_" msgid "external ref='figures/gnome-hello-logo.png' md5='__failed__'" msgstr "external ref='figures/gnome-hello-logo.png' md5='__failed__'" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page21(media) msgctxt "_" msgid "" "external ref='figures/modem-manager-gui-logo.png' " "md5='a5ab22246356ef7c194bb09f1ec8e432'" msgstr "external ref='figures/modem-manager-gui-logo.png' md5='a5ab22246356ef7c194bb09f1ec8e432'" #: C/index.page6(info/desc) msgid "Help for Modem Manager GUI." msgstr "Help for Modem Manager GUI." #: C/index.page8(info/title) msgctxt "text" msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: C/index.page21(page/title) msgid "" "GNOME Hello" " logoModem Manager GUI manual" msgstr "GNOME Hello logoModem Manager GUI manual" #: C/index.page23(page/p) msgid "" "Modem Manager GUI is a graphical frontend for the ModemManager " "daemon which is able to control specific modem functions." msgstr "Modem Manager GUI is a graphical frontend for the ModemManager daemon which is able to control specific modem functions." #: C/index.page27(page/p) msgid "You can use Modem Manager GUI for the following tasks:" msgstr "You can use Modem Manager GUI for the following tasks:" #: C/index.page32(item/p) msgid "Send and receive SMS messages with messages concatenation" msgstr "Send and receive SMS messages with messages concatenation" #: C/index.page35(item/p) msgid "Send USSD requests and receive answers in system encoding" msgstr "Send USSD requests and receive answers in system encoding" #: C/index.page38(item/p) msgid "" "Get modem and SIM information (device info, operator name, mode, IMEI, " "IMSI/ESN, Signal level)" msgstr "Get modem and SIM information (device info, operator name, mode, IMEI, IMSI/ESN, Signal level)" #: C/index.page42(item/p) msgid "Scan available mobile networks" msgstr "Scan available mobile networks" #: C/index.page45(item/p) msgid "" "Control data transmission process and set session traffic and time limits" msgstr "Control data transmission process and set session traffic and time limits" #: C/index.page50(section/title) msgid "Usage" msgstr "Usage" #: C/index.page54(section/title) msgid "Contribute to the project" msgstr "Contribute to the project" #: C/license.page8(info/desc) msgid "Legal information." msgstr "Legal information." #: C/license.page11(page/title) msgid "License" msgstr "License" #: C/license.page12(page/p) msgid "" "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0" " Unported license." msgstr "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0 Unported license." #: C/license.page20(page/p) msgid "You are free:" msgstr "You are free:" #: C/license.page25(item/title) msgid "To share" msgstr "To share" #: C/license.page26(item/p) msgid "To copy, distribute and transmit the work." msgstr "To copy, distribute and transmit the work." #: C/license.page29(item/title) msgid "To remix" msgstr "To remix" #: C/license.page30(item/p) msgid "To adapt the work." msgstr "To adapt the work." #: C/license.page33(page/p) msgid "Under the following conditions:" msgstr "Under the following conditions:" #: C/license.page38(item/title) msgid "Attribution" msgstr "Attribution" #: C/license.page39(item/p) msgid "" "You must attribute the work in the manner specified by the author or " "licensor (but not in any way that suggests that they endorse you or your use" " of the work)." msgstr "You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work)." #: C/license.page46(item/title) msgid "Share Alike" msgstr "Share Alike" #: C/license.page47(item/p) msgid "" "If you alter, transform, or build upon this work, you may distribute the " "resulting work only under the same, similar or a compatible license." msgstr "If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license." #: C/license.page53(page/p) msgid "" "For the full text of the license, see the CreativeCommons website, or read the full Commons Deed." msgstr "For the full text of the license, see the CreativeCommons website, or read the full Commons Deed." #: C/report-bugs.page9(info/desc) msgid "Report bugs and request new features." msgstr "Report bugs and request new features." #: C/report-bugs.page21(page/title) msgid "Report bugs" msgstr "Report bugs" #: C/report-bugs.page22(page/p) msgid "" "If you found a bug in Modem Manager GUI, you can use the Bug " "Tracker." msgstr "If you found a bug in Modem Manager GUI, you can use the Bug Tracker." #: C/report-bugs.page26(page/p) msgid "" "Before filing a new bug, please have a look at " " the existing ones first. Maybe someone else has already encountered " "the same problem? Then you might write your comments there." msgstr "Before filing a new bug, please have a look at the existing ones first. Maybe someone else has already encountered the same problem? Then you might write your comments there." #: C/report-bugs.page31(note/p) msgid "You can also use the Bug Tracker for feature requests." msgstr "You can also use the Bug Tracker for feature requests." #: C/usage-config.page9(info/desc) msgid "Configure the application to match your needs." msgstr "Configure the application to match your needs." #: C/usage-config.page21(page/title) msgid "Configuration" msgstr "Configuration" #: C/usage-contacts.page9(info/desc) msgid "Use your contact lists." msgstr "Use your contact lists." #: C/usage-contacts.page21(page/title) msgid "Contact lists" msgstr "Contact lists" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-getinfo.page30(media) msgctxt "_" msgid "" "external ref='figures/network-info.png' " "md5='9508df6dd96583049f837b018d8336cd'" msgstr "external ref='figures/network-info.png' md5='9508df6dd96583049f837b018d8336cd'" #: C/usage-getinfo.page9(info/desc) msgid "Get info about the mobile network." msgstr "Get info about the mobile network." #: C/usage-getinfo.page21(page/title) msgid "Network info" msgstr "Network info" #: C/usage-getinfo.page22(page/p) msgid "" "Your network operator provides some info which you can view in Modem " "Manager GUI. Click on the Info button in " "the toolbar." msgstr "Your network operator provides some info which you can view in Modem Manager GUI. Click on the Info button in the toolbar." #: C/usage-getinfo.page26(page/p) msgid "" "In the following window you see all available information as provided from " "your operator:" msgstr "In the following window you see all available information as provided from your operator:" #: C/usage-getinfo.page29(page/p) msgid "" " " "Network information window of Modem Manager GUI. " msgstr " Network information window of Modem Manager GUI. " #: C/usage-getinfo.page35(page/p) msgid "" "The most informations are self-explained and well known from traditional " "mobile phones or smartphones. Note, the GPS based location detection (in the" " lower part of the window) won't work in most cases because mobile broadband" " devices usually don't have a GPS sensor." msgstr "The most informations are self-explained and well known from traditional mobile phones or smartphones. Note, the GPS based location detection (in the lower part of the window) won't work in most cases because mobile broadband devices usually don't have a GPS sensor." #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-modem.page25(media) msgctxt "_" msgid "" "external ref='figures/startup-window.png' " "md5='fd641b4e39058e6594e9b0bc0c2c629d'" msgstr "external ref='figures/startup-window.png' md5='fd641b4e39058e6594e9b0bc0c2c629d'" #: C/usage-modem.page9(info/desc) msgid "Activate your modem devices." msgstr "Activate your modem devices." #: C/usage-modem.page21(page/title) msgid "Modems" msgstr "Modems" #: C/usage-modem.page22(page/p) msgid "" "After starting Modem Manager GUI, the following window will be " "displayed:" msgstr "After starting Modem Manager GUI, the following window will be displayed:" #: C/usage-modem.page24(page/p) msgid "" " " "The startup window of Modem Manager GUI. " msgstr " The startup window of Modem Manager GUI. " #: C/usage-modem.page30(page/p) msgid "" "You can see the modem devices available on your system. Click on one of the " "entries to use that device." msgstr "You can see the modem devices available on your system. Click on one of the entries to use that device." #: C/usage-modem.page33(page/p) msgid "" "After clicking on a device, it might be needed to activate it first, if it " "was not otherwise activated on your system. Modem Manager GUI " "will ask you for confirmation in that case." msgstr "After clicking on a device, it might be needed to activate it first, if it was not otherwise activated on your system. Modem Manager GUI will ask you for confirmation in that case." #: C/usage-modem.page37(page/p) msgid "" "Be patient after connecting a removable device such as an USB stick or " "PCMCIA card. It may take a while until the system detects it." msgstr "Be patient after connecting a removable device such as an USB stick or PCMCIA card. It may take a while until the system detects it." #: C/usage-modem.page41(note/p) msgid "" "You cannot use multiple modems at the same time. If you click on another " "entry in the device list, the previously activated one will be disabled." msgstr "You cannot use multiple modems at the same time. If you click on another entry in the device list, the previously activated one will be disabled." #: C/usage-netsearch.page9(info/desc) msgid "Search for available networks." msgstr "Search for available networks." #: C/usage-netsearch.page21(page/title) msgid "Network Search" msgstr "Network Search" #: C/usage-sms.page9(info/desc) msgid "Use Modem Manager GUI for sending and receiving SMS." msgstr "Use Modem Manager GUI for sending and receiving SMS." #: C/usage-sms.page21(page/title) msgid "SMS" msgstr "SMS" #: C/usage-traffic.page9(info/desc) msgid "Get statistics about network traffic." msgstr "Get statistics about network traffic." #: C/usage-traffic.page21(page/title) msgid "Network traffic" msgstr "Network traffic" #: C/usage-ussd.page9(info/desc) msgid "" "Use Modem Manager GUI for send USSD codes and receive the " "answers." msgstr "Use Modem Manager GUI for send USSD codes and receive the answers." #: C/usage-ussd.page21(page/title) msgid "USSD codes" msgstr "USSD codes" #: C/usage-ussd.page22(page/p) msgid "" "Modem Manager GUI is able to send USSD codes. These codes are " "controlling some network functions, for example the visibility of your phone" " number when sending a SMS." msgstr "Modem Manager GUI is able to send USSD codes. These codes are controlling some network functions, for example the visibility of your phone number when sending a SMS." #: C/usage-ussd.page25(page/p) msgid "" "To use the USSD functions, click on the USSD " "button in the toolbar." msgstr "To use the USSD functions, click on the USSD button in the toolbar." #: C/usage-ussd.page28(page/p) msgid "" "In the text entry on top of the window, the code *100# is already" " displayed. This code is the usual one for requesting the balance for a " "prepaid card. If you like to send another code, click on the Edit button on the right" msgstr "In the text entry on top of the window, the code *100# is already displayed. This code is the usual one for requesting the balance for a prepaid card. If you like to send another code, click on the Edit button on the right" #: C/usage-ussd.page33(note/p) msgid "" "USSD codes are only available in networks which use the 3GPP" " standards ." msgstr "USSD codes are only available in networks which use the 3GPP standards ." #: C/usage-ussd.page38(page/p) msgid "You can use such codes for many purposes." msgstr "You can use such codes for many purposes." #: C/usage-ussd.page4(C/usage-ussd.page/page) msgid "" "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" msgstr "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" modem-manager-gui-0.0.17.1/help/modem-manager-gui-help.pot0000644000175000017500000003407112377355036021612 0ustar alexalexmsgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2014-08-27 17:16+0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "" #: C/about.page:9(info/desc) msgid "Information about Modem Manager GUI." msgstr "" #: C/about.page:13(credit/name) #: C/contrib-code.page:13(credit/name) #: C/contrib-translations.page:13(credit/name) #: C/index.page:11(credit/name) #: C/report-bugs.page:13(credit/name) #: C/usage-config.page:13(credit/name) #: C/usage-contacts.page:13(credit/name) #: C/usage-getinfo.page:13(credit/name) #: C/usage-modem.page:13(credit/name) #: C/usage-netsearch.page:13(credit/name) #: C/usage-sms.page:13(credit/name) #: C/usage-traffic.page:13(credit/name) #: C/usage-ussd.page:13(credit/name) msgid "Mario Blättermann" msgstr "" #: C/about.page:17(license/p) #: C/contrib-code.page:17(license/p) #: C/contrib-translations.page:17(license/p) #: C/index.page:16(license/p) #: C/report-bugs.page:17(license/p) #: C/usage-config.page:17(license/p) #: C/usage-contacts.page:17(license/p) #: C/usage-getinfo.page:17(license/p) #: C/usage-modem.page:17(license/p) #: C/usage-netsearch.page:17(license/p) #: C/usage-sms.page:17(license/p) #: C/usage-traffic.page:17(license/p) #: C/usage-ussd.page:17(license/p) msgid "Creative Commons Share Alike 3.0" msgstr "" #: C/about.page:21(page/title) msgid "About Modem Manager GUI" msgstr "" #: C/about.page:23(page/p) msgid "Modem Manager GUI was written by Alex. To find more information about Modem Manager GUI, please visit the Modem Manager GUI Web page." msgstr "" #: C/about.page:29(page/p) msgid "To report a bug or make a suggestion regarding this application or this manual, follow the directions at the Modem Manager GUI bug tracker." msgstr "" #: C/about.page:35(page/p) msgid "This program is distributed under the terms of the GNU General Public license version 3, as published by the Free Software Foundation. A copy of this license can be found at this link, or in the file COPYING included with the source code of this program." msgstr "" #: C/contrib-code.page:9(info/desc) msgid "How you can help make Modem Manager GUI better." msgstr "" #: C/contrib-code.page:21(page/title) msgid "Provide code" msgstr "" #: C/contrib-code.page:22(page/p) msgid "Modem Manager GUI has a version control system at SourceForge.net. You can clone the repository with the following command:" msgstr "" #: C/contrib-code.page:25(page/p) msgid "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-manager-gui-code-0" msgstr "" #: C/contrib-code.page:27(page/p) msgid "Note, this clone command doesn't give you write access to the repository." msgstr "" #: C/contrib-translations.page:9(info/desc) msgid "Translate Modem Manager GUI into your native language." msgstr "" #: C/contrib-translations.page:21(page/title) msgid "Translations" msgstr "" #: C/contrib-translations.page:22(page/p) msgid "The graphical user interface, the traditional man page and the Gnome-style user manual of Modem Manager GUI can be translated into your language." msgstr "" #: C/contrib-translations.page:25(page/p) msgid "There is a project page on Transifex where existing translations are hosted and also new ones can be provided." msgstr "" #: C/contrib-translations.page:31(page/p) msgid "For general help on how Transifex works, see the Transifex Help Desk." msgstr "" #: C/contrib-translations.page:35(note/p) msgid "For your work you should have a look at the rules and dictionaries of the local Gnome translation teams . Although Modem Manager GUI shouldn't be considered as pure Gnome software, it will be often used in GTK based environments and should match the conceptual world of such applications." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page:7(media) msgctxt "_" msgid "external ref='figures/gnome-hello-logo.png' md5='__failed__'" msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page:21(media) msgctxt "_" msgid "external ref='figures/modem-manager-gui-logo.png' md5='a5ab22246356ef7c194bb09f1ec8e432'" msgstr "" #: C/index.page:6(info/desc) msgid "Help for Modem Manager GUI." msgstr "" #: C/index.page:8(info/title) msgctxt "text" msgid "Modem Manager GUI" msgstr "" #: C/index.page:21(page/title) msgid "GNOME Hello logoModem Manager GUI manual" msgstr "" #: C/index.page:23(page/p) msgid "Modem Manager GUI is a graphical frontend for the ModemManager daemon which is able to control specific modem functions." msgstr "" #: C/index.page:27(page/p) msgid "You can use Modem Manager GUI for the following tasks:" msgstr "" #: C/index.page:32(item/p) msgid "Send and receive SMS messages with messages concatenation" msgstr "" #: C/index.page:35(item/p) msgid "Send USSD requests and receive answers in system encoding" msgstr "" #: C/index.page:38(item/p) msgid "Get modem and SIM information (device info, operator name, mode, IMEI, IMSI/ESN, Signal level)" msgstr "" #: C/index.page:42(item/p) msgid "Scan available mobile networks" msgstr "" #: C/index.page:45(item/p) msgid "Control data transmission process and set session traffic and time limits" msgstr "" #: C/index.page:50(section/title) msgid "Usage" msgstr "" #: C/index.page:54(section/title) msgid "Contribute to the project" msgstr "" #: C/license.page:8(info/desc) msgid "Legal information." msgstr "" #: C/license.page:11(page/title) msgid "License" msgstr "" #: C/license.page:12(page/p) msgid "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0 Unported license." msgstr "" #: C/license.page:20(page/p) msgid "You are free:" msgstr "" #: C/license.page:25(item/title) msgid "To share" msgstr "" #: C/license.page:26(item/p) msgid "To copy, distribute and transmit the work." msgstr "" #: C/license.page:29(item/title) msgid "To remix" msgstr "" #: C/license.page:30(item/p) msgid "To adapt the work." msgstr "" #: C/license.page:33(page/p) msgid "Under the following conditions:" msgstr "" #: C/license.page:38(item/title) msgid "Attribution" msgstr "" #: C/license.page:39(item/p) msgid "You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work)." msgstr "" #: C/license.page:46(item/title) msgid "Share Alike" msgstr "" #: C/license.page:47(item/p) msgid "If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license." msgstr "" #: C/license.page:53(page/p) msgid "For the full text of the license, see the CreativeCommons website, or read the full Commons Deed." msgstr "" #: C/report-bugs.page:9(info/desc) msgid "Report bugs and request new features." msgstr "" #: C/report-bugs.page:21(page/title) msgid "Report bugs" msgstr "" #: C/report-bugs.page:22(page/p) msgid "If you found a bug in Modem Manager GUI, you can use the Bug Tracker." msgstr "" #: C/report-bugs.page:26(page/p) msgid "Before filing a new bug, please have a look at the existing ones first. Maybe someone else has already encountered the same problem? Then you might write your comments there." msgstr "" #: C/report-bugs.page:31(note/p) msgid "You can also use the Bug Tracker for feature requests." msgstr "" #: C/usage-config.page:9(info/desc) msgid "Configure the application to match your needs." msgstr "" #: C/usage-config.page:21(page/title) msgid "Configuration" msgstr "" #: C/usage-contacts.page:9(info/desc) msgid "Use your contact lists." msgstr "" #: C/usage-contacts.page:21(page/title) msgid "Contact lists" msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-getinfo.page:30(media) msgctxt "_" msgid "external ref='figures/network-info.png' md5='9508df6dd96583049f837b018d8336cd'" msgstr "" #: C/usage-getinfo.page:9(info/desc) msgid "Get info about the mobile network." msgstr "" #: C/usage-getinfo.page:21(page/title) msgid "Network info" msgstr "" #: C/usage-getinfo.page:22(page/p) msgid "Your network operator provides some info which you can view in Modem Manager GUI. Click on the Info button in the toolbar." msgstr "" #: C/usage-getinfo.page:26(page/p) msgid "In the following window you see all available information as provided from your operator:" msgstr "" #: C/usage-getinfo.page:29(page/p) msgid " Network information window of Modem Manager GUI. " msgstr "" #: C/usage-getinfo.page:35(page/p) msgid "The most informations are self-explained and well known from traditional mobile phones or smartphones. Note, the GPS based location detection (in the lower part of the window) won't work in most cases because mobile broadband devices usually don't have a GPS sensor." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-modem.page:25(media) msgctxt "_" msgid "external ref='figures/startup-window.png' md5='fd641b4e39058e6594e9b0bc0c2c629d'" msgstr "" #: C/usage-modem.page:9(info/desc) msgid "Activate your modem devices." msgstr "" #: C/usage-modem.page:21(page/title) msgid "Modems" msgstr "" #: C/usage-modem.page:22(page/p) msgid "After starting Modem Manager GUI, the following window will be displayed:" msgstr "" #: C/usage-modem.page:24(page/p) msgid " The startup window of Modem Manager GUI. " msgstr "" #: C/usage-modem.page:30(page/p) msgid "You can see the modem devices available on your system. Click on one of the entries to use that device." msgstr "" #: C/usage-modem.page:33(page/p) msgid "After clicking on a device, it might be needed to activate it first, if it was not otherwise activated on your system. Modem Manager GUI will ask you for confirmation in that case." msgstr "" #: C/usage-modem.page:37(page/p) msgid "Be patient after connecting a removable device such as an USB stick or PCMCIA card. It may take a while until the system detects it." msgstr "" #: C/usage-modem.page:41(note/p) msgid "You cannot use multiple modems at the same time. If you click on another entry in the device list, the previously activated one will be disabled." msgstr "" #: C/usage-netsearch.page:9(info/desc) msgid "Search for available networks." msgstr "" #: C/usage-netsearch.page:21(page/title) msgid "Network Search" msgstr "" #: C/usage-sms.page:9(info/desc) msgid "Use Modem Manager GUI for sending and receiving SMS." msgstr "" #: C/usage-sms.page:21(page/title) msgid "SMS" msgstr "" #: C/usage-traffic.page:9(info/desc) msgid "Get statistics about network traffic." msgstr "" #: C/usage-traffic.page:21(page/title) msgid "Network traffic" msgstr "" #: C/usage-ussd.page:9(info/desc) msgid "Use Modem Manager GUI for send USSD codes and receive the answers." msgstr "" #: C/usage-ussd.page:21(page/title) msgid "USSD codes" msgstr "" #: C/usage-ussd.page:22(page/p) msgid "Modem Manager GUI is able to send USSD codes. These codes are controlling some network functions, for example the visibility of your phone number when sending a SMS." msgstr "" #: C/usage-ussd.page:25(page/p) msgid "To use the USSD functions, click on the USSD button in the toolbar." msgstr "" #: C/usage-ussd.page:28(page/p) msgid "In the text entry on top of the window, the code *100# is already displayed. This code is the usual one for requesting the balance for a prepaid card. If you like to send another code, click on the Edit button on the right" msgstr "" #: C/usage-ussd.page:33(note/p) msgid "USSD codes are only available in networks which use the 3GPP standards ." msgstr "" #: C/usage-ussd.page:38(page/p) msgid "You can use such codes for many purposes." msgstr "" #: C/usage-ussd.page:4(C/usage-ussd.page/page) msgid "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" msgstr "" modem-manager-gui-0.0.17.1/help/de.po0000664000175000017500000004227312377603625015602 0ustar alexalex# # Translators: # Mario Blättermann , 2013-2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-08-27 17:16+0400\n" "PO-Revision-Date: 2014-08-27 17:14+0000\n" "Last-Translator: Alex \n" "Language-Team: German (http://www.transifex.com/projects/p/modem-manager-gui/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "Mario Blättermann , 2014" #: C/about.page9(info/desc) msgid "Information about Modem Manager GUI." msgstr "Informationen zu Modem Manager GUI." #: C/about.page13(credit/name) C/contrib-code.page13(credit/name) #: C/contrib-translations.page13(credit/name) C/index.page11(credit/name) #: C/report-bugs.page13(credit/name) C/usage-config.page13(credit/name) #: C/usage-contacts.page13(credit/name) C/usage-getinfo.page13(credit/name) #: C/usage-modem.page13(credit/name) C/usage-netsearch.page13(credit/name) #: C/usage-sms.page13(credit/name) C/usage-traffic.page13(credit/name) #: C/usage-ussd.page13(credit/name) msgid "Mario Blättermann" msgstr "Mario Blättermann" #: C/about.page17(license/p) C/contrib-code.page17(license/p) #: C/contrib-translations.page17(license/p) C/index.page16(license/p) #: C/report-bugs.page17(license/p) C/usage-config.page17(license/p) #: C/usage-contacts.page17(license/p) C/usage-getinfo.page17(license/p) #: C/usage-modem.page17(license/p) C/usage-netsearch.page17(license/p) #: C/usage-sms.page17(license/p) C/usage-traffic.page17(license/p) #: C/usage-ussd.page17(license/p) msgid "Creative Commons Share Alike 3.0" msgstr "Creative Commons Share Alike 3.0" #: C/about.page21(page/title) msgid "About Modem Manager GUI" msgstr "Info zu Modem Manager GUI" #: C/about.page23(page/p) msgid "" "Modem Manager GUI was written by Alex. To find more information " "about Modem Manager GUI, please visit the Modem Manager" " GUI Web page." msgstr "" #: C/about.page29(page/p) msgid "" "To report a bug or make a suggestion regarding this application or this " "manual, follow the directions at the Modem Manager GUI bug tracker." msgstr "" #: C/about.page35(page/p) msgid "" "This program is distributed under the terms of the GNU General Public " "license version 3, as published by the Free Software Foundation. A copy of " "this license can be found at this link, or in the file COPYING included with the source " "code of this program." msgstr "" #: C/contrib-code.page9(info/desc) msgid "How you can help make Modem Manager GUI better." msgstr "" #: C/contrib-code.page21(page/title) msgid "Provide code" msgstr "Code beisteuern" #: C/contrib-code.page22(page/p) msgid "" "Modem Manager GUI has a version control system at " "SourceForge.net. You can clone the repository with the following command:" msgstr "" #: C/contrib-code.page25(page/p) msgid "" "hg clone http://hg.code.sf.net/p/modem-manager-gui/code-0 modem-" "manager-gui-code-0" msgstr "" #: C/contrib-code.page27(page/p) msgid "" "Note, this clone command doesn't give you write access to the repository." msgstr "" #: C/contrib-translations.page9(info/desc) msgid "Translate Modem Manager GUI into your native language." msgstr "" #: C/contrib-translations.page21(page/title) msgid "Translations" msgstr "Übersetzungen" #: C/contrib-translations.page22(page/p) msgid "" "The graphical user interface, the traditional man page and the Gnome-style " "user manual of Modem Manager GUI can be translated into your " "language." msgstr "" #: C/contrib-translations.page25(page/p) msgid "" "There is a project page on Transifex where existing translations are " "hosted and also new ones can be provided." msgstr "" #: C/contrib-translations.page31(page/p) msgid "" "For general help on how Transifex works, see the Transifex Help Desk." msgstr "" #: C/contrib-translations.page35(note/p) msgid "" "For your work you should have a look at the rules and dictionaries of the " "local Gnome translation teams " ". Although Modem Manager GUI shouldn't be considered as " "pure Gnome software, it will be often used in GTK based environments and " "should match the conceptual world of such applications." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page7(media) msgctxt "_" msgid "external ref='figures/gnome-hello-logo.png' md5='__failed__'" msgstr "external ref='figures/gnome-hello-logo.png' md5='__failed__'" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/index.page21(media) msgctxt "_" msgid "" "external ref='figures/modem-manager-gui-logo.png' " "md5='a5ab22246356ef7c194bb09f1ec8e432'" msgstr "" #: C/index.page6(info/desc) msgid "Help for Modem Manager GUI." msgstr "Hilfe zu Modem Manager GUI." #: C/index.page8(info/title) msgctxt "text" msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: C/index.page21(page/title) msgid "" "GNOME Hello" " logoModem Manager GUI manual" msgstr "" #: C/index.page23(page/p) msgid "" "Modem Manager GUI is a graphical frontend for the ModemManager " "daemon which is able to control specific modem functions." msgstr "" #: C/index.page27(page/p) msgid "You can use Modem Manager GUI for the following tasks:" msgstr "" #: C/index.page32(item/p) msgid "Send and receive SMS messages with messages concatenation" msgstr "SMS-Nachrichten senden und empfangen und diese verketten" #: C/index.page35(item/p) msgid "Send USSD requests and receive answers in system encoding" msgstr "" #: C/index.page38(item/p) msgid "" "Get modem and SIM information (device info, operator name, mode, IMEI, " "IMSI/ESN, Signal level)" msgstr "" #: C/index.page42(item/p) msgid "Scan available mobile networks" msgstr "Verfügbare Mobilfunknetze suchen" #: C/index.page45(item/p) msgid "" "Control data transmission process and set session traffic and time limits" msgstr "" #: C/index.page50(section/title) msgid "Usage" msgstr "Benutzung" #: C/index.page54(section/title) msgid "Contribute to the project" msgstr "Beiträge zum Projekt" #: C/license.page8(info/desc) msgid "Legal information." msgstr "Rechtliche Hinweise." #: C/license.page11(page/title) msgid "License" msgstr "Lizenz" #: C/license.page12(page/p) msgid "" "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0" " Unported license." msgstr "Dieses Werk wird unter einer »CreativeCommons Attribution-Share Alike 3.0 Unported license« verbreitet." #: C/license.page20(page/p) msgid "You are free:" msgstr "Es ist Ihnen gestattet:" #: C/license.page25(item/title) msgid "To share" msgstr "Freizugeben" #: C/license.page26(item/p) msgid "To copy, distribute and transmit the work." msgstr "Das Werk bzw. den Inhalt vervielfältigen, verbreiten und öffentlich zugänglich machen." #: C/license.page29(item/title) msgid "To remix" msgstr "Änderungen vorzunehmen" #: C/license.page30(item/p) msgid "To adapt the work." msgstr "Abwandlungen und Bearbeitungen des Werkes bzw. Inhaltes anzufertigen." #: C/license.page33(page/p) msgid "Under the following conditions:" msgstr "Unter den folgenden Bedingungen:" #: C/license.page38(item/title) msgid "Attribution" msgstr "Weitergabe" #: C/license.page39(item/p) msgid "" "You must attribute the work in the manner specified by the author or " "licensor (but not in any way that suggests that they endorse you or your use" " of the work)." msgstr "Sie dürfen das Werk nur unter gleichen Bedingungen weitergeben, wie Sie vom Autor oder Lizenzgeber festgelegt wurden (aber nicht so, dass es wie Ihr Werk aussieht)." #: C/license.page46(item/title) msgid "Share Alike" msgstr "Share Alike" #: C/license.page47(item/p) msgid "" "If you alter, transform, or build upon this work, you may distribute the " "resulting work only under the same, similar or a compatible license." msgstr "Wenn Sie das lizenzierte Werk bzw. den lizenzierten Inhalt bearbeiten, abwandeln oder in anderer Weise erkennbar als Grundlage für eigenes Schaffen verwenden, dürfen Sie die daraufhin neu entstandenen Werke bzw. Inhalte nur unter Verwendung von Lizenzbedingungen weitergeben, die mit denen dieses Lizenzvertrages identisch, vergleichbar oder kompatibel sind." #: C/license.page53(page/p) msgid "" "For the full text of the license, see the CreativeCommons website, or read the full Commons Deed." msgstr "Den vollständigen Text der Lizenz finden sie auf der CreativeCommons-Webseite. Oder Sie können den vollständigen Commons Deed lesen." #: C/report-bugs.page9(info/desc) msgid "Report bugs and request new features." msgstr "" #: C/report-bugs.page21(page/title) msgid "Report bugs" msgstr "Fehler melden" #: C/report-bugs.page22(page/p) msgid "" "If you found a bug in Modem Manager GUI, you can use the Bug " "Tracker." msgstr "" #: C/report-bugs.page26(page/p) msgid "" "Before filing a new bug, please have a look at " " the existing ones first. Maybe someone else has already encountered " "the same problem? Then you might write your comments there." msgstr "" #: C/report-bugs.page31(note/p) msgid "You can also use the Bug Tracker for feature requests." msgstr "Sie können das Fehlererfassungssystem auch für Anfragen nach neuen Funktionen verwenden." #: C/usage-config.page9(info/desc) msgid "Configure the application to match your needs." msgstr "Anpassung dieser Anwendung an Ihre Wünsche und Erfordernisse." #: C/usage-config.page21(page/title) msgid "Configuration" msgstr "Konfiguration" #: C/usage-contacts.page9(info/desc) msgid "Use your contact lists." msgstr "Ihre Kontaktlisten verwenden." #: C/usage-contacts.page21(page/title) msgid "Contact lists" msgstr "Kontaktlisten" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-getinfo.page30(media) msgctxt "_" msgid "" "external ref='figures/network-info.png' " "md5='9508df6dd96583049f837b018d8336cd'" msgstr "" #: C/usage-getinfo.page9(info/desc) msgid "Get info about the mobile network." msgstr "Informationen zum Mobilfunknetzwerk abrufen." #: C/usage-getinfo.page21(page/title) msgid "Network info" msgstr "Netzwerk-Info" #: C/usage-getinfo.page22(page/p) msgid "" "Your network operator provides some info which you can view in Modem " "Manager GUI. Click on the Info button in " "the toolbar." msgstr "Ihr Netzanbieter stellt einige Informationen bereit, die Sie in Modem Manager GUI betrachten können. Klicken Sie auf den Info-Knopf in der Werkzeugleiste." #: C/usage-getinfo.page26(page/p) msgid "" "In the following window you see all available information as provided from " "your operator:" msgstr "Im folgenden Fenster sehen Sie alle Informationen, so wie sie von Ihrem Netzanbieter bereitgestellt werden:" #: C/usage-getinfo.page29(page/p) msgid "" " " "Network information window of Modem Manager GUI. " msgstr "" #: C/usage-getinfo.page35(page/p) msgid "" "The most informations are self-explained and well known from traditional " "mobile phones or smartphones. Note, the GPS based location detection (in the" " lower part of the window) won't work in most cases because mobile broadband" " devices usually don't have a GPS sensor." msgstr "" #. This is a reference to an external file such as an image or video. When #. the file changes, the md5 hash will change to let you know you need to #. update your localized copy. The msgstr is not used at all. Set it to #. whatever you like once you have updated your copy of the file. #: C/usage-modem.page25(media) msgctxt "_" msgid "" "external ref='figures/startup-window.png' " "md5='fd641b4e39058e6594e9b0bc0c2c629d'" msgstr "" #: C/usage-modem.page9(info/desc) msgid "Activate your modem devices." msgstr "Aktivieren Ihrer Modem-Geräte." #: C/usage-modem.page21(page/title) msgid "Modems" msgstr "Modems" #: C/usage-modem.page22(page/p) msgid "" "After starting Modem Manager GUI, the following window will be " "displayed:" msgstr "Nach dem Start von Modem Manager GUI wird das folgende Fenster angezeigt:" #: C/usage-modem.page24(page/p) msgid "" " " "The startup window of Modem Manager GUI. " msgstr "" #: C/usage-modem.page30(page/p) msgid "" "You can see the modem devices available on your system. Click on one of the " "entries to use that device." msgstr "Sie können die Modems sehen, die in Ihrem System verfügbar sind. Klicken Sie auf einen der Einträge, um dieses Gerät zu verwenden." #: C/usage-modem.page33(page/p) msgid "" "After clicking on a device, it might be needed to activate it first, if it " "was not otherwise activated on your system. Modem Manager GUI " "will ask you for confirmation in that case." msgstr "" #: C/usage-modem.page37(page/p) msgid "" "Be patient after connecting a removable device such as an USB stick or " "PCMCIA card. It may take a while until the system detects it." msgstr "" #: C/usage-modem.page41(note/p) msgid "" "You cannot use multiple modems at the same time. If you click on another " "entry in the device list, the previously activated one will be disabled." msgstr "" #: C/usage-netsearch.page9(info/desc) msgid "Search for available networks." msgstr "Nach verfügbaren Mobilfunknetzwerken suchen." #: C/usage-netsearch.page21(page/title) msgid "Network Search" msgstr "Netzwerksuche" #: C/usage-sms.page9(info/desc) msgid "Use Modem Manager GUI for sending and receiving SMS." msgstr "Modem Manager GUI zum Senden und Empfangen von SMS verwenden." #: C/usage-sms.page21(page/title) msgid "SMS" msgstr "SMS" #: C/usage-traffic.page9(info/desc) msgid "Get statistics about network traffic." msgstr "Statistiken zum Netzwerkverkehr abrufen." #: C/usage-traffic.page21(page/title) msgid "Network traffic" msgstr "Netzwerkverkehr" #: C/usage-ussd.page9(info/desc) msgid "" "Use Modem Manager GUI for send USSD codes and receive the " "answers." msgstr "" #: C/usage-ussd.page21(page/title) msgid "USSD codes" msgstr "USSD-Codes" #: C/usage-ussd.page22(page/p) msgid "" "Modem Manager GUI is able to send USSD codes. These codes are " "controlling some network functions, for example the visibility of your phone" " number when sending a SMS." msgstr "" #: C/usage-ussd.page25(page/p) msgid "" "To use the USSD functions, click on the USSD " "button in the toolbar." msgstr "" #: C/usage-ussd.page28(page/p) msgid "" "In the text entry on top of the window, the code *100# is already" " displayed. This code is the usual one for requesting the balance for a " "prepaid card. If you like to send another code, click on the Edit button on the right" msgstr "" #: C/usage-ussd.page33(note/p) msgid "" "USSD codes are only available in networks which use the 3GPP" " standards ." msgstr "" #: C/usage-ussd.page38(page/p) msgid "You can use such codes for many purposes." msgstr "Sie können solche Codes zu vielerlei Zwecken verwenden." #: C/usage-ussd.page4(C/usage-ussd.page/page) msgid "" "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" msgstr "<_:info-1/> <_:title-2/> <_:p-3/> <_:p-4/> <_:p-5/>. <_:note-6/> <_:p-7/>" modem-manager-gui-0.0.17.1/src/main.c0000644000175000017500000035361712401162661015572 0ustar alexalex/* * main.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifdef __GLIBC__ #include #define __USE_GNU #include #include #endif #include #include #include #include #include #include #include "settings.h" #include "ussdlist.h" #include "encoding.h" #include "libpaths.h" #include "notifications.h" #include "addressbooks.h" #include "ayatana.h" #include "strformat.h" #include "mmguicore.h" #include "smsdb.h" #include "trafficdb.h" #include "netlink.h" #include "resources.h" #include "contacts-page.h" #include "traffic-page.h" #include "scan-page.h" #include "info-page.h" #include "ussd-page.h" #include "sms-page.h" #include "devices-page.h" #include "main.h" #define MMGUI_MAIN_DEFAULT_RX_GRAPH_RGBA_COLOR "rgba(7,139,45,1.0)" #define MMGUI_MAIN_DEFAULT_TX_GRAPH_RGBA_COLOR "rgba(153,17,77,1.0)" #define MMGUI_MAIN_DEFAULT_RX_GRAPH_RGB_COLOR "#078b2d" #define MMGUI_MAIN_DEFAULT_TX_GRAPH_RGB_COLOR "#99114d" enum _mmgui_main_control_shortcuts { MMGUI_MAIN_CONTROL_SHORTCUT_SMS_NEW = 0, MMGUI_MAIN_CONTROL_SHORTCUT_SMS_REMOVE, MMGUI_MAIN_CONTROL_SHORTCUT_SMS_ANSWER, MMGUI_MAIN_CONTROL_SHORTCUT_USSD_EDITOR, MMGUI_MAIN_CONTROL_SHORTCUT_USSD_SEND, MMGUI_MAIN_CONTROL_SHORTCUT_SCAN_START, MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_LIMIT, MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_CONNECTIONS, MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_STATS, MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_NEW, MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_REMOVE, MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_SMS, MMGUI_MAIN_CONTROL_SHORTCUT_NUMBER }; /*Exit dialog response codes*/ enum _mmgui_main_exit_dialog_result { MMGUI_MAIN_EXIT_DIALOG_CANCEL = -1, MMGUI_MAIN_EXIT_DIALOG_EXIT = 0, MMGUI_MAIN_EXIT_DIALOG_HIDE = 1 }; /*Start dialog combo boxes models*/ enum _mmgui_main_service_list { MMGUI_SERVICE_LIST_NAME = 0, MMGUI_SERVICE_LIST_MODULE, MMGUI_SERVICE_LIST_AVAILABLE, MMGUI_SERVICE_LIST_COLUMNS }; /*Widget list used during UI creation process*/ struct _mmgui_main_widgetset { gchar *name; GtkWidget **widget; }; /*Pixbuf list used during UI creation process*/ struct _mmgui_main_pixbufset { gchar *name; GdkPixbuf **pixbuf; }; /*Closure list used during UI creation process*/ struct _mmgui_main_closureset { guint identifier; GClosure **closure; }; /*EVENTS*/ static void mmgui_main_event_callback(enum _mmgui_event event, gpointer mmguicore, gpointer data, gpointer userdata); static gboolean mmgui_main_handle_extend_capabilities(mmgui_application_t mmguiapp, gint id); /*UI*/ static gboolean mmgui_main_ui_progress_dialog_update_progress(gpointer data); static void mmgui_main_ui_page_control_disable(mmgui_application_t mmguiapp, guint page, gboolean disable, gboolean onlylimited); //static void mmgui_main_ui_page_select_by_accelerator_signal(gpointer data); static void mmgui_main_ui_page_setup_shortcuts(mmgui_application_t mmguiapp, guint setpage); static void mmgui_main_ui_page_use_shortcuts_signal(gpointer data); static void mmgui_main_ui_open_page(mmgui_application_t mmguiapp, guint page); static void mmgui_main_ui_application_menu_set_page(mmgui_application_t mmguiapp, guint page); static void mmgui_main_ui_application_menu_set_state(mmgui_application_t mmguiapp, gboolean enabled); static enum _mmgui_main_exit_dialog_result mmgui_main_ui_window_hide_dialog(mmgui_application_t mmguiapp); static void mmgui_main_ui_window_save_geometry(mmgui_application_t mmguiapp); static void mmgui_main_ui_exit_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data); static void mmgui_main_ui_help_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data); static void mmgui_main_ui_about_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data); static void mmgui_main_ui_section_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data); static void mmgui_main_ui_preferences_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data); static void mmgui_main_tray_icon_activation_signal(GtkStatusIcon *status_icon, gpointer data); /*Tray*/ static void mmgui_main_tray_icon_window_show_signal(GtkCheckMenuItem *checkmenuitem, gpointer data); static void mmgui_main_tray_icon_new_sms_signal(GtkMenuItem *menuitem, gpointer data); static void mmgui_main_tray_icon_exit_signal(GtkMenuItem *menuitem, gpointer data); static void mmgui_main_tray_popup_menu_show_signal(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer data); static gboolean mmgui_main_tray_tooltip_show_signal(GtkStatusIcon *status_icon, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer data); static void mmgui_main_tray_icon_init(mmgui_application_t mmguiapp); /*Ayatana*/ static void mmgui_main_ayatana_event_callback(enum _mmgui_ayatana_event event, gpointer ayatana, gpointer data, gpointer userdata); /*Initialization*/ static void mmgui_main_application_unresolved_error(mmgui_application_t mmguiapp, gchar *caption, gchar *text); static void mmgui_main_ui_modules_combo_set_sensitive(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data); static void mmgui_modules_combo_fill(GtkComboBox *combo, GSList *modules, gint type, mmguimodule_t currentmodule); static void mmgui_main_ui_start_dialog(mmgui_application_t mmguiapp); static gboolean mmgui_main_settings_ui_load(mmgui_application_t mmguiapp); static gboolean mmgui_main_settings_load(mmgui_application_t mmguiapp); static gboolean mmgui_main_application_is_in_autostart(mmgui_application_t mmguiapp); static gboolean mmgui_main_application_add_to_autostart(mmgui_application_t mmguiapp); static gboolean mmgui_main_application_remove_from_autostart(mmgui_application_t mmguiapp); static gboolean mmgui_main_application_build_user_interface(mmgui_application_t mmguiapp); static void mmgui_main_application_terminate(mmgui_application_t mmguiapp); static void mmgui_main_application_startup_signal(GtkApplication *application, gpointer data); static void mmgui_main_application_activate_signal(GtkApplication *application, gpointer data); static void mmgui_main_application_shutdown_signal(GtkApplication *application, gpointer data); static void mmgui_main_modules_list(void); #ifdef __GLIBC__ static void mmgui_main_application_backtrace_signal_handler(int sig, siginfo_t *info, ucontext_t *ucontext); #endif static void mmgui_main_application_termination_signal_handler(int sig, siginfo_t *info, ucontext_t *ucontext); //EVENTS static void mmgui_main_event_callback(enum _mmgui_event event, gpointer mmguicore, gpointer data, gpointer userdata) { mmguidevice_t device; mmgui_application_t mmguiapp; mmgui_application_data_t appdata; guint id; mmguiapp = (mmgui_application_t)userdata; switch (event) { case MMGUI_EVENT_DEVICE_ADDED: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = data; g_idle_add(mmgui_main_device_handle_added_from_thread, appdata); break; case MMGUI_EVENT_DEVICE_REMOVED: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = data; g_idle_add(mmgui_main_device_handle_removed_from_thread, appdata); break; case MMGUI_EVENT_DEVICE_OPENED: mmguiapp->modemsettings = mmgui_modem_settings_open(mmguiapp->core->device->persistentid); /*SMS*/ mmgui_main_sms_list_clear(mmguiapp); mmgui_main_sms_list_fill(mmguiapp); mmgui_main_sms_restore_settings_for_modem(mmguiapp); /*USSD*/ mmgui_main_ussd_state_clear(mmguiapp); mmgui_main_ussd_restore_settings_for_modem(mmguiapp); /*Info*/ mmgui_main_info_state_clear(mmguiapp); mmgui_main_info_update_for_modem(mmguiapp); /*Scan*/ mmgui_main_scan_state_clear(mmguiapp); /*Traffic*/ mmgui_main_traffic_restore_settings_for_modem(mmguiapp); /*Contacts*/ mmgui_main_contacts_state_clear(mmguiapp); mmgui_main_contacts_list_fill(mmguiapp); /*Show network name*/ g_idle_add(mmgui_main_ui_update_statusbar_from_thread, mmguiapp); break; case MMGUI_EVENT_DEVICE_CLOSING: mmgui_modem_settings_close(mmguiapp->modemsettings); break; case MMGUI_EVENT_DEVICE_ENABLED_STATUS: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = data; g_idle_add(mmgui_main_device_handle_enabled_status_from_thread, appdata); break; case MMGUI_EVENT_DEVICE_BLOCKED_STATUS: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = data; g_idle_add(mmgui_main_device_handle_blocked_status_from_thread, appdata); break; case MMGUI_EVENT_DEVICE_CONNECTION_STATUS: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = data; g_idle_add(mmgui_main_device_handle_connection_status_from_thread, appdata); break; case MMGUI_EVENT_SIGNAL_LEVEL_CHANGE: device = (mmguidevice_t)data; mmgui_main_info_handle_signal_level_change(mmguiapp, device); /*Update level bars*/ g_idle_add(mmgui_main_ui_update_statusbar_from_thread, mmguiapp); break; case MMGUI_EVENT_NETWORK_MODE_CHANGE: device = (mmguidevice_t)data; mmgui_main_info_handle_network_mode_change(mmguiapp, device); break; case MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE: device = (mmguidevice_t)data; mmgui_main_info_handle_network_registration_change(mmguiapp, device); /*Show new network name*/ g_idle_add(mmgui_main_ui_update_statusbar_from_thread, mmguiapp); break; case MMGUI_EVENT_LOCATION_CHANGE: device = (mmguidevice_t)data; mmgui_main_info_handle_location_change(mmguiapp, device); break; case MMGUI_EVENT_MODEM_ENABLE_RESULT: id = GPOINTER_TO_UINT(data); mmgui_main_device_handle_enabled_local_status(mmguiapp, (gboolean)id); break; case MMGUI_EVENT_SCAN_RESULT: //Show found networks mmgui_main_scan_list_fill(mmguiapp, (mmguicore_t)mmguicore, (GSList *)data); //Hide progress dialog mmgui_main_ui_progress_dialog_close(mmguiapp); break; case MMGUI_EVENT_USSD_RESULT: //Show answer mmgui_main_ussd_request_send_end(mmguiapp, (mmguicore_t)mmguicore, (const gchar *)data); //Hide progress dialog mmgui_main_ui_progress_dialog_close(mmguiapp); break; case MMGUI_EVENT_SMS_COMPLETED: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = data; g_idle_add(mmgui_main_sms_get_message_from_thread, appdata); break; case MMGUI_EVENT_SMS_LIST_READY: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = data; g_idle_add(mmgui_main_sms_get_message_list_from_thread, appdata); break; case MMGUI_EVENT_SMS_SENT: mmgui_main_ui_progress_dialog_close(mmguiapp); if (!GPOINTER_TO_UINT(data)) { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error sending message"), mmguicore_get_last_error(mmguiapp->core)); } break; case MMGUI_EVENT_SMS_NEW_DAY: g_idle_add(mmgui_main_sms_handle_new_day_from_thread, mmguiapp); break; case MMGUI_EVENT_NET_STATUS: g_idle_add(mmgui_main_ui_update_statusbar_from_thread, mmguiapp); g_idle_add(mmgui_main_traffic_stats_update_from_thread, mmguiapp); if (gtk_widget_get_visible(mmguiapp->window->trafficstatsdialog)) { g_idle_add(mmgui_main_traffic_stats_history_update_from_thread, mmguiapp); } break; case MMGUI_EVENT_TRAFFIC_LIMIT: case MMGUI_EVENT_TIME_LIMIT: appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = GINT_TO_POINTER(event); g_idle_add(mmgui_main_traffic_limits_show_message_from_thread, appdata); break; case MMGUI_EVENT_UPDATE_CONNECTIONS_LIST: g_idle_add(mmgui_main_traffic_connections_update_from_thread, mmguiapp); break; case MMGUI_EVENT_EXTEND_CAPABILITIES: id = GPOINTER_TO_INT(data); mmgui_main_handle_extend_capabilities(mmguiapp, id); break; default: g_debug("Unknown event (%u) got from core\n", event); break; } } static gboolean mmgui_main_handle_extend_capabilities(mmgui_application_t mmguiapp, gint id) { if (mmguiapp == NULL) return FALSE; switch (id) { case MMGUI_CAPS_SMS: break; case MMGUI_CAPS_USSD: break; case MMGUI_CAPS_LOCATION: break; case MMGUI_CAPS_SCAN: break; case MMGUI_CAPS_CONTACTS: mmgui_main_contacts_list_fill(mmguiapp); mmgui_main_sms_restore_contacts_for_modem(mmguiapp); break; case MMGUI_CAPS_NONE: default: break; } return TRUE; } //UI gboolean mmgui_main_ui_question_dialog_open(mmgui_application_t mmguiapp, gchar *caption, gchar *text) { gint response; if ((mmguiapp == NULL) || (caption == NULL) || (text == NULL)) return FALSE; gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(mmguiapp->window->questiondialog), caption); gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(mmguiapp->window->questiondialog), "%s", text); response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->questiondialog)); gtk_widget_hide(mmguiapp->window->questiondialog); return (response == GTK_RESPONSE_YES); } gboolean mmgui_main_ui_error_dialog_open(mmgui_application_t mmguiapp, gchar *caption, gchar *text) { gint response; if ((mmguiapp == NULL) || (caption == NULL) || (text == NULL)) return FALSE; gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(mmguiapp->window->errordialog), caption); gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(mmguiapp->window->errordialog), "%s", text); response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->errordialog)); gtk_widget_hide(mmguiapp->window->errordialog); return (response == GTK_RESPONSE_CLOSE); } static gboolean mmgui_main_ui_progress_dialog_update_progress(gpointer data) { mmgui_application_data_t appdata; time_t currenttime; appdata = (mmgui_application_data_t)data; if (appdata == NULL) return TRUE; currenttime = time(NULL); if (abs((gint)difftime(*((time_t *)appdata->data), currenttime)) > MMGUI_MAIN_OPERATION_TIMEOUT) { if (mmguicore_interrupt_operation(appdata->mmguiapp->core)) { mmgui_main_ui_progress_dialog_close(appdata->mmguiapp); mmgui_main_ui_error_dialog_open(appdata->mmguiapp, _("Operation timed out"), _("Operation took too long to execute. Please restart it.")); return FALSE; } } gtk_progress_bar_pulse((GtkProgressBar *)appdata->mmguiapp->window->progressbar); return TRUE; } void mmgui_main_ui_progress_dialog_open(mmgui_application_t mmguiapp) { static struct _mmgui_application_data appdata; static time_t starttime; if (mmguiapp == NULL) return; starttime = time(NULL); appdata.mmguiapp = mmguiapp; appdata.data = &starttime; mmguiapp->window->progresstimeout = g_timeout_add(100, mmgui_main_ui_progress_dialog_update_progress, &appdata); gtk_dialog_run(GTK_DIALOG(mmguiapp->window->progressdialog)); } void mmgui_main_ui_progress_dialog_close(mmgui_application_t mmguiapp) { if (mmguiapp == NULL) return; if (mmguiapp->window->progresstimeout > 0) { g_source_remove(mmguiapp->window->progresstimeout); mmguiapp->window->progresstimeout = 0; } gtk_widget_hide(mmguiapp->window->progressdialog); } static void mmgui_main_ui_page_control_disable(mmgui_application_t mmguiapp, guint page, gboolean disable, gboolean onlylimited) { if ((mmguiapp == NULL) || (page > MMGUI_MAIN_PAGE_CONTACTS)) return; switch (page) { case MMGUI_MAIN_PAGE_DEVICES: break; case MMGUI_MAIN_PAGE_SMS: gtk_widget_set_sensitive(mmguiapp->window->newsmsbutton, !disable); break; case MMGUI_MAIN_PAGE_USSD: gtk_widget_set_sensitive(mmguiapp->window->ussdentry, !disable); gtk_widget_set_sensitive(mmguiapp->window->ussdcombobox, !disable); gtk_widget_set_sensitive(mmguiapp->window->ussdeditor, !disable); gtk_widget_set_sensitive(mmguiapp->window->ussdsend, !disable); if (!disable) { g_signal_emit_by_name(G_OBJECT(mmguiapp->window->ussdentry), "changed", mmguiapp); } break; case MMGUI_MAIN_PAGE_INFO: break; case MMGUI_MAIN_PAGE_SCAN: gtk_widget_set_sensitive(mmguiapp->window->startscanbutton, !disable); break; case MMGUI_MAIN_PAGE_TRAFFIC: break; case MMGUI_MAIN_PAGE_CONTACTS: gtk_widget_set_sensitive(mmguiapp->window->newcontactbutton, !disable); break; default: break; } } static void mmgui_main_ui_page_setup_shortcuts(mmgui_application_t mmguiapp, guint setpage) { GSList *iterator; GClosure *closure; if (mmguiapp == NULL) return; if (mmguiapp->window->pageshortcuts != NULL) { for (iterator=mmguiapp->window->pageshortcuts; iterator; iterator=iterator->next) { closure = (GClosure *)iterator->data; if (closure != NULL) { g_closure_ref(closure); gtk_accel_group_disconnect(mmguiapp->window->accelgroup, closure); } } g_slist_free(mmguiapp->window->pageshortcuts); mmguiapp->window->pageshortcuts = NULL; } switch (setpage) { case MMGUI_MAIN_PAGE_DEVICES: break; case MMGUI_MAIN_PAGE_SMS: /*send sms message*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_N, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->newsmsclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->newsmsclosure); /*remove sms message*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_D, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->removesmsclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->removesmsclosure); /*answer sms message*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_A, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->answersmsclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->answersmsclosure); break; case MMGUI_MAIN_PAGE_USSD: /*edit ussd commands*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_E, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->ussdeditorclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->ussdeditorclosure); /*send ussd request*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_S, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->ussdsendclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->ussdsendclosure); break; case MMGUI_MAIN_PAGE_INFO: break; case MMGUI_MAIN_PAGE_SCAN: /*scan networks*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_S, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->startscanclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->startscanclosure); break; case MMGUI_MAIN_PAGE_TRAFFIC: /*limits*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_L, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->trafficlimitclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->trafficlimitclosure); /*connections*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_C, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->trafficconnclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->trafficconnclosure); /*statistics*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_S, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->trafficstatsclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->trafficstatsclosure); break; case MMGUI_MAIN_PAGE_CONTACTS: /*add contact*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_N, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->newcontactclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->newcontactclosure); /*remove contact*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_D, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->removecontactclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->removecontactclosure); /*send sms*/ gtk_accel_group_connect(mmguiapp->window->accelgroup, GDK_KEY_S, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE, mmguiapp->window->smstocontactclosure); mmguiapp->window->pageshortcuts = g_slist_prepend(mmguiapp->window->pageshortcuts, mmguiapp->window->smstocontactclosure); break; default: break; } } static void mmgui_main_ui_page_use_shortcuts_signal(gpointer data) { mmgui_application_data_t appdata; guint shortcut, operation, setpage, pagecaps, suppcaps; gboolean enabled, blocked, connected; appdata = (mmgui_application_data_t)data; if (appdata == NULL) return; shortcut = GPOINTER_TO_UINT(appdata->data); operation = mmguicore_devices_get_current_operation(appdata->mmguiapp->core); blocked = mmguicore_devices_get_locked(appdata->mmguiapp->core); enabled = mmguicore_devices_get_enabled(appdata->mmguiapp->core); connected = mmguicore_devices_get_connected(appdata->mmguiapp->core); setpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(appdata->mmguiapp->window->notebook)); switch (setpage) { case MMGUI_MAIN_PAGE_DEVICES: break; case MMGUI_MAIN_PAGE_SMS: if ((enabled) && (!blocked)) { pagecaps = mmguicore_sms_get_capabilities(appdata->mmguiapp->core); /*send sms message*/ if ((pagecaps & MMGUI_SMS_CAPS_SEND) && (operation == MMGUI_DEVICE_OPERATION_IDLE)) { if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_SMS_NEW) { mmgui_main_sms_new(appdata->mmguiapp); } /*answer sms message*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_SMS_ANSWER) { mmgui_main_sms_answer(appdata->mmguiapp); } } /*remove sms message*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_SMS_REMOVE) { mmgui_main_sms_remove(appdata->mmguiapp); } } break; case MMGUI_MAIN_PAGE_USSD: if ((enabled) && (!blocked)) { pagecaps = mmguicore_ussd_get_capabilities(appdata->mmguiapp->core); if ((pagecaps & MMGUI_USSD_CAPS_SEND) && (operation == MMGUI_DEVICE_OPERATION_IDLE)) { /*send ussd request*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_USSD_SEND) { mmgui_main_ussd_request_send(appdata->mmguiapp); } /*edit ussd commands*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_USSD_EDITOR) { mmgui_main_ussd_edit(appdata->mmguiapp); } } } break; case MMGUI_MAIN_PAGE_INFO: break; case MMGUI_MAIN_PAGE_SCAN: if ((enabled) && (!blocked)) { pagecaps = mmguicore_newtworks_scan_get_capabilities(appdata->mmguiapp->core); if ((pagecaps & MMGUI_SCAN_CAPS_OBSERVE) && (operation == MMGUI_DEVICE_OPERATION_IDLE) && (!connected)) { /*scan networks*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_SCAN_START) { mmgui_main_scan_start(appdata->mmguiapp); } } } break; case MMGUI_MAIN_PAGE_TRAFFIC: /*limits*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_LIMIT) { mmgui_main_traffic_limits_dialog(appdata->mmguiapp); } /*connections*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_CONNECTIONS) { mmgui_main_traffic_connections_dialog(appdata->mmguiapp); } /*statistics*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_STATS) { mmgui_main_traffic_statistics_dialog(appdata->mmguiapp); } break; case MMGUI_MAIN_PAGE_CONTACTS: if ((enabled) && (!blocked)) { pagecaps = mmguicore_contacts_get_capabilities(appdata->mmguiapp->core); suppcaps = mmguicore_sms_get_capabilities(appdata->mmguiapp->core); if (pagecaps & MMGUI_CONTACTS_CAPS_EDIT) { /*add contact*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_NEW) { mmgui_main_contacts_new(appdata->mmguiapp); } /*remove contact*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_REMOVE) { mmgui_main_contacts_remove(appdata->mmguiapp); } } if (suppcaps & MMGUI_SMS_CAPS_SEND) { /*send sms*/ if (shortcut == MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_SMS) { mmgui_main_contacts_sms(appdata->mmguiapp); } } } break; default: break; } } gboolean mmgui_main_ui_test_device_state(mmgui_application_t mmguiapp, guint setpage) { gboolean trytoenable, nonfunctional, limfunctional, needreg, enabled, blocked, registered; gchar *enablemessage, *nonfuncmessage, *limfuncmessage, *regmessage, *blockedmessage, *notenabledmessage; GtkWidget *infobar, *infobarlabel; guint pagecaps; if (mmguiapp == NULL) return FALSE; blocked = mmguicore_devices_get_locked(mmguiapp->core); enabled = mmguicore_devices_get_enabled(mmguiapp->core); registered = mmguicore_devices_get_registered(mmguiapp->core); switch (setpage) { case MMGUI_MAIN_PAGE_DEVICES: trytoenable = FALSE; needreg = FALSE; enablemessage = NULL; notenabledmessage = NULL; regmessage = NULL; blockedmessage = NULL; nonfuncmessage = NULL; limfuncmessage = NULL; infobar = NULL; infobarlabel = NULL; nonfunctional = FALSE; limfunctional = FALSE; break; case MMGUI_MAIN_PAGE_SMS: trytoenable = TRUE; needreg = TRUE; enablemessage = _("Modem must be enabled to read SMS. Enable modem?"); notenabledmessage = _("Modem must be enabled to read and write SMS. Please enable modem."); regmessage = _("Modem must be registered in mobile network to receive and send SMS. Please wait..."); blockedmessage = _("Modem must be unlocked to receive and send SMS. Please enter PIN code."); nonfuncmessage = _("Modem manager does not support SMS manipulation functions."); limfuncmessage = _("Modem manager does not support sending of SMS messages."); infobar = mmguiapp->window->smsinfobar; infobarlabel = mmguiapp->window->smsinfobarlabel; pagecaps = mmguicore_sms_get_capabilities(mmguiapp->core); if (pagecaps & MMGUI_SMS_CAPS_RECEIVE) { nonfunctional = FALSE; } else { nonfunctional = TRUE; } if (pagecaps & MMGUI_SMS_CAPS_SEND) { limfunctional = FALSE; } else { limfunctional = TRUE; } break; case MMGUI_MAIN_PAGE_USSD: trytoenable = TRUE; needreg = TRUE; enablemessage = _("Modem must be enabled to send USSD. Enable modem?"); notenabledmessage = _("Modem must be enabled to send USSD. Please enable modem."); regmessage = _("Modem must be registered in mobile network to send USSD. Please wait..."); blockedmessage = _("Modem must be unlocked to send USSD. Please enter PIN code."); nonfuncmessage = _("Modem manager does not support sending of USSD requests."); limfuncmessage = NULL; infobar = mmguiapp->window->ussdinfobar; infobarlabel = mmguiapp->window->ussdinfobarlabel; pagecaps = mmguicore_ussd_get_capabilities(mmguiapp->core); if (pagecaps & MMGUI_USSD_CAPS_SEND) { nonfunctional = FALSE; } else { nonfunctional = TRUE; } limfunctional = FALSE; break; case MMGUI_MAIN_PAGE_INFO: trytoenable = FALSE; needreg = FALSE; enablemessage = NULL; regmessage = NULL; blockedmessage = NULL; nonfuncmessage = NULL; limfuncmessage = NULL; infobar = NULL; infobarlabel = NULL; nonfunctional = FALSE; limfunctional = FALSE; break; case MMGUI_MAIN_PAGE_SCAN: trytoenable = TRUE; needreg = FALSE; enablemessage = _("Modem must be enabled to scan for available networks. Enable modem?"); notenabledmessage = _("Modem must be enabled to scan for available networks. Please enable modem."); regmessage = NULL; blockedmessage = _("Modem must be unlocked to scan for available networks. Please enter PIN code."); nonfuncmessage = _("Modem manager does not support scanning for available mobile networks."); limfuncmessage = _("Modem is connected now. Please disconnect to scan."); infobar = mmguiapp->window->scaninfobar; infobarlabel = mmguiapp->window->scaninfobarlabel; pagecaps = mmguicore_newtworks_scan_get_capabilities(mmguiapp->core); if (pagecaps & MMGUI_SCAN_CAPS_OBSERVE) { nonfunctional = FALSE; } else { nonfunctional = TRUE; } if (mmguicore_devices_get_connected(mmguiapp->core)) { limfunctional = TRUE; } else { limfunctional = FALSE; } break; case MMGUI_MAIN_PAGE_TRAFFIC: trytoenable = FALSE; needreg = FALSE; enablemessage = NULL; notenabledmessage = NULL; regmessage = NULL; blockedmessage = NULL; nonfuncmessage = NULL; limfuncmessage = NULL; infobar = NULL; infobarlabel = NULL; nonfunctional = FALSE; limfunctional = FALSE; break; case MMGUI_MAIN_PAGE_CONTACTS: trytoenable = TRUE; needreg = FALSE; enablemessage = _("Modem must be enabled to export contacts from it. Enable modem?"); notenabledmessage = _("Modem must be enabled to export contacts from it. Please enable modem."); regmessage = NULL; blockedmessage = _("Modem must be unlocked to export contacts from it. Please enter PIN code."); nonfuncmessage = _("Modem manager does not support modem contacts manipulation functions."); limfuncmessage = _("Modem manager does not support modem contacts edition functions."); infobar = mmguiapp->window->contactsinfobar; infobarlabel = mmguiapp->window->contactsinfobarlabel; pagecaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if (pagecaps & MMGUI_CONTACTS_CAPS_EXPORT) { nonfunctional = FALSE; } else { nonfunctional = TRUE; } if (pagecaps & MMGUI_CONTACTS_CAPS_EDIT) { limfunctional = FALSE; } else { limfunctional = TRUE; } break; default: trytoenable = FALSE; needreg = FALSE; enablemessage = NULL; notenabledmessage = NULL; regmessage = NULL; nonfuncmessage = NULL; limfuncmessage = NULL; infobar = NULL; infobarlabel = NULL; nonfunctional = FALSE; limfunctional = FALSE; break; } if (blocked) { g_debug("Blocked\n"); if (infobar != NULL) gtk_widget_show(infobar); if (infobarlabel != NULL) gtk_label_set_text(GTK_LABEL(infobarlabel), blockedmessage); mmgui_main_ui_page_control_disable(mmguiapp, setpage, TRUE, FALSE); } else { if ((trytoenable) && (!enabled)) { g_debug("Must be enabled\n"); if (mmgui_main_ui_question_dialog_open(mmguiapp, _("Enable modem"), enablemessage)) { if (mmguicore_devices_enable(mmguiapp->core, TRUE)) { mmgui_main_ui_progress_dialog_open(mmguiapp); } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error enabling device"), mmguicore_get_last_error(mmguiapp->core)); } } else { g_debug("Not enabled\n"); if (infobar != NULL) gtk_widget_show(infobar); if (infobarlabel != NULL) gtk_label_set_text(GTK_LABEL(infobarlabel), notenabledmessage); mmgui_main_ui_page_control_disable(mmguiapp, setpage, TRUE, TRUE); } } else { if ((needreg) && (!registered)) { g_debug("Must be registered\n"); if (infobar != NULL) gtk_widget_show(infobar); if (infobarlabel != NULL) gtk_label_set_text(GTK_LABEL(infobarlabel), regmessage); mmgui_main_ui_page_control_disable(mmguiapp, setpage, TRUE, TRUE); } else if (nonfunctional) { g_debug("Nonfunctional\n"); if (infobar != NULL) gtk_widget_show(infobar); if (infobarlabel != NULL) gtk_label_set_text(GTK_LABEL(infobarlabel), nonfuncmessage); mmgui_main_ui_page_control_disable(mmguiapp, setpage, TRUE, FALSE); } else if (limfunctional) { g_debug("Limited functional\n"); if (infobar != NULL) gtk_widget_show(infobar); if (infobarlabel != NULL) gtk_label_set_text(GTK_LABEL(infobarlabel), limfuncmessage); mmgui_main_ui_page_control_disable(mmguiapp, setpage, TRUE, TRUE); } else { g_debug("Fully functional\n"); if (infobar != NULL) gtk_widget_hide(infobar); if (infobarlabel != NULL) mmgui_main_ui_page_control_disable(mmguiapp, setpage, FALSE, FALSE); } } } return TRUE; } static void mmgui_main_ui_open_page(mmgui_application_t mmguiapp, guint page) { if ((mmguiapp == NULL) || (page > MMGUI_MAIN_PAGE_CONTACTS)) return; if ((page != MMGUI_MAIN_PAGE_DEVICES) && (mmguicore_devices_get_current(mmguiapp->core) == NULL)) return; /*Test device state*/ mmgui_main_ui_test_device_state(mmguiapp, page); /*Bind shortcuts*/ mmgui_main_ui_page_setup_shortcuts(mmguiapp, page); /*Open page*/ gtk_notebook_set_current_page(GTK_NOTEBOOK(mmguiapp->window->notebook), page); /*Set section in application main menu*/ mmgui_main_ui_application_menu_set_page(mmguiapp, page); } static void mmgui_main_ui_application_menu_set_page(mmgui_application_t mmguiapp, guint page) { GAction *action; GVariant *sectionv; if ((mmguiapp == NULL) || (page > MMGUI_MAIN_PAGE_CONTACTS)) return; action = g_action_map_lookup_action(G_ACTION_MAP(mmguiapp->gtkapplication), "section"); if (action == NULL) return; switch (page) { case MMGUI_MAIN_PAGE_DEVICES: sectionv = g_variant_new_string("devices"); break; case MMGUI_MAIN_PAGE_SMS: sectionv = g_variant_new_string("sms"); break; case MMGUI_MAIN_PAGE_USSD: sectionv = g_variant_new_string("ussd"); break; case MMGUI_MAIN_PAGE_INFO: sectionv = g_variant_new_string("info"); break; case MMGUI_MAIN_PAGE_SCAN: sectionv = g_variant_new_string("scan"); break; case MMGUI_MAIN_PAGE_TRAFFIC: sectionv = g_variant_new_string("traffic"); break; case MMGUI_MAIN_PAGE_CONTACTS: sectionv = g_variant_new_string("contacts"); break; default: sectionv = g_variant_new_string("devices"); break; } /*Set action in application menu*/ g_simple_action_set_state(G_SIMPLE_ACTION(action), sectionv); } static void mmgui_main_ui_application_menu_set_state(mmgui_application_t mmguiapp, gboolean enabled) { GAction *action; if (mmguiapp == NULL) return; action = g_action_map_lookup_action(G_ACTION_MAP(mmguiapp->gtkapplication), "section"); if (action == NULL) return; /*Set state of section in application menu application menu*/ g_simple_action_set_enabled(G_SIMPLE_ACTION(action), enabled); } void mmgui_main_ui_devices_button_toggled_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(object))) { mmgui_main_ui_open_page(mmguiapp, MMGUI_MAIN_PAGE_DEVICES); } } void mmgui_main_ui_sms_button_toggled_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(object))) { mmgui_main_ui_open_page(mmguiapp, MMGUI_MAIN_PAGE_SMS); } } void mmgui_main_ui_ussd_button_toggled_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(object))) { mmgui_main_ui_open_page(mmguiapp, MMGUI_MAIN_PAGE_USSD); } } void mmgui_main_ui_info_button_toggled_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(object))) { mmgui_main_ui_open_page(mmguiapp, MMGUI_MAIN_PAGE_INFO); } } void mmgui_main_ui_scan_button_toggled_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(object))) { mmgui_main_ui_open_page(mmguiapp, MMGUI_MAIN_PAGE_SCAN); } } void mmgui_main_ui_traffic_button_toggled_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(object))) { mmgui_main_ui_open_page(mmguiapp, MMGUI_MAIN_PAGE_TRAFFIC); } } void mmgui_main_ui_contacts_button_toggled_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(object))) { mmgui_main_ui_open_page(mmguiapp, MMGUI_MAIN_PAGE_CONTACTS); } } static enum _mmgui_main_exit_dialog_result mmgui_main_ui_window_hide_dialog(mmgui_application_t mmguiapp) { gint response; /*gchar *strcolor;*/ if (mmguiapp == NULL) return MMGUI_MAIN_EXIT_DIALOG_CANCEL; if ((mmguiapp->options == NULL) || (mmguiapp->settings == NULL)) return MMGUI_MAIN_EXIT_DIALOG_CANCEL; response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->exitdialog)); gtk_widget_hide(mmguiapp->window->exitdialog); if (response > 0) { /*Ask again checkbox*/ mmguiapp->options->askforhide = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->exitaskagain)); gmm_settings_set_boolean(mmguiapp->settings, "behaviour_ask_to_hide", mmguiapp->options->askforhide); /*Exit and hide radiobuttons*/ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->exitcloseradio))) { /*Exit application selected*/ mmguiapp->options->hidetotray = FALSE; gmm_settings_set_boolean(mmguiapp->settings, "behaviour_hide_to_tray", mmguiapp->options->hidetotray); return MMGUI_MAIN_EXIT_DIALOG_EXIT; } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->exithideradio))) { /*Hide to tray selected*/ mmguiapp->options->hidetotray = TRUE; gmm_settings_set_boolean(mmguiapp->settings, "behaviour_hide_to_tray", mmguiapp->options->hidetotray); return MMGUI_MAIN_EXIT_DIALOG_HIDE; } else { /*Cancel clicked*/ return MMGUI_MAIN_EXIT_DIALOG_CANCEL; } } else { return MMGUI_MAIN_EXIT_DIALOG_CANCEL; } } static void mmgui_main_ui_window_save_geometry(mmgui_application_t mmguiapp) { if (mmguiapp == NULL) return; if (mmguiapp->options->savegeometry) { //Get window geometry and coordinates gtk_window_get_size(GTK_WINDOW(mmguiapp->window->window), &(mmguiapp->options->wgwidth), &(mmguiapp->options->wgheight)); /*Get new coordinates only if window visible or use saved coordinates otherwise*/ if (gtk_widget_get_visible(mmguiapp->window->window)) { gtk_window_get_position(GTK_WINDOW(mmguiapp->window->window), &(mmguiapp->options->wgposx), &(mmguiapp->options->wgposy)); } //Save it if ((mmguiapp->options->wgwidth >= 1) && (mmguiapp->options->wgheight >= 1)) { //Window geometry gmm_settings_set_int(mmguiapp->settings, "window_geometry_width", mmguiapp->options->wgwidth); gmm_settings_set_int(mmguiapp->settings, "window_geometry_height", mmguiapp->options->wgheight); gmm_settings_set_int(mmguiapp->settings, "window_geometry_x", mmguiapp->options->wgposx); gmm_settings_set_int(mmguiapp->settings, "window_geometry_y", mmguiapp->options->wgposy); g_debug("Geometry: width: %i, height: %i, x: %i, y: %i\n", mmguiapp->options->wgwidth, mmguiapp->options->wgheight, mmguiapp->options->wgposx, mmguiapp->options->wgposy); } } } gboolean mmgui_main_ui_window_delete_event_signal(GtkWidget *widget, GdkEvent *event, gpointer data) { mmgui_application_t mmguiapp; enum _mmgui_notifications_sound soundmode; enum _mmgui_main_exit_dialog_result dialogres; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return TRUE; if (mmguiapp->options->askforhide) { /*Ask at exit*/ dialogres = mmgui_main_ui_window_hide_dialog(mmguiapp); if (dialogres == MMGUI_MAIN_EXIT_DIALOG_HIDE) { /*Hide application*/ gtk_widget_hide_on_delete(mmguiapp->window->window); /*Show notification*/ if (mmguiapp->options->usesounds) { soundmode = MMGUI_NOTIFICATIONS_SOUND_INFO; } else { soundmode = MMGUI_NOTIFICATIONS_SOUND_NONE; } mmgui_notifications_show(mmguiapp->notifications, _("Modem Manager GUI window hidden"), _("Use tray icon or messaging menu to show window again"), soundmode, NULL, NULL); /*Set tray menu mark*/ g_signal_handler_block(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mmguiapp->window->showwin_tm), FALSE); g_signal_handler_unblock(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); /*Save window state*/ mmguiapp->options->minimized = TRUE; gmm_settings_set_boolean(mmguiapp->settings, "window_state_minimized", mmguiapp->options->minimized); return TRUE; } else if (dialogres == MMGUI_MAIN_EXIT_DIALOG_EXIT) { /*Exit application*/ mmgui_main_ui_window_save_geometry(mmguiapp); return FALSE; } else { /*Do nothing*/ return TRUE; } } else { /*Do not ask at exit*/ if (mmguiapp->options->hidetotray) { gtk_widget_hide_on_delete(mmguiapp->window->window); /*Show notification*/ if (mmguiapp->options->usesounds) { soundmode = MMGUI_NOTIFICATIONS_SOUND_INFO; } else { soundmode = MMGUI_NOTIFICATIONS_SOUND_NONE; } mmgui_notifications_show(mmguiapp->notifications, _("Modem Manager GUI window hidden"), _("Use tray icon or messaging menu to show window again"), soundmode, NULL, NULL); /*Set tray menu mark*/ g_signal_handler_block(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mmguiapp->window->showwin_tm), FALSE); g_signal_handler_unblock(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); /*Save window state*/ mmguiapp->options->minimized = TRUE; gmm_settings_set_boolean(mmguiapp->settings, "window_state_minimized", mmguiapp->options->minimized); return TRUE; } else { mmgui_main_ui_window_save_geometry(mmguiapp); return FALSE; } } } void mmgui_main_ui_window_destroy_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_application_terminate(mmguiapp); } static void mmgui_main_ui_exit_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_ui_window_save_geometry(mmguiapp); mmgui_main_application_terminate(mmguiapp); } static void mmgui_main_ui_help_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data) { mmgui_application_t mmguiapp; GError *error; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; error = NULL; if (!gtk_show_uri(gtk_widget_get_screen(mmguiapp->window->window), "help:modem-manager-gui", gtk_get_current_event_time(), &error)) { mmgui_main_application_unresolved_error(mmguiapp, _("Error while displaying the help contents"), error->message); g_error_free(error); } } static void mmgui_main_ui_about_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; gtk_dialog_run(GTK_DIALOG(mmguiapp->window->aboutdialog)); gtk_widget_hide(mmguiapp->window->aboutdialog); } static void mmgui_main_ui_section_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data) { mmgui_application_t mmguiapp; const gchar *state; GtkWidget *toolbutton; mmguiapp = (mmgui_application_t)data; if ((mmguiapp == NULL) || (parameter == NULL)) return; state = g_variant_get_string(parameter, NULL); g_simple_action_set_state(action, g_variant_new_string(state)); if (g_str_equal(state, "devices")) { toolbutton = mmguiapp->window->devbutton; } else if (g_str_equal(state, "sms")) { toolbutton = mmguiapp->window->smsbutton; } else if (g_str_equal(state, "ussd")) { toolbutton = mmguiapp->window->ussdbutton; } else if (g_str_equal(state, "info")) { toolbutton = mmguiapp->window->infobutton; } else if (g_str_equal(state, "scan")) { toolbutton = mmguiapp->window->scanbutton; } else if (g_str_equal(state, "traffic")) { toolbutton = mmguiapp->window->trafficbutton; } else if (g_str_equal(state, "contacts")) { toolbutton = mmguiapp->window->contactsbutton; } else { toolbutton = mmguiapp->window->devbutton; } if (gtk_widget_get_sensitive(toolbutton)) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(toolbutton), TRUE); g_debug("Application menu item activated: %s\n", state); } } static void mmgui_main_ui_preferences_menu_item_activate_signal(GSimpleAction *action, GVariant *parameter, gpointer data) { mmgui_application_t mmguiapp; gint response; gchar *strcolor, *modulename; gboolean autostart; GtkTreeIter iter; GtkTreeModel *model; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if ((mmguiapp->options == NULL) || (mmguiapp->settings == NULL)) return; autostart = mmgui_main_application_is_in_autostart(mmguiapp); //Show SMS settings gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsconcat), mmguiapp->options->concatsms); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsexpand), mmguiapp->options->smsexpandfolders); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsoldontop), mmguiapp->options->smsoldontop); gtk_range_set_value(GTK_RANGE(mmguiapp->window->prefsmsvalidityscale), (gdouble)mmguiapp->options->smsvalidityperiod); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsreportcb), mmguiapp->options->smsdeliveryreport); //Show behaviour settings gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourhide), mmguiapp->options->hidetotray); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehavioursounds), mmguiapp->options->usesounds); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourgeom), mmguiapp->options->savegeometry); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourautostart), autostart); //Show graph color settings #if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(mmguiapp->window->preftrafficrxcolor), (const GdkRGBA *)&mmguiapp->options->rxtrafficcolor); gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(mmguiapp->window->preftraffictxcolor), (const GdkRGBA *)&mmguiapp->options->txtrafficcolor); #else gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(mmguiapp->window->preftrafficrxcolor), FALSE); gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(mmguiapp->window->preftraffictxcolor), FALSE); gtk_color_button_set_color(GTK_COLOR_BUTTON(mmguiapp->window->preftrafficrxcolor), (const GdkColor *)&(mmguiapp->options->rxtrafficcolor)); gtk_color_button_set_color(GTK_COLOR_BUTTON(mmguiapp->window->preftraffictxcolor), (const GdkColor *)&(mmguiapp->options->txtrafficcolor)); #endif /*Show modules settings*/ gtk_range_set_value(GTK_RANGE(mmguiapp->window->prefenabletimeoutscale), (gdouble)mmguiapp->coreoptions->enabletimeout); gtk_range_set_value(GTK_RANGE(mmguiapp->window->prefsendsmstimeoutscale), (gdouble)mmguiapp->coreoptions->sendsmstimeout); gtk_range_set_value(GTK_RANGE(mmguiapp->window->prefsendussdtimeoutscale), (gdouble)mmguiapp->coreoptions->sendussdtimeout); gtk_range_set_value(GTK_RANGE(mmguiapp->window->prefscannetworkstimeoutscale), (gdouble)mmguiapp->coreoptions->scannetworkstimeout); /*Preferred modem manager*/ if (gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->prefmodulesmmcombo)) == NULL) { mmgui_modules_combo_fill(GTK_COMBO_BOX(mmguiapp->window->prefmodulesmmcombo), mmguiapp->core->modules, MMGUI_MODULE_TYPE_MODEM_MANAGER, (mmguimodule_t)mmguiapp->core->moduleptr); } else if (mmguiapp->coreoptions->mmmodule != NULL) { model = gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->prefmodulesmmcombo)); if (model != NULL) { if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, MMGUI_SERVICE_LIST_MODULE, &modulename, -1); if (modulename != NULL) { if (g_str_equal(modulename, mmguiapp->coreoptions->mmmodule)) { g_free(modulename); gtk_combo_box_set_active_iter(GTK_COMBO_BOX(mmguiapp->window->prefmodulesmmcombo), &iter); break; } g_free(modulename); } } while (gtk_tree_model_iter_next(model, &iter)); } } } /*Preferred connection manager*/ if (gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->prefmodulescmcombo)) == NULL) { mmgui_modules_combo_fill(GTK_COMBO_BOX(mmguiapp->window->prefmodulescmcombo), mmguiapp->core->modules, MMGUI_MODULE_TYPE_CONNECTION_MANGER, (mmguimodule_t)mmguiapp->core->cmoduleptr); } else if (mmguiapp->coreoptions->cmmodule != NULL) { model = gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->prefmodulescmcombo)); if (model != NULL) { if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, MMGUI_SERVICE_LIST_MODULE, &modulename, -1); if (modulename != NULL) { if (g_str_equal(modulename, mmguiapp->coreoptions->cmmodule)) { g_free(modulename); gtk_combo_box_set_active_iter(GTK_COMBO_BOX(mmguiapp->window->prefmodulescmcombo), &iter); break; } g_free(modulename); } } while (gtk_tree_model_iter_next(model, &iter)); } } } response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->prefdialog)); if (response > 0) { //Save SMS settings mmguiapp->options->concatsms = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsconcat)); gmm_settings_set_boolean(mmguiapp->settings, "sms_concatenation", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsconcat))); mmguiapp->options->smsexpandfolders = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsexpand)); gmm_settings_set_boolean(mmguiapp->settings, "sms_expand_folders", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsexpand))); mmguiapp->options->smsoldontop = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsoldontop)); gmm_settings_set_boolean(mmguiapp->settings, "sms_old_on_top", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsoldontop))); mmguiapp->options->smsvalidityperiod = (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefsmsvalidityscale)); gmm_settings_set_int(mmguiapp->settings, "sms_validity_period", (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefsmsvalidityscale))); mmguiapp->options->smsdeliveryreport = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsreportcb)); gmm_settings_set_boolean(mmguiapp->settings, "sms_send_delivery_report", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefsmsreportcb))); //Save program behaviour settings mmguiapp->options->hidetotray = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourhide)); gmm_settings_set_boolean(mmguiapp->settings, "behaviour_hide_to_tray", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourhide))); mmguiapp->options->usesounds = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehavioursounds)); gmm_settings_set_boolean(mmguiapp->settings, "behaviour_use_sounds", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehavioursounds))); mmguiapp->options->savegeometry = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourgeom)); gmm_settings_set_boolean(mmguiapp->settings, "behaviour_save_geometry", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourgeom))); /*Autostart*/ if ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourautostart))) && (!autostart)) { mmgui_main_application_add_to_autostart(mmguiapp); } else if ((!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->prefbehaviourautostart))) && (autostart)) { mmgui_main_application_remove_from_autostart(mmguiapp); } //Save graph colors #if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(mmguiapp->window->preftrafficrxcolor), &(mmguiapp->options->rxtrafficcolor)); strcolor = gdk_rgba_to_string((const GdkRGBA *)&mmguiapp->options->rxtrafficcolor); gmm_settings_set_string(mmguiapp->settings, "graph_rx_color", strcolor); g_free(strcolor); gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(mmguiapp->window->preftraffictxcolor), &(mmguiapp->options->txtrafficcolor)); strcolor = gdk_rgba_to_string((const GdkRGBA *)&mmguiapp->options->txtrafficcolor); gmm_settings_set_string(mmguiapp->settings, "graph_tx_color", strcolor); g_free(strcolor); #else gtk_color_button_get_color(GTK_COLOR_BUTTON(mmguiapp->window->preftrafficrxcolor), &(mmguiapp->options->rxtrafficcolor)); strcolor = gdk_color_to_string((const GdkColor *)&mmguiapp->options->rxtrafficcolor); gmm_settings_set_string(mmguiapp->settings, "graph_rx_color", strcolor); g_free(strcolor); gtk_color_button_get_color(GTK_COLOR_BUTTON(mmguiapp->window->preftraffictxcolor), &(mmguiapp->options->txtrafficcolor)); strcolor = gdk_color_to_string((const GdkColor *)&mmguiapp->options->txtrafficcolor); gmm_settings_set_string(mmguiapp->settings, "graph_tx_color", strcolor); g_free(strcolor); #endif /*Save and apply modules settings*/ mmguiapp->coreoptions->enabletimeout = (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefenabletimeoutscale)); gmm_settings_set_int(mmguiapp->settings, "modules_enable_device_timeout", (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefenabletimeoutscale))); mmguiapp->coreoptions->sendsmstimeout = (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefsendsmstimeoutscale)); gmm_settings_set_int(mmguiapp->settings, "modules_send_sms_timeout", (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefsendsmstimeoutscale))); mmguiapp->coreoptions->sendussdtimeout = (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefsendussdtimeoutscale)); gmm_settings_set_int(mmguiapp->settings, "modules_send_ussd_timeout", (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefsendussdtimeoutscale))); mmguiapp->coreoptions->scannetworkstimeout = (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefscannetworkstimeoutscale)); gmm_settings_set_int(mmguiapp->settings, "modules_scan_networks_timeout", (gint)gtk_range_get_value(GTK_RANGE(mmguiapp->window->prefscannetworkstimeoutscale))); mmguicore_modules_mm_set_timeouts(mmguiapp->core, MMGUI_DEVICE_OPERATION_ENABLE, mmguiapp->coreoptions->enabletimeout, MMGUI_DEVICE_OPERATION_SEND_SMS, mmguiapp->coreoptions->sendsmstimeout, MMGUI_DEVICE_OPERATION_SEND_USSD, mmguiapp->coreoptions->sendussdtimeout, MMGUI_DEVICE_OPERATION_SCAN, mmguiapp->coreoptions->scannetworkstimeout, -1); /*Save preferred modules*/ model = gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->prefmodulesmmcombo)); if (model != NULL) { if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(mmguiapp->window->prefmodulesmmcombo), &iter)) { if (mmguiapp->coreoptions->mmmodule != NULL) { g_free(mmguiapp->coreoptions->mmmodule); } gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, MMGUI_SERVICE_LIST_MODULE, &mmguiapp->coreoptions->mmmodule, -1); gmm_settings_set_string(mmguiapp->settings, "modules_preferred_modem_manager", mmguiapp->coreoptions->mmmodule); } } model = gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->prefmodulescmcombo)); if (model != NULL) { if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(mmguiapp->window->prefmodulescmcombo), &iter)) { if (mmguiapp->coreoptions->cmmodule != NULL) { g_free(mmguiapp->coreoptions->cmmodule); } gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, MMGUI_SERVICE_LIST_MODULE, &mmguiapp->coreoptions->cmmodule, -1); gmm_settings_set_string(mmguiapp->settings, "modules_preferred_connection_manager", mmguiapp->coreoptions->cmmodule); } } } gtk_widget_hide(mmguiapp->window->prefdialog); } gchar *mmgui_main_ui_message_validity_scale_value_format(GtkScale *scale, gdouble value, gpointer user_data) { return mmgui_str_format_message_validity_period(value); } gchar *mmgui_main_ui_timeout_scale_value_format(GtkScale *scale, gdouble value, gpointer user_data) { return mmgui_str_format_operation_timeout_period(value); } void mmgui_main_ui_control_buttons_disable(mmgui_application_t mmguiapp, gboolean disable) { if (mmguiapp == NULL) return; /*Toolbar*/ gtk_widget_set_sensitive(mmguiapp->window->smsbutton, !disable); gtk_widget_set_sensitive(mmguiapp->window->ussdbutton, !disable); gtk_widget_set_sensitive(mmguiapp->window->infobutton, !disable); gtk_widget_set_sensitive(mmguiapp->window->scanbutton, !disable); gtk_widget_set_sensitive(mmguiapp->window->trafficbutton, !disable); gtk_widget_set_sensitive(mmguiapp->window->contactsbutton, !disable); /*Application menu*/ mmgui_main_ui_application_menu_set_state(mmguiapp, !disable); if (disable) { /*Toolbar*/ gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->devbutton), TRUE); gtk_notebook_set_current_page(GTK_NOTEBOOK(mmguiapp->window->notebook), MMGUI_MAIN_PAGE_DEVICES); /*Application menu*/ mmgui_main_ui_application_menu_set_page(mmguiapp, MMGUI_MAIN_PAGE_DEVICES); /*Banner*/ gtk_widget_show(mmguiapp->window->nodevbar); } else { /*Banner*/ gtk_widget_hide(mmguiapp->window->nodevbar); } } void mmgui_main_ui_interrupt_operation_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (mmguiapp->core == NULL) return; if (mmguicore_interrupt_operation(mmguiapp->core)) { mmgui_main_ui_progress_dialog_close(mmguiapp); } } gboolean mmgui_main_ui_update_statusbar_from_thread(gpointer data) { mmgui_application_t mmguiapp; mmguidevice_t device; gchar *statusmsg; gchar rxbuffer[32], txbuffer[32]; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return FALSE; if (mmguiapp->core == NULL) return FALSE; device = mmguicore_devices_get_current(mmguiapp->core); if (device != NULL) { /*Set signal icon*/ if ((device->siglevel == 0) && (mmguiapp->window->signal0icon != NULL)) { gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->signalimage), mmguiapp->window->signal0icon); } else if ((device->siglevel > 0) && (device->siglevel <= 25) && (mmguiapp->window->signal25icon != NULL)) { gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->signalimage), mmguiapp->window->signal25icon); } else if ((device->siglevel > 25) && (device->siglevel <= 50) && (mmguiapp->window->signal50icon != NULL)) { gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->signalimage), mmguiapp->window->signal50icon); } else if ((device->siglevel > 50) && (device->siglevel <= 75) && (mmguiapp->window->signal75icon != NULL)) { gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->signalimage), mmguiapp->window->signal75icon); } else if ((device->siglevel > 75) && (mmguiapp->window->signal100icon != NULL)) { gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->signalimage), mmguiapp->window->signal100icon); } /*Show connection statistics*/ if (!device->connected) { if ((device->operatorname == NULL) || ((device->operatorname != NULL) && (device->operatorname[0] == '\0'))) { /*Operator name is unknown - show registration status*/ statusmsg = g_strdup(mmgui_str_format_reg_status(device->regstatus)); } else { /*No network connection*/ statusmsg = g_strdup_printf(_("%s disconnected"), device->operatorname); } } else { /*Network connection statistics*/ statusmsg = g_strdup_printf("%s ↓ %s ↑ %s", device->operatorname, mmgui_str_format_bytes(device->rxbytes, rxbuffer, sizeof(rxbuffer), FALSE), mmgui_str_format_bytes(device->txbytes, txbuffer, sizeof(txbuffer), FALSE)); } gtk_statusbar_pop(GTK_STATUSBAR(mmguiapp->window->statusbar), mmguiapp->window->sbcontext); mmguiapp->window->sbcontext = gtk_statusbar_get_context_id(GTK_STATUSBAR(mmguiapp->window->statusbar), statusmsg); gtk_statusbar_push(GTK_STATUSBAR(mmguiapp->window->statusbar), mmguiapp->window->sbcontext, statusmsg); g_free(statusmsg); } else { /*Zero signal level indicator*/ gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->signalimage), mmguiapp->window->signal0icon); /*Clear statusbar*/ gtk_statusbar_pop(GTK_STATUSBAR(mmguiapp->window->statusbar), mmguiapp->window->sbcontext); } return FALSE; } //TRAY static void mmgui_main_tray_icon_activation_signal(GtkStatusIcon *status_icon, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if ((mmguiapp->core == NULL) || (mmguiapp->window == NULL)) return; if (gtk_widget_get_visible(mmguiapp->window->window)) { /*Save window position*/ if (mmguiapp->options->savegeometry) { gtk_window_get_position(GTK_WINDOW(mmguiapp->window->window), &(mmguiapp->options->wgposx), &(mmguiapp->options->wgposy)); } /*Hide window*/ gtk_widget_hide(mmguiapp->window->window); mmguiapp->options->minimized = TRUE; g_signal_handler_block(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mmguiapp->window->showwin_tm), FALSE); g_signal_handler_unblock(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); } else { /*Restore window position*/ if (mmguiapp->options->savegeometry) { gtk_window_move(GTK_WINDOW(mmguiapp->window->window), mmguiapp->options->wgposx, mmguiapp->options->wgposy); } /*Show window*/ gtk_widget_show(mmguiapp->window->window); mmguiapp->options->minimized = FALSE; g_signal_handler_block(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mmguiapp->window->showwin_tm), TRUE); g_signal_handler_unblock(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); } /*Save window state*/ gmm_settings_set_boolean(mmguiapp->settings, "window_state_minimized", mmguiapp->options->minimized); } static void mmgui_main_tray_icon_window_show_signal(GtkCheckMenuItem *checkmenuitem, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if ((mmguiapp->core == NULL) || (mmguiapp->window == NULL)) return; mmgui_main_tray_icon_activation_signal(GTK_STATUS_ICON(mmguiapp->window->statusicon), mmguiapp); } static void mmgui_main_tray_icon_new_sms_signal(GtkMenuItem *menuitem, gpointer data) { mmgui_application_t mmguiapp; guint smscaps; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if ((mmguiapp->core == NULL) || (mmguiapp->window == NULL)) return; if (!gtk_widget_get_visible(mmguiapp->window->window)) { gtk_widget_show(mmguiapp->window->window); g_signal_handler_block(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mmguiapp->window->showwin_tm), TRUE); g_signal_handler_unblock(G_OBJECT(mmguiapp->window->showwin_tm), mmguiapp->window->traysigid); } else { gtk_window_present(GTK_WINDOW(mmguiapp->window->window)); } if (mmguicore_devices_get_enabled(mmguiapp->core)) { smscaps = mmguicore_sms_get_capabilities(mmguiapp->core); if (smscaps & MMGUI_SMS_CAPS_SEND) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->smsbutton), TRUE); mmgui_main_sms_new(mmguiapp); } } } static void mmgui_main_tray_icon_exit_signal(GtkMenuItem *menuitem, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_ui_window_save_geometry(mmguiapp); mmgui_main_application_terminate(mmguiapp); } static void mmgui_main_tray_popup_menu_show_signal(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer data) { mmgui_application_t mmguiapp; guint smscaps; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if ((mmguiapp->core == NULL) || (mmguiapp->window == NULL)) return; if (mmguicore_devices_get_enabled(mmguiapp->core)) { smscaps = mmguicore_sms_get_capabilities(mmguiapp->core); if (smscaps & MMGUI_SMS_CAPS_SEND) { gtk_widget_set_sensitive(mmguiapp->window->newsms_tm, TRUE); } else { gtk_widget_set_sensitive(mmguiapp->window->newsms_tm, FALSE); } } else { gtk_widget_set_sensitive(mmguiapp->window->newsms_tm, FALSE); } gtk_menu_popup(GTK_MENU(mmguiapp->window->traymenu), NULL, NULL, gtk_status_icon_position_menu, status_icon, button, activate_time); } static gboolean mmgui_main_tray_tooltip_show_signal(GtkStatusIcon *status_icon, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer data) { mmgui_application_t mmguiapp; guint unreadmessages; gchar strbuf[64]; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return FALSE; if (mmguicore_devices_get_current(mmguiapp->core) != NULL) { unreadmessages = mmgui_smsdb_get_unread_messages(mmguicore_devices_get_sms_db(mmguiapp->core)); if (unreadmessages > 0) { memset(strbuf, 0, sizeof(strbuf)); g_snprintf(strbuf, sizeof(strbuf), _("Unread messages: %u"), unreadmessages); gtk_tooltip_set_text(tooltip, strbuf); } else { gtk_tooltip_set_text(tooltip, _("No unread messages")); } } else { gtk_tooltip_set_text(tooltip, _("No unread messages")); } return TRUE; } static void mmgui_main_tray_icon_init(mmgui_application_t mmguiapp) { if (mmguiapp == NULL) return; /*Tray icon*/ mmguiapp->window->statusicon = gtk_status_icon_new_from_file(RESOURCE_MAINWINDOW_ICON); g_signal_connect(G_OBJECT(mmguiapp->window->statusicon), "activate", G_CALLBACK(mmgui_main_tray_icon_activation_signal), mmguiapp); gtk_status_icon_set_tooltip_text(mmguiapp->window->statusicon, _("No unread messages")); /*Tray menu*/ mmguiapp->window->traymenu = gtk_menu_new(); /*Show window entry*/ mmguiapp->window->showwin_tm = gtk_check_menu_item_new_with_label(_("Show window")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mmguiapp->window->showwin_tm), gtk_widget_get_visible(mmguiapp->window->window)); mmguiapp->window->traysigid = g_signal_connect(G_OBJECT(mmguiapp->window->showwin_tm), "toggled", G_CALLBACK(mmgui_main_tray_icon_window_show_signal), mmguiapp); /*Separator*/ mmguiapp->window->sep1_tm = gtk_separator_menu_item_new(); /*New SMS entry*/ mmguiapp->window->newsms_tm = gtk_menu_item_new_with_label(_("New SMS")); gtk_widget_set_sensitive(mmguiapp->window->newsms_tm, FALSE); g_signal_connect(G_OBJECT(mmguiapp->window->newsms_tm), "activate", G_CALLBACK(mmgui_main_tray_icon_new_sms_signal), mmguiapp); /*Separator 2*/ mmguiapp->window->sep2_tm = gtk_separator_menu_item_new(); /*Quit entry*/ mmguiapp->window->quit_tm = gtk_menu_item_new_with_label(_("Quit")); g_signal_connect(G_OBJECT(mmguiapp->window->quit_tm), "activate", G_CALLBACK(mmgui_main_tray_icon_exit_signal), mmguiapp); /*Packaging*/ gtk_menu_shell_append(GTK_MENU_SHELL(mmguiapp->window->traymenu), mmguiapp->window->showwin_tm); gtk_menu_shell_append(GTK_MENU_SHELL(mmguiapp->window->traymenu), mmguiapp->window->sep1_tm); gtk_menu_shell_append(GTK_MENU_SHELL(mmguiapp->window->traymenu), mmguiapp->window->newsms_tm); gtk_menu_shell_append(GTK_MENU_SHELL(mmguiapp->window->traymenu), mmguiapp->window->sep2_tm); gtk_menu_shell_append(GTK_MENU_SHELL(mmguiapp->window->traymenu), mmguiapp->window->quit_tm); gtk_widget_show_all(mmguiapp->window->traymenu); /*Tray menu signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->statusicon), "popup-menu", G_CALLBACK(mmgui_main_tray_popup_menu_show_signal), mmguiapp); /*Tray tooltip signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->statusicon), "query-tooltip", G_CALLBACK(mmgui_main_tray_tooltip_show_signal), mmguiapp); gtk_status_icon_set_has_tooltip(mmguiapp->window->statusicon, TRUE); } /*Ayatana*/ static void mmgui_main_ayatana_event_callback(enum _mmgui_ayatana_event event, gpointer ayatana, gpointer data, gpointer userdata) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)userdata; if (userdata == NULL) return; gtk_window_present(GTK_WINDOW(mmguiapp->window->window)); if (event == MMGUI_AYATANA_EVENT_CLIENT) { if (mmguicore_devices_get_enabled(mmguiapp->core)) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->smsbutton), TRUE); } } } //Initialization static void mmgui_main_application_unresolved_error(mmgui_application_t mmguiapp, gchar *caption, gchar *text) { GtkWidget *dialog; if ((mmguiapp == NULL) || (caption == NULL) || (text == NULL)) return; //Show error message (Interface may be not built, so using custom message box) dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s\n%s", caption, text); gtk_window_set_title(GTK_WINDOW(dialog), "Modem Manager GUI"); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy (dialog); //Close application mmgui_main_application_terminate(mmguiapp); } static void mmgui_main_ui_modules_combo_set_sensitive(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) { gboolean available; gtk_tree_model_get(tree_model, iter, MMGUI_SERVICE_LIST_AVAILABLE, &available, -1); g_object_set(cell, "sensitive", available, NULL); } static void mmgui_modules_combo_fill(GtkComboBox *combo, GSList *modules, gint type, mmguimodule_t currentmodule) { GSList *iterator; GtkListStore *store; GtkCellRenderer *renderer; GtkTreeIter iter; mmguimodule_t module; gint moduleid, curid; if ((combo == NULL) || (modules == NULL)) return; store = gtk_list_store_new(MMGUI_SERVICE_LIST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); moduleid = -1; curid = 0; for (iterator=modules; iterator; iterator=iterator->next) { module = iterator->data; if (module->type == type) { gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_SERVICE_LIST_NAME, module->description, MMGUI_SERVICE_LIST_MODULE, module->shortname, MMGUI_SERVICE_LIST_AVAILABLE, (module->activatable || module->applicable), -1); if (currentmodule != NULL) { if (currentmodule == module) { moduleid = curid; } } else { if (((module->activatable) || (module->applicable)) && (moduleid == -1)) { moduleid = curid; } } curid++; } } gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_SERVICE_LIST_NAME, _("Undefined"), MMGUI_SERVICE_LIST_MODULE, "undefined", MMGUI_SERVICE_LIST_AVAILABLE, TRUE, -1); if (moduleid == -1) { moduleid = curid; } renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, TRUE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), renderer, "text", MMGUI_SERVICE_LIST_NAME, NULL); gtk_cell_layout_set_cell_data_func(GTK_CELL_LAYOUT(combo), renderer, mmgui_main_ui_modules_combo_set_sensitive, NULL, NULL); gtk_combo_box_set_model(GTK_COMBO_BOX(combo), GTK_TREE_MODEL(store)); g_object_unref(store); gtk_combo_box_set_active(GTK_COMBO_BOX(combo), moduleid); } static void mmgui_main_ui_start_dialog(mmgui_application_t mmguiapp) { GSList *modulelist; GtkTreeModel *model; GtkTreeIter iter; gint response; if (mmguiapp == NULL) return; if ((mmguiapp->coreoptions == NULL) || (mmguiapp->settings == NULL)) return; modulelist = mmguicore_modules_info(); if (modulelist == NULL) return; /*Modem manager*/ mmgui_modules_combo_fill(GTK_COMBO_BOX(mmguiapp->window->startdialogmmcombo), modulelist, MMGUI_MODULE_TYPE_MODEM_MANAGER, NULL); /*Connection manager*/ mmgui_modules_combo_fill(GTK_COMBO_BOX(mmguiapp->window->startdialogcmcombo), modulelist, MMGUI_MODULE_TYPE_CONNECTION_MANGER, NULL); response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->startdialog)); gtk_widget_hide(mmguiapp->window->startdialog); if (response > 0) { /*Save selected modules*/ /*Modem manager*/ model = gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->startdialogmmcombo)); if (model != NULL) { if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(mmguiapp->window->startdialogmmcombo), &iter)) { gtk_tree_model_get(model, &iter, MMGUI_SERVICE_LIST_MODULE, &mmguiapp->coreoptions->mmmodule, -1); gmm_settings_set_string(mmguiapp->settings, "modules_preferred_modem_manager", mmguiapp->coreoptions->mmmodule); } } /*Connection manager*/ model = gtk_combo_box_get_model(GTK_COMBO_BOX(mmguiapp->window->startdialogcmcombo)); if (model != NULL) { if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(mmguiapp->window->startdialogcmcombo), &iter)) { gtk_tree_model_get(model, &iter, MMGUI_SERVICE_LIST_MODULE, &mmguiapp->coreoptions->cmmodule, -1); gmm_settings_set_string(mmguiapp->settings, "modules_preferred_connection_manager", mmguiapp->coreoptions->cmmodule); } } } } static gboolean mmgui_main_settings_ui_load(mmgui_application_t mmguiapp) { gchar *strparam; if (mmguiapp == NULL) return FALSE; if ((mmguiapp->window == NULL) || (mmguiapp->settings == NULL)) return FALSE; //Get last opened device and open it strparam = gmm_settings_get_string(mmguiapp->settings, "device_identifier", MMGUI_MAIN_DEFAULT_DEVICE_IDENTIFIER); mmgui_main_device_select_from_list(mmguiapp, strparam); g_free(strparam); /*SMS autoconpletion for contacts*/ mmgui_main_sms_load_contacts_from_system_addressbooks(mmguiapp); /*Import contacts from system address books*/ mmgui_main_contacts_load_from_system_addressbooks(mmguiapp); return TRUE; } static gboolean mmgui_main_settings_load(mmgui_application_t mmguiapp) { gchar *strparam; if (mmguiapp == NULL) return FALSE; if ((mmguiapp->options == NULL) || (mmguiapp->settings == NULL)) return FALSE; #if GTK_CHECK_VERSION(3,4,0) /*RX speed graph color (default 078B2DFF)*/ strparam = gmm_settings_get_string(mmguiapp->settings, "graph_rx_color", MMGUI_MAIN_DEFAULT_RX_GRAPH_RGBA_COLOR); if (!gdk_rgba_parse(&mmguiapp->options->rxtrafficcolor, strparam)) { gdk_rgba_parse(&mmguiapp->options->rxtrafficcolor, MMGUI_MAIN_DEFAULT_RX_GRAPH_RGBA_COLOR); } g_free(strparam); /*TX speed graph color (default 99114DFF)*/ strparam = gmm_settings_get_string(mmguiapp->settings, "graph_tx_color", MMGUI_MAIN_DEFAULT_TX_GRAPH_RGBA_COLOR); if (!gdk_rgba_parse(&mmguiapp->options->txtrafficcolor, strparam)) { gdk_rgba_parse(&mmguiapp->options->txtrafficcolor, MMGUI_MAIN_DEFAULT_TX_GRAPH_RGBA_COLOR); } g_free(strparam); #else /*RX speed graph color (default 078B2D)*/ strparam = gmm_settings_get_string(mmguiapp->settings, "graph_rx_color", MMGUI_MAIN_DEFAULT_RX_GRAPH_RGB_COLOR); if (!gdk_color_parse(strparam, &mmguiapp->options->rxtrafficcolor)) { gdk_color_parse(MMGUI_MAIN_DEFAULT_RX_GRAPH_RGB_COLOR, &mmguiapp->options->rxtrafficcolor); } g_free(strparam); /*TX speed graph color (default 99114D)*/ strparam = gmm_settings_get_string(mmguiapp->settings, "graph_tx_color", MMGUI_MAIN_DEFAULT_TX_GRAPH_RGB_COLOR); if (!gdk_color_parse(strparam, &mmguiapp->options->txtrafficcolor)) { gdk_color_parse(MMGUI_MAIN_DEFAULT_TX_GRAPH_RGB_COLOR, &mmguiapp->options->txtrafficcolor); } g_free(strparam); #endif /*SMS options*/ mmguiapp->options->concatsms = gmm_settings_get_boolean(mmguiapp->settings, "sms_concatenation", FALSE); mmguiapp->options->smsexpandfolders = gmm_settings_get_boolean(mmguiapp->settings, "sms_expand_folders", TRUE); mmguiapp->options->smsoldontop = gmm_settings_get_boolean(mmguiapp->settings, "sms_old_on_top", TRUE); mmguiapp->options->smsvalidityperiod = gmm_settings_get_int(mmguiapp->settings, "sms_validity_period", -1); mmguiapp->options->smsdeliveryreport = gmm_settings_get_boolean(mmguiapp->settings, "sms_send_delivery_report", FALSE); /*Behaviour options*/ mmguiapp->options->hidetotray = gmm_settings_get_boolean(mmguiapp->settings, "behaviour_hide_to_tray", FALSE); mmguiapp->options->usesounds = gmm_settings_get_boolean(mmguiapp->settings, "behaviour_use_sounds", TRUE); mmguiapp->options->askforhide = gmm_settings_get_boolean(mmguiapp->settings, "behaviour_ask_to_hide", TRUE); mmguiapp->options->savegeometry = gmm_settings_get_boolean(mmguiapp->settings, "behaviour_save_geometry", FALSE); /*Modules settings (coreoptions)*/ mmguiapp->coreoptions->enabletimeout = gmm_settings_get_int(mmguiapp->settings, "modules_enable_device_timeout", 20); mmguiapp->coreoptions->sendsmstimeout = gmm_settings_get_int(mmguiapp->settings, "modules_send_sms_timeout", 35); mmguiapp->coreoptions->sendussdtimeout = gmm_settings_get_int(mmguiapp->settings, "modules_send_ussd_timeout", 25); mmguiapp->coreoptions->scannetworkstimeout = gmm_settings_get_int(mmguiapp->settings, "modules_scan_networks_timeout", 60); /*Preferred modules*/ if (mmguiapp->coreoptions->mmmodule == NULL) { mmguiapp->coreoptions->mmmodule = gmm_settings_get_string(mmguiapp->settings, "modules_preferred_modem_manager", NULL); } if (mmguiapp->coreoptions->cmmodule == NULL) { mmguiapp->coreoptions->cmmodule = gmm_settings_get_string(mmguiapp->settings, "modules_preferred_connection_manager", NULL); } /*Window geometry*/ mmguiapp->options->wgwidth = gmm_settings_get_int(mmguiapp->settings, "window_geometry_width", -1); mmguiapp->options->wgheight = gmm_settings_get_int(mmguiapp->settings, "window_geometry_height", -1); mmguiapp->options->wgposx = gmm_settings_get_int(mmguiapp->settings, "window_geometry_x", -1); mmguiapp->options->wgposy = gmm_settings_get_int(mmguiapp->settings, "window_geometry_y", -1); /*If window was minimized on exit*/ mmguiapp->options->minimized = gmm_settings_get_boolean(mmguiapp->settings, "window_state_minimized", FALSE); return TRUE; } static gboolean mmgui_main_application_is_in_autostart(mmgui_application_t mmguiapp) { gchar *linkfile, *desktopfile; struct stat statbuf; gssize len; if (mmguiapp == NULL) return FALSE; /*Form autostart link path using XDG standard*/ linkfile = g_build_filename(g_get_user_config_dir(), "autostart", "modem-manager-gui.desktop", NULL); if (linkfile == NULL) return FALSE; /*Test if link points to the right file*/ if (lstat(linkfile, &statbuf) != -1) { if ((S_ISLNK(statbuf.st_mode)) && (statbuf.st_size > 0)) { desktopfile = g_malloc0(statbuf.st_size + 1); len = readlink(linkfile, desktopfile, statbuf.st_size + 1); if (len != -1) { desktopfile[len] = '\0'; if (g_str_equal(RESOURCE_DESKTOP_FILE, desktopfile)) { g_free(desktopfile); g_free(linkfile); return TRUE; } else { g_free(desktopfile); } } else { g_free(desktopfile); } } } g_free(linkfile); return FALSE; } static gboolean mmgui_main_application_add_to_autostart(mmgui_application_t mmguiapp) { gchar *autostartdir, *linkfile, *desktopfile; struct stat statbuf; gssize len; if (mmguiapp == NULL) return FALSE; /*Create autostart directory tree*/ autostartdir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), "autostart", NULL); if (autostartdir == NULL) return FALSE; if (!g_file_test(autostartdir, G_FILE_TEST_IS_DIR)) { if (g_mkdir_with_parents(autostartdir, S_IRWXU|S_IRGRP|S_IROTH) == -1) { /*Unable to create autostart directory*/ g_free(autostartdir); return FALSE; } } g_free(autostartdir); /*Form autostart link path using XDG standard*/ linkfile = g_build_filename(g_get_user_config_dir(), "autostart", "modem-manager-gui.desktop", NULL); if (linkfile == NULL) return FALSE; if (lstat(linkfile, &statbuf) != -1) { if ((S_ISLNK(statbuf.st_mode)) && (statbuf.st_size > 0)) { desktopfile = g_malloc0(statbuf.st_size + 1); len = readlink(linkfile, desktopfile, statbuf.st_size + 1); if (len != -1) { desktopfile[len] = '\0'; if (!g_str_equal(RESOURCE_DESKTOP_FILE, desktopfile)) { /*Remove wrong symlink*/ g_free(desktopfile); unlink(linkfile); } else { /*Symlink already exists*/ g_free(desktopfile); g_free(linkfile); return TRUE; } } else { /*Remove unreadable symlink*/ g_free(desktopfile); unlink(linkfile); } } else { /*Remove regular file*/ unlink(linkfile); } } /*Create symlink*/ if (symlink(RESOURCE_DESKTOP_FILE, linkfile) == 0) { g_free(linkfile); return TRUE; } g_free(linkfile); return FALSE; } static gboolean mmgui_main_application_remove_from_autostart(mmgui_application_t mmguiapp) { gchar *linkfile; struct stat statbuf; if (mmguiapp == NULL) return FALSE; /*Form autostart link path using XDG standard*/ linkfile = g_build_filename(g_get_user_config_dir(), "autostart", "modem-manager-gui.desktop", NULL); if (linkfile == NULL) return FALSE; if (lstat(linkfile, &statbuf) != -1) { /*Remove symlink*/ unlink(linkfile); g_free(linkfile); return TRUE; } g_free(linkfile); return FALSE; } static gboolean mmgui_main_application_build_user_interface(mmgui_application_t mmguiapp) { GtkBuilder *builder; GError *error; GtkStyleContext *context; GtkWidget *tbimage; gint i; static struct _mmgui_application_data shortcutsdata[MMGUI_MAIN_CONTROL_SHORTCUT_NUMBER]; /*Widgets*/ struct _mmgui_main_widgetset widgetset[] = { /*Window*/ {"window", &(mmguiapp->window->window)}, /*Controls*/ {"toolbar", &(mmguiapp->window->toolbar)}, {"statusbar", &(mmguiapp->window->statusbar)}, {"notebook", &(mmguiapp->window->notebook)}, {"signalimage", &(mmguiapp->window->signalimage)}, /*Toolbar buttons*/ {"devbutton", &(mmguiapp->window->devbutton)}, {"smsbutton", &(mmguiapp->window->smsbutton)}, {"ussdbutton", &(mmguiapp->window->ussdbutton)}, {"infobutton", &(mmguiapp->window->infobutton)}, {"scanbutton", &(mmguiapp->window->scanbutton)}, {"trafficbutton", &(mmguiapp->window->trafficbutton)}, {"contactsbutton", &(mmguiapp->window->contactsbutton)}, /*Dialogs*/ {"aboutdialog", &(mmguiapp->window->aboutdialog)}, {"prefdialog", &(mmguiapp->window->prefdialog)}, {"questiondialog", &(mmguiapp->window->questiondialog)}, {"errordialog", &(mmguiapp->window->errordialog)}, {"exitdialog", &(mmguiapp->window->exitdialog)}, {"progressdialog", &(mmguiapp->window->progressdialog)}, {"progressbar", &(mmguiapp->window->progressbar)}, {"nodevbar", &(mmguiapp->window->nodevbar)}, /*SMS send dialog*/ {"newsmsdialog", &(mmguiapp->window->newsmsdialog)}, {"smsnumberentry", &(mmguiapp->window->smsnumberentry)}, {"smsnumbercombo", &(mmguiapp->window->smsnumbercombo)}, {"smstextview", &(mmguiapp->window->smstextview)}, {"sendsmsbutton", &(mmguiapp->window->sendsmsbutton)}, {"savesmsbutton", &(mmguiapp->window->savesmsbutton)}, /*Devices page*/ {"devlist", &(mmguiapp->window->devlist)}, {"devconnctl", &(mmguiapp->window->devconnctl)}, {"devconneditor", &(mmguiapp->window->devconneditor)}, {"devconncb", &(mmguiapp->window->devconncb)}, /*Connections dialog*/ {"conneditdialog", &(mmguiapp->window->conneditdialog)}, {"connaddtoolbutton", &(mmguiapp->window->connaddtoolbutton)}, {"connremovetoolbutton", &(mmguiapp->window->connremovetoolbutton)}, {"connsavetoolbutton", &(mmguiapp->window->connsavetoolbutton)}, {"contreeview", &(mmguiapp->window->contreeview)}, {"connnamecombobox", &(mmguiapp->window->connnamecombobox)}, {"connnamecomboboxentry", &(mmguiapp->window->connnamecomboboxentry)}, {"connnameapnentry", &(mmguiapp->window->connnameapnentry)}, {"connnethomeradiobutton", &(mmguiapp->window->connnethomeradiobutton)}, {"connnetroamradiobutton", &(mmguiapp->window->connnetroamradiobutton)}, {"connnetidentry", &(mmguiapp->window->connnetidentry)}, {"connauthnumberentry", &(mmguiapp->window->connauthnumberentry)}, {"connauthusernameentry", &(mmguiapp->window->connauthusernameentry)}, {"connauthpassentry", &(mmguiapp->window->connauthpassentry)}, {"conndnsdynradiobutton", &(mmguiapp->window->conndnsdynradiobutton)}, {"conndnsstradiobutton", &(mmguiapp->window->conndnsstradiobutton)}, {"conndns1entry", &(mmguiapp->window->conndns1entry)}, {"conndns2entry", &(mmguiapp->window->conndns2entry)}, /*Add connection dialog*/ {"connadddialog", &(mmguiapp->window->connadddialog)}, /*SMS page*/ {"smsinfobar", &(mmguiapp->window->smsinfobar)}, {"smsinfobarlabel", &(mmguiapp->window->smsinfobarlabel)}, {"smslist", &(mmguiapp->window->smslist)}, {"smstext", &(mmguiapp->window->smstext)}, {"newsmsbutton", &(mmguiapp->window->newsmsbutton)}, {"removesmsbutton", &(mmguiapp->window->removesmsbutton)}, {"answersmsbutton", &(mmguiapp->window->answersmsbutton)}, /*Info page*/ {"devicevlabel", &(mmguiapp->window->devicevlabel)}, {"operatorvlabel", &(mmguiapp->window->operatorvlabel)}, {"operatorcodevlabel", &(mmguiapp->window->operatorcodevlabel)}, {"regstatevlabel", &(mmguiapp->window->regstatevlabel)}, {"modevlabel", &(mmguiapp->window->modevlabel)}, {"imeivlabel", &(mmguiapp->window->imeivlabel)}, {"imsivlabel", &(mmguiapp->window->imsivlabel)}, {"signallevelprogressbar", &(mmguiapp->window->signallevelprogressbar)}, {"3gpplocationvlabel", &(mmguiapp->window->info3gpplocvlabel)}, {"gpslocationvlabel", &(mmguiapp->window->infogpslocvlabel)}, {"equipmentimage", &(mmguiapp->window->equipmentimage)}, {"networkimage", &(mmguiapp->window->networkimage)}, {"locationimage", &(mmguiapp->window->locationimage)}, /*USSD page*/ {"ussdinfobar", &(mmguiapp->window->ussdinfobar)}, {"ussdinfobarlabel", &(mmguiapp->window->ussdinfobarlabel)}, {"ussdentry", &(mmguiapp->window->ussdentry)}, {"ussdcombobox", &(mmguiapp->window->ussdcombobox)}, {"ussdeditor", &(mmguiapp->window->ussdeditor)}, {"ussdsend", &(mmguiapp->window->ussdsend)}, {"ussdtext", &(mmguiapp->window->ussdtext)}, /*Scan page*/ {"scaninfobar", &(mmguiapp->window->scaninfobar)}, {"scaninfobarlabel", &(mmguiapp->window->scaninfobarlabel)}, {"scanlist", &(mmguiapp->window->scanlist)}, {"startscanbutton", &(mmguiapp->window->startscanbutton)}, {"scancreateconnectionbutton", &(mmguiapp->window->scancreateconnectionbutton)}, /*Contacts page*/ {"contactsinfobar", &(mmguiapp->window->contactsinfobar)}, {"contactsinfobarlabel", &(mmguiapp->window->contactsinfobarlabel)}, {"newcontactbutton", &(mmguiapp->window->newcontactbutton)}, {"removecontactbutton", &(mmguiapp->window->removecontactbutton)}, {"smstocontactbutton", &(mmguiapp->window->smstocontactbutton)}, {"contactstreeview", &(mmguiapp->window->contactstreeview)}, /*New contact dialog*/ {"newcontactdialog", &(mmguiapp->window->newcontactdialog)}, {"contactnameentry", &(mmguiapp->window->contactnameentry)}, {"contactnumberentry", &(mmguiapp->window->contactnumberentry)}, {"contactemailentry", &(mmguiapp->window->contactemailentry)}, {"contactgroupentry", &(mmguiapp->window->contactgroupentry)}, {"contactname2entry", &(mmguiapp->window->contactname2entry)}, {"contactnumber2entry", &(mmguiapp->window->contactnumber2entry)}, {"newcontactaddbutton", &(mmguiapp->window->newcontactaddbutton)}, /*Traffic page*/ {"trafficparamslist", &(mmguiapp->window->trafficparamslist)}, {"trafficdrawingarea", &(mmguiapp->window->trafficdrawingarea)}, /*Traffic limits dialog*/ {"trafficlimitsdialog", &(mmguiapp->window->trafficlimitsdialog)}, {"trafficlimitcheckbutton", &(mmguiapp->window->trafficlimitcheckbutton)}, {"trafficamount", &(mmguiapp->window->trafficamount)}, {"trafficunits", &(mmguiapp->window->trafficunits)}, {"trafficmessage", &(mmguiapp->window->trafficmessage)}, {"trafficaction", &(mmguiapp->window->trafficaction)}, {"timelimitcheckbutton", &(mmguiapp->window->timelimitcheckbutton)}, {"timeamount", &(mmguiapp->window->timeamount)}, {"timeunits", &(mmguiapp->window->timeunits)}, {"timemessage", &(mmguiapp->window->timemessage)}, {"timeaction", &(mmguiapp->window->timeaction)}, /*Connections dialog*/ {"conndialog", &(mmguiapp->window->conndialog)}, {"connscrolledwindow", &(mmguiapp->window->connscrolledwindow)}, {"conntreeview", &(mmguiapp->window->conntreeview)}, {"conntermtoolbutton", &(mmguiapp->window->conntermtoolbutton)}, /*Traffic statistics dialog*/ {"trafficstatsdialog", &(mmguiapp->window->trafficstatsdialog)}, {"trafficstatstreeview", &(mmguiapp->window->trafficstatstreeview)}, {"trafficstatsmonthcb", &(mmguiapp->window->trafficstatsmonthcb)}, {"trafficstatsyearcb", &(mmguiapp->window->trafficstatsyearcb)}, /*USSD edition dialog*/ {"ussdeditdialog", &(mmguiapp->window->ussdeditdialog)}, {"ussdedittreeview", &(mmguiapp->window->ussdedittreeview)}, {"newussdtoolbutton", &(mmguiapp->window->newussdtoolbutton)}, {"removeussdtoolbutton", &(mmguiapp->window->removeussdtoolbutton)}, {"ussdencodingtoolbutton", &(mmguiapp->window->ussdencodingtoolbutton)}, /*Preferences dialog*/ {"prefsmsconcat", &(mmguiapp->window->prefsmsconcat)}, {"prefsmsexpand", &(mmguiapp->window->prefsmsexpand)}, {"prefssmsoldontop", &(mmguiapp->window->prefsmsoldontop)}, {"prefsmsvalidityscale", &(mmguiapp->window->prefsmsvalidityscale)}, {"prefsmsreportcb", &(mmguiapp->window->prefsmsreportcb)}, {"preftrafficrxcolor", &(mmguiapp->window->preftrafficrxcolor)}, {"preftraffictxcolor", &(mmguiapp->window->preftraffictxcolor)}, {"prefbehavioursounds", &(mmguiapp->window->prefbehavioursounds)}, {"prefbehaviourhide", &(mmguiapp->window->prefbehaviourhide)}, {"prefbehaviourgeom", &(mmguiapp->window->prefbehaviourgeom)}, {"prefbehaviourautostart", &(mmguiapp->window->prefbehaviourautostart)}, {"prefenabletimeoutscale", &(mmguiapp->window->prefenabletimeoutscale)}, {"prefsendsmstimeoutscale", &(mmguiapp->window->prefsendsmstimeoutscale)}, {"prefsendussdtimeoutscale", &(mmguiapp->window->prefsendussdtimeoutscale)}, {"prefscannetworkstimeoutscale", &(mmguiapp->window->prefscannetworkstimeoutscale)}, {"prefmodulesmmcombo", &(mmguiapp->window->prefmodulesmmcombo)}, {"prefmodulescmcombo", &(mmguiapp->window->prefmodulescmcombo)}, /*Exit dialog*/ {"exitaskagain", &(mmguiapp->window->exitaskagain)}, {"exitcloseradio", &(mmguiapp->window->exitcloseradio)}, {"exithideradio", &(mmguiapp->window->exithideradio)}, /*Start dialog*/ {"startdialog", &(mmguiapp->window->startdialog)}, {"startdialogimage", &(mmguiapp->window->startdialogimage)}, {"startdialogmmcombo", &(mmguiapp->window->startdialogmmcombo)}, {"startdialogcmcombo", &(mmguiapp->window->startdialogcmcombo)} }; /*Toolbar image buttons*/ struct _mmgui_main_widgetset buttonimgset[] = { {RESOURCE_TOOLBAR_DEV, &(mmguiapp->window->devbutton)}, {RESOURCE_TOOLBAR_SMS, &(mmguiapp->window->smsbutton)}, {RESOURCE_TOOLBAR_USSD, &(mmguiapp->window->ussdbutton)}, {RESOURCE_TOOLBAR_INFO, &(mmguiapp->window->infobutton)}, {RESOURCE_TOOLBAR_SCAN, &(mmguiapp->window->scanbutton)}, {RESOURCE_TOOLBAR_CONT, &(mmguiapp->window->contactsbutton)}, {RESOURCE_TOOLBAR_TRAFFIC, &(mmguiapp->window->trafficbutton)} }; /*Image widgets*/ struct _mmgui_main_widgetset imgwidgetset[] = { {RESOURCE_INFO_EQUIPMENT, &(mmguiapp->window->equipmentimage)}, {RESOURCE_INFO_NETWORK, &(mmguiapp->window->networkimage)}, {RESOURCE_INFO_LOCATION, &(mmguiapp->window->locationimage)} }; /*Pixbufs*/ struct _mmgui_main_pixbufset pixbufset[] = { {RESOURCE_MAINWINDOW_ICON, &(mmguiapp->window->mainicon)}, {RESOURCE_SIGNAL_0, &(mmguiapp->window->signal0icon)}, {RESOURCE_SIGNAL_25, &(mmguiapp->window->signal25icon)}, {RESOURCE_SIGNAL_50, &(mmguiapp->window->signal50icon)}, {RESOURCE_SIGNAL_75, &(mmguiapp->window->signal75icon)}, {RESOURCE_SIGNAL_100, &(mmguiapp->window->signal100icon)}, {RESOURCE_SMS_READ, &(mmguiapp->window->smsreadicon)}, {RESOURCE_SMS_UNREAD, &(mmguiapp->window->smsunreadicon)} }; /*Application windows*/ GtkWidget **appwindows[] = { &(mmguiapp->window->window), &(mmguiapp->window->prefdialog), &(mmguiapp->window->aboutdialog), &(mmguiapp->window->questiondialog), &(mmguiapp->window->errordialog), &(mmguiapp->window->progressdialog), &(mmguiapp->window->newsmsdialog), &(mmguiapp->window->ussdeditdialog), &(mmguiapp->window->trafficlimitsdialog), &(mmguiapp->window->conndialog), &(mmguiapp->window->trafficstatsdialog), &(mmguiapp->window->conneditdialog), &(mmguiapp->window->connadddialog), &(mmguiapp->window->newcontactdialog), &(mmguiapp->window->startdialog), }; /*Accelerator closures*/ struct _mmgui_main_closureset closureset[] = { /*Closures for SMS page*/ /*send sms message*/ {MMGUI_MAIN_CONTROL_SHORTCUT_SMS_NEW, &(mmguiapp->window->newsmsclosure)}, /*remove sms message*/ {MMGUI_MAIN_CONTROL_SHORTCUT_SMS_REMOVE, &(mmguiapp->window->removesmsclosure)}, /*answer sms message*/ {MMGUI_MAIN_CONTROL_SHORTCUT_SMS_ANSWER, &(mmguiapp->window->answersmsclosure)}, /*Closures for USSD page*/ /*edit ussd commands*/ {MMGUI_MAIN_CONTROL_SHORTCUT_USSD_EDITOR, &(mmguiapp->window->ussdeditorclosure)}, /*send ussd request*/ {MMGUI_MAIN_CONTROL_SHORTCUT_USSD_SEND, &(mmguiapp->window->ussdsendclosure)}, /*Closures for Scan page*/ /*scan networks*/ {MMGUI_MAIN_CONTROL_SHORTCUT_SCAN_START, &(mmguiapp->window->startscanclosure)}, /*Closures for Traffic page*/ /*limits*/ {MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_LIMIT, &(mmguiapp->window->trafficlimitclosure)}, /*connections*/ {MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_CONNECTIONS, &(mmguiapp->window->trafficconnclosure)}, /*statistics*/ {MMGUI_MAIN_CONTROL_SHORTCUT_TRAFFIC_STATS, &(mmguiapp->window->trafficstatsclosure)}, /*Closures for Contacts page*/ /*add contact*/ {MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_NEW, &(mmguiapp->window->newcontactclosure)}, /*remove contact*/ {MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_REMOVE, &(mmguiapp->window->removecontactclosure)}, /*send sms*/ {MMGUI_MAIN_CONTROL_SHORTCUT_CONTACTS_SMS, &(mmguiapp->window->smstocontactclosure)} }; if (mmguiapp == NULL) return FALSE; error = NULL; builder = gtk_builder_new(); if (gtk_builder_add_from_file(builder, RESOURCE_MAINWINDOW_UI, &error) == 0) { g_printf("User interface file parse error: %s\n", (error->message != NULL) ? error->message : "Unknown"); g_error_free(error); return FALSE; } /*Translation domain*/ gtk_builder_set_translation_domain(builder, RESOURCE_LOCALE_DOMAIN); /*Loading widgets*/ for (i=0; imessage != NULL) ? error->message : "Unknown"); g_error_free(error); } } /*Using images*/ gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(mmguiapp->window->aboutdialog), GDK_PIXBUF(mmguiapp->window->mainicon)); gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->startdialogimage), GDK_PIXBUF(mmguiapp->window->mainicon)); /*Collecting application windows*/ for (i=0; igtkapplication)); if ((*(appwindows[i]) != NULL) && (mmguiapp->window->mainicon != NULL)) { gtk_window_set_icon(GTK_WINDOW(*(appwindows[i])), mmguiapp->window->mainicon); } } /*Setting per-page shortcuts*/ mmguiapp->window->pageshortcuts = NULL; mmguiapp->window->accelgroup = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(mmguiapp->window->window), mmguiapp->window->accelgroup); for (i=0; iwindow->window), "application", mmguiapp->gtkapplication, NULL); gtk_application_window_set_show_menubar(GTK_APPLICATION_WINDOW(mmguiapp->window->window), TRUE); /*Default signal level icon*/ if (mmguiapp->window->signal0icon != NULL) { gtk_image_set_from_pixbuf(GTK_IMAGE(mmguiapp->window->signalimage), mmguiapp->window->signal0icon); } /*Initialize lists and text fields*/ mmgui_main_device_list_init(mmguiapp); mmgui_main_sms_list_init(mmguiapp); mmgui_main_ussd_list_init(mmguiapp); mmgui_main_ussd_accelerators_init(mmguiapp); mmgui_main_scan_list_init(mmguiapp); mmgui_main_contacts_list_init(mmguiapp); mmgui_main_traffic_list_init(mmguiapp); mmgui_main_traffic_accelerators_init(mmguiapp); mmgui_main_traffic_connections_list_init(mmguiapp); mmgui_main_traffic_traffic_statistics_list_init(mmguiapp); /*Toolbar style*/ context = gtk_widget_get_style_context(GTK_WIDGET(mmguiapp->window->toolbar)); gtk_style_context_add_class(context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR); /*Binding signal handlers defined by Glade*/ gtk_builder_connect_signals(builder, mmguiapp); /*Builder object is not needed anymore*/ g_object_unref(G_OBJECT(builder)); mmgui_main_tray_icon_init(mmguiapp); return TRUE; } static void mmgui_main_application_terminate(mmgui_application_t mmguiapp) { if (mmguiapp == NULL) return; #if GLIB_CHECK_VERSION(2,32,0) g_application_quit(G_APPLICATION(mmguiapp->gtkapplication)); #else GtkWidget *win; GList *wlist, *wnext; wlist = gtk_application_get_windows(GTK_APPLICATION(mmguiapp->gtkapplication)); while (wlist) { win = wlist->data; wnext = wlist->next; gtk_widget_destroy(GTK_WIDGET(win)); wlist = wnext; } #endif } static void mmgui_main_application_startup_signal(GtkApplication *application, gpointer data) { mmgui_application_t mmguiapp; GtkSettings *gtksettings; gboolean showappmenu, showmenubar; GMenu *menu, *actsection, *appsection, *prefsection, *helpsection, *quitsection; static GActionEntry app_actions[] = { { "section", mmgui_main_ui_section_menu_item_activate_signal, "s", "'devices'", NULL }, { "preferences", mmgui_main_ui_preferences_menu_item_activate_signal, NULL, NULL, NULL }, { "help", mmgui_main_ui_help_menu_item_activate_signal, NULL, NULL, NULL }, { "about", mmgui_main_ui_about_menu_item_activate_signal, NULL, NULL, NULL }, { "quit", mmgui_main_ui_exit_menu_item_activate_signal, NULL, NULL, NULL }, }; mmguiapp = (mmgui_application_t)data; if ((application == NULL) || (mmguiapp == NULL)) return; g_action_map_add_action_entries(G_ACTION_MAP(application), app_actions, G_N_ELEMENTS(app_actions), mmguiapp); showappmenu = FALSE; showmenubar = FALSE; gtksettings = gtk_settings_get_default(); g_object_get(G_OBJECT(gtksettings), "gtk-shell-shows-app-menu", &showappmenu, "gtk-shell-shows-menubar", &showmenubar, NULL); /*Main menu*/ menu = g_menu_new(); if ((showmenubar) || ((!showappmenu) && (!showmenubar))) { /*Classic menubar*/ /*Pages*/ appsection = g_menu_new(); g_menu_append(appsection, _("_Devices"), "app.section::devices"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::devices", (const gchar*[]) {"F1", NULL}); #else gtk_application_add_accelerator(application, "F1", "app.section", g_variant_new_string("devices")); #endif g_menu_append(appsection, _("_SMS"), "app.section::sms"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::sms", (const gchar*[]) {"F2", NULL}); #else gtk_application_add_accelerator(application, "F2", "app.section", g_variant_new_string("sms")); #endif g_menu_append(appsection, _("_USSD"), "app.section::ussd"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::ussd", (const gchar*[]) {"F3", NULL}); #else gtk_application_add_accelerator(application, "F3", "app.section", g_variant_new_string("ussd")); #endif g_menu_append(appsection, _("_Info"), "app.section::info"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::info", (const gchar*[]) {"F4", NULL}); #else gtk_application_add_accelerator(application, "F4", "app.section", g_variant_new_string("info")); #endif g_menu_append(appsection, _("S_can"), "app.section::scan"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::scan", (const gchar*[]) {"F5", NULL}); #else gtk_application_add_accelerator(application, "F5", "app.section", g_variant_new_string("scan")); #endif g_menu_append(appsection, _("_Traffic"), "app.section::traffic"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::traffic", (const gchar*[]) {"F6", NULL}); #else gtk_application_add_accelerator(application, "F6", "app.section", g_variant_new_string("traffic")); #endif g_menu_append(appsection, _("C_ontacts"), "app.section::contacts"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::contacts", (const gchar*[]) {"F7", NULL}); #else gtk_application_add_accelerator(application, "F7", "app.section", g_variant_new_string("contacts")); #endif /*Quit*/ quitsection = g_menu_new(); g_menu_append(quitsection, _("_Quit"), "app.quit"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.quit", (const gchar*[]) {"q", NULL}); #else gtk_application_add_accelerator(application, "q", "app.quit", NULL); #endif /*Actions menu*/ actsection = g_menu_new(); g_menu_append_section(actsection, NULL, G_MENU_MODEL(appsection)); g_menu_append_section(actsection, NULL, G_MENU_MODEL(quitsection)); g_menu_append_submenu(menu, _("_Actions"), G_MENU_MODEL(actsection)); /*Preferences*/ prefsection = g_menu_new(); g_menu_append(prefsection, _("_Preferences"), "app.preferences"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.preferences", (const gchar*[]) {"p", NULL}); #else gtk_application_add_accelerator(application, "p", "app.preferences", NULL); #endif /*Edit menu*/ g_menu_append_submenu(menu, _("_Edit"), G_MENU_MODEL(prefsection)); /*Help*/ helpsection = g_menu_new(); g_menu_append(helpsection, _("_Help"), "app.help"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.help", (const gchar*[]) {"F1", NULL}); #else gtk_application_add_accelerator(application, "F1", "app.help", NULL); #endif g_menu_append(helpsection, _("_About"), "app.about"); /*Help menu*/ g_menu_append_submenu(menu, _("_Help"), G_MENU_MODEL(helpsection)); /*Set application menubar*/ gtk_application_set_menubar(application, G_MENU_MODEL(menu)); } else if (showappmenu) { /*GNOME 3 - style appmenu*/ /*Toolbar actions*/ appsection = g_menu_new(); g_menu_append(appsection, _("Devices"), "app.section::devices"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::devices", (const gchar*[]) {"F1", NULL}); #else gtk_application_add_accelerator(application, "F1", "app.section", g_variant_new_string("devices")); #endif g_menu_append(appsection, _("SMS"), "app.section::sms"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::sms", (const gchar*[]) {"F2", NULL}); #else gtk_application_add_accelerator(application, "F2", "app.section", g_variant_new_string("sms")); #endif g_menu_append(appsection, _("USSD"), "app.section::ussd"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::ussd", (const gchar*[]) {"F3", NULL}); #else gtk_application_add_accelerator(application, "F3", "app.section", g_variant_new_string("ussd")); #endif g_menu_append(appsection, _("Info"), "app.section::info"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::info", (const gchar*[]) {"F4", NULL}); #else gtk_application_add_accelerator(application, "F4", "app.section", g_variant_new_string("info")); #endif g_menu_append(appsection, _("Scan"), "app.section::scan"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::scan", (const gchar*[]) {"F5", NULL}); #else gtk_application_add_accelerator(application, "F5", "app.section", g_variant_new_string("scan")); #endif g_menu_append(appsection, _("Traffic"), "app.section::traffic"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::traffic", (const gchar*[]) {"F6", NULL}); #else gtk_application_add_accelerator(application, "F6", "app.section", g_variant_new_string("traffic")); #endif g_menu_append(appsection, _("Contacts"), "app.section::contacts"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.section::contacts", (const gchar*[]) {"F7", NULL}); #else gtk_application_add_accelerator(application, "F7", "app.section", g_variant_new_string("contacts")); #endif g_menu_append_section(menu, NULL, G_MENU_MODEL(appsection)); /*Preferences*/ prefsection = g_menu_new(); g_menu_append(prefsection, _("Preferences"), "app.preferences"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.preferences", (const gchar*[]) {"p", NULL}); #else gtk_application_add_accelerator(application, "p", "app.preferences", NULL); #endif g_menu_append_section(menu, NULL, G_MENU_MODEL(prefsection)); /*Help*/ helpsection = g_menu_new(); g_menu_append(helpsection, _("Help"), "app.help"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.help", (const gchar*[]) {"F1", NULL}); #else gtk_application_add_accelerator(application, "F1", "app.help", NULL); #endif g_menu_append(helpsection, _("About"), "app.about"); g_menu_append_section(menu, NULL, G_MENU_MODEL(helpsection)); /*Quit*/ quitsection = g_menu_new(); g_menu_append(quitsection, _("Quit"), "app.quit"); #if GTK_CHECK_VERSION(3,12,0) gtk_application_set_accels_for_action(application, "app.quit", (const gchar*[]) {"q", NULL}); #else gtk_application_add_accelerator(application, "q", "app.quit", NULL); #endif g_menu_append_section(menu, NULL, G_MENU_MODEL(quitsection)); /*Set application menu*/ gtk_application_set_app_menu(application, G_MENU_MODEL(menu)); } g_object_unref(menu); } static void mmgui_main_application_activate_signal(GtkApplication *application, gpointer data) { mmgui_application_t mmguiapp; GList *windowlist; mmguiapp = (mmgui_application_t)data; if ((application == NULL) || (mmguiapp == NULL)) return; windowlist = gtk_application_get_windows(GTK_APPLICATION(application)); if (windowlist != NULL) { /*Present main window*/ gtk_window_present(GTK_WINDOW(windowlist->data)); /*Save window state*/ mmguiapp->options->minimized = FALSE; gmm_settings_set_boolean(mmguiapp->settings, "window_state_minimized", mmguiapp->options->minimized); } else { if (mmgui_main_application_build_user_interface(mmguiapp)) { /*Add main window to application window list*/ gtk_application_add_window(GTK_APPLICATION(application), GTK_WINDOW(mmguiapp->window->window)); /*Settings object*/ mmguiapp->settings = gmm_settings_open(RESOURCE_LOCALE_DOMAIN, "settings.conf"); /*Load global settings*/ mmgui_main_settings_load(mmguiapp); /*Show start dialog to select preferred modules*/ if ((mmguiapp->coreoptions->mmmodule == NULL) || (mmguiapp->coreoptions->cmmodule == NULL)) { mmgui_main_ui_start_dialog(mmguiapp); } /*Core object*/ mmguiapp->core = mmguicore_new(mmgui_main_event_callback/*, mmgui_main_connections_sync_callback*/, mmguiapp->coreoptions, mmguiapp); if (mmguiapp->core == NULL) { mmgui_main_application_unresolved_error(mmguiapp, _("Error while initialization"), _("No one modem manager is available")); return; } /*Upadate library cache: name needed libraries first*/ mmguiapp->libcache = mmgui_libpaths_cache_new("libnotify", "libcanberra", "libebook-1.2", "libmessaging-menu", "libindicate", NULL); /*Notifications object*/ mmguiapp->notifications = mmgui_notifications_new(mmguiapp->libcache); /*Address books object*/ mmguiapp->addressbooks = mmgui_addressbooks_new(mmguiapp->libcache); /*Open ayatana interface*/ mmguiapp->ayatana = mmgui_ayatana_new(mmguiapp->libcache, mmgui_main_ayatana_event_callback, mmguiapp); /*Get available devices*/ if (mmguiapp->core != NULL) { if (mmguicore_devices_enum(mmguiapp->core)) { mmgui_main_device_list_fill(mmguiapp); } } /*Load UI-specific settings and open device if any*/ mmgui_main_settings_ui_load(mmguiapp); /*Finally show window*/ if ((!mmguiapp->options->invisible) && (!mmguiapp->options->minimized)) { gtk_widget_show(mmguiapp->window->window); } /*Restore window geometry*/ if (mmguiapp->options->savegeometry) { if ((mmguiapp->options->wgwidth >= 1) && (mmguiapp->options->wgheight >= 1)) { gtk_window_resize(GTK_WINDOW(mmguiapp->window->window), mmguiapp->options->wgwidth, mmguiapp->options->wgheight); gtk_window_move(GTK_WINDOW(mmguiapp->window->window), mmguiapp->options->wgposx, mmguiapp->options->wgposy); } } /*Redraw traffic graph signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->trafficdrawingarea), "draw", G_CALLBACK(mmgui_main_traffic_speed_plot_draw), mmguiapp); } else { mmgui_main_application_unresolved_error(mmguiapp, _("Error while initialization"), _("Interface building error")); return; } } } static void mmgui_main_application_shutdown_signal(GtkApplication *application, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if ((application == NULL) || (mmguiapp == NULL)) return; /*Close library cache*/ mmgui_libpaths_cache_close(mmguiapp->libcache); /*Close notifications interface*/ mmgui_notifications_close(mmguiapp->notifications); /*Close addressbooks interface*/ mmgui_addressbooks_close(mmguiapp->addressbooks); /*Close ayatana interface*/ mmgui_ayatana_close(mmguiapp->ayatana); /*Close core interface*/ mmguicore_close(mmguiapp->core); /*Close settings interface*/ gmm_settings_close(mmguiapp->settings); } static void mmgui_main_modules_list(void) { GSList *modulelist; GSList *iterator; mmguimodule_t module; guint mtype; guint mtypes[2] = {MMGUI_MODULE_TYPE_MODEM_MANAGER, MMGUI_MODULE_TYPE_CONNECTION_MANGER}; /*Enumerate modules*/ modulelist = mmguicore_modules_info(); if (modulelist != NULL) { for (mtype = 0; mtype < sizeof(mtypes)/sizeof(guint); mtype++) { /*New module type*/ switch (mtype) { case MMGUI_MODULE_TYPE_MODEM_MANAGER: g_printf(_("Modem management modules:\n")); g_printf(" %15s | %s\n", _("Module"), _("Description")); break; case MMGUI_MODULE_TYPE_CONNECTION_MANGER: g_printf(_("Connection management modules:\n")); g_printf(" %15s | %s\n", _("Module"), _("Description")); break; default: break; } for (iterator=modulelist; iterator; iterator=iterator->next) { module = (mmguimodule_t)iterator->data; if (module->type == mtypes[mtype]) { /*New module*/ g_printf("%3s%3s %15s | %s\n", module->activatable ? "[A]" : "[-]", module->applicable ? "[R]" : "[-]", module->shortname, module->description); } } } g_slist_free(modulelist); } } #ifdef __GLIBC__ static void mmgui_main_application_backtrace_signal_handler(int sig, siginfo_t *info, ucontext_t *ucontext) { void *trace[10]; gchar **tracepoints = (char **)NULL; gint i, tracelen = 0; if (sig == SIGSEGV) { tracelen = backtrace(trace, 10); #if (defined(__i386__)) trace[1] = (void *) ucontext->uc_mcontext.gregs[REG_EIP]; #elif (defined(__x86_64__)) trace[1] = (void *) ucontext->uc_mcontext.gregs[REG_RIP]; #elif (defined(__ppc__) || defined(__powerpc__)) trace[1] = (void *) ucontext->uc_mcontext.regs->nip; #elif (defined(__arm__)) trace[1] = (void *) ucontext->uc_mcontext.arm_pc; #endif g_printf(_("Segmentation fault at address: %p\n"), info->si_addr); if (tracelen > 0) { g_printf(_("Stack trace:\n")); tracepoints = backtrace_symbols(trace, tracelen); for (i=1; ioptions = g_new0(struct _mmgui_cli_options, 1); mmguiapp->window = g_new0(struct _mmgui_main_window, 1); mmguiapp->coreoptions = g_new0(struct _mmgui_core_options, 1); /*Default core options*/ mmguiapp->options->invisible = FALSE; mmguiapp->coreoptions->mmmodule = NULL; mmguiapp->coreoptions->cmmodule = NULL; mmguiapp->coreoptions->trafficenabled = FALSE; mmguiapp->coreoptions->trafficamount = 150; mmguiapp->coreoptions->trafficunits = 0; mmguiapp->coreoptions->trafficmessage = NULL; mmguiapp->coreoptions->trafficaction = 0; mmguiapp->coreoptions->trafficfull = 0; mmguiapp->coreoptions->trafficexecuted = FALSE; mmguiapp->coreoptions->timeenabled = FALSE; mmguiapp->coreoptions->timeamount = 60; mmguiapp->coreoptions->timeunits = 0; mmguiapp->coreoptions->timemessage = NULL; mmguiapp->coreoptions->timeaction = 0; mmguiapp->coreoptions->timefull = 0; mmguiapp->coreoptions->timeexecuted = FALSE; listmodules = FALSE; //Predefined CLI options GOptionEntry entries[] = { { "invisible", 'i', 0, G_OPTION_ARG_NONE, &mmguiapp->options->invisible, _("Do not show window on start"), NULL }, { "mmmodule", 'm', 0, G_OPTION_ARG_STRING, &mmguiapp->coreoptions->mmmodule, _("Use specified modem management module"), NULL }, { "cmmodule", 'c', 0, G_OPTION_ARG_STRING, &mmguiapp->coreoptions->cmmodule, _("Use specified connection management module"), NULL }, { "listmodules", 'l', 0, G_OPTION_ARG_NONE, &listmodules, _("List all available modules and exit"), NULL }, { NULL } }; //Locale #ifndef LC_ALL #define LC_ALL 0 #endif //Backtrace handler #ifdef __GLIBC__ struct sigaction btsa; btsa.sa_sigaction = (void *)mmgui_main_application_backtrace_signal_handler; sigemptyset(&btsa.sa_mask); btsa.sa_flags = SA_RESTART | SA_SIGINFO; /*Segmentation fault signal*/ sigaction(SIGSEGV, &btsa, NULL); #endif /*Termination handler*/ termsa.sa_sigaction = (void *)mmgui_main_application_termination_signal_handler; sigemptyset(&termsa.sa_mask); termsa.sa_flags = SA_RESTART | SA_SIGINFO; /*Termination, interrruption and hungup signals*/ sigaction(SIGTERM, &termsa, NULL); sigaction(SIGINT, &termsa, NULL); sigaction(SIGHUP, &termsa, NULL); setlocale(LC_ALL, ""); bindtextdomain(RESOURCE_LOCALE_DOMAIN, RESOURCE_LOCALE_DIR); bind_textdomain_codeset(RESOURCE_LOCALE_DOMAIN, "UTF-8"); textdomain(RESOURCE_LOCALE_DOMAIN); g_set_application_name("Modem Manager GUI"); //CLI options parsing optcontext = g_option_context_new(_("- tool for EDGE/3G/4G modem specific functions control")); g_option_context_add_main_entries(optcontext, entries, RESOURCE_LOCALE_DOMAIN); g_option_context_add_group(optcontext, gtk_get_option_group(TRUE)); error = NULL; if (!g_option_context_parse(optcontext, &argc, &argv, &error)) { g_print(_("Command line option parsing failed: %s\n"), (error->message != NULL) ? error->message : "Unknown"); g_option_context_free(optcontext); g_error_free(error); g_free(mmguiapp->options); g_free(mmguiapp->window); g_free(mmguiapp); return EXIT_FAILURE; } g_option_context_free(optcontext); if (listmodules) { /*Modules listing*/ mmgui_main_modules_list(); /*Exit*/ g_free(mmguiapp->coreoptions); g_free(mmguiapp->options); g_free(mmguiapp->window); g_free(mmguiapp); return EXIT_SUCCESS; } //Run GTK+ application mmguiapp->gtkapplication = gtk_application_new("org.gtk.ModemManagerGUI", 0); g_signal_connect(mmguiapp->gtkapplication, "startup", G_CALLBACK(mmgui_main_application_startup_signal), mmguiapp); g_signal_connect(mmguiapp->gtkapplication, "activate", G_CALLBACK(mmgui_main_application_activate_signal), mmguiapp); g_signal_connect(mmguiapp->gtkapplication, "shutdown", G_CALLBACK(mmgui_main_application_shutdown_signal), mmguiapp); status = g_application_run(G_APPLICATION(mmguiapp->gtkapplication), argc, argv); //Free previously allocated resources g_object_unref(G_OBJECT(mmguiapp->gtkapplication)); if (mmguiapp->options != NULL) { g_free(mmguiapp->options); } if (mmguiapp->window != NULL) { g_free(mmguiapp->window); } if (mmguiapp->coreoptions != NULL) { if (mmguiapp->coreoptions->mmmodule != NULL) { g_free(mmguiapp->coreoptions->mmmodule); } if (mmguiapp->coreoptions->cmmodule != NULL) { g_free(mmguiapp->coreoptions->cmmodule); } if (mmguiapp->coreoptions->trafficmessage != NULL) { g_free(mmguiapp->coreoptions->trafficmessage); } if (mmguiapp->coreoptions->timemessage != NULL) { g_free(mmguiapp->coreoptions->timemessage); } g_free(mmguiapp->coreoptions); } if (mmguiapp != NULL) { g_free(mmguiapp); } return status; } modem-manager-gui-0.0.17.1/src/mmguicore.c0000644000175000017500000025564012400651050016624 0ustar alexalex/* * mmguicore.c * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include "mmguicore.h" #include "smsdb.h" #include "trafficdb.h" #include "netlink.h" #include "resources.h" /*Module*/ #define MMGUI_MODULE_FILE_PREFIX '_' #define MMGUI_MODULE_FILE_EXTENSION ".so" /*Cache file*/ #define MMGUICORE_CACHE_DIR "modem-manager-gui" #define MMGUICORE_CACHE_FILE "modules.conf" #define MMGUICORE_CACHE_PERM 0755 /*Cache file sections*/ #define MMGUICORE_FILE_ROOT_SECTION "cache" #define MMGUICORE_FILE_TIMESTAMP "timestamp" /*Module entry*/ #define MMGUICORE_FILE_IDENTIFIER "identifier" #define MMGUICORE_FILE_TYPE "type" #define MMGUICORE_FILE_REQUIREMENT "requirement" #define MMGUICORE_FILE_PRIORITY "priority" #define MMGUICORE_FILE_FUNCTIONS "functions" #define MMGUICORE_FILE_DESCRIPTION "description" #define MMGUICORE_FILE_SERVICENAME "servicename" /*SMS parameters*/ #define MMGUI_MIN_SMS_NUMBER_LENGTH 3 #define MMGUI_MAX_SMS_NUMBER_LENGTH 20 /*USSD parameters*/ #define MMGUI_MIN_USSD_REQUEST_LENGTH 1 #define MMGUI_MAX_USSD_REQUEST_LENGTH 160 /*Commands*/ #define MMGUI_THREAD_STOP_CMD 0x00 enum _mmgui_core_dbus_start_reply_status { MMGUI_CORE_DBUS_START_REPLY_ALREADY_RUNNING = 2, MMGUI_CORE_DBUS_START_REPLY_SUCCESS = 1 }; gboolean mmguicore_devices_add(mmguicore_t mmguicore, mmguidevice_t device); gboolean mmguicore_devices_remove(mmguicore_t mmguicore, guint deviceid); gboolean mmguicore_devices_close(mmguicore_t mmguicore); void mmguicore_networks_scan_free(GSList *networks); static void mmguicore_contacts_free(GSList *contacts); static guint mmguicore_contacts_enum(mmguicore_t mmguicore); static gpointer mmguicore_work_thread(gpointer data); static void mmguicore_traffic_count(mmguicore_t mmguicore, guint64 rxbytes, guint64 txbytes); static void mmguicore_traffic_zero(mmguicore_t mmguicore); static void mmguicore_traffic_limits(mmguicore_t mmguicore); static void mmguicore_event_callback(enum _mmgui_event event, gpointer mmguicore, gpointer data) { mmguicore_t mmguicorelc; mmguicorelc = (mmguicore_t)mmguicore; if (mmguicorelc == NULL) return; switch (event) { case MMGUI_EVENT_DEVICE_ADDED: mmguicore_devices_add(mmguicore, (mmguidevice_t)data); if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_DEVICE_REMOVED: mmguicore_devices_remove(mmguicore, GPOINTER_TO_UINT(data)); if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_DEVICE_ENABLED_STATUS: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_DEVICE_BLOCKED_STATUS: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_DEVICE_CONNECTION_STATUS: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_SMS_LIST_READY: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_SMS_COMPLETED: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_SMS_SENT: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_USSD_RESULT: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_SCAN_RESULT: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_SIGNAL_LEVEL_CHANGE: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_NETWORK_MODE_CHANGE: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_LOCATION_CHANGE: if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_MODEM_ENABLE_RESULT: /*Update device information*/ if (mmguicorelc->devices_information_func != NULL) { (mmguicorelc->devices_information_func)(mmguicorelc); } if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; case MMGUI_EVENT_EXTEND_CAPABILITIES: if (GPOINTER_TO_INT(data) == MMGUI_CAPS_CONTACTS) { /*Export contacts*/ if (mmguicorelc->device->contactscaps & MMGUI_CONTACTS_CAPS_EXPORT) { mmguicore_contacts_enum(mmguicore); } } /*Forward event*/ if (mmguicorelc->extcb != NULL) { (mmguicorelc->extcb)(event, mmguicorelc, data, mmguicorelc->userdata); } break; default: break; } } static gboolean mmguicore_system_services_activate(gchar *interface, guint *status) { GDBusConnection *connection; GDBusProxy *proxy; gboolean res; GVariant *statusv; GError *error; if (interface == NULL) return FALSE; error = NULL; connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if ((connection == NULL) && (error != NULL)) { g_printf("Core error: %s\n", error->message); g_error_free(error); return FALSE; } error = NULL; proxy = g_dbus_proxy_new_sync(connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", NULL, &error); if ((proxy == NULL) && (error != NULL)) { g_printf("Core error: %s\n", error->message); g_error_free(error); g_object_unref(connection); return FALSE; } error = NULL; statusv = g_dbus_proxy_call_sync(proxy, "StartServiceByName", g_variant_new("(su)", interface, 0), 0, -1, NULL, &error); if ((statusv == NULL) && (error != NULL)) { g_printf("Core error: %s\n", error->message); g_error_free(error); res = FALSE; } else { if (status != NULL) { g_variant_get(statusv, "(u)", status); g_debug("Service start status: %u\n", *status); } res = TRUE; } g_object_unref(proxy); g_object_unref(connection); return res; } static void mmguicore_system_services_destroy_notify(gpointer data) { if (data != NULL) g_free(data); } static GHashTable *mmguicore_system_services_enum(gboolean activatable) { GDBusConnection *connection; GDBusProxy *proxy; GVariant *services; gchar *command; GError *error; GVariantIter siterl1, siterl2; GVariant *snodel1, *snodel2; gsize snamesize; gchar *servicename; GHashTable *serviceshash; error = NULL; connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); if ((connection == NULL) && (error != NULL)) { g_debug("Core error: %s\n", error->message); g_error_free(error); return NULL; } error = NULL; proxy = g_dbus_proxy_new_sync(connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", NULL, &error); if ((proxy == NULL) && (error != NULL)) { g_debug("Core error: %s\n", error->message); g_error_free(error); g_object_unref(connection); return NULL; } if (activatable) { command = "ListActivatableNames"; } else { command = "ListNames"; } error = NULL; services = g_dbus_proxy_call_sync(proxy, command, NULL, 0, -1, NULL, &error); if ((services == NULL) && (error != NULL)) { g_debug("Core error: %s\n", error->message); g_error_free(error); g_object_unref(proxy); g_object_unref(connection); return NULL; } serviceshash = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, mmguicore_system_services_destroy_notify); g_variant_iter_init(&siterl1, services); while ((snodel1 = g_variant_iter_next_value(&siterl1)) != NULL) { g_variant_iter_init(&siterl2, snodel1); while ((snodel2 = g_variant_iter_next_value(&siterl2)) != NULL) { snamesize = 256; servicename = g_strdup(g_variant_get_string(snodel2, &snamesize)); //g_printf("SERVICE (%s) %s\n", command, servicename); g_hash_table_insert(serviceshash, (gpointer)servicename, (gpointer)servicename); g_variant_unref(snodel2); } g_variant_unref(snodel1); } g_variant_unref(services); g_object_unref(proxy); g_object_unref(connection); return serviceshash; } static gint mmguicore_modules_sort(gconstpointer a, gconstpointer b) { mmguimodule_t mod1, mod2; mod1 = (mmguimodule_t)a; mod2 = (mmguimodule_t)b; if (mod1->priority == mod2->priority) { if (mod1->identifier == mod2->identifier) { return 0; } else if (mod1->identifier > mod2->identifier) { return -1; } else if (mod1->identifier < mod2->identifier) { return 1; } } else if (mod1->priority > mod2->priority) { return -1; } else if (mod1->priority < mod2->priority) { return 1; } return 0; } static gchar *mmguicore_modules_extract_name(const gchar *filename, gchar *buffer, gsize *bufsize) { gchar *segend, *segstart; gsize namelen; if ((filename == NULL) || (buffer == NULL) || (bufsize == NULL)) return NULL; segstart = strchr(filename, MMGUI_MODULE_FILE_PREFIX); if (segstart != NULL) { segend = strstr(segstart + 1, MMGUI_MODULE_FILE_EXTENSION); if (segend != NULL) { namelen = segend - segstart - 1; if (namelen != 0) { if (namelen >= *bufsize) { namelen = *bufsize - 1; } strncpy(buffer, segstart + 1, namelen); buffer[namelen] = '\0'; *bufsize = namelen; return buffer; } } } *bufsize = 0; return NULL; } static gboolean mmguicore_modules_cache_open(mmguicore_t mmguicore) { gchar *confpath; time_t cachetime; struct stat statbuf; gchar **groups; gsize numgroups; gint i; GError *error; if (mmguicore == NULL) return FALSE; /*Do not update cache by default*/ mmguicore->updatecache = FALSE; /*Cache file directory*/ confpath = g_build_path(G_DIR_SEPARATOR_S, g_get_user_cache_dir(), MMGUICORE_CACHE_DIR, NULL); /*Recursive directory creation*/ if (g_mkdir_with_parents(confpath, MMGUICORE_CACHE_PERM) != 0) { g_debug("No write access to program cache directory"); g_free(confpath); return FALSE; } g_free(confpath); /*Parameters of modules directory*/ if (stat(RESOURCE_MODULES_DIR, &statbuf) != 0) { g_debug("No access to modules directory"); return FALSE; } /*Cache file name*/ mmguicore->cachefilename = g_build_filename(g_get_user_cache_dir(), MMGUICORE_CACHE_DIR, MMGUICORE_CACHE_FILE, NULL); /*Cache file object*/ mmguicore->cachekeyfile = g_key_file_new(); /*Modules directory modification time */ mmguicore->updcachetime = statbuf.st_mtime; error = NULL; if (!g_key_file_load_from_file(mmguicore->cachekeyfile, mmguicore->cachefilename, G_KEY_FILE_NONE, &error)) { mmguicore->updatecache = TRUE; g_debug("Local cache file loading error: %s", error->message); g_error_free(error); } else { error = NULL; if (g_key_file_has_key(mmguicore->cachekeyfile, MMGUICORE_FILE_ROOT_SECTION, MMGUICORE_FILE_TIMESTAMP, &error)) { error = NULL; cachetime = (time_t)g_key_file_get_uint64(mmguicore->cachekeyfile, MMGUICORE_FILE_ROOT_SECTION, MMGUICORE_FILE_TIMESTAMP, &error); if (error == NULL) { if (difftime(cachetime, mmguicore->updcachetime) != 0.0) { groups = g_key_file_get_groups(mmguicore->cachekeyfile, &numgroups); if ((groups != NULL) && (numgroups > 0)) { for (i=0; icachekeyfile, groups[i], &error); if (error != NULL) { g_debug("Unable to remove cached module information: %s", error->message); g_error_free(error); } } g_strfreev(groups); } mmguicore->updatecache = TRUE; g_debug("Local cache is outdated"); } else { mmguicore->updatecache = FALSE; g_debug("Local cache file is up to date"); } } else { mmguicore->updatecache = TRUE; g_debug("Local cache contain unreadable timestamp: %s", error->message); g_error_free(error); } } else { mmguicore->updatecache = TRUE; g_debug("Local cache does not contain timestamp: %s", error->message); g_error_free(error); } } return TRUE; } static gboolean mmguicore_modules_cache_close(mmguicore_t mmguicore) { gchar *filedata; gsize datasize; GError *error; if (mmguicore == NULL) return FALSE; if ((mmguicore->cachefilename == NULL) || (mmguicore->cachekeyfile == NULL)) return FALSE; if (mmguicore->updatecache) { /*Save timestamp*/ g_key_file_set_int64(mmguicore->cachekeyfile, MMGUICORE_FILE_ROOT_SECTION, MMGUICORE_FILE_TIMESTAMP, (gint64)mmguicore->updcachetime); /*Write to file*/ error = NULL; filedata = g_key_file_to_data(mmguicore->cachekeyfile, &datasize, &error); if (filedata != NULL) { if (!g_file_set_contents(mmguicore->cachefilename, filedata, datasize, &error)) { g_debug("No data saved to local cache file: %s", error->message); g_error_free(error); } g_free(filedata); } } /*Free resources*/ g_free(mmguicore->cachefilename); g_key_file_free(mmguicore->cachekeyfile); return TRUE; } static gboolean mmguicore_modules_cache_add_module(mmguicore_t mmguicore, mmguimodule_t module) { if ((mmguicore == NULL) || (module == NULL)) return FALSE; if ((!mmguicore->updatecache) || (strlen(module->filename) == 0)) return FALSE; /*Save main parameters*/ g_key_file_set_integer(mmguicore->cachekeyfile, module->filename, MMGUICORE_FILE_IDENTIFIER, module->identifier); g_key_file_set_integer(mmguicore->cachekeyfile, module->filename, MMGUICORE_FILE_TYPE, module->type); g_key_file_set_integer(mmguicore->cachekeyfile, module->filename, MMGUICORE_FILE_REQUIREMENT, module->requirement); g_key_file_set_integer(mmguicore->cachekeyfile, module->filename, MMGUICORE_FILE_PRIORITY, module->priority); g_key_file_set_integer(mmguicore->cachekeyfile, module->filename, MMGUICORE_FILE_FUNCTIONS, module->functions); g_key_file_set_string(mmguicore->cachekeyfile, module->filename, MMGUICORE_FILE_DESCRIPTION, module->description); g_key_file_set_string(mmguicore->cachekeyfile, module->filename, MMGUICORE_FILE_SERVICENAME, module->servicename); return TRUE; } static gint mmguicore_modules_cache_get_enumeration_value(GKeyFile *keyfile, gchar *group, gchar *parameter, gint firstvalue, ...) { va_list args; gint cachedvalue, enumvalue, res; if ((keyfile == NULL) || (group == NULL) || (parameter == NULL)) return -1; if (!g_key_file_has_key(keyfile, group, parameter, NULL)) { g_debug("No parameter '%s' found in cache", parameter); return -1; } cachedvalue = g_key_file_get_integer(keyfile, group, parameter, NULL); if ((firstvalue == -1) || (cachedvalue == firstvalue)) { /*No range for output value or first value is used*/ return cachedvalue; } res = -1; va_start(args, firstvalue); enumvalue = va_arg(args, gint); while (enumvalue != -1) { if (enumvalue == cachedvalue) { res = enumvalue; break; } else { enumvalue = va_arg(args, gint); } } if (res == -1) { g_debug("Parameter '%s' value is out of range", parameter); } return res; } static gchar *mmguicore_modules_cache_get_string_value(GKeyFile *keyfile, gchar *group, gchar *parameter, gchar *target, gsize size) { gchar *cachedvalue, *res; if ((keyfile == NULL) || (group == NULL) || (parameter == NULL) || (target == NULL) || (size == 0)) return NULL; if (!g_key_file_has_key(keyfile, group, parameter, NULL)) { g_debug("No parameter '%s' found in cache", parameter); return NULL; } cachedvalue = g_key_file_get_string(keyfile, group, parameter, NULL); if (cachedvalue != NULL) { res = strncpy(target, cachedvalue, size); } else { res = NULL; g_debug("Parameter '%s' value can't be read", parameter); } return res; } static GSList *mmguicore_modules_cache_form_list(mmguicore_t mmguicore) { GSList *modules; gchar **groups; gsize numgroups; gint i; gsize length; mmguimodule_t modparams; modules = NULL; if (mmguicore == NULL) { return modules; } if ((mmguicore->cachekeyfile == NULL) || (mmguicore->updatecache)) { g_debug("Cache file doesn't contain modules parameters"); return modules; } /*Cached modules list*/ groups = g_key_file_get_groups(mmguicore->cachekeyfile, &numgroups); if ((groups == NULL) || (numgroups == 0)) { g_debug("Cache file doesn't contain groups"); return modules; } for (i=0; i 3) && (length < 256) && (groups[i][length-3] == '.') && (groups[i][length-2] == 's') && (groups[i][length-1] == 'o')) { modparams = g_new0(struct _mmguimodule, 1); /*Module identifier*/ modparams->identifier = (guint)mmguicore_modules_cache_get_enumeration_value(mmguicore->cachekeyfile, groups[i], MMGUICORE_FILE_IDENTIFIER, -1); if ((gint)modparams->identifier == -1) { g_free(modparams); continue; } /*Module type*/ modparams->type = mmguicore_modules_cache_get_enumeration_value(mmguicore->cachekeyfile, groups[i], MMGUICORE_FILE_TYPE, MMGUI_MODULE_TYPE_MODEM_MANAGER, MMGUI_MODULE_TYPE_CONNECTION_MANGER, -1); if (modparams->type == -1) { g_free(modparams); continue; } /*Module requirement*/ modparams->requirement = mmguicore_modules_cache_get_enumeration_value(mmguicore->cachekeyfile, groups[i], MMGUICORE_FILE_REQUIREMENT, MMGUI_MODULE_REQUIREMENT_SERVICE, MMGUI_MODULE_REQUIREMENT_FILE, MMGUI_MODULE_REQUIREMENT_NONE, -1); if (modparams->requirement == -1) { g_free(modparams); continue; } /*Module priority*/ modparams->priority = mmguicore_modules_cache_get_enumeration_value(mmguicore->cachekeyfile, groups[i], MMGUICORE_FILE_PRIORITY, MMGUI_MODULE_PRIORITY_LOW, MMGUI_MODULE_PRIORITY_NORMAL, MMGUI_MODULE_PRIORITY_RECOMMENDED, -1); if (modparams->priority == -1) { g_free(modparams); continue; } /*Module functions*/ modparams->functions = mmguicore_modules_cache_get_enumeration_value(mmguicore->cachekeyfile, groups[i], MMGUICORE_FILE_FUNCTIONS, MMGUI_MODULE_FUNCTION_BASIC, -1); if (modparams->functions == -1) { g_free(modparams); continue; } /*Module description*/ if (mmguicore_modules_cache_get_string_value(mmguicore->cachekeyfile, groups[i], MMGUICORE_FILE_DESCRIPTION, modparams->description, sizeof(modparams->description)) == NULL) { g_free(modparams); continue; } /*Module service name*/ if (mmguicore_modules_cache_get_string_value(mmguicore->cachekeyfile, groups[i], MMGUICORE_FILE_SERVICENAME, modparams->servicename, sizeof(modparams->servicename)) == NULL) { g_free(modparams); continue; } /*Module filename*/ strncpy(modparams->filename, groups[i], sizeof(modparams->filename)); /*Add to list*/ modules = g_slist_prepend(modules, modparams); } } if (modules != NULL) { modules = g_slist_reverse(modules); } g_strfreev(groups); return modules; } static GSList *mmguicore_modules_dir_form_list(mmguicore_t mmguicore, gboolean updatecache) { GSList *modules; GDir *moddir; const gchar *modname; gsize length; gchar *modpath; GModule *module; mmgui_module_init_func module_init; mmguimodule_t modparams; modules = NULL; moddir = g_dir_open(RESOURCE_MODULES_DIR, 0, NULL); if (moddir == NULL) { g_debug("Unable to open modules directory"); return modules; } modname = g_dir_read_name(moddir); while (modname != NULL) { /*Test file extension and filename length*/ length = strlen(modname); if ((length > 3) && (length < 256) && (modname[length-3] == '.') && (modname[length-2] == 's') && (modname[length-1] == 'o')) { /*Full path to module*/ modpath = g_strconcat(RESOURCE_MODULES_DIR, modname, NULL); /*Test if module exists*/ if (g_file_test(modpath, G_FILE_TEST_EXISTS)) { /*Open module*/ module = g_module_open(modpath, G_MODULE_BIND_LAZY); if (module != NULL) { /*Call init function to get module parameters*/ if (g_module_symbol(module, "mmgui_module_init", (gpointer*)&module_init)) { modparams = g_new0(struct _mmguimodule, 1); if (module_init(modparams)) { /*Add module filename*/ strncpy(modparams->filename, modname, sizeof(modparams->filename)); /*Module successfully initialized and can be used*/ modules = g_slist_prepend(modules, modparams); /*Add module to cache if needed*/ if ((mmguicore != NULL) && (updatecache)) { mmguicore_modules_cache_add_module(mmguicore, modparams); } } else { /*Unable to initialize module - skip*/ g_free(modparams); } } /*Close module*/ g_module_close(module); } } /*Free full path*/ g_free(modpath); } /*Next file*/ modname = g_dir_read_name(moddir); } if (modules != NULL) { modules = g_slist_reverse(modules); } /*Close directory*/ g_dir_close(moddir); return modules; } static guint mmguicore_modules_enum(mmguicore_t mmguicore) { GHashTable *runningservices, *activatableservices; GSList *modules; mmguimodule_t modparams; guint modnumber; GSList *iterator; //gchar shortname[256]; gsize shortnamelen; if (mmguicore == NULL) return 0; /*Already running services*/ runningservices = mmguicore_system_services_enum(FALSE); /*Services that can be activated*/ activatableservices = mmguicore_system_services_enum(TRUE); if ((runningservices == NULL) || (activatableservices == NULL)) { g_debug("Unable to get lists of system services"); return 0; } if (mmguicore->updatecache) { /*Got to get all available modules*/ modules = mmguicore_modules_dir_form_list(mmguicore, TRUE); } else { /*Can use cache*/ modules = mmguicore_modules_cache_form_list(mmguicore); /*Fallback if cache is broken*/ if (modules == NULL) { if ((mmguicore->cachefilename != NULL) && (mmguicore->cachekeyfile != NULL)) { /*Cache can be updated*/ mmguicore->updatecache = TRUE; modules = mmguicore_modules_dir_form_list(mmguicore, TRUE); } else { /*Unable to update cache*/ modules = mmguicore_modules_dir_form_list(mmguicore, FALSE); } } } modnumber = 0; /*Mark available modules*/ if (modules != NULL) { for (iterator=modules; iterator; iterator=iterator->next) { modparams = iterator->data; /*Test if module is recommended*/ modparams->recommended = FALSE; shortnamelen = sizeof(modparams->shortname); if (mmguicore->options != NULL) { if (mmguicore_modules_extract_name(modparams->filename, modparams->shortname, &shortnamelen) != NULL) { switch (modparams->type) { case MMGUI_MODULE_TYPE_MODEM_MANAGER: if (mmguicore->options->mmmodule != NULL) { if (strncmp(modparams->shortname, mmguicore->options->mmmodule, shortnamelen) == 0) { modparams->recommended = TRUE; } } break; case MMGUI_MODULE_TYPE_CONNECTION_MANGER: if (mmguicore->options->cmmodule != NULL) { if (strncmp(modparams->shortname, mmguicore->options->cmmodule, shortnamelen) == 0) { modparams->recommended = TRUE; } } break; default: break; } } } /*Test service/file existence*/ modparams->applicable = FALSE; modparams->activatable = FALSE; switch (modparams->requirement) { case MMGUI_MODULE_REQUIREMENT_SERVICE: if (g_hash_table_lookup(runningservices, modparams->servicename) != NULL) { /*Service already active - no need to reactivate*/ modparams->applicable = TRUE; } if (g_hash_table_lookup(activatableservices, modparams->servicename) != NULL) { /*Service can be activated*/ modparams->activatable = TRUE; if ((modparams->recommended) && (!modparams->applicable)) { /*Try to activate service if recommended*/ if (mmguicore_system_services_activate(modparams->servicename, NULL)) { g_debug("DBus service started: %s (%s)\n", modparams->servicename, modparams->filename); modparams->applicable = TRUE; } } } break; case MMGUI_MODULE_REQUIREMENT_FILE: if (g_file_test(modparams->servicename, G_FILE_TEST_EXISTS)) { modparams->applicable = TRUE; modparams->activatable = TRUE; } break; case MMGUI_MODULE_REQUIREMENT_NONE: modparams->applicable = TRUE; modparams->activatable = TRUE; break; default: break; } /*Increase modules count*/ modnumber++; } /*Sort modules*/ modules = g_slist_sort(modules, mmguicore_modules_sort); } /*Free system services lists*/ g_hash_table_destroy(runningservices); g_hash_table_destroy(activatableservices); /*Save modules list*/ mmguicore->modules = modules; return modnumber; } static gboolean mmguicore_modules_free(mmguicore_t mmguicore) { if (mmguicore == NULL) return FALSE; if (mmguicore->modules == NULL) return FALSE; g_slist_free(mmguicore->modules); return TRUE; } static gboolean mmguicore_modules_mm_open(mmguicore_t mmguicore, mmguimodule_t mmguimodule) { gboolean openstatus; gchar *modulepath; if ((mmguicore == NULL) || (mmguimodule == NULL)) return FALSE; if (mmguimodule->type == MMGUI_MODULE_TYPE_CONNECTION_MANGER) return FALSE; modulepath = g_strconcat(RESOURCE_MODULES_DIR, mmguimodule->filename, NULL); mmguicore->module = g_module_open(modulepath, G_MODULE_BIND_LAZY); if (mmguicore->module != NULL) { openstatus = TRUE; //Module function pointers openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_open", (gpointer *)&(mmguicore->open_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_close", (gpointer *)&(mmguicore->close_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_last_error", (gpointer *)&(mmguicore->last_error_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_interrupt_operation", (gpointer *)&(mmguicore->interrupt_operation_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_set_timeout", (gpointer *)&(mmguicore->set_timeout_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_devices_enum", (gpointer *)&(mmguicore->devices_enum_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_devices_open", (gpointer *)&(mmguicore->devices_open_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_devices_close", (gpointer *)&(mmguicore->devices_close_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_devices_state", (gpointer *)&(mmguicore->devices_state_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_devices_update_state", (gpointer *)&(mmguicore->devices_update_state_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_devices_information", (gpointer *)&(mmguicore->devices_information_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_devices_enable", (gpointer *)&(mmguicore->devices_enable_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_sms_enum", (gpointer *)&(mmguicore->sms_enum_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_sms_get", (gpointer *)&(mmguicore->sms_get_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_sms_delete", (gpointer *)&(mmguicore->sms_delete_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_sms_send", (gpointer *)&(mmguicore->sms_send_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_ussd_cancel_session", (gpointer *)&(mmguicore->ussd_cancel_session_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_ussd_get_state", (gpointer *)&(mmguicore->ussd_get_state_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_ussd_send", (gpointer *)&(mmguicore->ussd_send_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_networks_scan", (gpointer *)&(mmguicore->networks_scan_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_contacts_enum", (gpointer *)&(mmguicore->contacts_enum_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_contacts_delete", (gpointer *)&(mmguicore->contacts_delete_func)); openstatus = openstatus && g_module_symbol(mmguicore->module, "mmgui_module_contacts_add", (gpointer *)&(mmguicore->contacts_add_func)); if (!openstatus) { //Module function pointers mmguicore->open_func = NULL; mmguicore->close_func = NULL; mmguicore->last_error_func = NULL; mmguicore->interrupt_operation_func = NULL; mmguicore->set_timeout_func = NULL; mmguicore->devices_enum_func = NULL; mmguicore->devices_open_func = NULL; mmguicore->devices_close_func = NULL; mmguicore->devices_state_func = NULL; mmguicore->devices_update_state_func = NULL; mmguicore->devices_information_func = NULL; mmguicore->devices_enable_func = NULL; mmguicore->sms_enum_func = NULL; mmguicore->sms_get_func = NULL; mmguicore->sms_delete_func = NULL; mmguicore->sms_send_func = NULL; mmguicore->ussd_cancel_session_func = NULL; mmguicore->ussd_get_state_func = NULL; mmguicore->ussd_send_func = NULL; mmguicore->networks_scan_func = NULL; mmguicore->contacts_enum_func = NULL; mmguicore->contacts_delete_func = NULL; mmguicore->contacts_add_func = NULL; g_module_close(mmguicore->module); g_printf("Failed to load modem manager: %s\n", mmguimodule->description); } } else { openstatus = FALSE; } g_free(modulepath); if (openstatus) { mmguicore->moduleptr = mmguimodule; (mmguicore->open_func)(mmguicore); g_printf("Modem manager: %s\n", mmguimodule->description); } else { mmguicore->moduleptr = NULL; mmguicore->module = NULL; } return openstatus; } static gboolean mmguicore_modules_cm_open(mmguicore_t mmguicore, mmguimodule_t mmguimodule) { gboolean openstatus; gchar *modulepath; if ((mmguicore == NULL) || (mmguimodule == NULL)) return FALSE; if (mmguimodule->type == MMGUI_MODULE_TYPE_MODEM_MANAGER) return FALSE; modulepath = g_strconcat(RESOURCE_MODULES_DIR, mmguimodule->filename, NULL); mmguicore->cmodule = g_module_open(modulepath, G_MODULE_BIND_LAZY); if (mmguicore->cmodule != NULL) { openstatus = TRUE; //Module function pointers openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_connection_open", (gpointer *)&(mmguicore->connection_open_func)); openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_connection_close", (gpointer *)&(mmguicore->connection_close_func)); openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_connection_last_error", (gpointer *)&(mmguicore->connection_last_error_func)); openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_device_connection_open", (gpointer *)&(mmguicore->device_connection_open_func)); openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_device_connection_close", (gpointer *)&(mmguicore->device_connection_close_func)); openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_device_connection_status", (gpointer *)&(mmguicore->device_connection_status_func)); openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_device_connection_timestamp", (gpointer *)&(mmguicore->device_connection_timestamp_func)); openstatus = openstatus && g_module_symbol(mmguicore->cmodule, "mmgui_module_device_connection_disconnect", (gpointer *)&(mmguicore->device_connection_disconnect_func)); if (!openstatus) { //Module function pointers mmguicore->connection_open_func = NULL; mmguicore->connection_close_func = NULL; mmguicore->connection_last_error_func = NULL; mmguicore->device_connection_open_func = NULL; mmguicore->device_connection_close_func = NULL; mmguicore->device_connection_status_func = NULL; mmguicore->device_connection_timestamp_func = NULL; mmguicore->device_connection_disconnect_func = NULL; g_module_close(mmguicore->cmodule); } } else { openstatus = FALSE; } g_free(modulepath); if (openstatus) { mmguicore->cmoduleptr = mmguimodule; (mmguicore->connection_open_func)(mmguicore); g_printf("Connection manager: %s\n", mmguimodule->description); } else { mmguicore->cmoduleptr = NULL; mmguicore->cmodule = NULL; } return openstatus; } static gboolean mmguicore_modules_close(mmguicore_t mmguicore) { if (mmguicore == NULL) return FALSE; //Modem manager module functions if (mmguicore->module != NULL) { if (mmguicore->close_func != NULL) { mmguicore->close_func(mmguicore); } g_module_close(mmguicore->module); mmguicore->module = NULL; //Module function pointers mmguicore->open_func = NULL; mmguicore->close_func = NULL; mmguicore->last_error_func = NULL; mmguicore->devices_enum_func = NULL; mmguicore->devices_open_func = NULL; mmguicore->devices_close_func = NULL; mmguicore->devices_state_func = NULL; mmguicore->devices_update_state_func = NULL; mmguicore->devices_information_func = NULL; mmguicore->devices_enable_func = NULL; mmguicore->sms_enum_func = NULL; mmguicore->sms_get_func = NULL; mmguicore->sms_delete_func = NULL; mmguicore->sms_send_func = NULL; mmguicore->ussd_cancel_session_func = NULL; mmguicore->ussd_get_state_func = NULL; mmguicore->ussd_send_func = NULL; mmguicore->networks_scan_func = NULL; mmguicore->contacts_enum_func = NULL; mmguicore->contacts_delete_func = NULL; mmguicore->contacts_add_func = NULL; mmguicore->moduleptr = NULL; } //Connection manager module functions if (mmguicore->cmodule != NULL) { if (mmguicore->connection_close_func != NULL) { mmguicore->connection_close_func(mmguicore); } g_module_close(mmguicore->cmodule); mmguicore->cmodule = NULL; //Module function pointers mmguicore->connection_open_func = NULL; mmguicore->connection_close_func = NULL; mmguicore->connection_last_error_func = NULL; mmguicore->device_connection_open_func = NULL; mmguicore->device_connection_close_func = NULL; mmguicore->device_connection_status_func = NULL; mmguicore->device_connection_timestamp_func = NULL; mmguicore->device_connection_disconnect_func = NULL; mmguicore->cmoduleptr = NULL; } return TRUE; } static gboolean mmguicore_modules_select(mmguicore_t mmguicore) { GSList *iterator; mmguimodule_t module; gboolean mmfound, cmfound; if (mmguicore == NULL) return FALSE; if (mmguicore->modules == NULL) return FALSE; if ((mmguicore->module != NULL) || (mmguicore->cmodule != NULL)) { mmguicore_modules_close(mmguicore); } mmfound = FALSE; cmfound = FALSE; /*Try to open recommended modules first*/ for (iterator=mmguicore->modules; iterator; iterator=iterator->next) { module = iterator->data; if ((module->applicable) && (module->recommended)) { if ((module->type == MMGUI_MODULE_TYPE_MODEM_MANAGER) && (!mmfound)) { mmfound = mmguicore_modules_mm_open(mmguicore, module); } else if ((module->type == MMGUI_MODULE_TYPE_CONNECTION_MANGER) && (!cmfound)) { cmfound = mmguicore_modules_cm_open(mmguicore, module); } } if ((mmfound) && (cmfound)) { break; } } /*If modules not opened use full list*/ if (!((mmfound) && (cmfound))) { for (iterator=mmguicore->modules; iterator; iterator=iterator->next) { module = iterator->data; if (module->applicable) { if ((module->type == MMGUI_MODULE_TYPE_MODEM_MANAGER) && (!mmfound)) { mmfound = mmguicore_modules_mm_open(mmguicore, module); } else if ((module->type == MMGUI_MODULE_TYPE_CONNECTION_MANGER) && (!cmfound)) { cmfound = mmguicore_modules_cm_open(mmguicore, module); } } if ((mmfound) && (cmfound)) { break; } } } return mmfound; } GSList *mmguicore_modules_info(void) { GHashTable *runningservices, *activatableservices; GSList *moduleslist; GSList *iterator; mmguimodule_t module; gsize shortnamelen; /*Already running services*/ runningservices = mmguicore_system_services_enum(FALSE); /*Services that can be activated*/ activatableservices = mmguicore_system_services_enum(TRUE); if ((runningservices == NULL) || (activatableservices == NULL)) { g_debug("Unable to get lists of system services"); return 0; } /*Enumerate modules*/ moduleslist = mmguicore_modules_dir_form_list(NULL, FALSE); if (moduleslist != NULL) { for (iterator=moduleslist; iterator; iterator=iterator->next) { module = iterator->data; /*Test service/file existence*/ module->applicable = FALSE; module->activatable = FALSE; switch (module->requirement) { case MMGUI_MODULE_REQUIREMENT_SERVICE: if (g_hash_table_lookup(activatableservices, module->servicename) != NULL) { module->activatable = TRUE; } if (g_hash_table_lookup(runningservices, module->servicename) != NULL) { module->applicable = TRUE; } break; case MMGUI_MODULE_REQUIREMENT_FILE: if (g_file_test(module->servicename, G_FILE_TEST_EXISTS)) { module->activatable = TRUE; module->applicable = TRUE; } break; case MMGUI_MODULE_REQUIREMENT_NONE: module->activatable = TRUE; module->applicable = TRUE; break; default: break; } shortnamelen = sizeof(module->shortname); mmguicore_modules_extract_name(module->filename, module->shortname, &shortnamelen); } /*Sort modules*/ moduleslist = g_slist_sort(moduleslist, mmguicore_modules_sort); } /*Free system services lists*/ g_hash_table_destroy(runningservices); g_hash_table_destroy(activatableservices); return moduleslist; } void mmguicore_modules_mm_set_timeouts(mmguicore_t mmguicore, gint operation1, gint timeout1, ...) { va_list args; gint operation, timeout; if (mmguicore == NULL) return; if ((operation1 == -1) || (timeout1 == -1)) return; if ((mmguicore->moduleptr == NULL) || (mmguicore->set_timeout_func == NULL)) return; va_start(args, timeout1); operation = operation1; timeout = timeout1; while (TRUE) { /*Set timeout value*/ switch (operation) { case MMGUI_DEVICE_OPERATION_ENABLE: case MMGUI_DEVICE_OPERATION_SEND_SMS: case MMGUI_DEVICE_OPERATION_SEND_USSD: case MMGUI_DEVICE_OPERATION_SCAN: (mmguicore->set_timeout_func)(mmguicore, operation, timeout); break; default: break; } /*Get new values*/ operation = va_arg(args, gint); if (operation == -1) { break; } timeout = va_arg(args, gint); if (timeout == -1) { break; } } va_end(args); } static void mmguicore_devices_free_single(mmguidevice_t device) { if (device != NULL) return; if (device->manufacturer != NULL) { g_free(device->manufacturer); } if (device->model != NULL) { g_free(device->model); } if (device->version != NULL) { g_free(device->version); } if (device->port != NULL) { g_free(device->port); } if (device->objectpath != NULL) { g_free(device->objectpath); } if (device->sysfspath != NULL) { g_free(device->sysfspath); } if (device->internalid != NULL) { g_free(device->internalid); } if (device->persistentid != NULL) { g_free(device->persistentid); } if (device->imei != NULL) { g_free(device->imei); } if (device->imsi != NULL) { g_free(device->imsi); } } static void mmguicore_devices_free_foreach(gpointer data, gpointer user_data) { mmguidevice_t device; if (data != NULL) return; device = (mmguidevice_t)data; mmguicore_devices_free_single(device); } static void mmguicore_devices_free(mmguicore_t mmguicore) { if (mmguicore == NULL) return; g_slist_foreach(mmguicore->devices, mmguicore_devices_free_foreach, NULL); g_slist_free(mmguicore->devices); mmguicore->devices = NULL; } gboolean mmguicore_devices_enum(mmguicore_t mmguicore) { GSList *iterator; mmguidevice_t device; if ((mmguicore == NULL) || (mmguicore->devices_enum_func == NULL)) return FALSE; if (mmguicore->devices != NULL) { mmguicore_devices_free(mmguicore); } (mmguicore->devices_enum_func)(mmguicore, &(mmguicore->devices)); for (iterator=mmguicore->devices; iterator; iterator=iterator->next) { device = iterator->data; g_debug("Device: %s, %s, %s [%u] [%s]\n", device->manufacturer, device->model, device->version, device->id, device->persistentid); } return TRUE; } gboolean mmguicore_devices_add(mmguicore_t mmguicore, mmguidevice_t device) { if ((mmguicore == NULL) || (device == NULL)) return FALSE; mmguicore->devices = g_slist_append(mmguicore->devices, device); g_debug("Device successfully added\n"); return TRUE; } static gint mmguicore_devices_remove_compare(gconstpointer a, gconstpointer b) { mmguidevice_t device; guint id; device = (mmguidevice_t)a; id = GPOINTER_TO_UINT(b); if (device->id < id) { return 1; } else if (device->id > id) { return -1; } else { return 0; } } gboolean mmguicore_devices_remove(mmguicore_t mmguicore, guint deviceid) { GSList *deviceptr; if (mmguicore == NULL) return FALSE; if (mmguicore->devices == NULL) return FALSE; deviceptr = g_slist_find_custom(mmguicore->devices, GUINT_TO_POINTER(deviceid), mmguicore_devices_remove_compare); if (deviceptr != NULL) { if (mmguicore->device != NULL) { if (mmguicore->device->id == deviceid) { //Close currently opened device mmguicore_devices_close(mmguicore); } } //Remove device structure from list mmguicore->devices = g_slist_remove(mmguicore->devices, deviceptr->data); //Free device structure mmguicore_devices_free_single(deviceptr->data); //g_printf("Device successfully removed\n"); return TRUE; } else { return FALSE; } } static gint mmguicore_devices_open_compare(gconstpointer a, gconstpointer b) { mmguidevice_t device; guint id; device = (mmguidevice_t)a; id = GPOINTER_TO_UINT(b); if (device->id < id) { return 1; } else if (device->id > id) { return -1; } else { return 0; } } gboolean mmguicore_devices_open(mmguicore_t mmguicore, guint deviceid, gboolean openfirst) { GSList *deviceptr; if (mmguicore == NULL) return FALSE; if ((mmguicore->devices == NULL) || (mmguicore->devices_open_func == NULL)) return FALSE; deviceptr = g_slist_find_custom(mmguicore->devices, GUINT_TO_POINTER(deviceid), mmguicore_devices_open_compare); if (deviceptr != NULL) { //Test currently opened device if (mmguicore->device != NULL) { if (mmguicore->device->id == deviceid) { //Already opened return TRUE; } else { //Close currently opened device mmguicore_devices_close(mmguicore); } } if ((mmguicore->devices_open_func)(mmguicore, deviceptr->data)) { mmguicore->device = deviceptr->data; //Update device information if (mmguicore->devices_information_func != NULL) { (mmguicore->devices_information_func)(mmguicore); //Open SMS database mmguicore->device->smsdb = mmgui_smsdb_open(mmguicore->device->persistentid, mmguicore->device->internalid); //Open traffic database mmguicore->device->trafficdb = mmgui_trafficdb_open(mmguicore->device->persistentid, mmguicore->device->internalid); //Open contacts mmguicore_contacts_enum(mmguicore); //For Huawei modem USSD answers must be converted if (g_ascii_strcasecmp(mmguicore->device->manufacturer, "huawei") == 0) { mmguicore->device->ussdencoding = MMGUI_USSD_ENCODING_UCS2; } else { mmguicore->device->ussdencoding = MMGUI_USSD_ENCODING_GSM7; } } //Open connection statistics source if (mmguicore->device_connection_open_func != NULL) { (mmguicore->device_connection_open_func)(mmguicore, deviceptr->data); } /*Callback*/ if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_DEVICE_OPENED, mmguicore, mmguicore->device, mmguicore->userdata); } g_debug("Device successfully opened\n"); return TRUE; } } else if ((openfirst) && (deviceptr == NULL) && (mmguicore->devices != NULL)) { //Open first available device if specified is not found if (mmguicore->devices->data != NULL) { if (mmguicore->device != NULL) { //Close currently opened device mmguicore_devices_close(mmguicore); } if ((mmguicore->devices_open_func)(mmguicore, mmguicore->devices->data)) { mmguicore->device = mmguicore->devices->data; //Update device information if (mmguicore->devices_information_func != NULL) { (mmguicore->devices_information_func)(mmguicore); //Open SMS database mmguicore->device->smsdb = mmgui_smsdb_open(mmguicore->device->persistentid, mmguicore->device->internalid); //Open traffic database mmguicore->device->trafficdb = mmgui_trafficdb_open(mmguicore->device->persistentid, mmguicore->device->internalid); //Open contacts mmguicore_contacts_enum(mmguicore); //For Huawei modem USSD answers must be converted if (g_ascii_strcasecmp(mmguicore->device->manufacturer, "huawei") == 0) { mmguicore->device->ussdencoding = MMGUI_USSD_ENCODING_UCS2; } else { mmguicore->device->ussdencoding = MMGUI_USSD_ENCODING_GSM7; } } //Open connection statistics source if (mmguicore->device_connection_open_func != NULL) { (mmguicore->device_connection_open_func)(mmguicore, mmguicore->devices->data); } /*Callback*/ if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_DEVICE_OPENED, mmguicore, mmguicore->device, mmguicore->userdata); } g_debug("First available device successfully opened\n"); return TRUE; } } } return FALSE; } gboolean mmguicore_devices_close(mmguicore_t mmguicore) { gboolean result; #if GLIB_CHECK_VERSION(2,32,0) g_mutex_lock(&mmguicore->workthreadmutex); #else g_mutex_lock(mmguicore->workthreadmutex); #endif result = FALSE; if (mmguicore->device != NULL) { /*Callback*/ if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_DEVICE_CLOSING, mmguicore, mmguicore->device, mmguicore->userdata); } if ((mmguicore->devices_close_func)(mmguicore)) { //Close SMS database mmguicore->device->smscaps = MMGUI_SMS_CAPS_NONE; mmgui_smsdb_close(mmguicore->device->smsdb); mmguicore->device->smsdb = NULL; //Close contacts mmguicore->device->contactscaps = MMGUI_CONTACTS_CAPS_NONE; mmguicore_contacts_free(mmguicore->device->contactslist); mmguicore->device->contactslist = NULL; //Info if (mmguicore->device->operatorname != NULL) { g_free(mmguicore->device->operatorname); mmguicore->device->operatorname = NULL; } mmguicore->device->operatorcode = 0; if (mmguicore->device->imei != NULL) { g_free(mmguicore->device->imei); mmguicore->device->imei = NULL; } if (mmguicore->device->imsi != NULL) { g_free(mmguicore->device->imsi); mmguicore->device->imsi = NULL; } //USSD mmguicore->device->ussdcaps = MMGUI_USSD_CAPS_NONE; mmguicore->device->ussdencoding = MMGUI_USSD_ENCODING_GSM7; //Location mmguicore->device->locationcaps = MMGUI_LOCATION_CAPS_NONE; memset(mmguicore->device->loc3gppdata, 0, sizeof(mmguicore->device->loc3gppdata)); memset(mmguicore->device->locgpsdata, 0, sizeof(mmguicore->device->locgpsdata)); //Scan mmguicore->device->scancaps = MMGUI_SCAN_CAPS_NONE; //Close traffic database session mmgui_trafficdb_session_close(mmguicore->device->trafficdb); //Close traffic database mmgui_trafficdb_close(mmguicore->device->trafficdb); mmguicore->device->trafficdb = NULL; //Traffic mmguicore->device->rxbytes = 0; mmguicore->device->txbytes = 0; mmguicore->device->sessiontime = 0; mmguicore->device->speedchecktime = 0; mmguicore->device->smschecktime = 0; mmguicore->device->speedindex = 0; mmguicore->device->connected = FALSE; memset(mmguicore->device->speedvalues, 0, sizeof(mmguicore->device->speedvalues)); memset(mmguicore->device->interface, 0, sizeof(mmguicore->device->interface)); //Zero traffic values in UI mmguicore_traffic_zero(mmguicore); //Close connection state source if (mmguicore->device_connection_close_func != NULL) { (mmguicore->device_connection_close_func)(mmguicore); } //Device mmguicore->device = NULL; //Successfully closed g_debug("Device successfully closed\n"); result = TRUE; } } #if GLIB_CHECK_VERSION(2,32,0) g_mutex_unlock(&mmguicore->workthreadmutex); #else g_mutex_unlock(mmguicore->workthreadmutex); #endif return result; } gboolean mmguicore_devices_enable(mmguicore_t mmguicore, gboolean enabled) { if (mmguicore == NULL) return FALSE; if ((mmguicore->device == NULL) || (mmguicore->devices_enable_func == NULL)) return FALSE; return (mmguicore->devices_enable_func)(mmguicore, enabled); } GSList *mmguicore_devices_get_list(mmguicore_t mmguicore) { if (mmguicore == NULL) return NULL; return mmguicore->devices; } mmguidevice_t mmguicore_devices_get_current(mmguicore_t mmguicore) { if (mmguicore == NULL) return NULL; return mmguicore->device; } gboolean mmguicore_devices_get_enabled(mmguicore_t mmguicore) { if (mmguicore == NULL) return FALSE; if ((mmguicore->device == NULL) || (mmguicore->devices_state_func == NULL)) return FALSE; return (mmguicore->devices_state_func)(mmguicore, MMGUI_DEVICE_STATE_REQUEST_ENABLED); } gboolean mmguicore_devices_get_locked(mmguicore_t mmguicore) { if (mmguicore == NULL) return FALSE; if ((mmguicore->device == NULL) || (mmguicore->devices_state_func == NULL)) return FALSE; return (mmguicore->devices_state_func)(mmguicore, MMGUI_DEVICE_STATE_REQUEST_LOCKED); } gboolean mmguicore_devices_get_registered(mmguicore_t mmguicore) { if (mmguicore == NULL) return FALSE; if ((mmguicore->device == NULL) || (mmguicore->devices_state_func == NULL)) return FALSE; return (mmguicore->devices_state_func)(mmguicore, MMGUI_DEVICE_STATE_REQUEST_REGISTERED); } gboolean mmguicore_devices_get_connected(mmguicore_t mmguicore) { if (mmguicore == NULL) return FALSE; if (mmguicore->device == NULL) return FALSE; return mmguicore->device->connected; } gboolean mmguicore_devices_update_device_state(mmguicore_t mmguicore) { gboolean updated; if (mmguicore == NULL) return FALSE; if (/*(mmguicore->device == NULL) ||*/ (mmguicore->devices_update_state_func == NULL)) return FALSE; updated = FALSE; updated = (mmguicore->devices_update_state_func)(mmguicore); return updated; } const gchar *mmguicore_devices_get_identifier(mmguicore_t mmguicore) { if (mmguicore == NULL) return NULL; if (mmguicore->device == NULL) return NULL; return (const gchar *)mmguicore->device->persistentid; } const gchar *mmguicore_devices_get_internal_identifier(mmguicore_t mmguicore) { if (mmguicore == NULL) return NULL; if (mmguicore->device == NULL) return NULL; return (const gchar *)mmguicore->device->internalid; } gpointer mmguicore_devices_get_sms_db(mmguicore_t mmguicore) { if (mmguicore == NULL) return NULL; if (mmguicore->device == NULL) return NULL; return (gpointer)mmguicore->device->smsdb; } gpointer mmguicore_devices_get_traffic_db(mmguicore_t mmguicore) { if (mmguicore == NULL) return NULL; if (mmguicore->device == NULL) return NULL; return (gpointer)mmguicore->device->trafficdb; } gboolean mmguicore_devices_get_connection_status(mmguicore_t mmguicore) { if (mmguicore == NULL) return FALSE; if ((mmguicore->device == NULL) || (mmguicore->device_connection_status_func == NULL)) return FALSE; return (mmguicore->device_connection_status_func)(mmguicore); } guint64 mmguicore_devices_get_connection_timestamp(mmguicore_t mmguicore) { guint64 timestamp; timestamp = (guint64)time(NULL); if (mmguicore == NULL) return timestamp; if ((mmguicore->device == NULL) || (mmguicore->device_connection_timestamp_func == NULL)) return timestamp; timestamp = (mmguicore->device_connection_timestamp_func)(mmguicore); return timestamp; } guint mmguicore_devices_get_current_operation(mmguicore_t mmguicore) { if (mmguicore == NULL) return MMGUI_DEVICE_OPERATION_IDLE; if (mmguicore->device == NULL) return MMGUI_DEVICE_OPERATION_IDLE; return mmguicore->device->operation; } guint mmguicore_location_get_capabilities(mmguicore_t mmguicore) { if (mmguicore == NULL) return MMGUI_LOCATION_CAPS_NONE; if (mmguicore->device == NULL) return MMGUI_LOCATION_CAPS_NONE; return mmguicore->device->locationcaps; } guint mmguicore_sms_get_capabilities(mmguicore_t mmguicore) { if (mmguicore == NULL) return MMGUI_SMS_CAPS_NONE; if (mmguicore->device == NULL) return MMGUI_SMS_CAPS_NONE; return mmguicore->device->smscaps; } static gint mmguicore_sms_sort_index_compare(gconstpointer a, gconstpointer b) { mmgui_sms_message_t message1, message2; guint id1, id2; message1 = (mmgui_sms_message_t)a; message2 = (mmgui_sms_message_t)b; id1 = mmgui_smsdb_message_get_identifier(message1); id2 = mmgui_smsdb_message_get_identifier(message2); if (id1 < id2) { return -1; } else if (id1 > id2) { return 1; } else { return 0; } } static gint mmguicore_sms_sort_timestamp_compare(gconstpointer a, gconstpointer b) { mmgui_sms_message_t message1, message2; time_t ts1, ts2; message1 = (mmgui_sms_message_t)a; message2 = (mmgui_sms_message_t)b; ts1 = mmgui_smsdb_message_get_timestamp(message1); ts2 = mmgui_smsdb_message_get_timestamp(message2); if (difftime(ts1, ts2) < 0.0) { return -1; } else if (difftime(ts1, ts2) > 0.0) { return 1; } else { return 0; } } static void mmguicore_sms_merge_foreach(gpointer data, gpointer user_data) { mmgui_sms_message_t curmessage, srcmessage; const gchar *srcnumber, *curnumber; time_t srcts, curts; gboolean srcbinary, curbinary; guint ident; const gchar *text; curmessage = (mmgui_sms_message_t)data; srcmessage = (mmgui_sms_message_t)user_data; if ((srcmessage == NULL) || (srcmessage == curmessage) || (mmgui_smsdb_message_get_read(curmessage))) return; /*Number*/ srcnumber = mmgui_smsdb_message_get_number(srcmessage); curnumber = mmgui_smsdb_message_get_number(curmessage); /*Timestamp*/ srcts = mmgui_smsdb_message_get_timestamp(srcmessage); curts = mmgui_smsdb_message_get_timestamp(curmessage); /*Binary format*/ srcbinary = mmgui_smsdb_message_get_binary(srcmessage); curbinary = mmgui_smsdb_message_get_binary(curmessage); if ((g_str_equal(srcnumber, curnumber)) && (srcbinary == curbinary)) { if (abs((gint)difftime(srcts, curts)) <= 5) { //Copy identifier ident = mmgui_smsdb_message_get_identifier(curmessage); mmgui_smsdb_message_set_identifier(srcmessage, ident, TRUE); //Copy decoded text text = mmgui_smsdb_message_get_text(curmessage); if (!srcbinary) { mmgui_smsdb_message_set_text(srcmessage, text, TRUE); } else { mmgui_smsdb_message_set_binary(srcmessage, FALSE); mmgui_smsdb_message_set_text(srcmessage, text, TRUE); mmgui_smsdb_message_set_binary(srcmessage, TRUE); } //Mark message obsolete mmgui_smsdb_message_set_read(curmessage, TRUE); } } } GSList *mmguicore_sms_enum(mmguicore_t mmguicore, gboolean concatenation) { GSList *messages; guint nummessages; GSList *iterator; mmgui_sms_message_t message; if ((mmguicore == NULL) || (mmguicore->sms_enum_func == NULL)) return NULL; messages = NULL; nummessages = (mmguicore->sms_enum_func)(mmguicore, &messages); if (nummessages > 1) { if (concatenation) { //Sort messages by index messages = g_slist_sort(messages, mmguicore_sms_sort_index_compare); //Try to concatenate every message and mark already concatenated with 'read' flag for (iterator=messages; iterator; iterator=iterator->next) { message = iterator->data; if (!mmgui_smsdb_message_get_read(message)) { g_slist_foreach(messages, mmguicore_sms_merge_foreach, message); } } } //After all, sort messages by timestamp messages = g_slist_sort(messages, mmguicore_sms_sort_timestamp_compare); } return messages; } mmgui_sms_message_t mmguicore_sms_get(mmguicore_t mmguicore, guint index) { mmgui_sms_message_t message; if ((mmguicore == NULL) || (mmguicore->sms_get_func == NULL)) return NULL; message = (mmguicore->sms_get_func)(mmguicore, index); return message; } gboolean mmguicore_sms_delete(mmguicore_t mmguicore, guint index) { if ((mmguicore == NULL) || (mmguicore->sms_delete_func == NULL)) return FALSE; return (mmguicore->sms_delete_func)(mmguicore, index); } gboolean mmguicore_sms_validate_number(const gchar *number) { gboolean validated; gsize length, digitlength, i; validated = TRUE; if ((number != NULL) && (number[0] != '\0')) { length = strlen(number); if (number[0] == '+') { digitlength = length-1; } else { digitlength = length; } if ((digitlength < MMGUI_MIN_SMS_NUMBER_LENGTH) || (digitlength > MMGUI_MAX_SMS_NUMBER_LENGTH)) { validated = FALSE; } else { for (i=0; isms_send_func == NULL)) return FALSE; if ((number == NULL) || (text == NULL)) return FALSE; if ((!mmguicore_sms_validate_number(number)) || (text[0] == '\0') || (validity < -1) || (validity > 255)) return FALSE; return (mmguicore->sms_send_func)(mmguicore, number, text, validity, report); } guint mmguicore_ussd_get_capabilities(mmguicore_t mmguicore) { if (mmguicore == NULL) return MMGUI_USSD_CAPS_NONE; if (mmguicore->device == NULL) return MMGUI_USSD_CAPS_NONE; return mmguicore->device->ussdcaps; } enum _mmgui_ussd_validation mmguicore_ussd_validate_request(gchar *request) { enum _mmgui_ussd_validation statusid; gsize length, i; gboolean wrongsym; statusid = MMGUI_USSD_VALIDATION_INVALID; if ((request == NULL) && (request[0] == '\0')) return statusid; length = strlen(request); if (length > MMGUI_MAX_USSD_REQUEST_LENGTH) return statusid; if (((request[0] == '*') || (request[0] == '#')) && (request[length-1] == '#') && (length > 2)) { wrongsym = FALSE; for (i=0; iussd_cancel_session_func == NULL)) return FALSE; return (mmguicore->ussd_cancel_session_func)(mmguicore); } enum _mmgui_ussd_state mmguicore_ussd_get_state(mmguicore_t mmguicore) { enum _mmgui_ussd_state stateid; stateid = MMGUI_USSD_STATE_UNKNOWN; if ((mmguicore == NULL) || (mmguicore->ussd_get_state_func == NULL)) return stateid; stateid = (mmguicore->ussd_get_state_func)(mmguicore); return stateid; } gboolean mmguicore_ussd_send(mmguicore_t mmguicore, gchar *request) { enum _mmgui_ussd_validation validationid; gboolean reencode; if ((mmguicore == NULL) || (mmguicore->ussd_send_func == NULL)) return FALSE; if (request == NULL) return FALSE; validationid = mmguicore_ussd_validate_request(request); /*Try to reencode answer if nedded*/ if (mmguicore->device->ussdencoding == MMGUI_USSD_ENCODING_UCS2) { reencode = TRUE; } else { reencode = FALSE; } return (mmguicore->ussd_send_func)(mmguicore, request, validationid, reencode); } gboolean mmguicore_ussd_set_encoding(mmguicore_t mmguicore, enum _mmgui_ussd_encoding encoding) { if ((mmguicore == NULL) || (mmguicore->device == NULL)) return FALSE; mmguicore->device->ussdencoding = encoding; return TRUE; } enum _mmgui_ussd_encoding mmguicore_ussd_get_encoding(mmguicore_t mmguicore) { if ((mmguicore == NULL) || (mmguicore->device == NULL)) return MMGUI_USSD_ENCODING_GSM7; return mmguicore->device->ussdencoding; } guint mmguicore_newtworks_scan_get_capabilities(mmguicore_t mmguicore) { if (mmguicore == NULL) return MMGUI_SCAN_CAPS_NONE; if (mmguicore->device == NULL) return MMGUI_SCAN_CAPS_NONE; return mmguicore->device->scancaps; } static void mmguicore_networks_scan_free_foreach(gpointer data, gpointer user_data) { mmgui_scanned_network_t network; if (data == NULL) return; network = (mmgui_scanned_network_t)data; if (network->operator_long != NULL) { g_free(network->operator_long); } if (network->operator_short != NULL) { g_free(network->operator_short); } } void mmguicore_networks_scan_free(GSList *networks) { if (networks == NULL) return; g_slist_foreach(networks, mmguicore_networks_scan_free_foreach, NULL); g_slist_free(networks); } gboolean mmguicore_networks_scan(mmguicore_t mmguicore) { if ((mmguicore == NULL) || (mmguicore->networks_scan_func == NULL)) return FALSE; return (mmguicore->networks_scan_func)(mmguicore); } guint mmguicore_contacts_get_capabilities(mmguicore_t mmguicore) { if (mmguicore == NULL) return MMGUI_CONTACTS_CAPS_NONE; if (mmguicore->device == NULL) return MMGUI_CONTACTS_CAPS_NONE; return mmguicore->device->contactscaps; } void mmguicore_contacts_free_single(mmgui_contact_t contact, gboolean freestruct) { if (contact == NULL) return; if (contact->name != NULL) { g_free(contact->name); } if (contact->number != NULL) { g_free(contact->number); } if (contact->email != NULL) { g_free(contact->email); } if (contact->group != NULL) { g_free(contact->group); } if (contact->name2 != NULL) { g_free(contact->name2); } if (contact->number2 != NULL) { g_free(contact->number2); } //Free contact structure if (freestruct) { g_free(contact); } } static void mmguicore_contacts_free_foreach(gpointer data, gpointer user_data) { mmgui_contact_t contact; if (data == NULL) return; contact = (mmgui_contact_t)data; mmguicore_contacts_free_single(contact, FALSE); } static void mmguicore_contacts_free(GSList *contacts) { if (contacts == NULL) return; g_slist_foreach(contacts, mmguicore_contacts_free_foreach, NULL); g_slist_free(contacts); } static guint mmguicore_contacts_enum(mmguicore_t mmguicore) { guint numcontacts; if ((mmguicore == NULL) || (mmguicore->contacts_enum_func == NULL)) return 0; if (mmguicore->device == NULL) return 0; if (mmguicore->device->contactslist != NULL) { mmguicore_contacts_free(mmguicore->device->contactslist); mmguicore->device->contactslist = NULL; } numcontacts = (mmguicore->contacts_enum_func)(mmguicore, &(mmguicore->device->contactslist)); return numcontacts; } GSList *mmguicore_contacts_list(mmguicore_t mmguicore) { if (mmguicore == NULL) return NULL; if (mmguicore->device == NULL) return NULL; if (!(mmguicore->device->contactscaps & MMGUI_CONTACTS_CAPS_EXPORT)) return NULL; return mmguicore->device->contactslist; } static gint mmguicore_contacts_get_compare(gconstpointer a, gconstpointer b) { mmgui_contact_t contact; guint id; contact = (mmgui_contact_t)a; id = GPOINTER_TO_UINT(b); if (contact->id < id) { return 1; } else if (contact->id > id) { return -1; } else { return 0; } } mmgui_contact_t mmguicore_contacts_get(mmguicore_t mmguicore, guint index) { GSList *contactptr; mmgui_contact_t contact; if (mmguicore == NULL) return NULL; if (mmguicore->device == NULL) return NULL; if (!(mmguicore->device->contactscaps & MMGUI_CONTACTS_CAPS_EXPORT)) return NULL; contactptr = g_slist_find_custom(mmguicore->device->contactslist, GUINT_TO_POINTER(index), mmguicore_contacts_get_compare); if (contactptr != NULL) { contact = (mmgui_contact_t)contactptr->data; return contact; } else { return NULL; } } static gint mmguicore_contacts_delete_compare(gconstpointer a, gconstpointer b) { mmgui_contact_t contact; guint id; contact = (mmgui_contact_t)a; id = GPOINTER_TO_UINT(b); if (contact->id < id) { return 1; } else if (contact->id > id) { return -1; } else { return 0; } } gboolean mmguicore_contacts_delete(mmguicore_t mmguicore, guint index) { gboolean result; GSList *contactptr; if ((mmguicore == NULL) || (mmguicore->contacts_delete_func == NULL)) return FALSE; if (mmguicore->device == NULL) return FALSE; if (!(mmguicore->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return FALSE; result = (mmguicore->contacts_delete_func)(mmguicore, index); if (result) { contactptr = g_slist_find_custom(mmguicore->device->contactslist, GUINT_TO_POINTER(index), mmguicore_contacts_delete_compare); if (contactptr != NULL) { //Remove contact from list mmguicore_contacts_free_single(contactptr->data, FALSE); mmguicore->device->contactslist = g_slist_remove(mmguicore->device->contactslist, contactptr->data); } return TRUE; } else { return FALSE; } } gboolean mmguicore_contacts_add(mmguicore_t mmguicore, mmgui_contact_t contact) { gint index; if ((mmguicore == NULL) || (contact == NULL) || (mmguicore->contacts_add_func == NULL)) return FALSE; if ((contact->name == NULL) || (contact->number == NULL)) return FALSE; if ((!mmguicore_sms_validate_number(contact->number)) || (contact->name[0] == '\0')) return FALSE; if (!(mmguicore->device->contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return FALSE; index = (mmguicore->contacts_add_func)(mmguicore, contact); if (index > -1) { mmguicore->device->contactslist = g_slist_append(mmguicore->device->contactslist, contact); return TRUE; } else { return FALSE; } } GSList *mmguicore_open_connections_list(mmguicore_t mmguicore) { GSList *connections; if (mmguicore == NULL) return NULL; #if GLIB_CHECK_VERSION(2,32,0) g_mutex_lock(&mmguicore->connsyncmutex); #else g_mutex_lock(mmguicore->connsyncmutex); #endif connections = mmgui_netlink_open_interactive_connections_list(mmguicore->netlink); #if GLIB_CHECK_VERSION(2,32,0) g_mutex_unlock(&mmguicore->connsyncmutex); #else g_mutex_unlock(mmguicore->connsyncmutex); #endif return connections; } void mmguicore_close_connections_list(mmguicore_t mmguicore) { if (mmguicore == NULL) return; #if GLIB_CHECK_VERSION(2,32,0) g_mutex_lock(&mmguicore->connsyncmutex); #else g_mutex_lock(mmguicore->connsyncmutex); #endif mmgui_netlink_close_interactive_connections_list(mmguicore->netlink); #if GLIB_CHECK_VERSION(2,32,0) g_mutex_unlock(&mmguicore->connsyncmutex); #else g_mutex_unlock(mmguicore->connsyncmutex); #endif } GSList *mmguicore_get_connections_changes(mmguicore_t mmguicore) { GSList *changes; if (mmguicore == NULL) return NULL; #if GLIB_CHECK_VERSION(2,32,0) g_mutex_lock(&mmguicore->connsyncmutex); #else g_mutex_lock(mmguicore->connsyncmutex); #endif changes = mmgui_netlink_get_connections_changes(mmguicore->netlink); #if GLIB_CHECK_VERSION(2,32,0) g_mutex_unlock(&mmguicore->connsyncmutex); #else g_mutex_unlock(mmguicore->connsyncmutex); #endif return changes; } gchar *mmguicore_get_last_error(mmguicore_t mmguicore) { if ((mmguicore == NULL) || (mmguicore->last_error_func == NULL)) return NULL; return (mmguicore->last_error_func)(mmguicore); } gchar *mmguicore_get_last_connection_error(mmguicore_t mmguicore) { if ((mmguicore == NULL) || (mmguicore->connection_last_error_func == NULL)) return NULL; return (mmguicore->connection_last_error_func)(mmguicore); } gboolean mmguicore_interrupt_operation(mmguicore_t mmguicore) { if ((mmguicore == NULL) || (mmguicore->interrupt_operation_func == NULL)) return FALSE; return (mmguicore->interrupt_operation_func)(mmguicore); } mmguicore_t mmguicore_new(mmgui_event_ext_callback callback/*, mmgui_connections_sync_callback connsynccb*/, mmgui_core_options_t options, gpointer userdata) { mmguicore_t mmguicore; mmguicore = g_new0(struct _mmguicore, 1); //Modules mmguicore->modules = NULL; //Modem manager module mmguicore->module = NULL; mmguicore->moduleptr = NULL; mmguicore->module = NULL; //Connection manager module mmguicore->cmodule = NULL; mmguicore->cmoduleptr = NULL; mmguicore->cmodule = NULL; //Modem manager module functions mmguicore->open_func = NULL; mmguicore->close_func = NULL; mmguicore->last_error_func = NULL; mmguicore->interrupt_operation_func = NULL; mmguicore->set_timeout_func = NULL; mmguicore->devices_enum_func = NULL; mmguicore->devices_open_func = NULL; mmguicore->devices_close_func = NULL; mmguicore->devices_state_func = NULL; mmguicore->devices_update_state_func = NULL; mmguicore->devices_information_func = NULL; mmguicore->devices_enable_func = NULL; mmguicore->sms_enum_func = NULL; mmguicore->sms_get_func = NULL; mmguicore->sms_delete_func = NULL; mmguicore->sms_send_func = NULL; mmguicore->ussd_cancel_session_func = NULL; mmguicore->ussd_get_state_func = NULL; mmguicore->ussd_send_func = NULL; mmguicore->networks_scan_func = NULL; mmguicore->contacts_enum_func = NULL; mmguicore->contacts_delete_func = NULL; mmguicore->contacts_add_func = NULL; //Connection manager module functions mmguicore->connection_open_func = NULL; mmguicore->connection_close_func = NULL; mmguicore->connection_last_error_func = NULL; mmguicore->device_connection_open_func = NULL; mmguicore->device_connection_close_func = NULL; mmguicore->device_connection_status_func = NULL; mmguicore->device_connection_timestamp_func = NULL; mmguicore->device_connection_disconnect_func = NULL; //Devices mmguicore->devices = NULL; mmguicore->device = NULL; //Internal callback mmguicore->eventcb = mmguicore_event_callback; //External callback mmguicore->extcb = callback; //Connections sync callback //mmguicore->connsynccb = connsynccb; //Traffic limits //mmguicore->limits = limits; /*Core options*/ mmguicore->options = options; //User data pointer mmguicore->userdata = userdata; //Open netlink interface mmguicore->netlink = mmgui_netlink_open(); /*Open modules cache*/ mmguicore_modules_cache_open(mmguicore); /*Enumerate available modules*/ if (!mmguicore_modules_enum(mmguicore)) { g_free(mmguicore); g_debug("No modules found\n"); return NULL; } /*Select module*/ if (!mmguicore_modules_select(mmguicore)) { mmguicore_modules_close(mmguicore); mmguicore_modules_free(mmguicore); g_free(mmguicore); return NULL; } /*Set module timeouts*/ if (options != NULL) { mmguicore_modules_mm_set_timeouts(mmguicore, MMGUI_DEVICE_OPERATION_ENABLE, options->enabletimeout, MMGUI_DEVICE_OPERATION_SEND_SMS, options->sendsmstimeout, MMGUI_DEVICE_OPERATION_SEND_USSD, options->sendussdtimeout, MMGUI_DEVICE_OPERATION_SCAN, options->scannetworkstimeout, -1); } /*New day time*/ mmguicore->newdaytime = mmgui_trafficdb_get_new_day_timesatmp(time(NULL)); //Work thread if (pipe(mmguicore->workthreadctl) == 0) { #if GLIB_CHECK_VERSION(2,32,0) g_mutex_init(&mmguicore->workthreadmutex); g_mutex_init(&mmguicore->connsyncmutex); #else mmguicore->workthreadmutex = g_mutex_new(); mmguicore->connsyncmutex = g_mutex_new(); #endif #if GLIB_CHECK_VERSION(2,32,0) mmguicore->workthread = g_thread_new("Modem Manager GUI work thread", mmguicore_work_thread, mmguicore); #else mmguicore->workthread = g_thread_create(mmguicore_work_thread, mmguicore, TRUE, NULL); #endif } else { mmguicore->workthread = NULL; } return mmguicore; } void mmguicore_close(mmguicore_t mmguicore) { guint workthreadcmd; if (mmguicore == NULL) return; //Close opened device mmguicore_devices_close(mmguicore); //Stop work thread workthreadcmd = MMGUI_THREAD_STOP_CMD; if (mmguicore->workthread != NULL) { //Lock mutex #if GLIB_CHECK_VERSION(2,32,0) g_mutex_lock(&mmguicore->workthreadmutex); #else g_mutex_lock(mmguicore->workthreadmutex); #endif //Send command for thread termination if (write(mmguicore->workthreadctl[0], &workthreadcmd, sizeof(workthreadcmd)) > 0) { //Wait for thread termination g_thread_join(mmguicore->workthread); //Close thread control pipe close(mmguicore->workthreadctl[0]); //Drop mutex #if GLIB_CHECK_VERSION(2,32,0) g_mutex_clear(&mmguicore->workthreadmutex); g_mutex_clear(&mmguicore->connsyncmutex); #else g_mutex_free(mmguicore->workthreadmutex); g_mutex_free(mmguicore->connsyncmutex); #endif } } //Close netlink interface mmgui_netlink_close(mmguicore->netlink); //Destroy connections hash table //g_hash_table_destroy(mmguicore->connections); mmguicore_modules_cache_close(mmguicore); //Close opened modules mmguicore_modules_close(mmguicore); //Free modules list mmguicore_modules_free(mmguicore); g_free(mmguicore); } static gpointer mmguicore_work_thread(gpointer data) { mmguicore_t mmguicore; //Shared buffer gchar *databuf, *radatabuf; gsize databufsize; //Polling variables guint activesockets; gint pollstatus; gint recvbytes; struct pollfd pollfds[3]; //Work thread control gint ctlfd, ctlfdnum; gint workthreadcmd; //Interface monitoring gint intfd, intfdnum; struct iovec intiov; struct msghdr intmsg; //Connections monitoring gint connfd, connfdnum; struct iovec conniov; struct msghdr connmsg; //Events struct _mmgui_netlink_interface_event event; time_t ifstatetime, currenttime; gboolean oldstate; gchar oldinterface[IFNAMSIZ]; mmguicore = (mmguicore_t)data; if (mmguicore == NULL) return NULL; /*Initialize shared buffer*/ databufsize = 4096; databuf = g_malloc0(databufsize); intiov.iov_len = databufsize; intiov.iov_base = databuf; conniov.iov_len = databufsize; conniov.iov_base = databuf; /*Initialize active sockets*/ activesockets = 0; ctlfdnum = 0; intfdnum = 0; connfdnum = 0; ctlfd = mmguicore->workthreadctl[1]; if (ctlfd != -1) { ctlfdnum = activesockets; pollfds[ctlfdnum].fd = ctlfd; pollfds[ctlfdnum].events = POLLIN; activesockets++; } intfd = mmgui_netlink_get_interfaces_monitoring_socket_fd(mmguicore->netlink); if (intfd != -1) { intfdnum = activesockets; pollfds[intfdnum].fd = intfd; pollfds[intfdnum].events = POLLIN; intmsg.msg_name = (void *)mmgui_netlink_get_interfaces_monitoring_socket_address(mmguicore->netlink); intmsg.msg_namelen = sizeof(struct sockaddr_nl); intmsg.msg_iov = &intiov; intmsg.msg_iovlen = 1; intmsg.msg_control = NULL; intmsg.msg_controllen = 0; intmsg.msg_flags = 0; activesockets++; } connfd = mmgui_netlink_get_connections_monitoring_socket_fd(mmguicore->netlink); if (connfd != -1) { connfdnum = activesockets; pollfds[connfdnum].fd = connfd; pollfds[connfdnum].events = POLLIN; connmsg.msg_name = (void *)mmgui_netlink_get_connections_monitoring_socket_address(mmguicore->netlink); connmsg.msg_namelen = sizeof(struct sockaddr_nl); connmsg.msg_iov = &conniov; connmsg.msg_iovlen = 1; connmsg.msg_control = NULL; connmsg.msg_controllen = 0; connmsg.msg_flags = 0; activesockets++; } //First we have to get device state ifstatetime = time(NULL); while (TRUE) { pollstatus = poll(pollfds, activesockets, 1000); if (pollstatus > 0) { //Work thread control if (pollfds[ctlfdnum].revents & POLLIN) { /*Extend buffer if needed*/ recvbytes = recv(ctlfd, NULL, 0, MSG_PEEK | MSG_TRUNC); if (recvbytes > databufsize) { radatabuf = g_try_realloc(databuf, recvbytes); if (radatabuf != NULL) { databufsize = recvbytes; databuf = radatabuf; intiov.iov_len = databufsize; intiov.iov_base = databuf; conniov.iov_len = databufsize; conniov.iov_base = databuf; } } /*Receive data*/ recvbytes = recv(ctlfd, &workthreadcmd, sizeof(workthreadcmd), 0); if (recvbytes > 0) { if (workthreadcmd == MMGUI_THREAD_STOP_CMD) { //Terminate thread break; } } else { g_debug("Work thread: Control command not received\n"); } } } //Lock mutex and work with device in safe mode #if GLIB_CHECK_VERSION(2,32,0) g_mutex_lock(&mmguicore->workthreadmutex); #else g_mutex_lock(mmguicore->workthreadmutex); #endif currenttime = time(NULL); if (mmguicore->device != NULL) { if (abs((gint)difftime(ifstatetime, currenttime)) <= 5) { //Save old values g_debug("Requesting network interface state information\n"); oldstate = mmguicore->device->connected; strncpy(oldinterface, mmguicore->device->interface, sizeof(oldinterface)); //Request new information if (mmguicore_devices_get_connection_status(mmguicore)) { g_debug("Got new interface state\n"); if ((oldstate != mmguicore->device->connected) || (!g_str_equal(oldinterface, mmguicore->device->interface))) { //State changed, no need to request information more ifstatetime = 0; //Zero values on disconnect if (!mmguicore->device->connected) { //Close traffic database session mmgui_trafficdb_session_close(mmguicore->device->trafficdb); //Zero traffic values in UI mmguicore_traffic_zero(mmguicore); /*Device disconnect signal*/ if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_DEVICE_CONNECTION_STATUS, mmguicore, GUINT_TO_POINTER(FALSE), mmguicore->userdata); } } else { /*Get session start timestamp*/ mmguicore->device->sessionstarttime = (time_t)mmguicore_devices_get_connection_timestamp(mmguicore); mmguicore->device->sessiontime = llabs((gint64)difftime(currenttime, mmguicore->device->sessionstarttime)); g_debug("Session start time: %" G_GUINT64_FORMAT ", duration: %" G_GUINT64_FORMAT "\n", (guint64)mmguicore->device->sessionstarttime, mmguicore->device->sessiontime); //Open traffic database session mmgui_trafficdb_session_new(mmguicore->device->trafficdb, mmguicore->device->sessionstarttime); /*Device connect signal*/ if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_DEVICE_CONNECTION_STATUS, mmguicore, GUINT_TO_POINTER(TRUE), mmguicore->userdata); } } g_debug("Interface state changed\n"); } } } } if (pollstatus == 0) { //Timeout - request data if (mmguicore->device != NULL) { if (mmguicore->device->connected) { /*Interface statistics*/ mmgui_netlink_request_interface_statistics(mmguicore->netlink, mmguicore->device->interface); /*TCP connections - IPv4*/ mmgui_netlink_request_connections_list(mmguicore->netlink, AF_INET); /*TCP connections - IPv6*/ mmgui_netlink_request_connections_list(mmguicore->netlink, AF_INET6); } } } else if (pollstatus > 0) { //New data available //Interface monitoring if (pollfds[intfdnum].revents & POLLIN) { /*Extend buffer if needed*/ recvbytes = recv(intfd, NULL, 0, MSG_PEEK | MSG_TRUNC); if (recvbytes > databufsize) { radatabuf = g_try_realloc(databuf, recvbytes); if (radatabuf != NULL) { databufsize = recvbytes; databuf = radatabuf; intiov.iov_len = databufsize; intiov.iov_base = databuf; conniov.iov_len = databufsize; conniov.iov_base = databuf; } } /*Receive data*/ recvbytes = recvmsg(intfd, &intmsg, 0); if (recvbytes) { if (mmgui_netlink_read_interface_event(mmguicore->netlink, databuf, recvbytes, &event)) { //Traffic statisctics available if (event.type & MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS) { if (mmguicore->device != NULL) { if ((mmguicore->device->connected) && (g_str_equal(mmguicore->device->interface, event.ifname))) { //Count traffic mmguicore_traffic_count(mmguicore, event.rxbytes, event.txbytes); } } } //Interface created if (event.type & MMGUI_NETLINK_INTERFACE_EVENT_TYPE_ADD) { g_debug("Created network interface event\n"); if (mmguicore->device != NULL) { if (!mmguicore->device->connected) { g_debug("Created network interface event signal\n"); ifstatetime = time(NULL); } } } //Interface removed if (event.type & MMGUI_NETLINK_INTERFACE_EVENT_TYPE_REMOVE) { g_debug("Removed network interface event\n"); if (mmguicore->device != NULL) { if ((mmguicore->device->connected) && (g_str_equal(mmguicore->device->interface, event.ifname))) { g_debug("Removed network interface event signal\n"); ifstatetime = time(NULL); } } } } } else { g_debug("Work thread: interface event not received\n"); } } //Connections monitoring if (pollfds[connfdnum].revents & POLLIN) { /*Extend buffer if needed*/ recvbytes = recv(connfd, NULL, 0, MSG_PEEK | MSG_TRUNC); if (recvbytes > databufsize) { radatabuf = g_try_realloc(databuf, recvbytes); if (radatabuf != NULL) { databufsize = recvbytes; databuf = radatabuf; intiov.iov_len = databufsize; intiov.iov_base = databuf; conniov.iov_len = databufsize; conniov.iov_base = databuf; } } /*Receive data*/ recvbytes = recvmsg(connfd, &connmsg, 0); if (recvbytes) { #if GLIB_CHECK_VERSION(2,32,0) g_mutex_lock(&mmguicore->connsyncmutex); #else g_mutex_lock(mmguicore->connsyncmutex); #endif if (mmgui_netlink_read_connections_list(mmguicore->netlink, databuf, recvbytes)) { if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_UPDATE_CONNECTIONS_LIST, mmguicore, mmguicore, mmguicore->userdata); } } #if GLIB_CHECK_VERSION(2,32,0) g_mutex_unlock(&mmguicore->connsyncmutex); #else g_mutex_unlock(mmguicore->connsyncmutex); #endif } else { g_debug("Work thread: connections data not received\n"); } } } //Update internal device state mmguicore_devices_update_device_state(mmguicore); //Handle traffic limits mmguicore_traffic_limits(mmguicore); /*New day time*/ if (difftime(mmguicore->newdaytime, currenttime) <= 0) { /*Callback*/ if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_SMS_NEW_DAY, mmguicore, NULL, mmguicore->userdata); } mmguicore->newdaytime = mmgui_trafficdb_get_new_day_timesatmp(currenttime); } //Unlock mutex after work finished #if GLIB_CHECK_VERSION(2,32,0) g_mutex_unlock(&mmguicore->workthreadmutex); #else g_mutex_unlock(mmguicore->workthreadmutex); #endif } //Close thread control pipe descriptor close(mmguicore->workthreadctl[1]); return NULL; } static void mmguicore_traffic_count(mmguicore_t mmguicore, guint64 rxbytes, guint64 txbytes) { mmguidevice_t device; time_t currenttime; guint timeframe; struct _mmgui_traffic_update trafficupd; if (mmguicore == NULL) return; device = mmguicore->device; if (device == NULL) return; currenttime = time(NULL); if ((device->connected) && (device->rxbytes <= rxbytes) && (device->txbytes <= txbytes)) { if (device->speedchecktime != 0) { //Time period for speed calculation timeframe = (guint)difftime(currenttime, device->speedchecktime); device->sessiontime += timeframe; if (device->speedindex < MMGUI_SPEED_VALUES_NUMBER) { //Add new speed value device->speedvalues[0][device->speedindex] = (gfloat)((rxbytes - device->rxbytes)*8)/(gfloat)(timeframe*1024); device->speedvalues[1][device->speedindex] = (gfloat)((txbytes - device->txbytes)*8)/(gfloat)(timeframe*1024); device->speedindex++; } else { //Move speed values and add new one memmove(&device->speedvalues[0][0], &device->speedvalues[0][1], sizeof(device->speedvalues[0]) - sizeof(device->speedvalues[0][0])); memmove(&device->speedvalues[1][0], &device->speedvalues[1][1], sizeof(device->speedvalues[1]) - sizeof(device->speedvalues[1][0])); device->speedvalues[0][MMGUI_SPEED_VALUES_NUMBER-1] = (gfloat)((rxbytes - device->rxbytes)*8)/(gfloat)(timeframe*1024); device->speedvalues[1][MMGUI_SPEED_VALUES_NUMBER-1] = (gfloat)((txbytes - device->txbytes)*8)/(gfloat)(timeframe*1024); } /*Update database*/ trafficupd.fullrxbytes = device->rxbytes; trafficupd.fulltxbytes = device->txbytes; trafficupd.fulltime = device->sessiontime; trafficupd.deltarxbytes = rxbytes - device->rxbytes; trafficupd.deltatxbytes = txbytes - device->txbytes; trafficupd.deltaduration = timeframe; mmgui_trafficdb_traffic_update(mmguicore->device->trafficdb, &trafficupd); } //Update traffic count device->rxbytes = rxbytes; device->txbytes = txbytes; } //Set last update time device->speedchecktime = currenttime; //Callback if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_NET_STATUS, mmguicore, device, mmguicore->userdata); } } static void mmguicore_traffic_zero(mmguicore_t mmguicore) { mmguidevice_t device; if (mmguicore == NULL) return; device = mmguicore->device; if (device == NULL) return; //Zero speed values if device is not connected anymore mmguicore->device->speedindex = 0; mmguicore->device->speedvalues[0][0] = 0.0; mmguicore->device->speedvalues[1][0] = 0.0; mmguicore->device->rxbytes = 0; mmguicore->device->txbytes = 0; //Set last update time mmguicore->device->speedchecktime = time(NULL); //Callback if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_NET_STATUS, mmguicore, NULL, mmguicore->userdata); } } static void mmguicore_traffic_limits(mmguicore_t mmguicore) { if (mmguicore == NULL) return; if ((mmguicore->options != NULL) && (mmguicore->device != NULL)) { //Traffic limit if (mmguicore->options->trafficenabled) { if ((!mmguicore->options->trafficexecuted) && (mmguicore->options->trafficfull < (mmguicore->device->rxbytes + mmguicore->device->txbytes))) { mmguicore->options->trafficexecuted = TRUE; if (mmguicore->options->trafficaction == MMGUI_EVENT_ACTION_DISCONNECT) { if (mmguicore->device_connection_disconnect_func != NULL) { (mmguicore->device_connection_disconnect_func)(mmguicore); } } //Callback if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_TRAFFIC_LIMIT, mmguicore, NULL, mmguicore->userdata); } } } //Time limit if (mmguicore->options->timeenabled) { if ((!mmguicore->options->timeexecuted) && (mmguicore->options->timefull < mmguicore->device->sessiontime)) { mmguicore->options->timeexecuted = TRUE; if (mmguicore->options->timeaction == MMGUI_EVENT_ACTION_DISCONNECT) { if (mmguicore->device_connection_disconnect_func != NULL) { (mmguicore->device_connection_disconnect_func)(mmguicore); } } //Callback if (mmguicore->extcb != NULL) { (mmguicore->extcb)(MMGUI_EVENT_TIME_LIMIT, mmguicore, NULL, mmguicore->userdata); } } } } } modem-manager-gui-0.0.17.1/src/main.h0000644000175000017500000002475212377204267015605 0ustar alexalex/* * main.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __MAIN_H__ #define __MAIN_H__ #include #include "settings.h" #include "modem-settings.h" #include "notifications.h" #include "ayatana.h" #include "addressbooks.h" #define MMGUI_MAIN_DEFAULT_DEVICE_IDENTIFIER "00000000000000000000000" #define MMGUI_MAIN_OPERATION_TIMEOUT 120 enum _mmgui_main_pages { MMGUI_MAIN_PAGE_DEVICES = 0, MMGUI_MAIN_PAGE_SMS, MMGUI_MAIN_PAGE_USSD, MMGUI_MAIN_PAGE_INFO, MMGUI_MAIN_PAGE_SCAN, MMGUI_MAIN_PAGE_TRAFFIC, MMGUI_MAIN_PAGE_CONTACTS, MMGUI_MAIN_PAGE_NUMBER }; struct _mmgui_main_window { //Window GtkWidget *window; GtkWidget *toolbar; GtkWidget *statusbar; guint sbcontext; GtkWidget *signalimage; GdkPixbuf *signal0icon; GdkPixbuf *signal25icon; GdkPixbuf *signal50icon; GdkPixbuf *signal75icon; GdkPixbuf *signal100icon; GdkPixbuf *mainicon; //Dialogs GtkWidget *aboutdialog; GtkWidget *prefdialog; GtkWidget *questiondialog; GtkWidget *errordialog; GtkWidget *exitdialog; //Progress dialog GtkWidget *progressdialog; GtkWidget *progressbar; guint progresstimeout; //Info bar for devices page GtkWidget *nodevbar; //New SMS dialog GtkWidget *newsmsdialog; GtkWidget *smsnumberentry; GtkWidget *smsnumbercombo; GtkWidget *smstextview; GtkWidget *sendsmsbutton; GtkWidget *savesmsbutton; GtkTreeStore *smsnumlistmodel; GtkTreePath *smsnumlistmodempath; GtkTreePath *smsnumlistgnomepath; GtkTreePath *smsnumlistkdepath; GSList *smsnumlisthistory; GtkEntryCompletion *smscompletion; GtkListStore *smscompletionmodel; //Toolbar GtkWidget *devbutton; GtkWidget *smsbutton; GtkWidget *ussdbutton; GtkWidget *infobutton; GtkWidget *scanbutton; GtkWidget *contactsbutton; GtkWidget *trafficbutton; //Pages GtkWidget *notebook; //Devices page GtkWidget *devlist; GtkWidget *devconnctl; GtkWidget *devconneditor; GtkWidget *devconncb; /*Connections dialog*/ GtkWidget *conneditdialog; GtkWidget *connaddtoolbutton; GtkWidget *connremovetoolbutton; GtkWidget *connsavetoolbutton; GtkWidget *contreeview; GtkWidget *connnamecombobox; GtkWidget *connnamecomboboxentry; GtkWidget *connnameapnentry; GtkWidget *connnethomeradiobutton; GtkWidget *connnetroamradiobutton; GtkWidget *connnetidentry; GtkWidget *connauthnumberentry; GtkWidget *connauthusernameentry; GtkWidget *connauthpassentry; GtkWidget *conndnsdynradiobutton; GtkWidget *conndnsstradiobutton; GtkWidget *conndns1entry; GtkWidget *conndns2entry; /*Add connection dialog*/ GtkWidget *connadddialog; //SMS page GtkWidget *smsinfobar; GtkWidget *smsinfobarlabel; GtkWidget *smslist; GtkWidget *smstext; GtkWidget *newsmsbutton; GtkWidget *removesmsbutton; GtkWidget *answersmsbutton; GdkPixbuf *smsreadicon; GdkPixbuf *smsunreadicon; GtkTreePath *incomingpath; GtkTreePath *sentpath; GtkTreePath *draftspath; //Info page GtkWidget *devicevlabel; GtkWidget *operatorvlabel; GtkWidget *operatorcodevlabel; GtkWidget *regstatevlabel; GtkWidget *modevlabel; GtkWidget *imeivlabel; GtkWidget *imsivlabel; GtkWidget *signallevelprogressbar; GtkWidget *info3gpplocvlabel; GtkWidget *infogpslocvlabel; GtkWidget *equipmentimage; GtkWidget *networkimage; GtkWidget *locationimage; //USSD page GtkWidget *ussdinfobar; GtkWidget *ussdinfobarlabel; GtkWidget *ussdentry; GtkWidget *ussdcombobox; GtkWidget *ussdeditor; GtkWidget *ussdsend; GtkWidget *ussdtext; GtkTextTag *ussdrequesttag; GtkTextTag *ussdhinttag; GtkTextTag *ussdanswertag; GtkEntryCompletion *ussdcompletion; GtkListStore *ussdcompletionmodel; //Scan page GtkWidget *scaninfobar; GtkWidget *scaninfobarlabel; GtkWidget *scanlist; GtkWidget *startscanbutton; GtkWidget *scancreateconnectionbutton; //Traffic page GtkWidget *trafficparamslist; GtkWidget *trafficdrawingarea; GtkWidget *trafficlimitbutton; GtkWidget *trafficconnbutton; //Contacts page GtkWidget *contactsinfobar; GtkWidget *contactsinfobarlabel; GtkWidget *newcontactbutton; GtkWidget *removecontactbutton; GtkWidget *smstocontactbutton; GtkWidget *contactstreeview; GtkWidget *contactssmsmenu; GtkTreePath *contmodempath; GtkTreePath *contgnomepath; GtkTreePath *contkdepath; //New contact dialog GtkWidget *newcontactdialog; GtkWidget *contactnameentry; GtkWidget *contactnumberentry; GtkWidget *contactemailentry; GtkWidget *contactgroupentry; GtkWidget *contactname2entry; GtkWidget *contactnumber2entry; GtkWidget *newcontactaddbutton; //Limits dialog GtkWidget *trafficlimitsdialog; GtkWidget *trafficlimitcheckbutton; GtkWidget *trafficamount; GtkWidget *trafficunits; GtkWidget *trafficmessage; GtkWidget *trafficaction; GtkWidget *timelimitcheckbutton; GtkWidget *timeamount; GtkWidget *timeunits; GtkWidget *timemessage; GtkWidget *timeaction; //Connections dialog GtkAccelGroup *connaccelgroup; GtkWidget *conndialog; GtkWidget *connscrolledwindow; GtkWidget *conntreeview; GtkWidget *conntermtoolbutton; //Traffic statistics dialog GtkWidget *trafficstatsdialog; GtkWidget *trafficstatstreeview; GtkWidget *trafficstatsmonthcb; GtkWidget *trafficstatsyearcb; //USSD editor dialog GtkAccelGroup *ussdaccelgroup; GtkWidget *ussdeditdialog; GtkWidget *ussdedittreeview; GtkWidget *newussdtoolbutton; GtkWidget *removeussdtoolbutton; GtkWidget *ussdencodingtoolbutton; //Preferences GtkWidget *prefsmsconcat; GtkWidget *prefsmsexpand; GtkWidget *prefsmsoldontop; GtkWidget *prefsmsvalidityscale; GtkWidget *prefsmsreportcb; GtkWidget *preftrafficrxcolor; GtkWidget *preftraffictxcolor; GtkWidget *prefbehavioursounds; GtkWidget *prefbehaviourhide; GtkWidget *prefbehaviourgeom; GtkWidget *prefbehaviourautostart; GtkWidget *prefenabletimeoutscale; GtkWidget *prefsendsmstimeoutscale; GtkWidget *prefsendussdtimeoutscale; GtkWidget *prefscannetworkstimeoutscale; GtkWidget *prefmodulesmmcombo; GtkWidget *prefmodulescmcombo; //Exit dialog GtkWidget *exitaskagain; GtkWidget *exitcloseradio; GtkWidget *exithideradio; /*Start dialog*/ GtkWidget *startdialog; GtkWidget *startdialogimage; GtkWidget *startdialogmmcombo; GtkWidget *startdialogcmcombo; /*Keyboard acceletators*/ GtkAccelGroup *accelgroup; /*Page shortcuts*/ GSList *pageshortcuts; /*Closures for SMS page*/ GClosure *newsmsclosure; GClosure *removesmsclosure; GClosure *answersmsclosure; /*Closures for USSD page*/ GClosure *ussdeditorclosure; GClosure *ussdsendclosure; /*Closures for Scan page*/ GClosure *startscanclosure; /*Closures for Traffic page*/ GClosure *trafficlimitclosure; GClosure *trafficconnclosure; GClosure *trafficstatsclosure; /*Closures for Contacts page*/ GClosure *newcontactclosure; GClosure *removecontactclosure; GClosure *smstocontactclosure; /*Tray icon*/ GtkStatusIcon *statusicon; GtkWidget *traymenu; GtkWidget *showwin_tm, *sep1_tm, *newsms_tm, *sep2_tm, *quit_tm; gulong traysigid; }; typedef struct _mmgui_main_window *mmgui_main_window_t; struct _mmgui_cli_options { gboolean invisible; gboolean minimized; /*gboolean nostatistics; gboolean nosmsupdate;*/ //SMS gboolean concatsms; gboolean smsexpandfolders; gboolean smsoldontop; gboolean smsdeliveryreport; gint smsvalidityperiod; //Traffic graph #if GTK_CHECK_VERSION(3,4,0) GdkRGBA rxtrafficcolor; GdkRGBA txtrafficcolor; #else GdkColor rxtrafficcolor; GdkColor txtrafficcolor; #endif //Behaviour gboolean usesounds; gboolean hidetotray; gboolean askforhide; gboolean savegeometry; //Window geometry gint wgwidth; gint wgheight; gint wgposx; gint wgposy; }; typedef struct _mmgui_cli_options *mmgui_cli_options_t; struct _mmgui_application { //GTK+ application object GtkApplication *gtkapplication; //Allocated structures mmgui_main_window_t window; mmgui_cli_options_t options; //mmgui_traffic_limits_t limits; mmgui_core_options_t coreoptions; //Objects mmguicore_t core; settings_t settings; modem_settings_t modemsettings; mmgui_libpaths_cache_t libcache; mmgui_notifications_t notifications; mmgui_addressbooks_t addressbooks; mmgui_ayatana_t ayatana; }; typedef struct _mmgui_application *mmgui_application_t; struct _mmgui_application_data { mmgui_application_t mmguiapp; gpointer data; }; typedef struct _mmgui_application_data *mmgui_application_data_t; gboolean mmgui_main_ui_question_dialog_open(mmgui_application_t mmguiapp, gchar *caption, gchar *text); gboolean mmgui_main_ui_error_dialog_open(mmgui_application_t mmguiapp, gchar *caption, gchar *text); void mmgui_main_ui_progress_dialog_open(mmgui_application_t mmguiapp); void mmgui_main_ui_progress_dialog_close(mmgui_application_t mmguiapp); gboolean mmgui_main_ui_test_device_state(mmgui_application_t mmguiapp, guint setpage); void mmgui_main_ui_devices_button_toggled_signal(GObject *object, gpointer data); void mmgui_main_ui_sms_button_toggled_signal(GObject *object, gpointer data); void mmgui_main_ui_ussd_button_toggled_signal(GObject *object, gpointer data); void mmgui_main_ui_info_button_toggled_signal(GObject *object, gpointer data); void mmgui_main_ui_scan_button_toggled_signal(GObject *object, gpointer data); void mmgui_main_ui_traffic_button_toggled_signal(GObject *object, gpointer data); void mmgui_main_ui_contacts_button_toggled_signal(GObject *object, gpointer data); gboolean mmgui_main_ui_window_delete_event_signal(GtkWidget *widget, GdkEvent *event, gpointer data); void mmgui_main_ui_window_destroy_signal(GObject *object, gpointer data); gchar *mmgui_main_ui_message_validity_scale_value_format(GtkScale *scale, gdouble value, gpointer user_data); gchar *mmgui_main_ui_timeout_scale_value_format(GtkScale *scale, gdouble value, gpointer user_data); void mmgui_main_ui_control_buttons_disable(mmgui_application_t mmguiapp, gboolean disable); void mmgui_main_ui_interrupt_operation_button_clicked_signal(GObject *object, gpointer data); gboolean mmgui_main_ui_update_statusbar_from_thread(gpointer data); #endif /* __MAIN_H__ */ modem-manager-gui-0.0.17.1/src/netlink.h0000644000175000017500000001112312376651202016303 0ustar alexalex/* * netlink.h * * Copyright 2012-2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __NETLINK_H__ #define __NETLINK_H__ #include #include #include #include #include #include enum _mmgui_netlink_interface_event_type { MMGUI_NETLINK_INTERFACE_EVENT_TYPE_UNKNOWN = 0, MMGUI_NETLINK_INTERFACE_EVENT_TYPE_ADD = 1 << 0, MMGUI_NETLINK_INTERFACE_EVENT_TYPE_REMOVE = 1 << 1, MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS = 1 << 2, }; /*Connection change identifiers*/ enum _mmgui_netlink_connection_event_type { MMGUI_NETLINK_CONNECTION_EVENT_ADD = 0, MMGUI_NETLINK_CONNECTION_EVENT_REMOVE = 1, MMGUI_NETLINK_CONNECTION_EVENT_MODIFY = 2 }; /*Connection paramerters*/ struct _mmgui_netlink_connection { guint inode; guint dqueue; uid_t userid; time_t updatetime; pid_t apppid; gchar *appname; gchar *dsthostname; gchar srcaddr[INET6_ADDRSTRLEN + 8]; gchar dstaddr[INET6_ADDRSTRLEN + 8]; gushort srcport; guchar state; guchar family; }; typedef struct _mmgui_netlink_connection *mmgui_netlink_connection_t; /*Changed parameters of connection */ struct _mmgui_netlink_connection_changed_params { guchar state; guint dqueue; }; typedef struct _mmgui_netlink_connection_changed_params *mmgui_netlink_connection_changed_params_t; /*Unified connection changes structure*/ struct _mmgui_netlink_connection_change { guint inode; guint event; union { mmgui_netlink_connection_changed_params_t params; mmgui_netlink_connection_t connection; } data; }; typedef struct _mmgui_netlink_connection_change *mmgui_netlink_connection_change_t; struct _mmgui_netlink_connection_info_request { struct nlmsghdr msgheader; struct inet_diag_req nlreq; }; struct _mmgui_netlink_interface_info_request { struct nlmsghdr msgheader; struct ifinfomsg ifinfo; }; struct _mmgui_netlink_interface_event { enum _mmgui_netlink_interface_event_type type; gchar ifname[IFNAMSIZ]; gboolean running; gboolean up; guint64 rxbytes; guint64 txbytes; }; typedef struct _mmgui_netlink_interface_event *mmgui_netlink_interface_event_t; struct _mmgui_netlink { //Connections monitoring gint connsocketfd; pid_t userid; time_t currenttime; GHashTable *connections; GAsyncQueue *changequeue; //single queue for now struct sockaddr_nl connaddr; //Network interfaces monitoring gint intsocketfd; struct sockaddr_nl intaddr; }; typedef struct _mmgui_netlink *mmgui_netlink_t; gboolean mmgui_netlink_terminate_application(pid_t pid); gchar *mmgui_netlink_socket_state(guchar state); gboolean mmgui_netlink_update(mmgui_netlink_t netlink); gboolean mmgui_netlink_request_connections_list(mmgui_netlink_t netlink, guint family); gboolean mmgui_netlink_read_connections_list(mmgui_netlink_t netlink, gchar *data, gsize datasize); gboolean mmgui_netlink_request_interface_statistics(mmgui_netlink_t netlink, gchar *interface); gboolean mmgui_netlink_read_interface_event(mmgui_netlink_t netlink, gchar *data, gsize datasize, mmgui_netlink_interface_event_t event); gint mmgui_netlink_get_connections_monitoring_socket_fd(mmgui_netlink_t netlink); gint mmgui_netlink_get_interfaces_monitoring_socket_fd(mmgui_netlink_t netlink); struct sockaddr_nl *mmgui_netlink_get_connections_monitoring_socket_address(mmgui_netlink_t netlink); struct sockaddr_nl *mmgui_netlink_get_interfaces_monitoring_socket_address(mmgui_netlink_t netlink); void mmgui_netlink_free_connection_change(mmgui_netlink_connection_change_t change); void mmgui_netlink_free_connection(mmgui_netlink_connection_t connection); GSList *mmgui_netlink_open_interactive_connections_list(mmgui_netlink_t netlink); void mmgui_netlink_close_interactive_connections_list(mmgui_netlink_t netlink); GSList *mmgui_netlink_get_connections_changes(mmgui_netlink_t netlink); void mmgui_netlink_close(mmgui_netlink_t netlink); mmgui_netlink_t mmgui_netlink_open(void); #endif /* __NETLINK_H__ */ modem-manager-gui-0.0.17.1/src/strformat.h0000644000175000017500000000363512377072414016674 0ustar alexalex/* * strformat.h * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __STRFORMAT_H__ #define __STRFORMAT_H__ #include #include #include #include "mmguicore.h" gchar *mmgui_str_format_speed(gfloat speed, gchar *buffer, gsize bufsize, gboolean small); gchar *mmgui_str_format_time_number(guchar number, gchar *buffer, gsize bufsize); gchar *mmgui_str_format_time(guint64 seconds, gchar *buffer, gsize bufsize, gboolean small); gchar *mmgui_str_format_bytes(guint64 bytes, gchar *buffer, gsize bufsize, gboolean small); gchar *mmgui_str_format_sms_time(time_t timestamp, gchar *buffer, gsize bufsize); gchar *mmgui_str_format_mode_string(enum _mmgui_device_modes mode); gchar *mmgui_str_format_na_status_string(enum _mmgui_network_availability status); gchar *mmgui_str_format_access_tech_string(enum _mmgui_access_tech status); gchar *mmgui_str_format_reg_status(enum _mmgui_reg_status status); gchar *mmgui_str_format_operator_code(gint operatorcode, enum _mmgui_device_types type, gchar *buffer, gsize bufsize); gchar *mmgui_str_format_message_validity_period(gdouble value); gchar *mmgui_str_format_operation_timeout_period(gdouble value); #endif /* __STRFORMAT_H__ */ modem-manager-gui-0.0.17.1/src/strformat.c0000644000175000017500000002614712377072334016673 0ustar alexalex/* * strformat.c * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "strformat.h" #include "mmguicore.h" gchar *mmgui_str_format_speed(gfloat speed, gchar *buffer, gsize bufsize, gboolean small) { gdouble fpvalue; if ((buffer == NULL) || (bufsize == 0)) return NULL; memset(buffer, 0, bufsize); if (speed < 1024.0) { if (small) { g_snprintf(buffer, bufsize, _("%.3f kbps"), speed); } else { g_snprintf(buffer, bufsize, _("%.3f kbps"), speed); } } else if ((speed >= 1024.0) && (speed < 1048576.0)) { fpvalue = speed / (gdouble)(1024.0); if (small) { g_snprintf(buffer, bufsize, _("%.3g Mbps"), fpvalue); } else { g_snprintf(buffer, bufsize, _("%.3g Mbps"), fpvalue); } } else { fpvalue = speed / (gdouble)(1048576.0); if (small) { g_snprintf(buffer, bufsize, _("%.3g Gbps"), fpvalue); } else { g_snprintf(buffer, bufsize, _("%.3g Gbps"), fpvalue); } } return buffer; } gchar *mmgui_str_format_time_number(guchar number, gchar *buffer, gsize bufsize) { if ((buffer == NULL) || (bufsize == 0)) return NULL; memset(buffer, 0, bufsize); if (number < 10) { g_snprintf(buffer, bufsize, "0%u", (guint)number); } else { g_snprintf(buffer, bufsize, "%u", (guint)number); } return buffer; } gchar *mmgui_str_format_time(guint64 seconds, gchar *buffer, gsize bufsize, gboolean small) { gchar secbuffer[3], minbuffer[3], hourbuffer[3]; if ((buffer == NULL) || (bufsize == 0)) return NULL; memset(buffer, 0, bufsize); if (seconds < 60) { if (small) { g_snprintf(buffer, bufsize, _("%u sec"), (guint)seconds); } else { g_snprintf(buffer, bufsize, _("%u sec"), (guint)seconds); } } else if ((seconds >= 60) && (seconds < 3600)) { if (small) { g_snprintf(buffer, bufsize, _("%s:%s"), mmgui_str_format_time_number(seconds%3600/60, minbuffer, sizeof(minbuffer)), mmgui_str_format_time_number(seconds%60, secbuffer, sizeof(secbuffer))); } else { g_snprintf(buffer, bufsize, _("%s:%s"), mmgui_str_format_time_number(seconds%3600/60, minbuffer, sizeof(minbuffer)), mmgui_str_format_time_number(seconds%60, secbuffer, sizeof(secbuffer))); } } else if ((seconds >= 3600) && (seconds < 86400)) { if (small) { g_snprintf(buffer, bufsize, _("%s:%s:%s"), mmgui_str_format_time_number(seconds%86400/3600, hourbuffer, sizeof(hourbuffer)), mmgui_str_format_time_number(seconds%3600/60, minbuffer, sizeof(minbuffer)), mmgui_str_format_time_number(seconds%60, secbuffer, sizeof(secbuffer))); } else { g_snprintf(buffer, bufsize, _("%s:%s:%s"), mmgui_str_format_time_number(seconds%86400/3600, hourbuffer, sizeof(hourbuffer)), mmgui_str_format_time_number(seconds%3600/60, minbuffer, sizeof(minbuffer)), mmgui_str_format_time_number(seconds%60, secbuffer, sizeof(secbuffer))); } } else { if (small) { g_snprintf(buffer, bufsize, _("%" G_GUINT64_FORMAT " day(s) %s:%s:%s"), seconds/86400, mmgui_str_format_time_number(seconds%86400/3600, hourbuffer, sizeof(hourbuffer)), mmgui_str_format_time_number(seconds%3600/60, minbuffer, sizeof(minbuffer)), mmgui_str_format_time_number(seconds%60, secbuffer, sizeof(secbuffer))); } else { g_snprintf(buffer, bufsize, _("%" G_GUINT64_FORMAT " day(s) %s:%s:%s"), seconds/86400, mmgui_str_format_time_number(seconds%86400/3600, hourbuffer, sizeof(hourbuffer)), mmgui_str_format_time_number(seconds%3600/60, minbuffer, sizeof(minbuffer)), mmgui_str_format_time_number(seconds%60, secbuffer, sizeof(secbuffer))); } } return buffer; } gchar *mmgui_str_format_bytes(guint64 bytes, gchar *buffer, gsize bufsize, gboolean small) { gdouble fpvalue; if ((buffer == NULL) || (bufsize == 0)) return NULL; memset(buffer, 0, bufsize); if (bytes < 1024) { if (small) { g_snprintf(buffer, bufsize, _("%u"), (guint)bytes); } else { g_snprintf(buffer, bufsize, _("%u"), (guint)bytes); } } else if ((bytes >= 1024) && (bytes < 1048576ull)) { fpvalue = bytes / (gdouble)(1024.0); if (small) { g_snprintf(buffer, bufsize, _("%.3g Kb"), fpvalue); } else { g_snprintf(buffer, bufsize, _("%.3g Kb"), fpvalue); } } else if ((bytes >= 1048576ull) && (bytes < 1073741824ull)) { fpvalue = bytes / (gdouble)(1048576.0); if (small) { g_snprintf(buffer, bufsize, _("%.3g Mb"), fpvalue); } else { g_snprintf(buffer, bufsize, _("%.3g Mb"), fpvalue); } } else if ((bytes >= 1073741824ull) && (bytes < 109951162800ull)) { fpvalue = bytes / (gdouble)(1073741824.0); if (small) { g_snprintf(buffer, bufsize, _("%.3g Gb"), fpvalue); } else { g_snprintf(buffer, bufsize, _("%.3g Gb"), fpvalue); } } else { fpvalue = bytes / (gdouble)(109951162800.0); if (small) { g_snprintf(buffer, bufsize, _("%.3g Tb"), fpvalue); } else { g_snprintf(buffer, bufsize, _("%.3g Tb"), fpvalue); } } return buffer; } gchar *mmgui_str_format_sms_time(time_t timestamp, gchar *buffer, gsize bufsize) { time_t todaytime; struct tm *ftime; gdouble delta; if ((buffer == NULL) || (bufsize == 0)) return NULL; /*Truncate today's time*/ todaytime = time(NULL); ftime = localtime(&todaytime); ftime->tm_hour = 0; ftime->tm_min = 0; ftime->tm_sec = 0; todaytime = mktime(ftime); /*Calculate time interval*/ delta = difftime(todaytime, timestamp); /*Prepare mssage time structure*/ ftime = localtime(×tamp); memset(buffer, 0, bufsize); if (delta <= 0.0) { if (strftime(buffer, bufsize, _("Today, %T"), ftime) == 0) { g_snprintf(buffer, bufsize, _("Unknown")); } } else if ((delta > 0.0) && (delta < 86400.0)) { if (strftime(buffer, bufsize, _("Yesterday, %T"), ftime) == 0) { g_snprintf(buffer, bufsize, _("Unknown")); } } else { if (strftime(buffer, bufsize, _("%d %B %Y, %T"), ftime) == 0) { g_snprintf(buffer, bufsize, _("Unknown")); } } return buffer; } gchar *mmgui_str_format_mode_string(enum _mmgui_device_modes mode) { switch (mode) { case MMGUI_DEVICE_MODE_UNKNOWN: return _("Unknown"); case MMGUI_DEVICE_MODE_GSM: return "GSM"; case MMGUI_DEVICE_MODE_GSM_COMPACT: return "Compact GSM"; case MMGUI_DEVICE_MODE_GPRS: return "GPRS"; case MMGUI_DEVICE_MODE_EDGE: return "EDGE (ETSI 27.007: \"GSM w/EGPRS\")"; case MMGUI_DEVICE_MODE_UMTS: return "UMTS (ETSI 27.007: \"UTRAN\")"; case MMGUI_DEVICE_MODE_HSDPA: return "HSDPA (ETSI 27.007: \"UTRAN w/HSDPA\")"; case MMGUI_DEVICE_MODE_HSUPA: return "HSUPA (ETSI 27.007: \"UTRAN w/HSUPA\")"; case MMGUI_DEVICE_MODE_HSPA: return "HSPA (ETSI 27.007: \"UTRAN w/HSDPA and HSUPA\")"; case MMGUI_DEVICE_MODE_HSPA_PLUS: return "HSPA+ (ETSI 27.007: \"UTRAN w/HSPA+\")"; case MMGUI_DEVICE_MODE_1XRTT: return "CDMA2000 1xRTT"; case MMGUI_DEVICE_MODE_EVDO0: return "CDMA2000 EVDO revision 0"; case MMGUI_DEVICE_MODE_EVDOA: return "CDMA2000 EVDO revision A"; case MMGUI_DEVICE_MODE_EVDOB: return "CDMA2000 EVDO revision B"; case MMGUI_DEVICE_MODE_LTE: return "LTE (ETSI 27.007: \"E-UTRAN\")"; default: return _("Unknown"); } } gchar *mmgui_str_format_na_status_string(enum _mmgui_network_availability status) { switch (status) { case MMGUI_NA_UNKNOWN: return _("Unknown"); case MMGUI_NA_AVAILABLE: return _("Available"); case MMGUI_NA_CURRENT: return _("Current"); case MMGUI_NA_FORBIDDEN: return _("Forbidden"); default: return _("Unknown"); } } gchar *mmgui_str_format_access_tech_string(enum _mmgui_access_tech status) { switch (status) { case MMGUI_ACCESS_TECH_GSM: return "GSM"; case MMGUI_ACCESS_TECH_GSM_COMPACT: return "GSM Compact"; case MMGUI_ACCESS_TECH_UMTS: return "UMTS"; case MMGUI_ACCESS_TECH_EDGE: return "EDGE"; case MMGUI_ACCESS_TECH_HSDPA: return "HSDPA"; case MMGUI_ACCESS_TECH_HSUPA: return "HSUPA"; case MMGUI_ACCESS_TECH_HSPA: return "HSPA"; default: return "Unknown"; } } gchar *mmgui_str_format_reg_status(enum _mmgui_reg_status status) { switch (status) { case MMGUI_REG_STATUS_IDLE: return _("Not registered"); case MMGUI_REG_STATUS_HOME: return _("Home network"); case MMGUI_REG_STATUS_SEARCHING: return _("Searching"); case MMGUI_REG_STATUS_DENIED: return _("Registration denied"); case MMGUI_REG_STATUS_UNKNOWN: return _("Unknown status"); case MMGUI_REG_STATUS_ROAMING: return _("Roaming network"); default: return _("Unknown status"); } } gchar *mmgui_str_format_operator_code(gint operatorcode, enum _mmgui_device_types type, gchar *buffer, gsize bufsize) { if ((buffer == NULL) || (bufsize == 0)) return NULL; memset(buffer, 0, bufsize); if (operatorcode != 0) { if (type == MMGUI_DEVICE_TYPE_GSM) { if ((operatorcode & 0x0000ffff) < 10) { /*MCC+MNC (4 to 5 digits)*/ g_snprintf(buffer, bufsize, "%u0%u", (operatorcode & 0xffff0000) >> 16, operatorcode & 0x0000ffff); } else { /*MCC+MNC (5 and 6 digits)*/ g_snprintf(buffer, bufsize, "%u%u", (operatorcode & 0xffff0000) >> 16, operatorcode & 0x0000ffff); } } else if (type == MMGUI_DEVICE_TYPE_CDMA) { /*SID*/ g_snprintf(buffer, bufsize, "%u", operatorcode); } } else { g_snprintf(buffer, bufsize, _("Unknown")); } return buffer; } gchar *mmgui_str_format_message_validity_period(gdouble value) { gfloat num; gchar *res; if ((value >= 0.0) && (value <= 143.0)) { /*Minutes*/ num = (value + 1.0) * 5.0; res = g_strdup_printf(_("%3.0f minutes"), num); } else if ((value >= 144.0) && (value <= 167.0)) { /*Hours*/ num = 12.0 + ((value - 143.0) * 0.5); res = g_strdup_printf(_("%3.1f hours"), num); } else if ((value >= 168.0) && (value <= 196.0)) { /*Days*/ num = (value - 166.0); res = g_strdup_printf(_("%2.0f days"), num); } else if ((value >= 197.0) && (value <= 255.0)) { /*Weeks*/ num = (value - 192.0); res = g_strdup_printf(_("%2.0f weeks"), num); } else { /*Undefined*/ res = g_strdup(_("Undefined")); } return res; } gchar *mmgui_str_format_operation_timeout_period(gdouble value) { gchar *res; if ((value >= 0.0) && (value < 60.0)) { /*Seconds*/ res = g_strdup_printf(_("%2.0f sec"), value); } else if (value >= 60.0) { /*Minutes*/ res = g_strdup_printf(_("%u min, %u sec"), (guint)value / 60, (guint)value % 60); } else { /*Undefined*/ res = g_strdup("Undefined"); } return res; } modem-manager-gui-0.0.17.1/src/scan-page.h0000644000175000017500000000274012375676100016505 0ustar alexalex/* * scan-page.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __SCAN_PAGE_H__ #define __SCAN_PAGE_H__ #include #include "main.h" enum _mmgui_main_scanlist_columns { MMGUI_MAIN_SCANLIST_OPERATOR = 0, MMGUI_MAIN_SCANLIST_NAME, MMGUI_MAIN_SCANLIST_IDENIFIER, MMGUI_MAIN_SCANLIST_AVAILABILITY, MMGUI_MAIN_SCANLIST_COLUMNS }; /*SCAN*/ void mmgui_main_scan_start(mmgui_application_t mmguiapp); void mmgui_main_scan_start_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_scan_list_fill(mmgui_application_t mmguiapp, mmguicore_t mmguicore, GSList *netlist); void mmgui_main_scan_list_init(mmgui_application_t mmguiapp); void mmgui_main_scan_state_clear(mmgui_application_t mmguiapp); #endif /* __SCAN_PAGE_H__ */ modem-manager-gui-0.0.17.1/src/scan-page.c0000644000175000017500000001322212375676114016502 0ustar alexalex/* * scan-page.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "strformat.h" #include "resources.h" #include "scan-page.h" #include "main.h" static void mmgui_main_scan_list_fill_foreach(gpointer data, gpointer user_data); /*SCAN*/ void mmgui_main_scan_start(mmgui_application_t mmguiapp) { if (mmguiapp == NULL) return; if (mmguicore_networks_scan(mmguiapp->core)) { mmgui_main_ui_progress_dialog_open(mmguiapp); } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error scanning network"), _("Device error")); } } void mmgui_main_scan_create_connection_button_clicked_signal(GObject *object, gpointer data) { } void mmgui_main_scan_start_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_scan_start(mmguiapp); } static void mmgui_main_scan_list_cursor_changed_signal(GtkTreeView *tree_view, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; } static void mmgui_main_scan_list_row_activated_signal(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; } static void mmgui_main_scan_list_fill_foreach(gpointer data, gpointer user_data) { mmgui_scanned_network_t network; GtkTreeModel *model; GtkTreeIter iter; gchar *markup; gboolean netavailability; network = (mmgui_scanned_network_t)data; model = (GtkTreeModel *)user_data; if ((network == NULL) || (model == NULL)) return; markup = g_strdup_printf(_("%s\n%s ID: %u Availability: %s Access tech: %s"), network->operator_long, network->operator_short, network->operator_num, mmgui_str_format_na_status_string(network->status), mmgui_str_format_access_tech_string(network->access_tech)); netavailability = ((network->status == MMGUI_NA_AVAILABLE) || (network->status == MMGUI_NA_CURRENT)); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_SCANLIST_OPERATOR, markup, MMGUI_MAIN_SCANLIST_NAME, network->operator_long, MMGUI_MAIN_SCANLIST_IDENIFIER, network->operator_num, MMGUI_MAIN_SCANLIST_AVAILABILITY, netavailability, -1); g_free(markup); } void mmgui_main_scan_list_fill(mmgui_application_t mmguiapp, mmguicore_t mmguicore, GSList *netlist) { GtkTreeModel *model; if ((mmguiapp == NULL) || (mmguicore == NULL)) return; if (netlist != NULL) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->scanlist)); if (model != NULL) { //Detach model g_object_ref(model); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->scanlist), NULL); //Clear model gtk_list_store_clear(GTK_LIST_STORE(model)); //Fill model g_slist_foreach(netlist, mmgui_main_scan_list_fill_foreach, model); //Attach model gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->scanlist), model); g_object_unref(model); } //Free networks list mmguicore_networks_scan_free(netlist); } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error scanning networks"), mmguicore_get_last_error(mmguiapp->core)); } } void mmgui_main_scan_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; if (mmguiapp == NULL) return; renderer = gtk_cell_renderer_text_new(); g_object_set(renderer, "ellipsize", PANGO_ELLIPSIZE_END, "ellipsize-set", TRUE, NULL); column = gtk_tree_view_column_new_with_attributes(_("Operator"), renderer, "markup", MMGUI_MAIN_SCANLIST_OPERATOR, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->scanlist), column); store = gtk_list_store_new(MMGUI_MAIN_SCANLIST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_BOOLEAN); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->scanlist), GTK_TREE_MODEL(store)); g_object_unref(store); /*Select network signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->scanlist), "cursor-changed", G_CALLBACK(mmgui_main_scan_list_cursor_changed_signal), mmguiapp); /*Create connection signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->scanlist), "row-activated", G_CALLBACK(mmgui_main_scan_list_row_activated_signal), mmguiapp); } void mmgui_main_scan_state_clear(mmgui_application_t mmguiapp) { GtkTreeModel *model; if (mmguiapp == NULL) return; /*Clear scanned networks list*/ model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->scanlist)); if (model != NULL) { gtk_list_store_clear(GTK_LIST_STORE(model)); } /*Disable 'Create connection' button*/ gtk_widget_set_sensitive(GTK_WIDGET(mmguiapp->window->scancreateconnectionbutton), FALSE); } modem-manager-gui-0.0.17.1/src/devices-page.h0000644000175000017500000000345312375675642017217 0ustar alexalex/* * devices-page.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __DEVICES_PAGE_H__ #define __DEVICES_PAGE_H__ #include #include "main.h" enum _mmgui_main_devlist_columns { MMGUI_MAIN_DEVLIST_ENABLED = 0, MMGUI_MAIN_DEVLIST_DESCRIPTION, MMGUI_MAIN_DEVLIST_ID, MMGUI_MAIN_DEVLIST_IDENTIFIER, MMGUI_MAIN_DEVLIST_COLUMNS }; /*Devices*/ gboolean mmgui_main_device_handle_added_from_thread(gpointer data); gboolean mmgui_main_device_handle_removed_from_thread(gpointer data); void mmgui_main_device_handle_enabled_local_status(mmgui_application_t mmguiapp, gboolean result); gboolean mmgui_main_device_handle_enabled_status_from_thread(gpointer data); gboolean mmgui_main_device_handle_blocked_status_from_thread(gpointer data); gboolean mmgui_main_device_handle_connection_status_from_thread(gpointer data); gboolean mmgui_main_device_select_from_list(mmgui_application_t mmguiapp, gchar *identifier); void mmgui_main_device_list_fill(mmgui_application_t mmguiapp); void mmgui_main_device_list_init(mmgui_application_t mmguiapp); #endif /* __DEVICES_PAGE_H__ */ modem-manager-gui-0.0.17.1/src/devices-page.c0000644000175000017500000003254412375675666017223 0ustar alexalex/* * devices-page.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "settings.h" #include "encoding.h" #include "notifications.h" #include "ayatana.h" #include "mmguicore.h" #include "devices-page.h" #include "info-page.h" #include "main.h" static gboolean mmgui_main_device_list_unselect_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static void mmgui_main_device_list_select_signal(GtkCellRendererToggle *cell_renderer, gchar *path, gpointer data); static void mmgui_main_device_remove_from_list(mmgui_application_t mmguiapp, guint devid); static void mmgui_main_device_add_to_list(mmgui_application_t mmguiapp, mmguidevice_t device, GtkTreeModel *model); /*Devices*/ gboolean mmgui_main_device_handle_added_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; mmguidevice_t device; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; device = (mmguidevice_t)mmguiappdata->data; //Add device to list mmgui_main_device_add_to_list(mmguiappdata->mmguiapp, device, NULL); //If no device opened, open that one if (mmguicore_devices_get_current(mmguiappdata->mmguiapp->core) == NULL) { mmgui_main_device_select_from_list(mmguiappdata->mmguiapp, device->persistentid); } //Unlock control buttons mmgui_main_ui_control_buttons_disable(mmguiappdata->mmguiapp, FALSE); g_free(mmguiappdata); return FALSE; } gboolean mmgui_main_device_handle_removed_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; guint id; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; id = GPOINTER_TO_UINT(mmguiappdata->data); //Remove device from list mmgui_main_device_remove_from_list(mmguiappdata->mmguiapp, id); //Look for available devices if (mmguicore_devices_get_list(mmguiappdata->mmguiapp->core) == NULL) { //No devices available, lock control buttons mmgui_main_ui_control_buttons_disable(mmguiappdata->mmguiapp, TRUE); } else if (mmguicore_devices_get_current(mmguiappdata->mmguiapp->core) == NULL) { //If no device opened, open default one mmgui_main_device_select_from_list(mmguiappdata->mmguiapp, NULL); } g_free(mmguiappdata); return FALSE; } void mmgui_main_device_handle_enabled_local_status(mmgui_application_t mmguiapp, gboolean result) { guint setpage; gboolean enabled; if (mmguiapp == NULL) return; mmgui_main_ui_progress_dialog_close(mmguiapp); if (result) { enabled = mmguicore_devices_get_enabled(mmguiapp->core); if (enabled) { /*Update device information*/ mmgui_main_info_update_for_modem(mmguiapp); } /*Update current page state*/ setpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(mmguiapp->window->notebook)); mmgui_main_ui_test_device_state(mmguiapp, setpage); } else { /*In case of error*/ mmgui_main_ui_error_dialog_open(mmguiapp, _("Error enabling device"), mmguicore_get_last_error(mmguiapp->core)); } } gboolean mmgui_main_device_handle_enabled_status_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; gboolean enabledstatus; guint setpage; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; enabledstatus = (gboolean)GPOINTER_TO_UINT(mmguiappdata->data); if (mmguiappdata->mmguiapp == NULL) return FALSE; if (enabledstatus) { //Update device information mmgui_main_info_update_for_modem(mmguiappdata->mmguiapp); } /*Update current page state*/ setpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(mmguiappdata->mmguiapp->window->notebook)); mmgui_main_ui_test_device_state(mmguiappdata->mmguiapp, setpage); g_free(mmguiappdata); return FALSE; } gboolean mmgui_main_device_handle_blocked_status_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; gboolean blockedstatus; guint setpage; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; blockedstatus = (gboolean)GPOINTER_TO_UINT(mmguiappdata->data); if (mmguiappdata->mmguiapp == NULL) return FALSE; /*Update current page state*/ setpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(mmguiappdata->mmguiapp->window->notebook)); mmgui_main_ui_test_device_state(mmguiappdata->mmguiapp, setpage); g_free(mmguiappdata); g_debug("Device blocked status: %u\n", blockedstatus); return FALSE; } gboolean mmgui_main_device_handle_connection_status_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; gboolean connstatus; guint setpage; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; connstatus = (gboolean)GPOINTER_TO_UINT(mmguiappdata->data); if (mmguiappdata->mmguiapp == NULL) return FALSE; /*Update current page state*/ setpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(mmguiappdata->mmguiapp->window->notebook)); mmgui_main_ui_test_device_state(mmguiappdata->mmguiapp, setpage); g_free(mmguiappdata); g_debug("Device connection status: %u\n", connstatus); return FALSE; } static gboolean mmgui_main_device_list_unselect_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { mmgui_application_t mmguiapp; gboolean enabled; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return TRUE; gtk_tree_model_get(model, iter, MMGUI_MAIN_DEVLIST_ENABLED, &enabled, -1); if (enabled) { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_DEVLIST_ENABLED, FALSE, -1); return TRUE; } return FALSE; } static void mmgui_main_device_list_select_signal(GtkCellRendererToggle *cell_renderer, gchar *path, gpointer data) { mmgui_application_t mmguiapp; GtkTreeIter iter; GtkTreeModel *model; gboolean enabled; guint id; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->devlist)); if (gtk_tree_model_get_iter_from_string(model, &iter, path)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_DEVLIST_ENABLED, &enabled, MMGUI_MAIN_DEVLIST_ID, &id, -1); if (!enabled) { gtk_tree_model_foreach(model, mmgui_main_device_list_unselect_foreach, mmguiapp); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_DEVLIST_ENABLED, TRUE, -1); if (!mmguicore_devices_open(mmguiapp->core, id, TRUE)) { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error opening device"), mmguicore_get_last_error(mmguiapp->core)); } } } } gboolean mmgui_main_device_select_from_list(mmgui_application_t mmguiapp, gchar *identifier) { GtkTreeModel *model; GtkTreeIter iter; gboolean valid; gboolean selected; guint curid; gchar *curidentifier; if (mmguiapp == NULL) return FALSE; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->devlist)); if (model == NULL) return FALSE; selected = FALSE; //Select requested device if (identifier != NULL) { for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_DEVLIST_ID, &curid, MMGUI_MAIN_DEVLIST_IDENTIFIER, &curidentifier, -1); if (g_str_equal(identifier, curidentifier)) { gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_DEVLIST_ENABLED, TRUE, -1); selected = TRUE; break; } } } //If needed device not found, select first one if (!selected) { for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_DEVLIST_ID, &curid, MMGUI_MAIN_DEVLIST_IDENTIFIER, &curidentifier, -1); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_DEVLIST_ENABLED, TRUE, -1); selected = TRUE; break; } } if (selected) { if (mmguicore_devices_open(mmguiapp->core, curid, TRUE)) { mmgui_main_ui_control_buttons_disable(mmguiapp, FALSE); gmm_settings_set_string(mmguiapp->settings, "device_identifier", identifier); return TRUE; } else { mmgui_main_ui_control_buttons_disable(mmguiapp, TRUE); mmgui_main_ui_error_dialog_open(mmguiapp, _("Error opening device"), mmguicore_get_last_error(mmguiapp->core)); } } else { g_debug("No devices to select\n"); mmgui_main_ui_control_buttons_disable(mmguiapp, TRUE); } return FALSE; } static void mmgui_main_device_remove_from_list(mmgui_application_t mmguiapp, guint devid) { GtkTreeModel *model; GtkTreeIter iter; gboolean valid; guint currentid; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->devlist)); if (model != NULL) { for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_DEVLIST_ID, ¤tid, -1); if (currentid == devid) { gtk_list_store_remove(GTK_LIST_STORE(model), &iter); break; } } } } static void mmgui_main_device_add_to_list(mmgui_application_t mmguiapp, mmguidevice_t device, GtkTreeModel *model) { GtkTreeIter iter; gchar *markup; gchar *devtype; gchar *devmanufacturer, *devmodel, *devversion; if ((mmguiapp == NULL) || (device == NULL)) return; if (mmguiapp->window == NULL) return; if (model == NULL) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->devlist)); } devtype = NULL; if (device->type == MMGUI_DEVICE_TYPE_GSM) { devtype = "GSM"; } else if (device->type == MMGUI_DEVICE_TYPE_CDMA) { devtype = "CDMA"; } devmanufacturer = encoding_clear_special_symbols(g_strdup(device->manufacturer), strlen(device->manufacturer)); devmodel = encoding_clear_special_symbols(g_strdup(device->model), strlen(device->model)); devversion = encoding_clear_special_symbols(g_strdup(device->version), strlen(device->version)); markup = g_strdup_printf(_("%s %s\nVersion:%s Port:%s Type:%s"), devmanufacturer, devmodel, devversion, device->port, devtype); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_DEVLIST_ENABLED, FALSE, MMGUI_MAIN_DEVLIST_DESCRIPTION, markup, MMGUI_MAIN_DEVLIST_ID, device->id, MMGUI_MAIN_DEVLIST_IDENTIFIER, device->persistentid, -1); g_free(devmanufacturer); g_free(devmodel); g_free(devversion); g_free(markup); } void mmgui_main_device_list_fill(mmgui_application_t mmguiapp) { GtkTreeModel *model; GSList *devices; GSList *iterator; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->devlist)); if (model != NULL) { g_object_ref(model); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->devlist), NULL); gtk_list_store_clear(GTK_LIST_STORE(model)); devices = mmguicore_devices_get_list(mmguiapp->core); if (devices != NULL) { for (iterator=devices; iterator; iterator=iterator->next) { mmgui_main_device_add_to_list(mmguiapp, (mmguidevice_t)iterator->data, model); } } gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->devlist), model); g_object_unref(model); } } void mmgui_main_device_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *tbrenderer; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; if (mmguiapp == NULL) return; tbrenderer = gtk_cell_renderer_toggle_new(); column = gtk_tree_view_column_new_with_attributes(_("Selected"), tbrenderer, "active", MMGUI_MAIN_DEVLIST_ENABLED, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->devlist), column); gtk_cell_renderer_toggle_set_radio(GTK_CELL_RENDERER_TOGGLE(tbrenderer), TRUE); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Device"), renderer, "markup", MMGUI_MAIN_DEVLIST_DESCRIPTION, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->devlist), column); store = gtk_list_store_new(MMGUI_MAIN_DEVLIST_COLUMNS, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->devlist), GTK_TREE_MODEL(store)); g_object_unref(store); //Device selection signal g_signal_connect(G_OBJECT(tbrenderer), "toggled", G_CALLBACK(mmgui_main_device_list_select_signal), mmguiapp); } void mmgui_main_conn_edit_button_clicked_signal(GtkButton *button, gpointer data) { mmgui_application_t mmguiapp; gint response; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; /*TEST CURRENT DEVICE*/ response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->conneditdialog)); if (response > 0) { } gtk_widget_hide(mmguiapp->window->conneditdialog); } void mmgui_main_conn_ctl_button_clicked_signal(GtkButton *button, gpointer data) { } modem-manager-gui-0.0.17.1/src/Makefile0000644000175000017500000000161512400622061016120 0ustar alexalexinclude ../Makefile_h BINDIR = $(PREFIX)/bin GCC = gcc #CFLAGS = -mtune=native -O3 -D_GNU_SOURCE LIB = `pkg-config --cflags --libs gtk+-3.0 gthread-2.0` `pkg-config --cflags --libs gmodule-2.0` -lgdbm OBJ = settings.o strformat.o libpaths.o notifications.o addressbooks.o ayatana.o smsdb.o trafficdb.o providersdb.o modem-settings.o ussdlist.o encoding.o vcard.o netlink.o mmguicore.o contacts-page.o traffic-page.o scan-page.o info-page.o ussd-page.o sms-page.o devices-page.o main.o all: modem-manager-gui modem-manager-gui: $(OBJ) $(GCC) $(OBJ) $(LDFLAGS) $(LIB) -o modem-manager-gui .c.o: $(GCC) $(LIB) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ install: install -d $(INSTALLPREFIX)$(DESTDIR)$(BINDIR) install modem-manager-gui $(INSTALLPREFIX)$(DESTDIR)$(BINDIR) uninstall: rm -f $(INSTALLPREFIX)$(DESTDIR)$(BINDIR)/modem-manager-gui clean: rm -f *.o rm -f modem-manager-gui modem-manager-gui-0.0.17.1/src/trafficdb.h0000644000175000017500000000552012370145300016556 0ustar alexalex/* * trafficdb.h * * Copyright 2012-2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __TRAFFICDB_H__ #define __TRAFFICDB_H__ enum _mmgui_trafficdb_session_state { MMGUI_TRAFFICDB_SESSION_STATE_UNKNOWN = 0, MMGUI_TRAFFICDB_SESSION_STATE_NEW, MMGUI_TRAFFICDB_SESSION_STATE_OLD }; struct _mmgui_trafficdb { const gchar *filepath; gboolean sessactive; gboolean sessinitialized; time_t presdaytime; time_t nextdaytime; time_t sesstime; guint sessstate; guint64 dayrxbytes; guint64 daytxbytes; guint dayduration; guint64 sessrxbytes; guint64 sesstxbytes; guint64 sessduration; }; typedef struct _mmgui_trafficdb *mmgui_trafficdb_t; struct _mmgui_day_traffic { /*Day statistics*/ guint64 daytime; guint64 dayrxbytes; guint64 daytxbytes; guint dayduration; /*Last session statistics*/ guint64 sesstime; guint64 sessrxbytes; guint64 sesstxbytes; guint sessduration; }; typedef struct _mmgui_day_traffic *mmgui_day_traffic_t; struct _mmgui_traffic_update { guint64 fullrxbytes; guint64 fulltxbytes; guint64 fulltime; guint deltarxbytes; guint deltatxbytes; guint deltaduration; }; typedef struct _mmgui_traffic_update *mmgui_traffic_update_t; time_t mmgui_trafficdb_get_new_day_timesatmp(time_t currenttime); mmgui_trafficdb_t mmgui_trafficdb_open(const gchar *persistentid, const gchar *internalid); gboolean mmgui_trafficdb_close(mmgui_trafficdb_t trafficdb); gboolean mmgui_trafficdb_traffic_update(mmgui_trafficdb_t trafficdb, mmgui_traffic_update_t update); gboolean mmgui_trafficdb_session_new(mmgui_trafficdb_t trafficdb, time_t starttime); gboolean mmgui_trafficdb_session_close(mmgui_trafficdb_t trafficdb); gboolean mmgui_trafficdb_session_get_day_traffic(mmgui_trafficdb_t trafficdb, mmgui_day_traffic_t daytraffic); gboolean mmgui_trafficdb_day_traffic_write(mmgui_trafficdb_t trafficdb, mmgui_day_traffic_t daytraffic); GSList *mmgui_trafficdb_get_traffic_list_for_month(mmgui_trafficdb_t trafficdb, guint month, guint year); void mmgui_trafficdb_free_traffic_list_for_month(GSList *trafficlist); mmgui_day_traffic_t mmgui_trafficdb_day_traffic_read(mmgui_trafficdb_t trafficdb, time_t daytime); #endif /* __SMSDB_H__ */ modem-manager-gui-0.0.17.1/src/mmguicore.h0000644000175000017500000004570312376664302016646 0ustar alexalex/* * mmguicore.h * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __MMGUICORE_H__ #define __MMGUICORE_H__ #include #include #include #include "netlink.h" #include "smsdb.h" #define MMGUI_SPEED_VALUES_NUMBER 20 #define MMGUI_THREAD_SLEEP_PERIOD 1 /*seconds*/ enum _mmgui_event { MMGUI_EVENT_DEVICE_ADDED = 0, MMGUI_EVENT_DEVICE_REMOVED, MMGUI_EVENT_DEVICE_OPENED, MMGUI_EVENT_DEVICE_CLOSING, MMGUI_EVENT_DEVICE_ENABLED_STATUS, MMGUI_EVENT_DEVICE_BLOCKED_STATUS, MMGUI_EVENT_DEVICE_CONNECTION_STATUS, MMGUI_EVENT_SMS_LIST_READY, MMGUI_EVENT_SMS_COMPLETED, MMGUI_EVENT_SMS_SENT, MMGUI_EVENT_SMS_REMOVED, MMGUI_EVENT_SMS_NEW_DAY, MMGUI_EVENT_SIGNAL_LEVEL_CHANGE, MMGUI_EVENT_NETWORK_MODE_CHANGE, MMGUI_EVENT_NETWORK_REGISTRATION_CHANGE, MMGUI_EVENT_LOCATION_CHANGE, MMGUI_EVENT_MODEM_ENABLE_RESULT, MMGUI_EVENT_SCAN_RESULT, MMGUI_EVENT_USSD_RESULT, MMGUI_EVENT_NET_STATUS, MMGUI_EVENT_TRAFFIC_LIMIT, MMGUI_EVENT_TIME_LIMIT, MMGUI_EVENT_UPDATE_CONNECTIONS_LIST, MMGUI_EVENT_EXTEND_CAPABILITIES }; //External event callback typedef void (*mmgui_event_ext_callback)(enum _mmgui_event event, gpointer mmguicore, gpointer data, gpointer userdata); //Internal event callback typedef void (*mmgui_event_int_callback)(enum _mmgui_event event, gpointer mmguicore, gpointer data); enum _mmgui_module_priority { //module priority levels MMGUI_MODULE_PRIORITY_LOW = 0, MMGUI_MODULE_PRIORITY_NORMAL = 1, MMGUI_MODULE_PRIORITY_RECOMMENDED = 2 }; enum _mmgui_module_type { //module types MMGUI_MODULE_TYPE_MODEM_MANAGER = 0x00, MMGUI_MODULE_TYPE_CONNECTION_MANGER }; enum _mmgui_module_functions { //module functions bitmask MMGUI_MODULE_FUNCTION_BASIC = 0x00, //MMGUI_MODULE_FUNCTION_VOICECALL = 0x01 }; enum _mmgui_module_requirement { //module requirements MMGUI_MODULE_REQUIREMENT_SERVICE = 0x00, MMGUI_MODULE_REQUIREMENT_FILE, MMGUI_MODULE_REQUIREMENT_NONE }; struct _mmguimodule { //module description guint identifier; gboolean applicable; gboolean activatable; gboolean recommended; enum _mmgui_module_type type; enum _mmgui_module_requirement requirement; enum _mmgui_module_priority priority; enum _mmgui_module_functions functions; gchar servicename[256]; gchar description[256]; gchar filename[256]; gchar shortname[256]; }; typedef struct _mmguimodule *mmguimodule_t; enum _mmgui_device_types { MMGUI_DEVICE_TYPE_GSM = 1, MMGUI_DEVICE_TYPE_CDMA }; enum _mmgui_device_modes { MMGUI_DEVICE_MODE_UNKNOWN = 0, MMGUI_DEVICE_MODE_GSM, MMGUI_DEVICE_MODE_GSM_COMPACT, MMGUI_DEVICE_MODE_GPRS, MMGUI_DEVICE_MODE_EDGE, MMGUI_DEVICE_MODE_UMTS, MMGUI_DEVICE_MODE_HSDPA, MMGUI_DEVICE_MODE_HSUPA, MMGUI_DEVICE_MODE_HSPA, MMGUI_DEVICE_MODE_HSPA_PLUS, MMGUI_DEVICE_MODE_1XRTT, MMGUI_DEVICE_MODE_EVDO0, MMGUI_DEVICE_MODE_EVDOA, MMGUI_DEVICE_MODE_EVDOB, MMGUI_DEVICE_MODE_LTE }; enum _mmgui_network_availability { MMGUI_NA_UNKNOWN = 0, MMGUI_NA_AVAILABLE, MMGUI_NA_CURRENT, MMGUI_NA_FORBIDDEN }; enum _mmgui_access_tech { MMGUI_ACCESS_TECH_GSM = 0, MMGUI_ACCESS_TECH_GSM_COMPACT, MMGUI_ACCESS_TECH_UMTS, MMGUI_ACCESS_TECH_EDGE, MMGUI_ACCESS_TECH_HSDPA, MMGUI_ACCESS_TECH_HSUPA, MMGUI_ACCESS_TECH_HSPA, MMGUI_ACCESS_TECH_HSPA_PLUS, MMGUI_ACCESS_TECH_1XRTT, MMGUI_ACCESS_TECH_EVDO0, MMGUI_ACCESS_TECH_EVDOA, MMGUI_ACCESS_TECH_EVDOB, MMGUI_ACCESS_TECH_LTE, MMGUI_ACCESS_TECH_UNKNOWN }; enum _mmgui_ussd_encoding { MMGUI_USSD_ENCODING_GSM7 = 0, MMGUI_USSD_ENCODING_UCS2 }; enum _mmgui_reg_status { MMGUI_REG_STATUS_IDLE = 0, MMGUI_REG_STATUS_HOME, MMGUI_REG_STATUS_SEARCHING, MMGUI_REG_STATUS_DENIED, MMGUI_REG_STATUS_UNKNOWN, MMGUI_REG_STATUS_ROAMING }; enum _mmgui_device_state { MMGUI_DEVICE_STATE_UNKNOWN = 0, MMGUI_DEVICE_STATE_DISABLED = 10, MMGUI_DEVICE_STATE_DISABLING = 20, MMGUI_DEVICE_STATE_ENABLING = 30, MMGUI_DEVICE_STATE_ENABLED = 40, MMGUI_DEVICE_STATE_SEARCHING = 50, MMGUI_DEVICE_STATE_REGISTERED = 60, MMGUI_DEVICE_STATE_DISCONNECTING = 70, MMGUI_DEVICE_STATE_CONNECTING = 80, MMGUI_DEVICE_STATE_CONNECTED = 90 }; enum _mmgui_ussd_state { MMGUI_USSD_STATE_UNKNOWN = 0, MMGUI_USSD_STATE_IDLE, MMGUI_USSD_STATE_ACTIVE, MMGUI_USSD_STATE_USER_RESPONSE }; enum _mmgui_ussd_validation { MMGUI_USSD_VALIDATION_INVALID = 0, MMGUI_USSD_VALIDATION_REQUEST, MMGUI_USSD_VALIDATION_RESPONSE }; enum _mmgui_contacts_storage { MMGUI_CONTACTS_STORAGE_UNKNOWN = 0, MMGUI_MODEM_CONTACTS_STORAGE_ME = 1, MMGUI_MODEM_CONTACTS_STORAGE_SM = 2, MMGUI_MODEM_CONTACTS_STORAGE_MT = 3, }; /*Capbilities specifications*/ enum _mmgui_capabilities { MMGUI_CAPS_NONE = 0, MMGUI_CAPS_SMS = 1 << 1, MMGUI_CAPS_USSD = 1 << 2, MMGUI_CAPS_LOCATION = 1 << 3, MMGUI_CAPS_SCAN = 1 << 4, MMGUI_CAPS_CONTACTS = 1 << 5, }; enum _mmgui_sms_capabilities { MMGUI_SMS_CAPS_NONE = 0, MMGUI_SMS_CAPS_RECEIVE = 1 << 1, MMGUI_SMS_CAPS_SEND = 1 << 2 }; enum _mmgui_ussd_capabilities { MMGUI_USSD_CAPS_NONE = 0, MMGUI_USSD_CAPS_SEND = 1 << 1 }; enum _mmgui_location_capabilities { MMGUI_LOCATION_CAPS_NONE = 0, MMGUI_LOCATION_CAPS_3GPP = 1 << 1, MMGUI_LOCATION_CAPS_GPS = 1 << 2 }; enum _mmgui_scan_capabilities { MMGUI_SCAN_CAPS_NONE = 0, MMGUI_SCAN_CAPS_OBSERVE = 1 << 1 }; enum _mmgui_contacts_capabilities { MMGUI_CONTACTS_CAPS_NONE = 0, MMGUI_CONTACTS_CAPS_EXPORT = 1 << 1, MMGUI_CONTACTS_CAPS_EDIT = 1 << 2, MMGUI_CONTACTS_CAPS_EXTENDED = 1 << 3 }; enum _mmgui_device_operation { MMGUI_DEVICE_OPERATION_IDLE = 0, MMGUI_DEVICE_OPERATION_ENABLE, MMGUI_DEVICE_OPERATION_SEND_SMS, MMGUI_DEVICE_OPERATION_SEND_USSD, MMGUI_DEVICE_OPERATION_SCAN, MMGUI_DEVICE_OPERATIONS }; enum _mmgui_device_state_request { MMGUI_DEVICE_STATE_REQUEST_ENABLED = 0, MMGUI_DEVICE_STATE_REQUEST_LOCKED, MMGUI_DEVICE_STATE_REQUEST_REGISTERED, MMGUI_DEVICE_STATE_REQUEST_CONNECTED }; enum _mmgui_event_action { MMGUI_EVENT_ACTION_NOTHING = 0, MMGUI_EVENT_ACTION_DISCONNECT }; struct _mmgui_scanned_network { enum _mmgui_network_availability status; enum _mmgui_access_tech access_tech; guint operator_num; gchar *operator_long; gchar *operator_short; }; typedef struct _mmgui_scanned_network *mmgui_scanned_network_t; struct _mmgui_contact { guint id; //Internal private number gchar *name; //Full name of the contact gchar *number; //Telephone number gchar *email; //Email address gchar *group; //Group this contact belongs to gchar *name2; //Additional contact name gchar *number2; //Additional contact telephone number gboolean hidden; //Boolean flag to specify whether this entry is hidden or not guint storage; //Phonebook in which the contact is stored }; typedef struct _mmgui_contact *mmgui_contact_t; struct _mmgui_traffic_stats { gint64 rxbytes; gint64 rxpackets; gint64 rxerrs; gint64 rxdrop; gint64 rxfifo; gint64 rxframe; gint64 rxcompressed; gint64 rxmulticast; gint64 txbytes; gint64 txpackets; gint64 txerrs; gint64 txdrop; gint64 txfifo; gint64 txcolls; gint64 txcarrier; gint64 txcompressed; }; typedef struct _mmgui_traffic_stats *mmgui_traffic_stats_t; struct _mmgui_core_options { /*Preferred modules*/ gchar *mmmodule; gchar *cmmodule; /*Timeouts*/ gint enabletimeout; gint sendsmstimeout; gint sendussdtimeout; gint scannetworkstimeout; /*Traffic limits*/ gboolean trafficenabled; gboolean trafficexecuted; guint trafficamount; guint trafficunits; guint64 trafficfull; gchar *trafficmessage; guint trafficaction; gboolean timeenabled; gboolean timeexecuted; guint timeamount; guint timeunits; guint64 timefull; gchar *timemessage; guint timeaction; }; typedef struct _mmgui_core_options *mmgui_core_options_t; struct _mmguidevice { guint id; /*State*/ gboolean enabled; gboolean blocked; gboolean registered; //gboolean powered; enum _mmgui_device_operation operation; //Info gchar *manufacturer; gchar *model; gchar *version; gchar *port; gchar *internalid; gchar *persistentid; gchar *objectpath; gchar *sysfspath; enum _mmgui_device_types type; gchar *imei; gchar *imsi; //gchar *operatorcode; gint operatorcode; /*mcc/mnc*/ gchar *operatorname; enum _mmgui_reg_status regstatus; guint allmode; enum _mmgui_device_modes mode; guint siglevel; //Location guint locationcaps; guint loc3gppdata[4]; /*mcc/mnc/lac/ci*/ gfloat locgpsdata[4]; /*latitude/longitude/altitude/time*/ //SMS guint smscaps; gpointer smsdb; //USSD guint ussdcaps; enum _mmgui_ussd_encoding ussdencoding; //Scan guint scancaps; //Traffic guint64 rxbytes; guint64 txbytes; guint64 sessiontime; time_t speedchecktime; time_t smschecktime; gfloat speedvalues[2][MMGUI_SPEED_VALUES_NUMBER]; guint speedindex; gboolean connected; gchar interface[IFNAMSIZ]; time_t sessionstarttime; gpointer trafficdb; //Contacts guint contactscaps; GSList *contactslist; }; typedef struct _mmguidevice *mmguidevice_t; //Modem manager module functions typedef gboolean (*mmgui_module_init_func)(mmguimodule_t module); typedef gboolean (*mmgui_module_open_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_close_func)(gpointer mmguicore); typedef gchar *(*mmgui_module_last_error_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_interrupt_operation_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_set_timeout_func)(gpointer mmguicore, guint operation, guint timeout); typedef guint (*mmgui_module_devices_enum_func)(gpointer mmguicore, GSList **devicelist); typedef gboolean (*mmgui_module_devices_open_func)(gpointer mmguicore, mmguidevice_t device); typedef gboolean (*mmgui_module_devices_close_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_devices_state_func)(gpointer mmguicore, enum _mmgui_device_state_request request); typedef gboolean (*mmgui_module_devices_update_state_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_devices_information_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_devices_enable_func)(gpointer mmguicore, gboolean enabled); typedef guint (*mmgui_module_sms_enum_func)(gpointer mmguicore, GSList **smslist); typedef mmgui_sms_message_t (*mmgui_module_sms_get_func)(gpointer mmguicore, guint index); typedef gboolean (*mmgui_module_sms_delete_func)(gpointer mmguicore, guint index); typedef gboolean (*mmgui_module_sms_send_func)(gpointer mmguicore, gchar* number, gchar *text, gint validity, gboolean report); typedef gboolean (*mmgui_module_ussd_cancel_session_func)(gpointer mmguicore); typedef enum _mmgui_ussd_state (*mmgui_module_ussd_get_state_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_ussd_send_func)(gpointer mmguicore, gchar *request, enum _mmgui_ussd_validation validationid, gboolean reencode); typedef gboolean (*mmgui_module_networks_scan_func)(gpointer mmguicore); typedef guint (*mmgui_module_contacts_enum_func)(gpointer mmguicore, GSList **contactslist); typedef gboolean (*mmgui_module_contacts_delete_func)(gpointer mmguicore, guint index); typedef gint (*mmgui_module_contacts_add_func)(gpointer mmguicore, mmgui_contact_t contact); //Connection manager module functions typedef gboolean (*mmgui_module_connection_open_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_connection_close_func)(gpointer mmguicore); typedef gchar *(*mmgui_module_connection_last_error_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_device_connection_open_func)(gpointer mmguicore, mmguidevice_t device); typedef gboolean (*mmgui_module_device_connection_close_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_device_connection_status_func)(gpointer mmguicore); typedef guint64 (*mmgui_module_device_connection_timestamp_func)(gpointer mmguicore); typedef gboolean (*mmgui_module_device_connection_disconnect_func)(gpointer mmguicore); struct _mmguicore { //Modules list GSList *modules; //Cache gchar *cachefilename; GKeyFile *cachekeyfile; gboolean updatecache; time_t updcachetime; //Modem manager module GModule *module; gpointer moduledata; gpointer moduleptr; //Connection manager module GModule *cmodule; gpointer cmoduledata; gpointer cmoduleptr; //Modem manager module functions mmgui_module_open_func open_func; mmgui_module_close_func close_func; mmgui_module_last_error_func last_error_func; mmgui_module_interrupt_operation_func interrupt_operation_func; mmgui_module_set_timeout_func set_timeout_func; mmgui_module_devices_enum_func devices_enum_func; mmgui_module_devices_open_func devices_open_func; mmgui_module_devices_close_func devices_close_func; mmgui_module_devices_state_func devices_state_func; mmgui_module_devices_update_state_func devices_update_state_func; mmgui_module_devices_information_func devices_information_func; mmgui_module_devices_enable_func devices_enable_func; mmgui_module_sms_enum_func sms_enum_func; mmgui_module_sms_get_func sms_get_func; mmgui_module_sms_delete_func sms_delete_func; mmgui_module_sms_send_func sms_send_func; mmgui_module_ussd_cancel_session_func ussd_cancel_session_func; mmgui_module_ussd_get_state_func ussd_get_state_func; mmgui_module_ussd_send_func ussd_send_func; mmgui_module_networks_scan_func networks_scan_func; mmgui_module_contacts_enum_func contacts_enum_func; mmgui_module_contacts_delete_func contacts_delete_func; mmgui_module_contacts_add_func contacts_add_func; //Connection manager module functions mmgui_module_connection_open_func connection_open_func; mmgui_module_connection_close_func connection_close_func; mmgui_module_connection_last_error_func connection_last_error_func; mmgui_module_device_connection_open_func device_connection_open_func; mmgui_module_device_connection_close_func device_connection_close_func; mmgui_module_device_connection_status_func device_connection_status_func; mmgui_module_device_connection_timestamp_func device_connection_timestamp_func; mmgui_module_device_connection_disconnect_func device_connection_disconnect_func; //Devices GSList *devices; mmguidevice_t device; //Callbacks mmgui_event_int_callback eventcb; mmgui_event_ext_callback extcb; /*Core options*/ mmgui_core_options_t options; //User data pointer gpointer userdata; //Netlink interface mmgui_netlink_t netlink; /*New day time*/ time_t newdaytime; //Work thread GThread *workthread; gint workthreadctl[2]; #if GLIB_CHECK_VERSION(2,32,0) GMutex workthreadmutex; GMutex connsyncmutex; #else GMutex *workthreadmutex; GMutex *connsyncmutex; #endif }; typedef struct _mmguicore *mmguicore_t; /*Modules*/ //void mmguicore_modules_list(mmguicore_t mmguicore, mmgui_modules_enum_callback callback); GSList *mmguicore_modules_info(void); void mmguicore_modules_mm_set_timeouts(mmguicore_t mmguicore, gint operation1, gint timeout1, ...); //Devices gboolean mmguicore_devices_enum(mmguicore_t mmguicore); gboolean mmguicore_devices_open(mmguicore_t mmguicore, guint deviceid, gboolean openfirst); gboolean mmguicore_devices_enable(mmguicore_t mmguicore, gboolean enabled); GSList *mmguicore_devices_get_list(mmguicore_t mmguicore); mmguidevice_t mmguicore_devices_get_current(mmguicore_t mmguicore); gboolean mmguicore_devices_get_enabled(mmguicore_t mmguicore); gboolean mmguicore_devices_get_locked(mmguicore_t mmguicore); gboolean mmguicore_devices_get_registered(mmguicore_t mmguicore); gboolean mmguicore_devices_get_connected(mmguicore_t mmguicore); gboolean mmguicore_devices_update_device_state(mmguicore_t mmguicore); const gchar *mmguicore_devices_get_identifier(mmguicore_t mmguicore); const gchar *mmguicore_devices_get_internal_identifier(mmguicore_t mmguicore); gpointer mmguicore_devices_get_sms_db(mmguicore_t mmguicore); gpointer mmguicore_devices_get_traffic_db(mmguicore_t mmguicore); gboolean mmguicore_devices_get_connection_status(mmguicore_t mmguicore); guint64 mmguicore_devices_get_connection_timestamp(mmguicore_t mmguicore); guint mmguicore_devices_get_current_operation(mmguicore_t mmguicore); //Location guint mmguicore_location_get_capabilities(mmguicore_t mmguicore); //SMS guint mmguicore_sms_get_capabilities(mmguicore_t mmguicore); void mmguicore_sms_message_free(mmgui_sms_message_t message); GSList *mmguicore_sms_enum(mmguicore_t mmguicore, gboolean concatenation); mmgui_sms_message_t mmguicore_sms_get(mmguicore_t mmguicore, guint index); gboolean mmguicore_sms_delete(mmguicore_t mmguicore, guint index); gboolean mmguicore_sms_validate_number(const gchar *number); gboolean mmguicore_sms_send(mmguicore_t mmguicore, gchar *number, gchar *text, gint validity, gboolean report); //USSD guint mmguicore_ussd_get_capabilities(mmguicore_t mmguicore); enum _mmgui_ussd_validation mmguicore_ussd_validate_request(gchar *request); gboolean mmguicore_ussd_cancel_session(mmguicore_t mmguicore); enum _mmgui_ussd_state mmguicore_ussd_get_state(mmguicore_t mmguicore); gboolean mmguicore_ussd_send(mmguicore_t mmguicore, gchar *request); gboolean mmguicore_ussd_set_encoding(mmguicore_t mmguicore, enum _mmgui_ussd_encoding encoding); enum _mmgui_ussd_encoding mmguicore_ussd_get_encoding(mmguicore_t mmguicore); //Scan guint mmguicore_newtworks_scan_get_capabilities(mmguicore_t mmguicore); void mmguicore_networks_scan_free(GSList *networks); gboolean mmguicore_networks_scan(mmguicore_t mmguicore); //Contacts guint mmguicore_contacts_get_capabilities(mmguicore_t mmguicore); void mmguicore_contacts_free_single(mmgui_contact_t contact, gboolean freestruct); GSList *mmguicore_contacts_list(mmguicore_t mmguicore); mmgui_contact_t mmguicore_contacts_get(mmguicore_t mmguicore, guint index); gboolean mmguicore_contacts_delete(mmguicore_t mmguicore, guint index); gboolean mmguicore_contacts_add(mmguicore_t mmguicore, mmgui_contact_t contact); //Connections GSList *mmguicore_open_connections_list(mmguicore_t mmguicore); void mmguicore_close_connections_list(mmguicore_t mmguicore); GSList *mmguicore_get_connections_changes(mmguicore_t mmguicore); //MMGUI Core gchar *mmguicore_get_last_error(mmguicore_t mmguicore); gchar *mmguicore_get_last_connection_error(mmguicore_t mmguicore); gboolean mmguicore_interrupt_operation(mmguicore_t mmguicore); mmguicore_t mmguicore_new(mmgui_event_ext_callback callback/*, mmgui_connections_sync_callback connsynccb*/, mmgui_core_options_t options, gpointer userdata); void mmguicore_close(mmguicore_t mmguicore); #endif /* __MMGUICORE_H__ */ modem-manager-gui-0.0.17.1/src/trafficdb.c0000644000175000017500000006033112377613677016602 0ustar alexalex/* * trafficdb.c * * Copyright 2012-2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include "trafficdb.h" #define TRAFFICDB_DAY_XML "\n\t%" G_GUINT64_FORMAT "\n\t%" G_GUINT64_FORMAT "\n\t%" G_GUINT64_FORMAT "\n\t%u\n\t%" G_GUINT64_FORMAT "\n\t%" G_GUINT64_FORMAT "\n\t%" G_GUINT64_FORMAT "\n\t%u\n\n\n" enum _mmgui_trafficdb_xml_elements { TRAFFICDB_XML_PARAM_DAY_TIME = 0, TRAFFICDB_XML_PARAM_DAY_RX, TRAFFICDB_XML_PARAM_DAY_TX, TRAFFICDB_XML_PARAM_DAY_DURATION, TRAFFICDB_XML_PARAM_SESSION_TIME, TRAFFICDB_XML_PARAM_SESSION_RX, TRAFFICDB_XML_PARAM_SESSION_TX, TRAFFICDB_XML_PARAM_SESSION_DURATION, TRAFFICDB_XML_PARAM_NULL }; static gint mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_NULL; static mmgui_day_traffic_t mmgui_trafficdb_xml_parse(gchar *xml, gsize size); static void mmgui_trafficdb_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error); static void mmgui_trafficdb_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error); static void mmgui_trafficdb_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error); #define MMGUI_TRAFFICDB_WEEK_END 6 #define MMGUI_TRAFFICDB_WEEK_BEGIN 0 #define MMGUI_TRAFFICDB_LEAP_YEAR_DAYS 366 #define MMGUI_TRAFFICDB_NORMAL_YEAR_DAYS 365 #define MMGUI_TRAFFICDB_LEAP_YEAR_FEBRUARY_DAYS 29 static guint mmgui_trafficdb_month_days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; static guint mmgui_trafficdb_get_month_days(guint month, guint year) { guint days; if (month > 11) return 0; if ((month == 1) && ((year % 4) == 0)) { days = MMGUI_TRAFFICDB_LEAP_YEAR_FEBRUARY_DAYS; } else { days = mmgui_trafficdb_month_days[month]; } return days; } static guint mmgui_trafficdb_get_year_days(guint year) { if ((year % 4) == 0) { return MMGUI_TRAFFICDB_LEAP_YEAR_DAYS; } else { return MMGUI_TRAFFICDB_NORMAL_YEAR_DAYS; } } time_t mmgui_trafficdb_get_new_day_timesatmp(time_t currenttime) { struct tm *ltime; time_t restime; ltime = localtime((const time_t *)¤ttime); g_debug("Current timesatamp: [%u] %s", (guint)currenttime, ctime(¤ttime)); /*Day of week*/ if ((ltime->tm_wday + 1) > MMGUI_TRAFFICDB_WEEK_END) { /*Next week*/ ltime->tm_wday = MMGUI_TRAFFICDB_WEEK_BEGIN; } else { /*Next day*/ ltime->tm_wday++; } /*Year*/ if ((ltime->tm_yday + 1) >= mmgui_trafficdb_get_year_days(ltime->tm_year)) { /*Next year*/ ltime->tm_year++; ltime->tm_yday = 0; } else { /*Next day*/ ltime->tm_yday++; } /*Month*/ if ((ltime->tm_mday + 1) > mmgui_trafficdb_get_month_days(ltime->tm_mon, ltime->tm_year)) { /*New month*/ if ((ltime->tm_mon + 1) > 11) { /*New year*/ ltime->tm_mon = 0; } else { /*Next month*/ ltime->tm_mon++; } ltime->tm_mday = 1; } else { /*Next day in month*/ ltime->tm_mday++; } /*Hours, minutes, seconds*/ ltime->tm_hour = 0; ltime->tm_min = 0; ltime->tm_sec = 0; restime = mktime(ltime); g_debug("New day timestamp: [%u] %s", (guint)restime, ctime(&restime)); return restime; } static time_t mmgui_trafficdb_truncate_day_timesatmp(time_t currenttime) { struct tm *ltime; time_t restime; ltime = localtime((const time_t *)¤ttime); g_debug("Non-truncated timestamp: [%u] %s", (guint)currenttime, ctime(¤ttime)); /*Hours, minutes, seconds*/ ltime->tm_hour = 0; ltime->tm_min = 0; ltime->tm_sec = 0; restime = mktime(ltime); g_debug("Truncated timestamp: [%u] %s", (guint)restime, ctime(&restime)); return restime; } static time_t mmgui_trafficdb_get_month_begin_timestamp(guint month, guint year) { struct tm ltime; time_t restime; /*Year, month, day*/ ltime.tm_year = year - 1900; ltime.tm_mon = month; ltime.tm_mday = 1; /*Hours, minutes, seconds*/ ltime.tm_hour = 0; ltime.tm_min = 0; ltime.tm_sec = 0; restime = mktime(<ime); g_debug("Month begin timestamp: [%u] %s", (guint)restime, ctime(&restime)); return restime; } static time_t mmgui_trafficdb_get_month_end_timestamp(guint month, guint year) { struct tm ltime; time_t restime; /*Year, month, day*/ ltime.tm_year = year - 1900; ltime.tm_mon = month; ltime.tm_mday = mmgui_trafficdb_get_month_days(month, year); /*Hours, minutes, seconds*/ ltime.tm_hour = 23; ltime.tm_min = 59; ltime.tm_sec = 59; restime = mktime(<ime); g_debug("Month end timestamp: [%u] %s", (guint)restime, ctime(&restime)); return restime; } mmgui_trafficdb_t mmgui_trafficdb_open(const gchar *persistentid, const gchar *internalid) { mmgui_trafficdb_t trafficdb; const gchar *newfilepath; const gchar *newfilename; gchar filename[64]; const gchar *oldfilename; time_t currenttime; if (persistentid == NULL) return NULL; /*Form path using XDG standard*/ newfilepath = g_build_path(G_DIR_SEPARATOR_S, g_get_user_data_dir(), "modem-manager-gui", "devices", persistentid, NULL); if (newfilepath == NULL) return NULL; /*If directory structure not exists, create it*/ if (!g_file_test(newfilepath, G_FILE_TEST_IS_DIR)) { if (g_mkdir_with_parents(newfilepath, S_IRUSR|S_IWUSR|S_IXUSR|S_IXGRP|S_IXOTH) == -1) { g_warning("Failed to make XDG data directory: %s", newfilepath); } } /*Form file name*/ newfilename = g_build_filename(newfilepath, "traffic.gdbm", NULL); g_free((gchar *)newfilepath); if (newfilename == NULL) return NULL; /*If file already exists, just work with it*/ if ((!g_file_test(newfilename, G_FILE_TEST_EXISTS)) && (internalid != NULL)) { /*Form old-style file path*/ memset(filename, 0, sizeof(filename)); g_snprintf(filename, sizeof(filename), "traffic-%s.gdbm", internalid); oldfilename = g_build_filename(g_get_home_dir(), ".config", "modem-manager-gui", filename, NULL); if (oldfilename != NULL) { /*If file exists in old location, move it*/ if (g_file_test(oldfilename, G_FILE_TEST_EXISTS)) { if (g_rename(oldfilename, newfilename) == -1) { g_warning("Failed to move file into XDG data directory: %s -> %s", oldfilename, newfilename); } } } g_free((gchar *)oldfilename); } trafficdb = g_new(struct _mmgui_trafficdb, 1); currenttime = time(NULL); trafficdb->filepath = newfilename; trafficdb->presdaytime = mmgui_trafficdb_truncate_day_timesatmp(currenttime); trafficdb->nextdaytime = mmgui_trafficdb_get_new_day_timesatmp(currenttime); trafficdb->sessactive = FALSE; trafficdb->sessinitialized = FALSE; trafficdb->sessstate = MMGUI_TRAFFICDB_SESSION_STATE_UNKNOWN; trafficdb->dayrxbytes = 0; trafficdb->daytxbytes = 0; trafficdb->dayduration = 0; trafficdb->sesstime = 0; trafficdb->sessrxbytes = 0; trafficdb->sesstxbytes = 0; trafficdb->sessduration = 0; return trafficdb; } gboolean mmgui_trafficdb_close(mmgui_trafficdb_t trafficdb) { if (trafficdb == NULL) return FALSE; if (trafficdb->sessactive) { /*Close current session*/ mmgui_trafficdb_session_close(trafficdb); } if (trafficdb->filepath != NULL) { /*Free file path*/ g_free((gchar *)trafficdb->filepath); } g_free(trafficdb); return TRUE; } gboolean mmgui_trafficdb_traffic_update(mmgui_trafficdb_t trafficdb, mmgui_traffic_update_t update) { time_t currenttime, pastdaytime; gint sessdeltatime; mmgui_day_traffic_t pasttraffic; struct _mmgui_day_traffic traffic; if ((trafficdb == NULL) || (update == NULL)) return FALSE; if ((!trafficdb->sessactive) || (trafficdb->sessstate == MMGUI_TRAFFICDB_SESSION_STATE_UNKNOWN)) return FALSE; currenttime = time(NULL); /*Initialization*/ if (!trafficdb->sessinitialized) { /*Count time interval between day begin time and session start time*/ sessdeltatime = difftime(trafficdb->presdaytime, trafficdb->sesstime); /*New session (first session of a day started day before or second session of a day)*/ if (trafficdb->sessstate == MMGUI_TRAFFICDB_SESSION_STATE_NEW) { /*If session was started before day begin, corrections needed*/ if (sessdeltatime > 0.0) { /*Past day session*/ pastdaytime = mmgui_trafficdb_truncate_day_timesatmp(trafficdb->sesstime); pasttraffic = mmgui_trafficdb_day_traffic_read(trafficdb, pastdaytime); if (pasttraffic != NULL) { pasttraffic->sessrxbytes = update->fullrxbytes; pasttraffic->sesstxbytes = update->fulltxbytes; pasttraffic->sessduration = sessdeltatime; /*Write to database*/ if (!mmgui_trafficdb_day_traffic_write(trafficdb, pasttraffic)) { g_debug("Failed to write traffic statistics to database\n"); } g_free(pasttraffic); } /*Current session*/ //trafficdb->sesstime = trafficdb->presdaytime; trafficdb->sessrxbytes = 0; trafficdb->sesstxbytes = 0; trafficdb->sessduration = update->fulltime - sessdeltatime; } else { /*Set session initial values*/ trafficdb->sessrxbytes = update->fullrxbytes; trafficdb->sesstxbytes = update->fulltxbytes; trafficdb->sessduration = update->fulltime; } } else if (trafficdb->sessstate == MMGUI_TRAFFICDB_SESSION_STATE_OLD) { /*Old session*/ /*If session was started before day begin, do not do anything*/ if (sessdeltatime <= 0.0) { /*Update with actual information*/ trafficdb->sessrxbytes = update->fullrxbytes; trafficdb->sesstxbytes = update->fulltxbytes; trafficdb->sessduration = update->fulltime; } } trafficdb->sessinitialized = TRUE; } else { /*Already initialized session*/ /*Write traffic statistics at the end of the day*/ if (currenttime > trafficdb->nextdaytime) { /*Write current statistics*/ memset(&traffic, 0, sizeof(traffic)); traffic.daytime = trafficdb->presdaytime; traffic.dayrxbytes = trafficdb->dayrxbytes; traffic.daytxbytes = trafficdb->daytxbytes; traffic.dayduration = trafficdb->dayduration; traffic.sesstime = trafficdb->sesstime; traffic.sessrxbytes = trafficdb->sessrxbytes; traffic.sesstxbytes = trafficdb->sesstxbytes; traffic.sessduration = trafficdb->sessduration; /*Write to database*/ if (!mmgui_trafficdb_day_traffic_write(trafficdb, &traffic)) { g_debug("Failed to write traffic statistics to database\n"); } /*Correct values*/ trafficdb->dayrxbytes = 0; trafficdb->daytxbytes = 0; trafficdb->dayduration = 0; trafficdb->sessrxbytes = update->deltarxbytes; trafficdb->sesstxbytes = update->deltatxbytes; trafficdb->sessduration = update->deltaduration; trafficdb->presdaytime = mmgui_trafficdb_truncate_day_timesatmp(currenttime); trafficdb->nextdaytime = mmgui_trafficdb_get_new_day_timesatmp(currenttime); } /*Count current values*/ trafficdb->sessrxbytes += update->deltarxbytes; trafficdb->sesstxbytes += update->deltatxbytes; trafficdb->sessduration += update->deltaduration; } return TRUE; } gboolean mmgui_trafficdb_session_new(mmgui_trafficdb_t trafficdb, time_t starttime) { time_t currenttime, daytime; mmgui_day_traffic_t traffic; if (trafficdb == NULL) return FALSE; if (trafficdb->sessactive) { //Close current session mmgui_trafficdb_session_close(trafficdb); } currenttime = time(NULL); daytime = mmgui_trafficdb_truncate_day_timesatmp(currenttime); traffic = mmgui_trafficdb_day_traffic_read(trafficdb, daytime); if (traffic) { /*Restore available session data*/ if (starttime == traffic->sesstime) { trafficdb->sessstate = MMGUI_TRAFFICDB_SESSION_STATE_OLD; trafficdb->sesstime = traffic->sesstime; trafficdb->dayrxbytes = traffic->dayrxbytes; trafficdb->daytxbytes = traffic->daytxbytes; trafficdb->dayduration = traffic->dayduration; trafficdb->sessrxbytes = traffic->sessrxbytes; trafficdb->sesstxbytes = traffic->sesstxbytes; trafficdb->sessduration = traffic->sessduration; } else { trafficdb->sessstate = MMGUI_TRAFFICDB_SESSION_STATE_NEW; trafficdb->sesstime = starttime; trafficdb->dayrxbytes = traffic->dayrxbytes + traffic->sessrxbytes; trafficdb->daytxbytes = traffic->daytxbytes + traffic->sesstxbytes; trafficdb->dayduration = traffic->dayduration + traffic->sessduration; trafficdb->sessrxbytes = 0; trafficdb->sesstxbytes = 0; trafficdb->sessduration = 0; } g_free(traffic); } else { /*No sessions started today*/ trafficdb->sessstate = MMGUI_TRAFFICDB_SESSION_STATE_NEW; trafficdb->sesstime = starttime; trafficdb->dayrxbytes = 0; trafficdb->daytxbytes = 0; trafficdb->dayduration = 0; trafficdb->sessrxbytes = 0; trafficdb->sesstxbytes = 0; trafficdb->sessduration = 0; } /*Set common values*/ trafficdb->presdaytime = mmgui_trafficdb_truncate_day_timesatmp(currenttime); trafficdb->nextdaytime = mmgui_trafficdb_get_new_day_timesatmp(currenttime); trafficdb->sessactive = TRUE; trafficdb->sessinitialized = FALSE; return TRUE; } gboolean mmgui_trafficdb_session_close(mmgui_trafficdb_t trafficdb) { time_t currenttime, daytime; struct _mmgui_day_traffic traffic; if (trafficdb == NULL) return FALSE; if (!trafficdb->sessactive) return FALSE; currenttime = time(NULL); daytime = mmgui_trafficdb_truncate_day_timesatmp(currenttime); /*Write current statistics*/ memset(&traffic, 0, sizeof(traffic)); traffic.daytime = daytime; traffic.dayrxbytes = trafficdb->dayrxbytes; traffic.daytxbytes = trafficdb->daytxbytes; traffic.dayduration = trafficdb->dayduration; traffic.sesstime = trafficdb->sesstime; traffic.sessrxbytes = trafficdb->sessrxbytes; traffic.sesstxbytes = trafficdb->sesstxbytes; traffic.sessduration = trafficdb->sessduration; /*Write to database*/ if (!mmgui_trafficdb_day_traffic_write(trafficdb, &traffic)) { g_debug("Failed to write traffic statistics to database\n"); } /*Zero values*/ trafficdb->nextdaytime = 0; trafficdb->sessactive = FALSE; trafficdb->sessinitialized = FALSE; trafficdb->sessstate = MMGUI_TRAFFICDB_SESSION_STATE_UNKNOWN; trafficdb->dayrxbytes = 0; trafficdb->daytxbytes = 0; trafficdb->dayduration = 0; trafficdb->sesstime = 0; trafficdb->sessrxbytes = 0; trafficdb->sesstxbytes = 0; trafficdb->sessduration = 0; return TRUE; } gboolean mmgui_trafficdb_session_get_day_traffic(mmgui_trafficdb_t trafficdb, mmgui_day_traffic_t traffic) { time_t currenttime; if ((trafficdb == NULL) || (traffic == NULL)) return FALSE; if (!trafficdb->sessactive) return FALSE; currenttime = time(NULL); traffic->daytime = mmgui_trafficdb_truncate_day_timesatmp(currenttime); traffic->dayrxbytes = trafficdb->dayrxbytes; traffic->daytxbytes = trafficdb->daytxbytes; traffic->dayduration = trafficdb->dayduration; traffic->sesstime = trafficdb->sesstime; traffic->sessrxbytes = trafficdb->sessrxbytes; traffic->sesstxbytes = trafficdb->sesstxbytes; traffic->sessduration = trafficdb->sessduration; return TRUE; } gboolean mmgui_trafficdb_day_traffic_write(mmgui_trafficdb_t trafficdb, mmgui_day_traffic_t daytraffic) { GDBM_FILE db; gchar dayid[64]; gint idlen; datum key, data; gchar *daytrafficxml; if ((trafficdb == NULL) || (daytraffic == NULL)) return FALSE; if (trafficdb->filepath == NULL) return FALSE; db = gdbm_open((gchar *)trafficdb->filepath, 0, GDBM_WRCREAT, 0755, 0); if (db == NULL) return FALSE; memset(dayid, 0, sizeof(dayid)); idlen = snprintf(dayid, sizeof(dayid), "%" G_GUINT64_FORMAT "", daytraffic->daytime); key.dptr = (gchar *)dayid; key.dsize = idlen; daytrafficxml = g_strdup_printf(TRAFFICDB_DAY_XML, daytraffic->daytime, daytraffic->dayrxbytes, daytraffic->daytxbytes, daytraffic->dayduration, daytraffic->sesstime, daytraffic->sessrxbytes, daytraffic->sesstxbytes, daytraffic->sessduration); data.dptr = daytrafficxml; data.dsize = strlen(daytrafficxml); if (gdbm_store(db, key, data, GDBM_REPLACE) == -1) { g_warning("Unable to write to database"); gdbm_close(db); g_free(daytrafficxml); return FALSE; } gdbm_sync(db); gdbm_close(db); g_free(daytrafficxml); return TRUE; } static gint mmgui_trafficdb_traffic_list_sort_compare(gconstpointer a, gconstpointer b) { mmgui_day_traffic_t day1, day2; day1 = (mmgui_day_traffic_t)a; day2 = (mmgui_day_traffic_t)b; if (day1->daytime < day2->daytime) { return -1; } else if (day1->daytime > day2->daytime) { return 1; } else { return 0; } } GSList *mmgui_trafficdb_get_traffic_list_for_month(mmgui_trafficdb_t trafficdb, guint month, guint year) { GDBM_FILE db; time_t begtime, endtime; time_t daytime; GSList *list; mmgui_day_traffic_t daytraffic; datum key, data; gchar dayid[64]; struct tm *timespec; gboolean currentstatscorrected; if (trafficdb == NULL) return NULL; if (trafficdb->filepath == NULL) return NULL; begtime = mmgui_trafficdb_get_month_begin_timestamp(month, year); endtime = mmgui_trafficdb_get_month_end_timestamp(month, year); list = NULL; currentstatscorrected = FALSE; db = gdbm_open((gchar *)trafficdb->filepath, 0, GDBM_READER, 0755, 0); if (db != NULL) { /*Get data from database if possible*/ key = gdbm_firstkey(db); if (key.dptr != NULL) { do { memset(dayid, 0, sizeof(dayid)); strncpy(dayid, key.dptr, key.dsize); daytime = (time_t)strtoull(dayid, NULL, 10); if ((difftime(endtime, daytime) >= 0.0) && (difftime(daytime, begtime) > 0.0)) { data = gdbm_fetch(db, key); if (data.dptr != NULL) { daytraffic = mmgui_trafficdb_xml_parse(data.dptr, data.dsize); if ((daytime == trafficdb->presdaytime) && (trafficdb->sessactive)) { /*Today statistics correction*/ daytraffic->dayrxbytes = trafficdb->dayrxbytes; daytraffic->daytxbytes = trafficdb->daytxbytes; daytraffic->dayduration = trafficdb->dayduration; daytraffic->sessrxbytes = trafficdb->sessrxbytes; daytraffic->sesstxbytes = trafficdb->sesstxbytes; daytraffic->sessduration = trafficdb->sessduration; currentstatscorrected = TRUE; } list = g_slist_prepend(list, daytraffic); } } key = gdbm_nextkey(db, key); } while (key.dptr != NULL); } gdbm_close(db); } /*If statistics for current day must be included*/ daytime = time(NULL); timespec = localtime((const time_t *)&daytime); if ((month == timespec->tm_mon) && (!currentstatscorrected)) { if ((trafficdb->dayduration + trafficdb->sessduration) > 0) { daytraffic = g_new(struct _mmgui_day_traffic, 1); daytraffic->daytime = trafficdb->presdaytime; daytraffic->dayrxbytes = trafficdb->dayrxbytes; daytraffic->daytxbytes = trafficdb->daytxbytes; daytraffic->dayduration = trafficdb->dayduration; daytraffic->sesstime = trafficdb->sesstime; daytraffic->sessrxbytes = trafficdb->sessrxbytes; daytraffic->sesstxbytes = trafficdb->sesstxbytes; daytraffic->sessduration = trafficdb->sessduration; list = g_slist_prepend(list, daytraffic); } } if (list != NULL) { list = g_slist_sort(list, mmgui_trafficdb_traffic_list_sort_compare); } return list; } void mmgui_trafficdb_free_traffic_list_for_month(GSList *trafficlist) { if (trafficlist == NULL) return; g_slist_foreach(trafficlist, (GFunc)g_free, NULL); g_slist_free(trafficlist); } mmgui_day_traffic_t mmgui_trafficdb_day_traffic_read(mmgui_trafficdb_t trafficdb, time_t daytime) { GDBM_FILE db; gchar dayid[64]; gint idlen; datum key, data; mmgui_day_traffic_t traffic; if (trafficdb == NULL) return NULL; if (trafficdb->filepath == NULL) return NULL; //Open database db = gdbm_open((gchar *)trafficdb->filepath, 0, GDBM_READER, 0755, 0); if (db == NULL) return NULL; traffic = NULL; memset(dayid, 0, sizeof(dayid)); idlen = snprintf(dayid, sizeof(dayid), "%" G_GUINT64_FORMAT "", (guint64)mmgui_trafficdb_truncate_day_timesatmp(daytime)); key.dptr = (gchar *)dayid; key.dsize = idlen; if (gdbm_exists(db, key)) { data = gdbm_fetch(db, key); if (data.dptr != NULL) { traffic = mmgui_trafficdb_xml_parse(data.dptr, data.dsize); } } gdbm_close(db); return traffic; } static mmgui_day_traffic_t mmgui_trafficdb_xml_parse(gchar *xml, gsize size) { mmgui_day_traffic_t traffic; GMarkupParser mp; GMarkupParseContext *mpc; GError *error = NULL; traffic = g_new(struct _mmgui_day_traffic, 1); traffic->daytime = 0; traffic->dayrxbytes = 0; traffic->daytxbytes = 0; traffic->dayduration = 0; traffic->sesstime = 0; traffic->sessrxbytes = 0; traffic->sesstxbytes = 0; traffic->sessduration = 0; mp.start_element = mmgui_trafficdb_xml_get_element; mp.end_element = mmgui_trafficdb_xml_end_element; mp.text = mmgui_trafficdb_xml_get_value; mp.passthrough = NULL; mp.error = NULL; mpc = g_markup_parse_context_new(&mp, 0, (gpointer)traffic, NULL); g_markup_parse_context_parse(mpc, xml, size, &error); if (error != NULL) { g_free(traffic); g_error_free(error); g_markup_parse_context_free(mpc); return NULL; } g_markup_parse_context_free(mpc); return traffic; } static void mmgui_trafficdb_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error) { if (g_str_equal(element, "daytime")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_DAY_TIME; } else if (g_str_equal(element, "dayrxbytes")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_DAY_RX; } else if (g_str_equal(element, "daytxbytes")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_DAY_TX; } else if (g_str_equal(element, "dayduration")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_DAY_DURATION; } else if (g_str_equal(element, "sesstime")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_SESSION_TIME; } else if (g_str_equal(element, "sessrxbytes")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_SESSION_RX; } else if (g_str_equal(element, "sesstxbytes")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_SESSION_TX; } else if (g_str_equal(element, "sessduration")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_SESSION_DURATION; } else { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_NULL; } } static void mmgui_trafficdb_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error) { mmgui_day_traffic_t daytraffic; daytraffic = (mmgui_day_traffic_t)data; if (mmgui_trafficdb_xml_parameter == TRAFFICDB_XML_PARAM_NULL) return; switch (mmgui_trafficdb_xml_parameter) { case TRAFFICDB_XML_PARAM_DAY_TIME: daytraffic->daytime = (guint64)strtoull(text, NULL, 10); break; case TRAFFICDB_XML_PARAM_DAY_RX: daytraffic->dayrxbytes = (guint64)strtoull(text, NULL, 10); break; case TRAFFICDB_XML_PARAM_DAY_TX: daytraffic->daytxbytes = (guint64)strtoull(text, NULL, 10); break; case TRAFFICDB_XML_PARAM_DAY_DURATION: daytraffic->dayduration = (guint)strtoul(text, NULL, 10); break; case TRAFFICDB_XML_PARAM_SESSION_TIME: daytraffic->sesstime = (guint64)strtoull(text, NULL, 10); break; case TRAFFICDB_XML_PARAM_SESSION_RX: daytraffic->sessrxbytes = (guint64)strtoull(text, NULL, 10); break; case TRAFFICDB_XML_PARAM_SESSION_TX: daytraffic->sesstxbytes = (guint64)strtoull(text, NULL, 10); break; case TRAFFICDB_XML_PARAM_SESSION_DURATION: daytraffic->sessduration = (guint)strtoul(text, NULL, 10); break; default: break; } } static void mmgui_trafficdb_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error) { if (!g_str_equal(element, "traffic")) { mmgui_trafficdb_xml_parameter = TRAFFICDB_XML_PARAM_NULL; } } modem-manager-gui-0.0.17.1/src/settings.h0000644000175000017500000000331411774106372016506 0ustar alexalex/* * settings.h * * Copyright 2012 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __SETTINGS_H__ #define __SETTINGS_H__ struct _settings { gchar *filename; GKeyFile *keyfile; }; typedef struct _settings *settings_t; settings_t gmm_settings_open(gchar *appname, gchar *filename); gboolean gmm_settings_close(settings_t settings); gboolean gmm_settings_set_string(settings_t settings, gchar *key, gchar *value); gchar *gmm_settings_get_string(settings_t settings, gchar *key, gchar *defvalue); gboolean gmm_settings_set_boolean(settings_t settings, gchar *key, gboolean value); gboolean gmm_settings_get_boolean(settings_t settings, gchar *key, gboolean defvalue); gboolean gmm_settings_set_int(settings_t settings, gchar *key, gint value); gint gmm_settings_get_int(settings_t settings, gchar *key, gint defvalue); gboolean gmm_settings_set_double(settings_t settings, gchar *key, gdouble value); gdouble gmm_settings_get_double(settings_t settings, gchar *key, gdouble defvalue); #endif /* __SETTINGS_H__ */ modem-manager-gui-0.0.17.1/src/settings.c0000644000175000017500000001205212377062612016476 0ustar alexalex/* * settings.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include "settings.h" settings_t gmm_settings_open(gchar *appname, gchar *filename) { settings_t settings; gchar *confpath; gchar *filedata; gsize datasize; GError *error; if ((appname == NULL) || (filename == NULL)) return NULL; //Form path using XDG standard confpath = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), appname, NULL); if (g_mkdir_with_parents(confpath, 0755) != 0) { g_warning("Cant create program settings directory"); g_free(confpath); return NULL; } g_free(confpath); settings = g_new(struct _settings, 1); settings->filename = g_build_filename(g_get_user_config_dir(), appname, filename, NULL); settings->keyfile = g_key_file_new(); error = NULL; if (g_file_get_contents(settings->filename, &filedata, &datasize, &error)) { if (!g_key_file_load_from_data(settings->keyfile, filedata, datasize, G_KEY_FILE_NONE, &error)) { g_warning("No data loaded from file"); g_error_free(error); error = NULL; } } else { g_warning("No data loaded from file"); g_error_free(error); error = NULL; } return settings; } gboolean gmm_settings_close(settings_t settings) { gchar *filedata; gsize datasize; GError *error; if (settings == NULL) return FALSE; if ((settings->filename == NULL) || (settings->keyfile == NULL)) return FALSE; error = NULL; filedata = g_key_file_to_data(settings->keyfile, &datasize, &error); if (filedata != NULL) { if (!g_file_set_contents(settings->filename, filedata, datasize, &error)) { g_warning("No data saved to file"); g_error_free(error); error = NULL; } } else { g_warning("No data saved to file"); g_error_free(error); error = NULL; } g_free(filedata); g_free(settings->filename); g_key_file_free(settings->keyfile); g_free(settings); return TRUE; } gboolean gmm_settings_set_string(settings_t settings, gchar *key, gchar *value) { if ((settings == NULL) || (key == NULL) || (value == NULL)) return FALSE; g_key_file_set_string(settings->keyfile, "settings", key, value); return TRUE; } gchar *gmm_settings_get_string(settings_t settings, gchar *key, gchar *defvalue) { gchar *value; GError *error; if ((settings == NULL) || (key == NULL)) return g_strdup(defvalue); error = NULL; value = g_key_file_get_string(settings->keyfile, "settings", key, &error); if ((value == NULL) && (error != NULL)) { g_error_free(error); return g_strdup(defvalue); } else { return g_strdup(value); } } gboolean gmm_settings_set_boolean(settings_t settings, gchar *key, gboolean value) { if ((settings == NULL) || (key == NULL)) return FALSE; g_key_file_set_boolean(settings->keyfile, "settings", key, value); return TRUE; } gboolean gmm_settings_get_boolean(settings_t settings, gchar *key, gboolean defvalue) { gboolean value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_boolean(settings->keyfile, "settings", key, &error); if ((error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } gboolean gmm_settings_set_int(settings_t settings, gchar *key, gint value) { if ((settings == NULL) || (key == NULL)) return FALSE; g_key_file_set_integer(settings->keyfile, "settings", key, value); return TRUE; } gint gmm_settings_get_int(settings_t settings, gchar *key, gint defvalue) { gint value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_integer(settings->keyfile, "settings", key, &error); if ((error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } gboolean gmm_settings_set_double(settings_t settings, gchar *key, gdouble value) { if ((settings == NULL) || (key == NULL)) return FALSE; g_key_file_set_double(settings->keyfile, "settings", key, value); return TRUE; } gdouble gmm_settings_get_double(settings_t settings, gchar *key, gdouble defvalue) { gdouble value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_boolean(settings->keyfile, "settings", key, &error); if ((error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } modem-manager-gui-0.0.17.1/src/libpaths.h0000644000175000017500000000274112157656462016465 0ustar alexalex/* * libpaths.h * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __LIBPATHS_H__ #define __LIBPATHS_H__ #include struct _mmgui_libpaths_cache { gint fd; gchar *mapping; gsize mapsize; time_t modtime; GHashTable *cache; gchar *safename; /*Local cache*/ gchar *localfilename; gboolean updatelocal; GKeyFile *localkeyfile; }; typedef struct _mmgui_libpaths_cache *mmgui_libpaths_cache_t; mmgui_libpaths_cache_t mmgui_libpaths_cache_new(gchar *libname, ...); void mmgui_libpaths_cache_close(mmgui_libpaths_cache_t libcache); gchar *mmgui_libpaths_cache_get_library_name(mmgui_libpaths_cache_t libcache, gchar *libname); gchar *mmgui_libpaths_cache_get_library_path(mmgui_libpaths_cache_t libcache, gchar *libname); #endif /* __LIBPATHS_H__ */ modem-manager-gui-0.0.17.1/src/libpaths.c0000644000175000017500000003500212262265360016442 0ustar alexalex/* * libpaths.c * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include "libpaths.h" #define MMGUI_LIBPATHS_CACHE_FILE "/etc/ld.so.cache" #define MMGUI_LIBPATHS_CACHE_SOEXT ".so" #define MMGUI_LIBPATHS_CACHE_LIB_TEMP "/usr/lib/%s.so" #define MMGUI_LIBPATHS_CACHE_PATH_TEMP "/usr/lib/%s.so" /*Cache file*/ #define MMGUI_LIBPATHS_LOCAL_CACHE_XDG ".cache" #define MMGUI_LIBPATHS_LOCAL_CACHE_DIR "modem-manager-gui" #define MMGUI_LIBPATHS_LOCAL_CACHE_FILE "libpaths.conf" #define MMGUI_LIBPATHS_LOCAL_CACHE_PERM 0755 /*Cache file sections*/ #define MMGUI_LIBPATHS_FILE_ROOT_SECTION "cache" #define MMGUI_LIBPATHS_FILE_TIMESTAMP "timestamp" #define MMGUI_LIBPATHS_FILE_NAME "name" #define MMGUI_LIBPATHS_FILE_PATH "path" struct _mmgui_libpaths_entry { gchar *id; gchar *libname; gchar *libpath; }; typedef struct _mmgui_libpaths_entry *mmgui_libpaths_entry_t; static gboolean mmgui_libpaths_cache_open_local_cache_file(mmgui_libpaths_cache_t libcache, guint64 dbtimestamp) { const gchar *homepath; gchar *confpath; guint64 localtimestamp; GError *error; if (libcache == NULL) return FALSE; homepath = g_get_home_dir(); if (homepath == NULL) return FALSE; confpath = g_build_filename(homepath, MMGUI_LIBPATHS_LOCAL_CACHE_XDG, MMGUI_LIBPATHS_LOCAL_CACHE_DIR, NULL); if (g_mkdir_with_parents(confpath, MMGUI_LIBPATHS_LOCAL_CACHE_PERM) != 0) { g_debug("No write access to program settings directory"); g_free(confpath); return FALSE; } g_free(confpath); libcache->localfilename = g_build_filename(homepath, MMGUI_LIBPATHS_LOCAL_CACHE_XDG, MMGUI_LIBPATHS_LOCAL_CACHE_DIR, MMGUI_LIBPATHS_LOCAL_CACHE_FILE, NULL); libcache->localkeyfile = g_key_file_new(); error = NULL; if (!g_key_file_load_from_file(libcache->localkeyfile, libcache->localfilename, G_KEY_FILE_NONE, &error)) { libcache->updatelocal = TRUE; g_debug("Local cache file loading error: %s", error->message); g_error_free(error); } else { error = NULL; if (g_key_file_has_key(libcache->localkeyfile, MMGUI_LIBPATHS_FILE_ROOT_SECTION, MMGUI_LIBPATHS_FILE_TIMESTAMP, &error)) { error = NULL; localtimestamp = g_key_file_get_uint64(libcache->localkeyfile, MMGUI_LIBPATHS_FILE_ROOT_SECTION, MMGUI_LIBPATHS_FILE_TIMESTAMP, &error); if (error == NULL) { if (localtimestamp == dbtimestamp) { libcache->updatelocal = FALSE; } else { libcache->updatelocal = TRUE; } } else { libcache->updatelocal = TRUE; g_debug("Local cache contain unreadable timestamp: %s", error->message); g_error_free(error); } } else { libcache->updatelocal = TRUE; g_debug("Local cache does not contain timestamp: %s", error->message); g_error_free(error); } } return !libcache->updatelocal; } static gboolean mmgui_libpaths_cache_close_local_cache_file(mmgui_libpaths_cache_t libcache, gboolean update) { gchar *filedata; gsize datasize; GError *error; if (libcache == NULL) return FALSE; if ((libcache->localfilename == NULL) || (libcache->localkeyfile == NULL)) return FALSE; if (update) { /*Save timestamp*/ g_key_file_set_int64(libcache->localkeyfile, MMGUI_LIBPATHS_FILE_ROOT_SECTION, MMGUI_LIBPATHS_FILE_TIMESTAMP, (gint64)libcache->modtime); /*Write to file*/ error = NULL; filedata = g_key_file_to_data(libcache->localkeyfile, &datasize, &error); if (filedata != NULL) { if (!g_file_set_contents(libcache->localfilename, filedata, datasize, &error)) { g_debug("No data saved to local cache file file: %s", error->message); g_error_free(error); } } g_free(filedata); } /*Free resources*/ g_free(libcache->localfilename); g_key_file_free(libcache->localkeyfile); return TRUE; } static gboolean mmgui_libpaths_cache_add_to_local_cache_file(mmgui_libpaths_cache_t libcache, mmgui_libpaths_entry_t cachedlib) { if ((libcache == NULL) || (cachedlib == NULL)) return FALSE; if ((libcache->updatelocal) && (libcache->localkeyfile != NULL)) { if (cachedlib->id != NULL) { /*Library name*/ if (cachedlib->libname != NULL) { g_key_file_set_string(libcache->localkeyfile, cachedlib->id, MMGUI_LIBPATHS_FILE_NAME, cachedlib->libname); } /*Library path*/ if (cachedlib->libpath != NULL) { g_key_file_set_string(libcache->localkeyfile, cachedlib->id, MMGUI_LIBPATHS_FILE_PATH, cachedlib->libpath); } } } return TRUE; } static gboolean mmgui_libpaths_cache_get_from_local_cache_file(mmgui_libpaths_cache_t libcache, mmgui_libpaths_entry_t cachedlib) { GError *error; if ((libcache == NULL) || (cachedlib == NULL)) return FALSE; if ((!libcache->updatelocal) && (libcache->localkeyfile != NULL)) { if (cachedlib->id != NULL) { /*Library name*/ error = NULL; if (g_key_file_has_key(libcache->localkeyfile, cachedlib->id, MMGUI_LIBPATHS_FILE_NAME, &error)) { error = NULL; cachedlib->libname = g_key_file_get_string(libcache->localkeyfile, cachedlib->id, MMGUI_LIBPATHS_FILE_NAME, &error); if (error != NULL) { g_debug("Local cache contain unreadable library name: %s", error->message); g_error_free(error); } } else { cachedlib->libname = NULL; g_debug("Local cache does not contain library name: %s", error->message); g_error_free(error); } /*Library path*/ error = NULL; if (g_key_file_has_key(libcache->localkeyfile, cachedlib->id, MMGUI_LIBPATHS_FILE_PATH, &error)) { error = NULL; cachedlib->libpath = g_key_file_get_string(libcache->localkeyfile, cachedlib->id, MMGUI_LIBPATHS_FILE_PATH, &error); if (error != NULL) { g_debug("Local cache contain unreadable library path: %s", error->message); g_error_free(error); } } else { cachedlib->libpath = NULL; g_debug("Local cache does not contain library path: %s", error->message); g_error_free(error); } } } return TRUE; } static void mmgui_libpaths_cache_destroy_entry(gpointer data) { mmgui_libpaths_entry_t cachedlib; cachedlib = (mmgui_libpaths_entry_t)data; if (cachedlib == NULL) return; if (cachedlib->id != NULL) { g_free(cachedlib->id); } if (cachedlib->libname != NULL) { g_free(cachedlib->libname); } if (cachedlib->libpath != NULL) { g_free(cachedlib->libpath); } g_free(cachedlib); } static gboolean mmgui_libpaths_cache_get_entry(mmgui_libpaths_cache_t libcache, gchar *libpath) { mmgui_libpaths_entry_t cachedlib; gchar *libext, *libid; guint pathlen, sym, lnsym, lilen, lnlen; gboolean res; if ((libcache == NULL) || (libpath == NULL)) return FALSE; pathlen = strlen(libpath); if (pathlen == 0) return FALSE; libext = strstr(libpath, MMGUI_LIBPATHS_CACHE_SOEXT); if (libext == NULL) return FALSE; lnsym = 0; lilen = 0; lnlen = 0; for (sym = libext-libpath; sym >= 0; sym--) { if (libpath[sym] == '/') { lnsym = sym + 1; lilen = libext - libpath - sym - 1; lnlen = pathlen - sym - 1; break; } } if ((lilen == 0) || (lnlen == 0)) return FALSE; /*library identifier*/ libid = g_malloc0(lilen+1); strncpy(libid, libpath+lnsym, lilen); /*search in hash table*/ cachedlib = (mmgui_libpaths_entry_t)g_hash_table_lookup(libcache->cache, libid); res = FALSE; if (cachedlib != NULL) { if (cachedlib->libname == NULL) { /*library name*/ cachedlib->libname = g_malloc0(lnlen+1); strncpy(cachedlib->libname, libpath+lnsym, lnlen); /*library name found*/ mmgui_libpaths_cache_add_to_local_cache_file(libcache, cachedlib); g_debug("Library name: %s (%s)\n", cachedlib->libname, libid); } if (cachedlib->libpath == NULL) { /*full library path*/ cachedlib->libpath = g_strdup(libpath); /*library path found*/ mmgui_libpaths_cache_add_to_local_cache_file(libcache, cachedlib); g_debug("Library path: %s (%s)\n", cachedlib->libpath, libid); } res = TRUE; } g_free(libid); return res; } static guint mmgui_libpaths_cache_parse_db(mmgui_libpaths_cache_t libcache) { guint ptr, start, end, entry, entries; /*gchar *entryhash, *entryname, *entryext;*/ if (libcache == NULL) return 0; /*Cache file must be terminated with value 0x00*/ if (libcache->mapping[libcache->mapsize-1] != 0x00) { g_debug("Cache file seems to be non-valid\n"); return 0; } start = 0; end = libcache->mapsize-1; entries = 0; entry = 0; for (ptr = libcache->mapsize-1; ptr > 0; ptr--) { if (libcache->mapping[ptr] == 0x00) { /*String separator - value 0x00*/ if ((end - ptr) == 1) { /*Termination sequence - two values 0x00 0x00*/ if (start < end) { if (libcache->mapping[start] == '/') { mmgui_libpaths_cache_get_entry(libcache, libcache->mapping+start); entries++; } entry++; } break; } else { /*Regular cache entry*/ if (start < end) { if (libcache->mapping[start] == '/') { mmgui_libpaths_cache_get_entry(libcache, libcache->mapping+start); entries++; } entry++; } /*Set end pointer to string end*/ end = ptr; } } else if (isprint(libcache->mapping[ptr])) { /*Move start pointer because this value is print symbol*/ start = ptr; } } return entries; } mmgui_libpaths_cache_t mmgui_libpaths_cache_new(gchar *libname, ...) { va_list libnames; gchar *currentlib; struct stat statbuf; gboolean localcopy; mmgui_libpaths_cache_t libcache; mmgui_libpaths_entry_t cachedlib; if (libname == NULL) return NULL; libcache = (mmgui_libpaths_cache_t)g_new0(struct _mmgui_libpaths_cache, 1); if (stat(MMGUI_LIBPATHS_CACHE_FILE, &statbuf) == -1) { g_debug("Failed to get library paths cache file size\n"); g_free(libcache); return NULL; } libcache->modtime = statbuf.st_mtime; localcopy = mmgui_libpaths_cache_open_local_cache_file(libcache, (guint64)libcache->modtime); if (!localcopy) { /*Open system cache*/ libcache->fd = open(MMGUI_LIBPATHS_CACHE_FILE, O_RDONLY); if (libcache->fd == -1) { g_debug("Failed to open library paths cache file\n"); mmgui_libpaths_cache_close_local_cache_file(libcache, FALSE); g_free(libcache); return NULL; } /*Memory mapping size*/ libcache->mapsize = (size_t)statbuf.st_size; if (libcache->mapsize == 0) { g_debug("Failed to map empty library paths cache file\n"); mmgui_libpaths_cache_close_local_cache_file(libcache, FALSE); close(libcache->fd); g_free(libcache); return NULL; } /*Map file into memory*/ libcache->mapping = mmap(NULL, libcache->mapsize, PROT_READ, MAP_PRIVATE, libcache->fd, 0); if (libcache->mapping == MAP_FAILED) { g_debug("Failed to map library paths cache file into memory\n"); mmgui_libpaths_cache_close_local_cache_file(libcache, FALSE); close(libcache->fd); g_free(libcache); return NULL; } } /*When no entry found in cache, form safe name adding .so extension*/ libcache->safename = NULL; /*Cache for requested libraries*/ libcache->cache = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify)mmgui_libpaths_cache_destroy_entry); va_start(libnames, libname); /*Dont forget about first library name*/ currentlib = libname; do { /*Allocate structure*/ cachedlib = (mmgui_libpaths_entry_t)g_new0(struct _mmgui_libpaths_entry, 1); cachedlib->id = g_strdup(currentlib); cachedlib->libname = NULL; cachedlib->libpath = NULL; g_hash_table_insert(libcache->cache, cachedlib->id, cachedlib); /*If available, get from local cache*/ if (localcopy) { mmgui_libpaths_cache_get_from_local_cache_file(libcache, cachedlib); } /*Next library name*/ currentlib = va_arg(libnames, gchar *); } while (currentlib != NULL); va_end(libnames); if (!localcopy) { /*Parse system database*/ mmgui_libpaths_cache_parse_db(libcache); /*Save local cache*/ mmgui_libpaths_cache_close_local_cache_file(libcache, TRUE); } else { /*Close used cache file*/ mmgui_libpaths_cache_close_local_cache_file(libcache, FALSE); } return libcache; } void mmgui_libpaths_cache_close(mmgui_libpaths_cache_t libcache) { if (libcache == NULL) return; if (libcache->safename != NULL) { g_free(libcache->safename); } g_hash_table_destroy(libcache->cache); munmap(libcache->mapping, libcache->mapsize); g_free(libcache); } gchar *mmgui_libpaths_cache_get_library_name(mmgui_libpaths_cache_t libcache, gchar *libname) { mmgui_libpaths_entry_t cachedlib; if ((libcache == NULL) || (libname == NULL)) return NULL; cachedlib = (mmgui_libpaths_entry_t)g_hash_table_lookup(libcache->cache, libname); if (cachedlib != NULL) { if (cachedlib->libname != NULL) { /*Cached library name*/ return cachedlib->libname; } else { /*Safe library name*/ if (libcache->safename != NULL) { g_free(libcache->safename); } libcache->safename = g_strdup_printf(MMGUI_LIBPATHS_CACHE_LIB_TEMP, libname); return libcache->safename; } } else { /*Safe library name*/ if (libcache->safename != NULL) { g_free(libcache->safename); } libcache->safename = g_strdup_printf(MMGUI_LIBPATHS_CACHE_LIB_TEMP, libname); return libcache->safename; } } gchar *mmgui_libpaths_cache_get_library_path(mmgui_libpaths_cache_t libcache, gchar *libname) { mmgui_libpaths_entry_t cachedlib; if ((libcache == NULL) || (libname == NULL)) return NULL; cachedlib = (mmgui_libpaths_entry_t)g_hash_table_lookup(libcache->cache, libname); if (cachedlib != NULL) { if (cachedlib->libpath != NULL) { /*Cached library path*/ return cachedlib->libpath; } else { /*Safe library path*/ if (libcache->safename != NULL) { g_free(libcache->safename); } libcache->safename = g_strdup_printf(MMGUI_LIBPATHS_CACHE_PATH_TEMP, libname); return libcache->safename; } } else { /*Safe library path*/ if (libcache->safename != NULL) { g_free(libcache->safename); } libcache->safename = g_strdup_printf(MMGUI_LIBPATHS_CACHE_PATH_TEMP, libname); return libcache->safename; } } modem-manager-gui-0.0.17.1/src/modem-settings.h0000644000175000017500000000440512373755764017622 0ustar alexalex/* * modem-settings.h * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __MODEM_SETTINGS_H__ #define __MODEM_SETTINGS_H__ struct _modem_settings { gchar *filename; GKeyFile *keyfile; }; typedef struct _modem_settings *modem_settings_t; modem_settings_t mmgui_modem_settings_open(const gchar *persistentid); gboolean mmgui_modem_settings_close(modem_settings_t settings); gboolean mmgui_modem_settings_set_string(modem_settings_t settings, gchar *key, gchar *value); gchar *mmgui_modem_settings_get_string(modem_settings_t settings, gchar *key, gchar *defvalue); gboolean mmgui_modem_settings_set_string_list(modem_settings_t settings, gchar *key, gchar **value); gchar **mmgui_modem_settings_get_string_list(modem_settings_t settings, gchar *key, gchar **defvalue); gboolean mmgui_modem_settings_set_boolean(modem_settings_t settings, gchar *key, gboolean value); gboolean mmgui_modem_settings_get_boolean(modem_settings_t settings, gchar *key, gboolean defvalue); gboolean mmgui_modem_settings_set_int(modem_settings_t settings, gchar *key, gint value); gint mmgui_modem_settings_get_int(modem_settings_t settings, gchar *key, gint defvalue); gboolean mmgui_modem_settings_set_int64(modem_settings_t settings, gchar *key, gint64 value); gint64 mmgui_modem_settings_get_int64(modem_settings_t settings, gchar *key, gint64 defvalue); gboolean mmgui_modem_settings_set_double(modem_settings_t settings, gchar *key, gdouble value); gdouble mmgui_modem_settings_get_double(modem_settings_t settings, gchar *key, gdouble defvalue); #endif /* __MODEM_SETTINGS_H__ */ modem-manager-gui-0.0.17.1/src/modem-settings.c0000644000175000017500000001531212375673302017601 0ustar alexalex/* * modem-settings.c * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include "modem-settings.h" modem_settings_t mmgui_modem_settings_open(const gchar *persistentid) { modem_settings_t settings; gchar *filepath; gchar *filedata; gsize datasize; GError *error; if (persistentid == NULL) return NULL; //Form path using XDG standard filepath = g_build_path(G_DIR_SEPARATOR_S, g_get_user_data_dir(), "modem-manager-gui", "devices", persistentid, NULL); if (filepath == NULL) return NULL; if (g_mkdir_with_parents(filepath, 0755) != 0) { g_warning("Cant create modem settings directory"); g_free(filepath); return NULL; } settings = g_new(struct _modem_settings, 1); settings->filename = g_build_filename(filepath, "modem-settings.conf", NULL); settings->keyfile = g_key_file_new(); g_free(filepath); error = NULL; if (g_file_get_contents(settings->filename, &filedata, &datasize, &error)) { if (!g_key_file_load_from_data(settings->keyfile, filedata, datasize, G_KEY_FILE_NONE, &error)) { g_warning("No data loaded from file"); g_error_free(error); error = NULL; } g_free(filedata); } else { g_warning("No data loaded from file"); g_error_free(error); error = NULL; } return settings; } gboolean mmgui_modem_settings_close(modem_settings_t settings) { gchar *filedata; gsize datasize; GError *error; if (settings == NULL) return FALSE; if ((settings->filename == NULL) || (settings->keyfile == NULL)) return FALSE; error = NULL; filedata = g_key_file_to_data(settings->keyfile, &datasize, &error); if (filedata != NULL) { if (!g_file_set_contents(settings->filename, filedata, datasize, &error)) { g_warning("No data saved to file"); g_error_free(error); error = NULL; } } else { g_warning("No data saved to file - empty"); g_error_free(error); error = NULL; } g_free(filedata); g_free(settings->filename); g_key_file_free(settings->keyfile); g_free(settings); return TRUE; } gboolean mmgui_modem_settings_set_string(modem_settings_t settings, gchar *key, gchar *value) { if ((settings == NULL) || (key == NULL) || (value == NULL)) return FALSE; g_key_file_set_string(settings->keyfile, "settings", key, value); return TRUE; } gchar *mmgui_modem_settings_get_string(modem_settings_t settings, gchar *key, gchar *defvalue) { gchar *value; GError *error; if ((settings == NULL) || (key == NULL)) return g_strdup(defvalue); error = NULL; value = g_key_file_get_string(settings->keyfile, "settings", key, &error); if ((value == NULL) && (error != NULL)) { g_error_free(error); return g_strdup(defvalue); } else { return g_strdup(value); } } gboolean mmgui_modem_settings_set_string_list(modem_settings_t settings, gchar *key, gchar **value) { gsize length; gint i; if ((settings == NULL) || (key == NULL) || (value == NULL)) return FALSE; i = 0; length = 0; while (value[i] != NULL) { length++; i++; } if (length == 0) return FALSE; g_key_file_set_string_list(settings->keyfile, "settings", key, (const gchar *const *)value, length); return TRUE; } gchar **mmgui_modem_settings_get_string_list(modem_settings_t settings, gchar *key, gchar **defvalue) { gchar **value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_string_list(settings->keyfile, "settings", key, NULL, &error); if ((value == NULL) && (error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } gboolean mmgui_modem_settings_set_boolean(modem_settings_t settings, gchar *key, gboolean value) { if ((settings == NULL) || (key == NULL)) return FALSE; g_key_file_set_boolean(settings->keyfile, "settings", key, value); return TRUE; } gboolean mmgui_modem_settings_get_boolean(modem_settings_t settings, gchar *key, gboolean defvalue) { gboolean value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_boolean(settings->keyfile, "settings", key, &error); if ((error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } gboolean mmgui_modem_settings_set_int(modem_settings_t settings, gchar *key, gint value) { if ((settings == NULL) || (key == NULL)) return FALSE; g_key_file_set_integer(settings->keyfile, "settings", key, value); return TRUE; } gint mmgui_modem_settings_get_int(modem_settings_t settings, gchar *key, gint defvalue) { gint value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_integer(settings->keyfile, "settings", key, &error); if ((error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } gboolean mmgui_modem_settings_set_int64(modem_settings_t settings, gchar *key, gint64 value) { if ((settings == NULL) || (key == NULL)) return FALSE; g_key_file_set_int64(settings->keyfile, "settings", key, value); return TRUE; } gint64 mmgui_modem_settings_get_int64(modem_settings_t settings, gchar *key, gint64 defvalue) { gint value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_int64(settings->keyfile, "settings", key, &error); if ((error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } gboolean mmgui_modem_settings_set_double(modem_settings_t settings, gchar *key, gdouble value) { if ((settings == NULL) || (key == NULL)) return FALSE; g_key_file_set_double(settings->keyfile, "settings", key, value); return TRUE; } gdouble mmgui_modem_settings_get_double(modem_settings_t settings, gchar *key, gdouble defvalue) { gdouble value; GError *error; if ((settings == NULL) || (key == NULL)) return defvalue; error = NULL; value = g_key_file_get_boolean(settings->keyfile, "settings", key, &error); if ((error != NULL)) { g_error_free(error); return defvalue; } else { return value; } } modem-manager-gui-0.0.17.1/src/encoding.h0000644000175000017500000000300312374143200016413 0ustar alexalex/* * encoding.h * * Copyright 2012 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __ENCODING_H__ #define __ENCODING_H__ #include guchar *utf8_to_ucs2(const guchar *input, gsize ilength, gsize *olength); guchar *ucs2_to_utf8(const guchar *input, gsize ilength, gsize *olength); guchar *utf8_to_gsm7(const guchar *input, gsize ilength, gsize *olength); guchar *gsm7_to_utf8(const guchar *input, gsize ilength, gsize *olength); guchar *utf8_map_gsm7(const guchar *input, gsize ilength, gsize *olength); gchar *encoding_ussd_gsm7_to_ucs2(gchar *srcstr); guchar *bcd_to_utf8_ascii_part(const guchar *input, gsize ilength, gsize *olength); gchar *encoding_unescape_xml_markup(const gchar *srcstr, gsize srclen); gchar *encoding_clear_special_symbols(gchar *srcstr, gsize srclen); #endif /* __ENCODING_H__ */ modem-manager-gui-0.0.17.1/src/encoding.c0000644000175000017500000004262012374143220016420 0ustar alexalex/* * encoding.c * * Copyright 2012-2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include static const guint gsm7_utf8_table [128] = { 0x0040, 0xc2a3, 0x0024, 0xc2a5, 0xc3a8, 0xc3a9, 0xc3b9, 0xc3ac, 0xc3b2, 0xc387, 0x000a, 0xc398, 0xc3b8, 0x000d, 0xc385, 0xc3a5, 0xce94, 0x005f, 0xcea6, 0xce93, 0xce9b, 0xcea9, 0xcea0, 0xcea8, 0xcea3, 0xce98, 0xce9e, 0x00a0, 0xc386, 0xc3a6, 0xc39f, 0xc389, 0x0020, 0x0021, 0x0022, 0x0023, 0xc2a4, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, 0xc2a1, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0xc384, 0xc396, 0xc391, 0xc39c, 0xc2a7, 0xc2bf, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0xc3a4, 0xc3b6, 0xc3b1, 0xc3bc, 0xc3a0 }; static const guint gsm7_utf8_ext_table [2][10] = { {0x00000c, 0x00005e, 0x00007b, 0x00007d, 0x00005c, 0x00005b, 0x00007e, 0x00005d, 0x00007c, 0xe282ac}, { 0x0a, 0x14, 0x28, 0x29, 0x2f, 0x3c, 0x3d, 0x3e, 0x40, 0x65} }; static const gchar hextable[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; static guint hex_to_dec(const guchar *input, gsize number); static guint hex_to_dec(const guchar *input, gsize number) { guint k, b, value; gint hexptr; if ((input == NULL) || ((input != NULL) && (input[0] == '\0')) || (number == 0)) return 0; value = 0; k = 1; for (hexptr = (number-1); hexptr >= 0; hexptr--) { switch (input[hexptr]) { case '0': b = 0; break; case '1': b = 1; break; case '2': b = 2; break; case '3': b = 3; break; case '4': b = 4; break; case '5': b = 5; break; case '6': b = 6; break; case '7': b = 7; break; case '8': b = 8; break; case '9': b = 9; break; case 'a': case 'A': b = 10; break; case 'b': case 'B': b = 11; break; case 'c': case 'C': b = 12; break; case 'd': case 'D': b = 13; break; case 'e': case 'E': b = 14; break; case 'f': case 'F': b = 15; break; default: b = 0; break; } value = value + b*k; k *= 16; } return value; } guchar *utf8_to_ucs2(const guchar *input, gsize ilength, gsize *olength) { guchar *output, *routput; guint iptr, optr; gushort value; if ((input == NULL) || (ilength == 0) || (olength == NULL)) return NULL; if (input[0] == '\0') return NULL; output = g_malloc0(ilength*2+1); if (output == NULL) return NULL; iptr = 0; optr = 0; while (iptr < ilength) { if (input[iptr] < 0x80) { value = input[iptr]; output[optr] = '0'; output[optr+1] = '0'; output[optr+2] = hextable[(guchar)(value & 0xff)/16]; output[optr+3] = hextable[(guchar)(value & 0xff)%16]; iptr += 1; optr += 4; } if ((input[iptr] & 0xE0) == 0xE0) { if (!((input[iptr+1] == 0) || (input[iptr+2] == 0))) { value = ((input[iptr] & 0x0F) << 12) | ((input[iptr+1] & 0x3F) << 6) | (input[iptr+2] & 0x3F); output[optr] = hextable[(guchar)((value >> 8) & 0xff)/16]; output[optr+1] = hextable[(guchar)((value >> 8) & 0xff)%16]; output[optr+2] = hextable[(guchar)(value & 0xff)/16]; output[optr+3] = hextable[(guchar)(value & 0xff)%16]; optr += 4; } iptr += 3; } if ((input[0] & 0xC0) == 0xC0) { if (input[1] != 0) { value = ((input[iptr] & 0x1F) << 6) | (input[iptr+1] & 0x3F); output[optr] = hextable[(guchar)((value >> 8) & 0xff)/16]; output[optr+1] = hextable[(guchar)((value >> 8) & 0xff)%16]; output[optr+2] = hextable[(guchar)(value & 0xff)/16]; output[optr+3] = hextable[(guchar)(value & 0xff)%16]; optr += 4; } iptr += 2; } } output[optr] = '\0'; routput = g_realloc(output, optr+1); if (routput != NULL) output = routput; *olength = optr; return output; } guchar *ucs2_to_utf8(const guchar *input, gsize ilength, gsize *olength) { guchar *output, *routput; guint iptr, optr; guint value; if ((input == NULL) || (ilength == 0) || (olength == NULL)) return NULL; if ((input[0] == '\0') || (ilength%4 != 0)) return NULL; output = g_malloc0(ilength*2+1); iptr = 0; optr = 0; while (iptr < ilength) { value = hex_to_dec(input+iptr, 4); if (value < 0x80) { if ((value <= 0x20) && (value != 0x0A) && (value != 0x0D)) { output[optr] = 0x20; } else { output[optr] = value; } optr += 1; } if ((value >= 0x80) && (value < 0x800)) { output[optr] = (value >> 6) | 0xC0; output[optr+1] = (value & 0x3F) | 0x80; optr += 2; } if ((value >= 0x800) && (value < 0xFFFF)) { output[optr] = ((value >> 12)) | 0xE0; output[optr+1] = ((value >> 6) & 0x3F) | 0x80; output[optr+2] = ((value) & 0x3F) | 0x80; optr += 3; } iptr += 4; } output[optr] = '\0'; routput = g_realloc(output, optr+1); if (routput != NULL) output = routput; *olength = optr; return output; } guchar *utf8_to_gsm7(const guchar *input, gsize ilength, gsize *olength) { guchar *output, *routput; guint iptr, optr; gushort x, value; if ((input == NULL) || (ilength == 0) || (olength == NULL)) return NULL; output = g_malloc0(ilength*2+1); if (output == NULL) return NULL; iptr = 0; optr = 0; while (iptr < ilength) { x = (iptr % 8) + 1; if (x < 8) { if ((iptr + 1) == ilength) { value = (input[iptr] >> (iptr % 8)) & 0xff; output[optr] = hextable[(guchar)(value & 0xff)/16]; output[optr+1] = hextable[(guchar)(value & 0xff)%16]; optr += 2; } else { value = (((input[iptr] >> (x - 1)) | (input[iptr+1] << (8 - x))) & 0xff) & 0xff; output[optr] = hextable[(guchar)(value & 0xff)/16]; output[optr+1] = hextable[(guchar)(value & 0xff)%16]; optr += 2; } } iptr++; } output[optr] = '\0'; routput = g_realloc(output, optr+1); if (routput != NULL) output = routput; *olength = optr; return output; } guchar *gsm7_to_utf8(const guchar *input, gsize ilength, gsize *olength) { guchar *output, *routput; guint iptr, optr; guint value, current, mask, next, left; if ((input == NULL) || (ilength == 0) || (olength == NULL)) return NULL; if ((input[0] == '\0') || (ilength%2 != 0)) return NULL; output = g_malloc0(ilength*4+1); if (output == NULL) return NULL; left = 7; mask = 0x7F; next = 0; iptr = 0; optr = 0; while (iptr < ilength) { if (mask != 0) { value = hex_to_dec(input+iptr, 2); current = (((value & mask) << (7 - left)) | next); next = (value & (~mask)) >> left; output[optr] = current; optr += 1; mask >>= 1; left -= 1; iptr += 2; } else { output[optr] = next; optr += 1; left = 7; mask = 0x7F; next = 0; } } output[optr] = '\0'; routput = g_realloc(output, optr+1); if (routput != NULL) output = routput; *olength = optr; return output; } guchar *utf8_map_gsm7(const guchar *input, gsize ilength, gsize *olength) { guchar *output, *routput; guint iptr, optr; guint value; guint i; gboolean detected, found; if ((input == NULL) || (ilength == 0) || (olength == NULL)) return NULL; if (input[0] == '\0') return NULL; output = g_malloc0(ilength*2+1); if (output == NULL) return NULL; iptr = 0; optr = 0; while (iptr < ilength) { detected = FALSE; if (input[iptr] <= 127) { value = input[iptr]; detected = TRUE; iptr += 1; } else if ((input[iptr] >= 194) && (input[iptr] <= 223)) { value = (((input[iptr] << 8) & 0xff00) | (input[iptr+1])) & 0xffff; detected = TRUE; iptr += 2; } else if ((input[iptr] >= 224) && (input[iptr] <= 239)) { value = ((((input[iptr] << 16) & 0xff0000) | ((input[iptr+1] << 8) & 0x00ff00)) | (input[iptr+2])) & 0xffffff; detected = TRUE; iptr += 3; } else if ((input[iptr] >= 240) && (input[iptr] <= 244)) { value = (((((input[iptr] << 24) & 0xff000000) | ((input[iptr+1] << 16) & 0x00ff0000)) | ((input[iptr+2] << 8) & 0x0000ff00)) | (input[iptr+3])) & 0xffffffff; detected = TRUE; iptr += 4; } if (detected) { found = FALSE; for (i=0; i<10; i++) { if (gsm7_utf8_ext_table[0][i] == value) { output[optr] = 0x1b; output[optr+1] = (unsigned char)gsm7_utf8_ext_table[1][i]; optr += 2; found = TRUE; } } if (!found) { for (i=0; i<128; i++) { if (gsm7_utf8_table[i] == value) { output[optr] = (unsigned char)i; optr += 1; found = TRUE; } } } if (!found) { output[optr] = 0x3f; optr += 1; } } } output[optr] = '\0'; routput = g_realloc(output, optr+1); if (routput != NULL) output = routput; *olength = optr; return output; } gchar *encoding_ussd_gsm7_to_ucs2(gchar *srcstr) { gchar *decstr1, *decstr2; gsize strsize; gboolean srcstrvalid; if (srcstr == NULL) return NULL; decstr1 = g_strdup(srcstr); strsize = strlen(srcstr); srcstrvalid = g_utf8_validate((const gchar *)srcstr, -1, (const gchar **)NULL); if (strsize > 0) { /*Map UTF8 symbols using GSM7 table*/ decstr2 = (gchar *)utf8_map_gsm7((const guchar *)decstr1, strsize, &strsize); if (decstr2 != NULL) { /*Free temporary string and go next step*/ g_free(decstr1); } else { /*Return undecoded hash*/ return decstr1; } /*Translate UTF8 to GSM7*/ decstr1 = (gchar *)utf8_to_gsm7((const guchar *)decstr2, strsize, &strsize); if (decstr1 != NULL) { /*Free temporary string and go next step*/ g_free(decstr2); } else { /*String not decoded*/ if (srcstrvalid) { /*Return valid source string*/ g_free(decstr2); return g_strdup(srcstr); } else { /*Return undecoded hash*/ return decstr2; } } /*Translate UCS2 to UTF8*/ decstr2 = (gchar *)ucs2_to_utf8((const guchar *)decstr1, strsize, &strsize); if (decstr2 != NULL) { if (g_utf8_validate((const gchar *)decstr2, -1, (const gchar **)NULL)) { /*Decoded string validated*/ g_free(decstr1); return decstr2; } else { /*Decoded string not validated*/ g_free(decstr2); if (srcstrvalid) { /*Return valid source string*/ g_free(decstr1); return g_strdup(srcstr); } else { /*Return undecoded hash*/ return decstr1; } } } else { /*String not decoded*/ if (srcstrvalid) { /*Return valid source string*/ g_free(decstr1); return g_strdup(srcstr); } else { /*Return undecoded hash*/ return decstr1; } } } return decstr1; } guchar *bcd_to_utf8_ascii_part(const guchar *input, gsize ilength, gsize *olength) { guchar *output, *routput; guint iptr, optr; guchar value; guchar buf[4]; if ((input == NULL) || (ilength == 0) || (olength == NULL)) return NULL; if (input[0] == '\0') return NULL; //Test if number decoded correctly for (iptr=0; iptr= 3)) { strncpy((char *)buf, (const char *)input+iptr, 3); value = (guchar)atoi((const char *)buf); if (value <= 127) { output[optr] = value; optr++; } iptr += 3; } else if (ilength - iptr >= 2) { strncpy((char *)buf, (const char *)input+iptr, 2); value = (guchar)atoi((const char *)buf); if (value >= 32) { output[optr] = value; optr++; } iptr += 2; } else { output[optr] = '?'; optr++; iptr++; } } else { break; } } output[optr] = '\0'; routput = g_realloc(output, optr+1); if (routput != NULL) output = routput; *olength = optr; return output; } gchar *encoding_unescape_xml_markup(const gchar *srcstr, gsize srclen) { guint iptr, optr, newlen, charleft; gchar *unescaped; /*XML escape characters: "<", ">", "&", """, "'", " ", " ", " " '<', '>', '&', '\"', '\'', '\r', '\t', '\n' */ if ((srcstr == NULL) || (srclen == 0)) return NULL; iptr = 0; newlen = 0; while (iptr < srclen) { if (srcstr[iptr] == '&') { charleft = srclen - iptr - 1; if (charleft >= 3) { if ((charleft >= 5) && (srcstr[iptr+1] == 'q') && (srcstr[iptr+2] == 'u') && (srcstr[iptr+3] == 'o') && (srcstr[iptr+4] == 't') && (srcstr[iptr+5] == ';')) { newlen += 1; iptr += 6; } else if ((charleft >= 5) && (srcstr[iptr+1] == 'a') && (srcstr[iptr+2] == 'p') && (srcstr[iptr+3] == 'o') && (srcstr[iptr+4] == 's') && (srcstr[iptr+5] == ';')) { newlen += 1; iptr += 6; } else if ((charleft >= 4) && (srcstr[iptr+1] == 'a') && (srcstr[iptr+2] == 'm') && (srcstr[iptr+3] == 'p') && (srcstr[iptr+4] == ';')) { newlen += 1; iptr += 5; } else if ((charleft >= 4) && (srcstr[iptr+1] == '#') && (srcstr[iptr+2] == 'x') && (srcstr[iptr+3] == 'D') && (srcstr[iptr+4] == ';')) { newlen += 1; iptr += 5; } else if ((charleft >= 4) && (srcstr[iptr+1] == '#') && (srcstr[iptr+2] == 'x') && (srcstr[iptr+3] == '9') && (srcstr[iptr+4] == ';')) { newlen += 1; iptr += 5; } else if ((charleft >= 4) && (srcstr[iptr+1] == '#') && (srcstr[iptr+2] == 'x') && (srcstr[iptr+3] == 'A') && (srcstr[iptr+4] == ';')) { newlen += 1; iptr += 5; } else if ((charleft >= 3) && (srcstr[iptr+1] == 'l') && (srcstr[iptr+2] == 't') && (srcstr[iptr+3] == ';')) { newlen += 1; iptr += 4; } else if ((charleft >= 3) && (srcstr[iptr+1] == 'g') && (srcstr[iptr+2] == 't') && (srcstr[iptr+3] == ';')) { newlen += 1; iptr += 4; } else { newlen += 1; iptr += 1; } } else { newlen += 1; iptr += 1; } } else { newlen += 1; iptr += 1; } } unescaped = g_malloc0(newlen+1); iptr = 0; optr = 0; newlen = 0; while (iptr < srclen) { if (srcstr[iptr] == '&') { charleft = srclen - iptr - 1; if (charleft >= 3) { if ((charleft >= 5) && (srcstr[iptr+1] == 'q') && (srcstr[iptr+2] == 'u') && (srcstr[iptr+3] == 'o') && (srcstr[iptr+4] == 't') && (srcstr[iptr+5] == ';')) { unescaped[optr] = '\"'; optr += 1; iptr += 6; } else if ((charleft >= 5) && (srcstr[iptr+1] == 'a') && (srcstr[iptr+2] == 'p') && (srcstr[iptr+3] == 'o') && (srcstr[iptr+4] == 's') && (srcstr[iptr+5] == ';')) { unescaped[optr] = '\''; optr += 1; iptr += 6; } else if ((charleft >= 4) && (srcstr[iptr+1] == 'a') && (srcstr[iptr+2] == 'm') && (srcstr[iptr+3] == 'p') && (srcstr[iptr+4] == ';')) { unescaped[optr] = '&'; optr += 1; iptr += 5; } else if ((charleft >= 4) && (srcstr[iptr+1] == '#') && (srcstr[iptr+2] == 'x') && (srcstr[iptr+3] == 'D') && (srcstr[iptr+4] == ';')) { unescaped[optr] = '\r'; optr += 1; iptr += 5; } else if ((charleft >= 4) && (srcstr[iptr+1] == '#') && (srcstr[iptr+2] == 'x') && (srcstr[iptr+3] == '9') && (srcstr[iptr+4] == ';')) { unescaped[optr] = '\t'; optr += 1; iptr += 5; } else if ((charleft >= 4) && (srcstr[iptr+1] == '#') && (srcstr[iptr+2] == 'x') && (srcstr[iptr+3] == 'A') && (srcstr[iptr+4] == ';')) { unescaped[optr] = '\n'; optr += 1; iptr += 5; } else if ((charleft >= 3) && (srcstr[iptr+1] == 'l') && (srcstr[iptr+2] == 't') && (srcstr[iptr+3] == ';')) { unescaped[optr] = '<'; optr += 1; iptr += 4; } else if ((charleft >= 3) && (srcstr[iptr+1] == 'g') && (srcstr[iptr+2] == 't') && (srcstr[iptr+3] == ';')) { unescaped[optr] = '>'; optr += 1; iptr += 4; } else { unescaped[optr] = srcstr[iptr]; optr += 1; iptr += 1; } } else { unescaped[optr] = srcstr[iptr]; optr += 1; iptr += 1; } } else { unescaped[optr] = srcstr[iptr]; optr += 1; iptr += 1; } } return unescaped; } gchar *encoding_clear_special_symbols(gchar *srcstr, gsize srclen) { guint iptr; if ((srcstr == NULL) || (srclen == 0)) return NULL; iptr = 0; while (iptr < srclen) { if (srcstr[iptr] > 0) { if ((srcstr[iptr] == '\n') || (srcstr[iptr] == '\r') || (srcstr[iptr] == '\t')) { srcstr[iptr] = ' '; } iptr += 1; } else { switch (srcstr[iptr] & 0xF0) { case 0xE0: iptr += 3; break; case 0xF0: iptr += 4; break; default: iptr += 2; break; } } } return srcstr; } modem-manager-gui-0.0.17.1/src/vcard.c0000644000175000017500000002540612375672222015746 0ustar alexalex/* * vcard.c * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include "mmguicore.h" #include "vcard.h" enum _mmgui_vcard_attribute { MMGUI_VCARD_ATTRIBUTE_BEGIN = 0, MMGUI_VCARD_ATTRIBUTE_END, MMGUI_VCARD_ATTRIBUTE_EMAIL, MMGUI_VCARD_ATTRIBUTE_FN, MMGUI_VCARD_ATTRIBUTE_N, MMGUI_VCARD_ATTRIBUTE_TEL, MMGUI_VCARD_ATTRIBUTE_UNKNOWN }; static gchar *vcard_unescape_value(const gchar *valuestr, gchar *strstart, gint attribute); static gchar *vcard_parse_attribute(const gchar *srcstr, gint attribute); static gchar *vcard_unescape_value(const gchar *valuestr, gchar *strstart, gint attribute) { gsize length, startlength; gint i, numchars; gchar *unescapedstr, *reallocstr; if (valuestr == NULL) return strstart; length = strlen(valuestr); if (length == 0) return strstart; i = 0; startlength = 0; numchars = 0; if (strstart != NULL) { startlength = strlen(strstart); /*Ignore space in new part of value*/ if (valuestr[0] == ' ') { i = 1; } } unescapedstr = g_malloc0(startlength + length + 1); while (valuestr[i] != '\0') { if (valuestr[i] == '\\') { /*Escaped character*/ switch (valuestr[i+1]) { /*Replace known sequence with single character*/ case 'n': unescapedstr[startlength+numchars] = '\n'; numchars++; i += 2; break; case 'r': unescapedstr[startlength+numchars++] = '\r'; numchars++; i += 2; break; case ',': case ';': case '\\': unescapedstr[startlength+numchars] = valuestr[i+1]; numchars++; i += 2; break; default: /*Unknown sequence - replace slash with space*/ unescapedstr[startlength+numchars] = ' '; numchars++; i++; break; } } else if (valuestr[i] == ';') { /*Delimiter*/ if ((valuestr[i+1] != ';') && (valuestr[i+1] != '\0')) { /*Value exists - delimiter must be replaced*/ unescapedstr[startlength+numchars] = ','; numchars++; i++; } else { /*No value - just skip delimiter*/ i++; } } else { /*Regular character - copy without change*/ if (attribute == MMGUI_VCARD_ATTRIBUTE_TEL) { /*Escape phone number*/ if ((isdigit(valuestr[i])) || ((i == 0) && (valuestr[i] == '+'))) { unescapedstr[startlength+numchars] = valuestr[i]; numchars++; } } else { /*Other attributes*/ unescapedstr[startlength+numchars] = valuestr[i]; numchars++; } i++; } } /*Terminate string*/ unescapedstr[startlength+numchars] = '\0'; if (numchars == 0) { /*String is empty*/ g_free(unescapedstr); return strstart; } /*Truncate string*/ if ((numchars + 1) < length) { reallocstr = g_realloc(unescapedstr, startlength + numchars + 1); if (reallocstr != NULL) { unescapedstr = reallocstr; } } /*Copy start fragment*/ memcpy(unescapedstr, strstart, startlength); return unescapedstr; } static gchar *vcard_parse_attribute(const gchar *srcstr, gint attribute) { gchar *valuestr; if (srcstr == NULL) return NULL; valuestr = strchr(srcstr, ':'); if (valuestr == NULL) return NULL; return vcard_unescape_value(valuestr + 1, NULL, attribute); } gint vcard_parse_string(const gchar *srcstr, GSList **contacts, gchar *group) { guint numcontacts, strnum; gchar **strings; GSList *vcardrows; if ((srcstr == NULL) || (contacts == NULL)) return 0; /*Split string by line delimeters*/ strings = g_strsplit(srcstr, "\r\n", 0); /*String is empty*/ if (strings == NULL) return 0; /*Linked list with rows*/ strnum = 0; vcardrows = NULL; while (strings[strnum] != NULL) { if (strings[strnum][0] != '\0') { vcardrows = g_slist_prepend(vcardrows, strings[strnum]); } strnum++; } numcontacts = 0; if (vcardrows != NULL) { /*Reverse linked list*/ vcardrows = g_slist_reverse(vcardrows); /*Parse contacts*/ numcontacts = vcard_parse_list(vcardrows, contacts, group); } /*Free string array*/ g_strfreev(strings); return numcontacts; } gint vcard_parse_list(GSList *vcardrows, GSList **contacts, gchar *group) { guint numcontacts; GSList *iterator; gchar *value, *row; gint curattribute; mmgui_contact_t contact; if ((vcardrows == NULL) || (contacts == NULL)) return 0; numcontacts = 0; contact = NULL; curattribute = MMGUI_VCARD_ATTRIBUTE_UNKNOWN; for (iterator = vcardrows; iterator != NULL; iterator = iterator->next) { row = (gchar *)iterator->data; if (row != NULL) { if ((row[0] != '\0') && (row[0] != '\r') && (row[0] != '\n')) { if (strchr(row, ':') == NULL) { /*String break*/ if (contact != NULL) { switch (curattribute) { /*Concatenate row*/ case MMGUI_VCARD_ATTRIBUTE_EMAIL: contact->email = vcard_unescape_value(row, contact->email, curattribute); break; case MMGUI_VCARD_ATTRIBUTE_FN: if (contact->name != NULL) { contact->name = vcard_unescape_value(row, contact->name, curattribute); } else if (contact->name2 == NULL) { contact->name2 = vcard_unescape_value(row, contact->name2, curattribute); } break; case MMGUI_VCARD_ATTRIBUTE_N: if (contact->name2 != NULL) { contact->name2 = vcard_unescape_value(row, contact->name2, curattribute); } else if (contact->name2 == NULL) { contact->name = vcard_unescape_value(row, contact->name, curattribute); } break; case MMGUI_VCARD_ATTRIBUTE_TEL: if (contact->number == NULL) { contact->number = vcard_unescape_value(row, contact->number, curattribute); } else if (contact->number2 == NULL) { contact->number2 = vcard_unescape_value(row, contact->number2, curattribute); } break; /*Do nothing*/ case MMGUI_VCARD_ATTRIBUTE_BEGIN: case MMGUI_VCARD_ATTRIBUTE_END: case MMGUI_VCARD_ATTRIBUTE_UNKNOWN: default: break; } } } else { /*New attribute*/ switch (row[0]) { case 'b': case 'B': if (g_ascii_strcasecmp((const gchar *)row, "BEGIN:VCARD") == 0) { /*VCard beginning*/ curattribute = MMGUI_VCARD_ATTRIBUTE_BEGIN; contact = g_new0(struct _mmgui_contact, 1); contact->id = numcontacts; /*Full name of the contact*/ contact->name = NULL; /*Telephone number*/ contact->number = NULL; /*Email address*/ contact->email = NULL; /*Group this contact belongs to*/ contact->group = g_strdup(group); /*Additional contact name*/ contact->name2 = NULL; /*Additional contact telephone number*/ contact->number2 = NULL; /*Boolean flag to specify whether this entry is hidden or not*/ contact->hidden = FALSE; /*Phonebook in which the contact is stored*/ contact->storage = MMGUI_MODEM_CONTACTS_STORAGE_ME; } break; case 'e': case 'E': if (g_ascii_strcasecmp((const gchar *)row, "END:VCARD") == 0) { /*VCard ending*/ curattribute = MMGUI_VCARD_ATTRIBUTE_END; if (contact != NULL) { if (((contact->name != NULL) || (contact->email != NULL) || (contact->name2 != NULL)) && ((contact->number != NULL) || (contact->number2 != NULL))) { /*Set primary name*/ if (contact->name == NULL) { if (contact->email != NULL) { contact->name = g_strdup(contact->email); } else if (contact->name2 != NULL) { contact->name = g_strdup(contact->name2); } } /*Add contact to list*/ *contacts = g_slist_prepend(*contacts, contact); numcontacts++; } else { /*Free contact data*/ if (contact->name != NULL) { g_free(contact->name); } if (contact->number != NULL) { g_free(contact->number); } if (contact->email != NULL) { g_free(contact->email); } if (contact->group != NULL) { g_free(contact->group); } if (contact->name2 != NULL) { g_free(contact->name2); } if (contact->number2 != NULL) { g_free(contact->number2); } g_free(contact); } } } else if (g_ascii_strncasecmp((const gchar *)row, "EMAIL", 5) == 0) { /*Email*/ curattribute = MMGUI_VCARD_ATTRIBUTE_EMAIL; contact->email = vcard_parse_attribute(row, MMGUI_VCARD_ATTRIBUTE_EMAIL); } break; case 'f': case 'F': if (g_ascii_strncasecmp((const gchar *)row, "FN:", 3) == 0) { /*Formatted name*/ curattribute = MMGUI_VCARD_ATTRIBUTE_FN; value = vcard_parse_attribute(row, MMGUI_VCARD_ATTRIBUTE_FN); if (value != NULL) { if (contact->name == NULL) { contact->name = value; } else if (contact->name2 == NULL) { contact->name2 = value; } } } break; case 'n': case 'N': if (g_ascii_strncasecmp((const gchar *)row, "N:", 2) == 0) { /*Name*/ curattribute = MMGUI_VCARD_ATTRIBUTE_N; value = vcard_parse_attribute(row, MMGUI_VCARD_ATTRIBUTE_N); if (value != NULL) { if (contact->name2 == NULL) { contact->name2 = value; } else if (contact->name == NULL) { contact->name = value; } } } break; case 't': case 'T': if (g_ascii_strncasecmp((const gchar *)row, "TEL", 3) == 0) { /*Telephone*/ curattribute = MMGUI_VCARD_ATTRIBUTE_TEL; value = vcard_parse_attribute(row, MMGUI_VCARD_ATTRIBUTE_TEL); if (value != NULL) { if (contact->number == NULL) { contact->number = value; } else if (contact->number2 == NULL) { contact->number2 = value; } } } break; default: /*Unknown entry*/ curattribute = MMGUI_VCARD_ATTRIBUTE_UNKNOWN; break; } } } } } /*Reverse list if contacts found*/ if (numcontacts > 0) { *contacts = g_slist_reverse(*contacts); } return numcontacts; } modem-manager-gui-0.0.17.1/src/info-page.h0000644000175000017500000000270512370003504016500 0ustar alexalex/* * info-page.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __INFO_PAGE_H__ #define __INFO_PAGE_H__ #include #include "main.h" //INFO void mmgui_main_info_update_for_modem(mmgui_application_t mmguiapp); void mmgui_main_info_handle_signal_level_change(mmgui_application_t mmguiapp, mmguidevice_t device); void mmgui_main_info_handle_network_mode_change(mmgui_application_t mmguiapp, mmguidevice_t device); void mmgui_main_info_handle_network_registration_change(mmgui_application_t mmguiapp, mmguidevice_t device); void mmgui_main_info_handle_location_change(mmgui_application_t mmguiapp, mmguidevice_t device); void mmgui_main_info_state_clear(mmgui_application_t mmguiapp); #endif /* __INFO_PAGE_H__ */ modem-manager-gui-0.0.17.1/src/contacts-page.h0000644000175000017500000000447412375674340017411 0ustar alexalex/* * contacts-page.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __CONTACTS_PAGE_H__ #define __CONTACTS_PAGE_H__ #include #include "main.h" enum _mmgui_main_contactslist_columns { MMGUI_MAIN_CONTACTSLIST_NAME = 0, MMGUI_MAIN_CONTACTSLIST_NUMBER, MMGUI_MAIN_CONTACTSLIST_EMAIL, MMGUI_MAIN_CONTACTSLIST_GROUP, MMGUI_MAIN_CONTACTSLIST_NAME2, MMGUI_MAIN_CONTACTSLIST_NUMBER2, MMGUI_MAIN_CONTACTSLIST_HIDDEN, MMGUI_MAIN_CONTACTSLIST_STORAGE, MMGUI_MAIN_CONTACTSLIST_ID, MMGUI_MAIN_CONTACTSLIST_TYPE, MMGUI_MAIN_CONTACTSLIST_COLUMNS }; enum _mmgui_main_contact_type { MMGUI_MAIN_CONTACT_UNKNOWN = 0, MMGUI_MAIN_CONTACT_HEADER, MMGUI_MAIN_CONTACT_MODEM, MMGUI_MAIN_CONTACT_GNOME, MMGUI_MAIN_CONTACT_KDE }; //CONTACTS void mmgui_main_contacts_sms(mmgui_application_t mmguiapp); void mmgui_main_contacts_sms_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_contacts_new(mmgui_application_t mmguiapp); void mmgui_main_contacts_new_button_clicked_signal(GObject *object, gpointer user_data); void mmgui_main_contacts_remove(mmgui_application_t mmguiapp); void mmgui_main_contacts_remove_button_clicked_signal(GObject *object, gpointer user_data); void mmgui_main_contacts_list_fill(mmgui_application_t mmguiapp); void mmgui_main_contacts_addressbook_list_fill(mmgui_application_t mmguiapp, guint contacttype); void mmgui_main_contacts_load_from_system_addressbooks(mmgui_application_t mmguiapp); void mmgui_main_contacts_list_init(mmgui_application_t mmguiapp); void mmgui_main_contacts_state_clear(mmgui_application_t mmguiapp); #endif /* __CONTACTS_PAGE_H__ */ modem-manager-gui-0.0.17.1/src/info-page.c0000644000175000017500000001543112374476214016513 0ustar alexalex/* * info-page.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "strformat.h" #include "mmguicore.h" #include "resources.h" #include "info-page.h" #include "main.h" //INFO void mmgui_main_info_update_for_modem(mmgui_application_t mmguiapp) { mmguidevice_t device; gchar buffer[256]; guint locationcaps; if (mmguiapp == NULL) return; device = mmguicore_devices_get_current(mmguiapp->core); locationcaps = mmguicore_location_get_capabilities(mmguiapp->core); if (device != NULL) { /*Device*/ g_snprintf(buffer, sizeof(buffer), "%s %s (%s)", device->manufacturer, device->model, device->port); gtk_label_set_label(GTK_LABEL(mmguiapp->window->devicevlabel), buffer); /*Operator name*/ gtk_label_set_label(GTK_LABEL(mmguiapp->window->operatorvlabel), device->operatorname); /*Operator code*/ gtk_label_set_label(GTK_LABEL(mmguiapp->window->operatorcodevlabel), mmgui_str_format_operator_code(device->operatorcode, device->type, buffer, sizeof(buffer))); /*Registration state*/ gtk_label_set_label(GTK_LABEL(mmguiapp->window->regstatevlabel), mmgui_str_format_reg_status(device->regstatus)); /*Network mode*/ gtk_label_set_label(GTK_LABEL(mmguiapp->window->modevlabel), mmgui_str_format_mode_string(device->mode)); /*IMEI*/ gtk_label_set_label(GTK_LABEL(mmguiapp->window->imeivlabel), device->imei); /*IMSI*/ gtk_label_set_label(GTK_LABEL(mmguiapp->window->imsivlabel), device->imsi); /*Signal level*/ g_snprintf(buffer, sizeof(buffer), "%u%%", device->siglevel); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(mmguiapp->window->signallevelprogressbar), buffer); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(mmguiapp->window->signallevelprogressbar), device->siglevel/100.0); /*Location*/ if (locationcaps & MMGUI_LOCATION_CAPS_3GPP) { memset(buffer, 0, sizeof(buffer)); g_snprintf(buffer, sizeof(buffer), "%u/%u/%u/%u/%u", device->loc3gppdata[0], device->loc3gppdata[1], device->loc3gppdata[2], (device->loc3gppdata[3] >> 16) & 0x0000ffff, device->loc3gppdata[3] & 0x0000ffff); gtk_label_set_label(GTK_LABEL(mmguiapp->window->info3gpplocvlabel), buffer); } else { gtk_label_set_label(GTK_LABEL(mmguiapp->window->info3gpplocvlabel), _("Not supported")); } if (locationcaps & MMGUI_LOCATION_CAPS_GPS) { memset(buffer, 0, sizeof(buffer)); g_snprintf(buffer, sizeof(buffer), "%3.2f/%3.2f/%3.2f", device->locgpsdata[0], device->locgpsdata[1], device->locgpsdata[2]); gtk_label_set_label(GTK_LABEL(mmguiapp->window->infogpslocvlabel), buffer); } else { gtk_label_set_label(GTK_LABEL(mmguiapp->window->infogpslocvlabel), _("Not supported")); } } } void mmgui_main_info_handle_signal_level_change(mmgui_application_t mmguiapp, mmguidevice_t device) { gchar strbuf[256]; if ((mmguiapp == NULL) || (device == NULL)) return; g_snprintf(strbuf, sizeof(strbuf), "%u%%", device->siglevel); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(mmguiapp->window->signallevelprogressbar), strbuf); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(mmguiapp->window->signallevelprogressbar), device->siglevel/100.0); } void mmgui_main_info_handle_network_mode_change(mmgui_application_t mmguiapp, mmguidevice_t device) { if ((mmguiapp == NULL) || (device == NULL)) return; gtk_label_set_label(GTK_LABEL(mmguiapp->window->modevlabel), mmgui_str_format_mode_string(device->mode)); } void mmgui_main_info_handle_network_registration_change(mmgui_application_t mmguiapp, mmguidevice_t device) { guint setpage; gchar buffer[256]; if ((mmguiapp == NULL) || (device == NULL)) return; gtk_label_set_label(GTK_LABEL(mmguiapp->window->operatorvlabel), device->operatorname); gtk_label_set_label(GTK_LABEL(mmguiapp->window->operatorcodevlabel), mmgui_str_format_operator_code(device->operatorcode, device->type, buffer, sizeof(buffer))); gtk_label_set_label(GTK_LABEL(mmguiapp->window->regstatevlabel), mmgui_str_format_reg_status(device->regstatus)); /*Update current page state*/ setpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(mmguiapp->window->notebook)); mmgui_main_ui_test_device_state(mmguiapp, setpage); } void mmgui_main_info_handle_location_change(mmgui_application_t mmguiapp, mmguidevice_t device) { gchar buffer[256]; guint locationcaps; if ((mmguiapp == NULL) || (device == NULL)) return; locationcaps = mmguicore_location_get_capabilities(mmguiapp->core); if (locationcaps & MMGUI_LOCATION_CAPS_3GPP) { memset(buffer, 0, sizeof(buffer)); g_snprintf(buffer, sizeof(buffer), "%u/%u/%u/%u/%u", device->loc3gppdata[0], device->loc3gppdata[1], device->loc3gppdata[2], (device->loc3gppdata[3] >> 16) & 0x0000ffff, device->loc3gppdata[3] & 0x0000ffff); gtk_label_set_label(GTK_LABEL(mmguiapp->window->info3gpplocvlabel), buffer); } else { gtk_label_set_label(GTK_LABEL(mmguiapp->window->info3gpplocvlabel), _("Not supported")); } if (locationcaps & MMGUI_LOCATION_CAPS_GPS) { memset(buffer, 0, sizeof(buffer)); g_snprintf(buffer, sizeof(buffer), "%2.3f/%2.3f/%2.3f", device->locgpsdata[0], device->locgpsdata[1], device->locgpsdata[2]); gtk_label_set_label(GTK_LABEL(mmguiapp->window->infogpslocvlabel), buffer); } else { gtk_label_set_label(GTK_LABEL(mmguiapp->window->infogpslocvlabel), _("Not supported")); } } void mmgui_main_info_state_clear(mmgui_application_t mmguiapp) { /*Clear 'Info' page fields*/ gtk_label_set_text(GTK_LABEL(mmguiapp->window->devicevlabel), ""); gtk_label_set_text(GTK_LABEL(mmguiapp->window->operatorvlabel), ""); gtk_label_set_text(GTK_LABEL(mmguiapp->window->modevlabel), ""); gtk_label_set_text(GTK_LABEL(mmguiapp->window->imeivlabel), ""); gtk_label_set_text(GTK_LABEL(mmguiapp->window->imsivlabel), ""); gtk_label_set_text(GTK_LABEL(mmguiapp->window->info3gpplocvlabel), ""); gtk_label_set_text(GTK_LABEL(mmguiapp->window->infogpslocvlabel), ""); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(mmguiapp->window->signallevelprogressbar), ""); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(mmguiapp->window->signallevelprogressbar), 0.0); } modem-manager-gui-0.0.17.1/src/contacts-page.c0000644000175000017500000006351412375674450017406 0ustar alexalex/* * contacts-page.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "mmguicore.h" #include "resources.h" #include "sms-page.h" #include "contacts-page.h" #include "main.h" static mmgui_contact_t mmgui_main_contacts_list_get_selected(mmgui_application_t mmguiapp, guint *type); static void mmgui_main_contacts_list_cursor_changed_signal(GtkTreeView *tree_view, gpointer data); static void mmgui_main_contacts_sms_menu_activate_signal(GtkMenuItem *menuitem, gpointer data); static void mmgui_main_contacts_dialog_entry_changed_signal(GtkEditable *editable, gpointer data); /*CONTACTS*/ static mmgui_contact_t mmgui_main_contacts_list_get_selected(mmgui_application_t mmguiapp, guint *type) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; guint id, contacttype; mmgui_contact_t contact; if (mmguiapp == NULL) return NULL; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); contact = NULL; if ((model != NULL) && (selection != NULL)) { if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_CONTACTSLIST_ID, &id, MMGUI_MAIN_CONTACTSLIST_TYPE, &contacttype, -1); if (contacttype != MMGUI_MAIN_CONTACT_HEADER) { if (contacttype == MMGUI_MAIN_CONTACT_MODEM) { //Contact from modem contact = mmguicore_contacts_get(mmguiapp->core, id); } else if (contacttype == MMGUI_MAIN_CONTACT_GNOME) { //Contact from GNOME addressbook contact = mmgui_addressbooks_get_gnome_contact(mmguiapp->addressbooks, id); } else if (contacttype == MMGUI_MAIN_CONTACT_KDE) { //Contact from KDE addressbook contact = mmgui_addressbooks_get_kde_contact(mmguiapp->addressbooks, id); } } //Set contact type if needed if (type != NULL) *(type) = contacttype; } else { if (type != NULL) *(type) = MMGUI_MAIN_CONTACT_UNKNOWN; } } else { if (type != NULL) *(type) = MMGUI_MAIN_CONTACT_UNKNOWN; } return contact; } static void mmgui_main_contacts_list_cursor_changed_signal(GtkTreeView *tree_view, gpointer data) { mmgui_application_t mmguiapp; mmgui_contact_t contact; guint contactscaps; gboolean validated; GtkWidget *menu_sms1, *menu_sms2; guint contacttype; static struct _mmgui_application_data appdata[2]; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; validated = FALSE; contacttype = MMGUI_MAIN_CONTACT_UNKNOWN; contact = mmgui_main_contacts_list_get_selected(mmguiapp, &contacttype); if ((contact != NULL) && (contacttype != MMGUI_MAIN_CONTACT_UNKNOWN)) { if (contacttype != MMGUI_MAIN_CONTACT_HEADER) { //Destroy old menu if (mmguiapp->window->contactssmsmenu != NULL) { gtk_widget_destroy(mmguiapp->window->contactssmsmenu); mmguiapp->window->contactssmsmenu = NULL; } //Create new menu mmguiapp->window->contactssmsmenu = gtk_menu_new(); //Contacts numbers validation if ((contact->number != NULL) && (mmguicore_sms_validate_number((const gchar *)contact->number))) { menu_sms1 = gtk_menu_item_new_with_label(contact->number); gtk_menu_shell_append(GTK_MENU_SHELL(mmguiapp->window->contactssmsmenu), menu_sms1); appdata[0].mmguiapp = mmguiapp; appdata[0].data = GINT_TO_POINTER(0); g_signal_connect(G_OBJECT(menu_sms1), "activate", G_CALLBACK(mmgui_main_contacts_sms_menu_activate_signal), &(appdata[0])); validated = TRUE; } if ((contact->number2 != NULL) && (mmguicore_sms_validate_number((const gchar *)contact->number2))) { menu_sms2 = gtk_menu_item_new_with_label(contact->number2); gtk_menu_shell_append(GTK_MENU_SHELL(mmguiapp->window->contactssmsmenu), menu_sms2); appdata[1].mmguiapp = mmguiapp; appdata[1].data = GINT_TO_POINTER(1); g_signal_connect(G_OBJECT(menu_sms2), "activate", G_CALLBACK(mmgui_main_contacts_sms_menu_activate_signal), &(appdata[1])); validated = TRUE; } //Set buttons state if (validated) { contactscaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if ((contactscaps & MMGUI_CONTACTS_CAPS_EDIT) && (contacttype == MMGUI_MAIN_CONTACT_MODEM)) { gtk_widget_set_sensitive(mmguiapp->window->removecontactbutton, TRUE); } else { gtk_widget_set_sensitive(mmguiapp->window->removecontactbutton, FALSE); } gtk_widget_set_sensitive(mmguiapp->window->smstocontactbutton, TRUE); //Show menu if contact data validated gtk_widget_show_all(GTK_WIDGET(mmguiapp->window->contactssmsmenu)); gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(mmguiapp->window->smstocontactbutton), mmguiapp->window->contactssmsmenu); } else { gtk_widget_set_sensitive(mmguiapp->window->removecontactbutton, FALSE); gtk_widget_set_sensitive(mmguiapp->window->smstocontactbutton, FALSE); } } } else if (contacttype == MMGUI_MAIN_CONTACT_HEADER) { //Header selected gtk_widget_set_sensitive(mmguiapp->window->removecontactbutton, FALSE); gtk_widget_set_sensitive(mmguiapp->window->smstocontactbutton, FALSE); } } void mmgui_main_contacts_sms(mmgui_application_t mmguiapp) { mmgui_contact_t contact; gchar *number; guint smscaps, contacttype; if (mmguiapp == NULL) return; smscaps = mmguicore_sms_get_capabilities(mmguiapp->core); if (!(smscaps & MMGUI_SMS_CAPS_SEND)) return; number = NULL; contacttype = MMGUI_MAIN_CONTACT_UNKNOWN; contact = mmgui_main_contacts_list_get_selected(mmguiapp, &contacttype); if ((contact != NULL) && (contacttype != MMGUI_MAIN_CONTACT_UNKNOWN)) { //Find apporitate number if (contact->number != NULL) { number = contact->number; } else if (contact->number2 != NULL) { number = contact->number2; } //Switch to SMS page and send message if (number != NULL) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->smsbutton), TRUE); mmgui_main_sms_send(mmguiapp, number, ""); } } } void mmgui_main_contacts_sms_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_contacts_sms(mmguiapp); } static void mmgui_main_contacts_sms_menu_activate_signal(GtkMenuItem *menuitem, gpointer data) { mmgui_application_data_t appdata; mmgui_contact_t contact; guint contacttype; appdata = (mmgui_application_data_t)data; if (appdata == NULL) return; contacttype = MMGUI_MAIN_CONTACT_UNKNOWN; contact = mmgui_main_contacts_list_get_selected(appdata->mmguiapp, &contacttype); if ((contact != NULL) && (contacttype != MMGUI_MAIN_CONTACT_UNKNOWN)) { if ((GPOINTER_TO_INT(appdata->data) == 0) && (contact->number != NULL)) { //First number: switch to SMS page and send message if number found gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(appdata->mmguiapp->window->smsbutton), TRUE); mmgui_main_sms_send(appdata->mmguiapp, contact->number, ""); } else if ((GPOINTER_TO_INT(appdata->data) == 1) && (contact->number2 != NULL)) { //Second number: switch to SMS page and send message if number found gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(appdata->mmguiapp->window->smsbutton), TRUE); mmgui_main_sms_send(appdata->mmguiapp, contact->number2, ""); } } } static void mmgui_main_contacts_dialog_entry_changed_signal(GtkEditable *editable, gpointer data) { mmgui_application_t mmguiapp; guint16 namelen, numberlen, number2len; const gchar *number, *number2; gboolean valid; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; namelen = gtk_entry_get_text_length(GTK_ENTRY(mmguiapp->window->contactnameentry)); numberlen = gtk_entry_get_text_length(GTK_ENTRY(mmguiapp->window->contactnumberentry)); number2len = gtk_entry_get_text_length(GTK_ENTRY(mmguiapp->window->contactnumber2entry)); if ((namelen == 0) || (numberlen == 0)) { gtk_widget_set_sensitive(mmguiapp->window->newcontactaddbutton, FALSE); } else { valid = TRUE; //Number2 validation if (number2len > 0) { number2 = gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactnumber2entry)); if (!mmguicore_sms_validate_number(number2)) { valid = FALSE; } } //Number validation if (valid) { number = gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactnumberentry)); if (!mmguicore_sms_validate_number(number)) { valid = FALSE; } } //Set state of add button if (valid) { gtk_widget_set_sensitive(mmguiapp->window->newcontactaddbutton, TRUE); } else { gtk_widget_set_sensitive(mmguiapp->window->newcontactaddbutton, FALSE); } } } void mmgui_main_contacts_new(mmgui_application_t mmguiapp) { guint contactscaps; gboolean extsensitive; gulong editsignal[3]; gint response; mmgui_contact_t contact; GtkTreeModel *model; GtkTreeIter iter, child; if (mmguiapp == NULL) return; contactscaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if (!(contactscaps & MMGUI_CONTACTS_CAPS_EDIT)) return; /*Capabilities*/ extsensitive = (gboolean)(contactscaps & MMGUI_CONTACTS_CAPS_EXTENDED); gtk_widget_set_sensitive(mmguiapp->window->contactemailentry, extsensitive); gtk_widget_set_sensitive(mmguiapp->window->contactgroupentry, extsensitive); gtk_widget_set_sensitive(mmguiapp->window->contactname2entry, extsensitive); gtk_widget_set_sensitive(mmguiapp->window->contactnumber2entry, extsensitive); /*Clear entries*/ gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->contactnameentry), ""); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->contactnumberentry), ""); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->contactemailentry), ""); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->contactgroupentry), ""); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->contactname2entry), ""); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->contactnumber2entry), ""); /*Bind signals*/ editsignal[0] = g_signal_connect(G_OBJECT(mmguiapp->window->contactnameentry), "changed", G_CALLBACK(mmgui_main_contacts_dialog_entry_changed_signal), mmguiapp); editsignal[1] = g_signal_connect(G_OBJECT(mmguiapp->window->contactnumberentry), "changed", G_CALLBACK(mmgui_main_contacts_dialog_entry_changed_signal), mmguiapp); editsignal[2] = g_signal_connect(G_OBJECT(mmguiapp->window->contactnumber2entry), "changed", G_CALLBACK(mmgui_main_contacts_dialog_entry_changed_signal), mmguiapp); g_signal_emit_by_name(G_OBJECT(mmguiapp->window->contactnameentry), "changed"); /*Run dialog*/ response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->newcontactdialog)); /*Unbind signals*/ g_signal_handler_disconnect(G_OBJECT(mmguiapp->window->contactnameentry), editsignal[0]); g_signal_handler_disconnect(G_OBJECT(mmguiapp->window->contactnumberentry), editsignal[1]); g_signal_handler_disconnect(G_OBJECT(mmguiapp->window->contactnumber2entry), editsignal[2]); gtk_widget_hide(mmguiapp->window->newcontactdialog); /*Add contact*/ if (response) { /*Form contact*/ contact = (mmgui_contact_t)g_new0(struct _mmgui_contact, 1); contact->name = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactnameentry))); contact->number = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactnumberentry))); contact->email = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactemailentry))); contact->group = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactgroupentry))); contact->name2 = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactname2entry))); contact->number2 = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->contactnumber2entry))); contact->hidden = FALSE; contact->storage = 0; /*Add to device*/ if (mmguicore_contacts_add(mmguiapp->core, contact)) { /*Add to list*/ model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); if (model != NULL) { gtk_tree_model_get_iter(model, &iter, mmguiapp->window->contmodempath); gtk_tree_store_append(GTK_TREE_STORE(model), &child, &iter); gtk_tree_store_set(GTK_TREE_STORE(model), &child, MMGUI_MAIN_CONTACTSLIST_NAME, contact->name, MMGUI_MAIN_CONTACTSLIST_NUMBER, contact->number, MMGUI_MAIN_CONTACTSLIST_EMAIL, contact->email, MMGUI_MAIN_CONTACTSLIST_GROUP, contact->group, MMGUI_MAIN_CONTACTSLIST_NAME2, contact->name2, MMGUI_MAIN_CONTACTSLIST_NUMBER2, contact->number2, MMGUI_MAIN_CONTACTSLIST_HIDDEN, contact->hidden, MMGUI_MAIN_CONTACTSLIST_STORAGE, contact->storage, MMGUI_MAIN_CONTACTSLIST_ID, contact->id, MMGUI_MAIN_CONTACTSLIST_TYPE, MMGUI_MAIN_CONTACT_MODEM, -1); } } else { /*Can not add, free resources*/ mmguicore_contacts_free_single(contact, TRUE); mmgui_main_ui_error_dialog_open(mmguiapp, _("Error adding contact"), mmguicore_get_last_error(mmguiapp->core)); } } } void mmgui_main_contacts_new_button_clicked_signal(GObject *object, gpointer user_data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)user_data; if (mmguiapp == NULL) return; mmgui_main_contacts_new(mmguiapp); } void mmgui_main_contacts_remove(mmgui_application_t mmguiapp) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; guint id, contacttype, contactcaps; if (mmguiapp == NULL) return; contactcaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if (!(contactcaps & MMGUI_CONTACTS_CAPS_EDIT)) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); if ((model != NULL) && (selection != NULL)) { if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_CONTACTSLIST_ID, &id, MMGUI_MAIN_CONTACTSLIST_TYPE, &contacttype, -1); if (contacttype == MMGUI_MAIN_CONTACT_MODEM) { if (mmgui_main_ui_question_dialog_open(mmguiapp, _("Remove contact"), _("Really want to remove contact?"))) { if (mmguicore_contacts_delete(mmguiapp->core, id)) { gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error removing contact"), _("Contact not removed from device")); } } } } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error removing contact"), _("Contact not selected")); } } } void mmgui_main_contacts_remove_button_clicked_signal(GObject *object, gpointer user_data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)user_data; if (mmguiapp == NULL) return; mmgui_main_contacts_remove(mmguiapp); } void mmgui_main_contacts_list_fill(mmgui_application_t mmguiapp) { guint contactscaps; GSList *contacts; GtkTreeModel *model; GtkTreeIter iter, child; GSList *iterator; mmgui_contact_t contact; if (mmguiapp == NULL) return; contactscaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if (contactscaps & MMGUI_CONTACTS_CAPS_EXPORT) { contacts = mmguicore_contacts_list(mmguiapp->core); model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); if (model != NULL) { gtk_tree_store_insert(GTK_TREE_STORE(model), &iter, NULL, 0); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, MMGUI_MAIN_CONTACTSLIST_NAME, _("Modem contacts"), MMGUI_MAIN_CONTACTSLIST_ID, 0, MMGUI_MAIN_CONTACTSLIST_TYPE, MMGUI_MAIN_CONTACT_HEADER, -1); mmguiapp->window->contmodempath = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); if (contacts != NULL) { //Add contacts gtk_tree_model_get_iter(model, &iter, mmguiapp->window->contmodempath); for (iterator=contacts; iterator; iterator=iterator->next) { contact = iterator->data; gtk_tree_store_append(GTK_TREE_STORE(model), &child, &iter); gtk_tree_store_set(GTK_TREE_STORE(model), &child, MMGUI_MAIN_CONTACTSLIST_NAME, contact->name, MMGUI_MAIN_CONTACTSLIST_NUMBER, contact->number, MMGUI_MAIN_CONTACTSLIST_EMAIL, contact->email, MMGUI_MAIN_CONTACTSLIST_GROUP, contact->group, MMGUI_MAIN_CONTACTSLIST_NAME2, contact->name2, MMGUI_MAIN_CONTACTSLIST_NUMBER2, contact->number2, MMGUI_MAIN_CONTACTSLIST_HIDDEN, contact->hidden, MMGUI_MAIN_CONTACTSLIST_STORAGE, contact->storage, MMGUI_MAIN_CONTACTSLIST_ID, contact->id, MMGUI_MAIN_CONTACTSLIST_TYPE, MMGUI_MAIN_CONTACT_MODEM, -1); } } gtk_tree_view_expand_all(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); } } } void mmgui_main_contacts_addressbook_list_fill(mmgui_application_t mmguiapp, guint contacttype) { GSList *contacts; GtkTreeModel *model; GtkTreeIter iter, child; GSList *iterator; mmgui_contact_t contact; if (mmguiapp == NULL) return; contacts = NULL; if ((contacttype == MMGUI_MAIN_CONTACT_GNOME) && (mmguiapp->window->contgnomepath != NULL)) { //Contacts from GNOME addressbook if (mmgui_addressbooks_get_gnome_contacts_available(mmguiapp->addressbooks)) { contacts = mmgui_addressbooks_get_gnome_contacts_list(mmguiapp->addressbooks); } } else if (contacttype == MMGUI_MAIN_CONTACT_KDE) { //Contacts from KDE addressbook if (mmgui_addressbooks_get_kde_contacts_available(mmguiapp->addressbooks)) { contacts = mmgui_addressbooks_get_kde_contacts_list(mmguiapp->addressbooks); } } if (contacts != NULL) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); if (model != NULL) { g_object_ref(model); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), NULL); //Get patrent iterator if (contacttype == MMGUI_MAIN_CONTACT_GNOME) { gtk_tree_model_get_iter(model, &iter, mmguiapp->window->contgnomepath); } else if (contacttype == MMGUI_MAIN_CONTACT_KDE) { gtk_tree_model_get_iter(model, &iter, mmguiapp->window->contkdepath); } //Add contacts for (iterator=contacts; iterator; iterator=iterator->next) { contact = iterator->data; gtk_tree_store_append(GTK_TREE_STORE(model), &child, &iter); gtk_tree_store_set(GTK_TREE_STORE(model), &child, MMGUI_MAIN_CONTACTSLIST_NAME, contact->name, MMGUI_MAIN_CONTACTSLIST_NUMBER, contact->number, MMGUI_MAIN_CONTACTSLIST_EMAIL, contact->email, MMGUI_MAIN_CONTACTSLIST_GROUP, contact->group, MMGUI_MAIN_CONTACTSLIST_NAME2, contact->name2, MMGUI_MAIN_CONTACTSLIST_NUMBER2, contact->number2, MMGUI_MAIN_CONTACTSLIST_HIDDEN, contact->hidden, MMGUI_MAIN_CONTACTSLIST_STORAGE, contact->storage, MMGUI_MAIN_CONTACTSLIST_ID, contact->id, MMGUI_MAIN_CONTACTSLIST_TYPE, contacttype, -1); } //Attach model gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), model); g_object_unref(model); } gtk_tree_view_expand_all(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); } } void mmgui_main_contacts_load_from_system_addressbooks(mmgui_application_t mmguiapp) { GtkTreeModel *model; GtkTreeIter iter; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); if (model) { if (mmgui_addressbooks_get_gnome_contacts_available(mmguiapp->addressbooks)) { gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, MMGUI_MAIN_CONTACTSLIST_NAME, _("GNOME contacts"), MMGUI_MAIN_CONTACTSLIST_ID, 0, MMGUI_MAIN_CONTACTSLIST_TYPE, MMGUI_MAIN_CONTACT_HEADER, -1); mmguiapp->window->contgnomepath = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); mmgui_main_contacts_addressbook_list_fill(mmguiapp, MMGUI_MAIN_CONTACT_GNOME); } if (mmgui_addressbooks_get_kde_contacts_available(mmguiapp->addressbooks)) { gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, MMGUI_MAIN_CONTACTSLIST_NAME, _("KDE contacts"), MMGUI_MAIN_CONTACTSLIST_ID, 0, MMGUI_MAIN_CONTACTSLIST_TYPE, MMGUI_MAIN_CONTACT_HEADER, -1); mmguiapp->window->contkdepath = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); mmgui_main_contacts_addressbook_list_fill(mmguiapp, MMGUI_MAIN_CONTACT_KDE); } } } void mmgui_main_contacts_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeStore *store; if (mmguiapp == NULL) return; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("First name"), renderer, "markup", MMGUI_MAIN_CONTACTSLIST_NAME, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("First number"), renderer, "markup", MMGUI_MAIN_CONTACTSLIST_NUMBER, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("EMail"), renderer, "markup", MMGUI_MAIN_CONTACTSLIST_EMAIL, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Group"), renderer, "markup", MMGUI_MAIN_CONTACTSLIST_GROUP, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Second name"), renderer, "markup", MMGUI_MAIN_CONTACTSLIST_NAME2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Second number"), renderer, "markup", MMGUI_MAIN_CONTACTSLIST_NUMBER2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), column); store = gtk_tree_store_new(MMGUI_MAIN_CONTACTSLIST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); mmguiapp->window->contmodempath = NULL; gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview), GTK_TREE_MODEL(store)); g_object_unref(store); g_signal_connect(G_OBJECT(mmguiapp->window->contactstreeview), "cursor-changed", G_CALLBACK(mmgui_main_contacts_list_cursor_changed_signal), mmguiapp); mmguiapp->window->contactssmsmenu = NULL; } void mmgui_main_contacts_state_clear(mmgui_application_t mmguiapp) { GtkTreeModel *model; GtkTreeIter catiter, contiter; GtkTreePath *refpath; GtkTreeRowReference *reference; GSList *reflist, *iterator; gboolean validcat, validcont; guint contacttype, numcontacts; gchar *pathstr; if (mmguiapp == NULL) return; /*Clear contacts list*/ if (mmguiapp->window->contmodempath != NULL) { pathstr = gtk_tree_path_to_string(mmguiapp->window->contmodempath); if (pathstr != NULL) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->contactstreeview)); if (model != NULL) { reflist = NULL; numcontacts = 0; /*Iterate through model and save references*/ validcat = gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(model), &catiter, pathstr); while (validcat) { if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(model), &catiter)) { validcont = gtk_tree_model_iter_children(GTK_TREE_MODEL(model), &contiter, &catiter); while (validcont) { gtk_tree_model_get(GTK_TREE_MODEL(model), &contiter, MMGUI_MAIN_CONTACTSLIST_TYPE, &contacttype, -1); /*Save references only on contacts stored on device*/ if (contacttype == MMGUI_MAIN_CONTACT_MODEM) { refpath = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &contiter); if (refpath != NULL) { reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(model), refpath); if (reference != NULL) { reflist = g_slist_prepend(reflist, reference); numcontacts++; } } } validcont = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &contiter); } } validcat = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &catiter); } /*Remove contacts if any found*/ if (numcontacts > 0) { for (iterator = reflist; iterator != NULL; iterator = iterator->next) { refpath = gtk_tree_row_reference_get_path((GtkTreeRowReference *)iterator->data); if (refpath) { if (gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &contiter, refpath)) { gtk_tree_store_remove(GTK_TREE_STORE(model), &contiter); } } } /*Clear resources allocated for references list*/ g_slist_foreach(reflist, (GFunc)gtk_tree_row_reference_free, NULL); g_slist_free(reflist); } /*Remove category caption*/ if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(model), &catiter, pathstr)) { gtk_tree_store_remove(GTK_TREE_STORE(model), &catiter); } } g_free(pathstr); } } gtk_widget_set_sensitive(mmguiapp->window->removecontactbutton, FALSE); gtk_widget_set_sensitive(mmguiapp->window->smstocontactbutton, FALSE); } modem-manager-gui-0.0.17.1/src/vcard.h0000644000175000017500000000201512374766042015745 0ustar alexalex/* * vcard.h * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #ifndef __VCARD_H__ #define __VCARD_H__ gint vcard_parse_string(const gchar *string, GSList **contacts, gchar *group); gint vcard_parse_list(GSList *vcardrows, GSList **contacts, gchar *group); #endif /* __VCARD_H__ */ modem-manager-gui-0.0.17.1/src/traffic-page.h0000644000175000017500000000754512376174154017212 0ustar alexalex/* * traffic-page.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __TRAFFIC_PAGE_H__ #define __TRAFFIC_PAGE_H__ #include #include "main.h" enum _mmgui_main_trafficlist_columns { MMGUI_MAIN_TRAFFICLIST_PARAMETER = 0, MMGUI_MAIN_TRAFFICLIST_VALUE, MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_COLUMNS }; enum _mmgui_main_trafficlist_id { MMGUI_MAIN_TRAFFICLIST_ID_RXDATA = 0, MMGUI_MAIN_TRAFFICLIST_ID_TXDATA, MMGUI_MAIN_TRAFFICLIST_ID_RXSPEED, MMGUI_MAIN_TRAFFICLIST_ID_TXSPEED, MMGUI_MAIN_TRAFFICLIST_ID_TIME, MMGUI_MAIN_TRAFFICLIST_ID_DATALIMIT, MMGUI_MAIN_TRAFFICLIST_ID_TIMELIMIT }; enum _mmgui_main_connectionlist_columns { MMGUI_MAIN_CONNECTIONLIST_APPLICATION = 0, MMGUI_MAIN_CONNECTIONLIST_PID, MMGUI_MAIN_CONNECTIONLIST_PROTOCOL, MMGUI_MAIN_CONNECTIONLIST_STATE, MMGUI_MAIN_CONNECTIONLIST_BUFFER, MMGUI_MAIN_CONNECTIONLIST_LOCALADDR, MMGUI_MAIN_CONNECTIONLIST_DESTADDR, MMGUI_MAIN_CONNECTIONLIST_INODE, MMGUI_MAIN_CONNECTIONLIST_TIME, MMGUI_MAIN_CONNECTIONLIST_COLUMNS }; enum _mmgui_main_trafficstatslist_columns { MMGUI_MAIN_TRAFFICSTATSLIST_DAY = 0, MMGUI_MAIN_TRAFFICSTATSLIST_RXDATA, MMGUI_MAIN_TRAFFICSTATSLIST_TXDATA, MMGUI_MAIN_TRAFFICSTATSLIST_SESSIONTIME, MMGUI_MAIN_TRAFFICSTATSLIST_TIMESATMP, MMGUI_MAIN_TRAFFICSTATSLIST_COLUMNS }; enum _mmgui_main_traffic_limits_validation { MMGUI_MAIN_LIMIT_TRAFFIC = 0x00, MMGUI_MAIN_LIMIT_TIME = 0x01, MMGUI_MAIN_LIMIT_BOTH = 0x02 }; //TRAFFIC gboolean mmgui_main_traffic_stats_history_update_from_thread(gpointer data); void mmgui_main_traffic_statistics_dialog(mmgui_application_t mmguiapp); void mmgui_main_traffic_statistics_dialog_button_clicked_signal(GObject *object, gpointer data); gboolean mmgui_main_traffic_connections_update_from_thread(gpointer data); void mmgui_main_traffic_connections_terminate_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_traffic_connections_dialog(mmgui_application_t mmguiapp); void mmgui_main_traffic_connections_dialog_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_traffic_traffic_statistics_list_init(mmgui_application_t mmguiapp); void mmgui_main_traffic_connections_list_init(mmgui_application_t mmguiapp); gboolean mmgui_main_traffic_limits_show_message_from_thread(gpointer data); void mmgui_main_traffic_limits_dialog_time_section_disable_signal(GtkToggleButton *togglebutton, gpointer data); void mmgui_main_traffic_limits_dialog(mmgui_application_t mmguiapp); void mmgui_main_traffic_limits_dialog_button_clicked_signal(GObject *object, gpointer data); //gboolean mmgui_main_traffic_update_statusbar_from_thread(gpointer data); gboolean mmgui_main_traffic_stats_update_from_thread_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); gboolean mmgui_main_traffic_stats_update_from_thread(gpointer data); void mmgui_main_traffic_speed_plot_draw(GtkWidget *widget, cairo_t *cr, gpointer data); void mmgui_main_traffic_accelerators_init(mmgui_application_t mmguiapp); void mmgui_main_traffic_list_init(mmgui_application_t mmguiapp); void mmgui_main_traffic_restore_settings_for_modem(mmgui_application_t mmguiapp); #endif /* __TRAFFIC_PAGE_H__ */ modem-manager-gui-0.0.17.1/src/notifications.h0000644000175000017500000001167412377412142017522 0ustar alexalex/* * notifications.h * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __MMGUINOTIFICATIONS_H__ #define __MMGUINOTIFICATIONS_H__ #include #include #include #include #include "libpaths.h" typedef enum { MMGUI_NOTIFICATIONS_URGENCY_LOW, MMGUI_NOTIFICATIONS_URGENCY_NORMAL, MMGUI_NOTIFICATIONS_URGENCY_CRITICAL, } NotificationsUrgency; typedef struct _ca_context ca_context; typedef struct _ca_proplist ca_proplist; typedef void (*NotifyActionCallback)(gpointer notification, gchar *action, gpointer userdata); typedef void (*ca_finish_callback_t)(ca_context *c, guint32 id, gint error_code, void *userdata); /*libnotify function prototypes*/ typedef gboolean (*notify_init_func)(const gchar * app_name); typedef GList *(*notify_get_server_caps_func)(void); typedef gpointer (*notify_notification_new_func)(const char *summary, const char *body, const char *icon); typedef void (*notify_notification_set_timeout_func)(gpointer notification, gint timeout); typedef void (*notify_notification_set_hint_func)(gpointer notification, const char *key, GVariant *value); typedef void (*notify_notification_set_image_from_pixbuf_func)(gpointer notification, gpointer pixbuf); typedef void (*notify_notification_set_category_func)(gpointer notification, const char *category); typedef void (*notify_notification_set_urgency_func)(gpointer notification, NotificationsUrgency urgency); typedef void (*notify_notification_add_action_func)(gpointer notification, const gchar *action, const gchar *label, NotifyActionCallback callback, gpointer userdata, GFreeFunc freefunc); typedef void (*notify_notification_show_func)(gpointer notification, GError **error); /*libcanberra function prototypes*/ typedef void (*ca_finish_callback_t)(ca_context *c, guint32 id, gint error_code, gpointer userdata); typedef gint (*ca_context_create_func)(ca_context **); typedef gint (*ca_context_destroy_func)(ca_context *); typedef gint (*ca_context_play_func)(ca_context *c, guint32 id, ...); typedef gint (*ca_context_change_props_func)(ca_context *c, ...); typedef gint (*ca_proplist_create_func)(ca_proplist **); typedef gint (*ca_proplist_destroy_func)(ca_proplist *); typedef gint (*ca_proplist_sets_func)(ca_proplist *c, const gchar *key, const gchar *value); typedef gint (*ca_context_play_full_func)(ca_context *c, guint32 id, ca_proplist *p, ca_finish_callback_t cb, gpointer userdata); enum _mmgui_notifications_sound { MMGUI_NOTIFICATIONS_SOUND_NONE = 0, MMGUI_NOTIFICATIONS_SOUND_INFO, MMGUI_NOTIFICATIONS_SOUND_MESSAGE }; struct _mmgui_notifications { //Modules GModule *notifymodule; GModule *canberramodule; //libnotify functions notify_init_func notify_init; notify_get_server_caps_func notify_get_server_caps; notify_notification_new_func notify_notification_new; notify_notification_set_timeout_func notify_notification_set_timeout; notify_notification_set_hint_func notify_notification_set_hint; notify_notification_set_image_from_pixbuf_func notify_notification_set_image_from_pixbuf; notify_notification_set_category_func notify_notification_set_category; notify_notification_set_urgency_func notify_notification_set_urgency; notify_notification_add_action_func notify_notification_add_action; notify_notification_show_func notify_notification_show; /*notifications action support*/ gboolean supportsaction; /*notifications icon*/ GdkPixbuf *notifyicon; //libcanberra functions ca_context_create_func ca_context_create; ca_context_destroy_func ca_context_destroy; ca_context_play_func ca_context_play; ca_context_change_props_func ca_context_change_props; ca_proplist_create_func ca_proplist_create; ca_proplist_destroy_func ca_proplist_destroy; ca_proplist_sets_func ca_proplist_sets; ca_context_play_full_func ca_context_play_full; //libcanberra context ca_context *cacontext; }; typedef struct _mmgui_notifications *mmgui_notifications_t; mmgui_notifications_t mmgui_notifications_new(mmgui_libpaths_cache_t libcache); gboolean mmgui_notifications_show(mmgui_notifications_t notifications, gchar *caption, gchar *text, enum _mmgui_notifications_sound sound, NotifyActionCallback defcallback, gpointer userdata); void mmgui_notifications_close(mmgui_notifications_t notifications); #endif /* __MMGUI_NOTIFICATIONS_H__ */ modem-manager-gui-0.0.17.1/src/addressbooks.h0000644000175000017500000003134012377437211017330 0ustar alexalex/* * addressbooks.h * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __ADDRESSBOOKS_H__ #define __ADDRESSBOOKS_H__ #include #include #include #include #include "mmguicore.h" /*For contact structure definition*/ #include "libpaths.h" /*GNOME addressbook contact fields*/ typedef enum { E_CONTACT_UID = 1, /* string field */ E_CONTACT_FILE_AS, /* string field */ E_CONTACT_BOOK_UID, /* string field */ /* Name fields */ E_CONTACT_FULL_NAME, /* string field */ E_CONTACT_GIVEN_NAME, /* synthetic string field */ E_CONTACT_FAMILY_NAME, /* synthetic string field */ E_CONTACT_NICKNAME, /* string field */ /* Email fields */ E_CONTACT_EMAIL_1, /* synthetic string field */ E_CONTACT_EMAIL_2, /* synthetic string field */ E_CONTACT_EMAIL_3, /* synthetic string field */ E_CONTACT_EMAIL_4, /* synthetic string field */ E_CONTACT_MAILER, /* string field */ /* Address Labels */ E_CONTACT_ADDRESS_LABEL_HOME, /* synthetic string field */ E_CONTACT_ADDRESS_LABEL_WORK, /* synthetic string field */ E_CONTACT_ADDRESS_LABEL_OTHER, /* synthetic string field */ /* Phone fields */ E_CONTACT_PHONE_ASSISTANT, E_CONTACT_PHONE_BUSINESS, E_CONTACT_PHONE_BUSINESS_2, E_CONTACT_PHONE_BUSINESS_FAX, E_CONTACT_PHONE_CALLBACK, E_CONTACT_PHONE_CAR, E_CONTACT_PHONE_COMPANY, E_CONTACT_PHONE_HOME, E_CONTACT_PHONE_HOME_2, E_CONTACT_PHONE_HOME_FAX, E_CONTACT_PHONE_ISDN, E_CONTACT_PHONE_MOBILE, E_CONTACT_PHONE_OTHER, E_CONTACT_PHONE_OTHER_FAX, E_CONTACT_PHONE_PAGER, E_CONTACT_PHONE_PRIMARY, E_CONTACT_PHONE_RADIO, E_CONTACT_PHONE_TELEX, E_CONTACT_PHONE_TTYTDD, /* Organizational fields */ E_CONTACT_ORG, /* string field */ E_CONTACT_ORG_UNIT, /* string field */ E_CONTACT_OFFICE, /* string field */ E_CONTACT_TITLE, /* string field */ E_CONTACT_ROLE, /* string field */ E_CONTACT_MANAGER, /* string field */ E_CONTACT_ASSISTANT, /* string field */ /* Web fields */ E_CONTACT_HOMEPAGE_URL, /* string field */ E_CONTACT_BLOG_URL, /* string field */ /* Contact categories */ E_CONTACT_CATEGORIES, /* string field */ /* Collaboration fields */ E_CONTACT_CALENDAR_URI, /* string field */ E_CONTACT_FREEBUSY_URL, /* string field */ E_CONTACT_ICS_CALENDAR, /* string field */ E_CONTACT_VIDEO_URL, /* string field */ /* misc fields */ E_CONTACT_SPOUSE, /* string field */ E_CONTACT_NOTE, /* string field */ E_CONTACT_IM_AIM_HOME_1, /* Synthetic string field */ E_CONTACT_IM_AIM_HOME_2, /* Synthetic string field */ E_CONTACT_IM_AIM_HOME_3, /* Synthetic string field */ E_CONTACT_IM_AIM_WORK_1, /* Synthetic string field */ E_CONTACT_IM_AIM_WORK_2, /* Synthetic string field */ E_CONTACT_IM_AIM_WORK_3, /* Synthetic string field */ E_CONTACT_IM_GROUPWISE_HOME_1, /* Synthetic string field */ E_CONTACT_IM_GROUPWISE_HOME_2, /* Synthetic string field */ E_CONTACT_IM_GROUPWISE_HOME_3, /* Synthetic string field */ E_CONTACT_IM_GROUPWISE_WORK_1, /* Synthetic string field */ E_CONTACT_IM_GROUPWISE_WORK_2, /* Synthetic string field */ E_CONTACT_IM_GROUPWISE_WORK_3, /* Synthetic string field */ E_CONTACT_IM_JABBER_HOME_1, /* Synthetic string field */ E_CONTACT_IM_JABBER_HOME_2, /* Synthetic string field */ E_CONTACT_IM_JABBER_HOME_3, /* Synthetic string field */ E_CONTACT_IM_JABBER_WORK_1, /* Synthetic string field */ E_CONTACT_IM_JABBER_WORK_2, /* Synthetic string field */ E_CONTACT_IM_JABBER_WORK_3, /* Synthetic string field */ E_CONTACT_IM_YAHOO_HOME_1, /* Synthetic string field */ E_CONTACT_IM_YAHOO_HOME_2, /* Synthetic string field */ E_CONTACT_IM_YAHOO_HOME_3, /* Synthetic string field */ E_CONTACT_IM_YAHOO_WORK_1, /* Synthetic string field */ E_CONTACT_IM_YAHOO_WORK_2, /* Synthetic string field */ E_CONTACT_IM_YAHOO_WORK_3, /* Synthetic string field */ E_CONTACT_IM_MSN_HOME_1, /* Synthetic string field */ E_CONTACT_IM_MSN_HOME_2, /* Synthetic string field */ E_CONTACT_IM_MSN_HOME_3, /* Synthetic string field */ E_CONTACT_IM_MSN_WORK_1, /* Synthetic string field */ E_CONTACT_IM_MSN_WORK_2, /* Synthetic string field */ E_CONTACT_IM_MSN_WORK_3, /* Synthetic string field */ E_CONTACT_IM_ICQ_HOME_1, /* Synthetic string field */ E_CONTACT_IM_ICQ_HOME_2, /* Synthetic string field */ E_CONTACT_IM_ICQ_HOME_3, /* Synthetic string field */ E_CONTACT_IM_ICQ_WORK_1, /* Synthetic string field */ E_CONTACT_IM_ICQ_WORK_2, /* Synthetic string field */ E_CONTACT_IM_ICQ_WORK_3, /* Synthetic string field */ /* Convenience field for getting a name from the contact. * Returns the first one of[File-As, Full Name, Org, Email1] * to be set */ E_CONTACT_REV, /* string field to hold time of last update to this vcard */ E_CONTACT_NAME_OR_ORG, /* Address fields */ E_CONTACT_ADDRESS, /* Multi-valued structured (EContactAddress) */ E_CONTACT_ADDRESS_HOME, /* synthetic structured field (EContactAddress) */ E_CONTACT_ADDRESS_WORK, /* synthetic structured field (EContactAddress) */ E_CONTACT_ADDRESS_OTHER, /* synthetic structured field (EContactAddress) */ E_CONTACT_CATEGORY_LIST, /* multi-valued */ /* Photo/Logo */ E_CONTACT_PHOTO, /* structured field (EContactPhoto) */ E_CONTACT_LOGO, /* structured field (EContactPhoto) */ E_CONTACT_NAME, /* structured field (EContactName) */ E_CONTACT_EMAIL, /* Multi-valued */ /* Instant Messaging fields */ E_CONTACT_IM_AIM, /* Multi-valued */ E_CONTACT_IM_GROUPWISE, /* Multi-valued */ E_CONTACT_IM_JABBER, /* Multi-valued */ E_CONTACT_IM_YAHOO, /* Multi-valued */ E_CONTACT_IM_MSN, /* Multi-valued */ E_CONTACT_IM_ICQ, /* Multi-valued */ E_CONTACT_WANTS_HTML, /* boolean field */ /* fields used for describing contact lists. a contact list * is just a contact with _IS_LIST set to true. the members * are listed in the _EMAIL field. */ E_CONTACT_IS_LIST, /* boolean field */ E_CONTACT_LIST_SHOW_ADDRESSES, /* boolean field */ E_CONTACT_BIRTH_DATE, /* structured field (EContactDate) */ E_CONTACT_ANNIVERSARY, /* structured field (EContactDate) */ /* Security Fields */ E_CONTACT_X509_CERT, /* structured field (EContactCert) */ E_CONTACT_IM_GADUGADU_HOME_1, /* Synthetic string field */ E_CONTACT_IM_GADUGADU_HOME_2, /* Synthetic string field */ E_CONTACT_IM_GADUGADU_HOME_3, /* Synthetic string field */ E_CONTACT_IM_GADUGADU_WORK_1, /* Synthetic string field */ E_CONTACT_IM_GADUGADU_WORK_2, /* Synthetic string field */ E_CONTACT_IM_GADUGADU_WORK_3, /* Synthetic string field */ E_CONTACT_IM_GADUGADU, /* Multi-valued */ E_CONTACT_GEO, /* structured field (EContactGeo) */ E_CONTACT_TEL, /* list of strings */ E_CONTACT_IM_SKYPE_HOME_1, /* Synthetic string field */ E_CONTACT_IM_SKYPE_HOME_2, /* Synthetic string field */ E_CONTACT_IM_SKYPE_HOME_3, /* Synthetic string field */ E_CONTACT_IM_SKYPE_WORK_1, /* Synthetic string field */ E_CONTACT_IM_SKYPE_WORK_2, /* Synthetic string field */ E_CONTACT_IM_SKYPE_WORK_3, /* Synthetic string field */ E_CONTACT_IM_SKYPE, /* Multi-valued */ E_CONTACT_SIP, E_CONTACT_IM_GOOGLE_TALK_HOME_1, /* Synthetic string field */ E_CONTACT_IM_GOOGLE_TALK_HOME_2, /* Synthetic string field */ E_CONTACT_IM_GOOGLE_TALK_HOME_3, /* Synthetic string field */ E_CONTACT_IM_GOOGLE_TALK_WORK_1, /* Synthetic string field */ E_CONTACT_IM_GOOGLE_TALK_WORK_2, /* Synthetic string field */ E_CONTACT_IM_GOOGLE_TALK_WORK_3, /* Synthetic string field */ E_CONTACT_IM_GOOGLE_TALK, /* Multi-valued */ E_CONTACT_IM_TWITTER, /* Multi-valued */ E_CONTACT_FIELD_LAST, E_CONTACT_FIELD_FIRST = E_CONTACT_UID, /* useful constants */ E_CONTACT_LAST_SIMPLE_STRING = E_CONTACT_NAME_OR_ORG, E_CONTACT_FIRST_PHONE_ID = E_CONTACT_PHONE_ASSISTANT, E_CONTACT_LAST_PHONE_ID = E_CONTACT_PHONE_TTYTDD, E_CONTACT_FIRST_EMAIL_ID = E_CONTACT_EMAIL_1, E_CONTACT_LAST_EMAIL_ID = E_CONTACT_EMAIL_4, E_CONTACT_FIRST_ADDRESS_ID = E_CONTACT_ADDRESS_HOME, E_CONTACT_LAST_ADDRESS_ID = E_CONTACT_ADDRESS_OTHER, E_CONTACT_FIRST_LABEL_ID = E_CONTACT_ADDRESS_LABEL_HOME, E_CONTACT_LAST_LABEL_ID = E_CONTACT_ADDRESS_LABEL_OTHER } EContactField; /*GNOME addressbook structures*/ typedef struct _ESource ESource; typedef struct _ESourceRegistry ESourceRegistry; typedef struct _EBook EBook; typedef struct _EBookClient EBookClient; typedef struct _EClient EClient; typedef struct _EBookQuery EBookQuery; typedef struct _EContact EContact; /*GNOME addressbook function prototypes*/ typedef EBookQuery *(*e_book_query_field_exists_func)(EContactField field); typedef EBookQuery *(*e_book_query_or_func)(gint nqs, EBookQuery **qs, gboolean unref); typedef ESourceRegistry *(*e_source_registry_new_sync_func)(gpointer cancellable, GError **error); typedef ESource *(*e_source_registry_ref_builtin_address_book_func)(ESourceRegistry *registry); typedef const gchar *(*e_source_get_display_name_func)(ESource *source); typedef EBookClient *(*e_book_client_new_func)(ESource *source, GError **error); typedef gboolean (*e_client_open_sync_func)(EClient *client, gboolean only_if_exists, gpointer cancellable, GError **error); typedef EClient *(*e_book_client_connect_sync_func)(ESource *source, gpointer cancellable, GError **error); typedef gchar *(*e_book_query_to_string_func)(EBookQuery *q); typedef gboolean (*e_book_client_get_contacts_sync_func)(EBookClient *client, const gchar *sexp, GSList **out_contacts, gpointer cancellable, GError **error); typedef EBook *(*e_book_new_system_addressbook_func)(GError **error); typedef ESource *(*e_book_get_source_func)(EBook *book); typedef gboolean (*e_book_open_func)(EBook *book, gboolean only_if_exists, GError **error); typedef gboolean (*e_book_get_contacts_func)(EBook *book, EBookQuery *query, GList **contacts, GError **error); typedef void (*e_book_query_unref_func)(EBookQuery *q); typedef gconstpointer (*e_contact_get_const_func)(EContact *contact, EContactField field_id); typedef gpointer (*e_contact_get_func)(EContact *contact, EContactField field_id); struct _mmgui_addressbooks { //Modules GModule *ebookmodule; //GNOME addressbook functions e_book_query_field_exists_func e_book_query_field_exists; e_book_query_or_func e_book_query_or; e_source_registry_new_sync_func e_source_registry_new_sync; e_source_registry_ref_builtin_address_book_func e_source_registry_ref_builtin_address_book; e_source_get_display_name_func e_source_get_display_name; e_book_client_new_func e_book_client_new; e_client_open_sync_func e_client_open_sync; e_book_client_connect_sync_func e_book_client_connect_sync; e_book_query_to_string_func e_book_query_to_string; e_book_client_get_contacts_sync_func e_book_client_get_contacts_sync; e_book_new_system_addressbook_func e_book_new_system_addressbook; e_book_get_source_func e_book_get_source; e_book_open_func e_book_open; e_book_get_contacts_func e_book_get_contacts; e_book_query_unref_func e_book_query_unref; e_contact_get_const_func e_contact_get_const; e_contact_get_func e_contact_get; //GNOME stuff gboolean gnomesupported; GSList *gnomecontacts; const gchar *gnomesourcename; //Akonadi access data gint aksocket; //KDE stuff gboolean kdesupported; GSList *kdecontacts; //Counter for internal contacts identification guint counter; }; typedef struct _mmgui_addressbooks *mmgui_addressbooks_t; mmgui_addressbooks_t mmgui_addressbooks_new(mmgui_libpaths_cache_t libcache); gboolean mmgui_addressbooks_get_gnome_contacts_available(mmgui_addressbooks_t addressbooks); gboolean mmgui_addressbooks_get_kde_contacts_available(mmgui_addressbooks_t addressbooks); GSList *mmgui_addressbooks_get_gnome_contacts_list(mmgui_addressbooks_t addressbooks); GSList *mmgui_addressbooks_get_kde_contacts_list(mmgui_addressbooks_t addressbooks); mmgui_contact_t mmgui_addressbooks_get_gnome_contact(mmgui_addressbooks_t addressbooks, guint index); mmgui_contact_t mmgui_addressbooks_get_kde_contact(mmgui_addressbooks_t addressbooks, guint index); void mmgui_addressbooks_close(mmgui_addressbooks_t addressbooks); #endif /* __ADDRESSBOOKS_H__ */ modem-manager-gui-0.0.17.1/src/addressbooks.c0000644000175000017500000011067312377606270017335 0ustar alexalex/* * addressbooks.c * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "vcard.h" #include "addressbooks.h" #define MMGUI_ADDRESSBOOKS_AKONADI_LINK_PATH "%s/.local/share/akonadi/socket-localhost" #define MMGUI_ADDRESSBOOKS_AKONADI_SOCKET_PATH "%s/akonadiserver.socket" #define MMGUI_ADDRESSBOOKS_AKONADI_DBUS_INTERFACE "org.freedesktop.Akonadi.Control" #define MMGUI_ADDRESSBOOKS_AKONADI_NULL_COMMAND "\r\n" #define MMGUI_ADDRESSBOOKS_AKONADI_LOGIN_COMMAND "LOGIN mmgui mmgui\r\n" #define MMGUI_ADDRESSBOOKS_AKONADI_INFO_COMMAND "X-AKLSUB 0 INF ()\r\n" #define MMGUI_ADDRESSBOOKS_AKONADI_SELECT_COMMAND "SELECT SILENT %u\r\n" #define MMGUI_ADDRESSBOOKS_AKONADI_FETCH_COMMAND "FETCH 1:* FULLPAYLOAD\r\n" enum _mmgui_addressbooks_akonadi_command_status_id { MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK = 0, MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_NO, MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_BAD }; enum _mmgui_addressbooks_akonadi_status { MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ALREADY_RUNNING = 2, MMGUI_ADDRESSBOOKS_AKONADI_STATUS_SUCCESS = 1 }; struct _mmgui_addressbooks_akonadi_command { /*Request*/ gchar *request; guint requestid; gsize requestlen; gchar requestprefix[16]; gsize requestprefixlen; /*Answer*/ gint statusid; gchar *statusmessage; gchar *answer; }; typedef struct _mmgui_addressbooks_akonadi_command *mmgui_addressbooks_akonadi_command_t; struct _mmgui_addressbooks_akonadi_collection { gint id; gchar *name; }; typedef struct _mmgui_addressbooks_akonadi_collection *mmgui_addressbooks_akonadi_collection_t; //KDE (Akonadi) static gboolean mmgui_addressbooks_session_service_activate(gchar *interface, guint *status); static gint mmgui_addressbooks_open_kde_socket(void); static void mmgui_addressbooks_fill_akonadi_command_struct(mmgui_addressbooks_akonadi_command_t command, const gchar *format, ...); static void mmgui_addressbooks_free_akonadi_command_struct(mmgui_addressbooks_akonadi_command_t command); static gboolean mmgui_addressbooks_get_akonadi_command_status(gchar *status, mmgui_addressbooks_akonadi_command_t command); static gboolean mmgui_addressbooks_execute_akonadi_command(mmgui_addressbooks_t addressbooks, mmgui_addressbooks_akonadi_command_t command); static guint mmgui_addressbooks_akonadi_get_integer(gchar *text, gchar *prefix, gchar *suffix); static gchar *mmgui_addressbooks_akonadi_get_substring(gchar *text, gchar *prefix, gchar *suffix); static gboolean mmgui_addressbooks_akonadi_find_substring(gchar *text, gchar *prefix, gchar *suffix, gchar *substring); static GSList *mmgui_addressbooks_akonadi_get_collections(const gchar *list); static void mmgui_addressbooks_akonadi_free_collections_foreach(gpointer data, gpointer user_data); static guint mmgui_addressbooks_akonadi_collection_get_contacts(mmgui_addressbooks_t addressbooks, mmgui_addressbooks_akonadi_collection_t collection, const gchar *vcardlist); static gboolean mmgui_addressbooks_get_kde_contacts(mmgui_addressbooks_t addressbooks); //GNOME (Evolution data server) static void mmgui_addressbooks_get_gnome_contacts_foreach(gpointer data, gpointer user_data); static gboolean mmgui_addressbooks_get_gnome_contacts(mmgui_addressbooks_t addressbooks); //Other static void mmgui_addressbooks_free_contacts_list_foreach(gpointer data, gpointer user_data); //KDE (Akonadi) static gboolean mmgui_addressbooks_session_service_activate(gchar *interface, guint *status) { GDBusConnection *connection; GDBusProxy *proxy; gboolean res; GVariant *statusv; GError *error; if (interface == NULL) return FALSE; error = NULL; connection = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error); if ((connection == NULL) && (error != NULL)) { g_debug("Core error: %s\n", error->message); g_error_free(error); return FALSE; } error = NULL; proxy = g_dbus_proxy_new_sync(connection, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", NULL, &error); if ((proxy == NULL) && (error != NULL)) { g_debug("Core error: %s\n", error->message); g_error_free(error); g_object_unref(connection); return FALSE; } error = NULL; statusv = g_dbus_proxy_call_sync(proxy, "StartServiceByName", g_variant_new("(su)", interface, 0), 0, -1, NULL, &error); if ((statusv == NULL) && (error != NULL)) { g_debug("Core error: %s\n", error->message); g_error_free(error); res = FALSE; } else { if (status != NULL) { g_variant_get(statusv, "(u)", status); g_debug("Service start status: %u\n", *status); } res = TRUE; } g_object_unref(proxy); g_object_unref(connection); return res; } static gint mmgui_addressbooks_open_kde_socket(void) { const gchar *homedir; gchar *linkpath, *linkvalue; gchar *socketpath; struct stat statbuf; GError *error; gint socketfd; struct sockaddr_un address; homedir = g_get_home_dir(); linkpath = g_strdup_printf(MMGUI_ADDRESSBOOKS_AKONADI_LINK_PATH, homedir); error = NULL; linkvalue = g_file_read_link((const gchar *)linkpath, &error); g_free(linkpath); if ((linkvalue == NULL) && (error != NULL)) { g_debug("Failed to read symlink: %s\n", error->message); g_error_free(error); return -1; } socketpath = g_strdup_printf(MMGUI_ADDRESSBOOKS_AKONADI_SOCKET_PATH, linkvalue); g_free(linkvalue); if (stat(socketpath, &statbuf) != 0) { g_debug("Failed to locate Akonadi server socket\n"); g_free(socketpath); return -1; } if (!S_ISSOCK(statbuf.st_mode)) { g_debug("Wrong type of Akonadi IPC\n"); g_free(socketpath); return -1; } socketfd = socket(AF_UNIX, SOCK_STREAM, 0); if(socketfd < 0) { g_debug("Failed to open socket\n"); g_free(socketpath); return -1; } memset(&address, 0, sizeof(struct sockaddr_un)); address.sun_family = AF_UNIX; strncpy(address.sun_path, socketpath, sizeof(address.sun_path)); g_free(socketpath); if(connect(socketfd, (struct sockaddr *)&address, sizeof(struct sockaddr_un)) != 0) { g_debug("Failed to connect socket\n"); return -1; } return socketfd; } static void mmgui_addressbooks_fill_akonadi_command_struct(mmgui_addressbooks_akonadi_command_t command, const gchar *format, ...) { gssize reqsegmsize, reqlen; gchar *reqsegm, *newreqsegm; va_list args; if ((command == NULL) || (format == NULL)) return; /*Request prefix*/ memset(command->requestprefix, 0, sizeof(command->requestprefix)); if (command->requestid > 0) { /*Regular request*/ command->requestprefixlen = snprintf(command->requestprefix, sizeof(command->requestprefix), "A%u ", command->requestid); } else { /*Server greeting*/ command->requestprefixlen = snprintf(command->requestprefix, sizeof(command->requestprefix), "* "); } /*Clear request*/ if (command->request != NULL) { g_free(command->request); command->request = NULL; } if (command->requestid > 0) { /*Form request*/ reqsegmsize = 100 - command->requestprefixlen; reqsegm = g_malloc0(reqsegmsize); while (TRUE) { /*Try to use allocated segment*/ va_start(args, format); reqlen = vsnprintf(reqsegm + command->requestprefixlen, reqsegmsize, format, args); va_end(args); /*Test returned value*/ if (reqlen < 0) { command->request = NULL; command->requestlen = 0; break; } /*Test if request is ready and return*/ if (reqlen < reqsegmsize) { /*Add prefix*/ memcpy(reqsegm, command->requestprefix, command->requestprefixlen); /*Return request*/ command->request = reqsegm; command->requestlen = (gsize)reqlen + command->requestprefixlen; break; } /*Increase segment size*/ reqsegmsize = reqlen + 50; /*Reallocate segment*/ newreqsegm = g_realloc(reqsegm, reqsegmsize); if (newreqsegm != NULL) { /*Zero reallocated memory before use*/ memset(newreqsegm, 0, sizeof(reqsegmsize)); reqsegm = newreqsegm; } else { /*No chance to reallocate*/ command->request = NULL; command->requestlen = 0; break; } } } else { /*No request must be sent*/ command->request = NULL; command->requestlen = 0; } /*Next request ID*/ command->requestid++; /*Set default command status id*/ command->statusid = MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK; /*Clear server status message*/ if (command->statusmessage != NULL) { g_free(command->statusmessage); command->statusmessage = NULL; } /*Clear answer*/ if (command->answer != NULL) { g_free(command->answer); command->answer = NULL; } } static void mmgui_addressbooks_free_akonadi_command_struct(mmgui_addressbooks_akonadi_command_t command) { if (command == NULL) return; /*Clear request prefix*/ memset(command->requestprefix, 0, sizeof(command->requestprefix)); command->requestprefixlen = 0; /*Reset request ID*/ command->requestid = 0; /*Clear request*/ if (command->request != NULL) { g_free(command->request); command->request = NULL; } command->requestlen = 0; /*Set default command status id*/ command->statusid = MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK; /*Clear server status message*/ if (command->statusmessage != NULL) { g_free(command->statusmessage); command->statusmessage = NULL; } /*Clear answer*/ if (command->answer != NULL) { g_free(command->answer); command->answer = NULL; } } static gboolean mmgui_addressbooks_get_akonadi_command_status(gchar *status, mmgui_addressbooks_akonadi_command_t command) { if ((status == NULL) || (command == NULL)) return FALSE; /*Get status identifier*/ if ((status[0] == 'O') && (status[1] == 'K')) { command->statusid = MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK; } else if ((status[0] == 'N') && (status[1] == 'O')) { command->statusid = MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_NO; } else if ((status[0] == 'B') && (status[1] == 'A') && (status[1] == 'D')) { command->statusid = MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_BAD; } else { command->statusid = MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_NO; } /*Get status message*/ command->statusmessage = strchr(status, ' '); if (command->statusmessage != NULL) { command->statusmessage = g_strdup(command->statusmessage + 1); } return TRUE; } static gboolean mmgui_addressbooks_execute_akonadi_command(mmgui_addressbooks_t addressbooks, mmgui_addressbooks_akonadi_command_t command) { GString *fullanswer; gchar buffer[1024]; gint res, bytes, i; gboolean completed; if ((addressbooks == NULL) || (command == NULL)) return FALSE; if (command->request != NULL) { bytes = send(addressbooks->aksocket, command->request, command->requestlen, 0); if (bytes <= 0) { return FALSE; } } fullanswer = g_string_new(NULL); completed = FALSE; bytes = 0; memset(buffer, 0, sizeof(buffer)); do { res = recv(addressbooks->aksocket, buffer, sizeof(buffer)-1, 0); if (res > 0) { bytes += res; buffer[res] = '\0'; fullanswer = g_string_append(fullanswer, buffer); if ((fullanswer->len > command->requestprefixlen+2) && (fullanswer->str[fullanswer->len-2] == '\r') && (fullanswer->str[fullanswer->len-1] == '\n')) { for (i=fullanswer->len-4; i>=0; i--) { /*Multiline answer*/ if ((fullanswer->str[i] == '\r') && (fullanswer->str[i+1] == '\n')) { if (strncmp(fullanswer->str+i+2, command->requestprefix, command->requestprefixlen) == 0) { completed = mmgui_addressbooks_get_akonadi_command_status(fullanswer->str+i+2+command->requestprefixlen, command); fullanswer = g_string_truncate(fullanswer, i); command->answer = g_string_free(fullanswer, FALSE); break; } } else if (i == 0) { /*Single line answer*/ if (strncmp(fullanswer->str, command->requestprefix, command->requestprefixlen) == 0) { completed = mmgui_addressbooks_get_akonadi_command_status(fullanswer->str+command->requestprefixlen, command); command->answer = g_string_free(fullanswer, TRUE); break; } } } } } else { break; } } while ((res != 0) && (!completed)); return completed; } static guint mmgui_addressbooks_akonadi_get_integer(gchar *text, gchar *prefix, gchar *suffix) { gchar *start, *end; gsize fragmentlen; gint i, d; guint mult, res; gchar curdigit; gchar digits[2][10] = {{'0','1','2','3','4','5','6','7','8','9'}, {0,1,2,3,4,5,6,7,8,9}}; if (text == NULL) return 0; start = text; mult = 1; res = 0; /*Number start*/ if (prefix != NULL) { start = strstr(text, prefix); if (start != NULL) { start += strlen(prefix); } } /*Number end*/ end = strstr(start + 1, suffix); if (end != NULL) { fragmentlen = end - start; if (fragmentlen > 0) { for (i=fragmentlen-1; i>=0; i--) { /*Seqrch for digit*/ curdigit = -1; for (d=0; d<10; d++) { if (digits[0][d] == start[i]) { curdigit = digits[1][d]; break; } } /*Add digit*/ if (curdigit != -1) { res += mult * curdigit; mult *= 10; } else { res = 0; break; } } } } return res; } static gchar *mmgui_addressbooks_akonadi_get_substring(gchar *text, gchar *prefix, gchar *suffix) { gchar *start, *end; gsize fragmentlen; gchar *res; if (text == NULL) return NULL; start = text; res = NULL; /*Substring start*/ if (prefix != NULL) { start = strstr(text, prefix); if (start != NULL) { start += strlen(prefix); } } /*Substring end*/ end = strstr(start + 1, suffix); if (end != NULL) { fragmentlen = end - start; if (fragmentlen > 0) { res = g_malloc0(fragmentlen+1); strncpy(res, start, fragmentlen); } } return res; } static gboolean mmgui_addressbooks_akonadi_find_substring(gchar *text, gchar *prefix, gchar *suffix, gchar *substring) { gchar *start, *end; gsize fragmentlen; gboolean res; if ((text == NULL) || (substring == NULL)) return FALSE; start = text; res = FALSE; /*Substring start*/ if (prefix != NULL) { start = strstr(text, prefix); if (start != NULL) { start += strlen(prefix); } } /*Substring end*/ end = strstr(start + 1, suffix); if (end != NULL) { fragmentlen = end - start; if (fragmentlen > 0) { if (strncmp(start, substring, fragmentlen) == 0) { res = TRUE; } } } return res; } static GSList *mmgui_addressbooks_akonadi_get_collections(const gchar *list) { GSList *collections; gchar **listrows; gint i; mmgui_addressbooks_akonadi_collection_t collection; if (list == NULL) return NULL; listrows = g_strsplit(list, "\r\n", 0); if (listrows == NULL) return NULL; i = 0; collections = NULL; while (listrows[i] != NULL) { if ((strstr(listrows[i], "application/x-vnd.kde.contactgroup") != NULL) && (strstr(listrows[i], "text/directory") != NULL)) { collection = g_new0(struct _mmgui_addressbooks_akonadi_collection, 1); collection->id = mmgui_addressbooks_akonadi_get_integer(listrows[i], "* ", " "); collection->name = mmgui_addressbooks_akonadi_get_substring(listrows[i], " (NAME \"", "\" MIMETYPE "); collections = g_slist_prepend(collections, collection); } i++; } g_strfreev(listrows); return collections; } static void mmgui_addressbooks_akonadi_free_collections_foreach(gpointer data, gpointer user_data) { mmgui_addressbooks_akonadi_collection_t collection; collection = (mmgui_addressbooks_akonadi_collection_t)data; if (collection->name != NULL) { g_free(collection->name); } } static guint mmgui_addressbooks_akonadi_collection_get_contacts(mmgui_addressbooks_t addressbooks, mmgui_addressbooks_akonadi_collection_t collection, const gchar *vcardlist) { gchar **vcardlistrows; GSList *vcardrows; gboolean validrow; gint i, vcardnum; if ((addressbooks == NULL) || (collection == NULL) || (vcardlist == NULL)) return 0; vcardlistrows = g_strsplit(vcardlist, "\r\n", 0); if (vcardlistrows == NULL) return 0; i = 0; validrow = FALSE; vcardrows = NULL; while (vcardlistrows[i] != NULL) { if ((vcardlistrows[i][0] == '*') && (mmgui_addressbooks_akonadi_find_substring(vcardlistrows[i], "MIMETYPE \"", "\" COLLECTIONID", "text/directory"))) { /*VCard start*/ validrow = TRUE; } else if (vcardlistrows[i][0] == ')') { /*VCard end*/ validrow = FALSE; } else { if (validrow) { vcardrows = g_slist_prepend(vcardrows, vcardlistrows[i]); } } i++; } if (vcardrows != NULL) { vcardrows = g_slist_reverse(vcardrows); /*Parse vcards*/ vcardnum = vcard_parse_list(vcardrows, &(addressbooks->kdecontacts), collection->name); /*Free linked list*/ g_slist_free(vcardrows); } /*Free strings list*/ g_strfreev(vcardlistrows); return vcardnum; } static gboolean mmgui_addressbooks_get_kde_contacts(mmgui_addressbooks_t addressbooks) { struct _mmgui_addressbooks_akonadi_command command; guint protocol; GSList *collections, *iterator; mmgui_addressbooks_akonadi_collection_t collection; memset(&command, 0, sizeof(command)); mmgui_addressbooks_fill_akonadi_command_struct(&command, MMGUI_ADDRESSBOOKS_AKONADI_NULL_COMMAND); /*Greeting*/ if (mmgui_addressbooks_execute_akonadi_command(addressbooks, &command)) { if (command.statusid == MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK) { protocol = mmgui_addressbooks_akonadi_get_integer(command.statusmessage, "[PROTOCOL ", "]"); if (protocol < 33) { g_debug("Protocol isn't supported: %u\n", protocol); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } } else { g_debug("Unable to get protocol number: %s\n", command.statusmessage); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } } else { g_debug("Failed to receive protocol number"); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } /*Login*/ mmgui_addressbooks_fill_akonadi_command_struct(&command, MMGUI_ADDRESSBOOKS_AKONADI_LOGIN_COMMAND); if (mmgui_addressbooks_execute_akonadi_command(addressbooks, &command)) { if (command.statusid != MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK) { g_debug("Unable to login: %s\n", command.statusmessage); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } } else { g_debug("Failed to send login request"); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } /*Info*/ mmgui_addressbooks_fill_akonadi_command_struct(&command, MMGUI_ADDRESSBOOKS_AKONADI_INFO_COMMAND); if (mmgui_addressbooks_execute_akonadi_command(addressbooks, &command)) { if (command.statusid == MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK) { collections = mmgui_addressbooks_akonadi_get_collections((const gchar *)command.answer); if (collections == NULL) { g_debug("Unable to get collections identifiers\n"); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } } else { g_debug("Unable to get server info: %s\n", command.statusmessage); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } } else { g_debug("Failed to receive Akonadi information"); mmgui_addressbooks_free_akonadi_command_struct(&command); return FALSE; } /*Select+Fetch*/ if (collections != NULL) { collections = g_slist_reverse(collections); for (iterator = collections; iterator != NULL; iterator = iterator->next) { collection = (mmgui_addressbooks_akonadi_collection_t)iterator->data; if (collection != NULL) { /*Select*/ mmgui_addressbooks_fill_akonadi_command_struct(&command, MMGUI_ADDRESSBOOKS_AKONADI_SELECT_COMMAND, collection->id); if (mmgui_addressbooks_execute_akonadi_command(addressbooks, &command)) { if (command.statusid != MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK) { g_debug("Unable to select collection: %s\n", command.statusmessage); continue; } } else { g_debug("Failed to send select request"); continue; } /*Fetch*/ mmgui_addressbooks_fill_akonadi_command_struct(&command, MMGUI_ADDRESSBOOKS_AKONADI_FETCH_COMMAND); if (mmgui_addressbooks_execute_akonadi_command(addressbooks, &command)) { if (command.statusid == MMGUI_ADDRESSBOOKS_AKONADI_STATUS_ID_OK) { mmgui_addressbooks_akonadi_collection_get_contacts(addressbooks, collection, (const gchar *)command.answer); } else { g_debug("Unable to fecth collection data: %s\n", command.statusmessage); continue; } } else { g_debug("Failed to send fetch request"); continue; } } } /*Free resources allocated for collections*/ g_slist_foreach(collections, mmgui_addressbooks_akonadi_free_collections_foreach, NULL); g_slist_free(collections); } /*Free command struct*/ mmgui_addressbooks_free_akonadi_command_struct(&command); return TRUE; } //GNOME (Evolution data server) static void mmgui_addressbooks_get_gnome_contacts_foreach(gpointer data, gpointer user_data) { mmgui_addressbooks_t addressbooks; EContact *econtact; mmgui_contact_t contact; const gchar *fullname, *nickname, *primaryphone, *mobilephone, *email; GList *emails; addressbooks = (mmgui_addressbooks_t)user_data; econtact = (EContact *)data; if ((addressbooks == NULL) || (econtact == NULL)) return; fullname = (addressbooks->e_contact_get_const)(econtact, E_CONTACT_FULL_NAME); nickname = (addressbooks->e_contact_get_const)(econtact, E_CONTACT_NICKNAME); primaryphone = (addressbooks->e_contact_get_const)(econtact, E_CONTACT_PHONE_HOME); mobilephone = (addressbooks->e_contact_get_const)(econtact, E_CONTACT_PHONE_MOBILE); emails = (addressbooks->e_contact_get)(econtact, E_CONTACT_EMAIL); email = g_list_nth_data(emails, 0); contact = g_new0(struct _mmgui_contact, 1); contact->name = g_strdup(fullname); contact->number = g_strdup(primaryphone); contact->email = g_strdup(email); contact->group = g_strdup(addressbooks->gnomesourcename); contact->name2 = g_strdup(nickname); contact->number2 = g_strdup(mobilephone); contact->id = addressbooks->counter; contact->hidden = FALSE; contact->storage = MMGUI_CONTACTS_STORAGE_UNKNOWN; addressbooks->gnomecontacts = g_slist_prepend(addressbooks->gnomecontacts, contact); addressbooks->counter++; g_list_foreach(emails, (GFunc)g_free, NULL); g_list_free(emails); } static gboolean mmgui_addressbooks_get_gnome_contacts(mmgui_addressbooks_t addressbooks) { EBookQuery *queryelements[2]; EBookQuery *query; GError *error; gchar *s; /*New API*/ ESourceRegistry *registry; ESource *source; EBookClient *client; GSList *scontacts; /*Old API*/ EBook *book; GList *dcontacts; if (addressbooks == NULL) return FALSE; if (!addressbooks->gnomesupported) return FALSE; if (addressbooks->ebookmodule == NULL) return FALSE; error = NULL; queryelements[0] = (addressbooks->e_book_query_field_exists)(E_CONTACT_PHONE_HOME); queryelements[1] = (addressbooks->e_book_query_field_exists)(E_CONTACT_PHONE_MOBILE); query = (addressbooks->e_book_query_or)(2, queryelements, TRUE); if (query == NULL) { g_debug("Failed to form GNOME contacts query\n"); return FALSE; } if (addressbooks->e_book_new_system_addressbook != NULL) { g_debug("Using old GNOME contacts API\n"); book = (addressbooks->e_book_new_system_addressbook)(&error); if (book == NULL) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to load GNOME system addressbook: %s\n", error->message); g_error_free(error); return FALSE; } if (!(addressbooks->e_book_open)(book, TRUE, &error)) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to load GNOME system addressbook: %s\n", error->message); g_error_free(error); return FALSE; } source = (addressbooks->e_book_get_source)(book); if (addressbooks->e_source_get_display_name != NULL) { addressbooks->gnomesourcename = (addressbooks->e_source_get_display_name)(source); } else { addressbooks->gnomesourcename = ""; } if (!(addressbooks->e_book_get_contacts)(book, query, &dcontacts, &error)) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to get query GNOME addressbook results: %s\n", error->message); g_error_free(error); return FALSE; } } else { g_debug("Using new GNOME contacts API\n"); registry = (addressbooks->e_source_registry_new_sync)(NULL, &error); if (registry == NULL) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to get ESourceRegistry: %s\n", error->message); g_error_free(error); return FALSE; } source = (addressbooks->e_source_registry_ref_builtin_address_book)(registry); if (source == NULL) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to get ESource\n"); return FALSE; } if (addressbooks->e_source_get_display_name != NULL) { addressbooks->gnomesourcename = (addressbooks->e_source_get_display_name)(source); } else { addressbooks->gnomesourcename = ""; } if (addressbooks->e_book_client_connect_sync != NULL) { /*Version 3.8*/ client = (EBookClient *)(addressbooks->e_book_client_connect_sync)(source, NULL, &error); if (client == NULL) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to get EBookClient: %s\n", error->message); g_error_free(error); return FALSE; } } else { /*Versions 3.2 ... 3.6*/ client = (addressbooks->e_book_client_new)(source, &error); if (client == NULL) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to get EBookClient: %s\n", error->message); g_error_free(error); return FALSE; } if (!(addressbooks->e_client_open_sync)((EClient *)client, TRUE, NULL, &error)) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to open EBookClient: %s\n", error->message); g_error_free(error); return FALSE; } } s = (addressbooks->e_book_query_to_string)(query); if (s == NULL) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to get GNOME addressbook request in string format\n"); return FALSE; } g_debug("GNOME addressbook request: %s\n", s); if (!(addressbooks->e_book_client_get_contacts_sync)(client, s, &scontacts, NULL, &error)) { (addressbooks->e_book_query_unref)(query); g_debug("Failed to get GNOME addressbook query results: %s\n", error->message); g_error_free(error); return FALSE; } } (addressbooks->e_book_query_unref)(query); if (addressbooks->e_book_new_system_addressbook != NULL) { if (dcontacts != NULL) { addressbooks->counter = 0; g_list_foreach(dcontacts, (GFunc)mmgui_addressbooks_get_gnome_contacts_foreach, addressbooks); } else { g_debug("No suitable contacts found\n"); } } else { if (scontacts != NULL) { addressbooks->counter = 0; g_slist_foreach(scontacts, (GFunc)mmgui_addressbooks_get_gnome_contacts_foreach, addressbooks); } else { g_debug("No suitable contacts found\n"); } } addressbooks->counter = 0; return TRUE; } mmgui_addressbooks_t mmgui_addressbooks_new(mmgui_libpaths_cache_t libcache) { mmgui_addressbooks_t addressbooks; gboolean libopened; guint akonadistatus; addressbooks = g_new0(struct _mmgui_addressbooks, 1); /*libebook*/ addressbooks->ebookmodule = NULL; addressbooks->gnomesupported = FALSE; addressbooks->gnomecontacts = NULL; /*Open module*/ addressbooks->ebookmodule = g_module_open(mmgui_libpaths_cache_get_library_name(libcache, "libebook-1.2"), G_MODULE_BIND_LAZY); if (addressbooks->ebookmodule != NULL) { libopened = TRUE; libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_query_field_exists", (gpointer *)&(addressbooks->e_book_query_field_exists)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_query_or", (gpointer *)&(addressbooks->e_book_query_or)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_query_unref", (gpointer *)&(addressbooks->e_book_query_unref)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_contact_get_const", (gpointer *)&(addressbooks->e_contact_get_const)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_contact_get", (gpointer *)&(addressbooks->e_contact_get)); if (g_module_symbol(addressbooks->ebookmodule, "e_book_new_system_addressbook", (gpointer *)&(addressbooks->e_book_new_system_addressbook))) { libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_open", (gpointer *)&(addressbooks->e_book_open)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_get_contacts", (gpointer *)&(addressbooks->e_book_get_contacts)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_get_source", (gpointer *)&(addressbooks->e_book_get_source)); /*Unused functions*/ addressbooks->e_source_registry_new_sync = NULL; addressbooks->e_source_registry_ref_builtin_address_book = NULL; addressbooks->e_book_client_new = NULL; addressbooks->e_client_open_sync = NULL; addressbooks->e_book_client_connect_sync = NULL; addressbooks->e_book_query_to_string = NULL; addressbooks->e_book_client_get_contacts_sync = NULL; } else { if (!g_module_symbol(addressbooks->ebookmodule, "e_book_client_connect_sync", (gpointer *)&(addressbooks->e_book_client_connect_sync))) { /*Since version 3.2 used these functions, but in 3.8 they are deprecated*/ libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_client_new", (gpointer *)&(addressbooks->e_book_client_new)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_client_open_sync", (gpointer *)&(addressbooks->e_client_open_sync)); addressbooks->e_book_client_connect_sync = NULL; } libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_source_registry_new_sync", (gpointer *)&(addressbooks->e_source_registry_new_sync)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_source_registry_ref_builtin_address_book", (gpointer *)&(addressbooks->e_source_registry_ref_builtin_address_book)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_query_to_string", (gpointer *)&(addressbooks->e_book_query_to_string)); libopened = libopened && g_module_symbol(addressbooks->ebookmodule, "e_book_client_get_contacts_sync", (gpointer *)&(addressbooks->e_book_client_get_contacts_sync)); /*Unused functions*/ addressbooks->e_book_get_contacts = NULL; addressbooks->e_book_open = NULL; addressbooks->e_book_get_source = NULL; } /*Available since 3.6 - not mandatory*/ if (!g_module_symbol(addressbooks->ebookmodule, "e_source_get_display_name", (gpointer *)&(addressbooks->e_source_get_display_name))) { /*Fallback function for older versions*/ if (!g_module_symbol(addressbooks->ebookmodule, "e_source_peek_name", (gpointer *)&(addressbooks->e_source_get_display_name))) { addressbooks->e_source_get_display_name = NULL; } } /*If some functions not exported, close library*/ if (!libopened) { addressbooks->e_book_query_field_exists = NULL; addressbooks->e_book_query_or = NULL; addressbooks->e_source_registry_new_sync = NULL; addressbooks->e_source_registry_ref_builtin_address_book = NULL; addressbooks->e_source_get_display_name = NULL; addressbooks->e_book_client_new = NULL; addressbooks->e_client_open_sync = NULL; addressbooks->e_book_query_to_string = NULL; addressbooks->e_book_client_get_contacts_sync = NULL; addressbooks->e_book_new_system_addressbook = NULL; addressbooks->e_book_open = NULL; addressbooks->e_book_get_contacts = NULL; addressbooks->e_book_query_unref = NULL; addressbooks->e_contact_get_const = NULL; addressbooks->e_contact_get = NULL; /*Close module*/ g_module_close(addressbooks->ebookmodule); addressbooks->ebookmodule = NULL; addressbooks->gnomesupported = FALSE; } else { /*Get contacts*/ addressbooks->gnomesupported = TRUE; mmgui_addressbooks_get_gnome_contacts(addressbooks); } } /*KDE addressbook*/ addressbooks->kdecontacts = NULL; addressbooks->kdesupported = FALSE; if (mmgui_addressbooks_session_service_activate(MMGUI_ADDRESSBOOKS_AKONADI_DBUS_INTERFACE, &akonadistatus)) { /*Open socket*/ addressbooks->aksocket = mmgui_addressbooks_open_kde_socket(); if (addressbooks->aksocket != -1) { /*Akonadi server started*/ addressbooks->kdesupported = TRUE; mmgui_addressbooks_get_kde_contacts(addressbooks); } else { /*Akonadi server not available*/ addressbooks->kdesupported = FALSE; } } return addressbooks; } gboolean mmgui_addressbooks_get_gnome_contacts_available(mmgui_addressbooks_t addressbooks) { if (addressbooks == NULL) return FALSE; return addressbooks->gnomesupported; } gboolean mmgui_addressbooks_get_kde_contacts_available(mmgui_addressbooks_t addressbooks) { if (addressbooks == NULL) return FALSE; return addressbooks->kdesupported; } GSList *mmgui_addressbooks_get_gnome_contacts_list(mmgui_addressbooks_t addressbooks) { if (addressbooks == NULL) return NULL; if (!addressbooks->gnomesupported) return NULL; return addressbooks->gnomecontacts; } GSList *mmgui_addressbooks_get_kde_contacts_list(mmgui_addressbooks_t addressbooks) { if (addressbooks == NULL) return NULL; if (!addressbooks->kdesupported) return NULL; return addressbooks->kdecontacts; } static gint mmgui_addressbooks_get_contact_compare(gconstpointer a, gconstpointer b) { mmgui_contact_t contact; guint id; contact = (mmgui_contact_t)a; id = GPOINTER_TO_UINT(b); if (contact->id < id) { return 1; } else if (contact->id > id) { return -1; } else { return 0; } } mmgui_contact_t mmgui_addressbooks_get_gnome_contact(mmgui_addressbooks_t addressbooks, guint index) { GSList *contactptr; mmgui_contact_t contact; if (addressbooks == NULL) return NULL; if (!addressbooks->gnomesupported) return NULL; if (addressbooks->gnomecontacts == NULL) return NULL; contactptr = g_slist_find_custom(addressbooks->gnomecontacts, GUINT_TO_POINTER(index), mmgui_addressbooks_get_contact_compare); if (contactptr != NULL) { contact = (mmgui_contact_t)contactptr->data; return contact; } else { return NULL; } } mmgui_contact_t mmgui_addressbooks_get_kde_contact(mmgui_addressbooks_t addressbooks, guint index) { GSList *contactptr; mmgui_contact_t contact; if (addressbooks == NULL) return NULL; if (!addressbooks->kdesupported) return NULL; if (addressbooks->kdecontacts == NULL) return NULL; contactptr = g_slist_find_custom(addressbooks->kdecontacts, GUINT_TO_POINTER(index), mmgui_addressbooks_get_contact_compare); if (contactptr != NULL) { contact = (mmgui_contact_t)contactptr->data; return contact; } else { return NULL; } } static void mmgui_addressbooks_free_contacts_list_foreach(gpointer data, gpointer user_data) { mmgui_contact_t contact; if (data == NULL) return; contact = (mmgui_contact_t)data; if (contact->name != NULL) { g_free(contact->name); } if (contact->number != NULL) { g_free(contact->number); } if (contact->email != NULL) { g_free(contact->email); } if (contact->group != NULL) { g_free(contact->group); } if (contact->name2 != NULL) { g_free(contact->name2); } if (contact->number2 != NULL) { g_free(contact->number2); } } void mmgui_addressbooks_close(mmgui_addressbooks_t addressbooks) { if (addressbooks == NULL) return; /*GNOME addressbook*/ addressbooks->gnomesupported = FALSE; if (addressbooks->ebookmodule != NULL) { /*First free contacts list*/ if (addressbooks->gnomecontacts != NULL) { g_slist_foreach(addressbooks->gnomecontacts, mmgui_addressbooks_free_contacts_list_foreach, NULL); g_slist_free(addressbooks->gnomecontacts); addressbooks->gnomecontacts = NULL; } /*Then unload module*/ g_module_close(addressbooks->ebookmodule); addressbooks->ebookmodule = NULL; } /*KDE addressbook*/ addressbooks->kdesupported = FALSE; if (addressbooks->kdecontacts != NULL) { /*Only free contacts list*/ g_slist_foreach(addressbooks->kdecontacts, mmgui_addressbooks_free_contacts_list_foreach, NULL); g_slist_free(addressbooks->kdecontacts); addressbooks->kdecontacts = NULL; } g_free(addressbooks); } modem-manager-gui-0.0.17.1/src/ussdlist.h0000644000175000017500000000266112124600222016503 0ustar alexalex/* * ussdlist.h * * Copyright 2012 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __USSDLIST_H__ #define __USSDLIST_H__ #include struct _ussdlist_entry { gchar *command; gchar *description; }; typedef struct _ussdlist_entry *ussdlist_entry_t; typedef void (*ussdlist_read_callback)(gchar *command, gchar *description, gboolean reencode, gpointer data); gboolean ussdlist_read_commands(ussdlist_read_callback callback, const gchar *persistentid, const gchar *internalid, gpointer data); gboolean ussdlist_start_xml_export(gboolean reencode); gboolean ussdlist_add_command_to_xml_export(gchar *command, gchar *description); gboolean ussdlist_end_xml_export(const gchar *persistentid); #endif /* __USSDLIST_H__ */ modem-manager-gui-0.0.17.1/src/ussdlist.c0000644000175000017500000001572112375210706016513 0ustar alexalex/* * ussdlist.c * * Copyright 2012 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "ussdlist.h" #include "encoding.h" #define USSDLIST_XML_HEADER "\n\n" #define USSDLIST_XML_ENTRY "\n\t" #define USSDLIST_XML_FOOTER "\n" struct _ussdlist_user_data { ussdlist_read_callback callback; gpointer data; }; typedef struct _ussdlist_user_data *ussdlist_user_data_t; static GString *xmlstring = NULL; static const gchar *ussdlist_form_file_path(const gchar *persistentid, const gchar *internalid); static void ussdlist_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error); static const gchar *ussdlist_form_file_path(const gchar *persistentid, const gchar *internalid) { const gchar *newfilepath; const gchar *newfilename; gchar filename[64]; const gchar *oldfilename; if (persistentid == NULL) return NULL; //Form path using XDG standard newfilepath = g_build_path(G_DIR_SEPARATOR_S, g_get_user_data_dir(), "modem-manager-gui", "devices", persistentid, NULL); if (newfilepath == NULL) return NULL; //If directory structure not exists, create it if (!g_file_test(newfilepath, G_FILE_TEST_IS_DIR)) { if (g_mkdir_with_parents(newfilepath, S_IRWXU|S_IXGRP|S_IXOTH) == -1) { g_warning("Failed to make XDG data directory: %s", newfilepath); } } //Form file name newfilename = g_build_filename(newfilepath, "ussdlist.xml", NULL); g_free((gchar *)newfilepath); if (newfilename == NULL) return NULL; //If file already exists, just work with it if ((g_file_test(newfilename, G_FILE_TEST_EXISTS)) || (internalid == NULL)) { return newfilename; } //Form old-style file path memset(filename, 0, sizeof(filename)); g_snprintf(filename, sizeof(filename), "ussd-%s.xml", internalid); oldfilename = g_build_filename(g_get_home_dir(), ".config", "modem-manager-gui", filename, NULL); if (oldfilename == NULL) return newfilename; //If file exists in old location, move it if (g_file_test(oldfilename, G_FILE_TEST_EXISTS)) { if (g_rename(oldfilename, newfilename) == -1) { g_warning("Failed to move file into XDG data directory: %s -> %s", oldfilename, newfilename); } } g_free((gchar *)oldfilename); return newfilename; } gboolean ussdlist_read_commands(ussdlist_read_callback callback, const gchar *persistentid, const gchar *internalid, gpointer data) { const gchar *filepath; gchar *contents; gsize length; GError *error; GMarkupParser mp; GMarkupParseContext *mpc; struct _ussdlist_user_data userdata; if ((callback == NULL) || (persistentid == NULL)) return FALSE; filepath = ussdlist_form_file_path(persistentid, internalid); if (filepath == NULL) return FALSE; error = NULL; if (!g_file_get_contents((const gchar *)filepath, &contents, &length, &error)) { g_free((gchar *)filepath); g_error_free(error); return FALSE; } g_free((gchar *)filepath); mp.start_element = ussdlist_xml_get_element; mp.end_element = NULL; mp.text = NULL; mp.passthrough = NULL; mp.error = NULL; userdata.callback = callback; userdata.data = data; mpc = g_markup_parse_context_new(&mp, 0, (gpointer)&userdata, NULL); g_markup_parse_context_parse(mpc, contents, length, &error); if (error != NULL) { //g_warning(error->message); g_error_free(error); g_markup_parse_context_free(mpc); return FALSE; } g_markup_parse_context_free(mpc); return TRUE; } static void ussdlist_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error) { gint i; gchar *command, *description; gboolean reencode; ussdlist_user_data_t userdata; userdata = (ussdlist_user_data_t)data; if (g_str_equal(element, "ussdlist")) { if (g_str_equal(attr_names[0], "reencode")) { reencode = (gboolean)atoi(attr_values[0]); (userdata->callback)(NULL, NULL, reencode, userdata->data); } } else if (g_str_equal(element, "ussd")) { i = 0; command = NULL; description = NULL; while (attr_names[i] != NULL) { if (g_str_equal(attr_names[i], "command")) { command = encoding_unescape_xml_markup((const gchar *)attr_values[i], strlen(attr_values[i])); } else if (g_str_equal(attr_names[i], "description")) { description = encoding_unescape_xml_markup((const gchar *)attr_values[i], strlen(attr_values[i])); } i++; } if ((command != NULL) && (description != NULL)) { (userdata->callback)(command, description, FALSE, userdata->data); } if (command != NULL) g_free(command); if (description != NULL) g_free(description); } } gboolean ussdlist_start_xml_export(gboolean reencode) { if (xmlstring != NULL) { g_string_free(xmlstring, TRUE); xmlstring = NULL; } xmlstring = g_string_new(NULL); g_string_append_printf(xmlstring, USSDLIST_XML_HEADER, reencode); return TRUE; } gboolean ussdlist_add_command_to_xml_export(gchar *command, gchar *description) { gchar *esccommand, *escdescription; if (xmlstring == NULL) return FALSE; if ((command == NULL) || (description == NULL)) return FALSE; esccommand = g_markup_escape_text(command, -1); escdescription = g_markup_escape_text(description, -1); if ((esccommand != NULL) && (escdescription != NULL)) { g_string_append_printf(xmlstring, USSDLIST_XML_ENTRY, esccommand, escdescription); g_free(esccommand); g_free(escdescription); return TRUE; } if (esccommand != NULL) g_free(esccommand); if (escdescription != NULL) g_free(escdescription); return FALSE; } gboolean ussdlist_end_xml_export(const gchar *persistentid) { const gchar *filepath; GError *error; if ((xmlstring == NULL) || (persistentid == NULL)) return FALSE; g_string_append(xmlstring, USSDLIST_XML_FOOTER); filepath = ussdlist_form_file_path(persistentid, NULL); if (filepath == NULL) return FALSE; error = NULL; if (!g_file_set_contents((const gchar *)filepath, xmlstring->str, xmlstring->len, &error)) { g_free((gchar *)filepath); g_error_free(error); return FALSE; } g_free((gchar *)filepath); return TRUE; } modem-manager-gui-0.0.17.1/src/providersdb.h0000644000175000017500000000276512372673430017201 0ustar alexalex/* * providersdb.h * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __PROVIDERSDB_H__ #define __PROVIDERSDB_H__ #include struct _mmgui_providers_db_entry { gchar country[3]; gchar *name; gchar *apn; GArray *id; guint tech; gchar *username; gchar *password; gchar *dns1; gchar *dns2; }; typedef struct _mmgui_providers_db_entry *mmgui_providers_db_entry_t; struct _mmgui_providers_db { GMappedFile *file; guint curparam; gchar curcountry[3]; gchar *curname; gboolean gotname; GArray *curid; mmgui_providers_db_entry_t curentry; GSList *providers; }; typedef struct _mmgui_providers_db *mmgui_providers_db_t; mmgui_providers_db_t mmgui_providers_db_create(void); void mmgui_providers_db_close(mmgui_providers_db_t db); #endif /* __PROVIDERSDB_H__ */ modem-manager-gui-0.0.17.1/src/notifications.c0000644000175000017500000002355012377412466017522 0ustar alexalex/* * notifications.c * * Copyright 2013-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "notifications.h" #include "resources.h" mmgui_notifications_t mmgui_notifications_new(mmgui_libpaths_cache_t libcache) { mmgui_notifications_t notifications; GError *error; gboolean libopened; GtkSettings *gtksettings; gchar *gtksoundtheme; GList *capabilities, *iterator; notifications = g_new0(struct _mmgui_notifications, 1); //libnotify notifications->notifymodule = NULL; //Open module notifications->notifymodule = g_module_open(mmgui_libpaths_cache_get_library_name(libcache, "libnotify"), G_MODULE_BIND_LAZY); if (notifications->notifymodule != NULL) { libopened = TRUE; libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_init", (gpointer *)&(notifications->notify_init)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_get_server_caps", (gpointer *)&(notifications->notify_get_server_caps)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_new", (gpointer *)&(notifications->notify_notification_new)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_set_timeout", (gpointer *)&(notifications->notify_notification_set_timeout)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_set_hint", (gpointer *)&(notifications->notify_notification_set_hint)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_set_image_from_pixbuf", (gpointer *)&(notifications->notify_notification_set_image_from_pixbuf)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_set_category", (gpointer *)&(notifications->notify_notification_set_category)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_set_urgency", (gpointer *)&(notifications->notify_notification_set_urgency)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_add_action", (gpointer *)&(notifications->notify_notification_add_action)); libopened = libopened && g_module_symbol(notifications->notifymodule, "notify_notification_show", (gpointer *)&(notifications->notify_notification_show)); //If some functions not exported, close library if (!libopened) { notifications->notify_init = NULL; notifications->notify_get_server_caps = NULL; notifications->notify_notification_new = NULL; notifications->notify_notification_set_timeout = NULL; notifications->notify_notification_set_hint = NULL; notifications->notify_notification_set_image_from_pixbuf = NULL; notifications->notify_notification_set_category = NULL; notifications->notify_notification_set_urgency = NULL; notifications->notify_notification_add_action = NULL; notifications->notify_notification_show = NULL; //Close module g_module_close(notifications->notifymodule); notifications->notifymodule = NULL; } else { /*Initialize libnotify*/ (notifications->notify_init)("Modem Manager GUI"); /*Handle capabilities*/ notifications->supportsaction = FALSE; capabilities = (notifications->notify_get_server_caps)(); if (capabilities != NULL) { for(iterator=capabilities; iterator!=NULL; iterator=iterator->next) { if (g_str_equal((gchar *)iterator->data, "actions")) { notifications->supportsaction = TRUE; break; } g_list_foreach(capabilities, (GFunc)g_free, NULL); g_list_free(capabilities); } } /*Load icon for notifications*/ error = NULL; notifications->notifyicon = gdk_pixbuf_new_from_file(RESOURCE_MAINWINDOW_ICON, &error); if ((notifications->notifyicon == NULL) && (error != NULL)) { g_debug("Error loadig application icon: %s\n", error->message); g_error_free(error); } } } //libcanberra notifications->canberramodule = NULL; notifications->cacontext = NULL; //Open module notifications->canberramodule = g_module_open(mmgui_libpaths_cache_get_library_name(libcache, "libcanberra"), G_MODULE_BIND_LAZY); if (notifications->canberramodule != NULL) { libopened = TRUE; libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_context_create", (gpointer *)&(notifications->ca_context_create)); libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_context_destroy", (gpointer *)&(notifications->ca_context_destroy)); libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_context_play", (gpointer *)&(notifications->ca_context_play)); libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_context_change_props", (gpointer *)&(notifications->ca_context_change_props)); libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_proplist_create", (gpointer *)&(notifications->ca_proplist_create)); libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_proplist_destroy", (gpointer *)&(notifications->ca_proplist_destroy)); libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_proplist_sets", (gpointer *)&(notifications->ca_proplist_sets)); libopened = libopened && g_module_symbol(notifications->canberramodule, "ca_context_play_full", (gpointer *)&(notifications->ca_context_play_full)); //If some functions not exported, close library if (!libopened) { notifications->ca_context_create = NULL; notifications->ca_context_destroy = NULL; notifications->ca_context_play = NULL; notifications->ca_context_change_props = NULL; notifications->ca_proplist_create = NULL; notifications->ca_proplist_destroy = NULL; notifications->ca_proplist_sets = NULL; notifications->ca_context_play_full = NULL; //Close module g_module_close(notifications->canberramodule); notifications->canberramodule = NULL; notifications->cacontext = NULL; } else { //Initialize libnotify (notifications->ca_context_create)(&(notifications->cacontext)); gtksettings = gtk_settings_get_default(); gtksoundtheme = NULL; g_object_get(gtksettings, "gtk-sound-theme-name", >ksoundtheme, NULL); if (gtksoundtheme != NULL) { (notifications->ca_context_change_props)(notifications->cacontext, "canberra.xdg-theme.name", gtksoundtheme, NULL); g_free(gtksoundtheme); } } } return notifications; } gboolean mmgui_notifications_show(mmgui_notifications_t notifications, gchar *caption, gchar *text, enum _mmgui_notifications_sound sound, NotifyActionCallback defcallback, gpointer userdata) { gpointer notification; gint caresult; ca_proplist *caproplist; if (notifications == NULL) return FALSE; if ((caption != NULL) && (text != NULL) && (notifications->notifymodule != NULL)) { notification = (notifications->notify_notification_new)(caption, text, NULL); if (notification != NULL) { (notifications->notify_notification_set_timeout)(notification, 3000); (notifications->notify_notification_set_image_from_pixbuf)(notification, notifications->notifyicon); if ((notifications->supportsaction) && (defcallback != NULL)) { (notifications->notify_notification_add_action)(notification, "default", "Default action", (NotifyActionCallback)defcallback, userdata, NULL); } (notifications->notify_notification_show)(notification, NULL); } } if ((sound != MMGUI_NOTIFICATIONS_SOUND_NONE) && (notifications->canberramodule != NULL) && (notifications->cacontext != NULL)) { (notifications->ca_proplist_create)(&caproplist); switch (sound) { case MMGUI_NOTIFICATIONS_SOUND_MESSAGE: (notifications->ca_proplist_sets)(caproplist, "media.filename", RESOURCE_SOUND_MESSAGE); (notifications->ca_proplist_sets)(caproplist, "media.role", "event"); break; case MMGUI_NOTIFICATIONS_SOUND_INFO: (notifications->ca_proplist_sets)(caproplist, "event.id", "dialog-info"); (notifications->ca_proplist_sets)(caproplist, "media.role", "event"); break; case MMGUI_NOTIFICATIONS_SOUND_NONE: break; default: (notifications->ca_proplist_sets)(caproplist, "event.id", "dialog-error"); (notifications->ca_proplist_sets)(caproplist, "media.role", "event"); break; } caresult = (notifications->ca_context_play_full)(notifications->cacontext, 0, caproplist, NULL, NULL); if (caresult != 0) { g_debug("Failed to play sound using libcanberra\n"); } (notifications->ca_proplist_destroy)(caproplist); } return TRUE; } void mmgui_notifications_close(mmgui_notifications_t notifications) { if (notifications == NULL) return; if (notifications->notifymodule != NULL) { //First close context if (notifications->cacontext != NULL) { (notifications->ca_context_destroy)(notifications->cacontext); } //Then unload module g_module_close(notifications->notifymodule); notifications->notifymodule = NULL; /*And free icon*/ if (notifications->notifyicon != NULL) { g_object_unref(notifications->notifyicon); } } if (notifications->canberramodule != NULL) { //Only module unload needed g_module_close(notifications->canberramodule); notifications->canberramodule = NULL; } g_free(notifications); } modem-manager-gui-0.0.17.1/src/sms-page.h0000644000175000017500000000404112375675512016365 0ustar alexalex/* * sms-page.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __SMS_PAGE_H__ #define __SMS_PAGE_H__ #include #include "main.h" /*SMS*/ gboolean mmgui_main_sms_get_message_list_from_thread(gpointer data); gboolean mmgui_main_sms_get_message_from_thread(gpointer data); gboolean mmgui_main_sms_handle_new_day_from_thread(gpointer data); gboolean mmgui_main_sms_send(mmgui_application_t mmguiapp, const gchar *number, const gchar *text); void mmgui_main_sms_remove(mmgui_application_t mmguiapp); void mmgui_main_sms_remove_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_sms_new(mmgui_application_t mmguiapp); void mmgui_main_sms_new_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_sms_answer(mmgui_application_t mmguiapp); void mmgui_main_sms_answer_button_clicked_signal(GObject *object, gpointer data); gboolean mmgui_main_sms_list_fill(mmgui_application_t mmguiapp); void mmgui_main_sms_load_contacts_from_system_addressbooks(mmgui_application_t mmguiapp); void mmgui_main_sms_restore_settings_for_modem(mmgui_application_t mmguiapp); void mmgui_main_sms_restore_contacts_for_modem(mmgui_application_t mmguiapp); void mmgui_main_sms_list_init(mmgui_application_t mmguiapp); void mmgui_main_sms_list_clear(mmgui_application_t mmguiapp); #endif /* __SMS_PAGE_H__ */ modem-manager-gui-0.0.17.1/src/providersdb.c0000644000175000017500000004247512375673236017205 0ustar alexalex/* * providersdb.c * * Copyright 2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include "providersdb.h" #include "resources.h" enum _mmgui_providers_db_params { MMGUI_PROVIDERS_DB_PARAM_COUNTRY = 0, MMGUI_PROVIDERS_DB_PARAM_PROVIDER, MMGUI_PROVIDERS_DB_PARAM_NAME, MMGUI_PROVIDERS_DB_PARAM_GSM, MMGUI_PROVIDERS_DB_PARAM_CDMA, MMGUI_PROVIDERS_DB_PARAM_NETWORK_ID, MMGUI_PROVIDERS_DB_PARAM_SID, MMGUI_PROVIDERS_DB_PARAM_APN, MMGUI_PROVIDERS_DB_PARAM_USERNAME, MMGUI_PROVIDERS_DB_PARAM_PASSWORD, MMGUI_PROVIDERS_DB_PARAM_DNS, MMGUI_PROVIDERS_DB_PARAM_NULL }; enum _mmgui_providers_db_tech { MMGUI_PROVIDERS_DB_TECH_GSM = 0, MMGUI_PROVIDERS_DB_TECH_CDMA }; const gchar *mmgui_providersdb_countries[250][2] = { {"Afghanistan", "af"}, {"Åland Islands", "ax"}, {"Albania", "al"}, {"Algeria", "dz"}, {"American Samoa", "as"}, {"Andorra", "ad"}, {"Angola", "ao"}, {"Anguilla", "ai"}, {"Antarctica", "aq"}, {"Antigua and Barbuda", "ag"}, {"Argentina", "ar"}, {"Armenia", "am"}, {"Aruba", "aw"}, {"Australia", "au"}, {"Austria", "at"}, {"Azerbaijan", "az"}, {"Bahamas", "bs"}, {"Bahrain", "bh"}, {"Bangladesh", "bd"}, {"Barbados", "bb"}, {"Belarus", "by"}, {"Belgium", "be"}, {"Belize", "bz"}, {"Benin", "bj"}, {"Bermuda", "bm"}, {"Bhutan", "bt"}, {"Bolivia, Plurinational State of", "bo"}, {"Bonaire, Sint Eustatius and Saba", "bq"}, {"Bosnia and Herzegovina", "ba"}, {"Botswana", "bw"}, {"Bouvet Island", "bv"}, {"Brazil", "br"}, {"British Indian Ocean Territory", "io"}, {"Brunei Darussalam", "bn"}, {"Bulgaria", "bg"}, {"Burkina Faso", "bf"}, {"Burundi", "bi"}, {"Cambodia", "kh"}, {"Cameroon", "cm"}, {"Canada", "ca"}, {"Cabo Verde", "cv"}, {"Cayman Islands", "ky"}, {"Central African Republic", "cf"}, {"Chad", "td"}, {"Chile", "cl"}, {"China", "cn"}, {"Christmas Island", "cx"}, {"Cocos (Keeling) Islands", "cc"}, {"Colombia", "co"}, {"Comoros", "km"}, {"Congo", "cg"}, {"Congo, the Democratic Republic of the", "cd"}, {"Cook Islands", "ck"}, {"Costa Rica", "cr"}, {"Côte d'Ivoire", "ci"}, {"Croatia", "hr"}, {"Cuba", "cu"}, {"Curaçao", "cw"}, {"Cyprus", "cy"}, {"Czech Republic", "cz"}, {"Denmark", "dk"}, {"Djibouti", "dj"}, {"Dominica", "dm"}, {"Dominican Republic", "do"}, {"Ecuador", "ec"}, {"Egypt", "eg"}, {"El Salvador", "sv"}, {"Equatorial Guinea", "gq"}, {"Eritrea", "er"}, {"Estonia", "ee"}, {"Ethiopia", "et"}, {"Falkland Islands (Malvinas)", "fk"}, {"Faroe Islands", "fo"}, {"Fiji", "fj"}, {"Finland", "fi"}, {"France", "fr"}, {"French Guiana", "gf"}, {"French Polynesia", "pf"}, {"French Southern Territories", "tf"}, {"Gabon", "ga"}, {"Gambia", "gm"}, {"Georgia", "ge"}, {"Germany", "de"}, {"Ghana", "gh"}, {"Gibraltar", "gi"}, {"Greece", "gr"}, {"Greenland", "gl"}, {"Grenada", "gd"}, {"Guadeloupe", "gp"}, {"Guam", "gu"}, {"Guatemala", "gt"}, {"Guernsey", "gg"}, {"Guinea", "gn"}, {"Guinea-Bissau", "gw"}, {"Guyana", "gy"}, {"Haiti", "ht"}, {"Heard Island and McDonald Islands", "hm"}, {"Holy See (Vatican City State)", "va"}, {"Honduras", "hn"}, {"Hong Kong", "hk"}, {"Hungary", "hu"}, {"Iceland", "is"}, {"India", "in"}, {"Indonesia", "id"}, {"Iran, Islamic Republic of", "ir"}, {"Iraq", "iq"}, {"Ireland", "ie"}, {"Isle of Man", "im"}, {"Israel", "il"}, {"Italy", "it"}, {"Jamaica", "jm"}, {"Japan", "jp"}, {"Jersey", "je"}, {"Jordan", "jo"}, {"Kazakhstan", "kz"}, {"Kenya", "ke"}, {"Kiribati", "ki"}, {"Korea, Democratic People's Republic of", "kp"}, {"Korea, Republic of", "kr"}, {"Kuwait", "kw"}, {"Kyrgyzstan", "kg"}, {"Lao People's Democratic Republic", "la"}, {"Latvia", "lv"}, {"Lebanon", "lb"}, {"Lesotho", "ls"}, {"Liberia", "lr"}, {"Libya", "ly"}, {"Liechtenstein", "li"}, {"Lithuania", "lt"}, {"Luxembourg", "lu"}, {"Macao", "mo"}, {"Macedonia, the former Yugoslav Republic of", "mk"}, {"Madagascar", "mg"}, {"Malawi", "mw"}, {"Malaysia", "my"}, {"Maldives", "mv"}, {"Mali", "ml"}, {"Malta", "mt"}, {"Marshall Islands", "mh"}, {"Martinique", "mq"}, {"Mauritania", "mr"}, {"Mauritius", "mu"}, {"Mayotte", "yt"}, {"Mexico", "mx"}, {"Micronesia, Federated States of", "fm"}, {"Moldova, Republic of", "md"}, {"Monaco", "mc"}, {"Mongolia", "mn"}, {"Montenegro", "me"}, {"Montserrat", "ms"}, {"Morocco", "ma"}, {"Mozambique", "mz"}, {"Myanmar", "mm"}, {"Namibia", "na"}, {"Nauru", "nr"}, {"Nepal", "np"}, {"Netherlands", "nl"}, {"New Caledonia", "nc"}, {"New Zealand", "nz"}, {"Nicaragua", "ni"}, {"Niger", "ne"}, {"Nigeria", "ng"}, {"Niue", "nu"}, {"Norfolk Island", "nf"}, {"Northern Mariana Islands", "mp"}, {"Norway", "no"}, {"Oman", "om"}, {"Pakistan", "pk"}, {"Palau", "pw"}, {"Palestine, State of", "ps"}, {"Panama", "pa"}, {"Papua New Guinea", "pg"}, {"Paraguay", "py"}, {"Peru", "pe"}, {"Philippines", "ph"}, {"Pitcairn", "pn"}, {"Poland", "pl"}, {"Portugal", "pt"}, {"Puerto Rico", "pr"}, {"Qatar", "qa"}, {"Réunion", "re"}, {"Romania", "ro"}, {"Russian Federation", "ru"}, {"Rwanda", "rw"}, {"Saint Barthélemy", "bl"}, {"Saint Helena, Ascension and Tristan da Cunha", "sh"}, {"Saint Kitts and Nevis", "kn"}, {"Saint Lucia", "lc"}, {"Saint Martin (French part)", "mf"}, {"Saint Pierre and Miquelon", "pm"}, {"Saint Vincent and the Grenadines", "vc"}, {"Samoa", "ws"}, {"San Marino", "sm"}, {"Sao Tome and Principe", "st"}, {"Saudi Arabia", "sa"}, {"Senegal", "sn"}, {"Serbia", "rs"}, {"Seychelles", "sc"}, {"Sierra Leone", "sl"}, {"Singapore", "sg"}, {"Sint Maarten (Dutch part)", "sx"}, {"Slovakia", "sk"}, {"Slovenia", "si"}, {"Solomon Islands", "sb"}, {"Somalia", "so"}, {"South Africa", "za"}, {"South Georgia and the South Sandwich Islands", "gs"}, {"South Sudan", "ss"}, {"Spain", "es"}, {"Sri Lanka", "lk"}, {"Sudan", "sd"}, {"Suriname", "sr"}, {"Svalbard and Jan Mayen", "sj"}, {"Swaziland", "sz"}, {"Sweden", "se"}, {"Switzerland", "ch"}, {"Syrian Arab Republic", "sy"}, {"Taiwan, Province of China", "tw"}, {"Tajikistan", "tj"}, {"Tanzania, United Republic of", "tz"}, {"Thailand", "th"}, {"Timor-Leste", "tl"}, {"Togo", "tg"}, {"Tokelau", "tk"}, {"Tonga", "to"}, {"Trinidad and Tobago", "tt"}, {"Tunisia", "tn"}, {"Turkey", "tr"}, {"Turkmenistan", "tm"}, {"Turks and Caicos Islands", "tc"}, {"Tuvalu", "tv"}, {"Uganda", "ug"}, {"Ukraine", "ua"}, {"United Arab Emirates", "ae"}, {"United Kingdom", "gb"}, {"United States", "us"}, {"United States Minor Outlying Islands", "um"}, {"Uruguay", "uy"}, {"Uzbekistan", "uz"}, {"Vanuatu", "vu"}, {"Venezuela, Bolivarian Republic of", "ve"}, {"Viet Nam", "vn"}, {"Virgin Islands, British", "vg"}, {"Virgin Islands, U.S.", "vi"}, {"Wallis and Futuna", "wf"}, {"Western Sahara", "eh"}, {"Yemen", "ye"}, {"Zambia", "zm"}, {"Zimbabwe", "zw"}, {NULL, NULL} }; static gboolean mmgui_providers_db_xml_parse(mmgui_providers_db_t db); static void mmgui_providers_db_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error); static void mmgui_providers_db_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error); static void mmgui_providers_db_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error); /*static void mmgui_providers_db_foreach(gpointer data, gpointer user_data) { mmgui_providers_db_entry_t entry; guint id, i; entry = (mmgui_providers_db_entry_t)data; if (entry->tech == MMGUI_PROVIDERS_DB_TECH_GSM) { g_printf("GSM: %s, %s, %s\n", entry->country, entry->name, entry->apn); if (entry->id != NULL) { g_printf("MCC, MNC: "); for (i=0; iid->len; i++) { id = g_array_index(entry->id, guint, i); g_printf("%u, %u; ", (id & 0xffff0000) >> 16, id & 0x0000ffff); } g_printf("\n"); } if (entry->username != NULL) { g_printf("USER NAME: %s\n", entry->username); } if (entry->password != NULL) { g_printf("PASSWORD: %s\n", entry->password); } if (entry->dns1 != NULL) { g_printf("DNS1: %s\n", entry->dns1); } if (entry->dns2 != NULL) { g_printf("DNS2: %s\n", entry->dns2); } g_printf("\n"); } else if (entry->tech == MMGUI_PROVIDERS_DB_TECH_CDMA) { g_printf("CDMA: %s, %s\n", entry->country, entry->name); if (entry->id != NULL) { g_printf("SIDs: "); for (i=0; iid->len; i++) { id = g_array_index(entry->id, guint, i); g_printf("%u; ", id); } g_printf("\n"); } if (entry->username != NULL) { g_printf("USER NAME: %s\n", entry->username); } if (entry->password != NULL) { g_printf("PASSWORD: %s\n", entry->password); } if (entry->dns1 != NULL) { g_printf("DNS1: %s\n", entry->dns1); } if (entry->dns2 != NULL) { g_printf("DNS2: %s\n", entry->dns2); } g_printf("\n"); } }*/ mmgui_providers_db_t mmgui_providers_db_create(void) { mmgui_providers_db_t db; GError *error; db = g_new(struct _mmgui_providers_db, 1); error = NULL; db->file = g_mapped_file_new(RESOURCE_PROVIDERS_DB, FALSE, &error); if ((db->file != NULL) && (error == NULL)) { db->curparam = MMGUI_PROVIDERS_DB_PARAM_NULL; db->curname = NULL; db->gotname = FALSE; db->curid = NULL; db->curentry = NULL; db->providers = NULL; mmgui_providers_db_xml_parse(db); return db; } else { g_debug("File not opened: %s\n", error->message); g_free(db); return NULL; } } void mmgui_providers_db_close(mmgui_providers_db_t db) { if (db == NULL) return; //free parsed data g_mapped_file_unref(db->file); g_free(db); } static gboolean mmgui_providers_db_xml_parse(mmgui_providers_db_t db) { GMarkupParser mp; GMarkupParseContext *mpc; GError *error = NULL; if (db == NULL) return FALSE; if (db->file == NULL) return FALSE; mp.start_element = mmgui_providers_db_xml_get_element; mp.end_element = mmgui_providers_db_xml_end_element; mp.text = mmgui_providers_db_xml_get_value; mp.passthrough = NULL; mp.error = NULL; mpc = g_markup_parse_context_new(&mp, 0, db, NULL); g_markup_parse_context_parse(mpc, g_mapped_file_get_contents(db->file), g_mapped_file_get_length(db->file), &error); if (error != NULL) { g_error_free(error); g_markup_parse_context_free(mpc); return FALSE; } g_markup_parse_context_free(mpc); return TRUE; } static void mmgui_providers_db_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error) { mmgui_providers_db_t db; mmgui_providers_db_entry_t entry; guint netid, i; db = (mmgui_providers_db_t)data; if (db == NULL) return; if (g_str_equal(element, "country")) { if ((attr_names[0] != NULL) && (attr_values[0] != NULL)) { if (g_str_equal(attr_names[0], "code")) { memset(db->curcountry, 0, sizeof(db->curcountry)); memcpy(db->curcountry, attr_values[0], 2); } } db->curparam = MMGUI_PROVIDERS_DB_PARAM_COUNTRY; } else if (g_str_equal(element, "provider")) { db->curparam = MMGUI_PROVIDERS_DB_PARAM_PROVIDER; } else if (g_str_equal(element, "name")) { db->curparam = MMGUI_PROVIDERS_DB_PARAM_NAME; } else if (g_str_equal(element, "gsm")) { db->curparam = MMGUI_PROVIDERS_DB_PARAM_GSM; } else if (g_str_equal(element, "cdma")) { entry = g_new0(struct _mmgui_providers_db_entry, 1); /*Technology*/ entry->tech = MMGUI_PROVIDERS_DB_TECH_CDMA; /*Country*/ memcpy(entry->country, db->curcountry, sizeof(entry->country)); /*Operator name*/ entry->name = NULL; /*Access point*/ entry->apn = NULL; /*Copy identifiers*/ if (db->curid != NULL) { entry->id = g_array_new(FALSE, TRUE, sizeof(guint)); for (i=0; icurid->len; i++) { netid = g_array_index(db->curid, guint, i); g_array_append_val(entry->id, netid); } } /*Store pointer for easy access*/ db->curentry = entry; /*Add pointer to list*/ db->providers = g_slist_prepend(db->providers, entry); db->curparam = MMGUI_PROVIDERS_DB_PARAM_CDMA; } else if (g_str_equal(element, "network-id")) { netid = 0; if ((attr_names[0] != NULL) && (attr_values[0] != NULL)) { if (g_str_equal(attr_names[0], "mcc")) { netid |= (atoi(attr_values[0]) << 16) & 0xffff0000; } } if ((attr_names[1] != NULL) && (attr_values[1] != NULL)) { if (g_str_equal(attr_names[1], "mnc")) { netid |= atoi(attr_values[1]) & 0x0000ffff; } } if (netid != 0) { if (db->curentry == NULL) { if (db->curid == NULL) { db->curid = g_array_new(FALSE, TRUE, sizeof(guint)); } g_array_append_val(db->curid, netid); } else { if (db->curentry->id == NULL) { db->curentry->id = g_array_new(FALSE, TRUE, sizeof(guint)); } g_array_append_val(db->curentry->id, netid); } } db->curparam = MMGUI_PROVIDERS_DB_PARAM_NETWORK_ID; } else if (g_str_equal(element, "sid")) { netid = 0; if ((attr_names[0] != NULL) && (attr_values[0] != NULL)) { if (g_str_equal(attr_names[0], "value")) { netid = (atoi(attr_values[0]) & 0xffffffff); } } if (netid != 0) { if (db->curentry == NULL) { if (db->curid == NULL) { db->curid = g_array_new(FALSE, TRUE, sizeof(guint)); } g_array_append_val(db->curid, netid); } else { if (db->curentry->id == NULL) { db->curentry->id = g_array_new(FALSE, TRUE, sizeof(guint)); } g_array_append_val(db->curentry->id, netid); } } db->curparam = MMGUI_PROVIDERS_DB_PARAM_SID; } else if (g_str_equal(element, "apn")) { if ((attr_names[0] != NULL) && (attr_values[0] != NULL)) { if (g_str_equal(attr_names[0], "value")) { entry = g_new0(struct _mmgui_providers_db_entry, 1); /*Technology*/ entry->tech = MMGUI_PROVIDERS_DB_TECH_GSM; /*Country*/ memcpy(entry->country, db->curcountry, sizeof(entry->country)); /*Operator name*/ entry->name = NULL; /*Access point*/ entry->apn = g_strdup(attr_values[0]); /*Copy identifiers*/ if (db->curid != NULL) { entry->id = g_array_new(FALSE, TRUE, sizeof(guint)); for (i=0; icurid->len; i++) { netid = g_array_index(db->curid, guint, i); g_array_append_val(entry->id, netid); } } /*Store pointer for easy access*/ db->curentry = entry; /*Add pointer to list*/ db->providers = g_slist_prepend(db->providers, entry); } } db->curparam = MMGUI_PROVIDERS_DB_PARAM_APN; } else if (g_str_equal(element, "username")) { db->curparam = MMGUI_PROVIDERS_DB_PARAM_USERNAME; } else if (g_str_equal(element, "password")) { db->curparam = MMGUI_PROVIDERS_DB_PARAM_PASSWORD; } else if (g_str_equal(element, "dns")) { db->curparam = MMGUI_PROVIDERS_DB_PARAM_DNS; } else { db->curparam = MMGUI_PROVIDERS_DB_PARAM_NULL; } } static void mmgui_providers_db_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error) { mmgui_providers_db_t db; db = (mmgui_providers_db_t)data; if (db == NULL) return; if ((db->curparam == MMGUI_PROVIDERS_DB_PARAM_NULL) || (text[0] == '\n')) return; switch (db->curparam) { case MMGUI_PROVIDERS_DB_PARAM_NAME: if (db->curentry != NULL) { if (db->curentry->name != NULL) { g_free(db->curentry->name); } db->curentry->name = g_strdup(text); } else { if (db->curname != NULL) { g_free(db->curname); } db->curname = g_strdup(text); } break; case MMGUI_PROVIDERS_DB_PARAM_USERNAME: if (db->curentry != NULL) { db->curentry->username = g_strdup(text); } break; case MMGUI_PROVIDERS_DB_PARAM_PASSWORD: if (db->curentry != NULL) { db->curentry->password = g_strdup(text); } break; case MMGUI_PROVIDERS_DB_PARAM_DNS: if (db->curentry != NULL) { if (db->curentry->dns1 == NULL) { db->curentry->dns1 = g_strdup(text); } else if (db->curentry->dns2 == NULL) { db->curentry->dns2 = g_strdup(text); } } break; default: break; } } static void mmgui_providers_db_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error) { mmgui_providers_db_t db; gchar *planname; db = (mmgui_providers_db_t)data; if (db == NULL) return; if ((g_str_equal(element, "cdma")) || (g_str_equal(element, "apn"))) { if (db->curentry->name == NULL) { if (db->curname != NULL) { db->curentry->name = g_strdup(db->curname); } else { db->curentry->name = g_strdup("New provider"); } } else { if (db->curname != NULL) { if (!g_str_equal(db->curname, db->curentry->name)) { planname = db->curentry->name; db->curentry->name = g_strdup_printf("%s - %s", db->curname, planname); g_free(planname); } } } db->curentry = NULL; } else if (g_str_equal(element, "provider")) { if (db->curname != NULL) { g_free(db->curname); db->curname = NULL; } if (db->curid != NULL) { g_array_unref(db->curid); db->curid = NULL; } } } modem-manager-gui-0.0.17.1/src/smsdb.h0000644000175000017500000000710712171223464015754 0ustar alexalex/* * smsdb.h * * Copyright 2012-2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __SMSDB_H__ #define __SMSDB_H__ enum _mmgui_smsdb_sms_folder { MMGUI_SMSDB_SMS_FOLDER_INCOMING = 0, MMGUI_SMSDB_SMS_FOLDER_SENT, MMGUI_SMSDB_SMS_FOLDER_DRAFTS }; struct _smsdb { const gchar *filepath; guint unreadmessages; }; typedef struct _smsdb *smsdb_t; struct _mmgui_sms_message { gchar *number; gchar *svcnumber; GArray *idents; GString *text; gulong dbid; gboolean read; gboolean binary; guint folder; time_t timestamp; }; typedef struct _mmgui_sms_message *mmgui_sms_message_t; smsdb_t mmgui_smsdb_open(const gchar *persistentid, const gchar *internalid); gboolean mmgui_smsdb_close(smsdb_t smsdb); /*Message functions*/ mmgui_sms_message_t mmgui_smsdb_message_create(void); void mmgui_smsdb_message_free(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_number(mmgui_sms_message_t message, const gchar *number); const gchar *mmgui_smsdb_message_get_number(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_service_number(mmgui_sms_message_t message, const gchar *number); const gchar *mmgui_smsdb_message_get_service_number(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_text(mmgui_sms_message_t message, const gchar *text, gboolean append); const gchar *mmgui_smsdb_message_get_text(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_data(mmgui_sms_message_t message, const gchar *data, gsize len, gboolean append); gboolean mmgui_smsdb_message_set_identifier(mmgui_sms_message_t message, guint ident, gboolean append); guint mmgui_smsdb_message_get_identifier(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_timestamp(mmgui_sms_message_t message, time_t timestamp); time_t mmgui_smsdb_message_get_timestamp(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_read(mmgui_sms_message_t message, gboolean read); gboolean mmgui_smsdb_message_get_read(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_folder(mmgui_sms_message_t message, enum _mmgui_smsdb_sms_folder folder); enum _mmgui_smsdb_sms_folder mmgui_smsdb_message_get_folder(mmgui_sms_message_t message); gboolean mmgui_smsdb_message_set_binary(mmgui_sms_message_t message, gboolean binary); gboolean mmgui_smsdb_message_get_binary(mmgui_sms_message_t message); gulong mmgui_smsdb_message_get_db_identifier(mmgui_sms_message_t message); /*General functions*/ guint mmgui_smsdb_get_unread_messages(smsdb_t smsdb); gboolean mmgui_smsdb_add_sms(smsdb_t smsdb, mmgui_sms_message_t message); GSList *mmgui_smsdb_read_sms_list(smsdb_t smsdb); void mmgui_smsdb_message_free_list(GSList *smslist); mmgui_sms_message_t mmgui_smsdb_read_sms_message(smsdb_t smsdb, gulong idvalue); gboolean mmgui_smsdb_remove_sms_message(smsdb_t smsdb, gulong idvalue); gboolean mmgui_smsdb_set_message_read_status(smsdb_t smsdb, gulong idvalue, gboolean readflag); #endif /* __SMSDB_H__ */ modem-manager-gui-0.0.17.1/src/sms-page.c0000644000175000017500000017240112375675552016372 0ustar alexalex/* * sms-page.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "modem-settings.h" #include "notifications.h" #include "ayatana.h" #include "strformat.h" #include "mmguicore.h" #include "smsdb.h" #include "contacts-page.h" #include "resources.h" #include "sms-page.h" #include "main.h" enum _mmgui_main_smslist_columns { MMGUI_MAIN_SMSLIST_ICON = 0, MMGUI_MAIN_SMSLIST_SMS, MMGUI_MAIN_SMSLIST_ID, MMGUI_MAIN_SMSLIST_FOLDER, MMGUI_MAIN_SMSLIST_ISFOLDER, MMGUI_MAIN_SMSLIST_COLUMNS }; enum _mmgui_main_new_sms_validation { MMGUI_MAIN_NEW_SMS_VALIDATION_VALID = 0x00, MMGUI_MAIN_NEW_SMS_VALIDATION_WRONG_NUMBER = 0x01, MMGUI_MAIN_NEW_SMS_VALIDATION_WRONG_TEXT = 0x02 }; enum _mmgui_main_new_sms_dialog_result { MMGUI_MAIN_NEW_SMS_DIALOG_CLOSE = 0, MMGUI_MAIN_NEW_SMS_DIALOG_SAVE, MMGUI_MAIN_NEW_SMS_DIALOG_SEND }; enum _mmgui_main_sms_source { MMGUI_MAIN_SMS_SOURCE_MODEM = 0, MMGUI_MAIN_SMS_SOURCE_GNOME, MMGUI_MAIN_SMS_SOURCE_KDE, MMGUI_MAIN_SMS_SOURCE_HISTORY, MMGUI_MAIN_SMS_SOURCE_CAPTION, MMGUI_MAIN_SMS_SOURCE_SEPARATOR }; enum _mmgui_main_sms_completion { MMGUI_MAIN_SMS_COMPLETION_NAME = 0, MMGUI_MAIN_SMS_COMPLETION_NUMBER, MMGUI_MAIN_SMS_COMPLETION_SOURCE, MMGUI_MAIN_SMS_COMPLETION_COLUMNS }; enum _mmgui_main_sms_list { MMGUI_MAIN_SMS_LIST_NAME = 0, MMGUI_MAIN_SMS_LIST_NUMBER, MMGUI_MAIN_SMS_LIST_SOURCE, MMGUI_MAIN_SMS_LIST_COLUMNS }; struct _sms_selection_data { mmgui_application_t mmguiapp; gulong messageid; }; typedef struct _sms_selection_data *sms_selection_data_t; static void mmgui_main_sms_notification_show_window_callback(gpointer notification, gchar *action, gpointer userdata); static void mmgui_main_sms_select_entry_from_list(mmgui_application_t mmguiapp, gulong entryid, gboolean isfolder); static void mmgui_main_sms_get_message_list_hash_destroy_notify(gpointer data); static void mmgui_main_sms_new_dialog_number_changed_signal(GtkEditable *editable, gpointer data); static enum _mmgui_main_new_sms_dialog_result mmgui_main_sms_new_dialog(mmgui_application_t mmguiapp, const gchar *number, const gchar *text); static void mmgui_main_sms_list_cursor_changed_signal(GtkTreeView *tree_view, gpointer data); static void mmgui_main_sms_list_row_activated_signal(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data); static void mmgui_main_sms_add_to_list(mmgui_application_t mmguiapp, mmgui_sms_message_t sms, GtkTreeModel *model); static gboolean mmgui_main_sms_autocompletion_select_entry_signal(GtkEntryCompletion *widget, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data); static void mmgui_main_sms_autocompletion_model_fill(mmgui_application_t mmguiapp, guint source); static void mmgui_main_sms_menu_model_fill(mmgui_application_t mmguiapp, guint source); static void mmgui_main_sms_menu_data_func(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data); static gboolean mmgui_main_sms_menu_separator_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data); static gchar *mmgui_main_sms_list_select_entry_signal(GtkComboBox *combo, const gchar *path, gpointer user_data); static void mmgui_main_sms_load_numbers_history(mmgui_application_t mmguiapp); static void mmgui_main_sms_add_number_to_history(mmgui_application_t mmguiapp, gchar *number); static gchar *mmgui_main_sms_get_first_number_from_history(mmgui_application_t mmguiapp, gchar *defnumber); static gchar *mmgui_main_sms_get_name_for_number(mmgui_application_t mmguiapp, gchar *number); /*SMS*/ static void mmgui_main_sms_notification_show_window_callback(gpointer notification, gchar *action, gpointer userdata) { sms_selection_data_t seldata; seldata = (sms_selection_data_t)userdata; if (seldata == NULL) return; if (gtk_widget_get_sensitive(seldata->mmguiapp->window->smsbutton)) { /*Select received message*/ mmgui_main_sms_select_entry_from_list(seldata->mmguiapp, seldata->messageid, FALSE); /*Open SMS page*/ gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(seldata->mmguiapp->window->smsbutton), TRUE); /*Show window*/ gtk_window_present(GTK_WINDOW(seldata->mmguiapp->window->window)); } g_free(seldata); } static void mmgui_main_sms_select_entry_from_list(mmgui_application_t mmguiapp, gulong entryid, gboolean isfolder) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter folderiter, msgiter; GtkTreeIter *firstfolderiter, *entryiter; GtkTreePath *path; gboolean foldervalid, msgvalid; gulong curid; guint curfolder; gboolean curisfolder; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->smslist)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mmguiapp->window->smslist)); if ((model == NULL) || (selection == NULL)) return; firstfolderiter = NULL; entryiter = NULL; foldervalid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &folderiter); while ((foldervalid) && (entryiter == NULL)) { /*Folders*/ gtk_tree_model_get(model, &folderiter, MMGUI_MAIN_SMSLIST_ID, &curid, MMGUI_MAIN_SMSLIST_FOLDER, &curfolder, MMGUI_MAIN_SMSLIST_ISFOLDER, &curisfolder, -1); if (curisfolder) { /*First folder*/ if (firstfolderiter == NULL) { firstfolderiter = gtk_tree_iter_copy(&folderiter); } if (isfolder) { /*Save folder iterator*/ if (curfolder == entryid) { entryiter = gtk_tree_iter_copy(&folderiter); } } else if (gtk_tree_model_iter_has_child(model, &folderiter)) { /*Messages*/ if (gtk_tree_model_iter_children(model, &msgiter, &folderiter)) { do { gtk_tree_model_get(model, &msgiter, MMGUI_MAIN_SMSLIST_ID, &curid, MMGUI_MAIN_SMSLIST_FOLDER, &curfolder, MMGUI_MAIN_SMSLIST_ISFOLDER, &curisfolder, -1); /*Save message iterator*/ if ((!curisfolder) && (curid == entryid)) { entryiter = gtk_tree_iter_copy(&msgiter); } msgvalid = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &msgiter); } while ((msgvalid) && (entryiter == NULL)); } } } foldervalid = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &folderiter); } if (entryiter != NULL) { /*Message found - select it*/ gtk_tree_selection_select_iter(selection, entryiter); path = gtk_tree_model_get_path(model, entryiter); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(mmguiapp->window->smslist), path, NULL, TRUE, 0.5, 0.0); gtk_tree_path_free (path); g_signal_emit_by_name(G_OBJECT(mmguiapp->window->smslist), "cursor-changed", NULL); gtk_tree_iter_free(entryiter); if (firstfolderiter != NULL) { /*'Incoming' folder placement - forget it*/ gtk_tree_iter_free(firstfolderiter); } } else if (firstfolderiter != NULL) { /*Select 'Incoming' folder if message isn't found*/ gtk_tree_selection_select_iter(selection, firstfolderiter); path = gtk_tree_model_get_path(model, firstfolderiter); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(mmguiapp->window->smslist), path, NULL, TRUE, 0.5, 0.0); gtk_tree_path_free (path); g_signal_emit_by_name(G_OBJECT(mmguiapp->window->smslist), "cursor-changed", NULL); gtk_tree_iter_free(firstfolderiter); } } static void mmgui_main_sms_get_message_list_hash_destroy_notify(gpointer data) { //Free unique sender name hash table entries if (data != NULL) g_free(data); } gboolean mmgui_main_sms_get_message_list_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; GSList *messages, *iterator; mmgui_sms_message_t message; sms_selection_data_t seldata; guint nummessages, addedsender; gchar *notifycaption, *currentsender; GHashTable *sendernames; GHashTableIter sendernamesiter; gpointer sendernameskey, sendernamesvalue; GString *senderunames; enum _mmgui_notifications_sound soundmode; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; messages = mmguicore_sms_enum(mmguiappdata->mmguiapp->core, (gboolean)GPOINTER_TO_UINT(mmguiappdata->data)); if (messages == NULL) return FALSE; /*No new messages available yet*/ nummessages = 0; /*Hash table for unique sender names*/ sendernames = g_hash_table_new_full(g_str_hash, g_str_equal, mmgui_main_sms_get_message_list_hash_destroy_notify, NULL); seldata = NULL; for (iterator=messages; iterator; iterator=iterator->next) { message = iterator->data; if (!mmgui_smsdb_message_get_read(message)) { /*Add message to database*/ mmgui_smsdb_add_sms(mmguicore_devices_get_sms_db(mmguiappdata->mmguiapp->core), message); /*Add message to list*/ mmgui_main_sms_add_to_list(mmguiappdata->mmguiapp, message, NULL); /*Add unique sender name into hash table*/ if (g_hash_table_lookup(sendernames, message->number) == NULL) { currentsender = g_strdup(mmgui_smsdb_message_get_number(message)); g_hash_table_insert(sendernames, currentsender, currentsender); } /*Message selection structure*/ if (seldata == NULL) { seldata = g_new0(struct _sms_selection_data, 1); seldata->mmguiapp = mmguiappdata->mmguiapp; seldata->messageid = mmgui_smsdb_message_get_db_identifier(message); } /*New message received*/ nummessages++; } /*Delete message*/ mmguicore_sms_delete(mmguiappdata->mmguiapp->core, mmgui_smsdb_message_get_identifier(message)); /*Free message*/ mmgui_smsdb_message_free(message); } /*Free list*/ g_slist_free(messages); /*Form notification caption based on messages count*/ if (nummessages > 1) { notifycaption = g_strdup_printf(_("Received %u new SMS messages"), nummessages); } else if (nummessages == 1) { notifycaption = g_strdup(_("Received new SMS message")); } else { g_hash_table_destroy(sendernames); if (seldata != NULL) { g_free(seldata); } g_free(mmguiappdata); g_debug("Failed to add messages to database\n"); return FALSE; } /*Form list of unique senders for message text*/ senderunames = g_string_new(_("Message senders: ")); /*Number of unique messages*/ addedsender = 0; /*Iterate through hash table*/ g_hash_table_iter_init(&sendernamesiter, sendernames); while (g_hash_table_iter_next(&sendernamesiter, &sendernameskey, &sendernamesvalue)) { if (addedsender == 0) { g_string_append_printf(senderunames, " %s", (gchar *)sendernameskey); } else { g_string_append_printf(senderunames, ", %s", (gchar *)sendernameskey); } addedsender++; } senderunames = g_string_append_c(senderunames, '.'); /*Show notification/play sound*/ if (mmguiappdata->mmguiapp->options->usesounds) { soundmode = MMGUI_NOTIFICATIONS_SOUND_MESSAGE; } else { soundmode = MMGUI_NOTIFICATIONS_SOUND_NONE; } /*Ayatana menu*/ mmgui_ayatana_set_unread_messages_number(mmguiappdata->mmguiapp->ayatana, mmgui_smsdb_get_unread_messages(mmguicore_devices_get_sms_db(mmguiappdata->mmguiapp->core))); /*Notification*/ mmgui_notifications_show(mmguiappdata->mmguiapp->notifications, notifycaption, senderunames->str, soundmode, mmgui_main_sms_notification_show_window_callback, seldata); /*Free resources*/ g_free(notifycaption); g_hash_table_destroy(sendernames); g_string_free(senderunames, TRUE); g_free(mmguiappdata); return FALSE; } gboolean mmgui_main_sms_get_message_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; guint messageseq; mmgui_sms_message_t message; gchar *notifycaption, *notifytext; enum _mmgui_notifications_sound soundmode; sms_selection_data_t seldata; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; messageseq = GPOINTER_TO_UINT(mmguiappdata->data); message = mmguicore_sms_get(mmguiappdata->mmguiapp->core, messageseq); if (message == NULL) return FALSE; /*Add message to database*/ mmgui_smsdb_add_sms(mmguicore_devices_get_sms_db(mmguiappdata->mmguiapp->core), message); /*Add message to list*/ mmgui_main_sms_add_to_list(mmguiappdata->mmguiapp, message, NULL); /*Remove message from device*/ mmguicore_sms_delete(mmguiappdata->mmguiapp->core, mmgui_smsdb_message_get_identifier(message)); /*Form notification*/ notifycaption = g_strdup(_("Received new SMS message")); notifytext = g_strdup_printf("%s: %s", mmgui_smsdb_message_get_number(message), mmgui_smsdb_message_get_text(message)); /*Show notification/play sound*/ if (mmguiappdata->mmguiapp->options->usesounds) { soundmode = MMGUI_NOTIFICATIONS_SOUND_MESSAGE; } else { soundmode = MMGUI_NOTIFICATIONS_SOUND_NONE; } /*Message selection structure*/ seldata = g_new0(struct _sms_selection_data, 1); seldata->mmguiapp = mmguiappdata->mmguiapp; seldata->messageid = mmgui_smsdb_message_get_db_identifier(message); /*Ayatana menu*/ mmgui_ayatana_set_unread_messages_number(mmguiappdata->mmguiapp->ayatana, mmgui_smsdb_get_unread_messages(mmguicore_devices_get_sms_db(mmguiappdata->mmguiapp->core))); /*Notification*/ mmgui_notifications_show(mmguiappdata->mmguiapp->notifications, notifycaption, notifytext, soundmode, mmgui_main_sms_notification_show_window_callback, seldata); /*Free resources*/ g_free(notifycaption); g_free(notifytext); g_free(mmguiappdata); mmgui_smsdb_message_free(message); return FALSE; } gboolean mmgui_main_sms_handle_new_day_from_thread(gpointer data) { mmgui_application_t mmguiapp; GtkTreeModel *model; GtkTreeIter folderiter, msgiter; gboolean foldervalid, msgvalid; gulong curid; guint curfolder; gboolean curisfolder; mmgui_sms_message_t message; smsdb_t smsdb; time_t timestamp; gchar *markup; gchar timestr[200]; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return FALSE; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->smslist)); smsdb = mmguicore_devices_get_sms_db(mmguiapp->core); if ((model == NULL) || (smsdb == NULL)) return FALSE; foldervalid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &folderiter); while (foldervalid) { /*Folders*/ gtk_tree_model_get(model, &folderiter, MMGUI_MAIN_SMSLIST_ID, &curid, MMGUI_MAIN_SMSLIST_FOLDER, &curfolder, MMGUI_MAIN_SMSLIST_ISFOLDER, &curisfolder, -1); if (gtk_tree_model_iter_has_child(model, &folderiter)) { /*Messages*/ if (gtk_tree_model_iter_children(model, &msgiter, &folderiter)) { do { gtk_tree_model_get(model, &msgiter, MMGUI_MAIN_SMSLIST_ID, &curid, MMGUI_MAIN_SMSLIST_FOLDER, &curfolder, MMGUI_MAIN_SMSLIST_ISFOLDER, &curisfolder, -1); message = mmgui_smsdb_read_sms_message(smsdb, curid); if (message != NULL) { /*Current time*/ timestamp = mmgui_smsdb_message_get_timestamp(message); /*New markup string*/ markup = g_strdup_printf(_("%s\n%s"), mmgui_smsdb_message_get_number(message), mmgui_str_format_sms_time(timestamp, timestr, sizeof(timestr))); /*Update markup string*/ gtk_tree_store_set(GTK_TREE_STORE(model), &msgiter, MMGUI_MAIN_SMSLIST_SMS, markup, -1); /*Free resources*/ g_free(markup); mmgui_smsdb_message_free(message); } msgvalid = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &msgiter); } while (msgvalid); } } foldervalid = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &folderiter); } return FALSE; } static void mmgui_main_sms_new_dialog_number_changed_signal(GtkEditable *editable, gpointer data) { mmgui_application_data_t appdata; const gchar *number; GtkTextBuffer *buffer; gboolean newnumvalid; gint bufferchars; gint *smsvalidflags; gint newsmsvalidflags; appdata = (mmgui_application_data_t)data; if (appdata == NULL) return; number = gtk_entry_get_text(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry)); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(appdata->mmguiapp->window->smstextview)); smsvalidflags = (gint *)appdata->data; //Validate SMS number newnumvalid = mmguicore_sms_validate_number(number); if (buffer != NULL) { bufferchars = gtk_text_buffer_get_char_count(buffer); } else { bufferchars = 0; } newsmsvalidflags = MMGUI_MAIN_NEW_SMS_VALIDATION_VALID; if (!newnumvalid) newsmsvalidflags &= MMGUI_MAIN_NEW_SMS_VALIDATION_WRONG_NUMBER; if (bufferchars == 0) newsmsvalidflags &= MMGUI_MAIN_NEW_SMS_VALIDATION_WRONG_TEXT; if (((!newnumvalid) || (bufferchars == 0)) && ((*smsvalidflags == MMGUI_MAIN_NEW_SMS_VALIDATION_VALID) || (*smsvalidflags != newsmsvalidflags))) { #if GTK_CHECK_VERSION(3,10,0) gtk_entry_set_icon_from_icon_name(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry), GTK_ENTRY_ICON_SECONDARY, "dialog-warning"); #else gtk_entry_set_icon_from_stock(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CAPS_LOCK_WARNING); #endif if (!newnumvalid) { gtk_entry_set_icon_tooltip_markup(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry), GTK_ENTRY_ICON_SECONDARY, _("SMS number is not valid\nOnly numbers from 2 to 20 digits without\nletters and symbols can be used")); } else if (bufferchars == 0) { gtk_entry_set_icon_tooltip_markup(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry), GTK_ENTRY_ICON_SECONDARY, _("SMS text is not valid\nPlease write some text to send")); } gtk_widget_set_sensitive(appdata->mmguiapp->window->sendsmsbutton, FALSE); gtk_widget_set_sensitive(appdata->mmguiapp->window->savesmsbutton, FALSE); *smsvalidflags = newsmsvalidflags; } else if ((newnumvalid) && (bufferchars > 0)) { #if GTK_CHECK_VERSION(3,10,0) gtk_entry_set_icon_from_icon_name(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry), GTK_ENTRY_ICON_SECONDARY, NULL); #else gtk_entry_set_icon_from_stock(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CAPS_LOCK_WARNING); #endif gtk_entry_set_icon_tooltip_markup(GTK_ENTRY(appdata->mmguiapp->window->smsnumberentry), GTK_ENTRY_ICON_SECONDARY, NULL); gtk_widget_set_sensitive(appdata->mmguiapp->window->sendsmsbutton, TRUE); gtk_widget_set_sensitive(appdata->mmguiapp->window->savesmsbutton, TRUE); *smsvalidflags = newsmsvalidflags; } } static enum _mmgui_main_new_sms_dialog_result mmgui_main_sms_new_dialog(mmgui_application_t mmguiapp, const gchar *number, const gchar *text) { struct _mmgui_application_data appdata; GtkTextBuffer *buffer; gint response; gulong editnumsignal, edittextsignal; gint smsvalidflags; enum _mmgui_main_new_sms_dialog_result result; if (mmguiapp == NULL) return MMGUI_MAIN_NEW_SMS_DIALOG_CLOSE; smsvalidflags = MMGUI_MAIN_NEW_SMS_VALIDATION_VALID; appdata.mmguiapp = mmguiapp; appdata.data = &smsvalidflags; editnumsignal = g_signal_connect(G_OBJECT(mmguiapp->window->smsnumberentry), "changed", G_CALLBACK(mmgui_main_sms_new_dialog_number_changed_signal), &appdata); if (number != NULL) { gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->smsnumberentry), number); g_signal_emit_by_name(G_OBJECT(mmguiapp->window->smsnumberentry), "changed"); } buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->smstextview)); if (buffer != NULL) { edittextsignal = g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(mmgui_main_sms_new_dialog_number_changed_signal), &appdata); if (text != NULL) { gtk_text_buffer_set_text(buffer, text, -1); g_signal_emit_by_name(G_OBJECT(buffer), "changed"); } } response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->newsmsdialog)); g_signal_handler_disconnect(G_OBJECT(mmguiapp->window->smsnumberentry), editnumsignal); if (buffer != NULL) { g_signal_handler_disconnect(G_OBJECT(buffer), edittextsignal); } gtk_widget_hide(mmguiapp->window->newsmsdialog); switch (response) { case 0: result = MMGUI_MAIN_NEW_SMS_DIALOG_CLOSE; break; case 1: result = MMGUI_MAIN_NEW_SMS_DIALOG_SEND; break; case 2: result = MMGUI_MAIN_NEW_SMS_DIALOG_SAVE; break; default: result = MMGUI_MAIN_NEW_SMS_DIALOG_CLOSE; break; } return result; } gboolean mmgui_main_sms_send(mmgui_application_t mmguiapp, const gchar *number, const gchar *text) { GtkTextBuffer *buffer; GtkTextIter start, end; gchar *resnumber, *restext; enum _mmgui_main_new_sms_dialog_result result; mmgui_sms_message_t message; if ((mmguiapp == NULL) || (number == NULL) || (text == NULL)) return FALSE; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->smstextview)); if (buffer == NULL) return FALSE; //Open dialog for user interaction result = mmgui_main_sms_new_dialog(mmguiapp, number, text); if ((result == MMGUI_MAIN_NEW_SMS_DIALOG_SEND) || (result == MMGUI_MAIN_NEW_SMS_DIALOG_SAVE)) { //Get final message number and text resnumber = (gchar *)gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->smsnumberentry)); gtk_text_buffer_get_bounds(buffer, &start, &end); restext = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); //Send message if (result == MMGUI_MAIN_NEW_SMS_DIALOG_SEND) { if (mmguicore_sms_send(mmguiapp->core, resnumber, restext, mmguiapp->options->smsvalidityperiod, mmguiapp->options->smsdeliveryreport)) { //Form message message = mmgui_smsdb_message_create(); mmgui_smsdb_message_set_number(message, resnumber); mmgui_smsdb_message_set_text(message, restext, FALSE); mmgui_smsdb_message_set_read(message, TRUE); mmgui_smsdb_message_set_folder(message, MMGUI_SMSDB_SMS_FOLDER_SENT); //Add message to database mmgui_smsdb_add_sms(mmguicore_devices_get_sms_db(mmguiapp->core), message); //Add message to list mmgui_main_sms_add_to_list(mmguiapp, message, NULL); //Free message mmgui_smsdb_message_free(message); /*Save last number*/ mmgui_main_sms_add_number_to_history(mmguiapp, resnumber); //Start progress dialog mmgui_main_ui_progress_dialog_open(mmguiapp); return TRUE; } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error sending message"), _("Wrong number or device not ready")); return FALSE; } //Save message } else if (result == MMGUI_MAIN_NEW_SMS_DIALOG_SAVE) { //Form message message = mmgui_smsdb_message_create(); mmgui_smsdb_message_set_number(message, resnumber); mmgui_smsdb_message_set_text(message, restext, FALSE); mmgui_smsdb_message_set_read(message, TRUE); mmgui_smsdb_message_set_folder(message, MMGUI_SMSDB_SMS_FOLDER_DRAFTS); //Add message to database mmgui_smsdb_add_sms(mmguicore_devices_get_sms_db(mmguiapp->core), message); //Add message to list mmgui_main_sms_add_to_list(mmguiapp, message, NULL); //Free message mmgui_smsdb_message_free(message); //Save last number mmgui_main_sms_add_number_to_history(mmguiapp, resnumber); return TRUE; } } return FALSE; } void mmgui_main_sms_remove(mmgui_application_t mmguiapp) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; gulong id; /*gboolean valid;*/ gboolean isfolder; if (mmguiapp == NULL) return; if (mmguicore_devices_get_current(mmguiapp->core) == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->smslist)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mmguiapp->window->smslist)); if ((model != NULL) && (selection != NULL)) { if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_SMSLIST_ID, &id, MMGUI_MAIN_SMSLIST_ISFOLDER, &isfolder, -1); if (!isfolder) { if (mmgui_main_ui_question_dialog_open(mmguiapp, _("Remove message"), _("Really want to remove message?"))) { if (mmgui_smsdb_remove_sms_message(mmguicore_devices_get_sms_db(mmguiapp->core), id)) { gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); /*Ayatana menu*/ mmgui_ayatana_set_unread_messages_number(mmguiapp->ayatana, mmgui_smsdb_get_unread_messages(mmguicore_devices_get_sms_db(mmguiapp->core))); } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error removing SMS"), _("Message not found")); } } } } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error removing SMS"), _("Message not selected")); } } } void mmgui_main_sms_remove_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_sms_remove(mmguiapp); } void mmgui_main_sms_new(mmgui_application_t mmguiapp) { gchar *lastnumber; guint smscaps; if (mmguiapp == NULL) return; if (mmguicore_devices_get_current(mmguiapp->core) == NULL) return; smscaps = mmguicore_sms_get_capabilities(mmguiapp->core); if (smscaps & MMGUI_SMS_CAPS_SEND) { /*Restore last number*/ lastnumber = mmgui_main_sms_get_first_number_from_history(mmguiapp, "8888"); /*Open 'New message' dialog*/ mmgui_main_sms_send(mmguiapp, lastnumber, ""); } } void mmgui_main_sms_new_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_sms_new(mmguiapp); } void mmgui_main_sms_answer(mmgui_application_t mmguiapp) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; guint smscaps; gulong id; guint folder; gboolean isfolder; mmgui_sms_message_t message; if (mmguiapp == NULL) return; if (mmguicore_devices_get_current(mmguiapp->core) == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->smslist)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mmguiapp->window->smslist)); smscaps = mmguicore_sms_get_capabilities(mmguiapp->core); if ((model != NULL) && (selection != NULL)) { //Get selected message if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_SMSLIST_ID, &id, MMGUI_MAIN_SMSLIST_FOLDER, &folder, MMGUI_MAIN_SMSLIST_ISFOLDER, &isfolder, -1); if (!isfolder) { message = mmgui_smsdb_read_sms_message(mmguicore_devices_get_sms_db(mmguiapp->core), id); if (message != NULL) { //Open dialog if (mmguicore_sms_validate_number(mmgui_smsdb_message_get_number(message)) && (smscaps & MMGUI_SMS_CAPS_SEND)) { if (folder == MMGUI_SMSDB_SMS_FOLDER_DRAFTS) { mmgui_main_sms_send(mmguiapp, mmgui_smsdb_message_get_number(message), mmgui_smsdb_message_get_text(message)); } else { mmgui_main_sms_send(mmguiapp, mmgui_smsdb_message_get_number(message), ""); } } //Free message mmgui_smsdb_message_free(message); } } } } } void mmgui_main_sms_answer_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_sms_answer(mmguiapp); } static void mmgui_main_sms_list_cursor_changed_signal(GtkTreeView *tree_view, gpointer data) { mmgui_application_t mmguiapp; guint smscaps; GtkTreeModel *model; GtkTreeSelection *selection; GtkTextBuffer *buffer; GtkTreeIter iter; /*GtkTextIter siter, eiter;*/ gulong id; guint folder; gboolean isfolder; mmgui_sms_message_t sms; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; smscaps = mmguicore_sms_get_capabilities(mmguiapp->core); model = gtk_tree_view_get_model(tree_view); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->smstext)); if (mmguicore_devices_get_current(mmguiapp->core) != NULL) { if ((model != NULL) && (buffer != NULL)) { if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_SMSLIST_ID, &id, MMGUI_MAIN_SMSLIST_FOLDER, &folder, MMGUI_MAIN_SMSLIST_ISFOLDER, &isfolder, -1); if (!isfolder) { sms = mmgui_smsdb_read_sms_message(mmguicore_devices_get_sms_db(mmguiapp->core), id); if (sms != NULL) { //Show message text gtk_text_buffer_set_text(buffer, mmgui_smsdb_message_get_text(sms), -1); //Enable Answer button if needed if (mmguicore_sms_validate_number(mmgui_smsdb_message_get_number(sms)) && (smscaps & MMGUI_SMS_CAPS_SEND)) { gtk_widget_set_sensitive(mmguiapp->window->answersmsbutton, TRUE); } else { gtk_widget_set_sensitive(mmguiapp->window->answersmsbutton, FALSE); } gtk_widget_set_sensitive(mmguiapp->window->removesmsbutton, TRUE); //Set read flag if not set before if (!mmgui_smsdb_message_get_read(sms)) { if (mmgui_smsdb_set_message_read_status(mmguicore_devices_get_sms_db(mmguiapp->core), id, TRUE)) { gtk_tree_store_set(GTK_TREE_STORE(model), &iter, MMGUI_MAIN_SMSLIST_ICON, mmguiapp->window->smsreadicon, -1); } /*Ayatana menu*/ mmgui_ayatana_set_unread_messages_number(mmguiapp->ayatana, mmgui_smsdb_get_unread_messages(mmguicore_devices_get_sms_db(mmguiapp->core))); } //Free SMS message mmgui_smsdb_message_free(sms); /*Save identifier*/ mmgui_modem_settings_set_boolean(mmguiapp->modemsettings, "sms_is_folder", FALSE); mmgui_modem_settings_set_int64(mmguiapp->modemsettings, "sms_entry_id", (gint64)id); } else { //Cant read message gtk_widget_set_sensitive(mmguiapp->window->answersmsbutton, FALSE); gtk_text_buffer_set_text(buffer, _("This message can't be read"), -1); } } else { //Folder selected switch (folder) { case MMGUI_SMSDB_SMS_FOLDER_INCOMING: gtk_text_buffer_set_text(buffer, _("This is folder for your incoming SMS messages.\nYou can answer selected message using 'Answer' button."), -1); break; case MMGUI_SMSDB_SMS_FOLDER_SENT: gtk_text_buffer_set_text(buffer, _("This is folder for your sent SMS messages."), -1); break; case MMGUI_SMSDB_SMS_FOLDER_DRAFTS: gtk_text_buffer_set_text(buffer, _("This is folder for your SMS message drafts.\nSelect message and click 'Answer' button to start editing."), -1); break; default: break; } gtk_widget_set_sensitive(mmguiapp->window->removesmsbutton, FALSE); gtk_widget_set_sensitive(mmguiapp->window->answersmsbutton, FALSE); /*Save folder*/ mmgui_modem_settings_set_boolean(mmguiapp->modemsettings, "sms_is_folder", TRUE); mmgui_modem_settings_set_int64(mmguiapp->modemsettings, "sms_entry_id", (gint64)folder); } } } } } static void mmgui_main_sms_list_row_activated_signal(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_sms_answer(mmguiapp); } static void mmgui_main_sms_add_to_list(mmgui_application_t mmguiapp, mmgui_sms_message_t sms, GtkTreeModel *model) { GtkTreeIter iter, child; time_t timestamp; gchar *markup; //struct tm *tmptime; gchar timestr[200]; GdkPixbuf *icon; guint folder; if ((mmguiapp == NULL) || (sms == NULL)) return; if (model == NULL) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->smslist)); } timestamp = mmgui_smsdb_message_get_timestamp(sms); markup = g_strdup_printf(_("%s\n%s"), mmgui_smsdb_message_get_number(sms), mmgui_str_format_sms_time(timestamp, timestr, sizeof(timestr))); if (mmgui_smsdb_message_get_read(sms)) { icon = mmguiapp->window->smsreadicon; } else { icon = mmguiapp->window->smsunreadicon; } switch (mmgui_smsdb_message_get_folder(sms)) { case MMGUI_SMSDB_SMS_FOLDER_INCOMING: folder = MMGUI_SMSDB_SMS_FOLDER_INCOMING; gtk_tree_model_get_iter(model, &iter, mmguiapp->window->incomingpath); break; case MMGUI_SMSDB_SMS_FOLDER_SENT: folder = MMGUI_SMSDB_SMS_FOLDER_SENT; gtk_tree_model_get_iter(model, &iter, mmguiapp->window->sentpath); break; case MMGUI_SMSDB_SMS_FOLDER_DRAFTS: folder = MMGUI_SMSDB_SMS_FOLDER_DRAFTS; gtk_tree_model_get_iter(model, &iter, mmguiapp->window->draftspath); break; default: folder = MMGUI_SMSDB_SMS_FOLDER_INCOMING; gtk_tree_model_get_iter(model, &iter, mmguiapp->window->incomingpath); break; } //Place new message on top or append to list if (mmguiapp->options->smsoldontop) { gtk_tree_store_append(GTK_TREE_STORE(model), &child, &iter); } else { gtk_tree_store_insert(GTK_TREE_STORE(model), &child, &iter, 0); } gtk_tree_store_set(GTK_TREE_STORE(model), &child, MMGUI_MAIN_SMSLIST_ICON, icon, MMGUI_MAIN_SMSLIST_SMS, markup, MMGUI_MAIN_SMSLIST_ID, mmgui_smsdb_message_get_db_identifier(sms), MMGUI_MAIN_SMSLIST_FOLDER, folder, MMGUI_MAIN_SMSLIST_ISFOLDER, FALSE, -1); g_free(markup); } gboolean mmgui_main_sms_list_fill(mmgui_application_t mmguiapp) { GSList *smslist; GtkTreeModel *model; GtkTreeIter iter; gint i; GdkPixbuf *foldericon; gboolean foldericonused; GSList *iterator; mmgui_application_data_t appdata; gchar *foldercomments[3] = {_("Incoming\nIncoming messages"), _("Sent\nSent messages"), _("Drafts\nMessage drafts")}; const guint folderids[3] = {MMGUI_SMSDB_SMS_FOLDER_INCOMING, MMGUI_SMSDB_SMS_FOLDER_SENT, MMGUI_SMSDB_SMS_FOLDER_DRAFTS}; GtkTreePath **folderpath[3] = {&mmguiapp->window->incomingpath, &mmguiapp->window->sentpath, &mmguiapp->window->draftspath}; const gchar *foldericonfile[3] = {RESOURCE_MESSAGE_RECIEVED, RESOURCE_MESSAGE_SENT, RESOURCE_MESSAGE_DRAFTS}; if (mmguiapp == NULL) return FALSE; if (mmguicore_devices_get_current(mmguiapp->core) != NULL) { smslist = mmgui_smsdb_read_sms_list(mmguicore_devices_get_sms_db(mmguiapp->core)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->smslist)); if (model != NULL) { g_object_ref(model); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->smslist), NULL); gtk_tree_store_clear(GTK_TREE_STORE(model)); for (i=0; i<3; i++) { foldericon = gdk_pixbuf_new_from_file(foldericonfile[i], NULL); if (foldericon != NULL) { foldericonused = TRUE; } else { foldericon = mmguiapp->window->smsunreadicon; foldericonused = FALSE; } gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, MMGUI_MAIN_SMSLIST_ICON, foldericon, MMGUI_MAIN_SMSLIST_SMS, foldercomments[i], MMGUI_MAIN_SMSLIST_ID, 0, MMGUI_MAIN_SMSLIST_FOLDER, folderids[i], MMGUI_MAIN_SMSLIST_ISFOLDER, TRUE, -1); *(folderpath[i]) = gtk_tree_model_get_path(model, &iter); if (foldericonused) { g_object_unref(foldericon); } } if (smslist != NULL) { for (iterator=smslist; iterator; iterator=iterator->next) { mmgui_main_sms_add_to_list(mmguiapp, (mmgui_sms_message_t)iterator->data, model); } } gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->smslist), model); g_object_unref(model); if (mmguiapp->options->smsexpandfolders) { gtk_tree_view_expand_all(GTK_TREE_VIEW(mmguiapp->window->smslist)); } } //Free resources if (smslist != NULL) { mmgui_smsdb_message_free_list(smslist); } //Get new messages from modem appdata = g_new0(struct _mmgui_application_data, 1); appdata->mmguiapp = mmguiapp; appdata->data = GUINT_TO_POINTER(mmguiapp->options->concatsms); g_idle_add(mmgui_main_sms_get_message_list_from_thread, appdata); } return FALSE; } void mmgui_main_sms_restore_settings_for_modem(mmgui_application_t mmguiapp) { gulong entryid; gboolean entryisfolder; if (mmguiapp == NULL) return; if (mmguiapp->modemsettings == NULL) return; /*Get settings*/ entryid = (gulong)mmgui_modem_settings_get_int64(mmguiapp->modemsettings, "sms_entry_id", 0); entryisfolder = mmgui_modem_settings_get_boolean(mmguiapp->modemsettings, "sms_is_folder", TRUE); /*Select last entry*/ mmgui_main_sms_select_entry_from_list(mmguiapp, entryid, entryisfolder); /*Add history entries to dropdown list model*/ mmgui_main_sms_load_numbers_history(mmguiapp); /*Restore modem contacts if available*/ mmgui_main_sms_restore_contacts_for_modem(mmguiapp); } void mmgui_main_sms_restore_contacts_for_modem(mmgui_application_t mmguiapp) { if (mmguiapp == NULL) return; /*Add contacts from modem to autocompletion model*/ mmgui_main_sms_autocompletion_model_fill(mmguiapp, MMGUI_MAIN_CONTACT_MODEM); /*Add contacts from modem to dropdown list model*/ mmgui_main_sms_menu_model_fill(mmguiapp, MMGUI_MAIN_SMS_SOURCE_MODEM); } static void mmgui_main_sms_load_numbers_history(mmgui_application_t mmguiapp) { gchar **numbers; GSList *iterator; guint numcount, i; gchar *number, *fullname; GtkTreeIter iter; if (mmguiapp == NULL) return; numbers = mmgui_modem_settings_get_string_list(mmguiapp->modemsettings, "sms_numbers_history", NULL); if (numbers == NULL) return; mmguiapp->window->smsnumlisthistory = NULL; i = 0; numcount = 0; while (numbers[i] != NULL) { /*Limit the number of recent entries*/ if (numcount >= 5) { break; } /*Validate every entry*/ if (mmguicore_sms_validate_number(numbers[i])) { mmguiapp->window->smsnumlisthistory = g_slist_prepend(mmguiapp->window->smsnumlisthistory, g_strdup(numbers[i])); numcount++; } i++; } /*Free string list*/ g_strfreev(numbers); if (mmguiapp->window->smsnumlisthistory != NULL) { /*Add to dropdown list*/ for (iterator=mmguiapp->window->smsnumlisthistory; iterator; iterator=iterator->next) { number = iterator->data; fullname = mmgui_main_sms_get_name_for_number(mmguiapp, number); gtk_tree_store_insert(mmguiapp->window->smsnumlistmodel, &iter, NULL, 0); gtk_tree_store_set(mmguiapp->window->smsnumlistmodel, &iter, MMGUI_MAIN_SMS_LIST_NAME, fullname, MMGUI_MAIN_SMS_LIST_NUMBER, number, MMGUI_MAIN_SMS_LIST_SOURCE, MMGUI_MAIN_SMS_SOURCE_HISTORY, -1); g_free(fullname); } /*Reverse linked list*/ mmguiapp->window->smsnumlisthistory = g_slist_reverse(mmguiapp->window->smsnumlisthistory); } } static void mmgui_main_sms_add_number_to_history(mmgui_application_t mmguiapp, gchar *number) { GtkTreeIter iter; guint contactsource; gchar *contactnum, *oldnumber, *fullname; gboolean valid; gchar **numbers; GSList *iterator; gsize length; guint i; if ((mmguiapp == NULL) || (number == NULL)) return; if ((mmguiapp->window->smsnumlisthistory == NULL) || ((mmguiapp->window->smsnumlisthistory != NULL) && (g_slist_length(mmguiapp->window->smsnumlisthistory) < 5))) { /*Just add string to linked list and dropdown list*/ /*Add to the beginning of linked list*/ mmguiapp->window->smsnumlisthistory = g_slist_prepend(mmguiapp->window->smsnumlisthistory, g_strdup(number)); /*Add to beginning of dropdown list*/ fullname = mmgui_main_sms_get_name_for_number(mmguiapp, number); gtk_tree_store_insert(mmguiapp->window->smsnumlistmodel, &iter, NULL, 0); gtk_tree_store_set(mmguiapp->window->smsnumlistmodel, &iter, MMGUI_MAIN_SMS_LIST_NAME, fullname, MMGUI_MAIN_SMS_LIST_NUMBER, number, MMGUI_MAIN_SMS_LIST_SOURCE, MMGUI_MAIN_SMS_SOURCE_HISTORY, -1); g_free(fullname); } else { /*Add new entry and remove old one*/ iterator = g_slist_last(mmguiapp->window->smsnumlisthistory); oldnumber = iterator->data; /*Remove from linked list*/ mmguiapp->window->smsnumlisthistory = g_slist_remove(mmguiapp->window->smsnumlisthistory, oldnumber); /*Add to the beginning of linked list*/ mmguiapp->window->smsnumlisthistory = g_slist_prepend(mmguiapp->window->smsnumlisthistory, g_strdup(number)); /*Remove from dropdown list*/ valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); while (valid) { gtk_tree_model_get(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, MMGUI_MAIN_SMS_LIST_SOURCE, &contactsource, MMGUI_MAIN_SMS_LIST_NUMBER, &contactnum, -1); if ((contactsource == MMGUI_MAIN_SMS_SOURCE_HISTORY) && (g_str_equal(contactnum, oldnumber))) { gtk_tree_store_remove(GTK_TREE_STORE(mmguiapp->window->smsnumlistmodel), &iter); g_free(contactnum); break; } g_free(contactnum); valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); } g_free(oldnumber); /*Add to beginning of dropdown list*/ fullname = mmgui_main_sms_get_name_for_number(mmguiapp, number); gtk_tree_store_insert(mmguiapp->window->smsnumlistmodel, &iter, NULL, 0); gtk_tree_store_set(mmguiapp->window->smsnumlistmodel, &iter, MMGUI_MAIN_SMS_LIST_NAME, fullname, MMGUI_MAIN_SMS_LIST_NUMBER, number, MMGUI_MAIN_SMS_LIST_SOURCE, MMGUI_MAIN_SMS_SOURCE_HISTORY, -1); g_free(fullname); } /*Save changed list*/ length = g_slist_length(mmguiapp->window->smsnumlisthistory); numbers = g_malloc0((length * sizeof(gchar *)) + 1); i = 0; for (iterator=mmguiapp->window->smsnumlisthistory; iterator; iterator=iterator->next) { contactnum = iterator->data; numbers[i] = g_strdup(contactnum); i++; } numbers[length] = NULL; mmgui_modem_settings_set_string_list(mmguiapp->modemsettings, "sms_numbers_history", numbers); g_strfreev(numbers); } static gchar *mmgui_main_sms_get_first_number_from_history(mmgui_application_t mmguiapp, gchar *defnumber) { if (mmguiapp != NULL) { if (mmguiapp->window->smsnumlisthistory != NULL) { /*Most recent number from list*/ return mmguiapp->window->smsnumlisthistory->data; } else { /*Hisory linked list doesnt contain numbers*/ return defnumber; } } else { /*Something wrong*/ return defnumber; } } static gchar *mmgui_main_sms_get_name_for_number(mmgui_application_t mmguiapp, gchar *number) { gchar *res; GSList *contacts[3]; guint contactscaps, i; GSList *iterator; mmgui_contact_t contact; if ((mmguiapp == NULL) || (number == NULL)) return NULL; contacts[0] = NULL; contactscaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if (contactscaps & MMGUI_CONTACTS_CAPS_EXPORT) { contacts[0] = mmguicore_contacts_list(mmguiapp->core); } contacts[1] = NULL; if (mmgui_addressbooks_get_gnome_contacts_available(mmguiapp->addressbooks)) { contacts[1] = mmgui_addressbooks_get_gnome_contacts_list(mmguiapp->addressbooks); } contacts[2] = NULL; if (mmgui_addressbooks_get_kde_contacts_available(mmguiapp->addressbooks)) { contacts[2] = mmgui_addressbooks_get_kde_contacts_list(mmguiapp->addressbooks); } i = 0; res = NULL; while ((i < 3) && (res == NULL)) { if (contacts[i] != NULL) { for (iterator=contacts[i]; iterator; iterator=iterator->next) { contact = iterator->data; if (contact->number != NULL) { if (g_str_equal(number, contact->number)) { res = g_strdup_printf("%s (%s)", contact->name, number); break; } } if (contact->number2 != NULL) { if (g_str_equal(number, contact->number2)) { res = g_strdup_printf("%s (%s)", contact->name, number); break; } } } } i++; } if (res == NULL) { res = g_strdup(number); } return res; } static gboolean mmgui_main_sms_autocompletion_select_entry_signal(GtkEntryCompletion *widget, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { mmgui_application_t mmguiapp; gchar *number; mmguiapp = (mmgui_application_t)user_data; gtk_tree_model_get(model, iter, MMGUI_MAIN_SMS_COMPLETION_NUMBER, &number, -1); if (number != NULL) { gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->smsnumberentry), number); g_free(number); } return TRUE; } static void mmgui_main_sms_autocompletion_model_fill(mmgui_application_t mmguiapp, guint source) { GSList *contacts; guint contactscaps; GtkTreeIter iter; GSList *iterator; mmgui_contact_t contact; if (mmguiapp == NULL) return; if (mmguiapp->addressbooks == NULL) return; if (mmguiapp->window->smscompletionmodel == NULL) return; contacts = NULL; if (source == MMGUI_MAIN_CONTACT_GNOME) { /*Contacts from GNOME addressbook*/ if (mmgui_addressbooks_get_gnome_contacts_available(mmguiapp->addressbooks)) { contacts = mmgui_addressbooks_get_gnome_contacts_list(mmguiapp->addressbooks); } } else if (source == MMGUI_MAIN_CONTACT_KDE) { /*Contacts from KDE addressbook*/ if (mmgui_addressbooks_get_kde_contacts_available(mmguiapp->addressbooks)) { contacts = mmgui_addressbooks_get_kde_contacts_list(mmguiapp->addressbooks); } } else if (source == MMGUI_MAIN_CONTACT_MODEM) { /*Contacts from modem*/ contactscaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if (contactscaps & MMGUI_CONTACTS_CAPS_EXPORT) { contacts = mmguicore_contacts_list(mmguiapp->core); } } if (contacts != NULL) { for (iterator=contacts; iterator; iterator=iterator->next) { contact = iterator->data; /*Add first number*/ if (mmguicore_sms_validate_number(contact->number)) { gtk_list_store_append(GTK_LIST_STORE(mmguiapp->window->smscompletionmodel), &iter); gtk_list_store_set(GTK_LIST_STORE(mmguiapp->window->smscompletionmodel), &iter, MMGUI_MAIN_SMS_COMPLETION_NAME, contact->name, MMGUI_MAIN_SMS_COMPLETION_NUMBER, contact->number, MMGUI_MAIN_SMS_COMPLETION_SOURCE, source, -1); } /*Add second number if exists*/ if (mmguicore_sms_validate_number(contact->number2)) { gtk_list_store_append(GTK_LIST_STORE(mmguiapp->window->smscompletionmodel), &iter); gtk_list_store_set(GTK_LIST_STORE(mmguiapp->window->smscompletionmodel), &iter, MMGUI_MAIN_SMS_COMPLETION_NAME, contact->name, MMGUI_MAIN_SMS_COMPLETION_NUMBER, contact->number2, MMGUI_MAIN_SMS_COMPLETION_SOURCE, source, -1); } } } } static void mmgui_main_sms_menu_model_fill(mmgui_application_t mmguiapp, guint source) { GSList *contacts; guint contactscaps; GtkTreeIter iter, contiter; GSList *iterator; gchar *fullname; mmgui_contact_t contact; if (mmguiapp == NULL) return; if (mmguiapp->addressbooks == NULL) return; if (mmguiapp->window->smsnumlistmodel == NULL) return; contacts = NULL; if (source == MMGUI_MAIN_SMS_SOURCE_GNOME) { /*Contacts from GNOME addressbook*/ if (mmgui_addressbooks_get_gnome_contacts_available(mmguiapp->addressbooks)) { contacts = mmgui_addressbooks_get_gnome_contacts_list(mmguiapp->addressbooks); if (contacts != NULL) { if (mmguiapp->window->smsnumlistgnomepath == NULL) { gtk_tree_store_append(mmguiapp->window->smsnumlistmodel, &iter, NULL); gtk_tree_store_set(mmguiapp->window->smsnumlistmodel, &iter, MMGUI_MAIN_SMS_LIST_NAME, _("GNOME contacts"), MMGUI_MAIN_SMS_LIST_NUMBER, NULL, MMGUI_MAIN_SMS_LIST_SOURCE, MMGUI_MAIN_SMS_SOURCE_CAPTION, -1); mmguiapp->window->smsnumlistgnomepath = gtk_tree_model_get_path(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); } else { gtk_tree_model_get_iter(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, mmguiapp->window->smsnumlistgnomepath); } } } } else if (source == MMGUI_MAIN_SMS_SOURCE_KDE) { /*Contacts from KDE addressbook*/ if (mmgui_addressbooks_get_kde_contacts_available(mmguiapp->addressbooks)) { contacts = mmgui_addressbooks_get_kde_contacts_list(mmguiapp->addressbooks); if (contacts != NULL) { if (mmguiapp->window->smsnumlistkdepath == NULL) { gtk_tree_store_append(mmguiapp->window->smsnumlistmodel, &iter, NULL); gtk_tree_store_set(mmguiapp->window->smsnumlistmodel, &iter, MMGUI_MAIN_SMS_LIST_NAME, _("KDE contacts"), MMGUI_MAIN_SMS_LIST_NUMBER, NULL, MMGUI_MAIN_SMS_LIST_SOURCE, MMGUI_MAIN_SMS_SOURCE_CAPTION, -1); mmguiapp->window->smsnumlistkdepath = gtk_tree_model_get_path(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); } else { gtk_tree_model_get_iter(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, mmguiapp->window->smsnumlistkdepath); } } } } else if (source == MMGUI_MAIN_SMS_SOURCE_MODEM) { /*Contacts from modem*/ contactscaps = mmguicore_contacts_get_capabilities(mmguiapp->core); if (contactscaps & MMGUI_CONTACTS_CAPS_EXPORT) { contacts = mmguicore_contacts_list(mmguiapp->core); if (contacts != NULL) { if (mmguiapp->window->smsnumlistmodempath == NULL) { gtk_tree_store_append(mmguiapp->window->smsnumlistmodel, &iter, NULL); gtk_tree_store_set(mmguiapp->window->smsnumlistmodel, &iter, MMGUI_MAIN_SMS_LIST_NAME, _("Modem contacts"), MMGUI_MAIN_SMS_LIST_NUMBER, NULL, MMGUI_MAIN_SMS_LIST_SOURCE, MMGUI_MAIN_SMS_SOURCE_CAPTION, -1); mmguiapp->window->smsnumlistmodempath = gtk_tree_model_get_path(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); } else { gtk_tree_model_get_iter(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, mmguiapp->window->smsnumlistmodempath); } } } } if (contacts != NULL) { for (iterator=contacts; iterator; iterator=iterator->next) { contact = iterator->data; /*Add first number*/ if (mmguicore_sms_validate_number(contact->number)) { fullname = g_strdup_printf("%s (%s)", contact->name, contact->number); gtk_tree_store_append(GTK_TREE_STORE(mmguiapp->window->smsnumlistmodel), &contiter, &iter); gtk_tree_store_set(GTK_TREE_STORE(mmguiapp->window->smsnumlistmodel), &contiter, MMGUI_MAIN_SMS_LIST_NAME, fullname, MMGUI_MAIN_SMS_LIST_NUMBER, contact->number, MMGUI_MAIN_SMS_LIST_SOURCE, source, -1); g_free(fullname); } /*Add second number if exists*/ if (mmguicore_sms_validate_number(contact->number2)) { fullname = g_strdup_printf("%s (%s)", contact->name, contact->number2); gtk_tree_store_append(GTK_TREE_STORE(mmguiapp->window->smsnumlistmodel), &contiter, &iter); gtk_tree_store_set(GTK_TREE_STORE(mmguiapp->window->smsnumlistmodel), &contiter, MMGUI_MAIN_SMS_LIST_NAME, fullname, MMGUI_MAIN_SMS_LIST_NUMBER, contact->number2, MMGUI_MAIN_SMS_LIST_SOURCE, source, -1); g_free(fullname); } } } } static void mmgui_main_sms_menu_data_func(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) { gboolean sensitive; sensitive = !gtk_tree_model_iter_has_child(tree_model, iter); g_object_set(cell, "sensitive", sensitive, NULL); } static gboolean mmgui_main_sms_menu_separator_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { gint source; gtk_tree_model_get(model, iter, MMGUI_MAIN_SMS_LIST_SOURCE, &source, -1); if (source == MMGUI_MAIN_SMS_SOURCE_SEPARATOR) { return TRUE; } else { return FALSE; } } static gchar *mmgui_main_sms_list_select_entry_signal(GtkComboBox *combo, const gchar *path, gpointer user_data) { mmgui_application_t mmguiapp; GtkTreeModel *model; GtkTreeIter iter; gchar *number; mmguiapp = (mmgui_application_t)user_data; model = gtk_combo_box_get_model(combo); gtk_tree_model_get_iter_from_string(model, &iter, path); gtk_tree_model_get(model, &iter, MMGUI_MAIN_SMS_LIST_NUMBER, &number, -1); if (number == NULL) { number = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->smsnumberentry))); } return number; } void mmgui_main_sms_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeStore *store; if (mmguiapp == NULL) return; column = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(column, _("SMS")); renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_set_attributes(column, renderer, "pixbuf", MMGUI_MAIN_SMSLIST_ICON, NULL); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer, "ellipsize", PANGO_ELLIPSIZE_END, "ellipsize-set", TRUE, NULL); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "markup", MMGUI_MAIN_SMSLIST_SMS, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->smslist), column); store = gtk_tree_store_new(MMGUI_MAIN_SMSLIST_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_ULONG, G_TYPE_UINT, G_TYPE_BOOLEAN); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->smslist), GTK_TREE_MODEL(store)); g_object_unref(store); /*Open message signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->smslist), "cursor-changed", G_CALLBACK(mmgui_main_sms_list_cursor_changed_signal), mmguiapp); /*Answer message signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->smslist), "row-activated", G_CALLBACK(mmgui_main_sms_list_row_activated_signal), mmguiapp); /*New SMS entry autocompletion*/ mmguiapp->window->smscompletion = gtk_entry_completion_new(); /*Search for names*/ gtk_entry_completion_set_text_column(mmguiapp->window->smscompletion, MMGUI_MAIN_SMS_COMPLETION_NAME); /*Attach to entry widget*/ gtk_entry_set_completion(GTK_ENTRY(mmguiapp->window->smsnumberentry), mmguiapp->window->smscompletion); /*Create model for contacts from addressbooks*/ mmguiapp->window->smscompletionmodel = gtk_list_store_new(MMGUI_MAIN_SMS_COMPLETION_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); gtk_entry_completion_set_model(mmguiapp->window->smscompletion, GTK_TREE_MODEL(mmguiapp->window->smscompletionmodel)); /*Select autocompletion entry*/ g_signal_connect(G_OBJECT(mmguiapp->window->smscompletion), "match-selected", G_CALLBACK(mmgui_main_sms_autocompletion_select_entry_signal), mmguiapp); /*Dropdown list*/ mmguiapp->window->smsnumlistgnomepath = NULL; mmguiapp->window->smsnumlistkdepath = NULL; mmguiapp->window->smsnumlistmodempath = NULL; /*Dropdown SMS numbers list model*/ mmguiapp->window->smsnumlistmodel = gtk_tree_store_new(MMGUI_MAIN_SMS_LIST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); /*Cell renderer*/ renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(mmguiapp->window->smsnumbercombo), renderer, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(mmguiapp->window->smsnumbercombo), renderer, "markup", 0, NULL); /*Functions for separator and unsensible entries*/ gtk_cell_layout_set_cell_data_func(GTK_CELL_LAYOUT(mmguiapp->window->smsnumbercombo), renderer, mmgui_main_sms_menu_data_func, mmguiapp, NULL); gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(mmguiapp->window->smsnumbercombo), mmgui_main_sms_menu_separator_func, mmguiapp, NULL); /*Set combo box model*/ gtk_combo_box_set_model(GTK_COMBO_BOX(mmguiapp->window->smsnumbercombo), GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel)); /*Select dropdown entry signal*/ g_signal_connect(G_OBJECT(mmguiapp->window->smsnumbercombo), "format-entry-text", G_CALLBACK(mmgui_main_sms_list_select_entry_signal), mmguiapp); } void mmgui_main_sms_load_contacts_from_system_addressbooks(mmgui_application_t mmguiapp) { /*Autocompletion*/ mmgui_main_sms_autocompletion_model_fill(mmguiapp, MMGUI_MAIN_CONTACT_GNOME); mmgui_main_sms_autocompletion_model_fill(mmguiapp, MMGUI_MAIN_CONTACT_KDE); /*Dropdown list*/ mmgui_main_sms_menu_model_fill(mmguiapp, MMGUI_MAIN_SMS_SOURCE_GNOME); mmgui_main_sms_menu_model_fill(mmguiapp, MMGUI_MAIN_SMS_SOURCE_KDE); } void mmgui_main_sms_list_clear(mmgui_application_t mmguiapp) { GtkTreeModel *model; GtkTextBuffer *buffer; GtkTextIter siter, eiter; GtkTreeIter iter, catiter; GtkTreePath *refpath; GtkTreeRowReference *reference; GSList *reflist, *iterator; gboolean validcont, validcat; guint contactsource; gchar *pathstr; if (mmguiapp == NULL) return; /*Clear SMS list*/ model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->smslist)); if (model != NULL) { gtk_tree_store_clear(GTK_TREE_STORE(model)); } /*Clear SMS text field*/ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->smstext)); if (buffer != NULL) { gtk_text_buffer_get_bounds(buffer, &siter, &eiter); gtk_text_buffer_delete(buffer, &siter, &eiter); } /*Set sensitivity of SMS control buttons*/ gtk_widget_set_sensitive(mmguiapp->window->removesmsbutton, FALSE); gtk_widget_set_sensitive(mmguiapp->window->answersmsbutton, FALSE); /*Remove modem contacts from autocompletion model*/ if (mmguiapp->window->smscompletionmodel != NULL) { reflist = NULL; /*Iterate through model and save references*/ validcont = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mmguiapp->window->smscompletionmodel), &iter); while (validcont) { gtk_tree_model_get(GTK_TREE_MODEL(mmguiapp->window->smscompletionmodel), &iter, MMGUI_MAIN_SMS_COMPLETION_SOURCE, &contactsource, -1); /*Save references only on modem contacts*/ if (contactsource == MMGUI_MAIN_SMS_COMPLETION_SOURCE) { refpath = gtk_tree_model_get_path(GTK_TREE_MODEL(mmguiapp->window->smscompletionmodel), &iter); if (refpath != NULL) { reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(mmguiapp->window->smscompletionmodel), refpath); if (reference != NULL) { reflist = g_slist_prepend(reflist, reference); } } } validcont = gtk_tree_model_iter_next(GTK_TREE_MODEL(mmguiapp->window->smscompletionmodel), &iter); } /*Remove contacts*/ if (reflist != NULL) { for (iterator = reflist; iterator != NULL; iterator = iterator->next) { refpath = gtk_tree_row_reference_get_path((GtkTreeRowReference *)iterator->data); if (refpath) { if (gtk_tree_model_get_iter(GTK_TREE_MODEL(mmguiapp->window->smscompletionmodel), &iter, refpath)) { gtk_list_store_remove(GTK_LIST_STORE(mmguiapp->window->smscompletionmodel), &iter); } } } /*Clear resources allocated for references*/ g_slist_foreach(reflist, (GFunc)gtk_tree_row_reference_free, NULL); g_slist_free(reflist); } } /*Clear contacts from dropdown list*/ if ((mmguiapp->window->smsnumlistmodempath != NULL) && (mmguiapp->window->smsnumlistmodel != NULL)) { pathstr = gtk_tree_path_to_string(mmguiapp->window->smsnumlistmodempath); if (pathstr != NULL) { reflist = NULL; /*Iterate through model and save references*/ validcat = gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &catiter, pathstr); while (validcat) { if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &catiter)) { validcont = gtk_tree_model_iter_children(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, &catiter); while (validcont) { gtk_tree_model_get(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, MMGUI_MAIN_SMS_LIST_SOURCE, &contactsource, -1); /*Save references only on modem contacts*/ if (contactsource == MMGUI_MAIN_SMS_SOURCE_MODEM) { refpath = gtk_tree_model_get_path(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); if (refpath != NULL) { reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), refpath); if (reference != NULL) { reflist = g_slist_prepend(reflist, reference); } } } validcont = gtk_tree_model_iter_next(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); } } validcat = gtk_tree_model_iter_next(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &catiter); } /*Remove contacts*/ if (reflist != NULL) { for (iterator = reflist; iterator != NULL; iterator = iterator->next) { refpath = gtk_tree_row_reference_get_path((GtkTreeRowReference *)iterator->data); if (refpath) { if (gtk_tree_model_get_iter(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, refpath)) { gtk_tree_store_remove(GTK_TREE_STORE(mmguiapp->window->smsnumlistmodel), &iter); } } } /*Clear resources allocated for references*/ g_slist_foreach(reflist, (GFunc)gtk_tree_row_reference_free, NULL); g_slist_free(reflist); } g_free(pathstr); } } /*Clear history contacts from dropdown list*/ if (mmguiapp->window->smsnumlistmodel != NULL) { reflist = NULL; /*Iterate through model and save references*/ validcat = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); while (validcat) { gtk_tree_model_get(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, MMGUI_MAIN_SMS_LIST_SOURCE, &contactsource, -1); if (contactsource == MMGUI_MAIN_SMS_SOURCE_HISTORY) { refpath = gtk_tree_model_get_path(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); if (refpath != NULL) { reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), refpath); if (reference != NULL) { reflist = g_slist_prepend(reflist, reference); } } } validcat = gtk_tree_model_iter_next(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter); } /*Remove contacts*/ if (reflist != NULL) { for (iterator = reflist; iterator != NULL; iterator = iterator->next) { refpath = gtk_tree_row_reference_get_path((GtkTreeRowReference *)iterator->data); if (refpath) { if (gtk_tree_model_get_iter(GTK_TREE_MODEL(mmguiapp->window->smsnumlistmodel), &iter, refpath)) { gtk_tree_store_remove(GTK_TREE_STORE(mmguiapp->window->smsnumlistmodel), &iter); } } } /*Clear resources allocated for references*/ g_slist_foreach(reflist, (GFunc)gtk_tree_row_reference_free, NULL); g_slist_free(reflist); } } /*Free history list*/ if (mmguiapp->window->smsnumlisthistory != NULL) { g_slist_foreach(mmguiapp->window->smsnumlisthistory, (GFunc)g_free, NULL); g_slist_free(mmguiapp->window->smsnumlisthistory); } } modem-manager-gui-0.0.17.1/src/smsdb.c0000644000175000017500000005457212375673074015773 0ustar alexalex/* * smsdb.c * * Copyright 2012-2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include "encoding.h" #include "smsdb.h" #define MMGUI_SMSDB_SMS_MESSAGE_XML "\n\t%s\n\t\n\t%u\n\t%s\n\t%s\n\t%u\n\t%u\n\n\n" #define MMGUI_SMSDB_READ_TAG "\n\t" #define MMGUI_SMSDB_TRAILER_TAG "\n\n\n" #define MMGUI_SMSDB_TRAILER_PARAMS "\n\t%u\n\t%u\n\n\n" #define MMGUI_SMSDB_ACCESS_MASK 0755 enum _mmgui_smsdb_xml_elements { MMGUI_SMSDB_XML_PARAM_NUMBER = 0, MMGUI_SMSDB_XML_PARAM_TIME, MMGUI_SMSDB_XML_PARAM_BINARY, MMGUI_SMSDB_XML_PARAM_SERVICENUMBER, MMGUI_SMSDB_XML_PARAM_TEXT, MMGUI_SMSDB_XML_PARAM_READ, MMGUI_SMSDB_XML_PARAM_FOLDER, MMGUI_SMSDB_XML_PARAM_NULL }; static gint mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_NULL; static gint mmgui_smsdb_sms_message_sort_compare(gconstpointer a, gconstpointer b); static void mmgui_smsdb_free_sms_list_foreach(gpointer data, gpointer user_data); static mmgui_sms_message_t mmgui_smsdb_xml_parse(gchar *xml, gsize size); static void mmgui_smsdb_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error); static void mmgui_smsdb_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error); static void mmgui_smsdb_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error); smsdb_t mmgui_smsdb_open(const gchar *persistentid, const gchar *internalid) { smsdb_t smsdb; const gchar *newfilepath; const gchar *newfilename; gchar filename[64]; const gchar *oldfilename; if (persistentid == NULL) return NULL; //Form path using XDG standard newfilepath = g_build_path(G_DIR_SEPARATOR_S, g_get_user_data_dir(), "modem-manager-gui", "devices", persistentid, NULL); if (newfilepath == NULL) return NULL; //If directory structure not exists, create it if (!g_file_test(newfilepath, G_FILE_TEST_IS_DIR)) { if (g_mkdir_with_parents(newfilepath, S_IRUSR|S_IWUSR|S_IXUSR|S_IXGRP|S_IXOTH) == -1) { g_warning("Failed to make XDG data directory: %s", newfilepath); } } //Form file name newfilename = g_build_filename(newfilepath, "sms.gdbm", NULL); g_free((gchar *)newfilepath); if (newfilename == NULL) return NULL; //If file already exists, just work with it if ((!g_file_test(newfilename, G_FILE_TEST_EXISTS)) && (internalid != NULL)) { //Form old-style file path memset(filename, 0, sizeof(filename)); g_snprintf(filename, sizeof(filename), "sms-%s.gdbm", internalid); oldfilename = g_build_filename(g_get_home_dir(), ".config", "modem-manager-gui", filename, NULL); if (oldfilename != NULL) { //If file exists in old location, move it if (g_file_test(oldfilename, G_FILE_TEST_EXISTS)) { if (g_rename(oldfilename, newfilename) == -1) { g_warning("Failed to move file into XDG data directory: %s -> %s", oldfilename, newfilename); } } } g_free((gchar *)oldfilename); } smsdb = g_new(struct _smsdb, 1); smsdb->filepath = newfilename; smsdb->unreadmessages = 0; return smsdb; } gboolean mmgui_smsdb_close(smsdb_t smsdb) { if (smsdb == NULL) return FALSE; if (smsdb->filepath != NULL) { g_free((gchar *)smsdb->filepath); } smsdb->unreadmessages = 0; g_free(smsdb); return TRUE; } mmgui_sms_message_t mmgui_smsdb_message_create(void) { mmgui_sms_message_t message; message = g_new(struct _mmgui_sms_message, 1); message->timestamp = time(NULL); message->read = FALSE; message->binary = FALSE; message->folder = MMGUI_SMSDB_SMS_FOLDER_INCOMING; message->number = NULL; message->svcnumber = NULL; message->idents = NULL; message->text = NULL; return message; } void mmgui_smsdb_message_free(mmgui_sms_message_t message) { if (message == NULL) return; if (message->number != NULL) { g_free(message->number); } if (message->svcnumber != NULL) { g_free(message->svcnumber); } if (message->idents != NULL) { g_array_free(message->idents, TRUE); } if (message->text != NULL) { g_string_free(message->text, TRUE); } g_free(message); } gboolean mmgui_smsdb_message_set_number(mmgui_sms_message_t message, const gchar *number) { gchar *escnumber; gsize srclen; if ((message == NULL) || (number == NULL)) return FALSE; srclen = strlen(number); if (srclen == 0) return FALSE; escnumber = encoding_clear_special_symbols(g_strdup(number), srclen); if (escnumber != NULL) { if (message->number != NULL) { g_free(message->number); } message->number = escnumber; return TRUE; } else { return FALSE; } } const gchar *mmgui_smsdb_message_get_number(mmgui_sms_message_t message) { if (message == NULL) return NULL; return message->number; } gboolean mmgui_smsdb_message_set_service_number(mmgui_sms_message_t message, const gchar *number) { gchar *escnumber; gsize srclen; if ((message == NULL) || (number == NULL)) return FALSE; srclen = strlen(number); if (srclen == 0) return FALSE; escnumber = encoding_clear_special_symbols(g_strdup(number), srclen); if (escnumber != NULL) { if (message->svcnumber != NULL) { g_free(message->svcnumber); } message->svcnumber = escnumber; return TRUE; } else { return FALSE; } } const gchar *mmgui_smsdb_message_get_service_number(mmgui_sms_message_t message) { if (message == NULL) return NULL; return message->svcnumber; } gboolean mmgui_smsdb_message_set_text(mmgui_sms_message_t message, const gchar *text, gboolean append) { if ((message == NULL) || (text == NULL)) return FALSE; if (message->binary) return FALSE; if (!append) { if (message->text != NULL) { g_string_free(message->text, TRUE); } message->text = g_string_new(text); } else { if (message->text != NULL) { message->text = g_string_append_c(message->text, ' '); message->text = g_string_append(message->text, text); } else { message->text = g_string_new(text); } } return TRUE; } const gchar *mmgui_smsdb_message_get_text(mmgui_sms_message_t message) { if (message == NULL) return NULL; if (message->text != NULL) { return message->text->str; } else { return NULL; } } gboolean mmgui_smsdb_message_set_data(mmgui_sms_message_t message, const gchar *data, gsize len, gboolean append) { guint srclen, index; if ((message == NULL) || (data == NULL) || (len == 0)) return FALSE; if (!message->binary) return FALSE; if (!append) { if (message->text != NULL) { g_string_free(message->text, TRUE); } message->text = g_string_new_len(NULL, len*2+1); for (index=0; indextext->str+(index*2), "0%1x", (guchar)data[index]); } else { g_sprintf(message->text->str+(index*2), "%2x", (guchar)data[index]); } } message->text->str[len*2] = '\0'; } else { if (message->text != NULL) { message->text = g_string_append(message->text, "00"); srclen = message->text->len-1; message->text = g_string_set_size(message->text, srclen+len*2+1); for (index=0; indextext->str+(srclen+index*2), "0%1x", (guchar)data[index]); } else { g_sprintf(message->text->str+(srclen+index*2), "%2x", (guchar)data[index]); } } message->text->str[srclen+len*2] = '\0'; } else { message->text = g_string_new_len(NULL, len*2+1); for (index=0; indextext->str+(index*2), "0%1x", (guchar)data[index]); } else { g_sprintf(message->text->str+(index*2), "%2x", (guchar)data[index]); } } message->text->str[len*2] = '\0'; } } return TRUE; } gboolean mmgui_smsdb_message_set_identifier(mmgui_sms_message_t message, guint ident, gboolean append) { if (message == NULL) return FALSE; if (!append) { if (message->idents != NULL) { g_array_free(message->idents, TRUE); } message->idents = g_array_new(FALSE, TRUE, sizeof(guint)); g_array_append_val(message->idents, ident); } else { if (message->idents != NULL) { g_array_append_val(message->idents, ident); } else { message->idents = g_array_new(FALSE, TRUE, sizeof(guint)); g_array_append_val(message->idents, ident); } } return TRUE; } guint mmgui_smsdb_message_get_identifier(mmgui_sms_message_t message) { guint ident; if (message == NULL) return 0; if (message->idents != NULL) { ident = g_array_index(message->idents, guint, 0); } else { ident = 0; } return ident; } gboolean mmgui_smsdb_message_set_timestamp(mmgui_sms_message_t message, time_t timestamp) { if (message == NULL) return FALSE; message->timestamp = timestamp; return TRUE; } time_t mmgui_smsdb_message_get_timestamp(mmgui_sms_message_t message) { if (message == NULL) return 0; return message->timestamp; } gboolean mmgui_smsdb_message_set_read(mmgui_sms_message_t message, gboolean read) { if (message == NULL) return FALSE; message->read = read; return TRUE; } gboolean mmgui_smsdb_message_get_read(mmgui_sms_message_t message) { if (message == NULL) return FALSE; return message->read; } gboolean mmgui_smsdb_message_set_folder(mmgui_sms_message_t message, enum _mmgui_smsdb_sms_folder folder) { if (message == NULL) return FALSE; switch (folder) { case MMGUI_SMSDB_SMS_FOLDER_INCOMING: message->folder = MMGUI_SMSDB_SMS_FOLDER_INCOMING; break; case MMGUI_SMSDB_SMS_FOLDER_SENT: message->folder = MMGUI_SMSDB_SMS_FOLDER_SENT; break; case MMGUI_SMSDB_SMS_FOLDER_DRAFTS: message->folder = MMGUI_SMSDB_SMS_FOLDER_DRAFTS; break; default: message->folder = MMGUI_SMSDB_SMS_FOLDER_INCOMING; break; } return TRUE; } enum _mmgui_smsdb_sms_folder mmgui_smsdb_message_get_folder(mmgui_sms_message_t message) { if (message == NULL) return MMGUI_SMSDB_SMS_FOLDER_INCOMING; return message->folder; } gboolean mmgui_smsdb_message_set_binary(mmgui_sms_message_t message, gboolean binary) { if (message == NULL) return FALSE; message->binary = binary; return TRUE; } gboolean mmgui_smsdb_message_get_binary(mmgui_sms_message_t message) { if (message == NULL) return FALSE; return message->binary; } gulong mmgui_smsdb_message_get_db_identifier(mmgui_sms_message_t message) { if (message == NULL) return 0; return message->dbid; } guint mmgui_smsdb_get_unread_messages(smsdb_t smsdb) { if (smsdb == NULL) return 0; return smsdb->unreadmessages; } gboolean mmgui_smsdb_add_sms(smsdb_t smsdb, mmgui_sms_message_t message) { GDBM_FILE db; gchar smsid[64]; gulong idvalue; gint idlen; datum key, data; gchar *smsnumber; gchar *smstext; gchar *smsxml; if ((smsdb == NULL) || (message == NULL)) return FALSE; if (smsdb->filepath == NULL) return FALSE; if ((message->number == NULL) || ((message->text->str == NULL))) return FALSE; db = gdbm_open((gchar *)smsdb->filepath, 0, GDBM_WRCREAT, MMGUI_SMSDB_ACCESS_MASK, 0); if (db == NULL) return FALSE; do { idvalue = (gulong)random(); memset(smsid, 0, sizeof(smsid)); idlen = snprintf(smsid, sizeof(smsid), "%lu", idvalue); key.dptr = (gchar *)smsid; key.dsize = idlen; } while (gdbm_exists(db, key)); message->dbid = idvalue; smsnumber = g_markup_escape_text(message->number, -1); if (smsnumber == NULL) { g_warning("Unable to convert SMS number string"); gdbm_close(db); return FALSE; } smstext = g_markup_escape_text(message->text->str, -1); if (smstext == NULL) { g_warning("Unable to convert SMS text string"); g_free(smsnumber); gdbm_close(db); return FALSE; } smsxml = g_strdup_printf(MMGUI_SMSDB_SMS_MESSAGE_XML, smsnumber, message->timestamp, message->binary, message->svcnumber, smstext, message->read, message->folder); data.dptr = smsxml; data.dsize = strlen(smsxml); if (gdbm_store(db, key, data, GDBM_REPLACE) == -1) { g_warning("Unable to write to database"); gdbm_close(db); g_free(smsxml); return FALSE; } gdbm_sync(db); gdbm_close(db); if (!message->read) { smsdb->unreadmessages++; } g_free(smsxml); g_free(smsnumber); g_free(smstext); return TRUE; } static gint mmgui_smsdb_sms_message_sort_compare(gconstpointer a, gconstpointer b) { mmgui_sms_message_t sms1, sms2; sms1 = (mmgui_sms_message_t)a; sms2 = (mmgui_sms_message_t)b; if (sms1->timestamp < sms2->timestamp) { return -1; } else if (sms1->timestamp > sms2->timestamp) { return 1; } else { return 0; } } GSList *mmgui_smsdb_read_sms_list(smsdb_t smsdb) { GDBM_FILE db; GSList *list; mmgui_sms_message_t message; datum key, data; gchar smsid[64]; if (smsdb == NULL) return NULL; if (smsdb->filepath == NULL) return NULL; db = gdbm_open((gchar *)smsdb->filepath, 0, GDBM_READER, MMGUI_SMSDB_ACCESS_MASK, 0); if (db == NULL) return NULL; smsdb->unreadmessages = 0; list = NULL; key = gdbm_firstkey(db); if (key.dptr != NULL) { do { data = gdbm_fetch(db, key); if (data.dptr != NULL) { message = mmgui_smsdb_xml_parse(data.dptr, data.dsize); if (message != NULL) { if (!message->read) { smsdb->unreadmessages++; } memset(smsid, 0, sizeof(smsid)); strncpy(smsid, key.dptr, key.dsize); message->dbid = strtoul(smsid, NULL, 0); list = g_slist_prepend(list, message); } } key = gdbm_nextkey(db, key); } while (key.dptr != NULL); } gdbm_close(db); if (list != NULL) { list = g_slist_sort(list, mmgui_smsdb_sms_message_sort_compare); } return list; } static void mmgui_smsdb_free_sms_list_foreach(gpointer data, gpointer user_data) { mmgui_sms_message_t message; if (data != NULL) return; message = (mmgui_sms_message_t)data; if (message->number != NULL) { g_free(message->number); } if (message->svcnumber != NULL) { g_free(message->svcnumber); } if (message->idents != NULL) { g_array_free(message->idents, TRUE); } if (message->text != NULL) { g_string_free(message->text, TRUE); } } void mmgui_smsdb_message_free_list(GSList *smslist) { if (smslist == NULL) return; g_slist_foreach(smslist, mmgui_smsdb_free_sms_list_foreach, NULL); g_slist_free(smslist); } mmgui_sms_message_t mmgui_smsdb_read_sms_message(smsdb_t smsdb, gulong idvalue) { GDBM_FILE db; gchar smsid[64]; gint idlen; datum key, data; mmgui_sms_message_t message; if (smsdb == NULL) return NULL; if (smsdb->filepath == NULL) return NULL; db = gdbm_open((gchar *)smsdb->filepath, 0, GDBM_READER, MMGUI_SMSDB_ACCESS_MASK, 0); if (db == NULL) return NULL; message = NULL; memset(smsid, 0, sizeof(smsid)); idlen = snprintf(smsid, sizeof(smsid), "%lu", idvalue); key.dptr = (gchar *)smsid; key.dsize = idlen; if (gdbm_exists(db, key)) { data = gdbm_fetch(db, key); if (data.dptr != NULL) { message = mmgui_smsdb_xml_parse(data.dptr, data.dsize); message->dbid = idvalue; } } gdbm_close(db); return message; } gboolean mmgui_smsdb_remove_sms_message(smsdb_t smsdb, gulong idvalue) { GDBM_FILE db; gchar smsid[64]; gint idlen, unreaddelta; datum key, data; gchar *node; if (smsdb == NULL) return FALSE; if (smsdb->filepath == NULL) return FALSE; db = gdbm_open((gchar *)smsdb->filepath, 0, GDBM_WRCREAT, MMGUI_SMSDB_ACCESS_MASK, 0); if (db == NULL) return FALSE; memset(smsid, 0, sizeof(smsid)); idlen = g_snprintf(smsid, sizeof(smsid), "%lu", idvalue); key.dptr = (gchar *)smsid; key.dsize = idlen; unreaddelta = 0; if (gdbm_exists(db, key)) { data = gdbm_fetch(db, key); if (data.dptr != NULL) { node = strstr(data.dptr, MMGUI_SMSDB_READ_TAG); if (node != NULL) { if ((node-data.dptr > 8) && (isdigit(node[8]))) { if (node[8] == '0') { unreaddelta = -1; } else { unreaddelta = 0; } } } else { unreaddelta = -1; } free(data.dptr); } if (gdbm_delete(db, key) == 0) { smsdb->unreadmessages += unreaddelta; gdbm_sync(db); gdbm_close(db); return TRUE; } } gdbm_close(db); return FALSE; } gboolean mmgui_smsdb_set_message_read_status(smsdb_t smsdb, gulong idvalue, gboolean readflag) { GDBM_FILE db; gint unreaddelta; gchar smsid[64]; gint idlen; datum key, data; gchar *node, /* *trailer,*/ *newmsg; gchar newtrailer[64]; gint newtrailerlen; gboolean res; if (smsdb == NULL) return FALSE; if (smsdb->filepath == NULL) return FALSE; db = gdbm_open((gchar *)smsdb->filepath, 0, GDBM_WRITER, MMGUI_SMSDB_ACCESS_MASK, 0); if (db == NULL) return FALSE; memset(smsid, 0, sizeof(smsid)); idlen = snprintf(smsid, sizeof(smsid), "%lu", idvalue); key.dptr = (gchar *)smsid; key.dsize = idlen; res = FALSE; unreaddelta = 0; if (gdbm_exists(db, key)) { data = gdbm_fetch(db, key); if (data.dptr != NULL) { node = strstr(data.dptr, MMGUI_SMSDB_READ_TAG); if (node != NULL) { if ((node-data.dptr > 8) && (isdigit(node[8]))) { if ((readflag) && (node[8] == '0')) { unreaddelta = -1; node[8] = '1'; } else if ((!readflag) && (node[8] == '1')) { unreaddelta = 1; node[8] = '0'; } if (gdbm_store(db, key, data, GDBM_REPLACE) == 0) { smsdb->unreadmessages += unreaddelta; res = TRUE; } free(data.dptr); } } else { if (strstr(data.dptr, MMGUI_SMSDB_TRAILER_TAG) != NULL) { memset(newtrailer, 0, sizeof(newtrailer)); newtrailerlen = g_snprintf(newtrailer, sizeof(newtrailer), MMGUI_SMSDB_TRAILER_PARAMS, readflag, MMGUI_SMSDB_SMS_FOLDER_INCOMING); newmsg = g_malloc0(data.dsize-9+newtrailerlen+1); memcpy(newmsg, data.dptr, data.dsize-9); memcpy(newmsg+data.dsize-9, newtrailer, newtrailerlen); free(data.dptr); data.dptr = newmsg; data.dsize = data.dsize-9+newtrailerlen; if (readflag) { unreaddelta = -1; } else { unreaddelta = 0; } if (gdbm_store(db, key, data, GDBM_REPLACE) == 0) { smsdb->unreadmessages += unreaddelta; res = TRUE; } g_free(newmsg); } } } } gdbm_close(db); return res; } static mmgui_sms_message_t mmgui_smsdb_xml_parse(gchar *xml, gsize size) { mmgui_sms_message_t message; GMarkupParser mp; GMarkupParseContext *mpc; GError *error = NULL; message = g_new(struct _mmgui_sms_message, 1); message->timestamp = time(NULL); message->read = FALSE; message->folder = MMGUI_SMSDB_SMS_FOLDER_INCOMING; message->binary = FALSE; message->number = NULL; message->svcnumber = NULL; message->idents = NULL; message->text = NULL; mp.start_element = mmgui_smsdb_xml_get_element; mp.end_element = mmgui_smsdb_xml_end_element; mp.text = mmgui_smsdb_xml_get_value; mp.passthrough = NULL; mp.error = NULL; mpc = g_markup_parse_context_new(&mp, 0, (gpointer)message, NULL); g_markup_parse_context_parse(mpc, xml, size, &error); if (error != NULL) { //g_warning(error->message); g_error_free(error); g_markup_parse_context_free(mpc); return NULL; } g_markup_parse_context_free(mpc); return message; } static void mmgui_smsdb_xml_get_element(GMarkupParseContext *context, const gchar *element, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error) { if (g_str_equal(element, "number")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_NUMBER; } else if (g_str_equal(element, "time")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_TIME; } else if (g_str_equal(element, "binary")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_BINARY; } else if (g_str_equal(element, "servicenumber")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_SERVICENUMBER; } else if (g_str_equal(element, "text")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_TEXT; } else if (g_str_equal(element, "read")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_READ; } else if (g_str_equal(element, "folder")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_FOLDER; } else { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_NULL; } } static void mmgui_smsdb_xml_get_value(GMarkupParseContext *context, const gchar *text, gsize size, gpointer data, GError **error) { mmgui_sms_message_t message; gchar *numescstr, *textescstr; message = (mmgui_sms_message_t)data; if (mmgui_smsdb_xml_parameter == MMGUI_SMSDB_XML_PARAM_NULL) return; switch (mmgui_smsdb_xml_parameter) { case MMGUI_SMSDB_XML_PARAM_NUMBER: numescstr = encoding_unescape_xml_markup(text, size); if (numescstr != NULL) { message->number = encoding_clear_special_symbols((gchar *)numescstr, strlen(numescstr)); } else { message->number = encoding_clear_special_symbols((gchar *)text, size); } break; case MMGUI_SMSDB_XML_PARAM_TIME: message->timestamp = (time_t)atol(text); break; case MMGUI_SMSDB_XML_PARAM_BINARY: if (atoi(text)) { message->binary = TRUE; } else { message->binary = FALSE; } break; case MMGUI_SMSDB_XML_PARAM_SERVICENUMBER: message->svcnumber = g_strdup(text); break; case MMGUI_SMSDB_XML_PARAM_TEXT: textescstr = encoding_unescape_xml_markup(text, size); if (textescstr != NULL) { message->text = g_string_new(textescstr); g_free(textescstr); } else { message->text = g_string_new(text); } break; case MMGUI_SMSDB_XML_PARAM_READ: if (atoi(text)) { message->read = TRUE; } else { message->read = FALSE; } break; case MMGUI_SMSDB_XML_PARAM_FOLDER: message->folder = atoi(text); break; default: break; } } static void mmgui_smsdb_xml_end_element(GMarkupParseContext *context, const gchar *element, gpointer data, GError **error) { if (!g_str_equal(element, "sms")) { mmgui_smsdb_xml_parameter = MMGUI_SMSDB_XML_PARAM_NULL; } } modem-manager-gui-0.0.17.1/src/ayatana.h0000644000175000017500000001213412157577044016270 0ustar alexalex/* * ayatana.h * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __AYATANA_H__ #define __AYATANA_H__ #include #include #include "libpaths.h" enum _mmgui_aytana_library { MMGUI_AYATANA_LIB_NULL = 0, MMGUI_AYATANA_LIB_INDICATE, MMGUI_AYATANA_LIB_MESSAGINGMENU }; enum _mmgui_ayatana_event { MMGUI_AYATANA_EVENT_SERVER = 0, MMGUI_AYATANA_EVENT_CLIENT }; /*libindiacate staructures*/ typedef struct _IndicateServer IndicateServer; typedef struct _IndicateIndicator IndicateIndicator; /*libmessaging-menu structures*/ typedef struct _MessagingMenuApp MessagingMenuApp; /*libindicate functions*/ typedef IndicateServer *(*indicate_server_ref_default_func)(void); typedef void (*indicate_server_set_type_func)(IndicateServer *server, const gchar *type); typedef void (*indicate_server_set_desktop_file_func)(IndicateServer *server, const gchar *path); typedef void (*indicate_server_show_func)(IndicateServer *server); typedef void (*indicate_server_hide_func)(IndicateServer *server); typedef IndicateIndicator *(*indicate_indicator_new_with_server_func)(IndicateServer *server); typedef void (*indicate_indicator_set_property_func)(IndicateIndicator *indicator, const gchar *key, const gchar *data); typedef void (*indicate_indicator_show_func)(IndicateIndicator *indicator); typedef void (*indicate_indicator_hide_func)(IndicateIndicator *indicator); /*libmessaging-menu functions*/ typedef MessagingMenuApp *(*messaging_menu_app_new_func)(const gchar *desktop_id); typedef void (*messaging_menu_app_register_func)(MessagingMenuApp *app); typedef void (*messaging_menu_app_unregister_func)(MessagingMenuApp *app); typedef void (*messaging_menu_app_append_source_func)(MessagingMenuApp *app, const gchar *id, GIcon *icon, const gchar *label); typedef void (*messaging_menu_app_remove_source_func)(MessagingMenuApp *app, const gchar *source_id); typedef void (*messaging_menu_app_set_source_count_func)(MessagingMenuApp *app, const gchar *source_id, guint count); typedef void (*messaging_menu_app_draw_attention_func)(MessagingMenuApp *app, const gchar *source_id); typedef void (*messaging_menu_app_remove_attention_func)(MessagingMenuApp *app, const gchar *source_id); typedef gboolean (*messaging_menu_app_has_source_func)(MessagingMenuApp *app, const gchar *source_id); struct _mmgui_ayatana_libindicate { IndicateServer *server; IndicateIndicator *client; indicate_server_ref_default_func indicate_server_ref_default; indicate_server_set_type_func indicate_server_set_type; indicate_server_set_desktop_file_func indicate_server_set_desktop_file; indicate_server_show_func indicate_server_show; indicate_server_hide_func indicate_server_hide; indicate_indicator_new_with_server_func indicate_indicator_new_with_server; indicate_indicator_set_property_func indicate_indicator_set_property; indicate_indicator_show_func indicate_indicator_show; indicate_indicator_hide_func indicate_indicator_hide; }; struct _mmgui_ayatana_libmessagingmenu { MessagingMenuApp *server; messaging_menu_app_new_func messaging_menu_app_new; messaging_menu_app_register_func messaging_menu_app_register; messaging_menu_app_unregister_func messaging_menu_app_unregister; messaging_menu_app_append_source_func messaging_menu_app_append_source; messaging_menu_app_remove_source_func messaging_menu_app_remove_source; messaging_menu_app_set_source_count_func messaging_menu_app_set_source_count; messaging_menu_app_draw_attention_func messaging_menu_app_draw_attention; messaging_menu_app_remove_attention_func messaging_menu_app_remove_attention; messaging_menu_app_has_source_func messaging_menu_app_has_source; }; /*Ayatana event callback*/ typedef void (*mmgui_ayatana_event_callback)(enum _mmgui_ayatana_event event, gpointer ayatana, gpointer data, gpointer userdata); struct _mmgui_ayatana { /*Module*/ GModule *module; /*Used library*/ enum _mmgui_aytana_library library; /*Event callback*/ mmgui_ayatana_event_callback eventcb; gpointer userdata; /*Functions union*/ union { struct _mmgui_ayatana_libindicate ind; struct _mmgui_ayatana_libmessagingmenu mmenu; } backend; }; typedef struct _mmgui_ayatana *mmgui_ayatana_t; mmgui_ayatana_t mmgui_ayatana_new(mmgui_libpaths_cache_t libcache, mmgui_ayatana_event_callback callback, gpointer userdata); void mmgui_ayatana_close(mmgui_ayatana_t ayatana); void mmgui_ayatana_set_unread_messages_number(mmgui_ayatana_t ayatana, guint number); #endif /* __AYATANA_H__ */ modem-manager-gui-0.0.17.1/src/ussd-page.c0000644000175000017500000005670312377210611016533 0ustar alexalex/* * ussd-page.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "modem-settings.h" #include "ussdlist.h" #include "mmguicore.h" #include "resources.h" #include "ussd-page.h" #include "main.h" enum _mmgui_main_sms_completion { MMGUI_MAIN_USSD_COMPLETION_CAPTION = 0, MMGUI_MAIN_USSD_COMPLETION_NAME, MMGUI_MAIN_USSD_COMPLETION_COMMAND, MMGUI_MAIN_USSD_COMPLETION_COLUMNS }; static void mmgui_main_ussd_list_read_callback(gchar *command, gchar *description, gboolean reencode, gpointer data); static gboolean mmgui_main_ussd_list_add_command_to_xml_export_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static void mmgui_main_ussd_list_command_cell_edited_signal(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer data); static void mmgui_main_ussd_list_description_cell_edited_signal(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer data); /*USSD*/ void mmgui_main_ussd_command_add_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; GtkTreeModel *model; GtkTreeIter iter; GtkTreeViewColumn *column; GtkTreePath *path; gchar *pathstr; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview)); if (model != NULL) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_USSDLIST_COMMAND, "*100#", MMGUI_MAIN_USSDLIST_DESCRIPTION, _("Sample command"), -1); pathstr = gtk_tree_model_get_string_from_iter(GTK_TREE_MODEL(model), &iter); path = gtk_tree_path_new_from_string(pathstr); column = gtk_tree_view_get_column(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), 0); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), path, 0, TRUE, 0.5, 0.0); gtk_tree_view_set_cursor(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), path, column, TRUE); gtk_tree_path_free(path); g_free(pathstr); } } void mmgui_main_ussd_command_remove_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview)); if ((model != NULL) && (selection != NULL)) { if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_list_store_remove(GTK_LIST_STORE(model), &iter); } } } void mmgui_main_ussd_menu_update_callback(gchar *command, gchar *description, gboolean reencode, gpointer data) { mmgui_application_t mmguiapp; gchar *caption; GtkTreeIter iter; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if ((command != NULL) && (description != NULL)) { /*Add USSD command to combo box*/ if (mmguicore_ussd_validate_request(command) == MMGUI_USSD_VALIDATION_REQUEST) { caption = g_strdup_printf("%s - %s", command, description); gtk_list_store_append(GTK_LIST_STORE(mmguiapp->window->ussdcompletionmodel), &iter); gtk_list_store_set(GTK_LIST_STORE(mmguiapp->window->ussdcompletionmodel), &iter, MMGUI_MAIN_USSD_COMPLETION_CAPTION, caption, MMGUI_MAIN_USSD_COMPLETION_NAME, description, MMGUI_MAIN_USSD_COMPLETION_COMMAND, command, -1); g_free(caption); } } else if (mmguiapp->core != NULL) { /*Set encoding flag for device*/ if (reencode) { mmguicore_ussd_set_encoding(mmguiapp->core, MMGUI_USSD_ENCODING_UCS2); } else { mmguicore_ussd_set_encoding(mmguiapp->core, MMGUI_USSD_ENCODING_GSM7); } } } static void mmgui_main_ussd_list_read_callback(gchar *command, gchar *description, gboolean reencode, gpointer data) { mmgui_application_data_t mmguiappdata; GtkTreeIter iter; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return; if ((mmguiappdata->mmguiapp == NULL) || (mmguiappdata->data == NULL)) return; if ((command != NULL) && (description != NULL)) { if (mmguicore_ussd_validate_request(command) == MMGUI_USSD_VALIDATION_REQUEST) { gtk_list_store_append(GTK_LIST_STORE((GtkTreeModel *)(mmguiappdata->data)), &iter); gtk_list_store_set(GTK_LIST_STORE((GtkTreeModel *)(mmguiappdata->data)), &iter, MMGUI_MAIN_USSDLIST_COMMAND, command, MMGUI_MAIN_USSDLIST_DESCRIPTION, description, -1); } } /*else if (mmguicore_devices_get_current(mmguicore) != NULL) { if (reencode) { mmguicore_ussd_set_encoding(mmguicore, MMGUI_USSD_ENCODING_UCS2); } else { mmguicore_ussd_set_encoding(mmguicore, MMGUI_USSD_ENCODING_GSM7); } }*/ else { if (reencode) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiappdata->mmguiapp->window->ussdencodingtoolbutton), TRUE); } else { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiappdata->mmguiapp->window->ussdencodingtoolbutton), FALSE); } } } static gboolean mmgui_main_ussd_list_add_command_to_xml_export_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { gchar *command, *description; gtk_tree_model_get(model, iter, MMGUI_MAIN_USSDLIST_COMMAND, &command, MMGUI_MAIN_USSDLIST_DESCRIPTION, &description, -1); ussdlist_add_command_to_xml_export(command, description); return FALSE; } void mmgui_main_ussd_edit(mmgui_application_t mmguiapp) { struct _mmgui_application_data mmguiappdata; GtkTreeModel *model; /*gint response;*/ if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview)); mmguiappdata.mmguiapp = mmguiapp; mmguiappdata.data = model; if (model != NULL) { //Detach model g_object_ref(model); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), NULL); gtk_list_store_clear(GTK_LIST_STORE(model)); //Fill model if (!ussdlist_read_commands(mmgui_main_ussd_list_read_callback, mmguicore_devices_get_identifier(mmguiapp->core), mmguicore_devices_get_internal_identifier(mmguiapp->core), &mmguiappdata)) { /*Get current USSD encoding and set button state*/ if (mmguiapp->core != NULL) { if (mmguicore_ussd_get_encoding(mmguiapp->core) == MMGUI_USSD_ENCODING_GSM7) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->ussdencodingtoolbutton), FALSE); } else if (mmguicore_ussd_get_encoding(mmguiapp->core) == MMGUI_USSD_ENCODING_UCS2) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->ussdencodingtoolbutton), TRUE); } } } //Attach model gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), model); g_object_unref(model); /*response = */gtk_dialog_run(GTK_DIALOG(mmguiapp->window->ussdeditdialog)); if (mmguicore_devices_get_current(mmguiapp->core) != NULL) { //Write commands to XML file ussdlist_start_xml_export(gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->ussdencodingtoolbutton))); gtk_tree_model_foreach(model, mmgui_main_ussd_list_add_command_to_xml_export_foreach, NULL); ussdlist_end_xml_export(mmguicore_devices_get_identifier(mmguiapp->core)); //Update USSD menu gtk_list_store_clear(GTK_LIST_STORE(mmguiapp->window->ussdcompletionmodel)); ussdlist_read_commands(mmgui_main_ussd_menu_update_callback, mmguicore_devices_get_identifier(mmguiapp->core), mmguicore_devices_get_internal_identifier(mmguiapp->core), mmguiapp); //Update USSD reencoding flag if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(mmguiapp->window->ussdencodingtoolbutton))) { mmguicore_ussd_set_encoding(mmguiapp->core, MMGUI_USSD_ENCODING_UCS2); } else { mmguicore_ussd_set_encoding(mmguiapp->core, MMGUI_USSD_ENCODING_GSM7); } } gtk_widget_hide(mmguiapp->window->ussdeditdialog); } } void mmgui_main_ussd_edit_button_clicked_signal(GtkEditable *editable, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_ussd_edit(mmguiapp); } void mmgui_main_ussd_command_combobox_changed_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; GtkTreeIter iter; const gchar *command; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(mmguiapp->window->ussdcombobox), &iter)) { gtk_tree_model_get(GTK_TREE_MODEL(mmguiapp->window->ussdcompletionmodel), &iter, MMGUI_MAIN_USSD_COMPLETION_COMMAND, &command, -1); if (command != NULL) { gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->ussdentry), command); g_free((gchar *)command); } } } void mmgui_main_ussd_command_entry_changed_signal(GtkEditable *editable, gpointer data) { const gchar *request; enum _mmgui_ussd_validation validationid; enum _mmgui_ussd_state sessionstate; mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; //Validate request request = gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->ussdentry)); validationid = mmguicore_ussd_validate_request((gchar *)request); if (validationid == MMGUI_USSD_VALIDATION_REQUEST) { //Simple request #if GTK_CHECK_VERSION(3,10,0) gtk_entry_set_icon_from_icon_name(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, NULL); #else gtk_entry_set_icon_from_stock(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, NULL); #endif gtk_entry_set_icon_tooltip_markup(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, NULL); gtk_widget_set_sensitive(mmguiapp->window->ussdsend, TRUE); } else if (validationid == MMGUI_USSD_VALIDATION_INVALID) { //Incorrect request #if GTK_CHECK_VERSION(3,10,0) gtk_entry_set_icon_from_icon_name(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, "dialog-warning"); #else gtk_entry_set_icon_from_stock(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CAPS_LOCK_WARNING); #endif gtk_entry_set_icon_tooltip_markup(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, _("USSD request is not valid\nRequest must be 160 symbols long\nstarted with '*' and ended with '#'")); gtk_widget_set_sensitive(mmguiapp->window->ussdsend, FALSE); } else if (validationid == MMGUI_USSD_VALIDATION_RESPONSE) { //Response sessionstate = mmguicore_ussd_get_state(mmguiapp->core); if (sessionstate == MMGUI_USSD_STATE_USER_RESPONSE) { //Response expected #if GTK_CHECK_VERSION(3,10,0) gtk_entry_set_icon_from_icon_name(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, NULL); #else gtk_entry_set_icon_from_stock(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, NULL); #endif gtk_entry_set_icon_tooltip_markup(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, NULL); gtk_widget_set_sensitive(mmguiapp->window->ussdsend, TRUE); } else { //Response not expected #if GTK_CHECK_VERSION(3,10,0) gtk_entry_set_icon_from_icon_name(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, "dialog-warning"); #else gtk_entry_set_icon_from_stock(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CAPS_LOCK_WARNING); #endif gtk_entry_set_icon_tooltip_markup(GTK_ENTRY(mmguiapp->window->ussdentry), GTK_ENTRY_ICON_SECONDARY, _("USSD request is not valid\nRequest must be 160 symbols long\nstarted with '*' and ended with '#'")); gtk_widget_set_sensitive(mmguiapp->window->ussdsend, FALSE); } } } void mmgui_main_ussd_command_entry_activated_signal(GtkEntry *entry, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_ussd_request_send(mmguiapp); } void mmgui_main_ussd_send_button_clicked_signal(GtkButton *button, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_ussd_request_send(mmguiapp); } static gboolean mmgui_main_ussd_entry_match_selected_signal(GtkEntryCompletion *widget, GtkTreeModel *model, GtkTreeIter *iter, gpointer userdata) { mmgui_application_t mmguiapp; const gchar *command; mmguiapp = (mmgui_application_t)userdata; if (mmguiapp == NULL) return FALSE; gtk_tree_model_get(GTK_TREE_MODEL(mmguiapp->window->ussdcompletionmodel), iter, MMGUI_MAIN_USSD_COMPLETION_COMMAND, &command, -1); if (command != NULL) { gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->ussdentry), command); g_free((gchar *)command); return TRUE; } return FALSE; } void mmgui_main_ussd_request_send(mmgui_application_t mmguiapp) { gchar *request; enum _mmgui_ussd_validation validationid; enum _mmgui_ussd_state sessionstate; GtkTextBuffer *buffer; GtkTextIter startiter, enditer; GtkTextMark *position; if (mmguiapp == NULL) return; if (gtk_entry_get_text_length(GTK_ENTRY(mmguiapp->window->ussdentry)) == 0) return; request = (gchar *)gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->ussdentry)); //Session state and request validation validationid = mmguicore_ussd_validate_request(request); sessionstate = mmguicore_ussd_get_state(mmguiapp->core); //Text view buffer buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->ussdtext)); if (validationid != MMGUI_USSD_VALIDATION_INVALID) { if (!((validationid == MMGUI_USSD_VALIDATION_RESPONSE) && (sessionstate != MMGUI_USSD_STATE_USER_RESPONSE))) { if (mmguicore_ussd_send(mmguiapp->core, request)) { if (validationid == MMGUI_USSD_VALIDATION_REQUEST) { /*save last request*/ mmgui_modem_settings_set_string(mmguiapp->modemsettings, "ussd_sent_request", request); //clear text view gtk_text_buffer_get_bounds(buffer, &startiter, &enditer); gtk_text_buffer_delete(buffer, &startiter, &enditer); //add request text gtk_text_buffer_get_end_iter(buffer, &enditer); gtk_text_buffer_insert_with_tags(buffer, &enditer, request, -1, mmguiapp->window->ussdrequesttag, NULL); gtk_text_buffer_get_end_iter(buffer, &enditer); gtk_text_buffer_insert_with_tags(buffer, &enditer, "\n", -1, mmguiapp->window->ussdrequesttag, NULL); } else if (validationid == MMGUI_USSD_VALIDATION_RESPONSE) { //add response text gtk_text_buffer_get_end_iter(buffer, &enditer); gtk_text_buffer_insert_with_tags(buffer, &enditer, request, -1, mmguiapp->window->ussdrequesttag, NULL); gtk_text_buffer_get_end_iter(buffer, &enditer); gtk_text_buffer_insert_with_tags(buffer, &enditer, "\n", -1, mmguiapp->window->ussdrequesttag, NULL); } //scroll to the end of buffer position = gtk_text_buffer_create_mark(buffer, "position", &enditer, FALSE); gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(mmguiapp->window->ussdtext), position); gtk_text_buffer_delete_mark(buffer, position); //show progress dialog mmgui_main_ui_progress_dialog_open(mmguiapp); } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error sending USSD"), _("Wrong USSD request or device not ready")); } } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error sending USSD"), _("USSD session terminated. You can send new request")); } } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error sending USSD"), _("Wrong USSD request")); } } void mmgui_main_ussd_request_send_end(mmgui_application_t mmguiapp, mmguicore_t mmguicore, const gchar *answer) { enum _mmgui_ussd_state sessionstate; GtkTextBuffer *buffer; GtkTextIter enditer; GtkTextMark *position; if ((mmguiapp == NULL) || (mmguicore == NULL)) return; sessionstate = mmguicore_ussd_get_state(mmguicore); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->ussdtext)); if (answer != NULL) { //Add answer text gtk_text_buffer_get_end_iter(buffer, &enditer); gtk_text_buffer_insert_with_tags(buffer, &enditer, answer, -1, mmguiapp->window->ussdanswertag, NULL); if (sessionstate == MMGUI_USSD_STATE_USER_RESPONSE) { //Add session hint gtk_text_buffer_get_end_iter(buffer, &enditer); gtk_text_buffer_insert_with_tags(buffer, &enditer, _("\nUSSD session is active. Waiting for your input...\n"), -1, mmguiapp->window->ussdhinttag, NULL); } else { //Add new line symbol gtk_text_buffer_get_end_iter(buffer, &enditer); gtk_text_buffer_insert_with_tags(buffer, &enditer, "\n", -1, mmguiapp->window->ussdanswertag, NULL); } //scroll to the end of buffer position = gtk_text_buffer_create_mark(buffer, "position", &enditer, FALSE); gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(mmguiapp->window->ussdtext), position); gtk_text_buffer_delete_mark(buffer, position); } else { mmgui_main_ui_error_dialog_open(mmguiapp, _("Error sending USSD"), mmguicore_get_last_error(mmguiapp->core)); } } static void mmgui_main_ussd_list_command_cell_edited_signal(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (mmguicore_ussd_validate_request(new_text) == MMGUI_USSD_VALIDATION_REQUEST) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview)); if (gtk_tree_model_get_iter_from_string(model, &iter, path)) { gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_USSDLIST_COMMAND, new_text, -1); } } } static void mmgui_main_ussd_list_description_cell_edited_signal(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; if (g_ascii_strcasecmp(new_text, "") != 0) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview)); if (gtk_tree_model_get_iter_from_string(model, &iter, path)) { gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_USSDLIST_DESCRIPTION, new_text, -1); } } } void mmgui_main_ussd_restore_settings_for_modem(mmgui_application_t mmguiapp) { gchar *request; if (mmguiapp == NULL) return; /*Saved USSD commands*/ ussdlist_read_commands(mmgui_main_ussd_menu_update_callback, mmguicore_devices_get_identifier(mmguiapp->core), mmguicore_devices_get_internal_identifier(mmguiapp->core), mmguiapp); /*Last USSD request*/ request = mmgui_modem_settings_get_string(mmguiapp->modemsettings, "ussd_sent_request", "*100#"); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->ussdentry), request); g_free(request); } void mmgui_main_ussd_accelerators_init(mmgui_application_t mmguiapp) { /*Accelerators*/ mmguiapp->window->ussdaccelgroup = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(mmguiapp->window->ussdeditdialog), mmguiapp->window->ussdaccelgroup); gtk_widget_add_accelerator(mmguiapp->window->newussdtoolbutton, "clicked", mmguiapp->window->ussdaccelgroup, GDK_KEY_n, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator(mmguiapp->window->removeussdtoolbutton, "clicked", mmguiapp->window->ussdaccelgroup, GDK_KEY_d, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator(mmguiapp->window->ussdencodingtoolbutton, "clicked", mmguiapp->window->ussdaccelgroup, GDK_KEY_e, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); } void mmgui_main_ussd_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; GtkTextBuffer *buffer; if (mmguiapp == NULL) return; /*List*/ renderer = gtk_cell_renderer_text_new(); g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL); column = gtk_tree_view_column_new_with_attributes(_("Command"), renderer, "text", MMGUI_MAIN_USSDLIST_COMMAND, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), column); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(mmgui_main_ussd_list_command_cell_edited_signal), mmguiapp); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer, "editable", TRUE, "editable-set", TRUE, "ellipsize", PANGO_ELLIPSIZE_END, "ellipsize-set", TRUE, NULL); column = gtk_tree_view_column_new_with_attributes(_("Description"), renderer, "text", MMGUI_MAIN_USSDLIST_DESCRIPTION, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), column); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(mmgui_main_ussd_list_description_cell_edited_signal), mmguiapp); store = gtk_list_store_new(MMGUI_MAIN_USSDLIST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->ussdedittreeview), GTK_TREE_MODEL(store)); g_object_unref(store); /*Initialize textview tags*/ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->ussdtext)); mmguiapp->window->ussdrequesttag = gtk_text_buffer_create_tag(buffer, "request", "weight", PANGO_WEIGHT_BOLD, "indent", 5, "left_margin", 5, "right_margin", 5, NULL); mmguiapp->window->ussdhinttag = gtk_text_buffer_create_tag(buffer, "hint", "weight", PANGO_WEIGHT_NORMAL, "style", PANGO_STYLE_ITALIC, "scale", PANGO_SCALE_SMALL, "indent", 5, "left_margin", 5, "right_margin", 5, NULL); mmguiapp->window->ussdanswertag = gtk_text_buffer_create_tag(buffer, "answer", "weight", PANGO_WEIGHT_NORMAL, "indent", 5, "left_margin", 5, "right_margin", 5, NULL); /*Initialize combobox model*/ mmguiapp->window->ussdcompletionmodel = gtk_list_store_new(MMGUI_MAIN_USSD_COMPLETION_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); gtk_combo_box_set_model(GTK_COMBO_BOX(mmguiapp->window->ussdcombobox), GTK_TREE_MODEL(mmguiapp->window->ussdcompletionmodel)); gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(mmguiapp->window->ussdcombobox), MMGUI_MAIN_USSD_COMPLETION_CAPTION); /*Entry autocompletion*/ mmguiapp->window->ussdcompletion = gtk_entry_completion_new(); gtk_entry_completion_set_text_column(mmguiapp->window->ussdcompletion, MMGUI_MAIN_USSD_COMPLETION_NAME); gtk_entry_set_completion(GTK_ENTRY(mmguiapp->window->ussdentry), mmguiapp->window->ussdcompletion); gtk_entry_completion_set_model(mmguiapp->window->ussdcompletion, GTK_TREE_MODEL(mmguiapp->window->ussdcompletionmodel)); g_signal_connect(G_OBJECT(mmguiapp->window->ussdcompletion), "match-selected", G_CALLBACK(mmgui_main_ussd_entry_match_selected_signal), mmguiapp); } void mmgui_main_ussd_state_clear(mmgui_application_t mmguiapp) { GtkTextBuffer *buffer; GtkTextIter siter, eiter; if (mmguiapp == NULL) return; /*Clear USSD menu*/ gtk_list_store_clear(GTK_LIST_STORE(mmguiapp->window->ussdcompletionmodel)); /*Clear USSD text field*/ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(mmguiapp->window->ussdtext)); if (buffer != NULL) { gtk_text_buffer_get_bounds(buffer, &siter, &eiter); gtk_text_buffer_delete(buffer, &siter, &eiter); } } modem-manager-gui-0.0.17.1/src/ayatana.c0000644000175000017500000003351012262265360016254 0ustar alexalex/* * ayatana.c * * Copyright 2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "resources.h" #include "ayatana.h" static void mmgui_ayatana_indicator_server_clicked_signal(MessagingMenuApp *server, guint timestamp, gpointer user_data) { mmgui_ayatana_t ayatana; ayatana = (mmgui_ayatana_t)user_data; if (ayatana == NULL) return; if (ayatana->eventcb != NULL) { (ayatana->eventcb)(MMGUI_AYATANA_EVENT_SERVER, ayatana, NULL, ayatana->userdata); } } static void mmgui_ayatana_indicator_client_clicked_signal(MessagingMenuApp *indicator, guint timestamp, gpointer user_data) { mmgui_ayatana_t ayatana; ayatana = (mmgui_ayatana_t)user_data; if (ayatana == NULL) return; if (ayatana->eventcb != NULL) { (ayatana->eventcb)(MMGUI_AYATANA_EVENT_CLIENT, ayatana, NULL, ayatana->userdata); } } static void mmgui_ayatana_indicator_server_show_signal(IndicateServer *arg0, guint arg1, gpointer user_data) { mmgui_ayatana_t ayatana; ayatana = (mmgui_ayatana_t)user_data; if (ayatana == NULL) return; if (ayatana->eventcb != NULL) { (ayatana->eventcb)(MMGUI_AYATANA_EVENT_SERVER, ayatana, NULL, ayatana->userdata); } } static void mmgui_ayatana_indicator_client_show_signal(IndicateServer *arg0, guint arg1, gpointer user_data) { mmgui_ayatana_t ayatana; ayatana = (mmgui_ayatana_t)user_data; if (ayatana == NULL) return; if (ayatana->eventcb != NULL) { (ayatana->eventcb)(MMGUI_AYATANA_EVENT_CLIENT, ayatana, NULL, ayatana->userdata); } } static gchar *mmgui_ayatana_get_desktiop_file_id(gchar *filepath) { guint pathlen, sym; if (filepath == NULL) return NULL; pathlen = strlen(filepath); if (pathlen == 0) return NULL; for (sym = pathlen; sym >= 0; sym--) { if (filepath[sym] == '/') { break; } } return filepath+sym+1; } static gboolean mmgui_ayatana_setup_menu(mmgui_ayatana_t ayatana) { if (ayatana == NULL) return FALSE; if (ayatana->library == MMGUI_AYATANA_LIB_MESSAGINGMENU) { /*setup server*/ ayatana->backend.mmenu.server = (ayatana->backend.mmenu.messaging_menu_app_new)(mmgui_ayatana_get_desktiop_file_id(RESOURCE_DESKTOP_FILE)); if (ayatana->backend.mmenu.server == NULL) { return FALSE; } (ayatana->backend.mmenu.messaging_menu_app_register)(ayatana->backend.mmenu.server); g_signal_connect(G_OBJECT(ayatana->backend.mmenu.server), "activate-source", G_CALLBACK(mmgui_ayatana_indicator_server_clicked_signal), ayatana); return TRUE; } else if (ayatana->library == MMGUI_AYATANA_LIB_INDICATE) { /*setup server*/ ayatana->backend.ind.server = (ayatana->backend.ind.indicate_server_ref_default)(); if (ayatana->backend.ind.server == NULL) { return FALSE; } (ayatana->backend.ind.indicate_server_set_type)(ayatana->backend.ind.server, "message.im"); (ayatana->backend.ind.indicate_server_set_desktop_file)(ayatana->backend.ind.server, RESOURCE_DESKTOP_FILE); (ayatana->backend.ind.indicate_server_show)(ayatana->backend.ind.server); g_signal_connect(G_OBJECT(ayatana->backend.ind.server), "server-display", G_CALLBACK(mmgui_ayatana_indicator_server_show_signal), ayatana); /*setup client*/ ayatana->backend.ind.client = (ayatana->backend.ind.indicate_indicator_new_with_server)(ayatana->backend.ind.server); if (ayatana->backend.ind.client != NULL) { (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "subtype", "im"); (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "sender", _("Unread SMS")); (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "draw_attention", "false"); (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "count", ""); (ayatana->backend.ind.indicate_indicator_show)(ayatana->backend.ind.client); g_signal_connect(G_OBJECT(ayatana->backend.ind.client), "user-display", G_CALLBACK(mmgui_ayatana_indicator_client_show_signal), ayatana); } return TRUE; } else { return FALSE; } } static gboolean mmgui_ayatana_clean_menu(mmgui_ayatana_t ayatana) { if (ayatana == NULL) return FALSE; if (ayatana->library == MMGUI_AYATANA_LIB_MESSAGINGMENU) { if (ayatana->backend.mmenu.server != NULL) { (ayatana->backend.mmenu.messaging_menu_app_remove_source)(ayatana->backend.mmenu.server, "sms"); (ayatana->backend.mmenu.messaging_menu_app_unregister)(ayatana->backend.mmenu.server); } return TRUE; } else if (ayatana->library == MMGUI_AYATANA_LIB_INDICATE) { if (ayatana->backend.ind.server != NULL) { if (ayatana->backend.ind.client != NULL) { (ayatana->backend.ind.indicate_indicator_hide)(ayatana->backend.ind.client); g_object_unref(G_OBJECT(ayatana->backend.ind.client)); } (ayatana->backend.ind.indicate_server_hide)(ayatana->backend.ind.server); g_object_unref(G_OBJECT(ayatana->backend.ind.server)); } return TRUE; } else { return FALSE; } } mmgui_ayatana_t mmgui_ayatana_new(mmgui_libpaths_cache_t libcache, mmgui_ayatana_event_callback callback, gpointer userdata) { mmgui_ayatana_t ayatana; gboolean libopened; ayatana = g_new0(struct _mmgui_ayatana, 1); /*Initialization*/ ayatana->module = NULL; ayatana->library = MMGUI_AYATANA_LIB_NULL; ayatana->eventcb = callback; ayatana->userdata = userdata; /*Open module for libmessaging-menu*/ ayatana->module = g_module_open(mmgui_libpaths_cache_get_library_name(libcache, "libmessaging-menu"), G_MODULE_BIND_LAZY); /*Initialize local flag*/ libopened = FALSE; if (ayatana->module != NULL) { libopened = TRUE; libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_new", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_new)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_register", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_register)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_unregister", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_unregister)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_append_source", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_append_source)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_remove_source", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_remove_source)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_set_source_count", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_set_source_count)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_draw_attention", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_draw_attention)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_remove_attention", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_remove_attention)); libopened = libopened && g_module_symbol(ayatana->module, "messaging_menu_app_has_source", (gpointer *)&(ayatana->backend.mmenu.messaging_menu_app_has_source)); /*Try to set up menu*/ if (libopened) { ayatana->library = MMGUI_AYATANA_LIB_MESSAGINGMENU; if (!mmgui_ayatana_setup_menu(ayatana)) { ayatana->library = MMGUI_AYATANA_LIB_NULL; } } /*If some functions not exported or menu not set up, close library*/ if ((!libopened) || (ayatana->library == MMGUI_AYATANA_LIB_NULL)) { ayatana->backend.mmenu.messaging_menu_app_new = NULL; ayatana->backend.mmenu.messaging_menu_app_register = NULL; ayatana->backend.mmenu.messaging_menu_app_unregister = NULL; ayatana->backend.mmenu.messaging_menu_app_append_source = NULL; ayatana->backend.mmenu.messaging_menu_app_remove_source = NULL; ayatana->backend.mmenu.messaging_menu_app_set_source_count = NULL; ayatana->backend.mmenu.messaging_menu_app_draw_attention = NULL; ayatana->backend.mmenu.messaging_menu_app_remove_attention = NULL; /*Close module*/ g_module_close(ayatana->module); ayatana->module = NULL; ayatana->library = MMGUI_AYATANA_LIB_NULL; } } if ((ayatana->library == MMGUI_AYATANA_LIB_NULL) && (ayatana->module == NULL)) { /*Open module for libindicate*/ ayatana->module = g_module_open(mmgui_libpaths_cache_get_library_name(libcache, "libindicate"), G_MODULE_BIND_LAZY); if (ayatana->module != NULL) { libopened = TRUE; libopened = libopened && g_module_symbol(ayatana->module, "indicate_server_ref_default", (gpointer *)&(ayatana->backend.ind.indicate_server_ref_default)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_server_set_type", (gpointer *)&(ayatana->backend.ind.indicate_server_set_type)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_server_set_desktop_file", (gpointer *)&(ayatana->backend.ind.indicate_server_set_desktop_file)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_server_show", (gpointer *)&(ayatana->backend.ind.indicate_server_show)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_server_hide", (gpointer *)&(ayatana->backend.ind.indicate_server_hide)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_indicator_new_with_server", (gpointer *)&(ayatana->backend.ind.indicate_indicator_new_with_server)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_indicator_set_property", (gpointer *)&(ayatana->backend.ind.indicate_indicator_set_property)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_indicator_show", (gpointer *)&(ayatana->backend.ind.indicate_indicator_show)); libopened = libopened && g_module_symbol(ayatana->module, "indicate_indicator_hide", (gpointer *)&(ayatana->backend.ind.indicate_indicator_hide)); /*Try to set up menu*/ if (libopened) { ayatana->library = MMGUI_AYATANA_LIB_INDICATE; if (!mmgui_ayatana_setup_menu(ayatana)) { ayatana->library = MMGUI_AYATANA_LIB_NULL; } } /*If some functions not exported or menu not set up, close library*/ if ((!libopened) || (ayatana->library == MMGUI_AYATANA_LIB_NULL)) { ayatana->backend.ind.indicate_server_ref_default = NULL; ayatana->backend.ind.indicate_server_set_type = NULL; ayatana->backend.ind.indicate_server_set_desktop_file = NULL; ayatana->backend.ind.indicate_server_show = NULL; ayatana->backend.ind.indicate_server_hide = NULL; ayatana->backend.ind.indicate_indicator_new_with_server = NULL; ayatana->backend.ind.indicate_indicator_set_property = NULL; ayatana->backend.ind.indicate_indicator_show = NULL; ayatana->backend.ind.indicate_indicator_hide = NULL; /*Close module*/ g_module_close(ayatana->module); ayatana->module = NULL; ayatana->library = MMGUI_AYATANA_LIB_NULL; } } } if ((!libopened) || (ayatana->library == MMGUI_AYATANA_LIB_NULL)) { g_free(ayatana); return NULL; } return ayatana; } void mmgui_ayatana_close(mmgui_ayatana_t ayatana) { if (ayatana == NULL) return; mmgui_ayatana_clean_menu(ayatana); if (ayatana->module != NULL) { g_module_close(ayatana->module); } g_free(ayatana); } void mmgui_ayatana_set_unread_messages_number(mmgui_ayatana_t ayatana, guint number) { GFile *file; GIcon *icon; gchar numstr[32]; if (ayatana == NULL) return; if (ayatana->library == MMGUI_AYATANA_LIB_MESSAGINGMENU) { if (ayatana->backend.mmenu.server != NULL) { if ((ayatana->backend.mmenu.messaging_menu_app_has_source)(ayatana->backend.mmenu.server, "sms")) { if (number > 0) { (ayatana->backend.mmenu.messaging_menu_app_set_source_count)(ayatana->backend.mmenu.server, "sms", number); (ayatana->backend.mmenu.messaging_menu_app_remove_attention)(ayatana->backend.mmenu.server, "sms"); } else { (ayatana->backend.mmenu.messaging_menu_app_remove_source)(ayatana->backend.mmenu.server, "sms"); } } else { if (number > 0) { file = g_file_new_for_path(RESOURCE_SMS_UNREAD); icon = g_file_icon_new(file); (ayatana->backend.mmenu.messaging_menu_app_append_source)(ayatana->backend.mmenu.server, "sms", icon, _("Unread messages")); (ayatana->backend.mmenu.messaging_menu_app_set_source_count)(ayatana->backend.mmenu.server, "sms", number); (ayatana->backend.mmenu.messaging_menu_app_draw_attention)(ayatana->backend.mmenu.server, "sms"); g_signal_connect(G_OBJECT(ayatana->backend.mmenu.server), "activate-source::sms", G_CALLBACK(mmgui_ayatana_indicator_client_clicked_signal), ayatana); g_object_unref(icon); g_object_unref(file); } } } } else if (ayatana->library == MMGUI_AYATANA_LIB_INDICATE) { if (ayatana->backend.ind.server != NULL) { if (ayatana->backend.ind.client != NULL) { if (number > 0) { memset(numstr, 0, sizeof(numstr)); snprintf(numstr, sizeof(numstr), "%u", number); (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "draw_attention", "true"); (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "count", numstr); } else { (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "draw_attention", "false"); (ayatana->backend.ind.indicate_indicator_set_property)(ayatana->backend.ind.client, "count", ""); } } } } } modem-manager-gui-0.0.17.1/src/ussd-page.h0000644000175000017500000000440112375675410016536 0ustar alexalex/* * ussd-page.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __USSD_PAGE_H__ #define __USSD_PAGE_H__ #include #include "main.h" enum _mmgui_main_ussdlist_columns { MMGUI_MAIN_USSDLIST_COMMAND = 0, MMGUI_MAIN_USSDLIST_DESCRIPTION, MMGUI_MAIN_USSDLIST_COLUMNS }; //USSD void mmgui_main_ussd_command_add_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_ussd_command_remove_button_clicked_signal(GObject *object, gpointer data); void mmgui_main_ussd_menu_update_callback(gchar *command, gchar *description, gboolean reencode, gpointer data); void mmgui_main_ussd_edit(mmgui_application_t mmguiapp); void mmgui_main_ussd_edit_button_clicked_signal(GtkEditable *editable, gpointer data); void mmgui_main_ussd_command_combobox_changed_signal(GObject *object, gpointer data); void mmgui_main_ussd_command_entry_changed_signal(GtkEditable *editable, gpointer data); void mmgui_main_ussd_command_entry_activated_signal(GtkEntry *entry, gpointer data); void mmgui_main_ussd_send_button_clicked_signal(GtkButton *button, gpointer data); void mmgui_main_ussd_request_send(mmgui_application_t mmguiapp); void mmgui_main_ussd_request_send_end(mmgui_application_t mmguiapp, mmguicore_t mmguicore, const gchar *answer); void mmgui_main_ussd_restore_settings_for_modem(mmgui_application_t mmguiapp); void mmgui_main_ussd_accelerators_init(mmgui_application_t mmguiapp); void mmgui_main_ussd_list_init(mmgui_application_t mmguiapp); void mmgui_main_ussd_state_clear(mmgui_application_t mmguiapp); #endif /* __USSD_PAGE_H__ */ modem-manager-gui-0.0.17.1/src/traffic-page.c0000644000175000017500000014046412400660433017167 0ustar alexalex/* * traffic-page.c * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "settings.h" #include "notifications.h" #include "strformat.h" #include "mmguicore.h" #include "trafficdb.h" #include "netlink.h" #include "traffic-page.h" #include "main.h" static void mmgui_main_traffic_limits_notification_show_window_callback(gpointer notification, gchar *action, gpointer userdata); static void mmgui_main_traffic_limits_dialog_traffic_section_disable_signal(GtkToggleButton *togglebutton, gpointer data); static gboolean mmgui_main_traffic_limits_dialog_open(mmgui_application_t mmguiapp); /*TRAFFIC*/ static void mmgui_main_traffic_limits_notification_show_window_callback(gpointer notification, gchar *action, gpointer userdata) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)userdata; if (mmguiapp == NULL) return; gtk_window_present(GTK_WINDOW(mmguiapp->window->window)); } gboolean mmgui_main_traffic_stats_history_update_from_thread(gpointer data) { mmgui_application_t mmguiapp; mmgui_trafficdb_t trafficdb; struct _mmgui_day_traffic traffic; GtkTreeModel *model; gboolean valid; guint64 curtimestamp; GtkTreeIter iter; gchar strformat[4][64]; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return FALSE; if (mmguiapp->core == NULL) return FALSE; /*If dialog window is not visible - do not update connections list*/ if (!gtk_widget_get_visible(mmguiapp->window->trafficstatsdialog)) return FALSE; trafficdb = (mmgui_trafficdb_t)mmguicore_devices_get_traffic_db(mmguiapp->core); model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview)); if ((trafficdb != NULL) && (model != NULL)) { if (mmgui_trafficdb_session_get_day_traffic(trafficdb, &traffic)) { valid = gtk_tree_model_get_iter_first(model, &iter); while (valid) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_TRAFFICSTATSLIST_TIMESATMP, &curtimestamp, -1); if (traffic.daytime == curtimestamp) { //RX bytes mmgui_str_format_bytes(traffic.dayrxbytes + traffic.sessrxbytes, strformat[1], sizeof(strformat[1]), FALSE); //TX bytes mmgui_str_format_bytes(traffic.daytxbytes + traffic.sesstxbytes, strformat[2], sizeof(strformat[2]), FALSE); //Session time mmgui_str_format_time(traffic.dayduration + traffic.sessduration, strformat[3], sizeof(strformat[3]), FALSE); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_TRAFFICSTATSLIST_RXDATA, strformat[1], MMGUI_MAIN_TRAFFICSTATSLIST_TXDATA, strformat[2], MMGUI_MAIN_TRAFFICSTATSLIST_SESSIONTIME, strformat[3], -1); break; } valid = gtk_tree_model_iter_next(model, &iter); } } } return FALSE; } void mmgui_main_traffic_statistics_dialog_fill_statistics(mmgui_application_t mmguiapp, guint month, guint year) { GtkTreeModel *model; GtkTreeIter iter; GSList *statistics, *iterator; mmgui_trafficdb_t trafficdb; mmgui_day_traffic_t traffic; struct tm *timespec; gchar strformat[4][64]; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview)); trafficdb = (mmgui_trafficdb_t)mmguicore_devices_get_traffic_db(mmguiapp->core); if ((model != NULL) && (trafficdb != NULL)) { g_object_ref(model); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview), NULL); gtk_list_store_clear(GTK_LIST_STORE(model)); statistics = mmgui_trafficdb_get_traffic_list_for_month(trafficdb, month, year); if (statistics != NULL) { for (iterator=statistics; iterator; iterator=iterator->next) { traffic = iterator->data; //Date timespec = localtime((const time_t *)&(traffic->daytime)); if (strftime(strformat[0], sizeof(strformat[0]), "%d %B", timespec) == -1) { snprintf(strformat[0], sizeof(strformat[0]), _("Unknown")); } //RX bytes mmgui_str_format_bytes(traffic->dayrxbytes + traffic->sessrxbytes, strformat[1], sizeof(strformat[1]), FALSE); //TX bytes mmgui_str_format_bytes(traffic->daytxbytes + traffic->sesstxbytes, strformat[2], sizeof(strformat[2]), FALSE); //Session time mmgui_str_format_time(traffic->dayduration + traffic->sessduration, strformat[3], sizeof(strformat[3]), FALSE); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_TRAFFICSTATSLIST_DAY, strformat[0], MMGUI_MAIN_TRAFFICSTATSLIST_RXDATA, strformat[1], MMGUI_MAIN_TRAFFICSTATSLIST_TXDATA, strformat[2], MMGUI_MAIN_TRAFFICSTATSLIST_SESSIONTIME, strformat[3], MMGUI_MAIN_TRAFFICSTATSLIST_TIMESATMP, traffic->daytime, -1); } } gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview), model); g_object_unref(model); mmgui_trafficdb_free_traffic_list_for_month(statistics); } } void mmgui_main_traffic_statistics_control_apply_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; time_t presenttime; struct tm *timespec; gint monthid, yearid; guint year; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; //Local time presenttime = time(NULL); timespec = localtime(&presenttime); year = timespec->tm_year+1900; //Selected month and year identifiers monthid = gtk_combo_box_get_active(GTK_COMBO_BOX(mmguiapp->window->trafficstatsmonthcb)); yearid = gtk_combo_box_get_active(GTK_COMBO_BOX(mmguiapp->window->trafficstatsyearcb)); //Translate year if (yearid == 0) { year = timespec->tm_year+1900-2; } else if (yearid == 1) { year = timespec->tm_year+1900-1; } else if (yearid == 2) { year = timespec->tm_year+1900; } //Reload list mmgui_main_traffic_statistics_dialog_fill_statistics(mmguiapp, monthid, year); } void mmgui_main_traffic_statistics_dialog(mmgui_application_t mmguiapp) { /*gint response;*/ time_t presenttime; struct tm *timespec; gchar strformat[64]; if (mmguiapp == NULL) return; //Local time presenttime = time(NULL); timespec = localtime(&presenttime); //Clear years gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(mmguiapp->window->trafficstatsyearcb)); //Years snprintf(strformat, sizeof(strformat), "%u", timespec->tm_year+1900-2); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mmguiapp->window->trafficstatsyearcb), strformat); snprintf(strformat, sizeof(strformat), "%u", timespec->tm_year+1900-1); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mmguiapp->window->trafficstatsyearcb), strformat); snprintf(strformat, sizeof(strformat), "%u", timespec->tm_year+1900); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mmguiapp->window->trafficstatsyearcb), strformat); //Select current year gtk_combo_box_set_active(GTK_COMBO_BOX(mmguiapp->window->trafficstatsyearcb), 2); //Select current month gtk_combo_box_set_active(GTK_COMBO_BOX(mmguiapp->window->trafficstatsmonthcb), timespec->tm_mon); //Fill list mmgui_main_traffic_statistics_dialog_fill_statistics(mmguiapp, timespec->tm_mon, timespec->tm_year+1900); /*response = */gtk_dialog_run(GTK_DIALOG(mmguiapp->window->trafficstatsdialog)); gtk_widget_hide(mmguiapp->window->trafficstatsdialog); } void mmgui_main_traffic_statistics_dialog_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_traffic_statistics_dialog(mmguiapp); } void mmgui_main_traffic_traffic_statistics_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; /*GtkTreeIter iter;*/ if (mmguiapp == NULL) return; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Day"), renderer, "markup", MMGUI_MAIN_TRAFFICSTATSLIST_DAY, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Received data"), renderer, "markup", MMGUI_MAIN_TRAFFICSTATSLIST_RXDATA, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Transmitted data"), renderer, "markup", MMGUI_MAIN_TRAFFICSTATSLIST_TXDATA, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Session time"), renderer, "markup", MMGUI_MAIN_TRAFFICSTATSLIST_SESSIONTIME, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview), column); store = gtk_list_store_new(MMGUI_MAIN_TRAFFICSTATSLIST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->trafficstatstreeview), GTK_TREE_MODEL(store)); g_object_unref(store); } gboolean mmgui_main_traffic_connections_update_from_thread(gpointer data) { mmgui_application_t mmguiapp; mmgui_netlink_connection_change_t fullchange; GSList *changes, *iterator; gboolean add, remove, modify; GHashTable *modconns; GtkTreeModel *model; GtkTreeIter iter; gboolean valid; guint inode; GtkTreePath *path; GtkTreeRowReference *reference; GList *rmlist, *rmnode; gchar strbuf[32]; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return FALSE; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->conntreeview)); if (model == NULL) return FALSE; changes = mmguicore_get_connections_changes(mmguiapp->core); if (changes == NULL) return FALSE; modconns = g_hash_table_new(g_int_hash, g_int_equal); add = FALSE; remove = FALSE; modify = FALSE; for (iterator=changes; iterator; iterator=iterator->next) { fullchange = (mmgui_netlink_connection_change_t)iterator->data; if (fullchange != NULL) { if (fullchange->event == MMGUI_NETLINK_CONNECTION_EVENT_ADD) { add = TRUE; } else if (fullchange->event == MMGUI_NETLINK_CONNECTION_EVENT_REMOVE) { remove = TRUE; g_hash_table_insert(modconns, &(fullchange->inode), fullchange); } else if (fullchange->event == MMGUI_NETLINK_CONNECTION_EVENT_MODIFY) { modify = TRUE; g_hash_table_insert(modconns, &(fullchange->inode), fullchange); } } } gtk_widget_freeze_child_notify(mmguiapp->window->conntreeview); if ((remove) || (modify)) { rmlist = NULL; valid = gtk_tree_model_get_iter_first(model, &iter); while (valid) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_CONNECTIONLIST_INODE, &inode, -1); fullchange = (mmgui_netlink_connection_change_t)g_hash_table_lookup(modconns, (gconstpointer)&inode); if (fullchange != NULL) { if (fullchange->event == MMGUI_NETLINK_CONNECTION_EVENT_MODIFY) { /*update connection*/ mmgui_str_format_bytes((guint64)fullchange->data.params->dqueue, strbuf, sizeof(strbuf), FALSE); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_CONNECTIONLIST_STATE, mmgui_netlink_socket_state(fullchange->data.params->state), MMGUI_MAIN_CONNECTIONLIST_BUFFER, strbuf, -1); } else if (fullchange->event == MMGUI_NETLINK_CONNECTION_EVENT_REMOVE) { /*save reference to remove*/ path = gtk_tree_model_get_path(model, &iter); reference = gtk_tree_row_reference_new(model, path); rmlist = g_list_prepend(rmlist, reference); gtk_tree_path_free(path); } } valid = gtk_tree_model_iter_next(model, &iter); } /*remove closed connections*/ if (rmlist != NULL) { for (rmnode = rmlist; rmnode != NULL; rmnode = rmnode->next) { path = gtk_tree_row_reference_get_path((GtkTreeRowReference *)rmnode->data); if (path != NULL) { if (gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path)) { gtk_list_store_remove(GTK_LIST_STORE(model), &iter); } } } g_list_foreach(rmlist, (GFunc)gtk_tree_row_reference_free, NULL); g_list_free(rmlist); } } if (add) { for (iterator=changes; iterator; iterator=iterator->next) { fullchange = (mmgui_netlink_connection_change_t)iterator->data; if (fullchange != NULL) { if (fullchange->event == MMGUI_NETLINK_CONNECTION_EVENT_ADD) { mmgui_str_format_bytes((guint64)fullchange->data.connection->dqueue, strbuf, sizeof(strbuf), FALSE); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_CONNECTIONLIST_APPLICATION, fullchange->data.connection->appname, MMGUI_MAIN_CONNECTIONLIST_PID, fullchange->data.connection->apppid, MMGUI_MAIN_CONNECTIONLIST_PROTOCOL, "TCP", MMGUI_MAIN_CONNECTIONLIST_STATE, mmgui_netlink_socket_state(fullchange->data.connection->state), MMGUI_MAIN_CONNECTIONLIST_BUFFER, strbuf, MMGUI_MAIN_CONNECTIONLIST_LOCALADDR, fullchange->data.connection->srcport, MMGUI_MAIN_CONNECTIONLIST_DESTADDR, fullchange->data.connection->dsthostname, MMGUI_MAIN_CONNECTIONLIST_INODE, fullchange->data.connection->inode, -1); } } } } gtk_widget_thaw_child_notify(mmguiapp->window->conntreeview); /*Free resources*/ g_slist_foreach(changes, (GFunc)mmgui_netlink_free_connection_change, NULL); g_slist_free(changes); return FALSE; } void mmgui_main_traffic_connections_terminate_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; guint pid; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->conntreeview)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mmguiapp->window->conntreeview)); if (model != NULL) { if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model, &iter, MMGUI_MAIN_CONNECTIONLIST_PID, &pid, -1); mmgui_netlink_terminate_application((pid_t)pid); } } } void mmgui_main_traffic_connections_dialog(mmgui_application_t mmguiapp) { GtkTreeModel *model; GSList *connections, *iterator; mmgui_netlink_connection_t connection; GtkTreeIter iter; gchar strbuf[32]; if (mmguiapp == NULL) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->conntreeview)); if (model != NULL) { gtk_list_store_clear(GTK_LIST_STORE(model)); /*Fill list with initial connections*/ connections = mmguicore_open_connections_list(mmguiapp->core); if (connections != NULL) { for (iterator=connections; iterator; iterator=iterator->next) { connection = (mmgui_netlink_connection_t)iterator->data; if (connection != NULL) { mmgui_str_format_bytes((guint64)connection->dqueue, strbuf, sizeof(strbuf), FALSE); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, MMGUI_MAIN_CONNECTIONLIST_APPLICATION, connection->appname, MMGUI_MAIN_CONNECTIONLIST_PID, connection->apppid, MMGUI_MAIN_CONNECTIONLIST_PROTOCOL, "TCP", MMGUI_MAIN_CONNECTIONLIST_STATE, mmgui_netlink_socket_state(connection->state), MMGUI_MAIN_CONNECTIONLIST_BUFFER, strbuf, MMGUI_MAIN_CONNECTIONLIST_LOCALADDR, connection->srcport, MMGUI_MAIN_CONNECTIONLIST_DESTADDR, connection->dsthostname, MMGUI_MAIN_CONNECTIONLIST_INODE, connection->inode, -1); } } /*Free resources*/ g_slist_foreach(connections, (GFunc)mmgui_netlink_free_connection, NULL); g_slist_free(connections); } gtk_dialog_run(GTK_DIALOG(mmguiapp->window->conndialog)); mmguicore_close_connections_list(mmguiapp->core); gtk_widget_hide(mmguiapp->window->conndialog); } } void mmgui_main_traffic_connections_dialog_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_traffic_connections_dialog(mmguiapp); } void mmgui_main_traffic_accelerators_init(mmgui_application_t mmguiapp) { /*Accelerators*/ mmguiapp->window->connaccelgroup = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(mmguiapp->window->conndialog), mmguiapp->window->connaccelgroup); gtk_widget_add_accelerator(mmguiapp->window->conntermtoolbutton, "clicked", mmguiapp->window->connaccelgroup, GDK_KEY_t, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); } void mmgui_main_traffic_connections_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; if (mmguiapp == NULL) return; /*List*/ renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Application"), renderer, "markup", MMGUI_MAIN_CONNECTIONLIST_APPLICATION, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->conntreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("PID"), renderer, "markup", MMGUI_MAIN_CONNECTIONLIST_PID, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->conntreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Protocol"), renderer, "markup", MMGUI_MAIN_CONNECTIONLIST_PROTOCOL, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->conntreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("State"), renderer, "markup", MMGUI_MAIN_CONNECTIONLIST_STATE, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->conntreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Buffer"), renderer, "markup", MMGUI_MAIN_CONNECTIONLIST_BUFFER, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->conntreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Port"), renderer, "markup", MMGUI_MAIN_CONNECTIONLIST_LOCALADDR, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->conntreeview), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Destination"), renderer, "markup", MMGUI_MAIN_CONNECTIONLIST_DESTADDR, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->conntreeview), column); store = gtk_list_store_new(MMGUI_MAIN_CONNECTIONLIST_COLUMNS, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT64); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->conntreeview), GTK_TREE_MODEL(store)); g_object_unref(store); } gboolean mmgui_main_traffic_limits_show_message_from_thread(gpointer data) { mmgui_application_data_t mmguiappdata; guint eventid; gchar *notifycaption, *notifytext; enum _mmgui_notifications_sound soundmode; mmguiappdata = (mmgui_application_data_t)data; if (mmguiappdata == NULL) return FALSE; eventid = GPOINTER_TO_INT(mmguiappdata->data); if (mmguiappdata->mmguiapp->coreoptions != NULL) { //Various limits switch (eventid) { case MMGUI_EVENT_TRAFFIC_LIMIT: notifycaption = _("Traffic limit exceeded"); notifytext = mmguiappdata->mmguiapp->coreoptions->trafficmessage; break; case MMGUI_EVENT_TIME_LIMIT: notifycaption = _("Time limit exceeded"); notifytext = mmguiappdata->mmguiapp->coreoptions->timemessage; break; default: g_debug("Unknown limit identifier"); return FALSE; } //Show notification/play sound if (mmguiappdata->mmguiapp->options->usesounds) { soundmode = MMGUI_NOTIFICATIONS_SOUND_MESSAGE; } else { soundmode = MMGUI_NOTIFICATIONS_SOUND_NONE; } mmgui_notifications_show(mmguiappdata->mmguiapp->notifications, notifycaption, notifytext, soundmode, mmgui_main_traffic_limits_notification_show_window_callback, mmguiappdata); } g_free(mmguiappdata); return FALSE; } void mmgui_main_traffic_limits_dialog_time_section_disable_signal(GtkToggleButton *togglebutton, gpointer data) { mmgui_application_t mmguiapp; gboolean sensitive; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; sensitive = gtk_toggle_button_get_active(togglebutton); gtk_widget_set_sensitive(mmguiapp->window->timeamount, sensitive); gtk_widget_set_sensitive(mmguiapp->window->timeunits, sensitive); gtk_widget_set_sensitive(mmguiapp->window->timemessage, sensitive); gtk_widget_set_sensitive(mmguiapp->window->timeaction, sensitive); } static void mmgui_main_traffic_limits_dialog_traffic_section_disable_signal(GtkToggleButton *togglebutton, gpointer data) { mmgui_application_t mmguiapp; gboolean sensitive; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; sensitive = gtk_toggle_button_get_active(togglebutton); gtk_widget_set_sensitive(mmguiapp->window->trafficamount, sensitive); gtk_widget_set_sensitive(mmguiapp->window->trafficunits, sensitive); gtk_widget_set_sensitive(mmguiapp->window->trafficmessage, sensitive); gtk_widget_set_sensitive(mmguiapp->window->trafficaction, sensitive); } static gboolean mmgui_main_traffic_limits_dialog_open(mmgui_application_t mmguiapp) { gint response; gulong trafficboxsignal, timeboxsignal; if (mmguiapp == NULL) return FALSE; trafficboxsignal = g_signal_connect(G_OBJECT(mmguiapp->window->trafficlimitcheckbutton), "toggled", G_CALLBACK(mmgui_main_traffic_limits_dialog_traffic_section_disable_signal), mmguiapp); timeboxsignal = g_signal_connect(G_OBJECT(mmguiapp->window->timelimitcheckbutton), "toggled", G_CALLBACK(mmgui_main_traffic_limits_dialog_time_section_disable_signal), mmguiapp); g_signal_emit_by_name(G_OBJECT(mmguiapp->window->trafficlimitcheckbutton), "toggled", NULL); g_signal_emit_by_name(G_OBJECT(mmguiapp->window->timelimitcheckbutton), "toggled", NULL); response = gtk_dialog_run(GTK_DIALOG(mmguiapp->window->trafficlimitsdialog)); g_signal_handler_disconnect(G_OBJECT(mmguiapp->window->trafficlimitcheckbutton), trafficboxsignal); g_signal_handler_disconnect(G_OBJECT(mmguiapp->window->timelimitcheckbutton), timeboxsignal); gtk_widget_hide(mmguiapp->window->trafficlimitsdialog); return (response > 0); } void mmgui_main_traffic_limits_dialog(mmgui_application_t mmguiapp) { mmguidevice_t device; gchar realtrafficbuf[64], settrafficbuf[64], realtimebuf[64], settimebuf[64]; gchar *message; if (mmguiapp == NULL) return; if ((mmguiapp->coreoptions == NULL) || (mmguiapp->core == NULL) || (mmguiapp->modemsettings == NULL)) return; device = mmguicore_devices_get_current(mmguiapp->core); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->trafficlimitcheckbutton), mmguiapp->coreoptions->trafficenabled); gtk_spin_button_set_value(GTK_SPIN_BUTTON(mmguiapp->window->trafficamount), (gdouble)mmguiapp->coreoptions->trafficamount); gtk_combo_box_set_active(GTK_COMBO_BOX(mmguiapp->window->trafficunits), mmguiapp->coreoptions->trafficunits); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->trafficmessage), mmguiapp->coreoptions->trafficmessage); gtk_combo_box_set_active(GTK_COMBO_BOX(mmguiapp->window->trafficaction), mmguiapp->coreoptions->trafficaction); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mmguiapp->window->timelimitcheckbutton), mmguiapp->coreoptions->timeenabled); gtk_spin_button_set_value(GTK_SPIN_BUTTON(mmguiapp->window->timeamount), (gdouble)mmguiapp->coreoptions->timeamount); gtk_combo_box_set_active(GTK_COMBO_BOX(mmguiapp->window->timeunits), mmguiapp->coreoptions->timeunits); gtk_entry_set_text(GTK_ENTRY(mmguiapp->window->timemessage), mmguiapp->coreoptions->timemessage); gtk_combo_box_set_active(GTK_COMBO_BOX(mmguiapp->window->timeaction), mmguiapp->coreoptions->timeaction); if (mmgui_main_traffic_limits_dialog_open(mmguiapp)) { if (mmguiapp->coreoptions != NULL) { /*Traffic*/ if (mmguiapp->coreoptions->trafficmessage != NULL) { g_free(mmguiapp->coreoptions->trafficmessage); mmguiapp->coreoptions->trafficmessage = NULL; } mmguiapp->coreoptions->trafficenabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->trafficlimitcheckbutton)); mmguiapp->coreoptions->trafficamount = (guint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(mmguiapp->window->trafficamount)); mmguiapp->coreoptions->trafficunits = gtk_combo_box_get_active(GTK_COMBO_BOX(mmguiapp->window->trafficunits)); mmguiapp->coreoptions->trafficmessage = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->trafficmessage))); mmguiapp->coreoptions->trafficaction = gtk_combo_box_get_active(GTK_COMBO_BOX(mmguiapp->window->trafficaction)); switch (mmguiapp->coreoptions->trafficunits) { case 0: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024; break; case 1: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024*1024; break; case 2: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024*1024*1024; break; default: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024; break; } mmguiapp->coreoptions->trafficexecuted = FALSE; if (device != NULL) { if ((device->connected) && (mmguiapp->coreoptions->trafficenabled) && (mmguiapp->coreoptions->trafficfull < (device->rxbytes + device->txbytes))) { mmguiapp->coreoptions->trafficexecuted = TRUE; } } /*Time*/ if (mmguiapp->coreoptions->timemessage != NULL) { g_free(mmguiapp->coreoptions->timemessage); mmguiapp->coreoptions->timemessage = NULL; } mmguiapp->coreoptions->timeenabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mmguiapp->window->timelimitcheckbutton)); mmguiapp->coreoptions->timeamount = (guint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(mmguiapp->window->timeamount)); mmguiapp->coreoptions->timeunits = gtk_combo_box_get_active(GTK_COMBO_BOX(mmguiapp->window->timeunits)); mmguiapp->coreoptions->timemessage = g_strdup(gtk_entry_get_text(GTK_ENTRY(mmguiapp->window->timemessage))); mmguiapp->coreoptions->timeaction = gtk_combo_box_get_active(GTK_COMBO_BOX(mmguiapp->window->timeaction)); switch (mmguiapp->coreoptions->timeunits) { case 0: mmguiapp->coreoptions->timefull = mmguiapp->coreoptions->timeamount*60; break; case 1: mmguiapp->coreoptions->timefull = mmguiapp->coreoptions->timeamount*60*60; break; default: mmguiapp->coreoptions->timefull = mmguiapp->coreoptions->timeamount*60; break; } mmguiapp->coreoptions->timeexecuted = FALSE; if (device != NULL) { if ((device->connected) && (mmguiapp->coreoptions->timeenabled) && (mmguiapp->coreoptions->timefull < device->sessiontime)) { mmguiapp->coreoptions->timeexecuted = TRUE; } } /*Save settings*/ /*Traffic*/ mmgui_modem_settings_set_boolean(mmguiapp->modemsettings, "limits_traffic_enabled", mmguiapp->coreoptions->trafficenabled); mmgui_modem_settings_set_int(mmguiapp->modemsettings, "limits_traffic_amount", (gint)mmguiapp->coreoptions->trafficamount); mmgui_modem_settings_set_int(mmguiapp->modemsettings, "limits_traffic_units", (guint)mmguiapp->coreoptions->trafficunits); mmgui_modem_settings_set_string(mmguiapp->modemsettings, "limits_traffic_message", mmguiapp->coreoptions->trafficmessage); mmgui_modem_settings_set_int(mmguiapp->modemsettings, "limits_traffic_action", (guint)mmguiapp->coreoptions->trafficaction); /*Time*/ mmgui_modem_settings_set_boolean(mmguiapp->modemsettings, "limits_time_enabled", mmguiapp->coreoptions->timeenabled); mmgui_modem_settings_set_int(mmguiapp->modemsettings, "limits_time_amount", (guint)mmguiapp->coreoptions->timeamount); mmgui_modem_settings_set_int(mmguiapp->modemsettings, "limits_time_units", (guint)mmguiapp->coreoptions->timeunits); mmgui_modem_settings_set_string(mmguiapp->modemsettings, "limits_time_message", mmguiapp->coreoptions->timemessage); mmgui_modem_settings_set_int(mmguiapp->modemsettings, "limits_time_action", (guint)mmguiapp->coreoptions->timeaction); if (device != NULL) { if ((mmguiapp->coreoptions->trafficexecuted) || (mmguiapp->coreoptions->timeexecuted)) { if ((mmguiapp->coreoptions->trafficexecuted) && (mmguiapp->coreoptions->timeexecuted)) { message = g_strdup_printf(_("Traffic: %s, limit set to: %s\nTime: %s, limit set to: %s\nPlease check entered values and try once more"), mmgui_str_format_bytes(device->rxbytes + device->txbytes, realtrafficbuf, sizeof(realtrafficbuf), TRUE), mmgui_str_format_bytes(mmguiapp->coreoptions->trafficfull, settrafficbuf, sizeof(settrafficbuf), TRUE), mmgui_str_format_time(device->sessiontime, realtimebuf, sizeof(realtimebuf), TRUE), mmgui_str_format_time(mmguiapp->coreoptions->timefull, settimebuf, sizeof(settimebuf), TRUE)); mmgui_main_ui_error_dialog_open(mmguiapp, _("Wrong traffic and time limit values"), message); g_free(message); } else if (mmguiapp->coreoptions->trafficexecuted) { message = g_strdup_printf(_("Traffic: %s, limit set to: %s\nPlease check entered values and try once more"), mmgui_str_format_bytes(device->rxbytes + device->txbytes, realtrafficbuf, sizeof(realtrafficbuf), TRUE), mmgui_str_format_bytes(mmguiapp->coreoptions->trafficfull, settrafficbuf, sizeof(settrafficbuf), TRUE)); mmgui_main_ui_error_dialog_open(mmguiapp, _("Wrong traffic limit value"), message); g_free(message); } else if (mmguiapp->coreoptions->timeexecuted) { message = g_strdup_printf(_("Time: %s, limit set to: %s\nPlease check entered values and try once more"), mmgui_str_format_time(device->sessiontime, realtimebuf, sizeof(realtimebuf), TRUE), mmgui_str_format_time(mmguiapp->coreoptions->timefull, settimebuf, sizeof(settimebuf), TRUE)); mmgui_main_ui_error_dialog_open(mmguiapp, _("Wrong time limit value"), message); g_free(message); } } } } } } void mmgui_main_traffic_limits_dialog_button_clicked_signal(GObject *object, gpointer data) { mmgui_application_t mmguiapp; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; mmgui_main_traffic_limits_dialog(mmguiapp); } gboolean mmgui_main_traffic_stats_update_from_thread_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { mmgui_application_t mmguiapp; mmguidevice_t device; gint id; gchar buffer[64]; gfloat speed; guint64 limitleft; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return FALSE; if (mmguiapp->core == NULL) return FALSE; device = mmguicore_devices_get_current(mmguiapp->core); if ((device == NULL) || ((device != NULL) && (!device->connected))) { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, "", -1); } else { gtk_tree_model_get(model, iter, MMGUI_MAIN_TRAFFICLIST_ID, &id, -1); switch (id) { case MMGUI_MAIN_TRAFFICLIST_ID_RXDATA: gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, mmgui_str_format_bytes(device->rxbytes, buffer, sizeof(buffer), TRUE), -1); break; case MMGUI_MAIN_TRAFFICLIST_ID_TXDATA: gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, mmgui_str_format_bytes(device->txbytes, buffer, sizeof(buffer), TRUE), -1); break; case MMGUI_MAIN_TRAFFICLIST_ID_RXSPEED: if (device->speedindex < MMGUI_SPEED_VALUES_NUMBER) { if (device->speedindex == 0) { speed = device->speedvalues[0][device->speedindex]; } else { speed = device->speedvalues[0][device->speedindex-1]; } } else { speed = device->speedvalues[0][MMGUI_SPEED_VALUES_NUMBER-1]; } gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, mmgui_str_format_speed(speed, buffer, sizeof(buffer), TRUE), -1); break; case MMGUI_MAIN_TRAFFICLIST_ID_TXSPEED: if (device->speedindex < MMGUI_SPEED_VALUES_NUMBER) { if (device->speedindex == 0) { speed = device->speedvalues[1][device->speedindex]; } else { speed = device->speedvalues[1][device->speedindex-1]; } } else { speed = device->speedvalues[1][MMGUI_SPEED_VALUES_NUMBER-1]; } gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, mmgui_str_format_speed(speed, buffer, sizeof(buffer), TRUE), -1); break; case MMGUI_MAIN_TRAFFICLIST_ID_TIME: if (device->connected) { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, mmgui_str_format_time(device->sessiontime, buffer, sizeof(buffer), TRUE), -1); } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Disconnected"), -1); } break; case MMGUI_MAIN_TRAFFICLIST_ID_DATALIMIT: if (device->connected) { if (mmguiapp->coreoptions != NULL) { if (!mmguiapp->coreoptions->trafficexecuted) { if (mmguiapp->coreoptions->trafficenabled) { limitleft = mmguiapp->coreoptions->trafficfull - (device->rxbytes + device->txbytes); if (mmguiapp->coreoptions->trafficfull > (device->rxbytes + device->txbytes)) { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, mmgui_str_format_bytes(limitleft, buffer, sizeof(buffer), TRUE), -1); } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Limit"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Disabled"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Limit"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Disabled"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Disconnected"), -1); } break; case MMGUI_MAIN_TRAFFICLIST_ID_TIMELIMIT: if (device->connected) { if (mmguiapp->coreoptions != NULL) { if (!mmguiapp->coreoptions->timeexecuted) { if (mmguiapp->coreoptions->timeenabled) { limitleft = mmguiapp->coreoptions->timefull - device->sessiontime; if (mmguiapp->coreoptions->timefull > device->sessiontime) { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, mmgui_str_format_time(limitleft, buffer, sizeof(buffer), TRUE), -1); } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Limit"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Disabled"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Limit"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Disabled"), -1); } } else { gtk_list_store_set(GTK_LIST_STORE(model), iter, MMGUI_MAIN_TRAFFICLIST_VALUE, _("Disconnected"), -1); } break; default: break; } } return FALSE; } gboolean mmgui_main_traffic_stats_update_from_thread(gpointer data) { mmgui_application_t mmguiapp; GtkTreeModel *model; GdkWindow *window; gboolean visible; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return FALSE; if (mmguiapp->core == NULL) return FALSE; if (mmguiapp->core->device == NULL) return FALSE; //Update traffic statistics model = gtk_tree_view_get_model(GTK_TREE_VIEW(mmguiapp->window->trafficparamslist)); if (model != NULL) { gtk_tree_model_foreach(model, mmgui_main_traffic_stats_update_from_thread_foreach, data); } //Update traffic graph window = gtk_widget_get_window(mmguiapp->window->trafficdrawingarea); visible = gtk_widget_get_visible(mmguiapp->window->trafficdrawingarea); //Update only if needed if ((gtk_notebook_get_current_page(GTK_NOTEBOOK(mmguiapp->window->notebook)) == MMGUI_MAIN_PAGE_TRAFFIC) && (window != NULL) && (visible)) { //TODO: Determine rectangle gdk_window_invalidate_rect(window, NULL, FALSE); } return FALSE; } void mmgui_main_traffic_speed_plot_draw(GtkWidget *widget, cairo_t *cr, gpointer data) { gint width, height; gint i, c, graphlen; gfloat maxvalue; gchar strbuffer[32]; const gdouble dashed[1] = {1.0}; mmgui_application_t mmguiapp; mmguidevice_t device; gdouble rxr, rxg, rxb, txr, txg, txb; mmguiapp = (mmgui_application_t)data; if (mmguiapp == NULL) return; device = mmguicore_devices_get_current(mmguiapp->core); if (device == NULL) return; #if GTK_CHECK_VERSION(3,4,0) /*RX speed graph color*/ rxr = mmguiapp->options->rxtrafficcolor.red; rxg = mmguiapp->options->rxtrafficcolor.green; rxb = mmguiapp->options->rxtrafficcolor.blue; /*TX speed graph color*/ txr = mmguiapp->options->txtrafficcolor.red; txg = mmguiapp->options->txtrafficcolor.green; txb = mmguiapp->options->txtrafficcolor.blue; #else /*RX speed graph color*/ rxr = mmguiapp->options->rxtrafficcolor.red/65535.0; rxg = mmguiapp->options->rxtrafficcolor.green/65535.0; rxb = mmguiapp->options->rxtrafficcolor.blue/65535.0; /*TX speed graph color*/ txr = mmguiapp->options->txtrafficcolor.red/65535.0; txg = mmguiapp->options->txtrafficcolor.green/65535.0; txb = mmguiapp->options->txtrafficcolor.blue/65535.0; #endif maxvalue = 100.0; if ((device->connected) && (device->speedindex > 0)) { for (i=device->speedindex-1; i>=0; i--) { if (device->speedvalues[0][i] > maxvalue) { maxvalue = device->speedvalues[0][i]; } if (device->speedvalues[1][i] > maxvalue) { maxvalue = device->speedvalues[1][i]; } } } if (maxvalue < 100.0) maxvalue = 100.0; width = gtk_widget_get_allocated_width(widget); height = gtk_widget_get_allocated_height(widget); cairo_set_source_rgba(cr, 0, 0, 0, 1); cairo_set_line_width(cr, 1.5); graphlen = 19*(gint)((width-60)/19.0); cairo_move_to(cr, 30, 30); cairo_line_to(cr, 30, height-30); cairo_line_to(cr, 30+graphlen, height-30); cairo_line_to(cr, 30+graphlen, 30); cairo_line_to(cr, 30, 30); cairo_stroke(cr); cairo_set_source_rgba(cr, 0.5, 0.5, 0.5, 1); cairo_set_line_width(cr, 1.0); cairo_set_dash(cr, dashed, 1, 0); for (i=1; i<10; i++) { cairo_move_to(cr, 30, height-30-(i*(gint)((height-60)/10.0))); cairo_line_to(cr, 30+graphlen, height-30-(i*(gint)((height-60)/10.0))); } for (i=1; i<19; i++) { cairo_move_to(cr, 30+(i*(gint)((width-60)/19.0)), 30); cairo_line_to(cr, 30+(i*(gint)((width-60)/19.0)), height-30); } cairo_stroke(cr); cairo_set_dash(cr, dashed, 0, 0); cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size(cr, 8); for (i=0; i<=10; i++) { cairo_move_to(cr, 0, height-30+3-(i*(gint)((height-60)/10.0))); memset(strbuffer, 0, sizeof(strbuffer)); g_snprintf(strbuffer, sizeof(strbuffer), "%4.0f", i*(maxvalue/10.0)); cairo_show_text(cr, strbuffer); } cairo_move_to(cr, 0, 15); cairo_show_text(cr, _("kbps")); for (i=0; i<19; i++) { cairo_move_to(cr, 30-5+(i*(gint)((width-60)/19.0)), height-8); memset(strbuffer, 0, sizeof(strbuffer)); g_snprintf(strbuffer, sizeof(strbuffer), "%i", (i+1)*MMGUI_THREAD_SLEEP_PERIOD); cairo_show_text(cr, strbuffer); } cairo_move_to(cr, width-35, height-8); cairo_show_text(cr, _("sec")); cairo_stroke(cr); if ((device != NULL) && (device->connected) && (device->speedindex > 0)) { cairo_set_source_rgba(cr, txr, txg, txb, 1.0); cairo_set_line_width(cr, 2.5); cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); c = 1; for (i=device->speedindex-1; i>=0; i--) { if (i == device->speedindex-1) { cairo_arc(cr, 30, height-30-(gint)(device->speedvalues[1][i]*((height-60)/maxvalue)), 2.0, 0*(3.14/180.0), 360*(3.14/180.0)); cairo_move_to(cr, 30, height-30-(gint)(device->speedvalues[1][i]*((height-60)/maxvalue))); } else { cairo_line_to(cr, 30+(c*(gint)((width-60)/19.0)), height-30-(gint)(device->speedvalues[1][i]*((height-60)/maxvalue))); cairo_arc(cr, 30+(c*(gint)((width-60)/19.0)), height-30-(gint)(device->speedvalues[1][i]*((height-60)/maxvalue)), 2.0, 0*(3.14/180.0), 360*(3.14/180.0)); cairo_move_to(cr, 30+(c*(gint)((width-60)/19.0)), height-30-(gint)(device->speedvalues[1][i]*((height-60)/maxvalue))); c++; } } cairo_stroke(cr); cairo_set_source_rgba(cr, rxr, rxg, rxb, 1.0); cairo_set_line_width(cr, 2.5); cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); c = 1; for (i=device->speedindex-1; i>=0; i--) { if (i == device->speedindex-1) { cairo_arc(cr, 30, height-30-(gint)(device->speedvalues[0][i]*((height-60)/maxvalue)), 2.0, 0*(3.14/180.0), 360*(3.14/180.0)); cairo_move_to(cr, 30, height-30-(gint)(device->speedvalues[0][i]*((height-60)/maxvalue))); } else { cairo_line_to(cr, 30+(c*(gint)((width-60)/19.0)), height-30-(gint)(device->speedvalues[0][i]*((height-60)/maxvalue))); cairo_arc(cr, 30+(c*(gint)((width-60)/19.0)), height-30-(gint)(device->speedvalues[0][i]*((height-60)/maxvalue)), 2.0, 0*(3.14/180.0), 360*(3.14/180.0)); cairo_move_to(cr, 30+(c*(gint)((width-60)/19.0)), height-30-(gint)(device->speedvalues[0][i]*((height-60)/maxvalue))); c++; } } cairo_stroke(cr); } //RX speed cairo_set_source_rgba(cr, rxr, rxg, rxb, 1.0); cairo_set_line_width(cr, 2.5); cairo_arc(cr, width-230, 12, 2.0, 0*(3.14/180.0), 360*(3.14/180.0)); cairo_move_to(cr, width-222, 12); cairo_line_to(cr, width-238, 12); cairo_stroke(cr); cairo_set_source_rgba(cr, 0.5, 0.5, 0.5, 1); cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, 10); cairo_move_to(cr, width-220, 15); cairo_show_text(cr, _("RX speed")); cairo_stroke(cr); //TX speed cairo_set_source_rgba(cr, txr, txg, txb, 1.0); cairo_set_line_width(cr, 2.5); cairo_arc(cr, width-110, 12, 2.0, 0*(3.14/180.0), 360*(3.14/180.0)); cairo_move_to(cr, width-102, 12); cairo_line_to(cr, width-118, 12); cairo_stroke(cr); cairo_set_source_rgba(cr, 0.5, 0.5, 0.5, 1); cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, 10); cairo_move_to(cr, width-100, 15); cairo_show_text(cr, _("TX speed")); cairo_stroke(cr); } void mmgui_main_traffic_list_init(mmgui_application_t mmguiapp) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; GtkTreeIter iter; if (mmguiapp == NULL) return; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Parameter"), renderer, "markup", MMGUI_MAIN_TRAFFICLIST_PARAMETER, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->trafficparamslist), column); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer, "ellipsize", PANGO_ELLIPSIZE_END, "ellipsize-set", TRUE, NULL); column = gtk_tree_view_column_new_with_attributes(_("Value"), renderer, "markup", MMGUI_MAIN_TRAFFICLIST_VALUE, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(mmguiapp->window->trafficparamslist), column); store = gtk_list_store_new(MMGUI_MAIN_TRAFFICLIST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_MAIN_TRAFFICLIST_PARAMETER, _("Received data"), MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_ID_RXDATA, -1); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_MAIN_TRAFFICLIST_PARAMETER, _("Transmitted data"), MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_ID_TXDATA, -1); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_MAIN_TRAFFICLIST_PARAMETER, _("Receive speed"), MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_ID_RXSPEED, -1); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_MAIN_TRAFFICLIST_PARAMETER, _("Transmit speed"), MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_ID_TXSPEED, -1); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_MAIN_TRAFFICLIST_PARAMETER, _("Session time"), MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_ID_TIME, -1); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_MAIN_TRAFFICLIST_PARAMETER, _("Traffic left"), MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_ID_DATALIMIT, -1); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, MMGUI_MAIN_TRAFFICLIST_PARAMETER, _("Time left"), MMGUI_MAIN_TRAFFICLIST_ID, MMGUI_MAIN_TRAFFICLIST_ID_TIMELIMIT, -1); gtk_tree_view_set_model(GTK_TREE_VIEW(mmguiapp->window->trafficparamslist), GTK_TREE_MODEL(store)); g_object_unref(store); } void mmgui_main_traffic_restore_settings_for_modem(mmgui_application_t mmguiapp) { if (mmguiapp == NULL) return; if ((mmguiapp->modemsettings == NULL) || (mmguiapp->coreoptions == NULL)) return; /*Traffic limits*/ if (mmguiapp->coreoptions->trafficmessage != NULL) { g_free(mmguiapp->coreoptions->trafficmessage); mmguiapp->coreoptions->trafficmessage = NULL; } mmguiapp->coreoptions->trafficenabled = mmgui_modem_settings_get_boolean(mmguiapp->modemsettings, "limits_traffic_enabled", FALSE); mmguiapp->coreoptions->trafficamount = (guint)mmgui_modem_settings_get_int(mmguiapp->modemsettings, "limits_traffic_amount", 150); mmguiapp->coreoptions->trafficunits = (guint)mmgui_modem_settings_get_int(mmguiapp->modemsettings, "limits_traffic_units", 0); mmguiapp->coreoptions->trafficaction = (guint)mmgui_modem_settings_get_int(mmguiapp->modemsettings, "limits_traffic_action", 0); mmguiapp->coreoptions->trafficmessage = mmgui_modem_settings_get_string(mmguiapp->modemsettings, "limits_traffic_message", _("Traffic limit exceeded... It's time to take rest \\(^_^)/")); switch (mmguiapp->coreoptions->trafficunits) { case 0: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024; break; case 1: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024*1024; break; case 2: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024*1024*1024; break; default: mmguiapp->coreoptions->trafficfull = mmguiapp->coreoptions->trafficamount*1024*1024; break; } mmguiapp->coreoptions->trafficexecuted = FALSE; /*Time limits*/ if (mmguiapp->coreoptions->timemessage != NULL) { g_free(mmguiapp->coreoptions->timemessage); mmguiapp->coreoptions->timemessage = NULL; } mmguiapp->coreoptions->timemessage = mmgui_modem_settings_get_string(mmguiapp->modemsettings, "limits_time_message", _("Time limit exceeded... Go sleep and have nice dreams -_-")); mmguiapp->coreoptions->timeenabled = mmgui_modem_settings_get_boolean(mmguiapp->modemsettings, "limits_time_enabled", FALSE); mmguiapp->coreoptions->timeamount = (guint)mmgui_modem_settings_get_int(mmguiapp->modemsettings, "limits_time_amount", 60); mmguiapp->coreoptions->timeunits = (guint)mmgui_modem_settings_get_int(mmguiapp->modemsettings, "limits_time_units", 0); mmguiapp->coreoptions->timeaction = (guint)mmgui_modem_settings_get_int(mmguiapp->modemsettings, "limits_time_action", 0); switch (mmguiapp->coreoptions->timeunits) { case 0: mmguiapp->coreoptions->timefull = mmguiapp->coreoptions->timeamount*60; break; case 1: mmguiapp->coreoptions->timefull = mmguiapp->coreoptions->timeamount*60*60; break; default: mmguiapp->coreoptions->timefull = mmguiapp->coreoptions->timeamount*60; break; } mmguiapp->coreoptions->timeexecuted = FALSE; } modem-manager-gui-0.0.17.1/src/netlink.c0000644000175000017500000006145012400637077016310 0ustar alexalex/* * netlink.c * * Copyright 2012-2013 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "netlink.h" #define MMGUI_NETLINK_INTERNAL_SEQUENCE_NUMBER 100000 static gboolean mmgui_netlink_numeric_name(gchar *dirname); static gboolean mmgui_netlink_process_access(gchar *dirname, uid_t uid); static gboolean mmgui_netlink_socket_access(gchar *dirname, gchar *sockname, guint inode); static gchar *mmgui_netlink_process_name(gchar *dirname, gchar *appname, gsize appsize); static gboolean mmgui_netlink_get_process(guint inode, gchar *appname, gsize namesize, pid_t *apppid); static gboolean mmgui_netlink_hash_clear_foreach(gpointer key, gpointer value, gpointer user_data); struct sockaddr_nl *mmgui_netlink_get_connections_monitoring_socket_address(mmgui_netlink_t netlink); struct sockaddr_nl *mmgui_netlink_get_interfaces_monitoring_socket_address(mmgui_netlink_t netlink); static mmgui_netlink_connection_change_t mmgui_netlink_create_connection_change(mmgui_netlink_t netlink, guint event, guint inode); static gboolean mmgui_netlink_numeric_name(gchar *dirname) { if ((dirname == NULL) || (!*dirname)) return FALSE; while (*dirname) { if (!isdigit(*dirname)) { return FALSE; } else { (void)*dirname++; } } return TRUE; } static gboolean mmgui_netlink_process_access(gchar *dirname, uid_t uid) { gchar fullpath[128]; struct stat pathstat; if (!mmgui_netlink_numeric_name(dirname)) return FALSE; memset(fullpath, 0, sizeof(fullpath)); sprintf(fullpath, "/proc/%s", dirname); if (stat(fullpath, &pathstat) == -1) { return FALSE; } if (pathstat.st_uid != uid) { return FALSE; } return TRUE; } static gboolean mmgui_netlink_socket_access(gchar *dirname, gchar *sockname, guint inode) { gchar fullpath[128]; struct stat fdstat; if (!mmgui_netlink_numeric_name(sockname)) return FALSE; memset(fullpath, 0, sizeof(fullpath)); snprintf(fullpath, sizeof(fullpath), "/proc/%s/fd/%s", dirname, sockname); if (stat(fullpath, &fdstat) == -1) { return FALSE; } if (((fdstat.st_mode & S_IFMT) == S_IFSOCK) && (fdstat.st_ino == inode)) { return TRUE; } return FALSE; } static gchar *mmgui_netlink_process_name(gchar *dirname, gchar *appname, gsize appsize) { gint fd, i; gchar fpath[128]; ssize_t linkchars; if ((dirname == NULL) || (dirname[0] == '\0')) return NULL; if ((appname == NULL) || (appsize == 0)) return NULL; memset(fpath, 0, sizeof(fpath)); snprintf(fpath, sizeof(fpath), "/proc/%s/exe", dirname); linkchars = readlink(fpath, appname, appsize-1); if (linkchars == 0) { memset(fpath, 0, sizeof(fpath)); snprintf(fpath, sizeof(fpath), "/proc/%s/comm", dirname); fd = open(fpath, O_RDONLY); if (fd != -1) { linkchars = read(fd, appname, appsize-1); close(fd); } else { return NULL; } } appname[linkchars] = '\0'; for (i=linkchars; i>=0; i--) { if (appname[i] == '/') { memmove(appname+0, appname+i+1, linkchars-i-1); linkchars -= i+1; break; } } appname[linkchars] = '\0'; return appname; } static gboolean mmgui_netlink_get_process(guint inode, gchar *appname, gsize namesize, pid_t *apppid) { DIR *procdir, *fddir; struct dirent *procde, *fdde; gchar fdirpath[128]; if ((appname == NULL) || (namesize == 0) || (apppid == NULL)) return FALSE; procdir = opendir("/proc"); if (procdir != NULL) { while ((procde = readdir(procdir))) { if (mmgui_netlink_process_access(procde->d_name, getuid())) { memset(fdirpath, 0, sizeof(fdirpath)); snprintf(fdirpath, sizeof(fdirpath), "/proc/%s/fd", procde->d_name); //enumerate file descriptors fddir = opendir(fdirpath); if (fddir != NULL) { while ((fdde = readdir(fddir))) { if (mmgui_netlink_socket_access(procde->d_name, fdde->d_name, inode)) { //printf("%s:%s (%s)\n", procde->d_name, fdde->d_name, nlconnections_process_name(procde->d_name, appname, sizeof(appname))); *apppid = atoi(procde->d_name); mmgui_netlink_process_name(procde->d_name, appname, namesize); closedir(fddir); closedir(procdir); return TRUE; } } closedir(fddir); } } } closedir(procdir); } return FALSE; } gboolean mmgui_netlink_terminate_application(pid_t pid) { if (kill(pid, 0) == 0) { if (kill(pid, SIGTERM) == 0) { return TRUE; } } return FALSE; } gchar *mmgui_netlink_socket_state(guchar state) { switch (state) { case TCP_ESTABLISHED: return "Established"; case TCP_SYN_SENT: return "SYN sent"; case TCP_SYN_RECV: return "SYN recv"; case TCP_FIN_WAIT1: return "FIN wait"; case TCP_FIN_WAIT2: return "FIN wait"; case TCP_TIME_WAIT: return "Time wait"; case TCP_CLOSE: return "Close"; case TCP_CLOSE_WAIT: return "Close wait"; case TCP_LAST_ACK: return "Last ACK"; case TCP_LISTEN: return "Listen"; case TCP_CLOSING: return "Closing"; default: return "Unknown"; } } void mmgui_netlink_hash_destroy(gpointer data) { mmgui_netlink_connection_t connection; connection = (mmgui_netlink_connection_t)data; if (connection == NULL) return; if (connection->appname != NULL) g_free(connection->appname); if (connection->dsthostname != NULL) g_free(connection->dsthostname); g_free(connection); } static gboolean mmgui_netlink_hash_clear_foreach(gpointer key, gpointer value, gpointer user_data) { mmgui_netlink_connection_t connection; mmgui_netlink_t netlink; mmgui_netlink_connection_change_t change; connection = (mmgui_netlink_connection_t)value; netlink = (mmgui_netlink_t)user_data; if (connection->updatetime == netlink->currenttime) { return FALSE; } else { if (netlink->changequeue != NULL) { change = mmgui_netlink_create_connection_change(netlink, MMGUI_NETLINK_CONNECTION_EVENT_REMOVE, connection->inode); if (change != NULL) { g_async_queue_push(netlink->changequeue, change); } } g_debug("Connection removed: inode %u\n", connection->inode); return TRUE; } } gboolean mmgui_netlink_request_connections_list(mmgui_netlink_t netlink, guint family) { struct _mmgui_netlink_connection_info_request request; gint status; if ((netlink == NULL) || ((family != AF_INET) && (family != AF_INET6))) return FALSE; memset(&request.msgheader, 0, sizeof(struct nlmsghdr)); request.msgheader.nlmsg_len = sizeof(struct _mmgui_netlink_connection_info_request); request.msgheader.nlmsg_type = TCPDIAG_GETSOCK; request.msgheader.nlmsg_flags = NLM_F_REQUEST | NLM_F_ROOT; request.msgheader.nlmsg_pid = ((1 & 0xffc00000) << 22) | (getpid() & 0x3fffff); request.msgheader.nlmsg_seq = 0; memset(&request.nlreq, 0, sizeof(struct inet_diag_req)); request.nlreq.idiag_family = family; request.nlreq.idiag_states = ((1 << (TCP_CLOSING + 1)) - 1); request.msgheader.nlmsg_len = NLMSG_ALIGN(request.msgheader.nlmsg_len); status = send(netlink->connsocketfd, &request, request.msgheader.nlmsg_len, 0); if (status != -1) { return TRUE; } else { return FALSE; } } gboolean mmgui_netlink_read_connections_list(mmgui_netlink_t netlink, gchar *data, gsize datasize) { struct nlmsghdr *msgheader; struct inet_diag_msg *entry; mmgui_netlink_connection_t connection; mmgui_netlink_connection_change_t change; /*struct hostent *dsthost;*/ gchar srcbuf[INET6_ADDRSTRLEN]; gchar dstbuf[INET6_ADDRSTRLEN]; gchar appname[1024]; pid_t apppid; gboolean needupdate; if ((netlink == NULL) || (data == NULL) || (datasize == 0)) return FALSE; //Get current time netlink->currenttime = time(NULL); //Work with data for (msgheader = (struct nlmsghdr *)data; NLMSG_OK(msgheader, (unsigned int)datasize); msgheader = NLMSG_NEXT(msgheader, datasize)) { if ((msgheader->nlmsg_type == NLMSG_ERROR) || (msgheader->nlmsg_type == NLMSG_DONE)) { break; } //New connections list if (msgheader->nlmsg_type == TCPDIAG_GETSOCK) { entry = (struct inet_diag_msg *)NLMSG_DATA(msgheader); if (entry != NULL) { if ((entry->idiag_uid == netlink->userid) || (netlink->userid == 0)) { if (!g_hash_table_contains(netlink->connections, (gconstpointer)&entry->idiag_inode)) { //Add new connection if (mmgui_netlink_get_process(entry->idiag_inode, appname, sizeof(appname), &apppid)) { connection = g_new(struct _mmgui_netlink_connection, 1); connection->inode = entry->idiag_inode; connection->family = entry->idiag_family; connection->userid = entry->idiag_uid; connection->updatetime = netlink->currenttime; connection->dqueue = entry->idiag_rqueue + entry->idiag_wqueue; connection->state = entry->idiag_state; connection->srcport = ntohs(entry->id.idiag_sport); g_snprintf(connection->srcaddr, sizeof(connection->srcaddr), "%s:%u", inet_ntop(entry->idiag_family, entry->id.idiag_src, srcbuf, INET6_ADDRSTRLEN), ntohs(entry->id.idiag_sport)); g_snprintf(connection->dstaddr, sizeof(connection->dstaddr), "%s:%u", inet_ntop(entry->idiag_family, entry->id.idiag_dst, dstbuf, INET6_ADDRSTRLEN), ntohs(entry->id.idiag_dport)); connection->appname = g_strdup(appname); connection->apppid = apppid; connection->dsthostname = NULL; /*dsthost = gethostbyaddr(entry->id.idiag_dst, sizeof(entry->id.idiag_dst), entry->idiag_family); if (dsthost != NULL) { connection->dsthostname = g_strdup(dsthost->h_name); } else {*/ connection->dsthostname = g_strdup(connection->dstaddr); /*}*/ g_hash_table_insert(netlink->connections, (gpointer)&connection->inode, connection); /*Add change*/ if (netlink->changequeue != NULL) { change = mmgui_netlink_create_connection_change(netlink, MMGUI_NETLINK_CONNECTION_EVENT_ADD, connection->inode); if (change != NULL) { g_async_queue_push(netlink->changequeue, change); } } g_debug("Connection added: inode %u\n", entry->idiag_inode); } } else { //Update connection information (state, buffers fill, time) connection = g_hash_table_lookup(netlink->connections, (gconstpointer)&entry->idiag_inode); if (connection != NULL) { connection->updatetime = netlink->currenttime; needupdate = FALSE; if (connection->dqueue != (entry->idiag_rqueue + entry->idiag_wqueue)) { connection->dqueue = entry->idiag_rqueue + entry->idiag_wqueue; needupdate = TRUE; } if (connection->state != entry->idiag_state) { connection->state = entry->idiag_state; needupdate = TRUE; } if (needupdate) { if (netlink->changequeue != NULL) { change = mmgui_netlink_create_connection_change(netlink, MMGUI_NETLINK_CONNECTION_EVENT_MODIFY, connection->inode); if (change != NULL) { g_async_queue_push(netlink->changequeue, change); } } g_debug("Connection updated: inode %u\n", entry->idiag_inode); } } } } } } } //Remove connections that disappear g_hash_table_foreach_remove(netlink->connections, mmgui_netlink_hash_clear_foreach, netlink); return TRUE; } gboolean mmgui_netlink_request_interface_statistics(mmgui_netlink_t netlink, gchar *interface) { struct _mmgui_netlink_interface_info_request request; guint ifindex; gint status; if ((netlink == NULL) || (interface == NULL)) return FALSE; if ((netlink->intsocketfd == -1) || (interface[0] == '\0')) return FALSE; ifindex = if_nametoindex(interface); if ((ifindex == 0) && (errno == ENXIO)) return FALSE; memset(&request, 0, sizeof(request)); request.msgheader.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); request.msgheader.nlmsg_type = RTM_GETLINK; request.msgheader.nlmsg_flags = NLM_F_REQUEST; request.msgheader.nlmsg_seq = MMGUI_NETLINK_INTERNAL_SEQUENCE_NUMBER; request.msgheader.nlmsg_pid = ((2 & 0xffc00000) << 22) | (getpid() & 0x3fffff); request.ifinfo.ifi_family = AF_UNSPEC; request.ifinfo.ifi_index = ifindex; request.ifinfo.ifi_type = 0; request.ifinfo.ifi_flags = 0; request.ifinfo.ifi_change = 0xFFFFFFFF; request.msgheader.nlmsg_len = NLMSG_ALIGN(request.msgheader.nlmsg_len); status = send(netlink->intsocketfd, &request, request.msgheader.nlmsg_len, 0); if (status != -1) { return TRUE; } else { return FALSE; } } gboolean mmgui_netlink_read_interface_event(mmgui_netlink_t netlink, gchar *data, gsize datasize, mmgui_netlink_interface_event_t event) { struct nlmsghdr *msgheader; struct ifinfomsg *ifi; struct rtattr *rta; struct rtnl_link_stats *ifstats; struct rtnl_link_stats64 *ifstats64; gchar ifname[IFNAMSIZ]; gboolean have64bitstats; if ((netlink == NULL) || (data == NULL) || (datasize == 0) || (event == NULL)) return FALSE; //Work with data for (msgheader = (struct nlmsghdr *)data; NLMSG_OK(msgheader, (unsigned int)datasize); msgheader = NLMSG_NEXT(msgheader, datasize)) { if ((msgheader->nlmsg_type == NLMSG_ERROR) || (msgheader->nlmsg_type == NLMSG_DONE)) { break; } //New event if ((msgheader->nlmsg_type == RTM_NEWLINK) || (msgheader->nlmsg_type == RTM_DELLINK) || (msgheader->nlmsg_type == RTM_GETLINK)) { ifi = NLMSG_DATA(msgheader); rta = IFLA_RTA(ifi); //Copy valuable data first event->running = (ifi->ifi_flags & IFF_RUNNING); event->up = (ifi->ifi_flags & IFF_UP); if (if_indextoname(ifi->ifi_index, ifname) != NULL) { strncpy(event->ifname, ifname, sizeof(event->ifname)); } event->type = MMGUI_NETLINK_INTERFACE_EVENT_TYPE_UNKNOWN; //Detrmine type of event if (msgheader->nlmsg_seq == MMGUI_NETLINK_INTERNAL_SEQUENCE_NUMBER) { event->type = MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS; } else { if (msgheader->nlmsg_type == RTM_NEWLINK) { event->type = MMGUI_NETLINK_INTERFACE_EVENT_TYPE_ADD; g_debug("[%u] New interface state: Running: %s, Up: %s, Name: %s\n", msgheader->nlmsg_seq, (ifi->ifi_flags & IFF_RUNNING) ? "Yes" : "No", (ifi->ifi_flags & IFF_UP) ? "Yes" : "No", if_indextoname(ifi->ifi_index, ifname)); } else if (msgheader->nlmsg_type == RTM_DELLINK) { event->type = MMGUI_NETLINK_INTERFACE_EVENT_TYPE_REMOVE; g_debug("[%u] Deleted interface state: Running: %s, Up: %s, Name: %s\n", msgheader->nlmsg_seq, (ifi->ifi_flags & IFF_RUNNING) ? "Yes" : "No", (ifi->ifi_flags & IFF_UP) ? "Yes" : "No", if_indextoname(ifi->ifi_index, ifname)); } else if (msgheader->nlmsg_type == RTM_GETLINK) { event->type = MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS; g_debug("[%u] Requested interface state: Running: %s, Up: %s, Name: %s\n", msgheader->nlmsg_seq, (ifi->ifi_flags & IFF_RUNNING) ? "Yes" : "No", (ifi->ifi_flags & IFF_UP) ? "Yes" : "No", if_indextoname(ifi->ifi_index, ifname)); } } //If 64bit traffic statistics values are not available, 32bit values will be used anyway have64bitstats = FALSE; //Use tags to get additional data while (RTA_OK(rta, msgheader->nlmsg_len)) { if (rta->rta_type == IFLA_IFNAME) { strncpy(event->ifname, (char *)RTA_DATA(rta), sizeof(event->ifname)); g_debug("Tag: Device name: %s\n", (char *)RTA_DATA(rta)); } else if (rta->rta_type == IFLA_STATS) { ifstats = (struct rtnl_link_stats *)RTA_DATA(rta); if (!have64bitstats) { event->rxbytes = ifstats->rx_bytes; event->txbytes = ifstats->tx_bytes; if (!(event->type & MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS)) { event->type |= MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS; } } g_debug("Tag: Interface Statistics (32bit): RX: %u, TX: %u\n", ifstats->rx_bytes, ifstats->tx_bytes); } else if (rta->rta_type == IFLA_STATS64) { ifstats64 = (struct rtnl_link_stats64 *)RTA_DATA(rta); event->rxbytes = ifstats64->rx_bytes; event->txbytes = ifstats64->tx_bytes; have64bitstats = TRUE; if (!(event->type & MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS)) { event->type |= MMGUI_NETLINK_INTERFACE_EVENT_TYPE_STATS; } g_debug("Tag: Interface Statistics (64bit): RX: %llu, TX: %llu\n", ifstats64->rx_bytes, ifstats64->tx_bytes); } else if (rta->rta_type == IFLA_LINK) { g_debug("Tag: Link type\n"); } else if (rta->rta_type == IFLA_ADDRESS) { g_debug("Tag: interface L2 address\n"); } else if (rta->rta_type == IFLA_UNSPEC) { g_debug("Tag: unspecified\n"); } else { g_debug("Tag: %u\n", rta->rta_type); } rta = RTA_NEXT(rta, msgheader->nlmsg_len); } } } return TRUE; } gint mmgui_netlink_get_connections_monitoring_socket_fd(mmgui_netlink_t netlink) { if (netlink == NULL) return -1; return netlink->connsocketfd; } gint mmgui_netlink_get_interfaces_monitoring_socket_fd(mmgui_netlink_t netlink) { if (netlink == NULL) return -1; return netlink->intsocketfd; } struct sockaddr_nl *mmgui_netlink_get_connections_monitoring_socket_address(mmgui_netlink_t netlink) { if (netlink == NULL) return NULL; return &(netlink->connaddr); } struct sockaddr_nl *mmgui_netlink_get_interfaces_monitoring_socket_address(mmgui_netlink_t netlink) { if (netlink == NULL) return NULL; return &(netlink->intaddr); } static mmgui_netlink_connection_change_t mmgui_netlink_create_connection_change(mmgui_netlink_t netlink, guint event, guint inode) { mmgui_netlink_connection_change_t change; mmgui_netlink_connection_t connection; if (netlink == NULL) return NULL; change = NULL; switch (event) { case MMGUI_NETLINK_CONNECTION_EVENT_ADD: connection = g_hash_table_lookup(netlink->connections, &inode); if (connection != NULL) { change = g_new0(struct _mmgui_netlink_connection_change, 1); change->inode = inode; change->event = event; change->data.connection = g_new0(struct _mmgui_netlink_connection, 1); change->data.connection->state = connection->state; change->data.connection->family = connection->family; change->data.connection->srcport = connection->srcport; change->data.connection->dqueue = connection->dqueue; change->data.connection->inode = connection->inode; change->data.connection->userid = connection->userid; change->data.connection->apppid = connection->apppid; change->data.connection->appname = g_strdup(connection->appname); change->data.connection->dsthostname = g_strdup(connection->dsthostname); strncpy(change->data.connection->srcaddr, connection->srcaddr, sizeof(change->data.connection->srcaddr)); strncpy(change->data.connection->dstaddr, connection->dstaddr, sizeof(change->data.connection->dstaddr)); } break; case MMGUI_NETLINK_CONNECTION_EVENT_REMOVE: change = g_new0(struct _mmgui_netlink_connection_change, 1); change->inode = inode; change->event = event; change->data.connection = NULL; break; case MMGUI_NETLINK_CONNECTION_EVENT_MODIFY: connection = g_hash_table_lookup(netlink->connections, &inode); if (connection != NULL) { change = g_new0(struct _mmgui_netlink_connection_change, 1); change->inode = inode; change->event = event; change->data.params = g_new0(struct _mmgui_netlink_connection_changed_params, 1); change->data.params->state = connection->state; change->data.params->dqueue = connection->dqueue; } break; default: break; } return change; } void mmgui_netlink_free_connection_change(mmgui_netlink_connection_change_t change) { if (change == NULL) return; switch (change->event) { case MMGUI_NETLINK_CONNECTION_EVENT_ADD: if (change->data.connection != NULL) { if (change->data.connection->appname != NULL) { g_free(change->data.connection->appname); } if (change->data.connection->dsthostname != NULL) { g_free(change->data.connection->dsthostname); } g_free(change->data.connection); } g_free(change); break; case MMGUI_NETLINK_CONNECTION_EVENT_REMOVE: g_free(change); break; case MMGUI_NETLINK_CONNECTION_EVENT_MODIFY: if (change->data.params != NULL) { g_free(change->data.params); } g_free(change); break; default: break; } } void mmgui_netlink_free_connection(mmgui_netlink_connection_t connection) { if (connection == NULL) return; if (connection->appname != NULL) { g_free(connection->appname); } if (connection->dsthostname != NULL) { g_free(connection->dsthostname); } g_free(connection); } GSList *mmgui_netlink_open_interactive_connections_list(mmgui_netlink_t netlink) { GSList *connections; GHashTableIter iter; gpointer key, value; mmgui_netlink_connection_t srcconn, dstconn; if (netlink == NULL) return NULL; connections = NULL; g_hash_table_iter_init(&iter, netlink->connections); while (g_hash_table_iter_next(&iter, &key, &value)) { srcconn = (mmgui_netlink_connection_t)value; if (srcconn != NULL) { dstconn = g_new(struct _mmgui_netlink_connection, 1); dstconn->inode = srcconn->inode; dstconn->family = srcconn->family; dstconn->userid = srcconn->userid; dstconn->updatetime = srcconn->updatetime; dstconn->dqueue = srcconn->dqueue; dstconn->state = srcconn->state; dstconn->srcport = srcconn->srcport; strncpy(dstconn->srcaddr, srcconn->srcaddr, sizeof(dstconn->srcaddr)); strncpy(dstconn->dstaddr, srcconn->dstaddr, sizeof(dstconn->dstaddr)); dstconn->appname = g_strdup(srcconn->appname); dstconn->apppid = srcconn->apppid; dstconn->dsthostname = g_strdup(srcconn->dsthostname); connections = g_slist_prepend(connections, dstconn); } } if (connections != NULL) { connections = g_slist_reverse(connections); } if (netlink->changequeue == NULL) { netlink->changequeue = g_async_queue_new_full((GDestroyNotify)mmgui_netlink_free_connection_change); } return connections; } void mmgui_netlink_close_interactive_connections_list(mmgui_netlink_t netlink) { if (netlink->changequeue != NULL) { g_async_queue_unref(netlink->changequeue); netlink->changequeue = NULL; } } GSList *mmgui_netlink_get_connections_changes(mmgui_netlink_t netlink) { GSList *changes; mmgui_netlink_connection_change_t change; if (netlink->changequeue == NULL) return NULL; changes = NULL; while ((change = g_async_queue_try_pop(netlink->changequeue)) != NULL) { changes = g_slist_prepend(changes, change); } if (changes != NULL) { changes = g_slist_reverse(changes); } return changes; } void mmgui_netlink_close(mmgui_netlink_t netlink) { if (netlink == NULL) return; if (netlink->connsocketfd != -1) { close(netlink->connsocketfd); g_hash_table_destroy(netlink->connections); if (netlink->changequeue != NULL) { g_async_queue_unref(netlink->changequeue); } } if (netlink->intsocketfd != -1) { close(netlink->intsocketfd); } g_free(netlink); } mmgui_netlink_t mmgui_netlink_open(void) { mmgui_netlink_t netlink; netlink = g_new(struct _mmgui_netlink, 1); #ifndef NETLINK_SOCK_DIAG netlink->connsocketfd = socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG); #else netlink->connsocketfd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); #endif if (netlink->connsocketfd != -1) { memset(&netlink->connaddr, 0, sizeof(struct sockaddr_nl)); netlink->connaddr.nl_family = AF_NETLINK; netlink->connaddr.nl_pid = ((1 & 0xffc00000) << 22) | (getpid() & 0x3fffff); netlink->connaddr.nl_groups = 0; netlink->userid = getuid(); netlink->changequeue = NULL; netlink->connections = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, (GDestroyNotify)mmgui_netlink_hash_destroy); } else { netlink->connections = NULL; g_debug("Failed to open connections monitoring netlink socket\n"); } netlink->intsocketfd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (netlink->intsocketfd != -1) { memset(&netlink->intaddr, 0, sizeof(netlink->intaddr)); netlink->intaddr.nl_family = AF_NETLINK; netlink->intaddr.nl_groups = RTMGRP_LINK; netlink->intaddr.nl_pid = ((2 & 0xffc00000) << 22) | (getpid() & 0x3fffff); if (bind(netlink->intsocketfd, (struct sockaddr *)&(netlink->intaddr), sizeof(netlink->intaddr)) == -1) { g_debug("Failed to bind network interfaces monitoring netlink socket\n"); close(netlink->intsocketfd); netlink->intsocketfd = -1; } } else { g_debug("Failed to open network interfaces monitoring netlink socket\n"); } return netlink; } modem-manager-gui-0.0.17.1/.tx/config0000644000175000017500000000120112377602755015606 0ustar alexalex[main] host = https://www.transifex.com [modem-manager-gui.modem-manager-gui-internationalization-template] file_filter = po/.po source_file = po/modem-manager-gui.pot source_lang = en [modem-manager-gui.modem-manager-gui-man-page-template] file_filter = man/.po source_file = man/modem-manager-gui.pot source_lang = en [modem-manager-gui.modem-manager-gui-appdata-file-template] file_filter = appdata/.po source_file = appdata/modem-manager-gui.appdata.pot source_lang = en [modem-manager-gui.modem-manager-gui-help-template] file_filter = help/.po source_file = help/modem-manager-gui-help.pot source_lang = en modem-manager-gui-0.0.17.1/resources/signal-25.png0000644000175000017500000000611310743706064020126 0ustar alexalexPNG  IHDR}\ pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FvIDATxڴN0FNt(IxF^ /R66!P<e*w3:NI(7E'"1@5Mgҕz}(&IoSYaðױ%IdZZʽEd8k=`V@f3b^cY:杊 (SR+)1T(2AAj `?Th@`0HdM?݃ g8PT()]=촞Q\#.@ktޗ)AA0zK)0@ɔ}GH ώ=юv[Zݻw) n%APy=~8*JOB̌ PF(=!@"U(\.ҥKZ}6z!4#=N1ǎ<{l._ S:a,gסj.xpZSEqka(Bmr9޽{X^^Ngk!Dل-~.JW9WbZk0 (=zDBʁb[666̰,+v"!loo*]׽P,#ػw/Q,7b{oT͏$sjQarrZx۶ \v B]m={i'ǡ0 S yضe!휬m!l۶$RJC$)B0sc6? "X U3PJ̚"h;8\ޚ`>&JKއaJ|6 ׫`@ c$nb}`"f϶mH)QvQv1(J4 Z7}'SRxd#2H0N(&ёDzP At eYHEbrjRmgS bSJɛ\DG8Af_; *3̜o6Zs%ώ.H<Z D֚FLq%ע(ʭJt?FF<<<|2snJ;}dd$իW #Fyôn244zvyloow7!+;̏whɂmm(Nsh^cnnEDwگ0S!D۱J)j&(eLR zJ_uOF^T'JsǎCO077gnQJU|`|̯)n:N]E-7Rkd]JIENDB`modem-manager-gui-0.0.17.1/resources/traffic-tb.png0000644000175000017500000000443612015246340020442 0ustar alexalexPNG  IHDR szzbKGD pHYs B(xtIME.yIDATXíMlT罙`cƞbl1|ٍV5V"(TU*mh7iR"JR CԴPH`bᏎ a3v3;FAUt{9<)͛7kmu]_SVVϷMD"RcL9Ryk0-!K94t}}}[__RpiW7nܐ/$u=G?苝oڴi} 8ֶq۶mqmq2J/iDhhhfffOMM=#Xs#7+dۦM,Ku]\ץ0, 4,8 \z˲u]EQfuuoG-k#?~).7oԴgUTQ__O,#SVVyd247o$.4G}$ J]Լݽyluuuq֯_Oyy9yAD2::nݢq=\2944tG::::|>-[D(%ilݺ6B\v`&vahh/>%r> I&8illիNDؾ};]]]CӴȂ} PSSٳgpdxxeYH x!,"EYEkk+/333{SVVFss3;v젧x<^ܳk./t---$ )"r\iW\\(WUUR p@ |cǎ155Ųe裏h44`NXv-W… ܾ}P(D,CDOSFFFp^z&\LLL8{졳|gtuu؈eY|y~?"UnߏmR8mH$mk׮dذaxMx4Mlɓ~4Mcdd sssxC)mši""+**ض|^,"Nsu<+\.HVu7n9 4 ˲0MuPS@{Q^^NMM r9A)뺴@kk+@aA&"q]xRljAaCi |ٱc1;;,mvZ:::N>,^GaLOOyb $jhh@u<|۷~zRLMM133Css3DQ=J)4My!뢯\r8<rDUVd0 q!  /Efٲe$Iz{{O:U̪ił< ~t J4w&3<)~;w0??iD"֬YCgg'xG6_ghh] W""J F7"[D/"RTXjlܸZ)//;399I*رc<|)~'"(s2<,"Шf VPh4Jee%`p|>tL&SbaƨshO+KA< c;?MRh.'ul;WK}ڱvIR|T ø n= x0k_Xc?P%"d/,LI)GDpZX#a|X kw2`E[n<)> aM,t   XZ 40_{_LIENDB`modem-manager-gui-0.0.17.1/resources/message-received.png0000644000175000017500000000211512074235710021625 0ustar alexalexPNG  IHDR-bKGD pHYsVnVn Ѱ(tIME )c AIDAT8˅hU?{ޭ]732 .u$GF * a*iAeGȲ0i斻^w޻{nӉ9p|GzT*5ZaO?'{Fv{vvo"BA.]$\N٬dY[,^k_cۖζ%|^.^(.\.sI{{|aLsaG^ ߌO$% CeCEc^Yt(Ͽ-pϮm3Zx|An[k.quSa9q$Η_c;ncJ===TTT`UAHk뢹eڱ/mH}}NX,Eab}jkkJ5 PO:1v҉^( q]---lٲk-p$g!Jy\1fp& >rٳGDDȜgzv~}cnMf0^/"6mywgZ˗<$5xFD7oL>֕Rr5=KԔonnV y֚ׯcy?( foQJ?vddc ZkED8!+20=޽{dY/^q&?Xr%f,PIx"qR*uJO*jڵORV3Toh* J0 U}}=uP<P.T*qpkmlu]8@hIR1d 0v\.(/]`GmmLLL064<<ٳgؿ?<{ONoo/\NN:---޽ p :HH{6UAWs۶mѣJ%&&&N8WT*$U!tG,O:v4uD"wŭ[ꢶ rR)03 |C1>>^Z~A˭aHĂZkz{{9~8{իq.( (Jri\B:F)WN >J)\ pZ" ,Yɓ'-6PTPJ1>>N}}=lذUVU雚#aZ[[bŊd}oݺƇKAtR&&&=uuu}e˖׬Y&0 .p]O\Zw4뢵j:@TZth"/_^:.)5"4f\vc\Vrd2 &Zkǡt:͓'O&;Z8i8s ;waH+7n܈뺸y8ܸq/_Vߪb=?N?qx^Ç?$R8CGGGd6 d$b9Ӹt>* w׺X,VM^IEɑa԰9r$nBɽY.Kc0LHrd2;FMMMYЉ8~aU}$JxSϟ?{V'州}W3Z?|κ@Ne ʓy^ՙ1X,VGPRa'Ӻ hDDf,CXl"ncvLkXc mmmc>0P򩢀CƘ /64_OrADVcܿ'³ 8|f9=79c(fxIENDB`modem-manager-gui-0.0.17.1/resources/signal-50.png0000644000175000017500000000605110743706104020120 0ustar alexalexPNG  IHDR}\ pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FTIDATxԕ;N1Ey.J ЄLKEIP (#dʾ9FXTTBN'wӵV h7MӔ;>ܥl$a?HӴŷf\I^5̴TA7"߈*ecJE8ʦb˜k k_9EGm69&kmZA{>y&IeNKb/3( h avU(;WbE(|7"߁K5HP[+v:ZG=&eu\|yna0ժh V9BIENDB`modem-manager-gui-0.0.17.1/resources/ussd-tb.png0000644000175000017500000000311412001106264017765 0ustar alexalexPNG  IHDR szzsRGBbKGD pHYs  tIME 2 3`c5IDATXÝW]hGܽ{kDhTت)UۢUH Bb|*mCѷX*mD>آJ -(-"j̽ݝ9}0w7I=p`fgo,aT*Rl~#abYKe-BOj70.r)^ܼysF4υaa\.sww7J%0S#̃466i~,ĜD l0z{{vZhG33<>|ȗ.]aۤҀd(h|i``yFi\.1r 1RʟAPvf\r%VXѲiߴ|yRJV_'AP"3O^39Q̇D/^$jhLD9gOOwuu|BRBA`T*0sck֬aeh}{{;"B P(8N*˲0ohѢ8,˖-î]pܹ9mmm`W-ˢ Z!֭[m۶Az>,Y5/^ i /ђ3Q.!֭4B ð*r0< 13Q.cY6q J D@.mHSƃfaHxB Ǐ hP"J䜈+hZkAq011  Ǐ8@=z}޽{`E!|G^GVk8M5{zI y8SNš !p-Xw^cjj*FguCWJx݋'O,٠Be 3ٳv:c0_$1'"q޽'OFZ,a& ÈA"IBR3QXXӧ}vLMMe^V7 _J"TkMhA"\9sf;cjzKH)!SA&\Qѣ+]JZJo'!5e]0IcI8[… 0M/_Ɲ;wi_Z(} "OKs+-wJ>"^Ʊ>¶׈ l=YrH)QT^e]KRʍ-'&ّRR_FU^)UVaF0::5RPF 'KJy nܸy;Й1-pcR#ne0-cOIENDB`modem-manager-gui-0.0.17.1/resources/message-drafts.png0000644000175000017500000000210312074235600021315 0ustar alexalexPNG  IHDR-bKGD pHYsVnVn Ѱ(tIME ^IDAT8}MlTƯҿIi %i p!A@\Q M@BbL$]Ę!.$$j-ał(R27(S "'9ŗ5kם[*b0F0<w?9r{>r>t`/?_uerrR&&&֭[2>>nE_ as۟cú;^ʏKc Q)uٶ  }Oׇo0 Uh;˦MDaőc,RIUsuXJ%Y+_uϞ7w߰gռUݫs˗w*գU <5bQ9NJz{l:8W_^͢Żu]80 g!oߦ7rTUri,e6Q>wܡNDc B̾}؃444PWWG* ;iIgftuuErAj~U, 8%- ZEqEQ:y0J!##ԟ8y p8i_1 {>^},̙1`Xä<y8e`Fzsѱ8i~q8Қ J;:PNР*ܔ1J)7Eo]#"q\E[[PӬ2DdR*gURP)ͿnR__+)!#G( @-  Cr.4K=b45!@I%M9(iM" {/R*Wi([m{>JԬX䬟IgH&d8׽\Mc3%BߩTs`j`A4hVp_`B0AkIENDB`modem-manager-gui-0.0.17.1/resources/info-network.png0000644000175000017500000000215612107753464021054 0ustar alexalexPNG  IHDR00WbKGD pHYs $ $BtIME&HIDATh}sשnS*Ed#$IQ֕Va͘,CmL㏰<< ,LLC<,ITC-R?λu֮kw>o{F%l:<4L\+o ϝQ"^t'͌KĤ ;U@|ipR~@"k`tt3+#\߰?b'f>Qt?n9h˩w~H&F]-X3C޶TӋ1xg*LGs] *]KBwd㣊9{Gkh+;Wq||kf'bQQ7D-ɾkR&jU0*3sq)F-x:>cCNZ23+[O/$JVng]_<<0>rJ J߁Ãv`Eurzm|!8 |>?_, è Fqro߆aQ>mR />d2R6qۥ`rrJ)twwcǎp]<3g",ciT=<˽J%[nEЊ.\cժU@ww7$paACZ9MT 7P*VwP@V֭[sٳ'rFJ Rd^D6J1GܸR s;wl509OYP՚tK)8exƶmAж0DZE",(&c#Z:2@iTkµrJ߿s^G1۷Jh1"Jvc0 #7 C avϟ)zǏֺ0 aKJjz8p붝1֯dbMs3HL7nEl)qh%~_H9krx@BDFHJLNP@OggS@&z*U69 /4ESPVeiRekh/E eY x陞_i+qy=LCKO0K0=o0sg{w?98qxx9<8<<xpa9 PF{%oE 4 eWrG?,4`%1f4g~>.tW]}qoE 4@ a9 PF{% c9ޢ,7`LA,8͙̪F}} k'Qk q#Ŵ44EpKn_9u}][LߧO3sCW1S(AQ {r o[6%j1}JsTEN12 Tbo`\2%,{ĦI* DaZXX -hEQEc+^c ]EN2HƳ WT\W2xP7~ Ws5o5bYF?kvΉXmuի2jY*$ن5)+,Q˒Z^F(<;WZȞKu?.vĹgk+eQGNga珘|lC,buNJӑ0Wm4\"MA~$VKg6-Mj _VF#szoN햭=av.%;2ş_L{Mcj$T_2l/ e)'(/u `F|CUxW>v`_fR/Omp8}&ۉ3 U5\ f8￯M06{Ѵ9/y*lrLkn5 ywzz5=؆͖cPKVWۯ|1O~j&+ k5aɣ;m.+]^9<*~nb.Ec4_i{HB I3:Vc<_^k1_0O'ѿ[eKapc1TU:B]C>>4M<0M7d|QPd)p4_94-~m7om89Ե_X į(|Ʉ[Z|}0g\fwFZB@@ -YۀXiOe%ù b! ~ nTgQ.P! X#儯4 B'8߮CU͕Ɣi. ~߾JܜYܛ89sdt4y_k4KTU.ݮh5OplOu",;כepCB?wAO7$FIR}| lh|g9|Gyf7j$D$]-55$ u?p_m8^'F]{kŤQӔo/nP@BQ .>>f}sYl.>߁4nt,!u/mIFW{1@9S-H%`7<SQ>.JgޅyZd`*i?OQ G88m`p'F ltp$0N_hZ!9c ˿'ȣ y 0|H7WIiA2bş" vz$iӉL ^Ϸ8S7ni`cѪw {~d@9 M \j vḇ[ҙF}tp*;z0DѪY*{H4tBK5,ta.2F5@Pg<|;LQ ްpa;=JF2TƟ>ʆ'*KCJTK_$=@?o^)I}[t'0k4S%xN{jswgg@뺪ZhC @OJX/<nIu@j2ݎ@_0{@{3]m]@ [W`HMA4  6 x{v8 7DFɤp*ξ?Bq3w ::ڪK1wqo4{x~>B! dd t`,'NwͯDkL yӽnz,4M˩sY=h4VTT{=k`g-`m7fu@1yϯ﹙r(@.˖1 HdߕHoEߚxlMN/fLPDӁ]%Z^p L`;u1̯~3Ll$nyW-y}s>f</}c+`@1ӧӜAEWS>$!"u|VO0"^ DnQOBMKSf\͹$B׆.4o3 =ݟ/sό͂ZDzɤ?XW1g坹Oj|{r5|,}[f*?:ٖ&ѓRb~yNuKcrOvyMkqK]hg/b[knx ɟs5Dו\R60fiiؕD=q~d<9꫏G?W5@}ոk^zNպqI\T#mW}獵=^@!ZJ $޵!R{Vҟ.8`B/eȄv9v%o}~youI|' yܖ29t4g3s sјL:Ir~:,|rT&V_,.NzszkHv. !)jNCdnf(Y܇n7;s-zTiSėm9T%qkZv'6Ԕ3[OSo JewuٓiUsWz4y>}P!A${i:z23y\}|FN|ټr>Stf(L8,K/TUH P4/Ƀn-Dr,OggS@Jz*V^JxݟZ̤7"@=FWs|xw_/:t`Ͼ8d1qbW_W<!e6K ɗ 0b%'0{9'X>W?,>hߟrTvhPJY^=;&Bġ/+UYjH}ߘ#Օ7=Oڐ soi"1mxJ u,{r%|Q: vo 6c543x7 402&|k OLzS^b}*08.Y~&~uZ0${VY@@Phvp`k<奦V㬹!b~k3~nv9cOgf5|ƀ.N0=G4*ZWJPJ֫8fyY#_R {٣;@}_3\K>{x 5AoH:^h>#&j 鐶sU-ڏ``A_ ,RsbKOExCh 4Kxў</Wg3 kQ 8g?(B -`>q[J& ~ K0kh[r/<|3 oӵx7gx @~q ?g_Pdhm=MVx͠)6oR-22[7;`vymsQpU.[=8Ȁ/v b>4 @Yt kc2{N7P-&[W\i⭟z? DG!r[4}?}֓Apѭw;ÜxŌ=Ɨ|qhSPwЙʆ"b{4? ..t; m @]e]u"i7"/?*.1!h0Ix. 9 ?82Bɺ*KS)G停pFQ~ ?'q<9g'xc I('҂$pRKw&(S2y^><""k_5G%*+z^,zh 8` 7bn7'if!,ԞT-<Qf ?$qx Kޯp-upyF@חndaTVY { *% sz7m7>0qޡ))9 {k`w -ib~'} >moXM djn`!ٵxl4 f}O~Sm8ۑco@G6?{7k})~;Rq[>G|U5L(´tC\j"QBT`xL-ˆ˲]nK똟3z āv/^ lW_@W'8j/Jh!,B|IKK.@&N+ٿ@5 >ᷩ#fb߉x'YmͩC}+*ʛk̋zp,%`z}Rh|J9c5?o|Nuȯ { 1]934sm8@ە}`p.۴{>6&p_P ?f1)2s{Ǝo8% 9>_&sV=v/0PCYP5;ʹ.DPׇ͂>{1x^o 4PL )I)8  S uN Mq]jr<5ܙCmu8G" WF&'~*R`"?)"AX o~tO}* 3[x6}^ؿ gx m\ vW@ :}b'8{-M8qMU>ϊ`4@,   r)(W[7t B82M?MŸzC\Giiժ(H[V1Tw7:~==fe:$/s (_aߝ쁂,\\ fP=Tۻ[e<^jS^@xo_o^w}T ҁd>`MPOM4`#`3Lב4Q@5_Ѽ^K\[^HpG^:ce@{~*a  ZPႪ [w3\']UM*e%rI>CX>s0s 9|2ͫJ b㣶a @.v݁T>x6Mx*d'z'Ƿ95ai툙c,Wv|).U1Eu,p~ߕk ou=Σi|]D]=]Ffk/f]6֘^';`vMR<||=-nk ;IN}6_<~|PKWl?D-J7Sΰdٔ2nHva XuI<]-" yE\5;@E7Zp78@|m ;TFPmU1Ndi8^V2oǃ/Ky莯?h=(vWNu@ csjҳ h3KsNֿ4ă;q `?v: bެǯ 5PIkvF 4b ?!mq*&'*r37UJ5o7]N:هolq}Su09=yg7P6_ ,X{4:x[OM䞝Vyֻv]\gv1OGg Cz(Gb`d.L`[8Q]H8OggS@rz*||ȍ؋zZі%oQ縯 7H^Ζ'AH؟p8RU_ =>D< ~{w`'9s@F p=uPwe ~k-~ }/;rVw-oι5| `[#otߩ'`$(yhkˀ?鶀ڝ揶?8d4Tw}pf3*HǬlRpdzo3}~\i/"rI6Y:3eeOu"p r~:z`hwWiDd{V[QL͹xgqGXZtܿ `i^{:QZU8cL,p?gC gS44>Aj |)_(RP]YY*.#͡ܚݣʚu? MϜmhq^,⛝(OK9Omqpfz ]6V/l߿]^ S @!{QSB@>Y÷k4/`@8 ̳3~mO7$qpGiyy;>033;>>7k/s ܀I١o6@PJAgty"HDBvz] _/FԀtiE>ܞ]4<8<*N }_" |G(p"xw @0 puSBɶ MMrz^rѰ&0& o?0Ͽ$m~y2o{x@Ѱqw93\=N’@n룣OPhP^MBE|]uo(Ir}e5-&S@|TPN4U/W&է v;]aꦆyG}|c;牲_P̊͜T_IԲ҉VpI 9@Z.̢r3,`CTlGnv]9`ڍ\iY+u@rj  <4 `Nm2g5p[|uM|W@8årkJ*U%X}e7jSeA7x/Ϭ9 G%v2Љf7<3Ϲhv_ż N`ii Z{N>3 ?oǧ545ph*)KҰGCL˵#2=qȔT_MOO{Wq2ԯS{ ?6ϛ"2ᩧʌTJLd|}gU)?1Q$4kD@%ϗM~k&dv`!(?TA@SC-H~AZEG`@/byEYWM~$bi9=h] uU r?_̧3}w(#B9,!xB *vn͉~$S76 P.ޞ TZo{F?U7_x%nǟ|o, 4j ׉j [>nye8q5[д*)5>d8-dsk7 PNF~J~_EDS% b+"z.q3)l! k`Y \, xӋ%q4ovb&4 &ؿ3@7~Ja"({b-g9x(ݪL%R bJg{.Z@0'ޒz $@ C>?~oR7Ƈ dS^mPg g/==1kyO}H#XV@a*2ji;<խr(wtyuW9$@Q,R X>}O DdٺW!>Hu l^D@}(8kM g3 ߅#Gx_ۂh[%LgXh5C.~- %w8%^ݍBh}g鞳Ucg֌V)/:]1(\?:U r_OOZjYx; -/:'Qbm>h] |7q7#bʝ`l2Jkz?f0?%O3=U:+sy*A# SLx\N%oǫݣ Q Ȧ^?Fi k_?LuA,((0;s>MHz C/"kg.8m12'`*IdaUe۞~ ` Iz7t@:/R/r Gxhpg_XMq173p6߮*$7Fd9f?Ql98xtzRhd6@BxJ{v@Y@W'f_  @AX8njP_++  \!ʟAlN8$Ea׭H|Lfr]=v2c SudJq,|tה^ɣ dl6 9>\ν~0;WR9'|7?^_Ǿ9}+}svמIpB`AH ITQ*=; h+_}S OggS@z*3'Mp?bt!Wdۄ /'X}^J(Y"u5HQ{>2.~x8ja,<^zHzL?v vg[`@ozx>*9CAÀǔ98]Cx33}\K$+37IDZ8+/a.w97|y/> @Q\ϕyZc],}cL"Зo”4N=֋ݛ zر]=QMs*gWs都agr}  Xn0۠5b7iI!gm̈ؼYM@%IWu>?8J`gzn6!9KH2,A(@W&Bm_歜!6N?yXWVgor9}<+?h?mi6pL ٕݙ$}6鵲y̚Ƈ!y  @nx%H~0 @P~G؋|_/". F%]F/LPO3d| [#Pk Z43]YbrE6P]gOǝIՒK En;36SgGW]K5<ĵ6W)?6nzyF\2,cw#+2lXM_9Piǻ3|:[U4_ C7bhJzNjo6v$XR·j|\Z_;ls!~*w;lǿ?*knò"&)tNOrW/o(ưSWmV]]!OyO(ā6:'\47 @z$x>kWuޯOR'NGI<_N\?clz(Z BIJ*\/>!Db C|s} rϯe,\u_ߴ_^U&@O`]M4?ju.wSu_LKCN8/^ZxI`YL<\3t6 o[}T0}8DMΥS.<P bAO!gnvOM$Lul֐/:<%͗/@Q} fpW# ^A6 <`2pg-H޷?GͣF$^SsH43?G[AtxkFHL)d@KنWE?`RԼh ݸ6=,sGs⪡YiWUY?/raLduy'{O%G/̞?meׯٽC2>OM6o? sI8qqJ6גs #\*(`Twc$q]lq7΂H&L P!E&erTA_(witKU8b'D?K8w4/pxLcoGJlHS3tTk-v~v{ݾ\|ӽi,1Y`ד%'_cW<2ͩ27mad@R~~ oP :x>>CokQ&ahxchZOYd7 id7ۙ]4? do4aQ/Y^ǫ?LAk/.*۱,xSs4͂Jd0נ3tK_yoqxk0/neܴ6,b@-l`p?Q`Hp0Jg|u?eN+:Z_CbQGxfDٔIIeT%{?/ 927J7ܶoi ܁IW);$h0r_y?ZG;vkj$PqbD. ,qǕ1d|]5o?MNfS1)QfM|%G%{қMѹD3[0DTZ/h}x0me6NJ; h ?_CyrҮ~tƄc}̽I  % s DӛW&*'D Kܾ_^|&؁QTCYϟ@?|`[3-֎ $ZW, `B9s{ 6o=gpa#'D^jwe|b Pp`07Zy5T'E0&r pSyo6f蟯O! j.oށ{#~8I޼3 [C}h~r2{849Ot2oLX`Xrf&,rUtoWo${{OY2Eszj~8(0h}؄F},H˸2<^8ѷm){QFӉv|`jOeʤ)Wy.vC.,'umh❎*kY$)[,]G9O~gPQ8 .k>m3V ;4 @T@c/G40fN2gjE=g; !*ǖReW.:s':beͨ* ƀ9NXk> ^<֌HчS }c:\}ϯOڒX\$ ϵcPl,БdJCh/{__ ؟S]-7OGemvsM[b>lOL,yzɽ wL/᳠ R ׫j[4.iêi/Վs}N} ]rRՓ3?7jekp6N^/Bd}9iZrI3d8<LUNo1l~[jw< Ugg>n2tT{ D& z0=d_6J <ђ` &jЀ4\{}+wmU陓xu?_ѺM_8uՏ𨔒R\q~͏pn@Qf(P ڗ T|?_X:;khZjw ~dmVr`MWH(A.9 ϟ`8&<YVhRdH>up7`<@0yQ\vnVlo +yX{i򓷬 4'u?'0@@17h@Γ Ȭ4h%: IJkM7׻Yvj*'9ȭ_a_oWCm(\e]8.rbW;3s@S r`{|}WU/}}e>c>z]:s)IƙЬ̜` + }!LM4Iz_ѲXCvsQG/&P| LLg%m-, O /@'[R2#@2왧Q@죽7C,'`[|}(\M `:r;Λ:X[lOpIynfᏙx^ܧ>ٚY]ZUXfD{&gb"n='v{Ͼy S0p'&NFY˫ zrsӓ/EL9rɝ}~$A캱{Ri-B .‚ Hʶ%p,=>_*x盧p緗TYMr6_*![A,@A(4`@W rC޸[</h.`Z2}с =p *3 4/Uz;)֐N桋~dGӹ'aqpHy αY8~w@2 qWLSvb {籷8=v̄CY| ^ J:g`@AFAs^ $l  Yh`L,J<~}R:q <x}N?^ꎲnhX˨~uP!Pè)a~^~kuO|Q#Nˀ锃n=tlW=L`k%vnN}8@Hv`ˣpLgçc{[(Z2[fLhjf_ WgvI64c.!H "߈yht2gl/wb>ŵ!L] 0%zb4@ )) ]p*F!:a&p8'?ٽ]ػ{^VVXԿ~2'>wݷjgo736Ţf˻hiou}rS\9}fRe)tߕ}%|~,4, &+"_^\>/O}6p~'Q߮ 3xhL0o("UV&2E$@ApHutd_׿/ōptNE@KQv[o @/u4 t]˄-'S@ x? \2q5xj݁<2_|6@cN>gp p/`'(aO}Ҡ:~`jTwfOM^.Y`ܴ@W~yݼGjCOO~~O Dx~~eIlX{8@RIDK7H%d5ޓy(=AN<óĴez--;*W9*4@DĀ FF4 u؟ 屴l5 :iOMA>gGi7@_v JUZ p9N"|ݠ[fy5 oGdp}x1&׻^{Uez &|+fy<mv . =l`s=)ggww}rܔyVL2 >]\ '5fW~X>#2/Jz+~^lJ6KfM2-[dߝ?f6=:0_8s6㟽 =3r.- PBSJo0 Sq^f8 >.SnZCMsI@ <~ԩDM??]5;^X3BuHʕk >Y Fm(¦}G2RvKm|5_bOTJ@S0C^9/NtwS=4>{r n`Hrz6v$'v79~eיJ5NrΓ SOLRؠ&dCMn=d͛yOU&j@ZK0p0#]Mʺ/3jHo?ǭ9|3x8 J/P `/^ eLHKxO7w(KU)ӑȖXt.EKrU:d8~Ƈ {6mvӪ+1T9-p+=O@ iv ~.޹zPy=ҡf [hz@$}0b4vs$o|9kT|NNCK~pJ !3Lɡ>S[ʿbz>_uoΖn 醓,cM{5?q<txʹr⦩oF\zYg)ęO6`/ Q0Zp uxMwQZZM*giE}&Pޱv&Y!D` P@P o @elHHGOut("99'@?%+|F}Gf0S_#:)v$@*b'rJh8i̘`.0xl]<2GL+dep20_in`-Gw{sܹD_3;|r6? u28 dy]н59?FGLj{>(sr {nǎG?ϗbx~4Ip^`k=5"!thg ] du~˶mq(o,U55{% ,: `E eL̈ ^r܆l.Kɲ}F`>[_E,FcLSbiLƭwziQ ecNIt>B  xxX/1s~gۿkQw543;?pלvӜ=o<íOJg.1[ODsLTctT:e⩗-mR탄nwXr,0Np1˻WAp@ )~'/ ~7>I|dhh"5d(qy7<aTOggS@z*wyzruqy}je؈`E^mU0l8I~Q]H@}`BgXkmJHN F X.F :?ƽ <1X 1Қ6`z4W2Wn>g =$N‰ylkQҐj'FT<>swsg5=; v6m&>oqL4W߽Guw.wq^ $:QYn//$p<ųt-l)ĵU Ai*liPV 8UR 4ie,: }z^RA0 u Nӿ'MQԣ |m dk]ɂ V2Дf0{+pȎbi{k#`]sew YEghz^{oP`tiihI~?h+mzy ]]IvX (Eaq-=7VMTMK;]\kIR*ѳ!ϥӏT_?KQx C]'wz3=M宜nꜞ% 6ܕ̰'~zr@pxEr fFch  te,ډ sBRKZ rq"~,nr[ԣ 4?x7:FTAH4+_zIICN'fXεY7cXҝkZ 6@<%8`w@C0?/Cyu {f&|2L75dS~oOfϙ?kޟK@K4xF }y:{Ytk7^9}I2K~Gsz/l $dÁ"DDe>}?@J2Ԉ9Ӌ cNeG[Bc] @?y0;?E~ޱӜu^=bUwNMM4yf;dxQS:up<2@+/\{\(\*" P纓}d{a7if@dlE>O6@ʮ@do<@y:Ey:+l™2:x}ze(KQBH.mRlDXv^  !#$@$`> e\:yز8Au,!#, YGkfDY%*HHW[uBn,< {{g%h%ii \eqd<2Kw't44o7@L~$J]c4Ծ4y}1<Π{ӝPE.{Zw1|2TM+{of[=5ʩj?QL&"?oyadt_=Dvv`M-ɩO^D!Y1Wp;Ys&nTԻ6g&sRu 3@*8VD  etyo"z gE➞}K,@6ֺDP) (fҟGsK#Ͼ֝ L s6'/7ʍeN_%q%p<Ó I{U]L?dsw䡟W7枾|:Mî&;ߩ#*U[n o5$N@&?MmzJtLGtU݀DBL xiF}VVra,K2xܙ>/1bbMOqr?Ti }9 e\`tֿOIu,U8(B}|*;Bci~FFM $j$E) طo/ _?3L,:Xsڋk8Ӥ Wٞ*UnZk`+ KPkf}&gv'Ou0{cWe&i&y+#s9g J2iw}wyfǪ&u '[{I(s}rΞ&=X}CQqX~s@wu:d*o/_)!-ff;{b Pyײ)^`+Hre<'yC'NX.gEE'6Bci `cYQI*$@y^?N= fQ{7wM4deߔ{~;@ |J]Z ~b΄SSo&/<6]}3UN̪:ëL{I;kd]{>h@l \0+u50d1嗃Hs؜w9E?DOm,;8E!6u;1o<#^>\bG$sJUSCS窗dəLR3 -)ۦW6hwYQ'YT3p 0e#骯8qHwB\J\vtԲPQT2+30/xOmzLCa]|*[s_p[T ۗ~YxdD Kz3jgbi򞹜93gsyHhIg\0}j>L%B79M'PDvj>4YPf@w' 2UE 3T%xu dj\y}}?CsGïg-if:Xxnp ܿdbNak[Ӥ3gpyn8oBv9UynY|v <ϰ$&h~RKOggSz*-Ғvorst|e\rL}Ze8'"}=ޅ_7º e>r|goW6FւvɧUi4`uwğ_`]---`/@,}Io.elfY:5vz\$wg~z;mMxe?չXxjHhXidl7㛣rM~^H6=`3Wۗ>χFe Ipc*Ӫ0:rO*Eh@ p@\$Ce@Lêz:w5|t:>̮uW$qQَy 6#$7uzI9o@?Н0V?IlVuSy|dF{w#`FAs6;f0 >]z3Zr!lw5S<|l&3ߛk@0Я k545@QX:!:$`윩̥6=Uc":ze]ps`\`]/?z64t#@0I&yww808۶ Cnic/] ¹ A8HrwMTP4IzF^ ؅W5%Z# 9Pe\d}_!e:/BվGnpMl6lUX]$/?;,m3 LtE(Kj4Bu$UnfXQ]$\v$3?en1\.2 }~_t- 9o 잃?}ǝINYagWL&4ܐuK;⧦E'5ïkϗcIOΪ}.~F$к1ac L\G|k\9 b_aR\>?NHln9dHQ ]biDf,SeB2N0Tz_o*URY2zMjN1@L$ɫfX Ton/w2`ֳ݈٩0mm2 Iȼۢ8 ␕s8@='O9==MbNw+U2m}/ 2WUhĬ~zqM>u~NzU*\![ mȲfVw@ [c<ΥY1,etvybu1o}/4s0!v7 TbFoل|jM,ТjL&TRexfWM3y\Yorv?CVYW Dʶ6pST|SM)ſ{(ʚ@']Smodem-manager-gui-0.0.17.1/resources/dev-tb.png0000644000175000017500000000352712001106264017575 0ustar alexalexPNG  IHDR szzsRGBbKGD pHYs  tIME 4*7ANIDATXÝW]lfvml'@ j~&IpE_{BH(ҽI*jA*@Q /.QI)d J(WHhbc>$]F33{w|;-wH$! 4͟Xc_9sܲa虮4mH񶹹O>-k}, Bhhh`0h[5H$˗lvv^7B1w B8뷚RcDǃo3!DR)e˖Ǐ1"*X4##BBJ"ZnjjBccGѹKQJ/A>"ʴ" MCKK 8x2LI@Db1&<מ \}>!躎A gs C)/Oe hGGGFLĉ' D,<On޼Y2cvI&Bs@D"ضmF_ 0== "{mOu,--!ͮ񿳵qݻ(v8pe w‚3p^/3l(EǏ3ιG[h~UUm2ÇBgg'oߎx4>|˲V"bːRp?S]] )eBD"C`Yp=twwcϞ=SSS`h^ֲ,p)LnZYY2r9>H)anݺz4448)=v񠿿tڱc4MiQg۹'ODMM t]Ǎ7PQQgOiuoF*B0DWWWB^W~:r\R˲{n簉FXXXs}}}HӸ~:<:::P[[8Aحi6{crqiqTVVsιtk.9rsssF4 yvVJ 8Ͳ7sNabbիpsgY8ޫ^|>0p5TWWٳ, J.ŋi(R6mڄ.(`&4jcZZZrkY^zuX^^Foo锬n @Nit<a @6uxQ6eDZ˲Vy^߽{0Ԅ@ 7fN0skWgU)s7Lě7o@DR"9LRlX szR`FA:M&C,'fMƾM\fy)5_bBDdc(zJ)#5 D"`V)Ŋ.UNr . V kU4CKp^}b5MC"(] eˉ_o=D4#c 7ou4C"pWJaǎ8ŲCB|fPgEKK &''1FO5rCDDd9D"mD4QO,!ɼM![O- @QLNN !BD $B( H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxb?- ###-YåB |tRΠ͙PD `ߏDKb 8f{7B lAq!jxS5؂WxAA0( f xFU5P,mG%Hm0os=IENDB`modem-manager-gui-0.0.17.1/resources/info-equipment.png0000644000175000017500000000167612156070060021364 0ustar alexalexPNG  IHDR00WbKGD pHYs MtIME 9OKIDAThKh\e_Q[a@TQ\qBڅr#+AWUA-D֢R&jib8N839p}p9s).bCN,5+Cx{Xp;V<K cQ'& g3N*ؘ6a|x-IKbgN\BfnamU\̵eB[{q?D˱ GroL`E*G=(w[ PZ| os b :?_ Ve]g⼬֒၌ZQ.γ_cRLWF(7\Op,+;2E=9F1~˽VZ*nĎP?e87n2aaqm%e Mw } A|KŵqW(Ȧe>P1ϥxO&DzA(RT($ܚRsn lMx_4a;y.NE+il<ӳVB' ?~ } IENDB`modem-manager-gui-0.0.17.1/resources/modem-manager-gui.png0000644000175000017500000003163112001106264021704 0ustar alexalexPNG  IHDR>asRGBbKGD pHYs B(xtIME Z IDATxweu[ksn{7`7"ɬ%ZJHɦd%?EI%RϦŏh* XeQ, !6fz){>)*>ܹ^~gѥ;HnQ$ؔ;%.`ϤήѷWGNl}j:?߫fkZY|,BbSgDur=R2"\>ǰbh?&]qٛrvnmciq^@HVAB2yl29/`Oy=h{\~ @Dݒ&&'2eܵogSݺ:nd;j=ά/Kci{lF`YER{G/^813'_'{n5–sy_^tz{?](*{ťQ7q}y+b !(%"@`~d~Ńsx%_v_ŭZg'l M<{i;yIGTzUGOLPX A{fYH]7]]ǥ%awl~nzW,Nw{'XovOtxkg>_D\1z;o:='v4:(&0EM0_unt1-><޷}CƍF0D).rA vqmJ#ur,Gl~ 0 7` ˟ȇ֧qwɂ@ҸEv (0 Mi|ۗƧ=zP2wff@Qh"w?{<]s4Eɏ߽ȵ7o\h@CHIB:_X&y%[,`Ϭ-*b23%!d5}xv|lU!h4}PNQ5<[d7/Ю-yW|l^PSY[B\ sJ%xھKHZZ}Wgeʈ3;pBs7o]ݵ<)©{-F>K^&܅y .>HPJ`T/٬yuny@N.>Ƴٖ@ m*> 4Q; FZtd{1f+7ZK 䢔"@Ad!2э}<`i@ B%wv,88Lg[(>c08\|E'58h!h+QF3(Dj_+ݶXZ|{ʇp97|LRĥWĶ,\ C`\T(8>nխɏ` j1 OGu`L$W {ؗMj,=p(>Uy(q5%q/ CWvg~j^rM%%+8ϩF\7,=K/zz+u1g #^U"֢qa尵c[糗,0 O Joqܽqb_r)k!Z]V \}xe.BO6'FI2<2ܮCa*SmZlgzGj|FRC9ǴʧP}5$^]R $[2{P.9ጡD 4LPbK琄h9x&~*@O:<*pp"ײ&,1y ^ْc^(bh^ Ez{iU7,8Skh+Z=hZv RM$*F"3 Iy Ύg&!ȣ$+s-s)1y"BDݹĤA0b@\|&$ rEg-,!C\?N7{ `O AjOeୈieWa2QIBppD@B0 ,HM$s݇d 5Yŵ K5D(Z'bd\9YtaN&( a+(_]ǁ==}e5mncn) ܿ,Q8;Mq T,|,yaE٦#K$ BS9G`4C)(0o}zeDvbQPBY$|agNݷ6n-PÑ%U"ǁ'W_mi=>>vv$ŶK!8tE+ zo$  / /~W[SA*7V!{H8Y ^`]4)/}٥,S*!s G/X|0=ӋfoD%qּ@~xkC΢F 53Y ۈ/=F_6f^JJ 0ȥA(J|;B"W" Q1OIտɶպnAΘL#r` ! Y=q+tT{z2?% :|rQ:Dk0!komg]%heCw Hy8o7m, .RmI2ȿ@ x x1:ԙ!OȾrsT߲+={jJ `H#|'r7E Nm] `FzcHKSl8baуH=W^r@$f_ t>CM-․}m}t!jL:evx^!лUF$GF÷5<^@ːMi.GȨ"D>R[>mxB Ģa5Qdr|sSKhL hMkD@ض ׍mѰO~B9G`PRq˘@[GDAk(x}CI D1 I M5IiP^{!ՅrV U=  J$`y|>Bn0}T*zT!9X̼ãݑ4;Rߩd vAN=ap؊ȓB=ƩeAURÌm1 A |뮏aD8$(bF/ccBq+ YXa0( * Y_~YҥK@G,`Kpn̩F@; ܳ.۩축!ÛiL柫A H9 \<)?KY/`%YS_iIB/ Ay`HTt5ݴ3>x,$S6Pl8%FzH]$dP4k\d/l%tA!G\JKT%WD S0hhz㱣@ RZ z E⺍ź&Pl$<˧RH[}.q=Wމ5qOeI\ 7@I>baC!YycSCJp `Eh5|ɥJTP_PaG53䣈y|@$/ Tq*qE}&L ۧ]Φ聩)jHyE^Jp)ŁNFm8,@XD7fpl~>>@y&b rB5B =s>Bځͫ ,  ¿NN5F$:c5JMkwhgÇJЩ R?⚅kq/i+SYѭ eoIWՐ9wyI;㇨j]ee$p4SaX_9"ɂ}=2&E hmB+UӠ"j'9 X%m!`<)ĕ`=;/s]|D{&P L˫0 @a8@`h.(Q d4yW14 U.`X0-`W4o+yGwz G8,'p vb (OԔ)2$-`W֩Owd= df)¨K(ziIV>D쉁6ӯy"}9JNߥ+]@`P{Of4fDnJ3 x.*l)'C_(4WjF"Pb/@ADZjNjUA J@ylU\_[38}uw<\َT3P#TBs5{8t.iMf5:Y xV(`*NR(KMzAW@XO[;墚^Wa.l=#D  _ZyW+`ݺ>?"[xB)R/i&fC-nE칎Ic5fTv]?( T^Y)GhHʣ]v[}.GKg[ %GlQT͑7"&z䉞B ).(.BD5-5y^ܙ !ǛS~TM\J*LT\Y@TJb?9=&5QWRuv_pɇ7.<MOeMz!BMF4-ZQV>{vRdj'Nhz8r4v ~L%?K%R{hWN/]l,)C( !%T7坋ZR];iq|u,2(P 9H]zp߇fT2+i;7Hȉ|#HA)>Y_9Y+ÇrL3۲qv^/FsMݼP| !Ɇa*(D:=>tw`h,)TPU~; } ~iTڭeXN[(5ϫE'r|L RTӆ9[h!Nh0\0皓[` XE =J լ/;Ch.d_qZhOGds(ل7`ٳc cfMD"d#cA+O j6!3_.McOpA@5j.-u_XN0`MM7,Jezz[~^-)+m`.Ai,@G=Il#Y5phi3TMf]5L0z5UXA0E@AݫBl҆)`9S1g6GAb\<$=֞==3pE\ JnhU=ڟ,O)j#07/.x<=bn$L\ /QҀJ/DbٜPSC"*&!lm,}eShG($Ui8USC13ASYG66A4*2%rb;T&]r֍;BDzo7Qz3s=VGv\l`J2pzBK8*0'k!`\8ȥEa1 2a?L3.~|ဆN3cj:EAŅV eH jv9~@$LJ: tLRِx=$툜;Ȯ95&e>Z@} zqgW&t1HR7gۋ@M:WI[/6TިႹC-uآիG8ʷsX(I:Cª E* B f/D""D^mZ6)esnlkJz4aT^`G}VU ]s7һ{g.yUy@ax:́H.d/2`Η'bt6AhUѵI~ΜOvTR0xTDq<^- ==;A\i KE $ADԣ6)?[;_<'գ_PC!>Ц ;݄) [iUaT$@~jWX.&TxM:gRE 6셚6}o} 輨.@ _ڞN[<rmyG R5ADދ.,G A" );:Xv]~G$h2(J'jD,T:J. zXziD^}PӭT3@vhFvCϿ쯐t8Ξz&|õO(+*+1$_f%uxʼ;UƗz+*؅-6sWGFVlJ5 Pĥz!kH4ޗxԎp),ayB`m陁+QV`0j';ajb@F(D8yuli16ADdA[8S_Tڔ)m~pHtQ{vKtyEDGCܼPxoGw⌕ =oFEA.%Ի-?ݴ~Cv|aR,\+ج!=޹ޮ{K *Rnvye(zVHodz"nmBZ'5}vQŎܵYHdTKZ+ѓUHk4[N@ߏ3d[ =~'óHY)''ĀC [Wޞ<:x`Vaʇ0hM?|c̲n +"UC]Yҟ j9>uP4Pb2{,Bd+ʚoPEVtI{Suyhke!HU0,TJًᫀ-^j>ht_K8Z+JBd92+ʌ=0S\GlF$ JI;%"dvYO&>h.TBQTSB7("@_>m7{YGˆ]fQ]nξN"w`;!? ;#@IF $7OGAPp*#*nO BƥSJ9 IDAT>'S^:@ОXm[-e\ 7G۵S"hg|DA*t~p#ߵwB ;].7QtBV}3_϶!UOQ߰fjqb┮jw+9*0F.{ϓEUJ VMIDYpp g$}d7dz·mꁱ墭E%UQԭS8%ayt`أP\wp){ݒw$k:_|vѪz3J4~GMDX78(O`+=yb7$(J8JC &B?]@[A:Vy0ss ;VbiKe:.)-cWlD5E\wz~CRy&x({5}W9K_~~vb*ȨreY!Ұg\>xV ]tw,jkSbaj(Oʧ#c OTB;ae7h羙_o;z5sO(SOf/yL*؅T;䉁7Gw}x MܡEV^k*JwFq߸1l8Z|ˁ?M/n}G"\=9>!IPPz55"3sJ[XV9pzK㿮wnm1Deؽ?Qdߖ>4 שa>z2ˀ#TэлgEL T~b߼<|'? 5'7w\g6OF3>ڍKUN3W'tϏ^ʾgUoڱ!.~ec0V-( d5sebTҁʈWQ$Fn'~Q$S+C$<`"{];%Tkt;R1*]ؾwԯ^}5TX\r9ΞmIZ_07 M:V YCQ=}|x1}p귭8>bni#'\-Fœ8d sxm|N_ϭe[Ҫ g #z|U!wF$+en%o}sSv)>wFHK1FZ)t6N}{ޱ뾕 )!Wvf3#ǣ[y E^`Wk1Ł_;?_ӾILwBYpJџiעYT — Rߎѵ ?57J($̥/ }egԯQߍtW}buie.dP\̭U],ȌK4K}ǹno<(Q=Zl̳(5Dze SJwрOU&Ḅ&ca'ΕfS/7O6_"!d2'!yp_ߺܼ@P'KT$gnW+9WSɓC'>YSwVZd)䛣/w<&{>ryr6޽-֗.n~ʟ噅6:ja:{tx?nڍ3ɼMU>I%-f셁d嵛[vw-,PO'zWf/ÅVO#7s``B-j'cJWlSx#;U WìF{7~6:ڮ" Z1\;rzɅ}~lu^Moһmst:-7dr'2V~vP7K|!;/T"&dž3j,'FI#G?w߭u~YAS+{;8K?P)"ynGGEM7\}o4Լs.nPYoN./~{??c]u+@Ñ?_* 匆2:lOٺ/ GwU1Yӵ  5[*7 G2N@z~LMqtEI'{v9>߻wT3V3Y.ܟg|v;~XH|{h_@P'b']AR=2NrJzt}z^cu9zyf}s{t 65nH mUPң!OO6.7l^ÃTTNRH!?Ժj}Xv 8'v[e__־S%!N@vC!}fgXrD~[I`ףo.԰mx{4|UݲىZ\m-<]#f- dDm0yB~80lv5jkt_g7˿_۽nG_zݴyP%kiWg؝*RNz ˺N.njw*Ҁd_ᱬ8),E޽cǶ>y/)vlx礣[;W d"!mʞxܼWow#Y.Ő1e5Wk \g_7KXƢ`!=*TU="ȮF'eKGjw6}ug{ƑM-<߭XdzO,7pvIe@(1rڔktT^d/B+tv5NinC[EvQ n@\(<,,%KQNm獲ϟה\eWZjy2QIaUaK(OX8fbRPB)EmOg/ |zD_rB2>W|HM%[nOҢXtH(P#1LRЃ\ڂW822f1Z#3Ko}i N,8s_nywz&9C8eC*N:pA E#pbhlՖZl7OO._IjIcr{K[_y DW2,vMT$(lTEcA3=|Y_ֽ>j,;#aJIFd;@ ) MVJXs~cә[#V?-T25 hR'0G.d%6X]9ø/T0ڻ Sg!tIaۺ1`͝I UVѤ d qN|>Dțɾ\` nhZgk}ևg@r  ^N+;/o@:m~\|,nE9gH&/)|GT>| 97wh'=w|@-]@_  tF~Y|r~w@ QeЗs/tIENDB`modem-manager-gui-0.0.17.1/resources/signal-0.png0000644000175000017500000000610210743706046020035 0ustar alexalexPNG  IHDR}\ pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FmIDATxڴN@n[/$>7bD7OxPE,ɤv*hԿntјIѤIp|rm%AѠW$IURMTuZb UD\?0>E*VTӱj+*F5RaC DH RnZ@`0o*8c!"M1,.RQCxZlb:Zg(ϧB(W' =\߫WC`xx(r0O0h[1>br %$ٸM-%arr횏FveUwDKKYTUUe YX,[ߠ݊N;Igx?鬥n @8Li:YYYevfUU!;;)>ܦ  ͋ppňhhl觩NO˕,$ lIQi,|_ PWj`wV:J "4EF|o8$sYwL0BQ c 'zdY*tPX~,a`0r%UF#~`LT՟J0j1{rQ,4d2i,f3> OҀ,v{| pIENDB`modem-manager-gui-0.0.17.1/resources/scan-tb.png0000644000175000017500000000451612001106264017742 0ustar alexalexPNG  IHDR szzsRGBbKGD pHYs  tIME -686IDATXÕolTU;i a]KRg**&vݺ`JL˲M6Mv1Y1D jEXi0.ܡ-h;Rc3PIn{}}h4D"l8 ø0R[n]SJ~JӴiN2<>.&&&H&g~_M<]OP u`kk+<⺮0R|>T,d2LӼ{(s]ߺuRJ ԏ:^Y4&&&ӧR7iB,R)Y~=pxAtb u]/,s<\)uiilldʕ,YqHR$ n޼I>_QB500 ,}<WIjBMpXwb :;;K'9I K)uݵx D"?c-H>Kee%J)fff8y$ׯ_ Bחի|!Jb&RJ (Jj`WBQ^@48|0n::::z{{ǏSYYI]]匏8㠔L˲nH$ar9s6nH__>V,erTWW+u(@ ,g  4O>Q!ϳqFdhh۶r =iRyf,¶mlۦBJCa„R@ eY(ضm`s'x]ym/_F4CJ?m^,ky<>gϞ7 ͢ l&Ӄ8۷;wx9d22G:˲4 u]mVX/N1 qhhh_`0H]]nҥK gmیy۳Dz,V`R 0ֆR>)%۷o穧駟Ʋ,vލ8 Ή@ T* (q\#eYEJIUUVB4bΝ\p۶Bk.ZZZ,\.' :.]²,jjjRz߾}YlFB\Guhii)%lc;wR266F8DZc/H$_d2I*҂d2r\Iԁau[rrr9*++ĉH)|8泥ݻwS^^?Ϻuشi7oFu,Tfr ^{2z҅']R",fggYlsssTUU|rFFFr ىb\x-[j*H)ٳgǎ}!drr=Px.9Mrɩ ,"rD7$T655i,SwQ?P 8)&7{hhq}c$B.X Ña.]Z8Hb JyYO"R" OX%@l6^ 9@rĴg sC>{I^v/dMB)vIv,R y i0#3H~~u{@`*I;`~rE~:>Dq%3g\cpZMM;vLh\U'񪪪e666geeM4̵#%pB9ʇܹsRUUjr;{$ղdg$C[hwH]D^C~:2 PUXX^O}~Q__),+f*;qą#G7l x.Uգ$xˍ!ɽ;w2qP^]]ݷΟ?_F dqLMPXdwǎkjj՜PooocGGGVVVqPjt]])JLIcZOcPhyyy;WXm#:C`7o^իn[6ɛF;&$J3+*** 6HC.__nKco'' -(ii^ƏED_%y)^X=).#y߰ہG+|>| `u

};]lThLF.{ζWT1+n?6'"j ƿL>$pIUपޛ,w_*8xǩLMy!ɹ7888H_H72U5۶|Jj<G΀,jF /.abIENDB`modem-manager-gui-0.0.17.1/resources/signal-75.png0000644000175000017500000000575010743706122020134 0ustar alexalexPNG  IHDR}\ pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx앱N0E|#``) D BBHf@m6x({ϐhey`R:績yFVR/yhs*%}*SкlEg&܈`IOR ++ψ1xjmE"X5Tİ"X+rUD'سk4UWd"݂FŶDLV(cupǽi>{z ,~W_{?'dw IENDB`modem-manager-gui-0.0.17.1/resources/message-sent.png0000644000175000017500000000212512074235512021011 0ustar alexalexPNG  IHDR-bKGD pHYsVnVn Ѱ(tIME "tȴIDAT8}MlTUuZZāHK`BQ&]Q&  AJ$1&l1 P$Җ)cyof=.CNrrϽ_O+V:>sfBU1JS'?|?='ځgεvZs޾}[Ljξ}# />U7_Λ1(0r96lxi5M'ZfjT% C(|l6kW~s?卛.465S, R,ueww/]֭osEb?xf,XY8-Êʱy8CE J\By?|wYd{z֑p}ߟL&Yf ]tvtdƦKLeI,#\ell41c y''JQ[[KeeP'*bT%hnn (J*qfW^L?}+m@)4̽ A.!A!/fpdQܝsz5*a:+yu\Jo1@>rPSjEϴs !׋9x aI]a#"յqSRfħlAU:;g9Q99Z[iI`DiKAQY"M)+nݹE]]K/w}e۲mQGxuyjD~KP!@u.VD2A+?%{?dMl Ąf\EDs% K*k*QEEK.+sF}@4fZ1IENDB`modem-manager-gui-0.0.17.1/resources/modem-manager-gui.ui0000644000175000017500000073316412401147114021552 0ustar alexalex 20 120 20 1 10 60 120 60 1 10 35 120 35 1 10 25 120 25 1 10 -1 255 -1 1 10 1 10000 1 1 10 1 10000 1 1 10 False Modem Manager GUI center 700 550 True False vertical True False both-horiz True False View and select available devices <b>CTRL+F1</b> True Devices True True False True True False Send and receive SMS messages <b>CTRL+F2</b> True SMS True devbutton False True True False Send USSD requests <b>CTRL+F3</b> True USSD True devbutton False True True False View active device information <b>CTRL+F4</b> True Info True devbutton False True True False Scan existing mobile networks <b>CTRL+F5</b> True Scan True devbutton False True True False Monitor network traffic <b>CTRL+F6</b> True Traffic True devbutton False True True False View system and modem addressbooks <b>CTRL+F7</b> True Contacts True devbutton False True False True 0 True False 5 True False gtk-missing-image False True 0 False True end 1 True True False True False vertical True False False 5 vertical 6 end False 8 16 True False gtk-info 2 False True 0 True False No devices found in system end False True 1 False True 0 True False False 5 5 5 5 Connection False True 0 False 5 5 5 5 True True 1 Edit True True 5 5 5 5 False True 2 Activate True True 5 5 5 5 False True 3 False True 1 True True in True True True True 2 True False Devices False True False vertical True False False 5 vertical 6 end False 8 16 True False gtk-info False True 0 True False end False True 1 False True 0 True False both-horiz True False Send new SMS message <b>CTRL+N</b> True New True gtk-new False True True False Remove selected message <b>CTRL+D</b> True Remove True gtk-delete False True True False Answer selected message <b>CTRL+A</b> True Answer True gtk-undo False True False True 1 True True 200 True True in True True False True True True in True True False word True True True True 2 1 True False SMS 1 False True False True False 5 5 5 5 Request 0 1 True True True True in True True False word-char 0 2 4 Send True True True Send ussd request <b>CTRL+S</b> 5 5 5 5 3 1 gtk-edit True True True Edit USSD commands list <b>CTRL+E</b> 5 5 5 5 True 2 1 True False False 5 vertical 6 end False 8 16 True False gtk-info False True 0 True False end False True 1 0 0 4 True False 5 5 5 5 True True True 1 1 2 True False USSD 2 False True False True True 5 True False True 0 none True False 12 True False 3 3 True False 6 0 0 3 True False 0 Device 1 0 True False True True end 2 0 True False 0 IMEI 1 1 True False True True end 2 1 True False 0 IMSI/ESN 1 2 True False True True end 2 2 True False <b>Equipment</b> True 0 0 True False True 0 none True False 12 True False 3 3 True False 6 0 0 5 True False 0 Operator 1 0 True False True True end 2 0 True False 0 Mode 1 3 True False True True end 2 3 True False 0 Signal level 1 4 True False 0 Operator code 1 1 True False True True end 2 1 True False 0 Registration 1 2 True False True True end 2 2 True False center center True True middle 2 4 True False <b>Network</b> True 0 1 True False True 0 none True False 12 True False 3 3 True False 6 0 0 2 True False 0 3GPP Location <small>MCC/MNC/LAC/RNC/CID</small> True 1 0 True False 0 GPS location <small>Longitude/Latiude</small> True 1 1 True False True True end 2 0 True False True True end 2 1 True False <b>Location</b> True 0 2 3 True False Info 3 False True False True True True True True True in True True 0 2 True False False 5 vertical 6 end False 8 16 True False gtk-info False True 0 True False end False True 1 0 0 True False True True False Scan available mobile networks <b>CTRL+S</b> True Start scan True gtk-find False True False False True False True Create connection True gtk-new False True 0 1 4 False True False Scan 4 False True False vertical True False True False Set traffic amount or time limit for disconnect <b>CTRL+L</b> True Set limit True gtk-goto-last False True True False View list of active network connections <b>CTRL+C</b> True Connections True gtk-disconnect False True True False View daily traffic statistics <b>CTRL+S</b> True Statistics True gtk-justify-fill False True False True 0 True True 200 True True in True True False True True False vertical True False Transmission speed False True 0 True False True True 1 True True True True 1 5 True False Traffic 5 False True False vertical True False False 5 vertical 6 end False 8 16 True False gtk-info False True 0 True False end False True 1 False True 0 True False True False Add new contact to modem addressbook <b>CTRL+N</b> True New contact True gtk-new False True True False Remove contact from modem addressbook <b>CTRL+D</b> True Remove contact True gtk-delete False True True False False True True False Send SMS message to selected contact <b>CTRL+S</b> True Send SMS True gtk-new False True False True 1 True False in True True True True 2 6 True False Contacts 6 False True True 2 False 5 About True center-on-parent True dialog True True window Modem Manager GUI 0.0.17 Copyright 2012-2014 Alex Tool for EDGE/3G/4G modem specific functions control http://linuxonly.ru Homepage GPL3 Alex <alex@linuxonly.ru> English: Alex <alex@linuxonly.ru> Yogesh Kanitkar <openclipart.org> Michal Konstantynowicz / shokunin <openclipart.org/user-detail/shokunin> LlubNek <openclipart.org/user-detail/LlubNek> Umidjon Almasov <u.almasov@gmail.com> image-missing gpl-3-0 False vertical 2 False end False True end 0 False Add new connection True 320 260 dialog window False vertical 2 False end gtk-close True True True True False True 0 gtk-add True True True True False True 1 False True end 0 True True True in True True False True 1 False 5 Active connections True center-on-parent 550 350 dialog True True window False vertical 2 False end gtk-close True True True True False True 1 False True end 0 True False vertical True False True False Terminate selected application using SIGTERM signal <b>CTRL+T</b> True Terminate application True gtk-stop False True False True 0 True True in True True True True 1 True True 1 connclosebutton False Connections center-on-parent 580 400 dialog window False vertical 2 False end gtk-cancel True True True True False True 0 gtk-ok True True True True False True 1 False True end 0 True False vertical True False True False Add new broadband connection True Add True gtk-add False True True False False Remove selected connection True Remove True gtk-remove False True True False False Save changes True Save True gtk-save False True False True 0 True True 200 True True in True True True True True False vertical True False 0 none True False 12 True False 10 True True True 1 1 True False True 0 Name 0 0 True False True 0 APN 0 1 True True 1 0 True False <b>Connection</b> True start True True 0 True False 0 none True False 12 True False 10 True False 0 Network ID 0 1 True True True 1 1 Home True True False True 0 True True 0 0 Home and roaming True True False True 0 True True connnethomeradiobutton 1 0 True False <b>Network</b> True True True 1 True False 0 none True False 12 True False 10 True False True 0 Access number 0 0 True False True 0 User name 0 1 True False True 0 Password 0 2 True True True 1 0 True True True 1 1 True True True 1 2 True False <b>Authentication</b> True True True 2 True False 0 none True False 12 True False 10 Dynamic True True False True 0 True True 0 0 Static True True False True 0 True True conndnsdynradiobutton 1 0 True False True 0 DNS 1 0 1 True False True 0 DNS 2 0 2 True True True 1 1 True True True 1 2 True False <b>DNS</b> True True True 3 True True True True 1 True True 1 conncancelbutton connokbutton False 5 Error True center-on-parent dialog True True False window error close False vertical 2 False end False True end 0 False 5 True center-on-parent dialog True True window False vertical 2 False end gtk-cancel True False True True False True 0 gtk-ok True False True True False True 1 False True end 0 True False 3 True True False 0 10 10 gtk-dialog-question 6 0 0 4 Ask me again True False False 0 True True 0 4 2 True False 1 <b>Quit or minimize?</b> True 1 0 True False What do you want application to do on window close? 1 1 Just quit True False False 0 True True 1 2 Minimize to tray or messaging menu True False False 0 True True exitcloseradio 1 3 True True 5 1 exitnobutton exityesbutton False 5 New contact True center-on-parent True True dialog window False vertical 2 False end gtk-close True False True True False True 0 gtk-add True False True True False True 1 False True end 0 True False True True True 1 0 True True 1 1 True True 1 2 True True 1 3 True True 1 4 True True 1 5 True False 0 First name 0 0 True False 0 First number 0 1 True False 0 EMail 0 2 True False 0 Group 0 3 True False 0 Second name 0 4 True False 0 Second number 0 5 True True 1 newcontactclosebutton newcontactaddbutton False 5 New SMS message True center-on-parent 550 350 dialog True True window False vertical 2 False end gtk-close True True True True False True 1 gtk-save True True True True False True 2 Send True True True False True 3 False True end 0 True False vertical True False 3 True False 5 5 5 5 Number 0 0 True False True True True 1 0 True True True True in True True word 0 1 2 True True 0 True True 1 closesmsbutton savesmsbutton sendsmsbutton False 5 Preferences True center-on-parent 450 300 dialog True True window False vertical 2 False end gtk-close True True True True False True 0 gtk-apply True True True True False True 1 False True end 0 True True True False 0 none True False 12 True False vertical Use sounds for events True True False 0 True False True 0 Hide window to tray on close True True False 0 True False True 1 Save window geometry and placement True True False 0 True False True 2 Add program to autostart list True True False 0 True False True 3 True False <b>Behaviour</b> True True False Behaviour False True False vertical True False 0 none True False 12 True False vertical Concatenate messages True True False 0 True False True 0 Expand folders True True False 0 True False True 1 Place old messages on top True True False 0 True False True 2 True False <b>Presentation</b> True False True 0 True False 0 none True False 12 True False True False Validity period 0 0 Send delivery report if possible True True False 0 True 0 1 2 True True 5 5 True prefsmsvalidityadjustment 256 0 1 0 True False <b>Message parameters</b> True False True 1 1 True False SMS 1 False True False 0 none True False 12 True False 5 5 True True True 1 0 True True True 1 1 True False 0 RX Speed graph color 0 0 True False 0 TX Speed graph color 0 1 True False <b>Traffic</b> True 2 True False Graphs 2 False True False vertical True False 0 none True False 12 True False True False 0 Modem manager 0 0 True False 0 Connection manager 0 1 True False 5 5 True 1 0 True False 5 5 True 1 1 True False <b>Preferred backends</b> True False True 0 True False 0 none True False 12 True False True False 0 Enable device 0 0 True False 0 Send SMS message 0 1 True False 0 Send USSD request 0 2 True False 0 Scan networks 0 3 True True 5 5 True prefenebledevicetimeoutadjustment 1 1 0 True True 5 5 True prefsendsmstimeoutadjustment 1 1 1 True True 5 5 True prefsendussdtimeoutadjustment 1 1 2 True True 5 5 True prefscannetworkstimeoutadjustment 1 1 3 True False <b>Opertions timeouts</b> True False True 1 3 True False Modules 3 False True True 1 prefclosebutton prefapplybutton False 5 Progress False True center-on-parent splashscreen True True False window False vertical 2 False center gtk-stop True False True True False True 0 False True end 0 True False vertical True False 5 5 5 5 Executing command False True 0 True False 5 5 5 5 False True 1 False True 1 interruptoperationbutton False 5 Question True center-on-parent dialog True True False window question yes-no False vertical 2 False end False True end 0 False 5 400 320 dialog window False vertical 2 False center Start True True True False True 0 False True end 0 True False 5 5 True False True True gtk-missing-image 1 0 0 2 True False <b>Welcome to Modem Manager GUI</b> True 0 1 2 True False Despite of it's name, Modem Manager GUI supports different backends. Please select backends you plan to use. If not sure, just do not change anything. center True 0 2 2 True False 0 Modem manager 0 3 True False 0 Connection manager 0 4 True False True 0 1 4 True False 0 1 3 True True 1 startdialogbutton False 5 Traffic limits True center-on-parent 380 260 dialog True True window False vertical 2 False end gtk-close True True True True False True 0 gtk-apply True True True True False True 1 True True end 0 True False True True Eanble traffic limit True True False 0 True 0 0 3 Enable time limit True True False 0 True 0 4 3 True False 0 Traffic 0 1 True True trafficadjustment True 1 1 True False Mb Gb Tb 2 1 True False 0 Message 0 2 True True 1 2 2 True False 0 Action 0 3 True False 0 Show message Disconnect 1 3 2 True False 0 Time 0 5 True True timeadjustment 1 5 True False 0 Minutes Hours 2 5 True False 0 Message 0 6 True True 1 6 2 True False 0 Action 0 7 True False 0 Show message Disconnect 1 7 2 True True 1 trafficlimitsclosebutton trafficlimitsapplybutton False 5 Traffic statistics True center-on-parent 550 350 dialog True True window False vertical 2 False end gtk-close True False True True False False 2 False True end 0 True False vertical True False 2 True False Selected statistics period False True 0 gtk-apply True False True True False True end 0 True False False True end 1 True False January February March April May June July August September October November December False True end 2 False True 0 True False in True False True True 1 True True 1 trafficstatsclosebutton False 5 USSD commands True center-on-parent 550 350 dialog True True window False vertical 2 False end gtk-close True True True True False True 1 False True end 0 True False vertical True False True False Add new USSD command <b>CTRL+N</b> True Add True gtk-new False True True False Remove selected USSD command <b>CTRL+D</b> True Delete True gtk-remove False True True False False True True False Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei modems) <b>CTRL+E</b> True Change message encoding True gtk-convert False True False True 0 True True in True True True True 1 True True 1 ussdeditclosebutton modem-manager-gui-0.0.17.1/po/es.po0000664000175000017500000010010512377603733015274 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # vladevil , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Spanish (http://www.transifex.com/projects/p/modem-manager-gui/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Error habilitando el dispositivo" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "" #: ../src/devices-page.c:394 msgid "Selected" msgstr "" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Error enviando el mensaje" #: ../src/main.c:385 msgid "Operation timed out" msgstr "" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "" #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "El modem debe estar habilitado para leer SMS. ¿Desea habilitar el modem?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "" #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "" #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "" #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "El modem debe estar habilitado para enviar USSD. ¿Desea habilitarlo?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "" #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "" #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "El modem debe estar habilitado para buscar las redes disponibles. ¿Desea habilitarlo?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "" #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "" #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "El modem esta conectado ahora. Por favor, desconéctelo para escanear." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "" #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "" #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "Habilitar modem" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "No hay mensajes sin leer" #: ../src/main.c:1768 msgid "Show window" msgstr "" #: ../src/main.c:1774 msgid "New SMS" msgstr "" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Error del dispositivo" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Operador" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "número para enviar SMS inválido\nSolo pueden usarse números de entre\n2 a 20 dígitos " #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "Texto de SMS inválido\nEscriba el texto a enviar" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Número incorrecto o dispositivo no disponible" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Eliminar mensaje" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "¿Desea eliminar el mensaje?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Error eliminando el SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Mensaje no encontrado" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Mensaje no seleccionado" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "" #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "" #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "" #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Desconocido" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "" #: ../src/strformat.c:248 msgid "Current" msgstr "" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "" #: ../src/strformat.c:284 msgid "Home network" msgstr "" #: ../src/strformat.c:286 msgid "Searching" msgstr "" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Aplicación" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protocolo" #: ../src/traffic-page.c:465 msgid "State" msgstr "Estado" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Buffer" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Puerto" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Destino" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Tráfico: %s, el limite es: %s\nTiempo: %s, el limite es: %s\nPor favor revise los parámetros introducidos y vuelva a intentarlo." #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Valores de tráfico y tiempo erróneos" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Tráfico: %s, el limite es: %s\nPor favor, revise los parámetros introducidos e inténtelo de nuevo" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Valor de tráfico limite inválido." #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Tiempo: %s, el limite es: %s Tiempo: %s, el limite es: %s Por favor revise los parámetros introducidos y vuelva a intentarlo." #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Valor de tiempo limite inválido." #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "kbps" #: ../src/traffic-page.c:969 msgid "sec" msgstr "segundos" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "velocidad RX" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "velocidad TX" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parametro" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Valor" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Datos recibidos" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Datos enviados" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Velocidad recibida" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Velocidad enviada" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Tiempo de sesión" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Tráfico restante" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Tiempo restante" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "" #: ../src/ussd-page.c:492 msgid "Command" msgstr "" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "" #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "" modem-manager-gui-0.0.17.1/po/pl_PL.po0000664000175000017500000010435512377603731015704 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # mucha090 , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Polish (Poland) (http://www.transifex.com/projects/p/modem-manager-gui/language/pl_PL/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pl_PL\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "Oznacz jako nieprzeczytaną" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "Oznacz jako nieprzeczytane" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Pojawił się błąd podczas włączania urządzenia" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "" #: ../src/devices-page.c:394 msgid "Selected" msgstr "" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Błąd podczas wysłania wiadomości" #: ../src/main.c:385 msgid "Operation timed out" msgstr "Operacja przekroczyła czas oczekiwania" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "Zbyt dużo czasu zajęło operacji na jej wykonanie. Prosze spróbować ponownie." #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Modem musi zostać włączony aby można było odczytać wiadomości SMS. Włączyć modem?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "Modem musi zostać włączony aby można było czytać i wysyłać wiadomości SMS.\nProsze włączyć modem." #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "Modem musi zostać zarejestrowany w sieci aby odbierać i wysyłać wiadomości SMS.\nProsze czekać..." #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "Modem musi zostać odblokowany aby odbierać i wysyłać wiadomości SMS.\nProsze podać kod PIN." #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "" #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Modem musi zostać włączony aby można było wysyłać kody USSD. Włączyć modem?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "Modem musi zostać włączony aby można było wysyłać kody USSD. \nProsze włączyć modem." #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "Modem musi zostać zarejestrowany w sieci aby wysyłać kody USSD.\nProsze czekać..." #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "Modem musi zostać odblokowany aby móc wysyłać kody USSD.\nProsze podać kod PIN." #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Modem musi zostać włączony aby wyszukać dostępne sieci. Włączyć modem?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "Modem musi zostać włączony aby wyszukać dostępne sieci. Prosze włączyć modem." #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "Modem musi zostać odblokowany aby można było wyszukać dostępne sieci.\nProsze podać kod PIN." #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Aktualnie modem jest podłączony. Prosze rozłączyć aby móc przeskanować." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "Modem musi zostać włączony aby aby dało się eksportować kontakty.\nProsze włączyć modem." #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "Modem musi zostać odblokowany aby aby dało się eksportować kontakty.\nProsze włączyć modem." #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "Włącz modem" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Brak nieprzeczytanych wiadomości" #: ../src/main.c:1768 msgid "Show window" msgstr "" #: ../src/main.c:1774 msgid "New SMS" msgstr "" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "Zamknij" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Opis" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Błąd urządzenia" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Błąd podczas wyszukiwania sieci" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "Numer SMS nie jest poprawny\nMogą zostać użyte jedynie\nnumery od 2 do 20 liczb bez liter i znaków " #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "Brak tekstu do wysłania\nProsze o wpisanie tekstu do wysłania" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Błędny numer albo urządzenie nie jest gotowe" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Usuń wiadomość" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Czy napewno chcesz usunąć wiadomość?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Wystąpił błąd podczas usuwania wiadomości SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Wiadomość nie znaleziona" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Nie wybrano wiadomości" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Nie można przeczytać tej wiadomości" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "" #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "" #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "" #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Nieznane" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "" #: ../src/strformat.c:248 msgid "Current" msgstr "" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "" #: ../src/strformat.c:284 msgid "Home network" msgstr "" #: ../src/strformat.c:286 msgid "Searching" msgstr "" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Aplikacja" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protokół" #: ../src/traffic-page.c:465 msgid "State" msgstr "Stan" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Bufor" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Port" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Do" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Pobrane dane: %s, limit ustawiony na: %s\nCzas: %s, limit ustawiony na: %s\nProsze o sprawdzenie wprowadzonych wartości i spróbuj ponownie" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Ustawiony limit czasu i prędkości pobranych danych jest niepoprawny" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Prędkość pobranych danych: %s, limit ustawiony na: %s\nProsze sprawdzić pobrane wartości i spróbuj ponownie" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Limit prędkości pobranych danych jest niepoprawny" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Czas: %s, limit ustawiony na: %s\nProsze sprawdzić wprowadzone dane i spróbować jeszcze raz" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Niepoprawny limit czasowy" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "" #: ../src/traffic-page.c:969 msgid "sec" msgstr "" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parametr" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Wartość" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Odebrane dane" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Wysłane dane" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Prędkość pobierania" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Prędkość wysyłania" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Tyle czasu upłyneło" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Pozostała ilość danych możliwych do pobrania" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Pozostało czasu" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Przykładowe polecenie" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Wystąpił błąd podczas wysyłania kodu USSD" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nTryb wpisywania kodów USSD aktywny. Czekam na wprowadzenie kodu...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Polecenie" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Lokalizacja" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Przeskanuj dostępne sieci komórkowe CTRL+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "Pokaż statystyki dziennego zużycia danych CTRL+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "Statystyki" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Dodaj nowy kontakt do książki adresowej modemu CTRL+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Usuń kontakt z książki adresowej modemu" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Usuń kontakt" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "Wyślij wiadomość SMS dla zaznaczonego kontaktu CTRL+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "Wyślij SMS" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "" #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Zamknij czy minimalizuj?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "Jaką akcje wybrać podczas zamykania okna programu?" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Poprostu wyjdź" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Zminimalizować do tacki systemowej lub do menu powiadomień" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Wybrane statystyki z okresu" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "Styczeń" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "Luty" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "Marzec" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "Kwiecień" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "Maj" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "Czerwiec" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "Lipiec" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "Sierpień" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "Wrzesień" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "Październik" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "Listopad" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "Grudzień" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "" modem-manager-gui-0.0.17.1/po/pt_BR.po0000664000175000017500000010530612377603722015701 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Rafael Ferreira , 2013 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/modem-manager-gui/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Erro ao habilitar o dispositivo" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Erro ao abrir dispositivo" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nVersão:%s Porta:%s Tipo:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Selecionada" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Dispositivo" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Erro ao enviar mensagem" #: ../src/main.c:385 msgid "Operation timed out" msgstr "" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "" #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Modem deve estar habilitado para ler SMS. Habilitar modem?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "" #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "" #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "" #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Modem deve estar habilitado para enviar USSD. Habilitar modem?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "" #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "" #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Modem deve estar habilitado para buscar redes disponíveis. Habilitar modem?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "" #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "" #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Modem está conectado agora. Por favor, desconecte para buscar." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "" #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "" #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "Habilitar modem" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s desconectado" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Nenhuma mensagem não lida" #: ../src/main.c:1768 msgid "Show window" msgstr "Mostrar janela" #: ../src/main.c:1774 msgid "New SMS" msgstr "Novo SMS" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Dispositivos" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Info" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Buscar" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Tráfego" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Preferências" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "Sobre" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Descrição" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Erro no dispositivo" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Disponibilidade: %s Tecn. accesso: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Erro ao buscar redes" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Operador" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "Recebidas %u novas mensagens SMS" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Recebidas novas mensagens SMS" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Remetente da mensagem:" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "Número de SMS inválido\nsomente números de 2 a 20 dígitos sem letras e símbolos podem ser usados" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "Texto de SMS inválido\nPor favor, escreva algum texto para enviar" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Número incorreto ou dispositivo não pronto" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Remover mensagem" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Realmente deseja remover a mensagem?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Erro ao remover SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Mensagem não encontrada" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Mensagem não selecionada" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Essa mensagem não pode ser lida" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Essa é a pasta para suas mensagens SMS recebidas.\nVocê pode responder uma mensagem selecionada usando o botão \"Responder\"." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Essa é a pasta para suas mensagens SMS enviadas." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "Essa é a pasta para seus rascunhos de mensagens SMS.\nSelecione uma mensagem e clique no botão \"Responder\" para começar a editar." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Recebidas\nMensagens recebidas" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Enviadas\nMensagens enviadas" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Rascunhos\nRascunhos de mensagens" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u s" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u s" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g kB" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g kB" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g MB" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g MB" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g GB" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g GB" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g TB" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g TB" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Desconhecido" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "" #: ../src/strformat.c:248 msgid "Current" msgstr "" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "" #: ../src/strformat.c:284 msgid "Home network" msgstr "" #: ../src/strformat.c:286 msgid "Searching" msgstr "" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Aplicativo" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protocolo" #: ../src/traffic-page.c:465 msgid "State" msgstr "Estado" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Buffer" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Porta" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Destino" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Limite de tráfego excedido" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Limite de tempo excedido" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Tráfego: %s, limite definido para: %s\nTempo: %s, limite definido para: %s\nPor favor, verifique os valores inseridos e tente novamente" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Valores incorretos de limites de tráfego e tempo " #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Tráfego: %s, limite definido para: %s\nPor favor, verifique os valores inseridos e tente novamente" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Valor incorreto de limite de tráfego" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Tempo: %s, limite definido para: %s\nPor favor, verifique os valores inseridos e tente novamente" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Valor incorreto de limite de tempo" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Desconectado" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Limite" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Desabilitado" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "kbps" #: ../src/traffic-page.c:969 msgid "sec" msgstr "s" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "Velocidade de RX" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "Velocidade de TX" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parâmetro" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Valor" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Dados recebidos" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Dados transmitidos" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Velocidade de recebimento" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Velocidade de transmissão" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Tempo da sessão" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Tráfego restante" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Tempo restante" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Limite de tráfego excedido... É hora de descansar \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Limite de tempo excedido... Vá dormir e tenha bons sonhos -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Comando exemplo" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "Requisição USSD inválida\nA requisição deve possuir 160 símbolos\niniciada com \"*\" e terminada com \"#\"" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Erro ao enviar USSD" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Requisição incorreta de USSD ou dispositivo não pronto" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "Sessão USSD terminada. Você pode enviar nova requisição" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Requisição incorreta de USSD" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nsessão USSD está ativa. Esperando por sua entrada...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Comando" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "Nenhum dispositivo encontrado no sistema" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Nova" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Remover" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Responder" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "Requisitar" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Enviar" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Modo" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Nível de sinal" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Começar busca" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Definir limite" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Conexões" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Velocidade de transmissão" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "Ferramenta para controle de funções específicas de modem EDGE/3G/4G" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Página web" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "Português (Brasil): Rafael Ferreira " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Conexões ativas" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Terminar aplicativo" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Adicionar" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Erro" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Nova mensagem SMS" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Número" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Concatenar mensagens" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Expandir pastas" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "Cor do gráfico da velocidade de RX" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Cor do gráfico da velocidade de TX" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Tráfego" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Progresso" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Execução de comando" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Questão" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Limites de tráfego" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Habilitar limite de tráfego" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Habilitar limite de tempo" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "MB" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "GB" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "TB" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Mensagem" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Ação" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Exibir mensagem" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Desconectar" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Tempo" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Minutos" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Horas" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Excluir" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "" modem-manager-gui-0.0.17.1/po/de.po0000664000175000017500000011646712377603724015277 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Mario Blättermann , 2013 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: German (http://www.transifex.com/projects/p/modem-manager-gui/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "Ungelesene SMS" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "Ungelesene Nachrichten" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "Fehler beim Hinzufügen des Kontakts" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "Kontakt entfernen" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "Möchten Sie diesen Kontakt wirklich entfernen?" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "Fehler beim Entfernen des Kontakts" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "Kontakt wurde nicht vom Gerät entfernt" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "Kein Kontakt ausgewählt" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "Modem-Kontakte" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "GNOME-Kontakte" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "KDE-Kontakte" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "Vorname" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "Erste Nummer" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "E-Mail" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "Gruppe" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "Zweiter Name" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "Zweite Nummer" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Fehler beim Aktivieren des Gerätes" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Fehler beim Öffnen des Geräts" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nVersion:%s Port:%s Typ:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Ausgewählt" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Gerät" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "Nicht unterstützt" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Fehler beim Senden der Nachricht" #: ../src/main.c:385 msgid "Operation timed out" msgstr "Zeitüberschreitung für den Vorgang" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "Der Vorgang benötigt zu viel Zeit zur Ausführung. Bitte starten Sie ihn neu." #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Das Modem muss aktiviert werden, um SMS lesen zu können. Modem aktivieren?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "Das Modem muss aktiviert werden, um SMS lesen und schreiben zu können. Bitte aktivieren Sie das Modem." #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "Das Modem muss im Mobilfunknetzwerk registriert sein, um SMS empfangen und senden zu können. Bitte warten …" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "Das Modem muss entsperrt werden, um SMS senden und empfangen zu können. Bitte PIN eingeben." #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "ModemManager unterstützt die Änderung von SMS-Funktionen nicht." #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "ModemManager unterstützt das Senden von SMS-Nachrichten nicht." #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Das Modem muss aktiviert werden, um USSD-Codes senden zu können. Modem aktivieren?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "Das Modem muss aktiviert werden, um USSD-Codes senden zu können. Bitte Modem aktivieren." #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "Das Modem muss im Mobilfunknetzwerk registriert sein, um USSD-Codes senden zu können. Bitte warten …" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "Das Modem muss entsperrt werden, um USSD-Codes senden zu können. Bitte PIN eingeben." #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "ModemManager unterstützt das Senden von USSD-Codes nicht." #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Das Modem muss aktiviert werden, um nach verfügbaren Mobilfunknetzwerken zu suchen. Modem aktivieren?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "Das Modem muss aktiviert werden, um nach verfügbaren Mobilfunknetzwerken zu suchen. Bitte aktivieren Sie das Modem." #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "Das Modem muss entsperrt werden, um nach verfügbaren Mobilfunknetzwerken zu suchen. Bitte geben Sie den PIN-Code ein." #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "ModemManager unterstützt die Suche nach verfügbaren Mobilfunknetzen nicht." #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Das Modem ist nun verbunden. Bitte trennen Sie es, um nach Modems zu suchen." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "Das Modem muss aktiviert werden, um Kontakte daraus zu exportieren. Modem jetzt aktivieren?" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "Das Modem muss aktiviert werden, um Kontakte daraus zu exportieren. Bitte aktivieren Sie das Modem." #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "Das Modem muss entsperrt werden, um Kontakte daraus zu exportieren. Bitte geben Sie den PIN-Code ein." #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "ModemManager unterstützt die Änderung von Modem-Kontakten nicht." #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "ModemManager unterstützt die Bearbeitung von Modem-Kontakten nicht." #: ../src/main.c:866 msgid "Enable modem" msgstr "Modem aktivieren" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "Fenster von Modem Manager GUI ist verborgen" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "Symbol im Benachrichtigungsfeld verwenden, um das Fenster wieder anzuzeigen" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "Verbindung zu %s getrennt" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "Ungelesene Nachrichten: %u" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Keine ungelesenen Nachrichten" #: ../src/main.c:1768 msgid "Show window" msgstr "Fenster anzeigen" #: ../src/main.c:1774 msgid "New SMS" msgstr "Neue SMS" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "Beenden" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Geräte" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Info" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Suchen" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Datenverkehr" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "Kontakte" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Einstellungen" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "Info" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "Fehler bei der Initialisierung" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "ModemManager ist nicht verfügbar" #: ../src/main.c:2694 msgid "Interface building error" msgstr "Fehler beim Erstellen der Benutzeroberfläche" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Beschreibung" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "Speicherzugriffsfehler bei Adresse: %p\n" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "Stack Trace:\n" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "Beim Start kein Fenster öffnen" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "- Werkzeug zur Steuerung spezifischer Funktionen von EDGE/3G/4G-Modems" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "Verarbeiten der Befehlszeilenoption fehlgeschlagen: %s\n" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Gerätefehler" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Verfügbarkeit: %s Zugriffstechnologie: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Fehler bei der Suche nach Netzwerken" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Netzanbieter" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "%u neue SMS-Nachrichten erhalten" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Neue SMS-Nachricht erhalten" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Absender:" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "SMS-Nummer ist ungültig\nEs können nur Nummern mit 2 bis 20 Stellen\nohne Buchstaben und Symbole verwendet werden" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "SMS-Text ist ungültig\nBitte geben Sie den zu sendenden Text ein" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Falsche Nummer oder Gerät nicht betriebsbereit" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Nachricht entfernen" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Nachricht wirklich entfernen?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Fehler beim Entfernen der SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Nachricht nicht gefunden" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Nachricht nicht ausgewählt" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Diese Nachricht kann nicht gelesen werden" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Dies ist der Ordner für Ihre eingehenden SMS-Nachrichten.\nSie können auf die ausgewählte Nachricht antworten, indem Sie auf »Antworten« klicken." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Dies ist der Ordner für Ihre gesendeten SMS-Nachrichten." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "Dies ist der Ordner für Ihre SMS-Nachrichtenentwürfe.\nWählen Sie die zu bearbeitende Nachricht aus und klicken Sie auf »Antworten«." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Eingang\nEingegangene Nachrichten" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Gesendet\nGesendete Nachrichten" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Entwürfe\nNachrichtenentwürfe" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f kbit/s" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f kbit/s" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbit/s" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbit/s" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbit/s" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbit/s" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u s" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u s" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g kbit" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g kbit" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g Mbit" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g Mbit" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g Gbit" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g Gbit" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g Tbit" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g Tbit" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Unbekannt" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "Verfügbar" #: ../src/strformat.c:248 msgid "Current" msgstr "Aktuell" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "Unzulässig" #: ../src/strformat.c:282 msgid "Not registered" msgstr "nicht angemeldet" #: ../src/strformat.c:284 msgid "Home network" msgstr "Heimnetzwerk" #: ../src/strformat.c:286 msgid "Searching" msgstr "Suchen" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "Registrierung abgelehnt" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "Unbekannter Status" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "Roaming-Netzwerk" #: ../src/traffic-page.c:276 msgid "Day" msgstr "Tag" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "Empfangene Daten" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "Übertragene Daten" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "Sitzungszeit" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Anwendung" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protokoll" #: ../src/traffic-page.c:465 msgid "State" msgstr "Status" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Puffer" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Port" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Ziel" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Volumenbegrenzung überschritten" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Zeitbegrenzung überschritten" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Volumen: %s, begrenzt auf: %s\nZeit: %s, begrenzt auf: %s\nBitte eingegebene Werte überprüfen und erneut versuchen" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Ungültige Werte für Volumen- und Zeitbegrenzung" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Volumen: %s, begrenzt auf: %s\nBitte eingegebene Werte überprüfen und erneut versuchen" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Ungültiger Wert für Volumenbegrenzung" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Zeit: %s, begrenzt auf: %s\nBitte eingegebene Werte überprüfen und erneut versuchen" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Ungültiger Wert für Zeitbegrenzung" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Getrennt" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Limit" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Deaktiviert" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "Kbit/s" #: ../src/traffic-page.c:969 msgid "sec" msgstr "Sek" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "RX-Geschwindigkeit" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "TX-Geschwindigkeit" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parameter" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Wert" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Empangene Daten" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Übertragene Daten" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Empangsgeschwindigkeit" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Übertragungsgeschwindigkeit" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Sitzungszeit" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Volumen verfügbar" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Restzeit" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Volumenbegrenzung ist erreicht… Zeit für etwas Ruhe \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Zeitbegrenzung ist erreicht… Gute Nacht und schöne Träume -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Beispielbefehl" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "USSD-Code ist ungültig\nAnfrage ist auf 160 Zeichen begrenzt\nbeginnt mit * und endet mit #" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Fehler beim Senden des USSD-Codes" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Fehlerhafter USSD-Code oder Gerät nicht betriebsbereit" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "USSD-Sitzung abgebrochen. Sie können einen neuen Code senden" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Ungültiger USSD-Code" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nUSSD-Sitzung ist aktiv. Auf Eingabe wird gewartet …\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Befehl" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "Verfügbare Geräte anzeigen und auswählen STRG+F1" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "SMS-Nachrichten senden und empfangen STRG+F2" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "USSD-Codes senden STRG+F3" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "Info zum aktiven Gerät anzeigen STRG+F4" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "Existierende Mobilfunknetze suchen STRG+F5" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "Netzwerkverkehr überwachen STRG+F6" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "System- und Modem-Adressbücher anzeigen STRG+F7" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "Keine Geräte im System gefunden" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "Neue SMS-Nachricht senden STRG+N" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Neu" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "Ausgewählte Nachricht entfernen STRG+D" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Entfernen" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "Ausgewählte Nachricht beantworten STRG+A" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Antworten" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "Anfordern" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Senden" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "USSD-Code senden STRG+S" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "USSD-Codeliste bearbeiten STRG+E" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "Ausrüstung" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Modus" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Signalstärke" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "Netzanbieter-Code" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "Registrierung" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "Netzwerk" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "GPS-Ortung\nLängengrad/Breitengrad" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Standort" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Verfügbare Mobilfunknetze suchen STRG+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Suche starten" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "Volumen- oder Zeitbegrenzung bis zur Trennung festlegen STRG+L" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Begrenzung setzen" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "Liste der aktiven Netzwerkverbindungen anzeigen STRG+C" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Verbindungen" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "Tägliche Übertragungsstatistiken anzeigen STRG+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "Statistiken" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Übertragungsgeschwindigkeit" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Neuen Kontakt zum Modem-Adressbuch hinzufügen STRG+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "Neuer Kontakt" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Kontakt aus dem Modem-Adressbuch entfernen STRG+D" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Kontakt entfernen" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "SMS-Nachricht an ausgewählten Kontakt senden STRG+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "SMS verschicken" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "Werkzeug zur Steuerung spezifischer Funktionen von EDGE/3G/4G-Modems" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Webseite" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "Deutsch: Mario Blättermann " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Aktive Verbindungen" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "Ausgewählte Anwendung mit dem SIGTERM-Signal beenden STRG+T" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Anwendung beenden" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Hinzufügen" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Fehler" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "Später nachfragen" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Beenden oder minimieren?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "Was soll beim Schließen des Anwendungsfensters geschehen?" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Nur beenden" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Ins Benachrichtigungsfeld oder Nachrichtenmenü minimieren" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Neue SMS-Nachricht" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Nummer" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "Ereignisklänge aktivieren" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "Fenster beim Start in Kontrollleiste einbetten" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "Fenstergeometrie und -platzierung speichern" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "Verhalten" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Nachrichten verketten" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Ordner aufklappen" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "Älteste Nachrichten zuerst" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "Graph-Farbe für RX-Geschwindigkeit" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Graph-Farbe für TX-Geschwindigkeit" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Datenverkehr" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Fortschritt" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Befehl wird ausgeführt" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Frage" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Volumenbegrenzungen" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Volumenbegrenzung aktivieren" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Zeitbegrenzung aktivieren" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "Mbit" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "Gbit" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "Tbit" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Nachricht" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Aktion" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Nachricht anzeigen" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Verbindung trennen" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Zeit" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Minuten" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Stunden" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "Übertragungsstatistiken" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Ausgewählter Zeitraum für Statistiken" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "Januar" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "Februar" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "März" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "April" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "Mai" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "Juni" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "Juli" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "August" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "September" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "Oktober" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "November" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "Dezember" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "Neuen USSD-Code hinzufügen STRG+N" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "Ausgewählten USSD-Code entfernen STRG+D" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Löschen" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "Kodierungsänderung der USSD-Antwort von GSM7 auf UCS2 erzwingen (nützlich für Huawei-Modems) STRG+E" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "Zeichenkodierung der Nachricht ändern" modem-manager-gui-0.0.17.1/po/uz@Latn.po0000664000175000017500000011643612377603734016261 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Umid Almasov , 2013-2014 # Umid Almasov , 2013 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-26 12:47+0000\n" "Last-Translator: Umid Almasov \n" "Language-Team: Uzbek (Latin) (http://www.transifex.com/projects/p/modem-manager-gui/language/uz@Latn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: uz@Latn\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "O'qilmagan SMS" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "O'qilmagan xabarlar" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "Aloqani qo'shish xatosi" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "Aloqani o'chirish" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "Rostdan aloqani o'chirishni istaysizmi?" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "Aloqani o'chirish xatosi" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "Aloqa uskunadan o'chirilmagan" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "Aloqa tanlanmagan" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "Modem aloqalari" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "GNOME aloqalari" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "KDE aloqalari" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "Ismi" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "Birinchi raqam" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "Elektron pochta" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "Guruh" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "Familiyasi" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "Ikkinchi raqam" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Uskunani yoqish xatosi" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Uskuna ochish xatosi" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nVersiya:%s Port:%s Turi:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Tanlangan" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Uskuna" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "Qo'llab-quvvatlanmaydi" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Xabar yuborish xatosi" #: ../src/main.c:385 msgid "Operation timed out" msgstr "Operatsiya vaqti o'tdi" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "Operatsiyani bajarilish uchun juda ko'p vaqt olindi. Iltimos, qayta ishga tushiring." #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "SMS o'qish uchun modemni yoqish kerak. Modem yoqilsinmi?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "SMS o'qish va yozish uchun modemni yoqish kerak. Iltimos, modemni yoqing." #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "SMS qabul qilish va yuborish uchun modem mobil tarmoqda ro'yxatdan o'tish kerak. Iltimos, kutib turing..." #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "SMS qabul qilish va yuborish uchun modem qulflanmagan bo'lish kerak. Iltimos, PIN kodni kiriting." #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "Modem boshqaruvchisi SMS boshqarish xususiyatlarini qo'llab-quvvatlanmaydi." #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "Modem boshqaruvchisi SMS yuborishni qo'llab-quvvatlanmaydi." #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "USSD yuborish uchun modemni yoqish kerak. Modem yoqilsinmi?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "USSD yuborish uchun modemni yoqish kerak. Iltimos, modemni yoqing." #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "USSD yuborish uchun modem mobil tarmoqda ro'yxatdan o'tish kerak. Iltimos, kutib turing..." #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "USSD yuborish uchun modem qulflanmagan bo'lish kerak. Iltimos, PIN kodni kiriting." #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "Modem boshqaruvchisi USSD so'rovlarni yuborishni qo'llab-quvvatlanmaydi." #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Mavjud bo'lgan tarmoqlarni izlash uchun modemni yoqish kerak. Modem yoqilsinmi?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "Mavjud tarmoqlarni izlash uchun modemni yoqish kerak. Iltimos, modemni yoqing." #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "Mavjud tarmoqlarni izlash uchun modem qulflanmagan bo'lish kerak. Iltimos, PIN kodni kiriting." #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "Modem boshqaruvchisi mavjud mobil tarmoqlarni tekshirishni qo'llab-quvvatlanmaydi." #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Modem hozir ulangan. Iltimos, tarmoqlarni izlash uchun uzib qo'ying." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "Aloqalarni eksport qilish uchun modemni yoqish kerak. Modem yoqilsinmi?" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "Aloqalarni eksport qilish uchun modemni yoqish kerak. Iltimos, modemni yoqing." #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "Aloqalarni eksport qilish uchun modem qulflanmagan bo'lish kerak. PIN kodni kiriting." #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "Modem boshqaruvchisi modem aloqalarini boshqarish xususiyatlarini qo'llab-quvvatlanmaydi." #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "Modem boshqaruvchisi modem aloqalarini tahrirlash xususiyatlarini qo'llab-quvvatlanmaydi." #: ../src/main.c:866 msgid "Enable modem" msgstr "Modemni yoqish" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "Modem Manager GUI oynasi yashirilgan" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "Oynani yana ko'rsatish uchun trey ikonachasi yoki xabar menyusidan foydalaning" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "%3.0f daqiqa" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "%3.1f soat" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "%2.0f kun" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "%2.0f hafta" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "%2.0f soniya" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "%u daqiqa, %u soniya" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s uzilgan" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "O'qilmagan xabarlar: %u" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "O'qilmagan xabarlar yo'q" #: ../src/main.c:1768 msgid "Show window" msgstr "Oynani ko'rsatish" #: ../src/main.c:1774 msgid "New SMS" msgstr "Yangi SMS" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "Chiqish" #: ../src/main.c:1884 msgid "Undefined" msgstr "Aniqlanmagan" #: ../src/main.c:2549 msgid "_Devices" msgstr "_Qurilmalar" #: ../src/main.c:2551 msgid "_SMS" msgstr "_SMS" #: ../src/main.c:2553 msgid "_USSD" msgstr "_USSD" #: ../src/main.c:2555 msgid "_Info" msgstr "_Ma'lumot" #: ../src/main.c:2557 msgid "S_can" msgstr "T_ekshirish" #: ../src/main.c:2559 msgid "_Traffic" msgstr "_Trafik" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "_Aloqalar" #: ../src/main.c:2565 msgid "_Quit" msgstr "_Chiqish" #: ../src/main.c:2571 msgid "_Actions" msgstr "_Harakatlar" #: ../src/main.c:2574 msgid "_Preferences" msgstr "S_ozlashlar" #: ../src/main.c:2577 msgid "_Edit" msgstr "Tah_rirlash" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "_Yordam" #: ../src/main.c:2582 msgid "_About" msgstr "_Dastur haqida" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Uskunalar" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Ma'lumot" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Tarmoqlar" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Trafik" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "Aloqalar" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Moslamalar" #: ../src/main.c:2613 msgid "Help" msgstr "Yordam" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "Haqida" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "Initsializatsiya xatosi" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "Modem boshqaruvchisi mavjud emas" #: ../src/main.c:2694 msgid "Interface building error" msgstr "Interfeys tuzish xatosi" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "Modem boshqarish modullari:\n" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "Modul" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Tavsifi" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "Segmentatsiya xatosining manzili: %p\n" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "Stekni kuzatish:\n" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "Ishga tushirilganda oyna ko'rsatilmasin" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "- EDGE/3G/4G modemning maxsus vazifalarini boshqarish vositasi" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "Buyruq satri parametrini tahlil qilish muvaffaqiyatsiz tugadi: %s\n" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "Tarmoq tekshirish xatosi" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Uskuna xatosi" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Mavjudligi: %s Standart: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Tarmoqlarni izlash xatosi" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Operator" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "%u yangi SMS xabarlar olindi" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Yangi SMS xabar olindi" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Xabar yuboruvchilari: " #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "SMS raqami noto'g'ri\nFaqat 2 dan 20 gacha raqamlardan foydalanish\nmumkin, harflar va belgilardan foydalanish mumkin emas" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "SMS matni noto'g'ri\nIltimos, yuborish uchun matn kiriting" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Raqam noto'g'ri yoki uskuna tayyor emas" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Xabarni o'chirish" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Rostdan xabarni o'chirishni istaysizmi?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "SMS o'chirish xatosi" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Xabar topilmadi" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Xabar tanlanmagan" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Xabarni o'qib bo'lmadi" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Ushbu jild kiruvchi SMS xabarlari uchun.\n'Javob berish' tugmasini bosib tanlangan xabarga javob berish mumkin." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Ushbu jild yuborilgan SMS xabarlari uchun." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "Ushbu jild qoralama SMS xabarlar uchun.\nO'zgartirish uchun xabarni tanlang va 'Javob berish' tugmasini bosing." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Kiruvchi\nKiruvchi xabarlar" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Yuborilgan\nYuborilgan xabarlar" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Qoralamalar\nQoralama xabarlar" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f kb/s" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f kb/s" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mb/s" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mb/s" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gb/s" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gb/s" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u soniya" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u soniya" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "%" #: ../src/strformat.c:107 msgid "%" msgstr "%" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "Bugun, %T" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Noma'lum" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "Kecha, %T" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "%d %B %Y, %T" #: ../src/strformat.c:246 msgid "Available" msgstr "Mavjud" #: ../src/strformat.c:248 msgid "Current" msgstr "Joriy" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "Taqiqlangan" #: ../src/strformat.c:282 msgid "Not registered" msgstr "Ro'yxatdan o'tmagan" #: ../src/strformat.c:284 msgid "Home network" msgstr "Uy tarmog'i" #: ../src/strformat.c:286 msgid "Searching" msgstr "Qidirilmoqda" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "Ro'yxatdan o'tish rad etilgan" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "Noma'lum holat" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "Rouming tarmog'i" #: ../src/traffic-page.c:276 msgid "Day" msgstr "Kun" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "Qabul qilingan ma'lumot" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "Jo'natilgan ma'lumot" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "Sessiya vaqti" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Dastur" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protokol" #: ../src/traffic-page.c:465 msgid "State" msgstr "Holat" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Bufer" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Port" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Mo'ljal" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Trafik limitidan oshirib yuborildi" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Vaqt limitidan oshirib yuborildi" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Trafik: %s, limit qo'yilgan: %s\nVaqt: %s, limit qo'yilgan: %s\nKiritilgan qiymatlarni tekshiring va qayta urinib ko'ring" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Trafik va vaqt limitlarining qiymatlari no'to'g'ri" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Trafik: %s, limit qo'yilgan: %s\nKiritilgan qiymatlarni tekshiring va qayta o'rinib ko'ring" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Trafik limitining qiymati noto'g'ri" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Vaqt: %s, limit qo'yilgan: %s\nKiritilgan qiymatlarni tekshiring va qayta o'rinib ko'ring" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Vaqt limitilimiti qiymati noto'g'ri" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Uzilgan" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Limit" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "O'chirilgan" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "kb/s" #: ../src/traffic-page.c:969 msgid "sec" msgstr "soniya" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "Qabul qilish tezligi" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "Jo'natish tezligi" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parametr" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Qiymati" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Qabul qilingan" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Jo'natilgan" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Qabul qilish tezligi" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Jo'natish tezligi" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Sessiya vaqti" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Qolgan trafik" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Qolgan vaqt" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Trafik limiti oshirib yuborildi... Dam olish vaqti keldi \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Vaqt limiti oshirib yuborildi... Uxlang va yaxshi tushlar ko'ring -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Buyruq namunasi" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "USSD so'rovi noto'g'ri\nSo'rov 160 belgilardan oshmasligi,\n'*' bilan boshlanishi va '#' bilan tugashi lozim" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "USSD yuborish xatosi" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "USSD so'rovi noto'g'ri yoki uskuna tayyor emas" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "USSD sessiyasi tugatildi. Yangi so'rov yuborishingiz mumkin" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "USSD so'rovi noto'g'ri" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nUSSD sessiyasi faol. Ma'lumot kiritishingizni kutmoqda...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Buyruq" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "Yangi ulanishni qo'shish" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "Boshlash" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "Modem Manager GUI'ga xush kelibsiz" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "Modem manager" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "Ulanish boshqaruvchisi" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "Mavjud uskunalarni ko'rish va tanlash CTRL+F1" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "SMS xabarlarni yuborish va qabul qilish CTRL+F2" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "USSD so'rovlarni yuborish CTRL+F3" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "Faol uskuna ma'lumotini ko'rish CTRL+F4" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "Mavjud mobil tarmoqlarni izlash CTRL+F5" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "Tarmoq trafigini kuzatish CTRL+F6" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "Tizimning va modemning manzillar kitobini ko'rish CTRL+F7" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "Tizimda uskunalar topilmadi" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "Ulanish" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "Tahrirlash" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "Faollashtirish" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "Yangi SMS xabar yuborish CTRL+N" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Yangi" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "Tanlangan xabarni o'chirish CTRL+D" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "O'chirish" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "Tanlangan xabarga javob berish CTRL+A" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Javob berish" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "So'rov" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Yuborish" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "USSD so'rov yuborish CTRL+S" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "USSD buyruqlar ro'yxatini tahrirlash CTRL+E" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "Jihoz" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Usul" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Signal darajasi" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "Operator kodi" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "Ro'yxatdan o'tish" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "Tarmoq" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "3GPP joylashuvi\nMCC/MNC/LAC/RNC/CID" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "GPS joylashishi\nUzunlik/Kenglik" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Joylashish" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Mavjud mobil tarmoqlarni izlash CTRL+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Tarmoqlarni izlash" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "Ulanishni yaratish" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "Uzish uchun trafik qiymatini yoki vaqt limitini qo'yish CTRL+L" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Limit qo'yish" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "Faol tarmoq ulanishlar ro'yxatini ko'rish CTRL+C" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Ulanishlar" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "Kunlik trafik statistikani ko'rish CTRL+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "Statistika" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Jo'natish tezligi" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Modemning manzillar kitobiga yangi aloqani qo'shish CTRL+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "Yangi aloqa" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Manzillar kitobidan aloqani o'chirish CTRL+D" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Aloqani o'chirish" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "Tanlangan aloqaga SMS xabar yuborish CTRL+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "SMS yuborish" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "Mualliflik huquqlari 2012-2014 Alex" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "EDGE/3G/4G modemning maxsus vazifalarini boshqarish vositasi" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Uy sahifasi" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "O'zbekcha: Umid Almasov " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Faol ulanishlar" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "SIGTERM signalidan foydalanib tanlangan dasturni yopish CTRL+T" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Dasturni yopish" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Qo'shish" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Xato" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "Mendan qayta so'ralsin" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Chiqilsinmi yoki kichraytirilsinmi?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "Oyna yopilganda dastur nima qilishini istaysiz?" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Faqat chiqish" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Trey yoki xabarlar menyusiga kichraytirish" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Yangi SMS xabar" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Raqam" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "Voqealar uchun ovozlardan foydalanish" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "Oyna yopilganda uni treyga yashirish" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "Oyna o'lchamlarini va joylashuvini saqlash" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "Xulqi" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Xabarlarni birlashtirish" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Jildlarni ochish" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "Eski xabarlarni yuqoriga qo'yish" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "Qabul qilish tezligi grafigining rangi" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Jo'natish tezligi grafigining rangi" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Trafik" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Bajarilishi" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Buyruq bajarilmoqda" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Savol" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Trafik limiti" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Trafik limitini qo'yish" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Vaqt limitini qo'yish" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "Mb" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "Gb" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "Tb" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Xabar" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Harakat" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Xabar ko'rsatish" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Aloqani uzish" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Vaqt" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Daqiqa" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Soat" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "Trafik statistikasi" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Tanlangan statistika davri" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "Yanvar" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "Fevral" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "Mart" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "Aprel" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "May" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "Iyun" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "Iyul" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "Avgust" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "Sentyabr" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "Oktyabr" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "Noyabr" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "Dekabr" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "Yangi USSD buyrug'ini qo'shish CTRL+N" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "Tanlangan USSD buyrug'ini o'chirish CTRL+D" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "O'chirish" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "USSD javobining kodlash usulini GSM7 dan UCS2 ga o'zgartirish (Huawei modemlari uchun) CTRL+E" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "Xabarning kodlash usulini o'zgartirish" modem-manager-gui-0.0.17.1/po/tr.po0000664000175000017500000011057112377603725015323 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Ahmet Sezgin Duran , 2013 # Alex , 2013 # İbrahim Ethem Göl , 2013 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Turkish (http://www.transifex.com/projects/p/modem-manager-gui/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: tr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "Okunmamış SMS" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "Okunmamış mesajlar" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "Kişi eklemede hata" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "Kişiyi kaldır" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "Kişiyi gerçekten kaldırmak istiyormusunuz ?" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "Kişi kaldırmada hata" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "Kişi cihazdan silinemedi" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "Kişi seçilmedi" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "Modem kişileri" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "GNOME kişileri" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "KDE kişileri" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "E Posta" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Aygıtı etkinleştirilemiyor" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Aygıt açılamıyor" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nSürüm:%s Port:%s Tip:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Seçili" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Aygıt" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "İleti gönderme hatası" #: ../src/main.c:385 msgid "Operation timed out" msgstr "" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "" #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "SMS okumak için modem etkinleştirilmelidir. Modem etkinleştirilsin mi?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "" #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "" #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "Modem Manager SMS işleme fonksiyonlarını desteklememektedir." #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "USSD göndermek için modem etkinleştirilmelidir. Modem etkinleştirilsin mi?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "" #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "" #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Mevcut bağlantıları taramak için modem etkinleştirilmelidir. Modem etkinleştirilsin mi?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "" #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "" #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Modem şuanda bağlı. Taramak için lütfen bağlantıyı kesin." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "" #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "" #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "Modemi etkinleştir" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "Modem Manager GUI penceresi gizlendi" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s bağlantıyı kesti" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "Okunmamış mesajlar: %u" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Okunmamış mesaj yok" #: ../src/main.c:1768 msgid "Show window" msgstr "Pencereyi göster" #: ../src/main.c:1774 msgid "New SMS" msgstr "Yeni SMS" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "Çık" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Aygıtlar" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Bilgi" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Tara" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Kota" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "Kişiler" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Tercihler" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "Hakkında" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "Arayüz oluşturma hatası" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Açıklama" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "Başlangıçta pencereyi gösterme" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "EDGE/3G/4G modemler için özgül fonksiyon kontrol aracıdır" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Aygıt hatası" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s Kimlik: %u Kullanılabilirlik: %s Erişim Yöntemi: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Ağ taraması hatası" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Operatör" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "%u yeni SMS iletisi alındı" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Yeni SMS iletisi alındı" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "İleti gönderenler:" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "SMS numarası geçerli değil\nHarf veya simgeler olmadan, sadece 2'den 20 basamağa kadar olan sayılar kullanılabilir" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "SMS metni geçersiz\\n Lütfen göndermek için bir metin girin" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Geçersiz numara veya aygıt hazır değil" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "İletiyi sil" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Gerçekten ileti silinsin mi?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "SMS silme hatası" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "İleti bulunamadı" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "İleti seçilmedi" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Bu mesaj okunamaz" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Bu klasör gelen SMS iletileri içindir.\n'Cevapla' düğmesini kullanarak seçili iletiyi cevaplayabilirsiniz ." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Bu klasör gönderilmiş SMS iletileriniz içindir." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "Bu klasör SMS taslaklarınız içndir.\nDüzenlemek için iletiyi seçin ve 'Cevapla' düğmesine tıklayın." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Gelen\nGelen iletiler" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Gönderilen\nGönderilen iletiler" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Taslaklar\nİleti taslakları" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u sn" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u sn" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Bilinmeyen" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "Mevcut" #: ../src/strformat.c:248 msgid "Current" msgstr "Şimdiki" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "Kayıtlı değil" #: ../src/strformat.c:284 msgid "Home network" msgstr "Ev şebekesi" #: ../src/strformat.c:286 msgid "Searching" msgstr "Aranıyor" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "Kayıt reddedildi" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "Bilinmeyen durum" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "Gün" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "Alınan veri" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "İletilen veri" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "Oturum süresi" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Uygulama" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protokol" #: ../src/traffic-page.c:465 msgid "State" msgstr "Durum" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Tampon" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Port" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Hedef" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Kota aşıldı" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Süre sınırı aşıldı" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Kota: %s, sınır ayarı: %s\nSüre: %s, sınır ayarı: %s\nLütfen girilen değerleri kontrol edin ve bir kez daha deneyin" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Geçersiz kota ve süre sınırı değerleri" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Kota: %s, sınır ayarı: %s\nLütfen girilen değerleri kontrol edin ve bir kere daha deneyin" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Geçersiz kota sınırı değeri" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Süre: %s, sınır ayarı: %s\nLütfen girilen değerleri kontrol edin ve bir kez daha deneyin" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Geçersiz süre sınırı değeri" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Bağlantı kesildi" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Sınır" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Devre Dışı" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "kbps" #: ../src/traffic-page.c:969 msgid "sec" msgstr "sn" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "İndirme hızı" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "Gönderme hızı" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parametre" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Değer" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Alınan veri" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Gönderilen veri" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "İndirme hızı" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Gönderim hızı" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Oturum süresi" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Kalan kota" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Kalan süre" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Kota aşıldı... Ara verme zamanı \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Süre sınırı aşıldı... İyi uykular ve tatlı rüyalar -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Örnek komut" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "USSD isteği geçerli değil\nİstek 160 simge büyüklüğünde olmalı ve\n'*' ile başlayıp '#' ile bitmelidir" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "USSD gönderme hatası" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Geçersiz USSD isteği veya aygıt hazır değil" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "USSD oturumu sonlandırıldı. Yeni istek gönderebilirsiniz." #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Geçersiz USSD isteği" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nUSSD oturumu etkin. Girdi için bekleniyor...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Komut" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "Mevcut cihazları gör ve seç CTRL+F1" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "SMS gönder ve al CTRL+F2" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "USSD istekleri gönder CTRL+F3" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "Mevcut mobil ağları tara CTRL+F5" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "Ağ trafiğini görüntüle CTRL+F6" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "Sistemde hiçbir aygıt bulunamadı" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "Yeni SMS gönder CTRL+N" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Yeni" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "Seçili mesajı kaldır CTRL+D" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Kaldır" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "Seçili mesajı yanıtla CTRL+A" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Cevapla" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "İstek" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Gönder" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "Ussd isteği gönder CTRL+S" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "USSD komut listesini düzenle CTRL+E" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Mod" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Sinyal seviyesi" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "Operatör kodu" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "Kayıt" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "Şebeke" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "GPS konumu\nBoylam/Enlem" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Konum" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Mevcut mobil şebekeleri tara CTRL+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Taramayı başlat" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Sınır koy" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Bağlantılar" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "Günlük trafik istatistiklerini görüntüle CTRL+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "İstatistikler" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Aktarım hızı" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Modem adres defterine yeni kişi ekle CTRL+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "Yeni kişi" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Kişiyi modem adres defterinden kaldır CTRL+D" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Kişiyi kaldır" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "Seçili kişiye SMS gönder CTRL+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "SMS gönder" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "EDGE/3G/4G modemler için özel işlev kontrol aracı" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Anasayfa" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "Türkçe: Ahmet Sezgin Duran - İbrahim Ethem Göl " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Etkin bağlantılar" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Uygulamayı sonlandır" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Ekle" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Hata" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Çık veya küçült ?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Sadece çık" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Sistem tepsisine veya mesajlaşma menüsüne küçült" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Yeni SMS iletisi" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Numara" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "Olaylar için sesler kullan" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "Çıkışta pencereyi sistem tepsisine gizle" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "Pencere şeklini ve yerleşmini kaydet" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "İletileri sırala" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Dizinleri genişlet" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "Eski iletileri üste koy" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "İndirme Hızı grafik rengi" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Gönderme Hızı grafik rengi" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Kota" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "İşlem" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Komut çalıştırılıyor" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Soru" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Kota" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Kotayı etkinleştir" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Süre sınırını etkinleştir" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "Mb" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "Gb" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "Tb" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "İleti" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Eylem" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "İleti göster" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Bağlantıyı kes" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Süre" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Dakika" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Saat" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "Trafik istatistikleri" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Seçilen istatistik dönemi" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "Ocak" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "Şubat" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "Mart" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "Nisan" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "Mayıs" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "Haziran" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "Temmuz" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "Ağustos" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "Eylül" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "Ekim" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "Kasım" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "Kasım" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "Yeni USSD komutu ekle CTRL+N" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "Seçili USSD komutunu kaldır CTRL+D" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Sil" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "Mesaj kodlamasını değiştir" modem-manager-gui-0.0.17.1/po/id.po0000664000175000017500000011454612377603732015276 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Ade Malsasa Akbar , 2013 # Arif Budiman , 2014 # etc session, 2013 # Ade Malsasa Akbar , 2013 # master , 2013 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Indonesian (http://www.transifex.com/projects/p/modem-manager-gui/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: id\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "SMS belum dibaca" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "Pesan belum dibaca" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "Galat menambahkan kontak" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "Hapus kontak" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "Sungguh ingin menghapus kontak?" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "Galat menghapus kontak" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "Kontak tidak dihapus dari perangkat" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "Kontak tidak dipilih" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "Kontak modem" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "Kontak GNOME" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "Kontak KDE" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "Nama depan" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "Nomor depan" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "E-mail" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "Grup" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "Nama tengah" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "Nomor akhir" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Galat mengaktifkan perangkat" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Gagal membuka perangkat" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nVersi:%s Port:%s Tipe:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Dipilih" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Perangkat" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "Tidak didukung" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Galat mengirim pesan" #: ../src/main.c:385 msgid "Operation timed out" msgstr "Operasi kehabisan waktu" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "Operasi terlalu lama untuk dieksekusi. Silakan jalankan ulang." #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Modem harus diaktifkan untuk membaca SMS. Aktifkan modem?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "Modem harus diaktifkan untuk membaca dan menulis SMS. Silakan aktifkan modem." #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "Modem harus didaftarkan pada jaringan mobile untuk menerima dan mengirim SMS. Mohon tunggu..." #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "Modem harus tidak terkunci untuk menerima dan mengirim SMS. Silakan masukkan kode PIN." #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "Modem manager tidak mendukung fungsi manipulasi SMS." #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "Modem manager tidak mendukung pengiriman SMS." #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Modem harus diaktifkan untuk mengirim USSD. Aktifkan modem?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "Modem harus diaktifkan untuk mengirim USSD. Silakan aktifkan modem." #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "Modem harus didaftarkan pada jaringan mobile untuk mengirim USSD. Modon tunggu..." #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "Modem harus tidak terkunci untuk mengirim USSD. Silakan masukkan kode PIN." #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "Modem manager tidak mendukung pengiriman permintaan USSD. " #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Modem harus diaktifkan untuk memindai pada jaringan yang tersedia. Aktifkan modem?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "Modem harus diaktifkan untuk memindai pada jaringan yang tersedia. Silakan aktifkan modem." #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "Modem harus tidak terkunci untuk memindai jaringan yang tersedia. Silakan masukkan kode PIN." #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "Modem manager tidak mendukung pemindaian jaringan mobile yang tersedia." #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Modem sedang terhubung sekarang. Silakan putuskan untuk memindai." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "Modem harus diaktifkan untuk mengekspor kontak darinya. Aktifkan?" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "Modem harus diaktifkan untuk mengekspor kontak darinya. Silakan aktifkan modem." #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "Modem harus tidak terkunci untuk mengekspor kontak darinya. Silakan masukkan kode PIN." #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "Modem manager tidak mendukung fungsi manipulasi kontak modem. " #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "Modem manager tidak mendukung fungsi edit kontak modem." #: ../src/main.c:866 msgid "Enable modem" msgstr "Aktifkan modem" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "Jendela Modem Manager GUI tersembunyi" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "Gunakan tray icon atau menu pesan untuk menampilkan jendela kembali" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s terputus" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "Pesan baru: %u" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Tak ada pesan yang dapat dibaca" #: ../src/main.c:1768 msgid "Show window" msgstr "Tampilkan jendela" #: ../src/main.c:1774 msgid "New SMS" msgstr "SMS baru" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "Keluar" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Perangkat" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Informasi" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Pindai" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Lalu lintas jaringan" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "Kontak" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Preferensi" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "Tentang" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "Galat ketika inisialisasi" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "Tidak ada modem yang tersedia" #: ../src/main.c:2694 msgid "Interface building error" msgstr "Galat membangun antarmuka" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Penjelasan" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "Segmentation fault pada alamat: %p\n" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "Stack trace:\n" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "Jangan tampilkan jendela ketika memulai" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "- perangkat lunak untuk mengatur fungsi khusus pada modem EDGE/3G/4G" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "Penjelasan kegagalan opsi baris perintah: %s\n" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Perangkat galat" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Tersedia: %s Akses teknologi: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Galat memindai jaringan" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Operator" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "Diterima %u pesan SMS baru" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Pesan SMS baru telah diterima" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Pengirim:" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "Nomor SMS tidak sah\nHanya nomor dari 2 hingga 20 digit tanpa\nhuruf dan simbol yang bisa dipakai" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "Teks SMS tidak sah\nTulis teks untuk dapat mengirim" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Salah nomor atau perangkat tidak siap" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Hapus pesan" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Yakin ingin menghapus pesan?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Galat menghapus SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Pesan tidak ditemukan" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Pesan tidak dipilih" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Pesan ini tidak dapat dibaca" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Folder ini untuk pesan yang Anda terima.\nAnda dapat menjawab pesan terpilih menggunakan tombol 'Jawab'." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Folder ini untuk pesan terkirim Anda." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "Folder ini untuk draf pesan singkat Anda.\nPilih pesan dan klik tombol 'Jawab' untuk mulai mengubahnya." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Masuk\nPesan masuk" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Kirim\nMengirim pesan" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Draf\nDraf pesan" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u detik" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u detik" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Tidak diketahui" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "Tersedia" #: ../src/strformat.c:248 msgid "Current" msgstr "Saat ini" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "Dilarang" #: ../src/strformat.c:282 msgid "Not registered" msgstr "Belum terdaftar" #: ../src/strformat.c:284 msgid "Home network" msgstr "Jaringan rumah" #: ../src/strformat.c:286 msgid "Searching" msgstr "Mencari" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "Registrasi ditolak" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "Status tidak diketahui" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "Jaringan roaming" #: ../src/traffic-page.c:276 msgid "Day" msgstr "Hari" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "Data diterima" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "Data terkirim" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "Durasi sesi" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Aplikasi" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protokol" #: ../src/traffic-page.c:465 msgid "State" msgstr "Status" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Buffer" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Port" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Tujuan" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Melebihi batas lalu lintas jaringan" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Melebihi batas waktu" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Jaringan: %s, batas diatur ke: %s\nWaktu: %s, batas diatur ke: %s\nSilakan periksa nilai yang dimasukkan dan cobalah sekali lagi" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Nilai lalu lintas jaringan dan batasan waktu salah" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Traffic: %s, Ubah batasan pada: %s\nSilakan periksa nilai yang dimasukkan dan cobalah sekali lagi" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Salah penetapan batas traffic jaringan" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Waktu: %s, batas diatur ke: %s\nSilakan periksa nilai yang dimasukkan dan cobalah sekali lagi" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Batas nilai waktu salah" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Terputus" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Batasan" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Nonaktif" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "kbps" #: ../src/traffic-page.c:969 msgid "sec" msgstr "detik" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "Kecepatan RX" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "Kecepatan TX" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parameter" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Nilai" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Data diterima" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Data ditransfer" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Kecepatan menerima" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Kecepatan mengirim" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Waktu sesi" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Sisa traffic" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Sisa waktu" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Batas lalu lintas jaringan terlampaui... Saatnya beristirahat" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Batas waktu telah terlampaui... Tidurlah dan mimpi indah" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Contoh perintah" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "Permintaan USSD tidak sah\nPermintaan harus terdiri dari 160 simbol\ndimulai dengan '*' dan diakhiri dengan '#'" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Galat mengirim USSD" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Permintaan USSD salah atau perangkat belum siap" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "Sesi USSD dihentikan. Anda dapat mengirim permintaan baru" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Permintaan USSD salah" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nSessi USSD telah aktif. Tunggulah untuk data masukan anda...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Perintah" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "Menampilkan dan memilih perangkat yang tersedia CTRL+F1" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "Kirim dan terima pesan SMS CTRL+F2" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "Kirim permintaan USSD CTRL+F3" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "Menampilkan informasi perangkat aktif CTRL+F4" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "Memindai jaringan mobile yang ada CTRL+F5" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "Monitor lalu lintas jaringan CTRL+F6" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "Tampilkan buku alamat sistem dan modem CTRL+F7" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "Tidak ada perangkat yang ditemukan pada sistem" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "Kirim pesan SMS baru CTRL+N" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Baru" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "Hapus pesan terpilih CTRL+D" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Hapus" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "Balas pesan terpilih CTRL+A" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Jawab" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "Meminta" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Kirim" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "Kirim permintaan USSD CTRL+S" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "Sunting daftar perintah USSD CTRL+E" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "Perlengkapan" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Mode" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Tingkat sinyal" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "Kode operator" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "Registrasi" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "Jaringan" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "Lokasi GPS\nLongitude/Latiude" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Lokasi" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Memindai jaringan mobile yang tersedia CTRL+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Mulai memindai" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "Atur batasan jumlah trafik atau waktu untuk memutuskan CTRL+L" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Atur batasan" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "Tampilkan daftar koneksi jaringan yang aktif CTRL+C" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Koneksi" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "Tampilkan statistik trafik harian CTRL+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "Statistik" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Kecepatan transmisi" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Tambah kontak baru di buku alamat modem CTRL+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "Kontak baru" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Hapus kontak dari buku alamat modem CTRL+D" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Hapus kontak" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "Kirim pesan SMS kepada kontak terpilih CTRL+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "Kirim SMS" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "Alat untuk mengendalikan fungsi khusus pada modem EDGE/3G/4G" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Situs Resmi" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "English: Alex " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Koneksi aktif" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "Hentikan aplikasi yang dipilih menggunakan SIGTERM signal CTRL+T" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Hentikan aplikasi" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Tambah" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Galat" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "Tanyakan nanti" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Keluar atau minimize?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "Anda menutup jendela, apa yang Anda ingin aplikasi lakukan?" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Keluar saja" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Minimize ke menu tray atau perpesanan" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Pesan SMS baru" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Nomor" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "Gunakan suara untuk kejadian" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "Sembunyikan jendela ke tray saat menutup" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "Simpan ukuran dan posisi jendela" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "Kelakuan" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Menyatukan pesan" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Memperluas folder" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "Letakkan pesan lama di atas" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "Warna grafik kecepatan RX" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Warna grafik kecepatan TX" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Trafik" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Sedang proses" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Sedang mengeksekusi perintah" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Pertanyaan" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Batas lalu lintas jaringan" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Aktifkan batasan lalu lintas jaringan" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Aktifkan batasan waktu" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "Mb" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "Gb" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "Tb" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Pesan" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Tindakan" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Tampilkan Pesan" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Putuskan" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Waktu" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Menit" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Jam" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "Statistik lalu lintas jaringan" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Periode statistik terpilih" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "Januari" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "Februari" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "Maret" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "April" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "Mei" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "Juni" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "Juli" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "Agustus" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "Septembar" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "Oktober" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "November" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "Desember" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "Tambah perintah USSD baru CTRL+N" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "Hapus perintah USSD terpilih CTRL+D" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Hapus" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "Paksa balasan USSD mengubah enkoding dari GSM7 ke UCS2 (berguna untuk modem Huawei) CTRL+E" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "Ubah enkoding pesan" modem-manager-gui-0.0.17.1/po/Makefile0000644000175000017500000000145312400622021015743 0ustar alexalexinclude ../Makefile_h PACKAGE = modem-manager-gui MSGFMT = msgfmt FILES_PO:=$(wildcard *.po) FILES_MO:=$(wildcard *.mo) LOCALEDIR = $(PREFIX)/share/locale MSGFMT_OPT = -f -v -o all: for f in $(FILES_PO); do $(MSGFMT) $$f $(MSGFMT_OPT) `basename $$f .po`.mo; done install: for f in $(FILES_MO); do install -d $(INSTALLPREFIX)$(DESTDIR)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES; \ cp $$f $(INSTALLPREFIX)$(DESTDIR)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo; done uninstall: for f in $(FILES_MO); do \ rm -f $(INSTALLPREFIX)$(DESTDIR)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo; done messages: xgettext -k_ -kN_ ../src/*.c -o modem-manager-gui.pot xgettext -j -L Glade ../resources/*.ui -o modem-manager-gui.pot clean: for f in $(FILES_MO); do \ rm -f $$f; done modem-manager-gui-0.0.17.1/po/it.po0000664000175000017500000010351512377603726015313 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Matteo Seclì , 2013-2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Italian (http://www.transifex.com/projects/p/modem-manager-gui/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Errore durante l'attivazione del dispositivo" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Errore durante l'apertura del dispositivo" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nVersione:%s Porta:%s Tipo:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Selezionato" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Dispositivo" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Errore durante l'invio del messaggio" #: ../src/main.c:385 msgid "Operation timed out" msgstr "" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "" #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Il modem deve essere attivato per leggere gli SMS. Attivare il modem?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "" #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "" #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "" #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Il modem deve essere attivato per inviare richieste USSD. Attivare il modem?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "" #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "" #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Il modem deve essere attivato per cercare le reti disponibili. Attivare il modem?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "" #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "" #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Il modem è attualmente connesso. Si prega di disconnetterlo per effettuare la scansione." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "" #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "" #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "Attiva il modem" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s disconnesso" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Non ci sono messaggi non letti" #: ../src/main.c:1768 msgid "Show window" msgstr "" #: ../src/main.c:1774 msgid "New SMS" msgstr "" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Descrizione" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Errore del dispositivo" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Disponibilità: %s Tecnologia di accesso: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Errore durante la scansione delle reti" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Operatore" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "Recevuti %u nuovi messaggi SMS" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Ricevuto un nuovo messaggio SMS" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "Destinatario dell'SMS non valido\nPossono essere usati solo numeri da 2 a\n20 cifre senza lettere e simboli" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "Testo dell'SMS non valido\nSi prega di scrivere del testo da inviare" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Numero errato o dispositivo non pronto" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Elimina il messaggio" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Vuoi davvero eliminare il messaggio?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Errore durante l'eliminazione dell'SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Messaggio non trovato" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Messaggio non selezionato" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Questo messaggio non può essere letto" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Questa è la cartella dei tuoi messaggi SMS in arrivo.\nPuoi rispondere al messaggio selezionato usando il pulsante 'Rispondi'." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Questa è la cartella dei tuoi messaggi inviati." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "" #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "In arrivo\nMessaggi in arrivo" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Inviati\nMessaggi inviati" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Bozze\nBozze di messaggi" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u sec" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u sec" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Sconosciuto" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "" #: ../src/strformat.c:248 msgid "Current" msgstr "" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "" #: ../src/strformat.c:284 msgid "Home network" msgstr "" #: ../src/strformat.c:286 msgid "Searching" msgstr "" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Applicazione" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protocollo" #: ../src/traffic-page.c:465 msgid "State" msgstr "Stato" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Buffer" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Porta" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Destinazione" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Limite di traffico superato" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Limite di tempo superato" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Traffico: %s, limite impostato a: %s\nTempo: %s, limite impostato a: %s\nSi prega di controllare i valori inseriti e di riprovare " #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Valori di traffico e tempo limite errati" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Traffico: %s, limite impostato a: %s\nSi prega di controllare i valori inseriti e di riprovare " #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Valore di traffico limite errato" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Tempo: %s, limite impostato a: %s\nSi prega di controllare i valori inseriti e di riprovare " #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Valore di tempo limite errato" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Disconnesso" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Limite" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Disattivato" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "kbps" #: ../src/traffic-page.c:969 msgid "sec" msgstr "sec" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "velocità RX" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "velocità TX" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parametro" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Valore" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Dati ricevuti" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Dati inviati" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Velocità di ricezione" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Velocità di invio" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Tempo della sessione" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Traffico residuo" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Tempo residuo" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Limite di traffico superato... È ora di riposarsi \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Limite di traffico superato... Vai a dormire e fai bei sogni -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Comando di esempio" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "Richiesta USSD non valida\nLa richiesta deve essere lunga 160 caratteri\niniziata con '*' e finita con '#'" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Errore durante l'invio della richiesta USSD" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Richiesta USSD errata o dispositivo non pronto" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "Sessione USSD terminata. E' possibile inviare una nuova richiesta" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Richiesta USSD errata" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nLa sessione USSD è attiva. In attesa dell'input...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Comando" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "" #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "" modem-manager-gui-0.0.17.1/po/bn_BD.po0000664000175000017500000011031712377603722015635 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Reazul Iqbal , 2013 # Reazul Iqbal , 2013 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Bengali (Bangladesh) (http://www.transifex.com/projects/p/modem-manager-gui/language/bn_BD/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: bn_BD\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "ডিভাইস চালু করতে এরর (ত্রুটি) হয়েছে" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "ডিভাইস খুলতে এরর (ত্রুটি) হয়েছে" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nভার্সন: %s পোর্ট: %s টাইপ: %s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "নির্বাচিত" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "ডিভাইস" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "মেসেজ পাঠাতে এরর (ত্রুটি) হয়েছে" #: ../src/main.c:385 msgid "Operation timed out" msgstr "" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "" #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "এস এম এস পড়ার জন্যে মডেম চালু করতে হবে। মডেম চালু করবেন?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "" #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "" #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "" #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "USSD পাঠাতে অবশ্যই মডেম চালু করতে হবে। মডেম চালু " #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "" #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "" #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "ব্যবহারযোগ্য নেটওয়ার্ক স্ক্যানের জন্যে মডেম সক্রিয় করতে হবে। মডেম সক্রিয় করবেন?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "" #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "" #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "মডেমটি এখন সংযুক্ত আছে। স্ক্যান করতে দয়াকরে সংযোগ ছিন্ন করুন।" #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "" #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "" #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "মডেম চালু " #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "কোন অপঠিত মেসেজ " #: ../src/main.c:1768 msgid "Show window" msgstr "" #: ../src/main.c:1774 msgid "New SMS" msgstr "" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "এস এম এস" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "বর্ণনা" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "ডিভাইস এঁরর (ত্রুটি)" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s আই ডি: %u প্রাপ্যতা: %s টেকনোলজি: %s " #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "নেটওয়ার্ক স্ক্যানে এরর (ত্রুটি) হয়েছে" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "অপারেটর" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "%u নূতন মেসেজ গৃহীত হয়েছে" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "নূতন মেসেজ গৃহীত হয়েছে" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "মেসেজ প্রেরক:" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "এস এম এস নাম্বারটি বৈধ নয়\nশুধুমাত্র ২ থেকে ২০ সংখ্যার বর্ণমালা ও চিহ্ন ব্যতীত সংখ্যা ব্যবহার করা যাবে" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "এস এম এস মেসেজটি বৈধ নয়\nদয়াকরে মেসেজ লিখুন" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "নাম্বার ভুল অথবা ডিভাইস প্রস্তুত নয়" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "মেসেজ অপসরণ করুন" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "মেসেজ অপসারণ করতে চান?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "এস এম এস অপসারণ করতে এরর (ত্রুটি) হয়েছে" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "মেসেজ খুঁজে পাওয়া যায়নি" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "মেসেজ নির্বাচন করা " #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "এই মেসেজটি পড়া যাবে নাহ" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "এই ফোল্ডারটি আগত মেসেজগুলোর জন্য।\nআপনি 'উত্তর' বাটন ব্যাবহার করে উত্তর দিতে পারবেন।" #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "এই ফোল্ডারটি প্রেরিত মেসেজগুলোর জন্য।" #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "এই ফোল্ডারটি খসড়া মেসেজগুলোর জন্য।\nআপনি 'উত্তর' বাটন ব্যবহার করে সম্পাদনা করতে পারবেন।" #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "আগত\nআগত মেসেজগুলো" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "প্রেরিত\nপ্রেরিত মেসেজগুলো" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "খসড়া\nখসড়া মেসেজগুলো" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f কে বি পি এস" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f কে বি পি এস" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g এম বি পি এস" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g জি বি পি এস" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g জি বি পি এস" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u সেক" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u সেক" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g কে বি" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g কে বি" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "অজানা" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "" #: ../src/strformat.c:248 msgid "Current" msgstr "" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "" #: ../src/strformat.c:284 msgid "Home network" msgstr "" #: ../src/strformat.c:286 msgid "Searching" msgstr "" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "" #: ../src/traffic-page.c:453 msgid "Application" msgstr "প্রয়োগ" #: ../src/traffic-page.c:457 msgid "PID" msgstr "পি আই " #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "প্রোটকল" #: ../src/traffic-page.c:465 msgid "State" msgstr "অবস্থা" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "ব্যাফার" #: ../src/traffic-page.c:473 msgid "Port" msgstr "পোর্ট" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "গন্তব্য" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "ট্রাফিক: %s, সীমা: %s\nসময়: %s, সীমা: %s\nদয়াকরে প্রবেশকৃত মানগুলো পরীক্ষা করুন এবং আবার চেষ্টা করুন" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "ভুল ট্রাফিক এবং সময় সীমা মান" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "ট্রাফিক: %s, সীমা: %s\nদয়াকরে প্রবেশকৃত মানগুলো পরীক্ষা করুন এবং আবার চেষ্টা করুন" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "ভুল ট্রাফিক সীমা মান" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "সময়: %s, সীমা: %s\nদয়াকরে প্রবেশকৃত মানগুলো পরীক্ষা করুন এবং আবার চেষ্টা করুন" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "ভুল সময় সীমা মান" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "কেবিপিএস" #: ../src/traffic-page.c:969 msgid "sec" msgstr "সেক" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "আর এক্স গতি" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "টি এক্স গতি" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "প্যারামিটার" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "মান" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "গৃহীত ডাটা" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "প্রেরিত ডাটা" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "গ্রহণ গতি" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "প্রেরণ গতি" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "সেশন সময়" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "ট্রাফিক বাকি" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "সময় বাকি" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "স্যাম্পল কমান্ড" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "USSD রেকোয়েস্ট বৈধ নয়\nরেকোয়েস্ট ১৬০ চিহ্নের এবং '*' দিয়ে শুরু এবং '#' দিয়ে শেষ হতে হবে" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "USSD পাঠাতে এরর (ত্রুটি) হয়েছে" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "ভুল USSD রেকোয়েস্ট অথবা ডিভাইস প্রস্তুত নয়" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "USSD সেশন বাতিল করা হয়েছে। আপনি নূতন রিকোয়েস্ট পাঠাতে " #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "ভুল USSD " #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "" #: ../src/ussd-page.c:492 msgid "Command" msgstr "কমান্ড" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "" #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "" modem-manager-gui-0.0.17.1/po/modem-manager-gui.pot0000644000175000017500000007455612375750262020364 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "" #: ../src/devices-page.c:394 msgid "Selected" msgstr "" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "" #: ../src/main.c:385 msgid "Operation timed out" msgstr "" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "" #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "" #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "" #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "" #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "" #: ../src/main.c:756 msgid "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "" #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "" #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN code." msgstr "" #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "" #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "" #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "" #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "" #: ../src/main.c:1768 msgid "Show window" msgstr "" #: ../src/main.c:1774 msgid "New SMS" msgstr "" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "" #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "" #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "" #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "" #: ../src/strformat.c:248 msgid "Current" msgstr "" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "" #: ../src/strformat.c:284 msgid "Home network" msgstr "" #: ../src/strformat.c:286 msgid "Searching" msgstr "" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "" #: ../src/traffic-page.c:453 msgid "Application" msgstr "" #: ../src/traffic-page.c:457 msgid "PID" msgstr "" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "" #: ../src/traffic-page.c:465 msgid "State" msgstr "" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "" #: ../src/traffic-page.c:473 msgid "Port" msgstr "" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "" #: ../src/traffic-page.c:969 msgid "sec" msgstr "" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "" #: ../src/ussd-page.c:492 msgid "Command" msgstr "" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "" #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "" modem-manager-gui-0.0.17.1/po/uk.po0000664000175000017500000011255212377603730015312 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Игорь Гриценко , 2012 # Роман Лепіш , 2012 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Ukrainian (http://www.transifex.com/projects/p/modem-manager-gui/language/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: uk\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Помилка активації модему" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Помилка відкриття пристрою" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s%s\nПрошивка:%s Порт:%s Тип:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Вибране" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Пристрій" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Помилка відправлення повідомлення" #: ../src/main.c:385 msgid "Operation timed out" msgstr "" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "" #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Модем має бути активовним для читання SMS. Ввімкнути модем?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "" #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "" #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "" #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "" #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "" #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Модем має бути активовним для надсилання USSD. Ввімкнути модем?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "" #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "" #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "" #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "" #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Модем має бути активованим для сканування доступних мереж. Активувати модем?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "" #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "" #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "" #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "На даний момент модем підключено. Для сканування, будь ласка, від'єднайтесь. " #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "" #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "" #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "" #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "" #: ../src/main.c:866 msgid "Enable modem" msgstr "Активувати модем" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s відключений" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Немає нових повідомлень" #: ../src/main.c:1768 msgid "Show window" msgstr "Показати вікно" #: ../src/main.c:1774 msgid "New SMS" msgstr "Написати SMS" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Пристрої" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Статус" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Мережі" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Трафік" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Налаштування" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "Про програму" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "" #: ../src/main.c:2694 msgid "Interface building error" msgstr "" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Опис" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Помилка пристрою" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Доступність: %s Стандарт: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Помилка сканування мережі" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Оператор" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "Прийнято %u нових повідомлень SMS" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Прийнято нове повідомлення SMS" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Повідомлення від:" #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n %s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "Невірний номер для відправки SMS\nЛише номери від 2 до 20 цифр без літер та символів можуть бути використані" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "Текст SMS некоректний\nНаберіть більше тексту для відправки" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Невірний номер чи неготовність пристрою" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Видалення повідомлення" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Дійсно хочете видалити повідомлення?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Помилка видалення SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Повідомлення не знайдено" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Повідомлення не вибрано" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Це повідомлення неможливо прочитати" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Цей каталог містить ваші вхідні повідомлення SMS.\n Ви можете відповісти на повідомлення з допомогою кнопки 'Відповідь'." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Цей каталог містить ваші вихідні повідомлення SMS." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "Цей каталог містить чернетки ваших повідомлень SMS.\n Виберіть повідомлення і натисніть кнопку 'Відповідь' для початку редагування." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Вхідні \n Прийняті повідомлення" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "b> Вихідні \n Відправлені повідомлення" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Чернетки\n Чернетки повідомлень " #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f КБіт/с" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f КБіт/с" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g МБіт/с" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g МБіт/с" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g ГБіт/с" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g ГБіт/с" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u сек" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u сек" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g КБ" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g КБ" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g МБ" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g МБ" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g ГБ" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g ГБ" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g ТБ" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g ТБ" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Невідомо" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "" #: ../src/strformat.c:248 msgid "Current" msgstr "" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "" #: ../src/strformat.c:282 msgid "Not registered" msgstr "" #: ../src/strformat.c:284 msgid "Home network" msgstr "" #: ../src/strformat.c:286 msgid "Searching" msgstr "" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "" #: ../src/traffic-page.c:276 msgid "Day" msgstr "" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Програма" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Протокол" #: ../src/traffic-page.c:465 msgid "State" msgstr "Стан" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Буфер" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Порт" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Адреса призначення" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Перевищено обмеження трафіку" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Перевищений обмеження часу" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Трафік: %s, обмеження: %s\nЧас: %s, обмеження: %s\nБудь ласка, перевірте введені дані та спробуйте ще раз" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Некоректні обмеження трафіка та часу" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Трафік: %s, обмеження: %s\nБудь ласка, перевірте введені дані та спробуйте ще раз" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Некоректне обмеження трафіку" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Час: %s, обмеження: %s\nБудь ласка, перевірте введені дані та спробуйте ще раз" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Некоректне обмеження часу сесії" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Відключений" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Обмеження" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Відключено" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "КБіт/с" #: ../src/traffic-page.c:969 msgid "sec" msgstr "сек" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "Приймання" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "Передача" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Параметр" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Значення" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Отримані дані" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Передані дані" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Швидкість отримання" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Швидкість віддачі" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Час сесії" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Залишок трафіку" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Залишок часу" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Перевищено обмеження трафіку ... Прийшов час відпочити \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Перевищено обмеження часу...... Приємних снів -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Стандартна команда" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "Запит не коректний.\n Запит не повинен містити більше 160 символів\n,повинен починатись з '*' і закінчуватись '#'" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Помилка надсилання запиту USSD" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Неправильний запит USSD або пристрій не готовий" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "Сесію USSD завершено. Ви можете відправити новий запит" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Некоректний запит USSD" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\n Сесія USSD активна. Очікується відповідь...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Команда" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "В системі не знайдено пристрою" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Нове повідомлення" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Видалити повідомлення" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Відповідь" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "Запит" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Надіслати" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Стандарт" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Рівень сигналу" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Розпочати сканування мереж" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Застосувати обмеження" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "З'єднання" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Швидкість передачі даних" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "Інструмент для керування специфічними функціями EDGE/3G/4G модемів" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Домашня сторінка" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "Українською: \n Игорь Гриценко , 2012.\n Роман Лепіш , 2012" #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Активні з'єднання" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Закрити програму" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Додати" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Помилка" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Нове SMS повідомлення" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Номер" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Об'єднати повідомлення" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Розгорнути папки" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "Швидкість прийому" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Швидкість передачі" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Трафік" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Прогрес" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Виконується команда" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Питання" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Обмеження" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Включити обмеження трафіку" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Включити обмеження часу" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "МБ" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "ГБ" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "ТБ" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Повідомлення" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Дія" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Показати повідомлення" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Розірвати з'єднання" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Час" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Хвилини" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Години" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Вилучити" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "" modem-manager-gui-0.0.17.1/po/en_US.po0000664000175000017500000011550112377603727015707 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: English (United States) (http://www.transifex.com/projects/p/modem-manager-gui/language/en_US/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en_US\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "Unread SMS" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "Unread messages" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "Error adding contact" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "Remove contact" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "Really want to remove contact?" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "Error removing contact" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "Contact not removed from device" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "Contact not selected" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "Modem contacts" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "GNOME contacts" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "KDE contacts" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "First name" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "First number" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "EMail" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "Group" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "Second name" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "Second number" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Error enabling device" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Error opening device" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nVersion:%s Port:%s Type:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Selected" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Device" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "Not supported" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Error sending message" #: ../src/main.c:385 msgid "Operation timed out" msgstr "Operation timed out" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "Operation took too long to execute. Please restart it." #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Modem must be enabled to read SMS. Enable modem?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "Modem must be enabled to read and write SMS. Please enable modem." #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "Modem must be registered in mobile network to receive and send SMS. Please wait..." #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "Modem must be unlocked to receive and send SMS. Please enter PIN code." #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "Modem manager does not support SMS manipulation functions." #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "Modem manager does not support sending of SMS messages." #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Modem must be enabled to send USSD. Enable modem?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "Modem must be enabled to send USSD. Please enable modem." #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "Modem must be registered in mobile network to send USSD. Please wait..." #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "Modem must be unlocked to send USSD. Please enter PIN code." #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "Modem manager does not support sending of USSD requests." #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Modem must be enabled to scan for available networks. Enable modem?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "Modem must be enabled to scan for available networks. Please enable modem." #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "Modem must be unlocked to scan for available networks. Please enter PIN code." #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "Modem manager does not support scanning for available mobile networks." #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Modem is connected now. Please disconnect to scan." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "Modem must be enabled to export contacts from it. Enable modem?" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "Modem must be enabled to export contacts from it. Please enable modem." #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "Modem must be unlocked to export contacts from it. Please enter PIN code." #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "Modem manager does not support modem contacts manipulation functions." #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "Modem manager does not support modem contacts edition functions." #: ../src/main.c:866 msgid "Enable modem" msgstr "Enable modem" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "Modem Manager GUI window hidden" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "Use tray icon or messaging menu to show window again" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "Error while displaying the help contents" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "%3.0f minutes" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "%3.1f hours" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "%2.0f days" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "%2.0f weeks" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "%2.0f sec" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "%u min, %u sec" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s disconnected" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "Unread messages: %u" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "No unread messages" #: ../src/main.c:1768 msgid "Show window" msgstr "Show window" #: ../src/main.c:1774 msgid "New SMS" msgstr "New SMS" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "Quit" #: ../src/main.c:1884 msgid "Undefined" msgstr "Undefined" #: ../src/main.c:2549 msgid "_Devices" msgstr "_Devices" #: ../src/main.c:2551 msgid "_SMS" msgstr "_SMS" #: ../src/main.c:2553 msgid "_USSD" msgstr "_USSD" #: ../src/main.c:2555 msgid "_Info" msgstr "_Info" #: ../src/main.c:2557 msgid "S_can" msgstr "S_can" #: ../src/main.c:2559 msgid "_Traffic" msgstr "_Traffic" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "C_ontacts" #: ../src/main.c:2565 msgid "_Quit" msgstr "_Quit" #: ../src/main.c:2571 msgid "_Actions" msgstr "_Actions" #: ../src/main.c:2574 msgid "_Preferences" msgstr "_Preferences" #: ../src/main.c:2577 msgid "_Edit" msgstr "_Edit" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "_Help" #: ../src/main.c:2582 msgid "_About" msgstr "_About" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Devices" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Info" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Scan" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Traffic" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "Contacts" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Preferences" #: ../src/main.c:2613 msgid "Help" msgstr "Help" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "About" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "Error while initialization" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "No one modem manager is available" #: ../src/main.c:2694 msgid "Interface building error" msgstr "Interface building error" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "Modem management modules:\n" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "Module" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Description" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "Connection management modules:\n" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "Segmentation fault at address: %p\n" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "Stack trace:\n" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "Do not show window on start" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "Use specified modem management module" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "Use specified connection management module" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "List all available modules and exit" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "- tool for EDGE/3G/4G modem specific functions control" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "Command line option parsing failed: %s\n" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "Error scanning network" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Device error" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Availability: %s Access tech: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Error scanning networks" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Operator" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "Received %u new SMS messages" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Received new SMS message" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Message senders: " #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "SMS number is not valid\nOnly numbers from 2 to 20 digits without\nletters and symbols can be used" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "SMS text is not valid\nPlease write some text to send" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Wrong number or device not ready" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Remove message" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Really want to remove message?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Error removing SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Message not found" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Message not selected" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "This message can't be read" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "This is folder for your incoming SMS messages.\nYou can answer selected message using 'Answer' button." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "This is folder for your sent SMS messages." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "This is folder for your SMS message drafts.\nSelect message and click 'Answer' button to start editing." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Incoming\nIncoming messages" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Sent\nSent messages" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Drafts\nMessage drafts" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f kbps" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Mbps" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Gbps" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u sec" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u sec" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "%" #: ../src/strformat.c:107 msgid "%" msgstr "%" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g Kb" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g Mb" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g Gb" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g Tb" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "Today, %T" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Unknown" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "Yesterday, %T" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "%d %B %Y, %T" #: ../src/strformat.c:246 msgid "Available" msgstr "Available" #: ../src/strformat.c:248 msgid "Current" msgstr "Current" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "Forbidden" #: ../src/strformat.c:282 msgid "Not registered" msgstr "Not registered" #: ../src/strformat.c:284 msgid "Home network" msgstr "Home network" #: ../src/strformat.c:286 msgid "Searching" msgstr "Searching" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "Registration denied" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "Unknown status" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "Roaming network" #: ../src/traffic-page.c:276 msgid "Day" msgstr "Day" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "Received data" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "Transmitted data" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "Session time" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Application" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Protocol" #: ../src/traffic-page.c:465 msgid "State" msgstr "State" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Buffer" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Port" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Destination" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Traffic limit exceeded" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Time limit exceeded" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Traffic: %s, limit set to: %s\nTime: %s, limit set to: %s\nPlease check entered values and try once more" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Wrong traffic and time limit values" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Traffic: %s, limit set to: %s\nPlease check entered values and try once more" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Wrong traffic limit value" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Time: %s, limit set to: %s\nPlease check entered values and try once more" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Wrong time limit value" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Disconnected" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Limit" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Disabled" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "kbps" #: ../src/traffic-page.c:969 msgid "sec" msgstr "sec" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "RX speed" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "TX speed" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Parameter" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Value" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Received data" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Transmitted data" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Receive speed" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Transmit speed" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Session time" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Traffic left" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Time left" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Traffic limit exceeded... It's time to take rest \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Time limit exceeded... Go sleep and have nice dreams -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Sample command" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "USSD request is not valid\nRequest must be 160 symbols long\nstarted with '*' and ended with '#'" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Error sending USSD" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Wrong USSD request or device not ready" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "USSD session terminated. You can send new request" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Wrong USSD request" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nUSSD session is active. Waiting for your input...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Command" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "Add new connection" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "Start" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "Welcome to Modem Manager GUI" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "Despite of it's name, Modem Manager GUI supports different backends. Please select backends you plan to use. If not sure, just do not change anything." #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "Modem manager" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "Connection manager" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "View and select available devices CTRL+F1" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "Send and receive SMS messages CTRL+F2" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "Send USSD requests CTRL+F3" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "View active device information CTRL+F4" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "Scan existing mobile networks CTRL+F5" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "Monitor network traffic CTRL+F6" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "View system and modem addressbooks CTRL+F7" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "No devices found in system" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "Connection" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "Edit" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "Activate" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "Send new SMS message CTRL+N" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "New" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "Remove selected message CTRL+D" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Remove" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "Answer selected message CTRL+A" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Answer" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "Request" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Send" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "Send ussd request CTRL+S" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "Edit USSD commands list CTRL+E" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "Equipment" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Mode" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Signal level" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "Operator code" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "Registration" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "Network" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "3GPP Location\nMCC/MNC/LAC/RNC/CID" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "GPS location\nLongitude/Latiude" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Location" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Scan available mobile networks CTRL+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Start scan" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "Create connection" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "Set traffic amount or time limit for disconnect CTRL+L" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Set limit" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "View list of active network connections CTRL+C" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Connections" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "View daily traffic statistics CTRL+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "Statistics" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Transmission speed" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Add new contact to modem addressbook CTRL+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "New contact" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Remove contact from modem addressbook CTRL+D" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Remove contact" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "Send SMS message to selected contact CTRL+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "Send SMS" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "Copyright 2012-2014 Alex" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "Tool for EDGE/3G/4G modem specific functions control" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Homepage" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "English: Alex " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Active connections" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "Terminate selected application using SIGTERM signal CTRL+T" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Terminate application" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "Add new broadband connection" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Add" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "Remove selected connection" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "Save changes" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "Save" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "Name" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "APN" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "Connection" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "Network ID" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "Home" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "Home and roaming" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "Access number" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "User name" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "Password" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "Authentication" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "Dynamic" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "Static" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "DNS 1" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "DNS 2" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "DNS" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Error" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "Ask me again" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Quit or minimize?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "What do you want application to do on window close?" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Just quit" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Minimize to tray or messaging menu" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "New SMS message" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Number" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "Use sounds for events" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "Hide window to tray on close" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "Save window geometry and placement" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "Add program to autostart list" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "Behaviour" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "Behaviour" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Concatenate messages" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Expand folders" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "Place old messages on top" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "Presentation" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "Validity period" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "Send delivery report if possible" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "Message parameters" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "RX Speed graph color" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "TX Speed graph color" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Traffic" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "Graphs" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "Preferred backends" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "Enable device" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "Send SMS message" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "Send USSD request" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "Scan networks" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "Opertions timeouts" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "Modules" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Progress" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Executing command" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Question" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Traffic limits" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Eanble traffic limit" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Enable time limit" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "Mb" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "Gb" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "Tb" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Message" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Action" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Show message" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Disconnect" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Time" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Minutes" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Hours" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "Traffic statistics" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Selected statistics period" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "January" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "February" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "March" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "April" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "May" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "June" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "July" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "August" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "September" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "October" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "November" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "December" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "USSD commands" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "Add new USSD command CTRL+N" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "Remove selected USSD command CTRL+D" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Delete" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei modems) CTRL+E" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "Change message encoding" modem-manager-gui-0.0.17.1/po/uz@Cyrl.po0000664000175000017500000012722512377603723016270 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Umid Almasov , 2014 # Umid Almasov , 2013-2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-22 23:33+0000\n" "Last-Translator: Alex \n" "Language-Team: Uzbek (Cyrillic) (http://www.transifex.com/projects/p/modem-manager-gui/language/uz@Cyrl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: uz@Cyrl\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "Ўқилмаган SMS" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "Ўқилмаган хабарлар" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "Алоқани қўшиш хатоси" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "Алоқани ўчириш" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "Ростдан алоқани ўчиришни истайсизми?" #: ../src/contacts-page.c:384 ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "Алоқани ўчириш хатоси" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "Алоқа ускунадан ўчирилмаган" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "Алоқа танланмаган" #: ../src/contacts-page.c:423 ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "Модем алоқалари" #: ../src/contacts-page.c:519 ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "GNOME алоқалари" #: ../src/contacts-page.c:526 ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "KDE алоқалари" #: ../src/contacts-page.c:542 ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "Исми" #: ../src/contacts-page.c:546 ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "Биринчи рақам" #: ../src/contacts-page.c:550 ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "Электрон почта" #: ../src/contacts-page.c:554 ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "Гуруҳ" #: ../src/contacts-page.c:558 ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "Фамилияси" #: ../src/contacts-page.c:562 ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "Иккинчи рақам" #: ../src/devices-page.c:116 ../src/main.c:870 msgid "Error enabling device" msgstr "Ускунани ёқиш хатоси" #: ../src/devices-page.c:235 ../src/devices-page.c:287 msgid "Error opening device" msgstr "Ускуна очиш хатоси" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "%s %s\nВерсия:%s Порт:%s Тури:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Танланган" #: ../src/devices-page.c:399 ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Ускуна" #: ../src/info-page.c:75 ../src/info-page.c:82 ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "Қўллаб-қувватланмайди" #: ../src/main.c:277 ../src/sms-page.c:602 msgid "Error sending message" msgstr "Хабар юбориш хатоси" #: ../src/main.c:385 msgid "Operation timed out" msgstr "Операция вақти ўтди" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "Операцияни бажариш учун жуда кўп вақт олинди. Илтимос, қайта ишга туширинг." #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "SMS ўқиш учун модемни ёқиш керак. Модем ёқилсинми?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "SMS ўқиш ва ёзиш учун модемни ёқиш керак. Илтимос, модемни ёқинг." #: ../src/main.c:733 msgid "" "Modem must be registered in mobile network to receive and send SMS. Please " "wait..." msgstr "SMS қабул қилиш ва юбориш учун модем мобил тармоқда рўйхатдан ўтиш керак. Илтимос, кутиб туринг..." #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "SMS қабул қилиш ва юбориш учун модем қулфланмаган бўлиш керак. Илтимос, PIN кодни киритинг." #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "Модем бошқарувчиси SMS бошқариш хусусиятларини қўллаб-қувватланмайди." #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "Модем бошқарувчиси SMS юборишни қўллаб-қувватланмайди." #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "USSD юбориш учун модемни ёқиш керак. Модем ёқилсинми?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "USSD юбориш учун модемни ёқиш керак. Илтимос, модемни ёқинг." #: ../src/main.c:756 msgid "" "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "USSD юбориш учун модем мобил тармоқда рўйхатдан ўтиш керак. Илтимос, кутиб туринг..." #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "USSD юбориш учун модем қулфланмаган бўлиш керак. Илтимос, PIN кодни киритинг." #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "Модем бошқарувчиси USSD сўровларни юборишни қўллаб-қувватланмайди." #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Мавжуд тармоқларни излаш учун модемни ёқиш керак. Модем ёқилсинми?" #: ../src/main.c:787 msgid "" "Modem must be enabled to scan for available networks. Please enable modem." msgstr "Мавжуд тармоқларни излаш учун модемни ёқиш керак. Илтимос, модемни ёқинг." #: ../src/main.c:789 msgid "" "Modem must be unlocked to scan for available networks. Please enter PIN " "code." msgstr "Мавжуд тармоқларни излаш учун модем қулфланмаган бўлиш керак. Илтимос, PIN кодни киритинг." #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "Модем бошқарувчиси мавжуд мобил тармоқларни текширишни қўллаб-қувватланмайди." #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Модем ҳозир уланган. Илтимос, тармоқларни излаш учун узиб қўйинг." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "Алоқаларни экспорт қилиш учун модемни ёқиш керак. Модем ёқилсинми?" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "Алоқаларни экспорт қилиш учун модемни ёқиш керак. Илтимос, модемни ёқинг." #: ../src/main.c:826 msgid "" "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "Алоқаларни экспорт қилиш учун модем улфланмаган бўлиш керак. Илтимос, PIN кодни киритинг." #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "Модем бошқарувчиси модем алоқаларини бошқариш хусусиятларини қўллаб-қувватланмайди." #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "Модем бошқарувчиси модем алоқаларини таҳрирлаш хусусиятларини қўллаб-қувватланмайди." #: ../src/main.c:866 msgid "Enable modem" msgstr "Модемни ёқиш" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "Modem Manager GUI ойнаси яширилган" #: ../src/main.c:1149 ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "Ойнани яна кўрсатиш учун трей иконачаси ёки хабар менюсидан фойдаланинг" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "" #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "" #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "" #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "" #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "" #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "" #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s узилган" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "Ўқилмаган хабар: %u" #: ../src/main.c:1748 ../src/main.c:1751 ../src/main.c:1764 msgid "No unread messages" msgstr "Ўқилмаган хабарлар йўқ" #: ../src/main.c:1768 msgid "Show window" msgstr "Ойнани кўрсатиш" #: ../src/main.c:1774 msgid "New SMS" msgstr "Янги SMS" #: ../src/main.c:1780 ../src/main.c:2619 msgid "Quit" msgstr "Чиқиш" #: ../src/main.c:1884 msgid "Undefined" msgstr "" #: ../src/main.c:2549 msgid "_Devices" msgstr "" #: ../src/main.c:2551 msgid "_SMS" msgstr "" #: ../src/main.c:2553 msgid "_USSD" msgstr "" #: ../src/main.c:2555 msgid "_Info" msgstr "" #: ../src/main.c:2557 msgid "S_can" msgstr "" #: ../src/main.c:2559 msgid "_Traffic" msgstr "" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "" #: ../src/main.c:2565 msgid "_Quit" msgstr "" #: ../src/main.c:2571 msgid "_Actions" msgstr "" #: ../src/main.c:2574 msgid "_Preferences" msgstr "" #: ../src/main.c:2577 msgid "_Edit" msgstr "" #: ../src/main.c:2580 ../src/main.c:2584 msgid "_Help" msgstr "" #: ../src/main.c:2582 msgid "_About" msgstr "" #: ../src/main.c:2591 ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Ускуналар" #: ../src/main.c:2593 ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Маълумот" #: ../src/main.c:2599 ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Тармоқлар" #: ../src/main.c:2601 ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Трафик" #: ../src/main.c:2603 ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "Алоқалар" #: ../src/main.c:2608 ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Мосламалар" #: ../src/main.c:2613 msgid "Help" msgstr "" #: ../src/main.c:2615 ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "Ҳақида" #: ../src/main.c:2661 ../src/main.c:2694 msgid "Error while initialization" msgstr "Инициализация хатоси" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "Модем бошқарувчиси мавжуд эмас" #: ../src/main.c:2694 msgid "Interface building error" msgstr "Интерфейс тузиш хатоси" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 msgid "Module" msgstr "" #: ../src/main.c:2739 ../src/main.c:2743 ../src/ussd-page.c:498 msgid "Description" msgstr "Тавсифи" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "Сегментация хатосининг манзили: %p\n" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "Стекни кузатиш:\n" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "Ишга туширилганда ойна кўрсатилмасин" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "- EDGE/3G/4G модемнинг махсус вазифаларини бошқариш воситаси" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "Буйруқ сатри параметрини таҳлил қилиш муваффақиятсиз тугади: %s\n" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Ускуна хатоси" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "%s\n%s ID: %u Мавжудлиги: %s Стандарт: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Тармоқларни излаш хатоси" #: ../src/scan-page.c:149 ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Оператор" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "%u янги SMS хабарлар олинди" #: ../src/sms-page.c:279 ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Янги SMS хабар олинди" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Хабар юборувчилари: " #: ../src/sms-page.c:425 ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "%s\n%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "SMS рақами нотўғри\nФақат 2 дан 20 гача рақамлардан fфойдаланиш\nмумкин, ҳарфлар ва белгилардан фойдаланиш мумкин эмас" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "SMS матни нотўғри\nИлтимос, юбориш учун матн киритинг" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Рақам нотўғри ёки ускуна тайёр эмас" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Хабарни ўчириш" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Ростдан хабарни ўчиришни истайсизми?" #: ../src/sms-page.c:655 ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "SMS ўчириш хатоси" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Хабар топилмади" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Хабар танланмаган" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Хабарни ўқиб бўлмади" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "Ушбу жилд кирувчи SMS хабарлари учун.\n'Жавоб бериш' тугмасини босиб танланган хабарга жавоб бериш мумкин." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Ушбу жилд юборилган SMS хабарлари учун." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "Ушбу жилд қоралама SMS хабарлар учун.\nЎзгартириш учун хабарни танланг ва 'Жавоб бериш' тугмасини босинг." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "Кирувчи\nКирувчи хабарлар" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "Юборилган\nЮборилган хабарлар" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "Қораламалар\nҚоралама хабарлар" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f кб/с" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f кб/с" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g Мб/с" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g Мб/с" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g Гб/с" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g Гб/с" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u сония" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u сония" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "" #: ../src/strformat.c:107 msgid "%" msgstr "" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g кб" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g кб" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g Mб" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g Мб" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g Гб" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g Гб" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g Тб" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g Тб" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "" #: ../src/strformat.c:187 ../src/strformat.c:191 ../src/strformat.c:195 #: ../src/strformat.c:206 ../src/strformat.c:236 ../src/strformat.c:244 #: ../src/strformat.c:252 ../src/strformat.c:319 ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Номаълум" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "" #: ../src/strformat.c:246 msgid "Available" msgstr "Мавжуд" #: ../src/strformat.c:248 msgid "Current" msgstr "Жорий" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "Тақиқланган" #: ../src/strformat.c:282 msgid "Not registered" msgstr "Рўйхатдан ўтмаган" #: ../src/strformat.c:284 msgid "Home network" msgstr "Уй тармоғи" #: ../src/strformat.c:286 msgid "Searching" msgstr "Қидирилмоқда" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "Рўйхатдан ўтиш рад этилган" #: ../src/strformat.c:290 ../src/strformat.c:294 msgid "Unknown status" msgstr "Номаълум ҳолат" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "Роуминг тармоғи" #: ../src/traffic-page.c:276 msgid "Day" msgstr "Кун" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "Қабул қилинган маълумот" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "Жўнатилган маълумот" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "Сессия вақти" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Дастур" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Протокол" #: ../src/traffic-page.c:465 msgid "State" msgstr "Ҳолат" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Буфер" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Порт" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Мўлжал" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Трафик лимитидан ошириб юборилди" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Вақт лимитидан ошириб юборилди" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Трафик: %s, лимит қўйилган: %s\nВақт: %s, лимит қўйилган: %s\nКиритилган қийматларни текширинг ва қайта ўриниб кўринг" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Трафик ва вақт лимитларининг қийматлари нотўғри" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Трафиқ: %s, лимит қўйилган: %s\nКиритилган қийматларни текширинг ва қайта уриниб қўринг" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Трафик лимитининг қиймати нотўғри" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "Вақт: %s, лимит қўйилган: %s\nКиритилган қийматларни текширинг ва қайта уриниб қўринг" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Вақт лимитининг қиймати нотўғри" #: ../src/traffic-page.c:786 ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Узилган" #: ../src/traffic-page.c:798 ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 ../src/traffic-page.c:828 msgid "Limit" msgstr "Лимит" #: ../src/traffic-page.c:801 ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 ../src/traffic-page.c:831 msgid "Disabled" msgstr "Ўчирилган" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "кб/с" #: ../src/traffic-page.c:969 msgid "sec" msgstr "сония" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "Қабул қилиш тезлиги" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "Жўнатиш тезлиги" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Параметр" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Қиймати" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Қабул қилинган" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Жўнатилган" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Қабул қилиш тезлиги" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Жўнатиш тезлиги" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Сессия вақти" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Қолган трафик" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Қолган вақт" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Трафик лимити ошириб юборилди... Дам олиш вақти келди \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Вақт лимити ошириб юборилди... Ухланг ва яхши тушлар кўринг -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Буйруқ намунаси" #: ../src/ussd-page.c:277 ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "USSD сўрови нотўғри\nСўров 160 белгилардан ошмаслиги,\n'*' билан бошланиши ва '#' билан тугаши лозим" #: ../src/ussd-page.c:375 ../src/ussd-page.c:378 ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "USSD юбориш хатоси" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "USSD сўрови нотўғри ёки ускуна тайёр эмас" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "USSD сессияси тугатилди. Янги сўров юборишингиз мумкин" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "USSD сўрови нотўғри" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "\nUSSD сессияси фаол. Маълумот киритишингизни кутмоқда...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Буйруқ" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "" #: ../resources/modem-manager-gui.ui:194 msgid "" "Despite of it's name, Modem Manager GUI supports different backends. Please " "select backends you plan to use. If not sure, just do not change anything." msgstr "" #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "Мавжуд ускуналарни кўриш ва танлаш CTRL+F1" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "SMS хабарларни юбориш ва қабул қилиш CTRL+F2" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "USSD сўровларни юбориш CTRL+F3" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "Фаол ускуна маълумотини кўриш CTRL+F4" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "Мавжуд мобил тармоқларни излаш CTRL+F5" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "Тармоқ трафигини кузатиш CTRL+F6" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "Тизимнинг ва модемнинг манзиллар китобини кўриш CTRL+F7" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "Тизимда ускуналар топилмади" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "Янги SMS хабар юбориш CTRL+N" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Янги" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "Танланган хабарни юбориш CTRL+D" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Ўчириш" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "Танланган хабарга жавоб бериш CTRL+A" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Жавоб бериш" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "Сўров" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Юбориш" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "USSD сўров юбориш CTRL+S" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "USSD буйруқлар рўйхатини таҳрирлаш CTRL+E" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "Жиҳоз" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Усул" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Сигнал даражаси" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "Оператор коди" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "Рўйхатдан ўтиш" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "Тармоқ" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "GPS жойлашиши\nУзунлик/Кенглик" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Жойлашиш" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Мавжуд мобил тармоқларни излаш CTRL+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Тармоқларни излар" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "Узиш учун трафик қийматини ёки вақт лимитини қўйиш CTRL+L" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Лимит қўйиш" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "Фаол тармоқ уланишлар рўйхатини кўриш CTRL+C" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Уланишлар" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "Кунлик трафик статистикани кўриш CTRL+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "Статистика" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Жўнатиш тезлиги" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Модемнинг манзиллар китобига янги алоқани қўшиш CTRL+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "Янги алоқа" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Манзиллар китобидан алоқани ўчириш CTRL+D" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Алоқани ўчириш" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "Танланган алоқага SMS хабар юбориш CTRL+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "SMS юбориш" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "EDGE/3G/4G модемнинг махсус вазифаларини бошқариш воситаси" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Уй саҳифаси" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "Ўзбекча: Умид Алмасов " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Фаол уланишлар" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "SIGTERM сигналидан фойдаланиб танланган дастурни ёпиш CTRL+T" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Дастурни ёпиш" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Қўшиш" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Хато" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "Мендан қайта сўралсин" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Чиқилсинми ёки кичрайтирилсинми?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "Ойна ёпилганда дастур нима қилишини истайсиз?" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Фақат чиқиш" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Трей ёки хабарлар менюсига кичрайтириш" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Янги SMS хабар" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Рақам" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "Воқеалар учун овозлардан фойдаланиш" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "Ойна ёпилганда уни трейга яшириш" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "Ойна ўлчамларини ва жойлашувини сақлаш" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "Хулқи" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Хабарларни бирлаштириш" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Жилдларни очиш" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "Эски хабарларни юқорига қўйиш" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "Қабул қилиш тезлиги графигининг ранги" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Жўнатиш тезлиги графигининг ранги" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Трафик" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Бажарилиши" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Буйруқ бажарилмоқда" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Савол" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Трафик лимити" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Трафик лимитини қўйиш" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Вақт лимитини қўйиш" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "Мб" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "Гб" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "Тб" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Хабар" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Ҳаракат" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Хабар кўрсатиш" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Алоқани узиш" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Вақт" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Дақиқа" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Соат" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "Трафик статистикаси" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Танланган статистика даври" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "Январ" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "Феврал" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "Март" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "Апрел" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "Май" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "Июн" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "Июл" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "Август" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "Сентябр" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "Октябр" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "Ноябр" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "Декабр" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "Янги USSD буйруғини қўшиш CTRL+N" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "Танланган USSD буйруғиги ўчириш CTRL+D" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Ўчириш" #: ../resources/modem-manager-gui.ui:4859 msgid "" "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei " "modems) CTRL+E" msgstr "USSD жавобининг кодлаш усулини GSM7'дан UCS2'га ўзгартириш (Huawei модемлари учун) CTRL+E" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "Хабарнинг кодлаш усулини ўзгартириш" modem-manager-gui-0.0.17.1/po/ru.po0000664000175000017500000014102212401276456015312 0ustar alexalex# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Alex , 2012-2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-23 03:22+0400\n" "PO-Revision-Date: 2014-08-25 17:55+0000\n" "Last-Translator: Alex \n" "Language-Team: Russian (http://www.transifex.com/projects/p/modem-manager-gui/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: ../src/ayatana.c:129 msgid "Unread SMS" msgstr "Непрочитанные SMS" #: ../src/ayatana.c:303 msgid "Unread messages" msgstr "Непрочитанные сообщения" #: ../src/contacts-page.c:344 msgid "Error adding contact" msgstr "Ошибка добавления контакта" #: ../src/contacts-page.c:380 msgid "Remove contact" msgstr "Удаление контакта" #: ../src/contacts-page.c:380 msgid "Really want to remove contact?" msgstr "Действительно хотите удалить контакт?" #: ../src/contacts-page.c:384 #: ../src/contacts-page.c:389 msgid "Error removing contact" msgstr "Ошибка удаления контакта" #: ../src/contacts-page.c:384 msgid "Contact not removed from device" msgstr "Контакт не удалён из адресной книги устройства" #: ../src/contacts-page.c:389 msgid "Contact not selected" msgstr "Контакт не выбран" #: ../src/contacts-page.c:423 #: ../src/sms-page.c:1359 msgid "Modem contacts" msgstr "Контакты из адресной книги модема" #: ../src/contacts-page.c:519 #: ../src/sms-page.c:1324 msgid "GNOME contacts" msgstr "Контакты GNOME" #: ../src/contacts-page.c:526 #: ../src/sms-page.c:1341 msgid "KDE contacts" msgstr "Контакты KDE" #: ../src/contacts-page.c:542 #: ../resources/modem-manager-gui.ui:3174 msgid "First name" msgstr "Основное имя" #: ../src/contacts-page.c:546 #: ../resources/modem-manager-gui.ui:3187 msgid "First number" msgstr "Основной номер" #: ../src/contacts-page.c:550 #: ../resources/modem-manager-gui.ui:3200 msgid "EMail" msgstr "EMail" #: ../src/contacts-page.c:554 #: ../resources/modem-manager-gui.ui:3213 msgid "Group" msgstr "Группа" #: ../src/contacts-page.c:558 #: ../resources/modem-manager-gui.ui:3227 msgid "Second name" msgstr "Дополнительное имя" #: ../src/contacts-page.c:562 #: ../resources/modem-manager-gui.ui:3240 msgid "Second number" msgstr "Дополнительный номер" #: ../src/devices-page.c:116 #: ../src/main.c:870 msgid "Error enabling device" msgstr "Ошибка активации модема" #: ../src/devices-page.c:235 #: ../src/devices-page.c:287 msgid "Error opening device" msgstr "Ошибка открытия устройства" #: ../src/devices-page.c:345 #, c-format msgid "" "%s %s\n" "Version:%s Port:%s Type:%s" msgstr "" "%s %s\n" "Прошивка:%s Порт:%s Тип:%s" #: ../src/devices-page.c:394 msgid "Selected" msgstr "Выбранное" #: ../src/devices-page.c:399 #: ../resources/modem-manager-gui.ui:1089 msgid "Device" msgstr "Устройство" #: ../src/info-page.c:75 #: ../src/info-page.c:82 #: ../src/info-page.c:135 #: ../src/info-page.c:143 msgid "Not supported" msgstr "Не поддерживается" #: ../src/main.c:277 #: ../src/sms-page.c:602 msgid "Error sending message" msgstr "Ошибка отправки сообщения" #: ../src/main.c:385 msgid "Operation timed out" msgstr "Отведённое для выполнения операции время истекло" #: ../src/main.c:385 msgid "Operation took too long to execute. Please restart it." msgstr "Процесс выполнения операции слишком затянулся. Пожалуйста, начните выполнение операции снова." #: ../src/main.c:731 msgid "Modem must be enabled to read SMS. Enable modem?" msgstr "Модем должен быть активирован для чтения новых SMS. Активировать модем?" #: ../src/main.c:732 msgid "Modem must be enabled to read and write SMS. Please enable modem." msgstr "Модем должен быть активирован для чтения и отправки новых SMS. Пожалуйста, активируйте модем." #: ../src/main.c:733 msgid "Modem must be registered in mobile network to receive and send SMS. Please wait..." msgstr "Модем должен быть зарегистрирован в домашней сети для приема и отправки SMS. Пожалуйста, подождите..." #: ../src/main.c:734 msgid "Modem must be unlocked to receive and send SMS. Please enter PIN code." msgstr "Модем должен быть разблокирован для приема и отправки SMS. Пожалуйста, введите PIN-код." #: ../src/main.c:735 msgid "Modem manager does not support SMS manipulation functions." msgstr "Система управления модемом не поддерживает функции для работы с сообщениями SMS." #: ../src/main.c:736 msgid "Modem manager does not support sending of SMS messages." msgstr "Система управления модемом не поддерживает функции для отправки сообщений SMS." #: ../src/main.c:754 msgid "Modem must be enabled to send USSD. Enable modem?" msgstr "Модем должен быть активирован для отправки запросов USSD. Активировать модем?" #: ../src/main.c:755 msgid "Modem must be enabled to send USSD. Please enable modem." msgstr "Модем должен быть активирован для отправки запросов USSD. Пожалуйста, активируйте модем." #: ../src/main.c:756 msgid "Modem must be registered in mobile network to send USSD. Please wait..." msgstr "Модем должен быть зарегистрирован в домашней сети для отправки запросов USSD. Пожалуйста, подождите..." #: ../src/main.c:757 msgid "Modem must be unlocked to send USSD. Please enter PIN code." msgstr "Модем должен быть разблокирован для отправки запросов USSD. Пожалуйста, введите PIN-код." #: ../src/main.c:758 msgid "Modem manager does not support sending of USSD requests." msgstr "Система управления модемом не поддерживает функции для отправки запросов USSD." #: ../src/main.c:786 msgid "Modem must be enabled to scan for available networks. Enable modem?" msgstr "Модем должен быть активирован для сканирования доступных сетей. Активировать модем?" #: ../src/main.c:787 msgid "Modem must be enabled to scan for available networks. Please enable modem." msgstr "Модем должен быть активирован для сканирования доступных сетей. Пожалуйста, активируйте модем." #: ../src/main.c:789 msgid "Modem must be unlocked to scan for available networks. Please enter PIN code." msgstr "Модем должен быть разблокирован для сканирования доступных сетей. Пожалуйста, введите PIN-код." #: ../src/main.c:790 msgid "Modem manager does not support scanning for available mobile networks." msgstr "Система управления модемом не поддерживает функции для сканирования доступных мобильных сетей." #: ../src/main.c:791 msgid "Modem is connected now. Please disconnect to scan." msgstr "Модем в данный момент подключен. Разорвите сетевое соединение для начала сканирования." #: ../src/main.c:823 msgid "Modem must be enabled to export contacts from it. Enable modem?" msgstr "Модем должен быть активирован для работы с его списком контактов. Активировать модем?" #: ../src/main.c:824 msgid "Modem must be enabled to export contacts from it. Please enable modem." msgstr "Модем должен быть активирован для работы с его списком контактов. Пожалуйста, активируйте модем." #: ../src/main.c:826 msgid "Modem must be unlocked to export contacts from it. Please enter PIN code." msgstr "Модем должен быть разблокирован для работы с его списком контактов. Пожалуйста, введите PIN-код." #: ../src/main.c:827 msgid "Modem manager does not support modem contacts manipulation functions." msgstr "Система управления модемом не поддерживает функции для работы со списком контактов модема." #: ../src/main.c:828 msgid "Modem manager does not support modem contacts edition functions." msgstr "Система управления модемом не поддерживает функции для редактирования списка контактов модема." #: ../src/main.c:866 msgid "Enable modem" msgstr "Активировать модем" #: ../src/main.c:1149 #: ../src/main.c:1176 msgid "Modem Manager GUI window hidden" msgstr "Окно Modem Manager GUI скрыто" #: ../src/main.c:1149 #: ../src/main.c:1176 msgid "Use tray icon or messaging menu to show window again" msgstr "Используйте иконку в трее или пункт меню сообщений для восстановления состояния окна" #: ../src/main.c:1228 msgid "Error while displaying the help contents" msgstr "Возникла ошибка при показе справки" #: ../src/main.c:1477 #, c-format msgid "%3.0f minutes" msgstr "%3.0f мин." #: ../src/main.c:1481 #, c-format msgid "%3.1f hours" msgstr "%3.1f час." #: ../src/main.c:1485 #, c-format msgid "%2.0f days" msgstr "%2.0f дн." #: ../src/main.c:1489 #, c-format msgid "%2.0f weeks" msgstr "%2.0f нед." #: ../src/main.c:1504 #, c-format msgid "%2.0f sec" msgstr "%2.0f сек." #: ../src/main.c:1507 #, c-format msgid "%u min, %u sec" msgstr "%u мин., %u сек." #: ../src/main.c:1592 #, c-format msgid "%s disconnected" msgstr "%s не подключен" #: ../src/main.c:1745 #, c-format msgid "Unread messages: %u" msgstr "Непрочитанные сообщения: %u" #: ../src/main.c:1748 #: ../src/main.c:1751 #: ../src/main.c:1764 msgid "No unread messages" msgstr "Нет новых сообщений" #: ../src/main.c:1768 msgid "Show window" msgstr "Показать окно" #: ../src/main.c:1774 msgid "New SMS" msgstr "Написать SMS" #: ../src/main.c:1780 #: ../src/main.c:2619 msgid "Quit" msgstr "Выход" #: ../src/main.c:1884 msgid "Undefined" msgstr "Не установлено" #: ../src/main.c:2549 msgid "_Devices" msgstr "_Устройства" #: ../src/main.c:2551 msgid "_SMS" msgstr "_SMS" #: ../src/main.c:2553 msgid "_USSD" msgstr "_USSD" #: ../src/main.c:2555 msgid "_Info" msgstr "_Статус" #: ../src/main.c:2557 msgid "S_can" msgstr "С_ети" #: ../src/main.c:2559 msgid "_Traffic" msgstr "_Трафик" #: ../src/main.c:2561 msgid "C_ontacts" msgstr "К_онтакты" #: ../src/main.c:2565 msgid "_Quit" msgstr "В_ыход" #: ../src/main.c:2571 msgid "_Actions" msgstr "_Действия" #: ../src/main.c:2574 msgid "_Preferences" msgstr "_Настройки" #: ../src/main.c:2577 msgid "_Edit" msgstr "_Правка" #: ../src/main.c:2580 #: ../src/main.c:2584 msgid "_Help" msgstr "По_мощь" #: ../src/main.c:2582 msgid "_About" msgstr "_О программе " #: ../src/main.c:2591 #: ../resources/modem-manager-gui.ui:309 #: ../resources/modem-manager-gui.ui:633 msgid "Devices" msgstr "Устройства" #: ../src/main.c:2593 #: ../src/sms-page.c:1450 #: ../resources/modem-manager-gui.ui:325 #: ../resources/modem-manager-gui.ui:837 #: ../resources/modem-manager-gui.ui:3760 msgid "SMS" msgstr "SMS" #: ../src/main.c:2595 #: ../resources/modem-manager-gui.ui:341 #: ../resources/modem-manager-gui.ui:1039 msgid "USSD" msgstr "USSD" #: ../src/main.c:2597 #: ../resources/modem-manager-gui.ui:357 #: ../resources/modem-manager-gui.ui:1511 msgid "Info" msgstr "Статус" #: ../src/main.c:2599 #: ../resources/modem-manager-gui.ui:373 #: ../resources/modem-manager-gui.ui:1684 msgid "Scan" msgstr "Сети" #: ../src/main.c:2601 #: ../resources/modem-manager-gui.ui:389 #: ../resources/modem-manager-gui.ui:1830 #: ../resources/modem-manager-gui.ui:4381 msgid "Traffic" msgstr "Трафик" #: ../src/main.c:2603 #: ../resources/modem-manager-gui.ui:405 #: ../resources/modem-manager-gui.ui:2014 msgid "Contacts" msgstr "Контакты" #: ../src/main.c:2608 #: ../resources/modem-manager-gui.ui:3426 msgid "Preferences" msgstr "Параметры" #: ../src/main.c:2613 msgid "Help" msgstr "Содержание" #: ../src/main.c:2615 #: ../resources/modem-manager-gui.ui:2034 msgid "About" msgstr "О программе" #: ../src/main.c:2661 #: ../src/main.c:2694 msgid "Error while initialization" msgstr "Ошибка в ходе инициализации" #: ../src/main.c:2661 msgid "No one modem manager is available" msgstr "Ни одна из систем управления модемами не доступна" #: ../src/main.c:2694 msgid "Interface building error" msgstr "Ошибка создания графического интерфейса" #: ../src/main.c:2738 msgid "Modem management modules:\n" msgstr "Модули систем управления модемами:\n" #: ../src/main.c:2739 #: ../src/main.c:2743 msgid "Module" msgstr "Модуль" #: ../src/main.c:2739 #: ../src/main.c:2743 #: ../src/ussd-page.c:498 msgid "Description" msgstr "Описание" #: ../src/main.c:2742 msgid "Connection management modules:\n" msgstr "Модули систем управления соединениями:\n" #: ../src/main.c:2779 #, c-format msgid "Segmentation fault at address: %p\n" msgstr "Ошибка сегментирования по адресу: %p\n" #: ../src/main.c:2782 msgid "Stack trace:\n" msgstr "Трассировка стека:\n" #: ../src/main.c:2848 msgid "Do not show window on start" msgstr "Не показывать окно при запуске" #: ../src/main.c:2849 msgid "Use specified modem management module" msgstr "Использовать указанный модуль системы управления модемами" #: ../src/main.c:2850 msgid "Use specified connection management module" msgstr "Использовать указанный модуль системы управления соединениями" #: ../src/main.c:2851 msgid "List all available modules and exit" msgstr "Вывести список всех доступных модулей и выйти" #: ../src/main.c:2888 msgid "- tool for EDGE/3G/4G modem specific functions control" msgstr "- инструмент для управления специфическими функциями модемов стандартов EDGE/3G/4G" #: ../src/main.c:2895 #, c-format msgid "Command line option parsing failed: %s\n" msgstr "Ошибка разбора параметра команданой строки: %s\n" #: ../src/scan-page.c:46 msgid "Error scanning network" msgstr "Ошибка сканирования сети" #: ../src/scan-page.c:46 msgid "Device error" msgstr "Ошибка устройства" #: ../src/scan-page.c:97 #, c-format msgid "" "%s\n" "%s ID: %u Availability: %s Access tech: %s" msgstr "" "%s\n" "%s ID: %u Доступность: %s Стандарт: %s" #: ../src/scan-page.c:135 msgid "Error scanning networks" msgstr "Ошибка сканирования сетей" #: ../src/scan-page.c:149 #: ../resources/modem-manager-gui.ui:1227 msgid "Operator" msgstr "Оператор" #: ../src/sms-page.c:277 #, c-format msgid "Received %u new SMS messages" msgstr "Принято %u новых сообщений SMS" #: ../src/sms-page.c:279 #: ../src/sms-page.c:357 msgid "Received new SMS message" msgstr "Принято новое сообщение SMS" #: ../src/sms-page.c:291 msgid "Message senders: " msgstr "Сообщения от: " #: ../src/sms-page.c:425 #: ../src/sms-page.c:872 #, c-format msgid "" "%s\n" "%s" msgstr "" "%s\n" "%s" #: ../src/sms-page.c:479 msgid "" "SMS number is not valid\n" "Only numbers from 2 to 20 digits without\n" "letters and symbols can be used" msgstr "" "Номер для отправки SMS некорректен\n" "Допустимы номера длиной от 2 до 20 знаков\n" "без цифр и специальных символов" #: ../src/sms-page.c:481 msgid "" "SMS text is not valid\n" "Please write some text to send" msgstr "" "Текст SMS некорректен\n" "Необходимо набрать текст сообщения" #: ../src/sms-page.c:602 msgid "Wrong number or device not ready" msgstr "Неверный номер или устройство не готово" #: ../src/sms-page.c:649 msgid "Remove message" msgstr "Удаление сообщения" #: ../src/sms-page.c:649 msgid "Really want to remove message?" msgstr "Действительно хотите удалить сообщение?" #: ../src/sms-page.c:655 #: ../src/sms-page.c:660 msgid "Error removing SMS" msgstr "Ошибка удаления SMS" #: ../src/sms-page.c:655 msgid "Message not found" msgstr "Сообщение не найдено" #: ../src/sms-page.c:660 msgid "Message not selected" msgstr "Сообщение не выбрано" #: ../src/sms-page.c:814 msgid "This message can't be read" msgstr "Это сообщение невозможно прочитать" #: ../src/sms-page.c:820 msgid "" "This is folder for your incoming SMS messages.\n" "You can answer selected message using 'Answer' button." msgstr "" "Этот каталог содержит ваши входящие сообщения SMS.\n" "Вы можете ответить на сообщение при помощи кнопки 'Ответ'." #: ../src/sms-page.c:823 msgid "This is folder for your sent SMS messages." msgstr "Этот каталог содержит ваши исходящие сообщения SMS." #: ../src/sms-page.c:826 msgid "" "This is folder for your SMS message drafts.\n" "Select message and click 'Answer' button to start editing." msgstr "" "Этот каталог содержит черновики ваших сообщений SMS.\n" "Выберите сообщение и нажмите кнопку 'Ответ' для начала редактирования." #: ../src/sms-page.c:928 msgid "" "Incoming\n" "Incoming messages" msgstr "" "Входящие\n" "Принятые сообщения" #: ../src/sms-page.c:929 msgid "" "Sent\n" "Sent messages" msgstr "" "Исходящие\n" "Отправленные сообщения" #: ../src/sms-page.c:930 msgid "" "Drafts\n" "Message drafts" msgstr "" "Черновики\n" "Черновики сообщений" #: ../src/strformat.c:39 #, c-format msgid "%.3f kbps" msgstr "%.3f КБит/с" #: ../src/strformat.c:41 #, c-format msgid "%.3f kbps" msgstr "%.3f КБит/с" #: ../src/strformat.c:46 #, c-format msgid "%.3g Mbps" msgstr "%.3g МБит/с" #: ../src/strformat.c:48 #, c-format msgid "%.3g Mbps" msgstr "%.3g МБит/с" #: ../src/strformat.c:53 #, c-format msgid "%.3g Gbps" msgstr "%.3g ГБит/с" #: ../src/strformat.c:55 #, c-format msgid "%.3g Gbps" msgstr "%.3g ГБит/с" #: ../src/strformat.c:87 #, c-format msgid "%u sec" msgstr "%u сек" #: ../src/strformat.c:89 #, c-format msgid "%u sec" msgstr "%u сек" #: ../src/strformat.c:93 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:95 #, c-format msgid "%s:%s" msgstr "%s:%s" #: ../src/strformat.c:99 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:101 #, c-format msgid "%s:%s:%s" msgstr "%s:%s:%s" #: ../src/strformat.c:105 msgid "%" msgstr "%" #: ../src/strformat.c:107 msgid "%" msgstr "%" #: ../src/strformat.c:124 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:126 #, c-format msgid "%u" msgstr "%u" #: ../src/strformat.c:131 #, c-format msgid "%.3g Kb" msgstr "%.3g КБ" #: ../src/strformat.c:133 #, c-format msgid "%.3g Kb" msgstr "%.3g КБ" #: ../src/strformat.c:138 #, c-format msgid "%.3g Mb" msgstr "%.3g МБ" #: ../src/strformat.c:140 #, c-format msgid "%.3g Mb" msgstr "%.3g МБ" #: ../src/strformat.c:145 #, c-format msgid "%.3g Gb" msgstr "%.3g ГБ" #: ../src/strformat.c:147 #, c-format msgid "%.3g Gb" msgstr "%.3g ГБ" #: ../src/strformat.c:152 #, c-format msgid "%.3g Tb" msgstr "%.3g ТБ" #: ../src/strformat.c:154 #, c-format msgid "%.3g Tb" msgstr "%.3g ТБ" #: ../src/strformat.c:186 msgid "Today, %T" msgstr "Сегодня, %T" #: ../src/strformat.c:187 #: ../src/strformat.c:191 #: ../src/strformat.c:195 #: ../src/strformat.c:206 #: ../src/strformat.c:236 #: ../src/strformat.c:244 #: ../src/strformat.c:252 #: ../src/strformat.c:319 #: ../src/traffic-page.c:111 #: ../src/traffic-page.c:164 #, c-format msgid "Unknown" msgstr "Неизвестно" #: ../src/strformat.c:190 msgid "Yesterday, %T" msgstr "Вчера, %T" #: ../src/strformat.c:194 msgid "%d %B %Y, %T" msgstr "%d %B %Y, %T" #: ../src/strformat.c:246 msgid "Available" msgstr "Доступна" #: ../src/strformat.c:248 msgid "Current" msgstr "Активная сеть" #: ../src/strformat.c:250 msgid "Forbidden" msgstr "Недоступна" #: ../src/strformat.c:282 msgid "Not registered" msgstr "Не зарегистрирован" #: ../src/strformat.c:284 msgid "Home network" msgstr "Домашняя сеть" #: ../src/strformat.c:286 msgid "Searching" msgstr "Поиск сети" #: ../src/strformat.c:288 msgid "Registration denied" msgstr "В регистрации отказано" #: ../src/strformat.c:290 #: ../src/strformat.c:294 msgid "Unknown status" msgstr "Неизвестное состояние" #: ../src/strformat.c:292 msgid "Roaming network" msgstr "Роуминг" #: ../src/traffic-page.c:276 msgid "Day" msgstr "День" #: ../src/traffic-page.c:280 msgid "Received data" msgstr "Принятые данные" #: ../src/traffic-page.c:284 msgid "Transmitted data" msgstr "Отправленные данные" #: ../src/traffic-page.c:288 msgid "Session time" msgstr "Время сессии" #: ../src/traffic-page.c:453 msgid "Application" msgstr "Приложение" #: ../src/traffic-page.c:457 msgid "PID" msgstr "PID" #: ../src/traffic-page.c:461 msgid "Protocol" msgstr "Протокол" #: ../src/traffic-page.c:465 msgid "State" msgstr "Состояние" #: ../src/traffic-page.c:469 msgid "Buffer" msgstr "Буфер" #: ../src/traffic-page.c:473 msgid "Port" msgstr "Порт" #: ../src/traffic-page.c:477 msgid "Destination" msgstr "Целевой адрес" #: ../src/traffic-page.c:503 msgid "Traffic limit exceeded" msgstr "Доступный трафик исчерпан" #: ../src/traffic-page.c:507 msgid "Time limit exceeded" msgstr "Доступное время исчерпано" #: ../src/traffic-page.c:694 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "" "Трафик: %s, установленное ограничение: %s\n" "Время сессии: %s, установленное ограничение: %s\n" "Проверьте введённые данные и попробуйте еще раз" #: ../src/traffic-page.c:699 msgid "Wrong traffic and time limit values" msgstr "Некорректные ограничения трафика и времени" #: ../src/traffic-page.c:702 #, c-format msgid "" "Traffic: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "" "Трафик: %s, установленное ограничение: %s\n" "Проверьте введённые данные и попробуйте еще раз" #: ../src/traffic-page.c:705 msgid "Wrong traffic limit value" msgstr "Некорректное ограничение трафика" #: ../src/traffic-page.c:708 #, c-format msgid "" "Time: %s, limit set to: %s\n" "Please check entered values and try once more" msgstr "" "Время сессии: %s, установленное ограничение: %s\n" "Проверьте введённые данные и попробуйте еще раз" #: ../src/traffic-page.c:711 msgid "Wrong time limit value" msgstr "Некорректное ограничение времени сессии" #: ../src/traffic-page.c:786 #: ../src/traffic-page.c:810 #: ../src/traffic-page.c:834 msgid "Disconnected" msgstr "Не подключен" #: ../src/traffic-page.c:798 #: ../src/traffic-page.c:804 #: ../src/traffic-page.c:822 #: ../src/traffic-page.c:828 msgid "Limit" msgstr "Предел" #: ../src/traffic-page.c:801 #: ../src/traffic-page.c:807 #: ../src/traffic-page.c:825 #: ../src/traffic-page.c:831 msgid "Disabled" msgstr "Отключено" #: ../src/traffic-page.c:959 msgid "kbps" msgstr "КБит/с" #: ../src/traffic-page.c:969 msgid "sec" msgstr "сек" #: ../src/traffic-page.c:1023 msgid "RX speed" msgstr "Приём" #: ../src/traffic-page.c:1042 msgid "TX speed" msgstr "Передача" #: ../src/traffic-page.c:1057 msgid "Parameter" msgstr "Параметр" #: ../src/traffic-page.c:1062 msgid "Value" msgstr "Значение" #: ../src/traffic-page.c:1068 msgid "Received data" msgstr "Принятые данные" #: ../src/traffic-page.c:1071 msgid "Transmitted data" msgstr "Переданные данные" #: ../src/traffic-page.c:1074 msgid "Receive speed" msgstr "Скорость приёма" #: ../src/traffic-page.c:1077 msgid "Transmit speed" msgstr "Скорость передачи" #: ../src/traffic-page.c:1080 msgid "Session time" msgstr "Время сессии" #: ../src/traffic-page.c:1083 msgid "Traffic left" msgstr "Остаток трафика" #: ../src/traffic-page.c:1086 msgid "Time left" msgstr "Остаток времени" #: ../src/traffic-page.c:1108 msgid "Traffic limit exceeded... It's time to take rest \\(^_^)/" msgstr "Трафик закончился... Самое время отдохнуть \\(^_^)/" #: ../src/traffic-page.c:1133 msgid "Time limit exceeded... Go sleep and have nice dreams -_-" msgstr "Время закончилось... Прекрасных снов -_-" #: ../src/ussd-page.c:61 msgid "Sample command" msgstr "Стандартная команда" #: ../src/ussd-page.c:277 #: ../src/ussd-page.c:298 msgid "" "USSD request is not valid\n" "Request must be 160 symbols long\n" "started with '*' and ended with '#'" msgstr "" "Запрос USSD некорректен\n" "Запрос не должен превышать 160 символов,\n" "должен начинаться с '*' и заканчиваться '#'" #: ../src/ussd-page.c:375 #: ../src/ussd-page.c:378 #: ../src/ussd-page.c:381 #: ../src/ussd-page.c:415 msgid "Error sending USSD" msgstr "Ошибка отправки запроса USSD" #: ../src/ussd-page.c:375 msgid "Wrong USSD request or device not ready" msgstr "Неправильный запрос USSD или устройство не готово" #: ../src/ussd-page.c:378 msgid "USSD session terminated. You can send new request" msgstr "Сессия USSD завершена. Вы можете отправить новый запрос" #: ../src/ussd-page.c:381 msgid "Wrong USSD request" msgstr "Некорректный запрос USSD" #: ../src/ussd-page.c:404 msgid "" "\n" "USSD session is active. Waiting for your input...\n" msgstr "" "\n" "Сессия USSD активна. Ожидается ответ...\n" #: ../src/ussd-page.c:492 msgid "Command" msgstr "Команда" #: ../resources/modem-manager-gui.ui:7 msgid "Add new connection" msgstr "Добавить новое соединение" #: ../resources/modem-manager-gui.ui:135 msgid "Start" msgstr "Начать работу" #: ../resources/modem-manager-gui.ui:180 msgid "Welcome to Modem Manager GUI" msgstr "Настройка Modem Manager GUI" #: ../resources/modem-manager-gui.ui:194 msgid "Despite of it's name, Modem Manager GUI supports different backends. Please select backends you plan to use. If not sure, just do not change anything." msgstr "Несмотря на название, приложение Modem Manager GUI поддерживает различные системы управления модемами и соединениями. Пожалуйста, выберите те системы, с которыми вы планируете работать. В том случае если вы сомневаетесь в выборе, просто ничего не меняйте." #: ../resources/modem-manager-gui.ui:209 #: ../resources/modem-manager-gui.ui:3890 msgid "Modem manager" msgstr "Система управления модемами" #: ../resources/modem-manager-gui.ui:222 #: ../resources/modem-manager-gui.ui:3903 msgid "Connection manager" msgstr "Система управления соединениями" #: ../resources/modem-manager-gui.ui:287 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #: ../resources/modem-manager-gui.ui:307 msgid "View and select available devices CTRL+F1" msgstr "Просмотр доступных устройств и выбор используемого CTRL+F1" #: ../resources/modem-manager-gui.ui:323 msgid "Send and receive SMS messages CTRL+F2" msgstr "Приём и отправка сообщений SMS CTRL+F2" #: ../resources/modem-manager-gui.ui:339 msgid "Send USSD requests CTRL+F3" msgstr "Отправка запросов USSD CTRL+F3" #: ../resources/modem-manager-gui.ui:355 msgid "View active device information CTRL+F4" msgstr "Просмотр информации об активном устройстве CTRL+F4" #: ../resources/modem-manager-gui.ui:371 msgid "Scan existing mobile networks CTRL+F5" msgstr "Сканирование существующих мобильных сетей CTRL+F5" #: ../resources/modem-manager-gui.ui:387 msgid "Monitor network traffic CTRL+F6" msgstr "Мониторинг сетевого трафика CTRL+F6" #: ../resources/modem-manager-gui.ui:403 msgid "View system and modem addressbooks CTRL+F7" msgstr "Просмотр адресной книги модема и системных адресных книг CTRL+F7" #: ../resources/modem-manager-gui.ui:506 msgid "No devices found in system" msgstr "В системе не найдено устройств" #: ../resources/modem-manager-gui.ui:543 msgid "Connection" msgstr "Соединение" #: ../resources/modem-manager-gui.ui:567 msgid "Edit" msgstr "Редактировать" #: ../resources/modem-manager-gui.ui:584 msgid "Activate" msgstr "Активировать" #: ../resources/modem-manager-gui.ui:726 msgid "Send new SMS message CTRL+N" msgstr "Отправить новое сообщение SMS CTRL+N" #: ../resources/modem-manager-gui.ui:728 msgid "New" msgstr "Новое сообщение" #: ../resources/modem-manager-gui.ui:742 msgid "Remove selected message CTRL+D" msgstr "Удалить выбранное сообщение CTRL+D" #: ../resources/modem-manager-gui.ui:744 #: ../resources/modem-manager-gui.ui:2275 msgid "Remove" msgstr "Удалить сообщение" #: ../resources/modem-manager-gui.ui:758 msgid "Answer selected message CTRL+A" msgstr "Ответить на выбранное сообщение CTRL+A" #: ../resources/modem-manager-gui.ui:760 msgid "Answer" msgstr "Ответ" #: ../resources/modem-manager-gui.ui:856 msgid "Request" msgstr "Запрос" #: ../resources/modem-manager-gui.ui:890 #: ../resources/modem-manager-gui.ui:3314 msgid "Send" msgstr "Отправить" #: ../resources/modem-manager-gui.ui:894 msgid "Send ussd request CTRL+S" msgstr "Отправить запрос ussd CTRL+S" #: ../resources/modem-manager-gui.ui:914 msgid "Edit USSD commands list CTRL+E" msgstr "Отредактировать список команд USSD CTRL+E" #: ../resources/modem-manager-gui.ui:1118 msgid "IMEI" msgstr "IMEI" #: ../resources/modem-manager-gui.ui:1147 msgid "IMSI/ESN" msgstr "IMSI/ESN" #: ../resources/modem-manager-gui.ui:1179 msgid "Equipment" msgstr "Оборудование" #: ../resources/modem-manager-gui.ui:1256 msgid "Mode" msgstr "Стандарт" #: ../resources/modem-manager-gui.ui:1285 msgid "Signal level" msgstr "Уровень сигнала" #: ../resources/modem-manager-gui.ui:1299 msgid "Operator code" msgstr "Код оператора" #: ../resources/modem-manager-gui.ui:1328 msgid "Registration" msgstr "Регистрация" #: ../resources/modem-manager-gui.ui:1377 #: ../resources/modem-manager-gui.ui:2513 msgid "Network" msgstr "Сеть" #: ../resources/modem-manager-gui.ui:1425 msgid "" "3GPP Location\n" "MCC/MNC/LAC/RNC/CID" msgstr "" "Позиционирование 3GPP\n" "MCC/MNC/LAC/RNC/CID" #: ../resources/modem-manager-gui.ui:1441 msgid "" "GPS location\n" "Longitude/Latiude" msgstr "" "Позиционирование GPS\n" "Longitude/Latiude" #: ../resources/modem-manager-gui.ui:1490 msgid "Location" msgstr "Позиционирование" #: ../resources/modem-manager-gui.ui:1631 msgid "Scan available mobile networks CTRL+S" msgstr "Сканировать доступные мобильные сети CTRL+S" #: ../resources/modem-manager-gui.ui:1633 msgid "Start scan" msgstr "Начать сканирование сетей" #: ../resources/modem-manager-gui.ui:1656 msgid "Create connection" msgstr "Создать соединение" #: ../resources/modem-manager-gui.ui:1704 msgid "Set traffic amount or time limit for disconnect CTRL+L" msgstr "Установить объём трафика и время до отсоединения CTRL+L" #: ../resources/modem-manager-gui.ui:1706 msgid "Set limit" msgstr "Установить ограничения" #: ../resources/modem-manager-gui.ui:1720 msgid "View list of active network connections CTRL+C" msgstr "Просмотреть список активных сетевых соединений CTRL+C" #: ../resources/modem-manager-gui.ui:1722 #: ../resources/modem-manager-gui.ui:2193 msgid "Connections" msgstr "Соединения" #: ../resources/modem-manager-gui.ui:1736 msgid "View daily traffic statistics CTRL+S" msgstr "Просмотреть ежедневную статистику потребления трафика CTRL+S" #: ../resources/modem-manager-gui.ui:1738 msgid "Statistics" msgstr "Статистика" #: ../resources/modem-manager-gui.ui:1789 msgid "Transmission speed" msgstr "Скорость передачи данных" #: ../resources/modem-manager-gui.ui:1923 msgid "Add new contact to modem addressbook CTRL+N" msgstr "Добавить новый контакт в адресную книгу модема CTRL+N" #: ../resources/modem-manager-gui.ui:1925 #: ../resources/modem-manager-gui.ui:3035 msgid "New contact" msgstr "Новый контакт" #: ../resources/modem-manager-gui.ui:1939 msgid "Remove contact from modem addressbook CTRL+D" msgstr "Удалить контакт из адресной книги модема CTRL+D" #: ../resources/modem-manager-gui.ui:1941 msgid "Remove contact" msgstr "Удалить контакт" #: ../resources/modem-manager-gui.ui:1965 msgid "Send SMS message to selected contact CTRL+S" msgstr "Отправить сообщение SMS на номер выделенного контакта CTRL+S" #: ../resources/modem-manager-gui.ui:1967 msgid "Send SMS" msgstr "Отправить SMS" #: ../resources/modem-manager-gui.ui:2044 msgid "Copyright 2012-2014 Alex" msgstr "Copyright 2012-2014 Alex" #: ../resources/modem-manager-gui.ui:2045 msgid "Tool for EDGE/3G/4G modem specific functions control" msgstr "Программа для управления специфическими функциями EDGE/3G/4G модемов" #: ../resources/modem-manager-gui.ui:2047 msgid "Homepage" msgstr "Домашняя страница" #: ../resources/modem-manager-gui.ui:2048 msgid "GPL3" msgstr "GPL3" #: ../resources/modem-manager-gui.ui:2050 msgid "English: Alex " msgstr "Русский: Alex " #: ../resources/modem-manager-gui.ui:2082 msgid "Active connections" msgstr "Активные соединения" #: ../resources/modem-manager-gui.ui:2138 msgid "Terminate selected application using SIGTERM signal CTRL+T" msgstr "Завершить работу выбранного приложения при помощи сигнала SIGTERM CTRL+T" #: ../resources/modem-manager-gui.ui:2140 msgid "Terminate application" msgstr "Завершить приложение" #: ../resources/modem-manager-gui.ui:2257 msgid "Add new broadband connection" msgstr "Добавить новое мобильное широкополосное соединение" #: ../resources/modem-manager-gui.ui:2259 #: ../resources/modem-manager-gui.ui:4819 msgid "Add" msgstr "Добавить" #: ../resources/modem-manager-gui.ui:2273 msgid "Remove selected connection" msgstr "Удалить выбранное соединение" #: ../resources/modem-manager-gui.ui:2289 msgid "Save changes" msgstr "Сохранить изменения" #: ../resources/modem-manager-gui.ui:2291 msgid "Save" msgstr "Сохранить" #: ../resources/modem-manager-gui.ui:2371 msgid "Name" msgstr "Название" #: ../resources/modem-manager-gui.ui:2385 msgid "APN" msgstr "APN" #: ../resources/modem-manager-gui.ui:2414 msgid "Connection" msgstr "Соединение" #: ../resources/modem-manager-gui.ui:2446 msgid "Network ID" msgstr "Идентификатор сети" #: ../resources/modem-manager-gui.ui:2470 msgid "Home" msgstr "Домашняя сеть" #: ../resources/modem-manager-gui.ui:2488 msgid "Home and roaming" msgstr "Домашняя сеть и роуминг" #: ../resources/modem-manager-gui.ui:2545 msgid "Access number" msgstr "Номер доступа" #: ../resources/modem-manager-gui.ui:2559 msgid "User name" msgstr "Имя пользователя" #: ../resources/modem-manager-gui.ui:2573 msgid "Password" msgstr "Пароль" #: ../resources/modem-manager-gui.ui:2629 msgid "Authentication" msgstr "Аутентификация" #: ../resources/modem-manager-gui.ui:2658 msgid "Dynamic" msgstr "Динамическая конфигурация" #: ../resources/modem-manager-gui.ui:2676 msgid "Static" msgstr "Статическая конфигурация" #: ../resources/modem-manager-gui.ui:2698 msgid "DNS 1" msgstr "DNS 1" #: ../resources/modem-manager-gui.ui:2712 msgid "DNS 2" msgstr "DNS 2" #: ../resources/modem-manager-gui.ui:2755 msgid "DNS" msgstr "DNS" #: ../resources/modem-manager-gui.ui:2810 msgid "Error" msgstr "Ошибка" #: ../resources/modem-manager-gui.ui:2925 msgid "Ask me again" msgstr "Спросить снова" #: ../resources/modem-manager-gui.ui:2945 msgid "Quit or minimize?" msgstr "Выход или минимизация?" #: ../resources/modem-manager-gui.ui:2959 msgid "What do you want application to do on window close?" msgstr "Что следует сделать при закрытии окна программы?" #: ../resources/modem-manager-gui.ui:2970 msgid "Just quit" msgstr "Просто выйти" #: ../resources/modem-manager-gui.ui:2987 msgid "Minimize to tray or messaging menu" msgstr "Минимизировать в трей или в меню сообщений" #: ../resources/modem-manager-gui.ui:3266 msgid "New SMS message" msgstr "Новое SMS сообщение" #: ../resources/modem-manager-gui.ui:3351 msgid "Number" msgstr "Номер" #: ../resources/modem-manager-gui.ui:3502 msgid "Use sounds for events" msgstr "Использовать звуки событий" #: ../resources/modem-manager-gui.ui:3517 msgid "Hide window to tray on close" msgstr "Скрывать окно в трей при его закрытии" #: ../resources/modem-manager-gui.ui:3532 msgid "Save window geometry and placement" msgstr "Сохранять размеры и положение окна" #: ../resources/modem-manager-gui.ui:3547 msgid "Add program to autostart list" msgstr "Добавить приложение в список для автоматического запуска" #: ../resources/modem-manager-gui.ui:3568 msgid "Behaviour" msgstr "Поведение" #: ../resources/modem-manager-gui.ui:3578 msgid "Behaviour" msgstr "Поведение" #: ../resources/modem-manager-gui.ui:3607 msgid "Concatenate messages" msgstr "Объединять сообщения" #: ../resources/modem-manager-gui.ui:3622 msgid "Expand folders" msgstr "Раскрывать каталоги" #: ../resources/modem-manager-gui.ui:3637 msgid "Place old messages on top" msgstr "Помещать старые сообщения в верх списка" #: ../resources/modem-manager-gui.ui:3658 msgid "Presentation" msgstr "Представление" #: ../resources/modem-manager-gui.ui:3688 msgid "Validity period" msgstr "Период существования" #: ../resources/modem-manager-gui.ui:3699 msgid "Send delivery report if possible" msgstr "Отправлять сообщение о доставке, если это возможно" #: ../resources/modem-manager-gui.ui:3740 msgid "Message parameters" msgstr "Параметры сообщения" #: ../resources/modem-manager-gui.ui:3814 msgid "RX Speed graph color" msgstr "Скорость приёма" #: ../resources/modem-manager-gui.ui:3829 msgid "TX Speed graph color" msgstr "Скорость передачи" #: ../resources/modem-manager-gui.ui:3846 msgid "Traffic" msgstr "Трафик" #: ../resources/modem-manager-gui.ui:3859 msgid "Graphs" msgstr "Графики" #: ../resources/modem-manager-gui.ui:3950 msgid "Preferred backends" msgstr "Предпочтительные модули" #: ../resources/modem-manager-gui.ui:3980 msgid "Enable device" msgstr "Активация устройства" #: ../resources/modem-manager-gui.ui:3993 msgid "Send SMS message" msgstr "Отправка SMS" #: ../resources/modem-manager-gui.ui:4006 msgid "Send USSD request" msgstr "Отправка запроса USSD" #: ../resources/modem-manager-gui.ui:4019 msgid "Scan networks" msgstr "Сканирование сетей" #: ../resources/modem-manager-gui.ui:4108 msgid "Opertions timeouts" msgstr "Таймауты операций" #: ../resources/modem-manager-gui.ui:4128 msgid "Modules" msgstr "Модули" #: ../resources/modem-manager-gui.ui:4152 msgid "Progress" msgstr "Степень выполнения" #: ../resources/modem-manager-gui.ui:4207 msgid "Executing command" msgstr "Выполняется команда" #: ../resources/modem-manager-gui.ui:4246 msgid "Question" msgstr "Вопрос" #: ../resources/modem-manager-gui.ui:4285 msgid "Traffic limits" msgstr "Ограничения" #: ../resources/modem-manager-gui.ui:4347 msgid "Eanble traffic limit" msgstr "Использовать ограничение трафика" #: ../resources/modem-manager-gui.ui:4363 msgid "Enable time limit" msgstr "Использовать ограничение времени" #: ../resources/modem-manager-gui.ui:4410 msgid "Mb" msgstr "МБ" #: ../resources/modem-manager-gui.ui:4411 msgid "Gb" msgstr "ГБ" #: ../resources/modem-manager-gui.ui:4412 msgid "Tb" msgstr "ТБ" #: ../resources/modem-manager-gui.ui:4426 #: ../resources/modem-manager-gui.ui:4526 msgid "Message" msgstr "Сообщение" #: ../resources/modem-manager-gui.ui:4452 #: ../resources/modem-manager-gui.ui:4552 msgid "Action" msgstr "Действие" #: ../resources/modem-manager-gui.ui:4467 #: ../resources/modem-manager-gui.ui:4567 msgid "Show message" msgstr "Показать сообщение" #: ../resources/modem-manager-gui.ui:4468 #: ../resources/modem-manager-gui.ui:4568 msgid "Disconnect" msgstr "Разорвать соединение" #: ../resources/modem-manager-gui.ui:4482 msgid "Time" msgstr "Время" #: ../resources/modem-manager-gui.ui:4511 msgid "Minutes" msgstr "Минуты" #: ../resources/modem-manager-gui.ui:4512 msgid "Hours" msgstr "Часы" #: ../resources/modem-manager-gui.ui:4595 msgid "Traffic statistics" msgstr "Статистика" #: ../resources/modem-manager-gui.ui:4655 msgid "Selected statistics period" msgstr "Выбранный период сбора данных" #: ../resources/modem-manager-gui.ui:4696 msgid "January" msgstr "Январь" #: ../resources/modem-manager-gui.ui:4697 msgid "February" msgstr "Февраль" #: ../resources/modem-manager-gui.ui:4698 msgid "March" msgstr "Март" #: ../resources/modem-manager-gui.ui:4699 msgid "April" msgstr "Апрель" #: ../resources/modem-manager-gui.ui:4700 msgid "May" msgstr "Май" #: ../resources/modem-manager-gui.ui:4701 msgid "June" msgstr "Июнь" #: ../resources/modem-manager-gui.ui:4702 msgid "July" msgstr "Июль" #: ../resources/modem-manager-gui.ui:4703 msgid "August" msgstr "Август" #: ../resources/modem-manager-gui.ui:4704 msgid "September" msgstr "Сентябрь" #: ../resources/modem-manager-gui.ui:4705 msgid "October" msgstr "Октябрь" #: ../resources/modem-manager-gui.ui:4706 msgid "November" msgstr "Ноябрь" #: ../resources/modem-manager-gui.ui:4707 msgid "December" msgstr "Декабрь" #: ../resources/modem-manager-gui.ui:4761 msgid "USSD commands" msgstr "Команды USSD" #: ../resources/modem-manager-gui.ui:4817 msgid "Add new USSD command CTRL+N" msgstr "Добавить новую команду USSD CTRL+N" #: ../resources/modem-manager-gui.ui:4833 msgid "Remove selected USSD command CTRL+D" msgstr "Удалить выбранную команду USSD CTRL+D" #: ../resources/modem-manager-gui.ui:4835 msgid "Delete" msgstr "Удалить" #: ../resources/modem-manager-gui.ui:4859 msgid "Force USSD answer encoding change from GSM7 to UCS2 (useful for Huawei modems) CTRL+E" msgstr "Принудительно конвертировать кодировку ответа USSD из GSM7 в UCS2 (используется для модемов Huawei) CTRL+E" #: ../resources/modem-manager-gui.ui:4861 msgid "Change message encoding" msgstr "Конвертировать кодировку" modem-manager-gui-0.0.17.1/appdata/en_US.po0000664000175000017500000000636212377603605016702 0ustar alexalex# # Translators: msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-05-29 00:41+0400\n" "PO-Revision-Date: 2014-05-28 20:47+0000\n" "Last-Translator: Alex \n" "Language-Team: English (United States) (http://www.transifex.com/projects/p/modem-manager-gui/language/en_US/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en_US\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. (itstool) path: application/name #: modem-manager-gui.appdata.xml.in:7 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #. (itstool) path: application/summary #: modem-manager-gui.appdata.xml.in:8 msgid "Control EDGE/3G/4G broadband modem specific functions" msgstr "Control EDGE/3G/4G broadband modem specific functions" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:10 msgid "" "Simple graphical interface compatible with Modem manager, Wader and oFono " "system services able to control EDGE/3G/4G broadband modem specific " "functions." msgstr "Simple graphical interface compatible with Modem manager, Wader and oFono system services able to control EDGE/3G/4G broadband modem specific functions." #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:14 msgid "" "You can check balance of your SIM card, send or receive SMS messages, " "control mobile traffic consuption and more using Modem Manager GUI." msgstr "You can check balance of your SIM card, send or receive SMS messages, control mobile traffic consuption and more using Modem Manager GUI." #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:18 msgid "Current features:" msgstr "Current features:" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:20 msgid "Create and control mobile broadband connections" msgstr "Create and control mobile broadband connections" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:21 msgid "Send and receive SMS messages and store messages in database" msgstr "Send and receive SMS messages and store messages in database" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:22 msgid "" "Initiate USSD requests and read answers (also using interactive sessions)" msgstr "Initiate USSD requests and read answers (also using interactive sessions)" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:23 msgid "" "View device information: operator name, device mode, IMEI, IMSI, signal " "level" msgstr "View device information: operator name, device mode, IMEI, IMSI, signal level" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:24 msgid "Scan available mobile networks" msgstr "Scan available mobile networks" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:25 msgid "View mobile traffic statistics and set limits" msgstr "View mobile traffic statistics and set limits" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:27 msgid "" "Please note that some features may be not available due to limitations of " "different system services or even different versions of system service in " "use." msgstr "Please note that some features may be not available due to limitations of different system services or even different versions of system service in use." modem-manager-gui-0.0.17.1/appdata/ru.po0000664000175000017500000001024312377603605016310 0ustar alexalex# # Translators: # Alex , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-05-29 00:41+0400\n" "PO-Revision-Date: 2014-05-28 20:50+0000\n" "Last-Translator: Alex \n" "Language-Team: Russian (http://www.transifex.com/projects/p/modem-manager-gui/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. (itstool) path: application/name #: modem-manager-gui.appdata.xml.in:7 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #. (itstool) path: application/summary #: modem-manager-gui.appdata.xml.in:8 msgid "Control EDGE/3G/4G broadband modem specific functions" msgstr "Управление специфическими функциями модемов EDGE/3G/4G" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:10 msgid "" "Simple graphical interface compatible with Modem manager, Wader and oFono " "system services able to control EDGE/3G/4G broadband modem specific " "functions." msgstr "Простой графический интерфейс для управления специфическими функциями модемов EDGE/3G/4G, совместимый с системными службами Modem manager, Wader и oFono." #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:14 msgid "" "You can check balance of your SIM card, send or receive SMS messages, " "control mobile traffic consuption and more using Modem Manager GUI." msgstr "С помощью Modem Manager GUI вы можете проверять баланс своей SIM-карты, отправлять и принимать сообщения SMS, контролировать расход мобильного трафика, а также выполнять другие действия." #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:18 msgid "Current features:" msgstr "Текущие возможности" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:20 msgid "Create and control mobile broadband connections" msgstr "Создание у управление мобильными широкополосными соединениями" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:21 msgid "Send and receive SMS messages and store messages in database" msgstr "Прием и отправка сообщений SMS с их сохранением в базе данных" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:22 msgid "" "Initiate USSD requests and read answers (also using interactive sessions)" msgstr "Отправка запросов USSD и прием ответов (также при работе с интерактивными сессиями)" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:23 msgid "" "View device information: operator name, device mode, IMEI, IMSI, signal " "level" msgstr "Просмотр информации об устройстве: названия оператора, режима работы, IMEI, IMSI, уровня сигнала" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:24 msgid "Scan available mobile networks" msgstr "Поиск доступных мобильных сетей" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:25 msgid "View mobile traffic statistics and set limits" msgstr "Просмотр статистики потребления мобильного трафика и установка ограничений" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:27 msgid "" "Please note that some features may be not available due to limitations of " "different system services or even different versions of system service in " "use." msgstr "Помните о том, что некоторые возможности могут быть недоступны из-за ограничений или особенностей установленной версии системной службы." modem-manager-gui-0.0.17.1/appdata/modem-manager-gui.appdata.pot0000644000175000017500000000432512341447512022746 0ustar alexalexmsgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2014-05-29 01:04+0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. (itstool) path: application/name #: modem-manager-gui.appdata.xml.in:7 msgid "Modem Manager GUI" msgstr "" #. (itstool) path: application/summary #: modem-manager-gui.appdata.xml.in:8 msgid "Control EDGE/3G/4G broadband modem specific functions" msgstr "" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:10 msgid "Simple graphical interface compatible with Modem manager, Wader and oFono system services able to control EDGE/3G/4G broadband modem specific functions." msgstr "" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:14 msgid "You can check balance of your SIM card, send or receive SMS messages, control mobile traffic consuption and more using Modem Manager GUI." msgstr "" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:18 msgid "Current features:" msgstr "" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:20 msgid "Create and control mobile broadband connections" msgstr "" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:21 msgid "Send and receive SMS messages and store messages in database" msgstr "" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:22 msgid "Initiate USSD requests and read answers (also using interactive sessions)" msgstr "" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:23 msgid "View device information: operator name, device mode, IMEI, IMSI, signal level" msgstr "" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:24 msgid "Scan available mobile networks" msgstr "" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:25 msgid "View mobile traffic statistics and set limits" msgstr "" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:27 msgid "Please note that some features may be not available due to limitations of different system services or even different versions of system service in use." msgstr "" modem-manager-gui-0.0.17.1/appdata/Makefile0000644000175000017500000000152612400621760016751 0ustar alexalexinclude ../Makefile_h FILES_PO:=$(wildcard *.po) FILES_MO:=$(patsubst %.po,%.mo,$(FILES_PO)) APPDATADIR = $(PREFIX)/share/appdata all: for f in $(FILES_PO); do \ msgfmt $$f -f -v -o `basename $$f .po`.mo; done itstool -i appdata.its -j modem-manager-gui.appdata.xml.in -o modem-manager-gui.appdata.xml $(FILES_MO); install: install -d $(INSTALLPREFIX)$(DESTDIR)$(APPDATADIR); cp modem-manager-gui.appdata.xml $(INSTALLPREFIX)$(DESTDIR)$(APPDATADIR)/modem-manager-gui.appdata.xml uninstall: rm -f $(INSTALLPREFIX)$(DESTDIR)$(APPDATADIR)/modem-manager-gui.appdata.xml messages: itstool -i appdata.its -o modem-manager-gui.appdata.pot modem-manager-gui.appdata.xml.in for f in $(FILES_PO); do \ msgmerge -U $$f modem-manager-gui.appdata.pot; done clean: for f in $(FILES_MO); do \ rm -f $$f; done rm -f modem-manager-gui.appdata.xml modem-manager-gui-0.0.17.1/appdata/modem-manager-gui.appdata.xml.in0000644000175000017500000000351112375701440023345 0ustar alexalex modem-manager-gui.desktop CC0-1.0 GPL-3.0+ and CC0-1.0 Modem Manager GUI Control EDGE/3G/4G broadband modem specific functions

Simple graphical interface compatible with Modem manager, Wader and oFono system services able to control EDGE/3G/4G broadband modem specific functions.

You can check balance of your SIM card, send or receive SMS messages, control mobile traffic consuption and more using Modem Manager GUI.

Current features:

  • Send and receive SMS messages and store messages in database
  • Initiate USSD requests and read answers (also using interactive sessions)
  • View device information: operator name, device mode, IMEI, IMSI, signal level
  • Scan available mobile networks
  • View mobile traffic statistics and set limits

Please note that some features may be not available due to limitations of different system services or even different versions of system service in use.

http://download.tuxfamily.org/gsf/appdata/mmgui-devices.png http://download.tuxfamily.org/gsf/appdata/mmgui-sms.png http://download.tuxfamily.org/gsf/appdata/mmgui-traffic.png http://linuxonly.ru/cms/page.php?7 alex@linuxonly.ru
modem-manager-gui-0.0.17.1/appdata/uz@Latn.po0000664000175000017500000000646312377603606017251 0ustar alexalex# # Translators: # Umid Almasov , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-05-29 00:41+0400\n" "PO-Revision-Date: 2014-08-26 12:50+0000\n" "Last-Translator: Umid Almasov \n" "Language-Team: Uzbek (Latin) (http://www.transifex.com/projects/p/modem-manager-gui/language/uz@Latn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: uz@Latn\n" "Plural-Forms: nplurals=1; plural=0;\n" #. (itstool) path: application/name #: modem-manager-gui.appdata.xml.in:7 msgid "Modem Manager GUI" msgstr "Modem Manager GUI" #. (itstool) path: application/summary #: modem-manager-gui.appdata.xml.in:8 msgid "Control EDGE/3G/4G broadband modem specific functions" msgstr "EDGE/3G/4G keng tezlikdagi modem maxsus funksiyalarini boshqarish" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:10 msgid "" "Simple graphical interface compatible with Modem manager, Wader and oFono " "system services able to control EDGE/3G/4G broadband modem specific " "functions." msgstr "EDGE/3G/4G keng tezlikdagi modem maxsus funksiyalarini boshqarish imkoniyatiga ega Modem manager, Wader va oFono tizim xizmatlariga mos keladigan oddiy grafik interfeysi." #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:14 msgid "" "You can check balance of your SIM card, send or receive SMS messages, " "control mobile traffic consuption and more using Modem Manager GUI." msgstr "Modem Manager GUI dasturidan foydalanib siz SIM-kartaning balansini tekshirish, SMS xabarlarini qabul qilish va yuborish, mobil trafik xarajatlarini boshqarish va boshqa imkoniyatlarga ega bo'lasiz." #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:18 msgid "Current features:" msgstr "Joriy xossalar:" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:20 msgid "Create and control mobile broadband connections" msgstr "Mobil keng tezlikdagi ulanishlarni yaratish va boshqarish" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:21 msgid "Send and receive SMS messages and store messages in database" msgstr "SMS xabarlarni yuborish va qabul qilish va xabarlarni ma'lumot bazasida saqlash" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:22 msgid "" "Initiate USSD requests and read answers (also using interactive sessions)" msgstr "USSD so'rovlarni yuborish va javoblarni o'qish (o'zaro faol seanslardan foydalangan holda ham)" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:23 msgid "" "View device information: operator name, device mode, IMEI, IMSI, signal " "level" msgstr "Qurilma haqida ma'lumotni ko'rish: operator nomi, qurilma rejimi, IMEI, IMSI, signal darajasi" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:24 msgid "Scan available mobile networks" msgstr "Mavjud bo'lgan mobil tarmoqlarni tekshirish" #. (itstool) path: ul/li #: modem-manager-gui.appdata.xml.in:25 msgid "View mobile traffic statistics and set limits" msgstr "Mobil trafik statistikasini ko'rish va cheklov qo'yish" #. (itstool) path: description/p #: modem-manager-gui.appdata.xml.in:27 msgid "" "Please note that some features may be not available due to limitations of " "different system services or even different versions of system service in " "use." msgstr "" modem-manager-gui-0.0.17.1/appdata/appdata.its0000644000175000017500000000053012341373460017443 0ustar alexalex modem-manager-gui-0.0.17.1/man/ru.po0000664000175000017500000001244612377603675015467 0ustar alexalex# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # # Translators: # Alex , 2013-2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-04-10 20:49+0400\n" "PO-Revision-Date: 2014-05-28 20:51+0000\n" "Last-Translator: Alex \n" "Language-Team: Russian (http://www.transifex.com/projects/p/modem-manager-gui/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "modem-manager-gui" msgstr "modem-manager-gui" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Apr 2014" msgstr "Апр 2014" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Modem Manager GUI v0.0.17" msgstr "Modem Manager GUI 0.0.17" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "User Commands" msgstr "Команды пользовательского уровня" #. type: SH #: modem-manager-gui.1:2 #, no-wrap msgid "NAME" msgstr "ИМЯ" #. type: Plain text #: modem-manager-gui.1:4 msgid "" "modem-manager-gui - simple graphical interface for Modem Manager daemon." msgstr "modem-manager-gui - простой графический интерфейс для демона Modem Manager." #. type: SH #: modem-manager-gui.1:4 #, no-wrap msgid "SYNOPSIS" msgstr "СИНТАКСИС" #. type: Plain text #: modem-manager-gui.1:7 msgid "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." msgstr "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." #. type: SH #: modem-manager-gui.1:7 #, no-wrap msgid "DESCRIPTION" msgstr "ОПИСАНИЕ" #. type: Plain text #: modem-manager-gui.1:11 msgid "" "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader " "and oFono daemons using dbus interface." msgstr "Данная программа является простым графическим интерфейсом для демонов Modem Manager 0.6/0.7 Wader и oFono, использующим интерфейс dbus." #. type: TP #: modem-manager-gui.1:11 #, no-wrap msgid "B<-i, --invisible>" msgstr "B<-i, --invisible>" #. type: Plain text #: modem-manager-gui.1:14 msgid "Do not show window on start" msgstr "Не показывать окно при запуске" #. type: TP #: modem-manager-gui.1:14 #, no-wrap msgid "B<-m, --mmmodule>" msgstr "B<-m, --mmmodule>" #. type: Plain text #: modem-manager-gui.1:17 msgid "Use specified modem management module" msgstr "Использовать указанный модуль поддержки системы управления модемами" #. type: TP #: modem-manager-gui.1:17 #, no-wrap msgid "B<-c, --cmmodule>" msgstr "B<-c, --cmmodule>" #. type: Plain text #: modem-manager-gui.1:20 msgid "Use specified connection management module" msgstr "Использовать указанный модуль поддержки системы управления соединениями" #. type: TP #: modem-manager-gui.1:20 #, no-wrap msgid "B<-l, --listmodules>" msgstr "B<-l, --listmodules>" #. type: Plain text #: modem-manager-gui.1:23 msgid "List all available modules and exit" msgstr "Вывести список всех доступных модулей и выйти" #. type: SH #: modem-manager-gui.1:23 #, no-wrap msgid "AUTHOR" msgstr "АВТОР" #. type: Plain text #: modem-manager-gui.1:25 msgid "Written by Alex. See the about dialog for all contributors." msgstr "Основным разработчиком является Alex. Имена других участников процесса разработки находятся в диалоге сведений о программе." #. type: SH #: modem-manager-gui.1:25 #, no-wrap msgid "REPORTING BUGS" msgstr "ОШИБКИ" #. type: Plain text #: modem-manager-gui.1:28 msgid "" "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on" " site Ehttp://linuxonly.ruE." msgstr "Сообщения об ошибках отправляйте на адрес электронной почты Ealex@linuxonly.ruE, либо оcтавляйте в разделе BUGTRACKER сайта Ehttp://linuxonly.ruE." #. type: SH #: modem-manager-gui.1:28 #, no-wrap msgid "COPYRIGHT" msgstr "АВТОРСКИЕ ПРАВА" #. type: Plain text #: modem-manager-gui.1:30 msgid "Copyright \\(co 2012-2014 Alex" msgstr "Copyright \\(co 2012-2014 Alex" #. type: Plain text #: modem-manager-gui.1:33 msgid "" "This is free software. You may redistribute copies of it under the terms of" " the GNU General Public License " "Ehttp://www.gnu.org/licenses/gpl.htmlE." msgstr "Это свободное программное обеспечение. Вы можете распространять его копии в соответствии с условиями лицензии GNU General Public License Ehttp://www.gnu.org/licenses/gpl.htmlE." #. type: SH #: modem-manager-gui.1:33 #, no-wrap msgid "SEE ALSO" msgstr "СМ. ТАКЖЕ" #. type: Plain text #: modem-manager-gui.1:34 msgid "B(1)" msgstr "B(1)" modem-manager-gui-0.0.17.1/man/id.po0000664000175000017500000001060312377603700015413 0ustar alexalex# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # # Translators: # Ade Malsasa Akbar , 2014 # Arif Budiman , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-04-10 20:49+0400\n" "PO-Revision-Date: 2014-05-28 20:47+0000\n" "Last-Translator: Alex \n" "Language-Team: Indonesian (http://www.transifex.com/projects/p/modem-manager-gui/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: id\n" "Plural-Forms: nplurals=1; plural=0;\n" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "modem-manager-gui" msgstr "modem-manager-gui" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Apr 2014" msgstr "Apr 2014" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Modem Manager GUI v0.0.17" msgstr "Modem Manager GUI v0.0.17" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "User Commands" msgstr "Perintah-Perintah" #. type: SH #: modem-manager-gui.1:2 #, no-wrap msgid "NAME" msgstr "NAMA" #. type: Plain text #: modem-manager-gui.1:4 msgid "" "modem-manager-gui - simple graphical interface for Modem Manager daemon." msgstr "modem-manager-gui - antarmuka grafis sederhana untuk daemon Modem Manager" #. type: SH #: modem-manager-gui.1:4 #, no-wrap msgid "SYNOPSIS" msgstr "SINOPSIS" #. type: Plain text #: modem-manager-gui.1:7 msgid "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." msgstr "" #. type: SH #: modem-manager-gui.1:7 #, no-wrap msgid "DESCRIPTION" msgstr "DESKRIPSI" #. type: Plain text #: modem-manager-gui.1:11 msgid "" "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader " "and oFono daemons using dbus interface." msgstr "Program ini adalah antarmuka grafis untuk daemon Modem Manager 0.6/0.7, Wader, dan oFono menggunakan antarmuka dbus." #. type: TP #: modem-manager-gui.1:11 #, no-wrap msgid "B<-i, --invisible>" msgstr "B<-i, --invisible>" #. type: Plain text #: modem-manager-gui.1:14 msgid "Do not show window on start" msgstr "Jangan tampilkan jendela saat dijalankan." #. type: TP #: modem-manager-gui.1:14 #, no-wrap msgid "B<-m, --mmmodule>" msgstr "B<-m, --mmmodule>" #. type: Plain text #: modem-manager-gui.1:17 msgid "Use specified modem management module" msgstr "Gunakan modul manajemen modem yang telah ditentukan" #. type: TP #: modem-manager-gui.1:17 #, no-wrap msgid "B<-c, --cmmodule>" msgstr "B<-c, --cmmodule>" #. type: Plain text #: modem-manager-gui.1:20 msgid "Use specified connection management module" msgstr "Gunakan modul manajemen koneksi yang telah ditentukan" #. type: TP #: modem-manager-gui.1:20 #, no-wrap msgid "B<-l, --listmodules>" msgstr "B<-l, --listmodules>" #. type: Plain text #: modem-manager-gui.1:23 msgid "List all available modules and exit" msgstr "Menampilkan semua modul yang tersedia dan keluar" #. type: SH #: modem-manager-gui.1:23 #, no-wrap msgid "AUTHOR" msgstr "PENCIPTA" #. type: Plain text #: modem-manager-gui.1:25 msgid "Written by Alex. See the about dialog for all contributors." msgstr "Ditulis oleh Alex. Lihat dialog Tentang untuk seluruh kontributor." #. type: SH #: modem-manager-gui.1:25 #, no-wrap msgid "REPORTING BUGS" msgstr "MELAPORKAN BUG" #. type: Plain text #: modem-manager-gui.1:28 msgid "" "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on" " site Ehttp://linuxonly.ruE." msgstr "Laporkan bug ke Ealex@linuxonly.ruE, atau ke bagian bug tracker pada situs Ehttp://linuxonly.ruE." #. type: SH #: modem-manager-gui.1:28 #, no-wrap msgid "COPYRIGHT" msgstr "HAK CIPTA" #. type: Plain text #: modem-manager-gui.1:30 msgid "Copyright \\(co 2012-2014 Alex" msgstr "Hak cipta \\(co 2012-2014 Alex" #. type: Plain text #: modem-manager-gui.1:33 msgid "" "This is free software. You may redistribute copies of it under the terms of" " the GNU General Public License " "Ehttp://www.gnu.org/licenses/gpl.htmlE." msgstr "Ini adalah perangkat lunak bebas. Anda boleh mendistribusikan ulang salinannya di bawah aturan GNU General Public License Ehttp://www.gnu.org/licenses/gpl.htmlE." #. type: SH #: modem-manager-gui.1:33 #, no-wrap msgid "SEE ALSO" msgstr "LIHAT JUGA" #. type: Plain text #: modem-manager-gui.1:34 msgid "B(1)" msgstr "B(1)" modem-manager-gui-0.0.17.1/man/en_US.po0000664000175000017500000001046112377603677016047 0ustar alexalex# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # # Translators: msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-04-10 20:49+0400\n" "PO-Revision-Date: 2014-05-28 20:47+0000\n" "Last-Translator: Alex \n" "Language-Team: English (United States) (http://www.transifex.com/projects/p/modem-manager-gui/language/en_US/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en_US\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "modem-manager-gui" msgstr "modem-manager-gui" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Apr 2014" msgstr "Apr 2014" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Modem Manager GUI v0.0.17" msgstr "Modem Manager GUI v0.0.17" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "User Commands" msgstr "User Commands" #. type: SH #: modem-manager-gui.1:2 #, no-wrap msgid "NAME" msgstr "NAME" #. type: Plain text #: modem-manager-gui.1:4 msgid "" "modem-manager-gui - simple graphical interface for Modem Manager daemon." msgstr "modem-manager-gui - simple graphical interface for Modem Manager daemon." #. type: SH #: modem-manager-gui.1:4 #, no-wrap msgid "SYNOPSIS" msgstr "SYNOPSIS" #. type: Plain text #: modem-manager-gui.1:7 msgid "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." msgstr "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." #. type: SH #: modem-manager-gui.1:7 #, no-wrap msgid "DESCRIPTION" msgstr "DESCRIPTION" #. type: Plain text #: modem-manager-gui.1:11 msgid "" "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader " "and oFono daemons using dbus interface." msgstr "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader and oFono daemons using dbus interface." #. type: TP #: modem-manager-gui.1:11 #, no-wrap msgid "B<-i, --invisible>" msgstr "B<-i, --invisible>" #. type: Plain text #: modem-manager-gui.1:14 msgid "Do not show window on start" msgstr "Do not show window on start" #. type: TP #: modem-manager-gui.1:14 #, no-wrap msgid "B<-m, --mmmodule>" msgstr "B<-m, --mmmodule>" #. type: Plain text #: modem-manager-gui.1:17 msgid "Use specified modem management module" msgstr "Use specified modem management module" #. type: TP #: modem-manager-gui.1:17 #, no-wrap msgid "B<-c, --cmmodule>" msgstr "B<-c, --cmmodule>" #. type: Plain text #: modem-manager-gui.1:20 msgid "Use specified connection management module" msgstr "Use specified connection management module" #. type: TP #: modem-manager-gui.1:20 #, no-wrap msgid "B<-l, --listmodules>" msgstr "B<-l, --listmodules>" #. type: Plain text #: modem-manager-gui.1:23 msgid "List all available modules and exit" msgstr "List all available modules and exit" #. type: SH #: modem-manager-gui.1:23 #, no-wrap msgid "AUTHOR" msgstr "AUTHOR" #. type: Plain text #: modem-manager-gui.1:25 msgid "Written by Alex. See the about dialog for all contributors." msgstr "Written by Alex. See the about dialog for all contributors." #. type: SH #: modem-manager-gui.1:25 #, no-wrap msgid "REPORTING BUGS" msgstr "REPORTING BUGS" #. type: Plain text #: modem-manager-gui.1:28 msgid "" "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on" " site Ehttp://linuxonly.ruE." msgstr "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on site Ehttp://linuxonly.ruE." #. type: SH #: modem-manager-gui.1:28 #, no-wrap msgid "COPYRIGHT" msgstr "COPYRIGHT" #. type: Plain text #: modem-manager-gui.1:30 msgid "Copyright \\(co 2012-2014 Alex" msgstr "Copyright \\(co 2012-2014 Alex" #. type: Plain text #: modem-manager-gui.1:33 msgid "" "This is free software. You may redistribute copies of it under the terms of" " the GNU General Public License " "Ehttp://www.gnu.org/licenses/gpl.htmlE." msgstr "This is free software. You may redistribute copies of it under the terms of the GNU General Public License Ehttp://www.gnu.org/licenses/gpl.htmlE." #. type: SH #: modem-manager-gui.1:33 #, no-wrap msgid "SEE ALSO" msgstr "SEE ALSO" #. type: Plain text #: modem-manager-gui.1:34 msgid "B(1)" msgstr "B(1)" modem-manager-gui-0.0.17.1/man/modem-manager-gui.pot0000644000175000017500000000642412321551232020471 0ustar alexalex# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2014-04-10 20:49+0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "modem-manager-gui" msgstr "" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Apr 2014" msgstr "" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Modem Manager GUI v0.0.17" msgstr "" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "User Commands" msgstr "" #. type: SH #: modem-manager-gui.1:2 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: modem-manager-gui.1:4 msgid "modem-manager-gui - simple graphical interface for Modem Manager daemon." msgstr "" #. type: SH #: modem-manager-gui.1:4 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: modem-manager-gui.1:7 msgid "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." msgstr "" #. type: SH #: modem-manager-gui.1:7 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: modem-manager-gui.1:11 msgid "" "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader " "and oFono daemons using dbus interface." msgstr "" #. type: TP #: modem-manager-gui.1:11 #, no-wrap msgid "B<-i, --invisible>" msgstr "" #. type: Plain text #: modem-manager-gui.1:14 msgid "Do not show window on start" msgstr "" #. type: TP #: modem-manager-gui.1:14 #, no-wrap msgid "B<-m, --mmmodule>" msgstr "" #. type: Plain text #: modem-manager-gui.1:17 msgid "Use specified modem management module" msgstr "" #. type: TP #: modem-manager-gui.1:17 #, no-wrap msgid "B<-c, --cmmodule>" msgstr "" #. type: Plain text #: modem-manager-gui.1:20 msgid "Use specified connection management module" msgstr "" #. type: TP #: modem-manager-gui.1:20 #, no-wrap msgid "B<-l, --listmodules>" msgstr "" #. type: Plain text #: modem-manager-gui.1:23 msgid "List all available modules and exit" msgstr "" #. type: SH #: modem-manager-gui.1:23 #, no-wrap msgid "AUTHOR" msgstr "" #. type: Plain text #: modem-manager-gui.1:25 msgid "Written by Alex. See the about dialog for all contributors." msgstr "" #. type: SH #: modem-manager-gui.1:25 #, no-wrap msgid "REPORTING BUGS" msgstr "" #. type: Plain text #: modem-manager-gui.1:28 msgid "" "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on " "site Ehttp://linuxonly.ruE." msgstr "" #. type: SH #: modem-manager-gui.1:28 #, no-wrap msgid "COPYRIGHT" msgstr "" #. type: Plain text #: modem-manager-gui.1:30 msgid "Copyright \\(co 2012-2014 Alex" msgstr "" #. type: Plain text #: modem-manager-gui.1:33 msgid "" "This is free software. You may redistribute copies of it under the terms of " "the GNU General Public License " "Ehttp://www.gnu.org/licenses/gpl.htmlE." msgstr "" #. type: SH #: modem-manager-gui.1:33 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: modem-manager-gui.1:34 msgid "B(1)" msgstr "" modem-manager-gui-0.0.17.1/man/uz@Latn.po0000664000175000017500000000733412377603700016403 0ustar alexalex# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # # Translators: # Umid Almasov , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-04-10 20:49+0400\n" "PO-Revision-Date: 2014-05-28 20:47+0000\n" "Last-Translator: Alex \n" "Language-Team: Uzbek (Latin) (http://www.transifex.com/projects/p/modem-manager-gui/language/uz@Latn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: uz@Latn\n" "Plural-Forms: nplurals=1; plural=0;\n" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "modem-manager-gui" msgstr "modem-manager-gui" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Apr 2014" msgstr "Apr. 2014" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Modem Manager GUI v0.0.17" msgstr "Modem Manager GUI v0.0.17" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "User Commands" msgstr "Foydalanuvchi buyruqlari" #. type: SH #: modem-manager-gui.1:2 #, no-wrap msgid "NAME" msgstr "NOMI" #. type: Plain text #: modem-manager-gui.1:4 msgid "" "modem-manager-gui - simple graphical interface for Modem Manager daemon." msgstr "modem-manager-gui - Modem Manager demoni uchun oddiy grafik interfeys." #. type: SH #: modem-manager-gui.1:4 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: modem-manager-gui.1:7 msgid "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." msgstr "" #. type: SH #: modem-manager-gui.1:7 #, no-wrap msgid "DESCRIPTION" msgstr "TAVSIFI" #. type: Plain text #: modem-manager-gui.1:11 msgid "" "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader " "and oFono daemons using dbus interface." msgstr "" #. type: TP #: modem-manager-gui.1:11 #, no-wrap msgid "B<-i, --invisible>" msgstr "B<-i, --invisible>" #. type: Plain text #: modem-manager-gui.1:14 msgid "Do not show window on start" msgstr "" #. type: TP #: modem-manager-gui.1:14 #, no-wrap msgid "B<-m, --mmmodule>" msgstr "B<-m, --mmmodule>" #. type: Plain text #: modem-manager-gui.1:17 msgid "Use specified modem management module" msgstr "" #. type: TP #: modem-manager-gui.1:17 #, no-wrap msgid "B<-c, --cmmodule>" msgstr "B<-c, --cmmodule>" #. type: Plain text #: modem-manager-gui.1:20 msgid "Use specified connection management module" msgstr "" #. type: TP #: modem-manager-gui.1:20 #, no-wrap msgid "B<-l, --listmodules>" msgstr "B<-l, --listmodules>" #. type: Plain text #: modem-manager-gui.1:23 msgid "List all available modules and exit" msgstr "" #. type: SH #: modem-manager-gui.1:23 #, no-wrap msgid "AUTHOR" msgstr "MUALLIF" #. type: Plain text #: modem-manager-gui.1:25 msgid "Written by Alex. See the about dialog for all contributors." msgstr "" #. type: SH #: modem-manager-gui.1:25 #, no-wrap msgid "REPORTING BUGS" msgstr "XATOLAR HAQIDA XABAR BERISH" #. type: Plain text #: modem-manager-gui.1:28 msgid "" "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on" " site Ehttp://linuxonly.ruE." msgstr "" #. type: SH #: modem-manager-gui.1:28 #, no-wrap msgid "COPYRIGHT" msgstr "MUALLIFLIK HUQUQI" #. type: Plain text #: modem-manager-gui.1:30 msgid "Copyright \\(co 2012-2014 Alex" msgstr "Mualliflik huquqi \\(co 2012-2014 Alex" #. type: Plain text #: modem-manager-gui.1:33 msgid "" "This is free software. You may redistribute copies of it under the terms of" " the GNU General Public License " "Ehttp://www.gnu.org/licenses/gpl.htmlE." msgstr "" #. type: SH #: modem-manager-gui.1:33 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: modem-manager-gui.1:34 msgid "B(1)" msgstr "B(1)" modem-manager-gui-0.0.17.1/man/pt_BR.po0000664000175000017500000001072712377603676016050 0ustar alexalex# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # # Translators: # Rafael Ferreira , 2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-04-10 20:49+0400\n" "PO-Revision-Date: 2014-05-29 03:22+0000\n" "Last-Translator: Rafael Ferreira \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/modem-manager-gui/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "modem-manager-gui" msgstr "modem-manager-gui" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Apr 2014" msgstr "Abril de 2014" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Modem Manager GUI v0.0.17" msgstr "Modem Manager GUI v0.0.17" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "User Commands" msgstr "Comandos do Usuário" #. type: SH #: modem-manager-gui.1:2 #, no-wrap msgid "NAME" msgstr "NOME" #. type: Plain text #: modem-manager-gui.1:4 msgid "" "modem-manager-gui - simple graphical interface for Modem Manager daemon." msgstr "modem-manager-gui - interface gráfica simples para o daemon do Modem Manager." #. type: SH #: modem-manager-gui.1:4 #, no-wrap msgid "SYNOPSIS" msgstr "SINOPSE" #. type: Plain text #: modem-manager-gui.1:7 msgid "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." msgstr "B [ -i ] [ -m módulo ] [ -c módulo ] [ -l ]..." #. type: SH #: modem-manager-gui.1:7 #, no-wrap msgid "DESCRIPTION" msgstr "DESCRIÇÃO" #. type: Plain text #: modem-manager-gui.1:11 msgid "" "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader " "and oFono daemons using dbus interface." msgstr "Esse programa é uma interface gráfica simples para os daemons de Modem Manager 0.6/0.7, Wader e oFono usando interface dbus." #. type: TP #: modem-manager-gui.1:11 #, no-wrap msgid "B<-i, --invisible>" msgstr "B<-i, --invisible>" #. type: Plain text #: modem-manager-gui.1:14 msgid "Do not show window on start" msgstr "Não mostra a janela ao iniciar" #. type: TP #: modem-manager-gui.1:14 #, no-wrap msgid "B<-m, --mmmodule>" msgstr "B<-m, --mmmodule>" #. type: Plain text #: modem-manager-gui.1:17 msgid "Use specified modem management module" msgstr "Usa o módulo de gerenciamento de modem especificado" #. type: TP #: modem-manager-gui.1:17 #, no-wrap msgid "B<-c, --cmmodule>" msgstr "B<-c, --cmmodule>" #. type: Plain text #: modem-manager-gui.1:20 msgid "Use specified connection management module" msgstr "Usa o módulo de gerenciamento de conexão especificado" #. type: TP #: modem-manager-gui.1:20 #, no-wrap msgid "B<-l, --listmodules>" msgstr "B<-l, --listmodules>" #. type: Plain text #: modem-manager-gui.1:23 msgid "List all available modules and exit" msgstr "Lista todos os módulos disponíveis e sai" #. type: SH #: modem-manager-gui.1:23 #, no-wrap msgid "AUTHOR" msgstr "AUTOR" #. type: Plain text #: modem-manager-gui.1:25 msgid "Written by Alex. See the about dialog for all contributors." msgstr "Escrito por Alex. Veja a informação de Sobre para todas os contribuidores." #. type: SH #: modem-manager-gui.1:25 #, no-wrap msgid "REPORTING BUGS" msgstr "RELATANDO ERROS" #. type: Plain text #: modem-manager-gui.1:28 msgid "" "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on" " site Ehttp://linuxonly.ruE." msgstr "Relate erros para Ealex@linuxonly.ruE ou para a seção de acompanhamento de erros no site Ehttp://linuxonly.ruE." #. type: SH #: modem-manager-gui.1:28 #, no-wrap msgid "COPYRIGHT" msgstr "COPYRIGHT" #. type: Plain text #: modem-manager-gui.1:30 msgid "Copyright \\(co 2012-2014 Alex" msgstr "Copyright \\(co 2012-2014 Alex" #. type: Plain text #: modem-manager-gui.1:33 msgid "" "This is free software. You may redistribute copies of it under the terms of" " the GNU General Public License " "Ehttp://www.gnu.org/licenses/gpl.htmlE." msgstr "Esse é um software livre. Você pode redistribuir cópias dele sob os termos da Licença Pública Geral GNU Ehttp://www.gnu.org/licenses/gpl.htmlE." #. type: SH #: modem-manager-gui.1:33 #, no-wrap msgid "SEE ALSO" msgstr "VEJA TAMBÉM" #. type: Plain text #: modem-manager-gui.1:34 msgid "B(1)" msgstr "B(1)" modem-manager-gui-0.0.17.1/man/modem-manager-gui.10000644000175000017500000000203712321551204020022 0ustar alexalex.TH modem-manager-gui "1" "Apr 2014" "Modem Manager GUI v0.0.17" "User Commands" .SH NAME modem-manager-gui \- simple graphical interface for Modem Manager daemon. .SH SYNOPSIS .B modem-manager-gui [ -i ] [ -m module ] [ -c module ] [ -l ]... .SH DESCRIPTION .PP This program is simple graphical interface for Modem Manager 0.6/0.7, Wader and oFono daemons using dbus interface. .TP \fB\-i, \-\-invisible\fR Do not show window on start .TP \fB\-m, \-\-mmmodule\fR Use specified modem management module .TP \fB\-c, \-\-cmmodule\fR Use specified connection management module .TP \fB\-l, \-\-listmodules\fR List all available modules and exit .SH AUTHOR Written by Alex. See the about dialog for all contributors. .SH "REPORTING BUGS" Report bugs to , or to the bug tracker section on site . .SH COPYRIGHT Copyright \(co 2012-2014 Alex .br This is free software. You may redistribute copies of it under the terms of the GNU General Public License . .SH "SEE ALSO" \fBmmcli\fR(1) modem-manager-gui-0.0.17.1/man/de.po0000664000175000017500000000777212377603676015440 0ustar alexalex# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # # Translators: # Mario Blättermann , 2013-2014 msgid "" msgstr "" "Project-Id-Version: Modem Manager GUI\n" "POT-Creation-Date: 2014-04-10 20:49+0400\n" "PO-Revision-Date: 2014-08-27 17:18+0000\n" "Last-Translator: Alex \n" "Language-Team: German (http://www.transifex.com/projects/p/modem-manager-gui/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "modem-manager-gui" msgstr "modem-manager-gui" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Apr 2014" msgstr "" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "Modem Manager GUI v0.0.17" msgstr "" #. type: TH #: modem-manager-gui.1:1 #, no-wrap msgid "User Commands" msgstr "Benutzer-Befehle" #. type: SH #: modem-manager-gui.1:2 #, no-wrap msgid "NAME" msgstr "BEZEICHNUNG" #. type: Plain text #: modem-manager-gui.1:4 msgid "" "modem-manager-gui - simple graphical interface for Modem Manager daemon." msgstr "modem-manager-gui - Einfache grafische Oberfläche für den ModemManager-Daemon." #. type: SH #: modem-manager-gui.1:4 #, no-wrap msgid "SYNOPSIS" msgstr "ÜBERSICHT" #. type: Plain text #: modem-manager-gui.1:7 msgid "B [ -i ] [ -m module ] [ -c module ] [ -l ]..." msgstr "" #. type: SH #: modem-manager-gui.1:7 #, no-wrap msgid "DESCRIPTION" msgstr "BESCHREIBUNG" #. type: Plain text #: modem-manager-gui.1:11 msgid "" "This program is simple graphical interface for Modem Manager 0.6/0.7, Wader " "and oFono daemons using dbus interface." msgstr "" #. type: TP #: modem-manager-gui.1:11 #, no-wrap msgid "B<-i, --invisible>" msgstr "B<-i, --invisible>" #. type: Plain text #: modem-manager-gui.1:14 msgid "Do not show window on start" msgstr "Beim Start kein Fenster öffnen" #. type: TP #: modem-manager-gui.1:14 #, no-wrap msgid "B<-m, --mmmodule>" msgstr "" #. type: Plain text #: modem-manager-gui.1:17 msgid "Use specified modem management module" msgstr "" #. type: TP #: modem-manager-gui.1:17 #, no-wrap msgid "B<-c, --cmmodule>" msgstr "" #. type: Plain text #: modem-manager-gui.1:20 msgid "Use specified connection management module" msgstr "" #. type: TP #: modem-manager-gui.1:20 #, no-wrap msgid "B<-l, --listmodules>" msgstr "" #. type: Plain text #: modem-manager-gui.1:23 msgid "List all available modules and exit" msgstr "" #. type: SH #: modem-manager-gui.1:23 #, no-wrap msgid "AUTHOR" msgstr "AUTOR" #. type: Plain text #: modem-manager-gui.1:25 msgid "Written by Alex. See the about dialog for all contributors." msgstr "Geschrieben von Alex. Im Informationsdialog finden Sie eine Liste aller Mitwirkenden." #. type: SH #: modem-manager-gui.1:25 #, no-wrap msgid "REPORTING BUGS" msgstr "FEHLER MELDEN" #. type: Plain text #: modem-manager-gui.1:28 msgid "" "Report bugs to Ealex@linuxonly.ruE, or to the bug tracker section on" " site Ehttp://linuxonly.ruE." msgstr "Melden Sie Fehler an Ealex@linuxonly.ruE oder im Fehlererfassungssystem auf Ehttp://linuxonly.ruE." #. type: SH #: modem-manager-gui.1:28 #, no-wrap msgid "COPYRIGHT" msgstr "COPYRIGHT" #. type: Plain text #: modem-manager-gui.1:30 msgid "Copyright \\(co 2012-2014 Alex" msgstr "" #. type: Plain text #: modem-manager-gui.1:33 msgid "" "This is free software. You may redistribute copies of it under the terms of" " the GNU General Public License " "Ehttp://www.gnu.org/licenses/gpl.htmlE." msgstr "Dies ist freie Software. Sie können Kopien davon unter den Bedingungen der GNU General Public License Ehttp://www.gnu.org/licenses/gpl.htmlE weitergeben." #. type: SH #: modem-manager-gui.1:33 #, no-wrap msgid "SEE ALSO" msgstr "SIEHE AUCH" #. type: Plain text #: modem-manager-gui.1:34 msgid "B(1)" msgstr "B(1)" modem-manager-gui-0.0.17.1/man/Makefile0000644000175000017500000000223612401044022016100 0ustar alexalexinclude ../Makefile_h FILES_MAN:=$(wildcard *.1) FILES_MAN:= $(filter-out modem-manager-gui.1, $(FILES_MAN)) FILES_PO:=$(wildcard *.po) CMANDIR = $(PREFIX)/share/man/man1 LMANDIR = $(PREFIX)/share/man/ LMANFILE = /man1/modem-manager-gui.1 all: for f in $(FILES_PO); do \ po4a-translate -f man -m modem-manager-gui.1 -p $$f -l `basename $$f .po`.1 -k 5; \ done install: install -d $(INSTALLPREFIX)$(DESTDIR)$(CMANDIR); install -m 644 modem-manager-gui.1 $(INSTALLPREFIX)$(DESTDIR)$(CMANDIR); gzip -f --best $(INSTALLPREFIX)$(DESTDIR)$(CMANDIR)/modem-manager-gui.1; for f in $(FILES_MAN); do \ install -d $(INSTALLPREFIX)$(DESTDIR)$(LMANDIR)`basename $$f .1`/man1; \ cp $$f $(INSTALLPREFIX)$(DESTDIR)$(LMANDIR)`basename $$f .1`$(LMANFILE); \ gzip -f --best $(INSTALLPREFIX)$(DESTDIR)$(LMANDIR)`basename $$f .1`$(LMANFILE); \ done uninstall: rm -f $(INSTALLPREFIX)$(DESTDIR)$(CMANDIR)/modem-manager-gui.1.gz; for f in $(FILES_MAN); do \ rm -f $(INSTALLPREFIX)$(DESTDIR)$(LMANDIR)`basename $$f .1`$(LMANFILE).gz; \ done messages: po4a-gettextize -f man -m modem-manager-gui.1 -p modem-manager-gui.pot clean: for f in $(FILES_MAN); do \ rm -f $$f; \ done modem-manager-gui-0.0.17.1/Changelog0000644000175000017500000000227012400622164015505 0ustar alexalex* Thu Aug 28 2014 * Version 0.0.17 release * Sat Jul 20 2013 * Version 0.0.16 release * Sat Jan 12 2013 * Icons for SMS folders added * Wed Jan 2 2013 * Ukrainian localization added * Mon Dec 31 2012 Alex * USSD session support and additional request validation * USSD commands list added * SMS folders added * SMS concatenation can be disabled * Uzbek localization added * Thu Sep 06 2012 Alex * Traffic limits control * USSD session support and additional request validation * Wed Aug 22 2012 Alex * SMS message validation changes * Thu Aug 16 2012 Alex * Traffic statistics and SMS updates can be disabled * Wed Aug 08 2012 Alex * Libindicate can be disabled * Tue Jul 17 2012 Alex * Ubuntu ARB suggested fixes * Sat Jul 7 2012 Alex * Libindicate support (unread SMS indication) * Libnotify support (new SMS indication) * Russian localization added * Simple man page added * Fri Jul 6 2012 Alex * Initial release modem-manager-gui-0.0.17.1/AUTHORS0000644000175000017500000000167412400622152014747 0ustar alexalexMAIN DEVELOPERS: Alex CONTRIBUTORS: Graham Inggs ARTISTS: Yogesh Kanitkar Michal Konstantynowicz / shokunin LlubNek Umidjon Almasov TRANSLATORS: Russian - Alex Uzbek - Umidjon Almasov Ukrainian - Игорь Гриценко Роман Лепіш Portuguese (Brazil) - Rafael Ferreira Turkish - Ahmet Sezgin Duran Indonesian - Ade Malsasa Akbar Bengali (Bangladesh) - Reazul Iqbal modem-manager-gui-0.0.17.1/LICENSE0000644000175000017500000010451312001106264014676 0ustar alexalex GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . modem-manager-gui-0.0.17.1/Makefile0000644000175000017500000000367612401043443015344 0ustar alexalexinclude Makefile_h DESTDIR=$(PREFIX)/bin all: modem-manager-gui modem-manager-gui: (cd src && ${MAKE} all) (cd src/modules && ${MAKE} all) (cd src/plugins && ${MAKE} all) (cd po && ${MAKE} all) (cd man && ${MAKE} all) (cd help && ${MAKE} all) (cd appdata && ${MAKE} all) install: (cd src && ${MAKE} install) (cd src/modules && ${MAKE} install) (cd src/plugins && ${MAKE} install) (cd resources && ${MAKE} install) (cd po && ${MAKE} install) (cd man && ${MAKE} install) (cd help && ${MAKE} install) (cd appdata && ${MAKE} install) uninstall: (cd src && ${MAKE} uninstall) (cd src/modules && ${MAKE} uninstall) (cd src/plugins && ${MAKE} uninstall) (cd resources && ${MAKE} uninstall) (cd po && ${MAKE} uninstall) (cd man && ${MAKE} uninstall) (cd help && ${MAKE} uninstall) (cd appdata && ${MAKE} uninstall) clean: (cd src && ${MAKE} clean) (cd src/modules && ${MAKE} clean) (cd src/plugins && ${MAKE} clean) (cd resources && ${MAKE} clean) (cd po && ${MAKE} clean) (cd man && ${MAKE} clean) (cd help && ${MAKE} clean) (cd appdata && ${MAKE} clean) get-program-translations: tx pull -a --minimum-perc=5 -r modem-manager-gui.modem-manager-gui-internationalization-template; update-program-translations-source: tx push -s -r modem-manager-gui.modem-manager-gui-internationalization-template; get-man-translations: tx pull -a --minimum-perc=5 -r modem-manager-gui.modem-manager-gui-man-page-template; update-man-translations-source: tx push -s -r modem-manager-gui.modem-manager-gui-man-page-template; get-appdata-translations: tx pull -a --minimum-perc=5 -r modem-manager-gui.modem-manager-gui-appdata-file-template; update-appdata-translations-source: tx push -s -r modem-manager-gui.modem-manager-gui-appdata-file-template; get-help-translations: tx pull -a --minimum-perc=5 -r modem-manager-gui.modem-manager-gui-help-template; update-help-translations-source: tx push -s -r modem-manager-gui.modem-manager-gui-help-template; modem-manager-gui-0.0.17.1/configure0000755000175000017500000001650612401174622015613 0ustar alexalex#!/bin/sh # configure # # Copyright 2012-2014 Alex # 2013 Graham Inggs # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . prefix=/usr libpath=/usr/lib prefixchanged=false libpathchanged=false ofonoplugin=true cflags=$CFLAGS if [ "x$cflags" = x ] ; then cflags='-mtune=native -O3' fi for arg_iter in "$@"; do arg=${arg_iter%%=*} arg_value=${arg_iter#*=} case $arg in --help) echo "This script generates Modem Manager GUI configuration and build files. It also checks if all dependencies are fulfilled. Used without arguments, default settings are applied. Arguments are : --help : Display this message and exit. --prefix=PATH : Set PATH as file-system root for installation. --libdir=PATH : Set PATH as a directory for libraries. --cflags=PARAMETERS : Pass PARAMETERS to the compiler." exit 0;; --prefix) prefixchanged=true prefix=$(eval echo $arg_value);; --libdir) libpathchanged=true libpath=$(eval echo $arg_value);; --cflags) echo "Using : \"$arg_value\" as compilation options." cflags="$arg_value ";; esac done if $prefixchanged ; then if ! $libpathchanged ; then libpath="$prefix/lib" fi fi echo -n "Checking depencies... " if ! pkg-config --exists 'gtk+-3.0 >= 3.4.0'; then echo 'ERROR: Please install GTK+ version 3.4.0 or later' exit 1 fi if ! test -e "/usr/include/gdbm/gdbm.h"; then if ! test -e "/usr/include/gdbm.h"; then echo 'ERROR: Please install GDBM library with development headers' exit 1 fi fi if ! pkg-config --exists 'ofono >= 1.9'; then echo 'WARNING: oFono plugin wont be built. Please install oFono development package for version 1.9 or later if you want better oFono experience' ofonoplugin=false fi echo done echo -n "Generating Makefile_h... " echo "#WARNING: Auto-generated file, edit with care. CFLAGS := $cflags LIBPATH := $libpath PREFIX := $prefix OFONOPLUGIN := $ofonoplugin" > Makefile_h echo done echo -n "Generating resources.h... " echo "/* * resources.h * * Copyright 2012-2014 Alex * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* WARNING: Auto-generated file, edit with care. */ #ifndef __RESOURCES_H__ #define __RESOURCES_H__ #define RESOURCE_MAINWINDOW_ICON \"$prefix/share/pixmaps/modem-manager-gui.png\" #define RESOURCE_MAINWINDOW_UI \"$prefix/share/modem-manager-gui/ui/modem-manager-gui.ui\" #define RESOURCE_TOOLBAR_DEV \"$prefix/share/modem-manager-gui/pixmaps/dev-tb.png\" #define RESOURCE_TOOLBAR_SMS \"$prefix/share/modem-manager-gui/pixmaps/sms-tb.png\" #define RESOURCE_TOOLBAR_USSD \"$prefix/share/modem-manager-gui/pixmaps/ussd-tb.png\" #define RESOURCE_TOOLBAR_INFO \"$prefix/share/modem-manager-gui/pixmaps/info-tb.png\" #define RESOURCE_TOOLBAR_SCAN \"$prefix/share/modem-manager-gui/pixmaps/scan-tb.png\" #define RESOURCE_TOOLBAR_CONT \"$prefix/share/modem-manager-gui/pixmaps/cont-tb.png\" #define RESOURCE_TOOLBAR_TRAFFIC \"$prefix/share/modem-manager-gui/pixmaps/traffic-tb.png\" #define RESOURCE_SMS_READ \"$prefix/share/modem-manager-gui/pixmaps/sms-read.png\" #define RESOURCE_SMS_UNREAD \"$prefix/share/modem-manager-gui/pixmaps/sms-unread.png\" #define RESOURCE_MESSAGE_RECIEVED \"$prefix/share/modem-manager-gui/pixmaps/message-received.png\" #define RESOURCE_MESSAGE_SENT \"$prefix/share/modem-manager-gui/pixmaps/message-sent.png\" #define RESOURCE_MESSAGE_DRAFTS \"$prefix/share/modem-manager-gui/pixmaps/message-drafts.png\" #define RESOURCE_INFO_EQUIPMENT \"$prefix/share/modem-manager-gui/pixmaps/info-equipment.png\" #define RESOURCE_INFO_NETWORK \"$prefix/share/modem-manager-gui/pixmaps/info-network.png\" #define RESOURCE_INFO_LOCATION \"$prefix/share/modem-manager-gui/pixmaps/info-location.png\" #define RESOURCE_SIGNAL_0 \"$prefix/share/modem-manager-gui/pixmaps/signal-0.png\" #define RESOURCE_SIGNAL_25 \"$prefix/share/modem-manager-gui/pixmaps/signal-25.png\" #define RESOURCE_SIGNAL_50 \"$prefix/share/modem-manager-gui/pixmaps/signal-50.png\" #define RESOURCE_SIGNAL_75 \"$prefix/share/modem-manager-gui/pixmaps/signal-75.png\" #define RESOURCE_SIGNAL_100 \"$prefix/share/modem-manager-gui/pixmaps/signal-100.png\" #define RESOURCE_SOUND_MESSAGE \"$prefix/share/modem-manager-gui/sounds/message.ogg\" #define RESOURCE_DESKTOP_FILE \"$prefix/share/applications/modem-manager-gui.desktop\" #define RESOURCE_MODULES_DIR \"$libpath/modem-manager-gui/modules/\" #define RESOURCE_LOCALE_DIR \"$prefix/share/locale/\" #define RESOURCE_LOCALE_DOMAIN \"modem-manager-gui\" #define RESOURCE_PROVIDERS_DB \"$prefix/share/mobile-broadband-provider-info/serviceproviders.xml\" #endif // __RESOURCES_H__" > src/resources.h echo done echo -n "Generating launcher... " echo "[Desktop Entry] Name=Modem Manager GUI GenericName=Modem Manager GUI Comment=Graphical interface for Modem manager daemon control Comment[ru]=Программа для управления специфическими функциями EDGE/3G/4G модемов Comment[uz]=EDGE/3G/4G modemning o'ziga xos vazifalarini boshqarish vositasi Comment[uk]=Інструмент для керування специфічними функціями EDGE/3G/4G модемів Comment[pt_BR]=Ferramenta para controle de funções específicas de modem EDGE/3G/4G Comment[tr]=EDGE/3G/4G modemler için özel işlev kontrol aracı Comment[id]=Perangkat lunak untuk mengendalikan fungsi spesifik modem EDGE/3G/4G Comment[de]=Werkzeug zur Steuerung spezifischer Funktionen von EDGE/3G/4G-Modems Exec=modem-manager-gui Icon=modem-manager-gui Terminal=false Type=Application Categories=System; Keywords=modem;manager;sms;ussd;" > resources/modem-manager-gui.desktop echo done modem-manager-gui-0.0.17.1/help/C/figures/0000755000175000017500000000000012377623741016467 5ustar alexalexmodem-manager-gui-0.0.17.1/help/C/0000700000175000017500000000000012377623741015011 5ustar alexalexmodem-manager-gui-0.0.17.1/src/plugins/0000700000175000017500000000000012400622076016132 5ustar alexalexmodem-manager-gui-0.0.17.1/src/modules/0000700000175000017500000000000012401043526016117 5ustar alexalexmodem-manager-gui-0.0.17.1/packages/gentoo/0000700000175000017500000000000012222370344016733 5ustar alexalexmodem-manager-gui-0.0.17.1/packages/mageia/0000700000175000017500000000000012377623741016700 5ustar alexalexmodem-manager-gui-0.0.17.1/packages/fedora/0000700000175000017500000000000012377623741016715 5ustar alexalexmodem-manager-gui-0.0.17.1/help/0000700000175000017500000000000012401043643014610 5ustar alexalexmodem-manager-gui-0.0.17.1/src/0000700000175000017500000000000012401174452014452 5ustar alexalexmodem-manager-gui-0.0.17.1/packages/0000700000175000017500000000000012222370344015440 5ustar alexalexmodem-manager-gui-0.0.17.1/.tx/0000700000175000017500000000000012377603005014377 5ustar alexalexmodem-manager-gui-0.0.17.1/resources/0000700000175000017500000000000012401174400015666 5ustar alexalexmodem-manager-gui-0.0.17.1/po/0000700000175000017500000000000012401277057014306 5ustar alexalexmodem-manager-gui-0.0.17.1/appdata/0000700000175000017500000000000012401043526015272 5ustar alexalexmodem-manager-gui-0.0.17.1/man/0000700000175000017500000000000012401044031014423 5ustar alexalexmodem-manager-gui-0.0.17.1/0000700000175000017500000000000012401174637013670 5ustar alexalex