From ange_harland@hotmail.com Fri Oct 1 03:26:33 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 74D9A7502CA for ; Fri, 1 Oct 2010 03:26:33 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -95.009 X-Spam-Level: X-Spam-Status: No, score=-95.009 tagged_above=-999 required=2 tests=[BAYES_50=0.8, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLACK=1.725, URI_OBFU_WWW=2.475, USER_IN_WHITELIST=-100] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O8HJ2UNAXvOr for ; Fri, 1 Oct 2010 03:26:30 +0000 (UTC) Received: from bay0-omc2-s16.bay0.hotmail.com (bay0-omc2-s16.bay0.hotmail.com [65.54.190.91]) by menubar.gnome.org (Postfix) with ESMTP id 8558E7501D4 for ; Fri, 1 Oct 2010 03:26:22 +0000 (UTC) Received: from BAY145-W39 ([65.54.190.125]) by bay0-omc2-s16.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 30 Sep 2010 20:26:21 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_6b64592e-b0f6-4545-8fc9-f5dcfd83e7a6_" X-Originating-IP: [123.11.64.250] From: Angela Harland To: Subject: hey~ Date: Fri, 1 Oct 2010 13:26:20 +1000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 01 Oct 2010 03:26:21.0044 (UTC) FILETIME=[6AE12340:01CB6118] X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2010 03:26:34 -0000 --_6b64592e-b0f6-4545-8fc9-f5dcfd83e7a6_ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Hey ,friend electronic products with very good price. Laptop ,iPhone even Motorcycle are very popular .their products are original quality with very low price as wholesale business supplier.They also can do retail business for end user now. maybe it is fit for your business . if you like you can contact them : www. asdcx.com$B"A(B --_6b64592e-b0f6-4545-8fc9-f5dcfd83e7a6_ Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Hey ,friend
 electronic products with very good price. Laptop ,iPhone even Motorcycle are very popular .their products are original quality with very low price as wholesale business supplier.They also can do retail business for end user now. maybe it is fit for your business . if you like you can contact them :   www. asdcx.com$B"A(B --_6b64592e-b0f6-4545-8fc9-f5dcfd83e7a6_-- From itoral@igalia.com Mon Oct 4 09:52:27 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 91833750659 for ; Mon, 4 Oct 2010 09:52:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.744 X-Spam-Level: X-Spam-Status: No, score=-1.744 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Srv8tTuD1HDp for ; Mon, 4 Oct 2010 09:52:24 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 798D7750376 for ; Mon, 4 Oct 2010 09:52:15 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogIAJ5AqUxbdWOb/2dsb2JhbACDHoY0mV6tfpE0gSKDMXQEhQmFN4Vo X-IronPort-AV: E=Sophos;i="4.57,277,1283724000"; d="scan'208";a="684066516" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 11:52:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2hiP-0007Ot-Bu; Mon, 04 Oct 2010 11:52:13 +0200 Received: from webmail.local.igalia.com ([192.168.10.123] helo=webmail.igalia.com) by mail.igalia.com with smtp (Exim) id 1P2hiP-0003F9-7k; Mon, 04 Oct 2010 11:52:13 +0200 Received: (nullmailer pid 949 invoked by uid 33); Mon, 04 Oct 2010 09:52:08 -0000 To: =?UTF-8?Q?Sim=C3=B3n_Pena?= Subject: Re: [PATCH] annotations: removed transfer mode for 'in' args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 04 Oct 2010 09:52:08 +0000 From: Iago Toral In-Reply-To: <1285869207-16621-1-git-send-email-spenap@gmail.com> References: <1285869207-16621-1-git-send-email-spenap@gmail.com> Message-ID: <74ecbb652b09a9a9b149a27acd6ff4e2@igalia.com> X-Sender: itoral@igalia.com User-Agent: Roundcube Webmail/0.4.1 Cc: grilo-list@gnome.org X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 09:52:27 -0000 On Thu, 30 Sep 2010 19:53:27 +0200, Simón Pena wrote: > Input arguments don't need 'transfer none' annotations. Pushed. BTW, I get many warnings like these when generating the gtk-doc documentation: In gtk-doc.xsl: For acronym (allow-none) no value found! In gtk-doc.xsl: For acronym (scope) no value found! In gtk-doc.xsl: For acronym (transfer) no value found! ... I guess I just have an old version of gtk-doc installed, but I rather confirm with you just in case there is something wrong with the annotations... Iago From spenap@gmail.com Mon Oct 4 10:04:30 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 23F0F7504A8 for ; Mon, 4 Oct 2010 10:04:30 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.846 X-Spam-Level: X-Spam-Status: No, score=-1.846 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077, TW_JH=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IYHPnpIp+rY5 for ; Mon, 4 Oct 2010 10:04:27 +0000 (UTC) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by menubar.gnome.org (Postfix) with ESMTP id B7E65750376 for ; Mon, 4 Oct 2010 10:04:19 +0000 (UTC) Received: by qwd6 with SMTP id 6so4261277qwd.27 for ; Mon, 04 Oct 2010 03:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=4Dsyxkh8CzkXAvC3Wn0yszgclvNdJ31tuYzDRrXI3iY=; b=E/kOHhbt2b4L3K8pGo63G0NyzMU3/PQ/Li25w7b4Mfj8gyMP0lOVnaV/ENiBjI2gje MGjnASSPkpbdVjXUUO6XcMop+PrVubYkqF8xeAwR31d8fdtVplM9/ettPOv+l1lTDpLD tgp9pwkusrVOejVuU+1/ctIe/+QUn0JgG6gIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=H4FzZMyDOB7NdlX2OZoLPzrxqbVvIlsI7yTj+6xEa3pqmFs77hkjhlM0+5X2pMb2k1 NnWGN6GSnqny988lD7bbe/52PQw1pu1KLNGVWYYznY5EAPUWKKLw9Vg711hCdN5OQBM5 XIcH8ZIaPWWPBBPIey8O0feVtpzYaaF013Rfo= Received: by 10.229.213.20 with SMTP id gu20mr6765387qcb.52.1286186657300; Mon, 04 Oct 2010 03:04:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.191.65 with HTTP; Mon, 4 Oct 2010 03:03:57 -0700 (PDT) In-Reply-To: <74ecbb652b09a9a9b149a27acd6ff4e2@igalia.com> References: <1285869207-16621-1-git-send-email-spenap@gmail.com> <74ecbb652b09a9a9b149a27acd6ff4e2@igalia.com> From: =?ISO-8859-1?Q?Sim=F3n_Pena_Placer?= Date: Mon, 4 Oct 2010 12:03:57 +0200 Message-ID: Subject: Re: [PATCH] annotations: removed transfer mode for 'in' args To: Iago Toral Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: grilo-list@gnome.org X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 10:04:30 -0000 Hi Iago, On 4 October 2010 11:52, Iago Toral wrote: > > On Thu, 30 Sep 2010 19:53:27 +0200, Sim=F3n Pena wrote= : >> >> Input arguments don't need 'transfer none' annotations. > > Pushed. Thanks. There's also another patch related to some incorrect annotations: the transfer modes in GrlMetadataSource > BTW, I get many warnings like these when generating the gtk-doc > documentation: > > In gtk-doc.xsl: For acronym (allow-none) no value found! > In gtk-doc.xsl: For acronym (scope) no value found! > In gtk-doc.xsl: For acronym (transfer) no value found! > ... > > I guess I just have an old version of gtk-doc installed, but I rather > confirm with you just in case there is something wrong with the > annotations... Yes: upstream version from jhbuild works fine without those warnings :) Cheers From itoral@igalia.com Mon Oct 4 10:18:43 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E13B37505F8 for ; Mon, 4 Oct 2010 10:18:43 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q0nSwCTVCwgr for ; Mon, 4 Oct 2010 10:18:42 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id CE06F750575 for ; Mon, 4 Oct 2010 10:18:33 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogIAD9GqUxbdWOb/2dsb2JhbACDHoY0mV6tb5E5gSKDMXQEikCFaA X-IronPort-AV: E=Sophos;i="4.57,277,1283724000"; d="scan'208";a="289835317" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 12:18:31 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2i7r-0007z5-CI; Mon, 04 Oct 2010 12:18:31 +0200 Received: from webmail.local.igalia.com ([192.168.10.123] helo=webmail.igalia.com) by mail.igalia.com with smtp (Exim) id 1P2i7r-0004o9-61; Mon, 04 Oct 2010 12:18:31 +0200 Received: (nullmailer pid 3686 invoked by uid 33); Mon, 04 Oct 2010 10:18:25 -0000 To: =?UTF-8?Q?Sim=C3=B3n_Pena?= Subject: Re: [PATCH] annotations: Fixed transfer modes in grl-metadata-source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 04 Oct 2010 10:18:25 +0000 From: Iago Toral In-Reply-To: <4CA2091B.1010505@gmail.com> References: "<1285625493-5420-1-git-send-email-spenap@gmail.com>" <4CA2091B.1010505@gmail.com> Message-ID: <919ec50247226bb74492814ff64e5fc7@igalia.com> X-Sender: itoral@igalia.com User-Agent: Roundcube Webmail/0.4.1 Cc: Grilo list X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 10:18:44 -0000 On Tue, 28 Sep 2010 17:26:19 +0200, Simón Pena wrote: >> I'll confirm the right transfer mode later. >> >> Cheers, >> >> Simon > > Yes, these annotations are for grl_metadata_source_filter_supported, > grl_metadata_source_filter_slow and > grl_metadata_source_filter_writable. > > These three methods return a list of references to Metadata Keys: as > the > keys don't need to be freed, but the list does, the right transfer > mode > is "container". > > Cheers, Pushed. Iago From itoral@igalia.com Mon Oct 4 10:19:43 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 95ABB7505F8 for ; Mon, 4 Oct 2010 10:19:43 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mApz76YODSg3 for ; Mon, 4 Oct 2010 10:19:42 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 920C275047D for ; Mon, 4 Oct 2010 10:19:33 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogIAGpHqUxbdWOb/2dsb2JhbACDHoY0mV6td5E5gSKDMXQEikCFaA X-IronPort-AV: E=Sophos;i="4.57,277,1283724000"; d="scan'208";a="289835849" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 12:19:30 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2i8o-00080I-Ky; Mon, 04 Oct 2010 12:19:30 +0200 Received: from webmail.local.igalia.com ([192.168.10.123] helo=webmail.igalia.com) by mail.igalia.com with smtp (Exim) id 1P2i8o-0004s5-Gl; Mon, 04 Oct 2010 12:19:30 +0200 Received: (nullmailer pid 4138 invoked by uid 33); Mon, 04 Oct 2010 10:19:25 -0000 To: =?UTF-8?Q?Sim=C3=B3n_Pena_Placer?= Subject: Re: [PATCH] annotations: removed transfer mode for 'in' args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 04 Oct 2010 10:19:25 +0000 From: Iago Toral In-Reply-To: References: <1285869207-16621-1-git-send-email-spenap@gmail.com> <74ecbb652b09a9a9b149a27acd6ff4e2@igalia.com> Message-ID: <960609d2fb3dc9b7591510cda7632b8a@igalia.com> X-Sender: itoral@igalia.com User-Agent: Roundcube Webmail/0.4.1 Cc: grilo-list@gnome.org X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 10:19:43 -0000 On Mon, 4 Oct 2010 12:03:57 +0200, Simón Pena Placer wrote: > Hi Iago, > > On 4 October 2010 11:52, Iago Toral wrote: >> >> On Thu, 30 Sep 2010 19:53:27 +0200, Simón Pena >> wrote: >>> >>> Input arguments don't need 'transfer none' annotations. >> >> Pushed. > > Thanks. There's also another patch related to some incorrect > annotations: the transfer modes in GrlMetadataSource Oh! I forgot about that one, sorry :). I pushed it now. Iago From spenap@gmail.com Mon Oct 4 17:06:12 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 54C23750145 for ; Mon, 4 Oct 2010 17:06:12 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0WNJG2uN59BL for ; Mon, 4 Oct 2010 17:06:10 +0000 (UTC) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by menubar.gnome.org (Postfix) with ESMTP id 902E67501B2 for ; Mon, 4 Oct 2010 17:06:01 +0000 (UTC) Received: by wwb31 with SMTP id 31so5342382wwb.27 for ; Mon, 04 Oct 2010 10:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=wkgBjmsIv2bfiwBG8TpC7jhUdMGQuCx9NrO6T8qQlY0=; b=nPCChl1zvHMb6czFsBzpJhdmDrRUV+fQYJXYIOn/yRYMvCdCbGIOT0DLl+JUX0X1Xg cMqTfirH1gr1NThcC+Kei4d8TTFQ0Wymw23DdbbOc1iP+ki8GmlKxzTGi0J0sb+uOGYw GfW39SuDWhXuOtFMXMGVn8ilZjoLaBwn5ydF0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=psdqH9DK7G2Bt/IxA/tvhBKx2qjTPu1+6t22lrcZN7heG+jS1cVxiSS57vYTTdtbFo WJ5YEST5LQNyIKS22WFhfgnVYLbNEZafIemfjRdnce31/sm8Vc1t6MHqfD9hiucHUHjC MEaYAtta3lFHign4rrQDDbotzoQ6tdFsjqb/8= Received: by 10.227.172.73 with SMTP id k9mr7694752wbz.111.1286211959398; Mon, 04 Oct 2010 10:05:59 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id g9sm4343958wbh.7.2010.10.04.10.05.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 10:05:47 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 0/2] Tested plugin configuration from GI Date: Mon, 4 Oct 2010 19:05:10 +0200 Message-Id: <1286211912-9670-1-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 17:06:12 -0000 Hi all, These patches fix and test GrlConfig in the GI realm. For that, grl_config_new annotations are updated to allow NULL sources (which enables plugin-wide configuration), and the transfer mode is set to 'none', as the configuration shouldn't be freed while the plugin is still active. Then, Python's grilo-test-ui has been updated to configure Flickr, Youtube and Vimeo plugins. Simón Pena (2): annotations: fixed GrlConfig annotations python: added plugin configuration to grilo-test-ui src/data/grl-config.c | 6 ++++-- tools/python/grilo-test-ui.py | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) From spenap@gmail.com Mon Oct 4 17:10:20 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D6C187501B2 for ; Mon, 4 Oct 2010 17:10:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bCTVE3pCxLKB for ; Mon, 4 Oct 2010 17:10:18 +0000 (UTC) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by menubar.gnome.org (Postfix) with ESMTP id B4744750145 for ; Mon, 4 Oct 2010 17:10:09 +0000 (UTC) Received: by ewy22 with SMTP id 22so2951401ewy.27 for ; Mon, 04 Oct 2010 10:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=6zGOdlF5kfmT0AL/xO+RW5WoyQcTMZWnpkPVS4L8kKQ=; b=F7yMx5HAX+YkTEuUBLoszQngSOVeMFn+LlW+BAhpRJ5C/spBu+d0gAoG6cghShXKFh LB2b9rsapuNCzbGmY4cUlokyJx9hkrElDtBE4dZzHxKFVvJZnxp1ZKRtztyaElWBcLyy Us7pnZ7dQ/KzhdTD0rmGJzNR3LVpwRwUYLx7A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=LqoEZ4l6ZoOA+lCrVozkZo7y//34ZGuabWI0Sm1pMG5xqcMbEs27K2Ee1wohJZx/co 5pBbn2FpgPEesDLbyCGngOk7Bg6BXmsLMCLeABJJHYGF/gYv/wm7eusf2qbZ1jxem17M wodTJvmFEjCaYOh28PpF+zhctGx15TugZ3PNM= Received: by 10.216.6.149 with SMTP id 21mr5513361wen.101.1286212207508; Mon, 04 Oct 2010 10:10:07 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id o49sm3146854wej.43.2010.10.04.10.09.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 10:09:49 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 1/2] annotations: fixed GrlConfig annotations Date: Mon, 4 Oct 2010 19:09:00 +0200 Message-Id: <1286212141-9789-1-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286211912-9670-1-git-send-email-spenap@gmail.com> References: <1286211912-9670-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 17:10:21 -0000 * grl_config_new now allows NULL sources for a plugin-wide configuration * grl_config_new is annotated as 'transfer none', to avoid freeing the configuration while the plugin is valid. Signed-off-by: Simón Pena --- src/data/grl-config.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/data/grl-config.c b/src/data/grl-config.c index d963773..8bc780d 100644 --- a/src/data/grl-config.c +++ b/src/data/grl-config.c @@ -94,14 +94,16 @@ grl_config_finalize (GObject *object) /** * grl_config_new: * @plugin: plugin id for this configuration - * @source: source id for this configuration + * @source: (allow-none): source id for this configuration * * Creates a new data config object that will be associated with a plugin * (if @source is NULL), or a specific source spawned from a plugin (if * @source is not NULL). The latter may be useful for plugins * spawning various sources, each one needing a different configuration. * - * Returns: a newly-allocated data config. + * Returns: (transfer none): a newly-allocated data config. The data + * config associated with the plugin should not be freed until the plugin + * has been unloaded. */ GrlConfig * grl_config_new (const gchar *plugin, const gchar *source) -- 1.7.0.4 From spenap@gmail.com Mon Oct 4 17:10:28 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5F0697505E9 for ; Mon, 4 Oct 2010 17:10:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 39b-Z8piMF26 for ; Mon, 4 Oct 2010 17:10:25 +0000 (UTC) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by menubar.gnome.org (Postfix) with ESMTP id 5F1947501F0 for ; Mon, 4 Oct 2010 17:10:25 +0000 (UTC) Received: by mail-ew0-f54.google.com with SMTP id 22so2951401ewy.27 for ; Mon, 04 Oct 2010 10:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=ydhjszewQxu8tdmvU51l9yHQEojoc7bL4do/YHLX7PE=; b=hwU653TI4RfrPpDg7E0XpVulxT+sE89hQDqeEc38mBNNNsbSiEthymjJlaCPq+ILlS RdV5F6fE094GztHB0E7uFa7wxr7w81UHWOJwTeqsOzDX2Vk2nueEyIlNA0Pkc9z2DAev yL/AxBrTW59XGB1TKUzETYvaQrG9qkt9u7mrg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=XkhCe5Sbc9zNmDH4RHuZB6EV950Fvjqb2OBNGak6npoMbUC6qc912V/8ronwAXQzLF cyRScCVc/nXinR3ab1rhAsu5kFqC+w1ihTL++HUOcI0ri774HFLUPtdU96LUup+N8W7G 40X3myDMHZj656SycC6E6ky+6oEBxUjTWF3ZY= Received: by 10.216.236.42 with SMTP id v42mr5543189weq.10.1286212224919; Mon, 04 Oct 2010 10:10:24 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id o49sm3146854wej.43.2010.10.04.10.10.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 10:10:12 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 2/2] python: added plugin configuration to grilo-test-ui Date: Mon, 4 Oct 2010 19:09:01 +0200 Message-Id: <1286212141-9789-2-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286211912-9670-1-git-send-email-spenap@gmail.com> References: <1286211912-9670-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 17:10:28 -0000 Added a configuration setup for Flickr, Youtube and Vimeo Signed-off-by: Simón Pena --- tools/python/grilo-test-ui.py | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/tools/python/grilo-test-ui.py b/tools/python/grilo-test-ui.py index 3c5737f..4fe23c1 100644 --- a/tools/python/grilo-test-ui.py +++ b/tools/python/grilo-test-ui.py @@ -31,6 +31,14 @@ from gi.repository import GdkPixbuf class MainWindow(Gtk.Window): + FLICKR_KEY = 'fa037bee8120a921b34f8209d715a2fa' + FLICKR_SECRET = '9f6523b9c52e3317' + + VIMEO_KEY = '4d908c69e05a9d5b5c6669d302f920cb' + VIMEO_SECRET = '4a923ffaab6238eb' + + YOUTUBE_KEY = 'AI39si4EfscPllSfUy1IwexMf__kntTL_G5dfSr2iUEVN45RHGq92Aq0lX25OlnOkG6KTN-4soVAkAf67fWYXuHfVADZYr7S1A' + BROWSE_FLAGS = (Grl.MetadataResolutionFlags) (Grl.MetadataResolutionFlags.FAST_ONLY | Grl.MetadataResolutionFlags.IDLE_RELAY) METADATA_FLAGS = (Grl.MetadataResolutionFlags) (Grl.MetadataResolutionFlags.FULL | @@ -54,10 +62,36 @@ class MainWindow(Gtk.Window): self._launchers = UriLaunchers() self._setup_ui() + self._configure_plugins() self._load_plugins() self.show_all() + def _configure_plugins(self): + self._configure_flickr() + self._configure_vimeo() + self._configure_youtube() + + def _configure_flickr(self): + registry = Grl.PluginRegistry.get_default() + flickr_config = Grl.Config.new('grl-flickr', None) + flickr_config.set_api_key(self.FLICKR_KEY) + flickr_config.set_api_secret(self.FLICKR_SECRET) + registry.add_config(flickr_config) + + def _configure_vimeo(self): + registry = Grl.PluginRegistry.get_default() + vimeo_config = Grl.Config.new('grl-vimeo', None) + vimeo_config.set_api_key(self.VIMEO_KEY) + vimeo_config.set_api_secret(self.VIMEO_SECRET) + registry.add_config(vimeo_config) + + def _configure_youtube(self): + registry = Grl.PluginRegistry.get_default() + youtube_config = Grl.Config.new('grl-youtube', None) + youtube_config.set_api_key(self.YOUTUBE_KEY) + registry.add_config(youtube_config) + def _lookup_browse_keys(self): registry = Grl.PluginRegistry.get_default() key_id = registry.lookup_metadata_key('id') -- 1.7.0.4 From spenap@gmail.com Mon Oct 4 17:19:42 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 088CE75013E for ; Mon, 4 Oct 2010 17:19:42 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w6m4LVSjCQP1 for ; Mon, 4 Oct 2010 17:19:40 +0000 (UTC) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by menubar.gnome.org (Postfix) with ESMTP id 72DE57500C0 for ; Mon, 4 Oct 2010 17:19:31 +0000 (UTC) Received: by wyb29 with SMTP id 29so5216816wyb.27 for ; Mon, 04 Oct 2010 10:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=eIcjlRDFJrfG7+7JdtbF06+BjK9D8RxNcr7BTJ2rUZU=; b=iMwNgHpXsPotS3cLJMX6eXVfoTF9wh5uVD7RbLqXrzRcyfMswgvyLAOatNN4u+Iyt7 nNZw8ZYn3ZlvlOddk73qHKOonGXgRb1RlLmVPDqXyNQWK9AmDQzxSnCoOcluaykJtyOO Pe9sVyPPzxC6byhbN99Yrt7UHkDHxP52NDR/g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=mtxyM+58hZxozA8qtAAl1O5qV4ymZsSCeAsUHm7NlMUe9YO0c01/sO7oGaO9/3a5pt b70Y8xRPLjCsWvoeC68efNRWI+E7RBnk5QidEq/vxvyVMhTIfToq04zvcYp36iQ1sAZ8 FOHbHEpB8QXXqSm1VQAB8xxc2LuFr7Zf4OqCU= Received: by 10.216.232.90 with SMTP id m68mr7983395weq.10.1286212769289; Mon, 04 Oct 2010 10:19:29 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id k7sm3154325wej.26.2010.10.04.10.19.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 10:19:21 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 0/2] Reworked GrlMetadataSource's filters Date: Mon, 4 Oct 2010 19:18:59 +0200 Message-Id: <1286212741-10120-1-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 17:19:42 -0000 Hi, The following patches * Rework the GrlMetadataSource's filter methods, by extracting common behavior into a generic filtering function * Update the GrlMetadataSource's filter tests so that they check specific behavior instead of just the "instrospectable" status Simón Pena (2): core: reworked GrlMetadataSource's filter methods tests: updated GrlMetadataSource filter tests src/grl-metadata-source.c | 142 +++++++++++----------------------- tests/python/test_metadata_source.py | 18 ++++- 2 files changed, 59 insertions(+), 101 deletions(-) From spenap@gmail.com Mon Oct 4 17:20:27 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7196B7500C0 for ; Mon, 4 Oct 2010 17:20:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E4Ub2KDE9m3a for ; Mon, 4 Oct 2010 17:20:25 +0000 (UTC) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by menubar.gnome.org (Postfix) with ESMTP id 9D7EC75009D for ; Mon, 4 Oct 2010 17:20:16 +0000 (UTC) Received: by wyb29 with SMTP id 29so5217934wyb.27 for ; Mon, 04 Oct 2010 10:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=XwkgNqR+MUV84hEvzWB3nZttBTPy1YNZDl1/Gc1RwnM=; b=AW4pEaUaWLBtlLuU7W1WbZOsqYTbhQm+MadCzlxqpB3VkSyW6Rq0UA2Rl51jcNz6DG +EkB/jIteWMGC1Sk8SiN39ZDfR2Zhasl+C89nhGTXPtFXLBTRp41nTadgg7rhXdEVwK1 csgwTbq3GTAYHvdcfYhKB74Z94i5FWy70aYhU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=B9gLH+a8/4XG8alJ9FeN4Q2vVWTMVKfm6vrd7F6xGBlnHtScPFXmR7ihgRSHKW1fGz PqdEvbRwdq4da0SEZpY0yJV5XGTb1FGDrW1H5RJNa1B+pnqEkKD74e4ZfFA0O76tg86Q +3rL/vuTB0B+WR+pfLeZ0Jk1SQJHNrlgXx/v8= Received: by 10.216.186.207 with SMTP id w57mr5563255wem.19.1286212814642; Mon, 04 Oct 2010 10:20:14 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id k7sm3154325wej.26.2010.10.04.10.19.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 10:19:53 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 1/2] core: reworked GrlMetadataSource's filter methods Date: Mon, 4 Oct 2010 19:19:00 +0200 Message-Id: <1286212741-10120-2-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 17:20:27 -0000 grl_metadata_source_filter_{supported, slow, writable} methods have a common filtering part and some specific bits each one. This patch extracts the common code into a generic function so the other ones can do their checks and specific behavior, and then do the filtering. Signed-off-by: Simón Pena --- src/grl-metadata-source.c | 142 ++++++++++++++------------------------------- 1 files changed, 44 insertions(+), 98 deletions(-) diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c index 086dc40..8395dbf 100644 --- a/src/grl-metadata-source.c +++ b/src/grl-metadata-source.c @@ -497,6 +497,47 @@ analyze_keys_to_write (GrlMetadataSource *source, return maps; } +static GList * +generic_filter (GrlMetadataSource *source, + GList **keys_to_filter, + gboolean return_filtered, + const GList *source_keys) +{ + GList *iter_source_keys; + GList *iter_keys; + GList *filtered_keys = NULL; + gboolean got_match; + GrlKeyID filtered_key; + + iter_source_keys = (GList *) source_keys; + while (iter_source_keys) { + got_match = FALSE; + iter_keys = *keys_to_filter; + + filtered_key = iter_source_keys->data; + while (!got_match && iter_keys) { + if (iter_keys->data == filtered_key) { + got_match = TRUE; + } + else { + iter_keys = g_list_next (iter_keys); + } + } + + iter_source_keys = g_list_next (iter_source_keys); + + if (got_match) { + if (return_filtered) { + filtered_keys = g_list_prepend (filtered_keys, filtered_key); + } + *keys_to_filter = g_list_delete_link (*keys_to_filter, iter_keys); + got_match = FALSE; + } + } + + return filtered_keys; +} + /* ================ API ================ */ /** @@ -720,43 +761,12 @@ grl_metadata_source_filter_supported (GrlMetadataSource *source, gboolean return_filtered) { const GList *supported_keys; - GList *iter_supported; - GList *iter_keys; - GrlKeyID key; - GList *filtered_keys = NULL; - gboolean got_match; - GList *iter_keys_prev; g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), NULL); supported_keys = grl_metadata_source_supported_keys (source); - iter_keys = *keys; - while (iter_keys) { - got_match = FALSE; - iter_supported = (GList *) supported_keys; - - key = iter_keys->data; - while (!got_match && iter_supported) { - if (key == iter_supported->data) { - got_match = TRUE; - } - iter_supported = g_list_next (iter_supported); - } - - iter_keys_prev = iter_keys; - iter_keys = g_list_next (iter_keys); - - if (got_match) { - if (return_filtered) { - filtered_keys = g_list_prepend (filtered_keys, key); - } - *keys = g_list_delete_link (*keys, iter_keys_prev); - got_match = FALSE; - } - } - - return filtered_keys; + return generic_filter (source, keys, return_filtered, supported_keys); } /** @@ -780,11 +790,6 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source, gboolean return_filtered) { const GList *slow_keys; - GList *iter_slow; - GList *iter_keys; - GList *filtered_keys = NULL; - gboolean got_match; - GrlKeyID slow_key; g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), NULL); @@ -797,33 +802,7 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source, } } - iter_slow = (GList *) slow_keys; - while (iter_slow) { - got_match = FALSE; - iter_keys = *keys; - - slow_key = iter_slow->data; - while (!got_match && iter_keys) { - if (iter_keys->data == slow_key) { - got_match = TRUE; - } else { - iter_keys = g_list_next (iter_keys); - } - } - - iter_slow = g_list_next (iter_slow); - - if (got_match) { - if (return_filtered) { - filtered_keys = - g_list_prepend (filtered_keys, slow_key); - } - *keys = g_list_delete_link (*keys, iter_keys); - got_match = FALSE; - } - } - - return filtered_keys; + return generic_filter (source, keys, return_filtered, slow_keys); } /** @@ -847,13 +826,6 @@ grl_metadata_source_filter_writable (GrlMetadataSource *source, gboolean return_filtered) { const GList *writable_keys; - GList *iter_writable; - GList *iter_keys; - GList *filtered_keys = NULL; - gboolean got_match; - GrlKeyID writable_key; - - /* TODO: All these filer_* methods could probably reuse most of the code */ g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), NULL); g_return_val_if_fail (keys != NULL, NULL); @@ -867,33 +839,7 @@ grl_metadata_source_filter_writable (GrlMetadataSource *source, } } - iter_writable = (GList *) writable_keys; - while (iter_writable) { - got_match = FALSE; - iter_keys = *keys; - - writable_key = iter_writable->data; - while (!got_match && iter_keys) { - if (iter_keys->data == writable_key) { - got_match = TRUE; - } else { - iter_keys = g_list_next (iter_keys); - } - } - - iter_writable = g_list_next (iter_writable); - - if (got_match) { - if (return_filtered) { - filtered_keys = - g_list_prepend (filtered_keys, writable_key); - } - *keys = g_list_delete_link (*keys, iter_keys); - got_match = FALSE; - } - } - - return filtered_keys; + return generic_filter (source, keys, return_filtered, writable_keys); } void -- 1.7.0.4 From spenap@gmail.com Mon Oct 4 17:20:49 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 40297750145 for ; Mon, 4 Oct 2010 17:20:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id od6iOdlkBZ9s for ; Mon, 4 Oct 2010 17:20:47 +0000 (UTC) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by menubar.gnome.org (Postfix) with ESMTP id A06807501B2 for ; Mon, 4 Oct 2010 17:20:46 +0000 (UTC) Received: by mail-wy0-f182.google.com with SMTP id 29so5217934wyb.27 for ; Mon, 04 Oct 2010 10:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=VhJDQJXluPTfloga98+QCpBEMrcYQGGsQ0UWZX7Xfe4=; b=a8vpc+SF88V0vFZGmW4T/XOMGXOlzaGOg4tQx1WkccbwvoZDpoXMLGwtAXFcdoWGZE 9VZr7QYrf0OClfeGwkG4s1W6+13LvBDBQ6IImdJ6f0ATCZeF/RewRHsHv2IaES5ovl4f f28YxTj4P8g1mxg0UNcI0Nv5I4UlNQeSjHG8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=u3pPV3Los5oSriiTxlFQMSaFcJZsokNuVUoZPgCJlh7lRTkUNWI8t25vgnxdO5FIaw kPOE+QKWVOiHyspcbVucNqI0x6yhcQizayiTm7H6AlP110MabuuCdHKiuBgmUmI7dsXD qtGuyFT+5ljF6MTj5ptxAiW+FQOvxxZwiOL1I= Received: by 10.216.169.136 with SMTP id n8mr5540838wel.65.1286212845966; Mon, 04 Oct 2010 10:20:45 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id k7sm3154325wej.26.2010.10.04.10.20.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 10:20:24 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 2/2] tests: updated GrlMetadataSource filter tests Date: Mon, 4 Oct 2010 19:19:01 +0200 Message-Id: <1286212741-10120-3-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 17:20:49 -0000 Updated GrlMetadataSource filter tests so that they assert that the aggregated length of the two lists returned (the one which passes the check and the one which doesn't) equals to the original key list. Signed-off-by: Simón Pena --- tests/python/test_metadata_source.py | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/python/test_metadata_source.py b/tests/python/test_metadata_source.py index 27cf58a..67282cb 100644 --- a/tests/python/test_metadata_source.py +++ b/tests/python/test_metadata_source.py @@ -36,13 +36,25 @@ class TestMetadataSource(unittest.TestCase): keys = self.metadata_source.slow_keys() def test_filter_supported(self): - keys = self.metadata_source.filter_supported([], True) + sources = self.registry.get_sources(False) + keys = self.registry.get_metadata_keys() + for source in sources: + supported, unsupported = source.filter_supported(keys, True) + self.assertEqual(len(supported) + len(unsupported), len(keys)) def test_filter_slow(self): - keys = self.metadata_source.filter_slow([], True) + sources = self.registry.get_sources(False) + keys = self.registry.get_metadata_keys() + for source in sources: + fast, slow = source.filter_slow(keys, True) + self.assertEqual(len(fast) + len(slow), len(keys)) def test_filter_writable(self): - keys = self.metadata_source.filter_writable([], True) + sources = self.registry.get_sources(False) + keys = self.registry.get_metadata_keys() + for source in sources: + writable, unwritable = source.filter_writable(keys, True) + self.assertEqual(len(writable) + len(unwritable), len(keys)) def test_key_depends(self): key_id = self.registry.lookup_metadata_key(constants.KEY_ID) -- 1.7.0.4 From spenap@gmail.com Mon Oct 4 18:34:36 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0F1657500CC for ; Mon, 4 Oct 2010 18:34:36 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nb7CrJqcgI0j for ; Mon, 4 Oct 2010 18:34:33 +0000 (UTC) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by menubar.gnome.org (Postfix) with ESMTP id E5CC675009D for ; Mon, 4 Oct 2010 18:34:24 +0000 (UTC) Received: by wyb29 with SMTP id 29so5331648wyb.27 for ; Mon, 04 Oct 2010 11:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=N9ozIZM2osIMY/FlxSRFR9P59mx4ONtm49m7Taf7nsg=; b=ZYsemms4Tk3AVQvEfhsNRhdu60883S7muHgYxsVdZIYVok1UqlewhbG5wKLr3AUtBI GHKuZB8jbWxUn+CtL8wTQHgM6rF8IlX3J8RvVvV24e/tnd+C7ViUHVHkUp6k6hl+F8AD PRXfLaIIVtUyZP51hsH0z56Y9BEQRlkZZqHpA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=MDm0mL0azfInh6baQYaUM/Zug7IYfAnj0MURKQa+tpMwucYBqDzNTAnMuzhUkWF14S oscMlhn7e9Z8LbzA/6S/gUBWt+RXrJkGOp1dg2LPkG31klUAk6IxQfAa6VPFauKOQA0W xJAg9tOJmJK9RjEJOQeXmkNYQvPKgvQK6VF6w= Received: by 10.216.232.90 with SMTP id m68mr8077665weq.10.1286217262416; Mon, 04 Oct 2010 11:34:22 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id k7sm3211255wej.26.2010.10.04.11.34.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 11:34:13 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 0/3] RFC: JavaScript alternative branch and GObject Introspection Date: Mon, 4 Oct 2010 20:33:57 +0200 Message-Id: <1286217240-17900-1-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 18:34:36 -0000 Hi all, Right now, Grilo's GObject Introspection support is mostly complete: most of the API has been revised and annotated, and is accessible (and has been tested) from PyGObject. However, as we're using GParamSpecs to store our metadata keys, and that data type isn't supported in JavaScript (see bug #626047), JS developers can't benefit from Grilo's GI. While (I've been told[1] that) the fix for this issue would imply having a Boxed type for the ParamSpec, as a (hack) workaround we can annotate the metadata keys as uints. These patch do that: * replace ParamSpec annotations with uints * update the existing JS example to showcase the search method and * provide a JS clone of grl-inspect What I suggest with this patches is to create a branch in the repository: either in gitorious or in the GNOME infrastructure. Besides, I think we should close bug #616961 (about Grilo's lack of introspection data), and open a specific one about JavaScript's lack of support for GrlKeyIDs, marking it as blocked by JavaScript's one. What do you think? Cheers, Simon [1] http://rotty.yi.org/irclogs/gnome/%23introspection/2010-09-30/#e215 Simón Pena (3): annotations: replaced GObject.ParamSpec with uint js: updated example js: cloned grl-inspect in JavaScript src/data/grl-data.c | 26 ++++---- src/grl-media-source.c | 16 +++--- src/grl-metadata-key.c | 4 +- src/grl-metadata-source.c | 32 +++++----- src/grl-metadata-source.h | 2 +- src/grl-multiple.c | 4 +- src/grl-plugin-registry.c | 6 +- tools/js/grl-inspect.js | 153 +++++++++++++++++++++++++++++++++++++++++++++ tools/js/testGrilo.js | 16 +++-- 9 files changed, 209 insertions(+), 50 deletions(-) create mode 100644 tools/js/grl-inspect.js From spenap@gmail.com Mon Oct 4 18:34:48 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 89205750145 for ; Mon, 4 Oct 2010 18:34:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.913 X-Spam-Level: X-Spam-Status: No, score=-1.913 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GJ=0.077, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rNhQz-u00Xs0 for ; Mon, 4 Oct 2010 18:34:43 +0000 (UTC) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by menubar.gnome.org (Postfix) with ESMTP id 5C61D75009D for ; Mon, 4 Oct 2010 18:34:33 +0000 (UTC) Received: by wwb31 with SMTP id 31so5439627wwb.27 for ; Mon, 04 Oct 2010 11:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=bKy4fsx0saKTUX390y53Gj2WuMFvxV7Kdvagj4hbsXQ=; b=HjtCiiSHlZ9XvQgUCWjvWfW47LVC+UmN00owEN1Fp84AzTdzeJktNg+IoAswo+XiFy X/aQNurcZ520E+6yoRGt2/Qa+oYPqi5A9tevvI3RRnXZKq+vI6mAUuCmEpMhlzdGUrJk 4lBghz1hv6BBMHyQb8HZKHz+PWeeO5Y+JGcvU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=CoeZXBOZz+Z+15g8voOtzHAEhvMQcPnOAVriWGaPIeSoPKD+HG0AaWKdCnxC8P4JF+ sVodcFE1WXeGKscpBZOQDWax0+pauH+h2Nb8UTEKdp7C/daF18mTts+gr23lonHoqWWs mZ8W4HcaJ2CwWSge/KU6V03gY8l0buhPBd9SM= Received: by 10.227.151.70 with SMTP id b6mr2337181wbw.6.1286217271989; Mon, 04 Oct 2010 11:34:31 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id k7sm3211255wej.26.2010.10.04.11.34.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 11:34:26 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 1/3] annotations: replaced GObject.ParamSpec with uint Date: Mon, 4 Oct 2010 20:33:58 +0200 Message-Id: <1286217240-17900-2-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286217240-17900-1-git-send-email-spenap@gmail.com> References: <1286217240-17900-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 18:34:48 -0000 As gjs currently doesn't support GParamSpecs (see #626047), this patch works around it by replacing them with uints. Signed-off-by: Simón Pena --- src/data/grl-data.c | 26 +++++++++++++------------- src/grl-media-source.c | 16 ++++++++-------- src/grl-metadata-key.c | 4 ++-- src/grl-metadata-source.c | 32 ++++++++++++++++---------------- src/grl-metadata-source.h | 2 +- src/grl-multiple.c | 4 ++-- src/grl-plugin-registry.c | 6 +++--- 7 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/data/grl-data.c b/src/data/grl-data.c index 81a30f9..6a3c726 100644 --- a/src/data/grl-data.c +++ b/src/data/grl-data.c @@ -163,7 +163,7 @@ grl_data_new (void) /** * grl_data_get: * @data: data to retrieve value - * @key: (type GObject.ParamSpec): key to look up. + * @key: (type uint): key to look up. * * Get the value associated with the key. If it does not contain any value, NULL * will be returned. @@ -182,7 +182,7 @@ grl_data_get (GrlData *data, GrlKeyID key) /** * grl_data_set: * @data: data to modify - * @key: (type GObject.ParamSpec): key to change or add + * @key: (type uint): key to change or add * @value: the new value * * Sets the value associated with the key. If key already has a value and @@ -226,7 +226,7 @@ grl_data_set (GrlData *data, GrlKeyID key, const GValue *value) /** * grl_data_set_string: * @data: data to modify - * @key: (type GObject.ParamSpec): key to change or add + * @key: (type uint): key to change or add * @strvalue: the new value * * Sets the value associated with the key. If key already has a value and @@ -251,7 +251,7 @@ grl_data_set_string (GrlData *data, /** * grl_data_get_string: * @data: data to inspect - * @key: (type GObject.ParamSpec): key to use + * @key: (type uint): key to use * * Returns the value associated with the key. If key has no value, or value is * not string, or key is not in data, then NULL is returned. @@ -273,7 +273,7 @@ grl_data_get_string (GrlData *data, GrlKeyID key) /** * grl_data_set_int: * @data: data to change - * @key: (type GObject.ParamSpec): key to change or add + * @key: (type uint): key to change or addd * @intvalue: the new value * * Sets the value associated with the key. If key already has a value and @@ -291,7 +291,7 @@ grl_data_set_int (GrlData *data, GrlKeyID key, gint intvalue) /** * grl_data_get_int: * @data: data to inspect - * @key: (type GObject.ParamSpec): key to use + * @key: (type uint): key to use * * Returns the value associated with the key. If key has no value, or value is * not a gint, or key is not in data, then 0 is returned. @@ -313,7 +313,7 @@ grl_data_get_int (GrlData *data, GrlKeyID key) /** * grl_data_set_float: * @data: data to change - * @key: (type GObject.ParamSpec): key to change or add + * @key: (type uint): key to change or add * @floatvalue: the new value * * Sets the value associated with the key. If key already has a value and @@ -331,7 +331,7 @@ grl_data_set_float (GrlData *data, GrlKeyID key, float floatvalue) /** * grl_data_get_float: * @data: data to inspect - * @key: (type GObject.ParamSpec): key to use + * @key: (type uint): key to use * * Returns the value associated with the key. If key has no value, or value is * not a gfloat, or key is not in data, then 0 is returned. @@ -353,7 +353,7 @@ grl_data_get_float (GrlData *data, GrlKeyID key) /** * grl_data_add: * @data: data to change - * @key: (type GObject.ParamSpec): key to add + * @key: (type uint): key to add * * Adds a new key to data, with no value. If key already exists, it does * nothing. @@ -369,7 +369,7 @@ grl_data_add (GrlData *data, GrlKeyID key) /** * grl_data_remove: * @data: data to change - * @key: (type GObject.ParamSpec): key to remove + * @key: (type uint): key to remove * * Removes key from data, freeing its value. If key is not in data, then * it does nothing. @@ -385,7 +385,7 @@ grl_data_remove (GrlData *data, GrlKeyID key) /** * grl_data_has_key: * @data: data to inspect - * @key: (type GObject.ParamSpec): key to search + * @key: (type uint): key to search * * Checks if key is in data. * @@ -405,7 +405,7 @@ grl_data_has_key (GrlData *data, GrlKeyID key) * * Returns a list with keys contained in data. * - * Returns: (transfer container) (element-type GObject.ParamSpec): an array with + * Returns: (transfer container) (element-type uint): an array with * the keys. The content of the list should not be modified or freed. Use g_list_free() * when done using the list. **/ @@ -424,7 +424,7 @@ grl_data_get_keys (GrlData *data) /** * grl_data_key_is_known: * @data: data to inspect - * @key: (type GObject.ParamSpec): key to search + * @key: (type uint): key to search * * Checks if the key has a value. * diff --git a/src/grl-media-source.c b/src/grl-media-source.c index 9aa3873..3efe0d9 100644 --- a/src/grl-media-source.c +++ b/src/grl-media-source.c @@ -1186,7 +1186,7 @@ metadata_full_resolution_ctl_cb (GrlMediaSource *source, * grl_media_source_browse: * @source: a media source * @container: (allow-none): a container of data transfer objects - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @skip: the number if elements to skip in the browse operation * @count: the number of elements to retrieve in the browse operation @@ -1323,7 +1323,7 @@ grl_media_source_browse (GrlMediaSource *source, * grl_media_source_browse_sync: * @source: a media source * @container: (allow-none): a container of data transfer objects - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @skip: the number if elements to skip in the browse operation * @count: the number of elements to retrieve in the browse operation @@ -1382,7 +1382,7 @@ grl_media_source_browse_sync (GrlMediaSource *source, * grl_media_source_search: * @source: a media source * @text: the text to search - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @skip: the number if elements to skip in the search operation * @count: the number of elements to retrieve in the search operation @@ -1509,7 +1509,7 @@ grl_media_source_search (GrlMediaSource *source, * grl_media_source_search_sync: * @source: a media source * @text: the text to search - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @skip: the number if elements to skip in the search operation * @count: the number of elements to retrieve in the search operation @@ -1568,7 +1568,7 @@ grl_media_source_search_sync (GrlMediaSource *source, * grl_media_source_query: * @source: a media source * @query: the query to process - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @skip: the number if elements to skip in the query operation * @count: the number of elements to retrieve in the query operation @@ -1701,7 +1701,7 @@ grl_media_source_query (GrlMediaSource *source, * grl_media_source_query_sync: * @source: a media source * @query: the query to process - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @skip: the number if elements to skip in the query operation * @count: the number of elements to retrieve in the query operation @@ -1760,7 +1760,7 @@ grl_media_source_query_sync (GrlMediaSource *source, * grl_media_source_metadata: * @source: a media source * @media: (allow-none): a data transfer object - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @flags: the resolution mode * @callback: (scope notified): the user defined callback @@ -1871,7 +1871,7 @@ grl_media_source_metadata (GrlMediaSource *source, * grl_media_source_metadata_sync: * @source: a media source * @media: (allow-none): a data transfer object - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyIDs to request * @flags: the resolution mode * @error: a #GError, or @NULL diff --git a/src/grl-metadata-key.c b/src/grl-metadata-key.c index 56c44c0..2e3c193 100644 --- a/src/grl-metadata-key.c +++ b/src/grl-metadata-key.c @@ -285,7 +285,7 @@ GRL_METADATA_KEY_STUDIO = /** * grl_metadata_key_get_name: - * @key: (type GObject.ParamSpec): key to look up + * @key: (type uint): key to look up * * Retrieves the name associated with the key * @@ -299,7 +299,7 @@ grl_metadata_key_get_name (GrlKeyID key) /** * grl_metadata_key_get_desc: - * @key: (type GObject.ParamSpec): key to look up + * @key: (type uint): key to look up * * Retrieves the description associated with the key * diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c index 086dc40..72ae602 100644 --- a/src/grl-metadata-source.c +++ b/src/grl-metadata-source.c @@ -506,7 +506,7 @@ analyze_keys_to_write (GrlMetadataSource *source, * Get a list of #GrlKeyID, which describe a metadata types that this * source can fetch and store. * - * Returns: (element-type GObject.ParamSpec) (transfer none): a #GList with the keys + * Returns: (element-type uint) (transfer none): a #GList with the keys */ const GList * grl_metadata_source_supported_keys (GrlMetadataSource *source) @@ -527,7 +527,7 @@ grl_metadata_source_supported_keys (GrlMetadataSource *source) * are marked as slow because of the amount of traffic/processing needed * to fetch them. * - * Returns: (element-type GObject.ParamSpec) (transfer none): a #GList with the keys + * Returns: (element-type uint) (transfer none): a #GList with the keys */ const GList * grl_metadata_source_slow_keys (GrlMetadataSource *source) @@ -543,12 +543,12 @@ grl_metadata_source_slow_keys (GrlMetadataSource *source) /** * grl_metadata_source_key_depends: * @source: a metadata source - * @key_id: (type GObject.ParamSpec): the requested metadata key + * @key_id: (type uint): the requested metadata key * * Get the list of #GrlKeyID which are needed a priori, in order to fetch * and store the requested @key_id * - * Returns: (element-type GObject.ParamSpec) (transfer none): + * Returns: (element-type uint) (transfer none): * a #GList with the keys, or @NULL if it can not resolve @key_id */ const GList * @@ -571,7 +571,7 @@ grl_metadata_source_key_depends (GrlMetadataSource *source, GrlKeyID key_id) * are marked as writable, meaning the source allows the client * to provide new values for these keys that will be stored permanently. * - * Returns: (element-type GObject.ParamSpec) (transfer none): + * Returns: (element-type uint) (transfer none): * a #GList with the keys */ const GList * @@ -588,7 +588,7 @@ grl_metadata_source_writable_keys (GrlMetadataSource *source) /** * grl_metadata_source_resolve: * @source: a metadata source - * @keys: (element-type GObject.ParamSpec) (allow-none): the #GList + * @keys: (element-type uint) (allow-none): the #GList * of #GrlKeyID to retrieve * @media: Transfer object where all the metadata is stored. * @flags: bitwise mask of #GrlMetadataResolutionFlags with the resolution @@ -652,7 +652,7 @@ grl_metadata_source_resolve (GrlMetadataSource *source, /** * grl_metadata_source_resolve_sync: * @source: a metadata source - * @keys: (element-type GObject.ParamSpec) (allow-none): the #GList + * @keys: (element-type uint) (allow-none): the #GList * of #GrlKeyID to retrieve * @media: Transfer object where all the metadata is stored * @flags: bitwise mask of #GrlMetadataResolutionFlags with the resolution @@ -702,7 +702,7 @@ grl_metadata_source_resolve_sync (GrlMetadataSource *source, /** * grl_metadata_source_filter_supported: * @source: a metadata source - * @keys: (element-type GObject.ParamSpec) (transfer container) (allow-none) (inout): + * @keys: (element-type uint) (transfer container) (allow-none) (inout): * the list of keys to filter out * @return_filtered: if %TRUE the return value shall be a new list with * the matched keys @@ -710,7 +710,7 @@ grl_metadata_source_resolve_sync (GrlMetadataSource *source, * Compares the received @keys list with the supported key list by the * metadata @source, and will delete those keys which are supported. * - * Returns: (element-type GObject.ParamSpec) (transfer container): + * Returns: (element-type uint) (transfer container): * if @return_filtered is %TRUE will return the list of intersected keys; * otherwise %NULL */ @@ -762,7 +762,7 @@ grl_metadata_source_filter_supported (GrlMetadataSource *source, /** * grl_metadata_source_filter_slow: * @source: a metadata source - * @keys: (element-type GObject.ParamSpec) (transfer container) (allow-none) (inout): + * @keys: (element-type uint) (transfer container) (allow-none) (inout): * the list of keys to filter out * @return_filtered: if %TRUE the return value shall be a new list with * the matched keys @@ -770,7 +770,7 @@ grl_metadata_source_filter_supported (GrlMetadataSource *source, * Similar to grl_metadata_source_filter_supported() but applied to * the slow keys in grl_metadata_source_slow_keys() * - * Returns: (element-type GObject.ParamSpec) (transfer container): + * Returns: (element-type uint) (transfer container): * if @return_filtered is %TRUE will return the list of intersected keys; * otherwise %NULL */ @@ -829,7 +829,7 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source, /** * grl_metadata_source_filter_writable: * @source: a metadata source - * @keys: (element-type GObject.ParamSpec) (transfer container) (allow-none) (inout): + * @keys: (element-type uint) (transfer container) (allow-none) (inout): * the list of keys to filter out * @return_filtered: if %TRUE the return value shall be a new list with * the matched keys @@ -837,7 +837,7 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source, * Similar to grl_metadata_source_filter_supported() but applied to * the writable keys in grl_metadata_source_writable_keys() * - * Returns: (element-type GObject.ParamSpec) (transfer container): + * Returns: (element-type uint) (transfer container): * if @return_filtered is %TRUE will return the list of intersected keys; * otherwise %NULL */ @@ -1111,7 +1111,7 @@ grl_metadata_source_get_description (GrlMetadataSource *source) * grl_metadata_source_set_metadata: * @source: a metadata source * @media: the #GrlMedia object that we want to operate on. - * @keys: (element-type GObject.ParamSpec) (allow-none): a list + * @keys: (element-type uint) (allow-none): a list * of #GrlKeyID whose values we want to change. * @flags: Flags to configure specific behaviors of the operation. * @callback: (scope notified): the callback to execute when the operation is finished. @@ -1174,7 +1174,7 @@ grl_metadata_source_set_metadata (GrlMetadataSource *source, * grl_metadata_source_set_metadata_sync: * @source: a metadata source * @media: the #GrlMedia object that we want to operate on - * @keys: (element-type GObject.ParamSpec) (allow-none): a list of + * @keys: (element-type uint) (allow-none): a list of * #GrlKeyID whose values we want to change * @flags: Flags to configure specific behaviors of the operation. * @error: a #GError, or @NULL @@ -1186,7 +1186,7 @@ grl_metadata_source_set_metadata (GrlMetadataSource *source, * * This function is synchronous. * - * Returns: (element-type GObject.ParamSpec) (transfer container): + * Returns: (element-type uint) (transfer container): * a #GList of keys that could not be updated, or @NULL */ GList * diff --git a/src/grl-metadata-source.h b/src/grl-metadata-source.h index e225e28..9121cca 100644 --- a/src/grl-metadata-source.h +++ b/src/grl-metadata-source.h @@ -123,7 +123,7 @@ typedef void (*GrlMetadataSourceResolveCb) (GrlMetadataSource *source, * GrlMetadataSourceSetMetadataCb: * @source: a metadata source * @media: (transfer full): a #GrlMedia transfer object - * @failed_keys: (element-type GObject.ParamSpec) (transfer container): #GList of + * @failed_keys: (element-type uint) (transfer container): #GList of * keys that could not be updated, if any * @user_data: user data passed to grl_metadata_source_set_metadata() * @error: (not-error) (type uint): possible #GError generated when updating the metadata diff --git a/src/grl-multiple.c b/src/grl-multiple.c index d651fa0..9b5dd42 100644 --- a/src/grl-multiple.c +++ b/src/grl-multiple.c @@ -437,7 +437,7 @@ multiple_search_cb (GrlMediaSource *source, * a #GList of #GrlMediaSources to search from (%NULL for all * searchable sources) * @text: the text to search for - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyID to retrieve * @count: the maximum number of elements to retrieve * @flags: the operation flags @@ -571,7 +571,7 @@ grl_multiple_cancel (guint search_id) * a #GList of #GrlMediaSources where to search from (%NULL for all * available sources with search capability) * @text: the text to search for - * @keys: (element-type GObject.ParamSpec): the #GList of + * @keys: (element-type uint): the #GList of * #GrlKeyID to retrieve * @count: the maximum number of elements to retrieve * @flags: the operation flags diff --git a/src/grl-plugin-registry.c b/src/grl-plugin-registry.c index 4be7b94..8791995 100644 --- a/src/grl-plugin-registry.c +++ b/src/grl-plugin-registry.c @@ -674,7 +674,7 @@ grl_plugin_registry_unload (GrlPluginRegistry *registry, * * Registers a metadata key * - * Returns: (type GObject.ParamSpec) (transfer none): The #GrlKeyID registered + * Returns: (type uint) (transfer none): The #GrlKeyID registered */ GrlKeyID grl_plugin_registry_register_metadata_key (GrlPluginRegistry *registry, @@ -706,7 +706,7 @@ grl_plugin_registry_register_metadata_key (GrlPluginRegistry *registry, * * Look up for the metadata key with name @key_name. * - * Returns: (type GObject.ParamSpec) (transfer none): The metadata key, or @NULL if not found + * Returns: (type uint) (transfer none): The metadata key, or @NULL if not found */ GrlKeyID grl_plugin_registry_lookup_metadata_key (GrlPluginRegistry *registry, @@ -727,7 +727,7 @@ grl_plugin_registry_lookup_metadata_key (GrlPluginRegistry *registry, * * Returns a list with all registered keys in system. * - * Returns: (element-type GObject.ParamSpec) (transfer container): a #GList + * Returns: (element-type uint) (transfer container): a #GList * with all the available #GrlKeyIDs. The content of the list should * not be modified or freed. Use g_list_free() when done using the list. **/ -- 1.7.0.4 From spenap@gmail.com Mon Oct 4 18:34:52 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 04E47750294 for ; Mon, 4 Oct 2010 18:34:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LF6azd0XwhJN for ; Mon, 4 Oct 2010 18:34:49 +0000 (UTC) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by menubar.gnome.org (Postfix) with ESMTP id CA3E075009D for ; Mon, 4 Oct 2010 18:34:48 +0000 (UTC) Received: by mail-ww0-f46.google.com with SMTP id 31so5439627wwb.27 for ; Mon, 04 Oct 2010 11:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=DFXTRIBZ69e3nPP0NJPKbpJ9gNxazAeAC5gXQfUSPuA=; b=leKuBCaH7i0Dg0kjeVz/g5lTWbaMy0RJLPrSUBenMFm3Db3BhGaWpz7ohrMMnzbeoc wpegkIPjfzNX3FJotE6Cxt7HvMs3Jmgu86nBfByDlE+SgSP8IXt8o6Vj3TB2H+ZBoq9n 9EtFbdBzS1QkMZg0LnJGs/cxeQwYwcYpbcxls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=hqDHO4IOAgxj4349PxKT5ThXwAkLjO3Pb+kUOhZYvuNm+HI6DYjvU1cMymJf4fRe/R 7hmuDY3TQ56ATrEBNyrjHmDW8mzuTdddpRE+5wi2H9T2nBPJo+hgRReRqiLWjbfFPdYF Cwo9AnORHZYTTHVri8irzBij4PaJW8dWMns/Q= Received: by 10.216.173.70 with SMTP id u48mr5639759wel.59.1286217288441; Mon, 04 Oct 2010 11:34:48 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id k7sm3211255wej.26.2010.10.04.11.34.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 11:34:37 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 2/3] js: updated example Date: Mon, 4 Oct 2010 20:33:59 +0200 Message-Id: <1286217240-17900-3-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286217240-17900-1-git-send-email-spenap@gmail.com> References: <1286217240-17900-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 18:34:52 -0000 * Added grl_init * Replaced KeyID constant with a variable looked up * Tested search callback function Signed-off-by: Simón Pena --- tools/js/testGrilo.js | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/js/testGrilo.js b/tools/js/testGrilo.js index 7c5aea6..37f00f9 100644 --- a/tools/js/testGrilo.js +++ b/tools/js/testGrilo.js @@ -17,6 +17,7 @@ function SimplePlayList () { SimplePlayList.prototype = { _init: function () { let registry = Grl.PluginRegistry.get_default (); + this.registry = registry; let sources = []; this.sources = sources; @@ -25,7 +26,7 @@ SimplePlayList.prototype = { function (pluginRegistry, mediaSource) { let ops = mediaSource.supported_operations (); if (ops & Grl.SupportedOps.SEARCH) { - log ("Detected new source availabe: '" + + log ("Detected new source available: '" + mediaSource.get_name () + "' and it supports search"); sources.push (mediaSource); @@ -42,14 +43,19 @@ SimplePlayList.prototype = { } }, - _searchCallback: function search_cb () { - log ("yeah"); + _searchCallback: function search_cb (source, op_id, media, remaining, + data, error) { + if (media != null) { + log (source.get_name () + ": " + media.get_artist () + + " - " + media.get_album ()); + } }, search: function (q) { + let keyId = this.registry.lookup_metadata_key ("id"); for each (let source in this.sources) { - log (source.get_name () + " - " + q); - source.search (q, [Grl.METADATA_KEY_ID], 0, 10, + log ("* Searching " + source.get_name () + " for " + q); + source.search (q, [keyId], 0, 10, Grl.MetadataResolutionFlags.FULL | Grl.MetadataResolutionFlags.IDLE_RELAY, this._searchCallback, source); -- 1.7.0.4 From spenap@gmail.com Mon Oct 4 18:35:17 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 77E7375009D for ; Mon, 4 Oct 2010 18:35:17 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sMqqk9S40ciF for ; Mon, 4 Oct 2010 18:35:14 +0000 (UTC) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by menubar.gnome.org (Postfix) with ESMTP id ECB2F750145 for ; Mon, 4 Oct 2010 18:35:13 +0000 (UTC) Received: by mail-ww0-f46.google.com with SMTP id 31so5439627wwb.27 for ; Mon, 04 Oct 2010 11:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=BwQQqFrNnk8m0Ul6gnnmlqOSqLhDWEfII/k+DNHLM3c=; b=OvIfe1d4K1sT03a05iYe6QqUKGjcdTHvYuJWzoc4IVV060vWFApP92762Jc0WarFEP ti5inB7wR1JJUugJ/NMxXv4ETUvmTFAOa9oxC7n7oqJ+qBZzTTPLJF+gyOH7hH9xDDtW gYztwW0ePGeql+8DxDP0ik49A8fJcT7HZouDc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=Kg9O3jGJmOzNPyvzS9qsasyCkLH4yyVnvH2LyewAlOKqeKjJOw5X35NBGHGN7k2szG E3ja1BlpvfRWjwK8hMK+T5wYbEVIawtXgAO3lLomcZiaH4RdaIk5+CsXC5N7T18049op 5mR625HLCEw9q/G85hJR5vcF+NIFsrY9xwTQg= Received: by 10.216.187.143 with SMTP id y15mr8063431wem.74.1286217313243; Mon, 04 Oct 2010 11:35:13 -0700 (PDT) Received: from localhost.localdomain (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id k7sm3211255wej.26.2010.10.04.11.34.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 11:35:03 -0700 (PDT) From: =?UTF-8?q?Sim=C3=B3n=20Pena?= To: grilo-list@gnome.org Subject: [PATCH 3/3] js: cloned grl-inspect in JavaScript Date: Mon, 4 Oct 2010 20:34:00 +0200 Message-Id: <1286217240-17900-4-git-send-email-spenap@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286217240-17900-1-git-send-email-spenap@gmail.com> References: <1286217240-17900-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 18:35:17 -0000 Signed-off-by: Simón Pena --- tools/js/grl-inspect.js | 153 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 153 insertions(+), 0 deletions(-) create mode 100644 tools/js/grl-inspect.js diff --git a/tools/js/grl-inspect.js b/tools/js/grl-inspect.js new file mode 100644 index 0000000..d790968 --- /dev/null +++ b/tools/js/grl-inspect.js @@ -0,0 +1,153 @@ +// +// grl-inspect.js +// JavaScript's clone of grl-inspect.c +// +// Copyright (C) 2010, Igalia S.L. +// +// Author: Simón Pena +// + +const Grl = imports.gi.Grl; +const MainLoop = imports.mainloop; + +const FLICKR_KEY = "fa037bee8120a921b34f8209d715a2fa"; +const FLICKR_SECRET = "9f6523b9c52e3317"; +const VIMEO_KEY = "4d908c69e05a9d5b5c6669d302f920cb"; +const VIMEO_SECRET = "4a923ffaab6238eb"; +const YOUTUBE_KEY = "AI39si4EfscPllSfUy1IwexMf__kntTL_G5dfSr2iUEVN45RHGq92Aq0lX25OlnOkG6KTN-4soVAkAf67fWYXuHfVADZYr7S1A"; + +function list_all_sources () { + + let registry = Grl.PluginRegistry.get_default (); + let sources = registry.get_sources (false); + + for each (let source in sources) { + log (source.get_id () + ": " + "type casting missing"); + } +} + +function print_keys (keys) { + + let printed_keys = '' + for each (let key in keys) { + printed_keys += Grl.metadata_key_get_name (key) + ", "; + } + log (printed_keys); +} + +function introspect_source (source_id) { + + let registry = Grl.PluginRegistry.get_default (); + let source = registry.lookup_source (source_id); + + if (source != null) { + + log ("Plugin Details:"); + log (" Identifier:" + source.get_id ()); + log (" Filename:" + source.get_filename ()); + log (" Rank:" + source.get_rank ()); + + let info_keys = source.get_info_keys (); + + for each (let info_key in info_keys) { + log (" " + info_key + " " + source.get_info (info_key)); + } + log (""); + + log ("Source Details:"); + log (" Identifier: " + source.get_id ()); + log (" Type: " + "check type??"); + log (" Name: " + source.get_name ()); + log (" Description: " + source.get_description ()); + log (""); + + let supported_ops = source.supported_operations (); + + log ("Supported operations:"); + if (supported_ops & Grl.SupportedOps.RESOLVE) { + log (" grl_metadata_source_resolve():\tResolve Metadata\n"); + } + if (supported_ops & Grl.SupportedOps.METADATA) { + log (" grl_media_source_metadata():\t\tRetrieve Metadata\n"); + } + if (supported_ops & Grl.SupportedOps.BROWSE) { + log (" grl_media_source_browse():\t\tBrowse\n"); + } + if (supported_ops & Grl.SupportedOps.SEARCH) { + log (" grl_media_source_search():\t\tSearch\n"); + } + if (supported_ops & Grl.SupportedOps.QUERY) { + log (" grl_media_source_query():\t\tQuery\n"); + } + if (supported_ops & Grl.SupportedOps.STORE) { + log (" grl_metadata_source_set_metadata():\tUpdate Metadata\n"); + } + if (supported_ops & Grl.SupportedOps.STORE_PARENT) { + log (" grl_media_source_store():\t\tAdd New Media\n"); + } + if (supported_ops & Grl.SupportedOps.REMOVE) { + log (" grl_media_source_remove():\t\tRemove Media\n"); + } + + log ("Supported keys:"); + log (" Readable Keys:\t\t"); + print_keys (source.supported_keys ()); + log (" Writable Keys:\t\t"); + print_keys (source.writable_keys ()); + } +} + +function init () { + + let registry = Grl.PluginRegistry.get_default (); + + configure_flickr (); + configure_vimeo (); + configure_youtube (); + + registry.load_all (); +} + +function configure_flickr () { + + let registry = Grl.PluginRegistry.get_default (); + let flickr_config = Grl.Config.new ('grl-flickr', null); + flickr_config.set_api_key (FLICKR_KEY); + flickr_config.set_api_secret (FLICKR_SECRET); + registry.add_config (flickr_config); +} + +function configure_vimeo () { + + let registry = Grl.PluginRegistry.get_default (); + let vimeo_config = Grl.Config.new ('grl-vimeo', null); + vimeo_config.set_api_key (VIMEO_KEY); + vimeo_config.set_api_secret (VIMEO_SECRET); + registry.add_config (vimeo_config); +} + +function configure_youtube () { + + let registry = Grl.PluginRegistry.get_default (); + let youtube_config = Grl.Config.new ('grl-youtube', null); + youtube_config.set_api_key (YOUTUBE_KEY); + registry.add_config (youtube_config); +} + +function run () { + + init (); + + if (ARGV[0] == null) { + list_all_sources (); + } else { + introspect_source (ARGV[0]); + } + + MainLoop.quit ("main"); +} + +Grl.init (null, null); +MainLoop.idle_add(run); + +MainLoop.run ("main"); -- 1.7.0.4 From vjaquez@igalia.com Mon Oct 4 19:04:59 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B62C1750584 for ; Mon, 4 Oct 2010 19:04:59 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s3pNE7K33DYZ for ; Mon, 4 Oct 2010 19:04:56 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 336E075009D for ; Mon, 4 Oct 2010 19:04:47 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAIfBqUxbdWOb/2dsb2JhbACDHpEcjn2zB5IVgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686828059" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:04:45 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qL7-0008AM-JS for ; Mon, 04 Oct 2010 21:04:45 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qL7-0004rm-Fg for ; Mon, 04 Oct 2010 21:04:45 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qKL-0001zc-Vl for grilo-list@gnome.org; Mon, 04 Oct 2010 21:03:58 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 0/2] enhance the pkg-config files Date: Mon, 4 Oct 2010 21:03:55 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:05:00 -0000 Complete and enhance the the pkg-config of the project. Specially added GI information. Víctor Manuel Jáquez Leal (2): build: improve gir support in grilo-0.1.pc build: improve path definition in grilo-uninstalled.pc.in grilo-0.1.pc.in | 7 +++++-- grilo-uninstalled.pc.in | 15 +++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) From vjaquez@igalia.com Mon Oct 4 19:05:00 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2A6F375009D for ; Mon, 4 Oct 2010 19:05:00 +0000 (UTC) X-Quarantine-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.667 X-Spam-Level: X-Spam-Status: No, score=-1.667 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_BX=0.077, TW_IB=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id he2VyIXY-4IO for ; Mon, 4 Oct 2010 19:04:57 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 02D667500CC for ; Mon, 4 Oct 2010 19:04:56 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAIfBqUxbdWOb/2dsb2JhbACDHpEcjn2zB5IVgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686828060" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:04:45 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qL7-0008AR-St for ; Mon, 04 Oct 2010 21:04:45 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qL7-0004rp-Oy for ; Mon, 04 Oct 2010 21:04:45 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qKM-0001ze-25 for grilo-list@gnome.org; Mon, 04 Oct 2010 21:03:58 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 1/2] build: improve gir support in grilo-0.1.pc Date: Mon, 4 Oct 2010 21:03:56 +0200 Message-Id: <5cc2847e6455f6888a902f328d947470c0d2a8cf.1286218769.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:05:00 -0000 Signed-off-by: Víctor Manuel Jáquez Leal --- grilo-0.1.pc.in | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/grilo-0.1.pc.in b/grilo-0.1.pc.in index 4b52d55..34d7583 100644 --- a/grilo-0.1.pc.in +++ b/grilo-0.1.pc.in @@ -3,12 +3,15 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/@GRL_NAME@ plugindir=@GRL_PLUGINS_DIR@ +datarootdir=${prefix}/share +datadir=${datarootdir} +girdir=${datadir}/gir-1.0 +typelibdir=${libdir}/girepository-1.0 Name: Grilo Framework Description: Grilo Framework for multimedia developers Version: @VERSION@ Libs: -L${libdir} -l@GRL_NAME@ Cflags: -I${includedir} -Requires: gobject-2.0 +Requires: glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 libxml-2.0 Requires.Private: - -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:05:00 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4CEC97500CC for ; Mon, 4 Oct 2010 19:05:00 +0000 (UTC) X-Quarantine-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.667 X-Spam-Level: X-Spam-Status: No, score=-1.667 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_BX=0.077, TW_IB=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kQmk52HWWueq for ; Mon, 4 Oct 2010 19:04:58 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id D15FA750276 for ; Mon, 4 Oct 2010 19:04:57 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAIfBqUxbdWOb/2dsb2JhbACDHpEcjn2zB5IVgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686828063" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:04:46 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qL7-0008AW-W1 for ; Mon, 04 Oct 2010 21:04:45 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qL7-0004rq-RQ for ; Mon, 04 Oct 2010 21:04:45 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qKM-0001zh-B6 for grilo-list@gnome.org; Mon, 04 Oct 2010 21:03:58 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 2/2] build: improve path definition in grilo-uninstalled.pc.in Date: Mon, 4 Oct 2010 21:03:57 +0200 Message-Id: <939c7888dca46385ff2bf76c586a7425b6b70c49.1286218769.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:05:00 -0000 Signed-off-by: Víctor Manuel Jáquez Leal --- grilo-uninstalled.pc.in | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/grilo-uninstalled.pc.in b/grilo-uninstalled.pc.in index 4e526c5..094f9bd 100644 --- a/grilo-uninstalled.pc.in +++ b/grilo-uninstalled.pc.in @@ -1,14 +1,17 @@ +# the standard variables don't make sense for an uninstalled copy prefix= exec_prefix= -libdir=${pcfiledir}/src -includedir=${pcfiledir}/src -plugindir=${libdir}/@GRL_NAME@ +libdir= +includedir=@abs_top_builddir@/src +plugindir=@abs_top_builddir@ +girdir=@abs_top_builddir@/src +typelibdir=@abs_top_builddir@/src Name: Grilo Framework Description: Grilo Framework for multimedia developers, Not Installed Version: @VERSION@ -Libs: ${libdir}/lib@GRL_NAME@.la -Cflags: -I${includedir} -I${includedir}/data -Requires: gobject-2.0 +Libs: @abs_top_builddir@/src/lib@GRL_NAME@.la +Cflags: -I@abs_top_srcdir@/src -I@abs_top_srcdir@/src/data +Requires: glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 libxml-2.0 Requires.Private: -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:07:40 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4D22575062B for ; Mon, 4 Oct 2010 19:07:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YjFubwAUMTq1 for ; Mon, 4 Oct 2010 19:07:37 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 3840D750584 for ; Mon, 4 Oct 2010 19:07:28 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAPDCqUxbdWOb/2dsb2JhbACDHpEcjn2zEZIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766878429" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:07:26 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qNi-0008Cy-NS for ; Mon, 04 Oct 2010 21:07:26 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qNi-000507-J0 for ; Mon, 04 Oct 2010 21:07:26 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qMx-00024S-3V for grilo-list@gnome.org; Mon, 04 Oct 2010 21:06:39 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core] vala: check for libvala-0.12 instead of vala-0.12 Date: Mon, 4 Oct 2010 21:06:38 +0200 Message-Id: <1286219198-7936-1-git-send-email-vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:07:40 -0000 This is one of the risks to be living on the edge. Signed-off-by: Víctor Manuel Jáquez Leal --- configure.ac | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index bfd0623..d8760ef 100644 --- a/configure.ac +++ b/configure.ac @@ -148,8 +148,8 @@ AC_ARG_ENABLE([vala], [enable_vala=autodetect have_vala=yes]) AC_MSG_RESULT([$enable_vala]) if test "x$enable_vala" != "xno"; then - PKG_CHECK_EXISTS([ vala-0.12 ], - [ valapkg="vala-0.12" ], + PKG_CHECK_EXISTS([ libvala-0.12 ], + [ valapkg="libvala-0.12" ], [ PKG_CHECK_EXISTS([ vala-0.10 ], [ valapkg="vala-0.10" ], [ PKG_CHECK_EXISTS([ vala-1.0 >= $VALA_REQS ], -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:02 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2C48175062B for ; Mon, 4 Oct 2010 19:13:02 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.59 X-Spam-Level: X-Spam-Status: No, score=-1.59 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_GT=0.077, TW_RL=0.077, TW_TK=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tn4wXBee4zkI for ; Mon, 4 Oct 2010 19:13:00 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 9F752750584 for ; Mon, 4 Oct 2010 19:12:51 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpEcjn2zGZIbgSKDMXQEhQmFNw X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879362" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-0008Fa-De for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-00054y-8t for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qS9-000284-Nh for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:01 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 00/10] Grilo Net library Date: Mon, 4 Oct 2010 21:11:51 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:13:02 -0000 This patch set add a new helper library: grl-net. The purpose of this new helper library is to ease the development of plugins. Currently it only has an object: GrlNetWc, which is a simple and thin web client. This web client will be enhanced later with cache support. Víctor Manuel Jáquez Leal (10): wc: grilo net web client wc: test app build: libgrlnet build: grilo-net pkg-config files build: compile libs grl-net: new header file build: libgrlnet introspection wc: gtkdoc documentation doc: add the GrlNetWc definition doc: fix the gtkdoc generation Makefile.am | 2 +- configure.ac | 12 + doc/reference/Makefile.am | 22 +- doc/reference/grilo-docs.sgml | 5 + doc/reference/grilo-sections.txt | 26 ++ doc/reference/grilo.types | 1 + grilo-net-0.1.pc.in | 15 + grilo-net-uninstalled.pc.in | 15 + libs/Makefile.am | 8 + libs/net/Makefile.am | 81 ++++++ libs/net/grl-net-wc.c | 570 ++++++++++++++++++++++++++++++++++++++ libs/net/grl-net-wc.h | 134 +++++++++ libs/net/grl-net.h | 28 ++ libs/net/wc-test.c | 80 ++++++ 14 files changed, 991 insertions(+), 8 deletions(-) create mode 100644 grilo-net-0.1.pc.in create mode 100644 grilo-net-uninstalled.pc.in create mode 100644 libs/Makefile.am create mode 100644 libs/net/Makefile.am create mode 100644 libs/net/grl-net-wc.c create mode 100644 libs/net/grl-net-wc.h create mode 100644 libs/net/grl-net.h create mode 100644 libs/net/wc-test.c From vjaquez@igalia.com Mon Oct 4 19:13:04 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6FA48750716 for ; Mon, 4 Oct 2010 19:13:04 +0000 (UTC) X-Quarantine-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EPf5O-ZK5BSD for ; Mon, 4 Oct 2010 19:13:00 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 76BEC750004 for ; Mon, 4 Oct 2010 19:13:00 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpBrMY59sxmSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879364" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-0008Fk-LA for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-000552-Dd for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qS9-000289-Ta for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:01 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 02/10] wc: test app Date: Mon, 4 Oct 2010 21:11:53 +0200 Message-Id: <44359e31056801ac2855b7acb2bbe019911a9ee1.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:13:04 -0000 Signed-off-by: Víctor Manuel Jáquez Leal --- libs/net/wc-test.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 libs/net/wc-test.c diff --git a/libs/net/wc-test.c b/libs/net/wc-test.c new file mode 100644 index 0000000..2721bc6 --- /dev/null +++ b/libs/net/wc-test.c @@ -0,0 +1,80 @@ +#include "grl-net-wc.h" +#include + +GMainLoop *loop; +const gchar *uri; + +static void +fetch_result (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + gchar *content; + gsize length; + GError *error = NULL; + + if (!grl_net_wc_request_finish (GRL_NET_WC (source), + result, + &content, + &length, + &error)) { + g_print ("Error: %s\n", error->message); + goto end_func; + } + + fwrite (content, 1, length, stdout); + +end_func: + g_object_unref (source); + g_main_loop_quit (loop); +} + +static gboolean +cancel_request (gpointer data) +{ + GCancellable *cancellable; + + cancellable = G_CANCELLABLE (data); + g_cancellable_cancel (cancellable); + + return FALSE; +} + +static gboolean +request (gpointer data) +{ + GCancellable *cancellable; + GrlNetWc *wc; + const gchar *u; + + wc = GRL_NET_WC (data); + u = uri ? uri : "http://www.yahoo.com"; + + cancellable = g_cancellable_new (); + grl_net_wc_request_async (wc, u, cancellable, fetch_result, NULL); + g_timeout_add_seconds (2, cancel_request, cancellable); + + return FALSE; +} + +int +main (int argc, const char **argv) +{ + GrlNetWc *wc; + + g_thread_init (NULL); + g_type_init (); + + if (argc == 2) + uri = argv[1]; + + wc = grl_net_wc_new (); + + g_object_set (wc, "loglevel", 1, NULL); + + loop = g_main_loop_new (NULL, FALSE); + + g_idle_add (request, wc); + + g_main_loop_run (loop); +} -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:06 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 19726750739 for ; Mon, 4 Oct 2010 19:13:06 +0000 (UTC) X-Quarantine-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.744 X-Spam-Level: X-Spam-Status: No, score=-1.744 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_RL=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FzU+qNzIE74k for ; Mon, 4 Oct 2010 19:13:03 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 07D31750101 for ; Mon, 4 Oct 2010 19:13:02 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpEcjn2zGZIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879366" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-0008Fu-Q9 for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-000556-HU for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qSA-00028F-1S for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 04/10] build: grilo-net pkg-config files Date: Mon, 4 Oct 2010 21:11:55 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:13:06 -0000 Signed-off-by: Víctor Manuel Jáquez Leal --- grilo-net-0.1.pc.in | 15 +++++++++++++++ grilo-net-uninstalled.pc.in | 15 +++++++++++++++ 2 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 grilo-net-0.1.pc.in create mode 100644 grilo-net-uninstalled.pc.in diff --git a/grilo-net-0.1.pc.in b/grilo-net-0.1.pc.in new file mode 100644 index 0000000..a8f28a4 --- /dev/null +++ b/grilo-net-0.1.pc.in @@ -0,0 +1,15 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/@GRL_NAME@ +datarootdir=${prefix}/share +datadir=${datarootdir} +girdir=${datadir}/gir-1.0 +typelibdir=${libdir}/girepository-1.0 + +Name: Grilo networking library +Description: Grilo networking helpers for plug-ins +Requires: @GRL_NAME@ +Version: @VERSION@ +Libs: -L${libdir} -lgrlnet-@GRL_MAJORMINOR@ +Cflags: -I${includedir} diff --git a/grilo-net-uninstalled.pc.in b/grilo-net-uninstalled.pc.in new file mode 100644 index 0000000..df4287c --- /dev/null +++ b/grilo-net-uninstalled.pc.in @@ -0,0 +1,15 @@ +# the standard variables don't make sense for an uninstalled copy +prefix= +exec_prefix= +libdir= +includedir= +girdir=@abs_top_builddir@/libs/ +typelibdir=@abs_top_builddir@/libs + +Name: Grilo networking library +Description: Grilo networking helpers for plug-ins +Requires: @GRL_NAME@ +Version: @VERSION@ + +Libs: @abs_top_builddir@/libs/net/libgrlnet-@GRL_MAJORMINOR@.la +Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:07 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C6D72750724 for ; Mon, 4 Oct 2010 19:13:07 +0000 (UTC) X-Quarantine-ID: <1NmXlB2pNTwZ> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1NmXlB2pNTwZ for ; Mon, 4 Oct 2010 19:13:02 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 5E4E375009D for ; Mon, 4 Oct 2010 19:13:01 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAKjDqUxbdWOb/2dsb2JhbACDHqAZsxmSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879363" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-0008Ff-H7 for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-00054z-BF for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qS9-000286-RH for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:01 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 01/10] wc: grilo net web client Date: Mon, 4 Oct 2010 21:11:52 +0200 Message-Id: <19efee4a023fe575f795860fd1574ec565c33796.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:13:08 -0000 Signed-off-by: Víctor Manuel Jáquez Leal --- libs/net/grl-net-wc.c | 493 +++++++++++++++++++++++++++++++++++++++++++++++++ libs/net/grl-net-wc.h | 111 +++++++++++ 2 files changed, 604 insertions(+), 0 deletions(-) create mode 100644 libs/net/grl-net-wc.c create mode 100644 libs/net/grl-net-wc.h diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c new file mode 100644 index 0000000..0d45e66 --- /dev/null +++ b/libs/net/grl-net-wc.c @@ -0,0 +1,493 @@ +/* + * Copyright (C) 2010 Igalia S.L. + * + * Contact: Iago Toral Quiroga + * + * Authors: Víctor M. Jáquez L. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include "grl-net-wc.h" + +#define GRL_LOG_DOMAIN_DEFAULT wc_log_domain +GRL_LOG_DOMAIN_STATIC(wc_log_domain); + +enum { + PROP_0, + PROP_LOG_LEVEL, + PROP_THROTTLING, +}; + +#define GRL_NET_WC_GET_PRIVATE(object) \ + (G_TYPE_INSTANCE_GET_PRIVATE((object), \ + GRL_TYPE_NET_WC, \ + GrlNetWcPrivate)) + +typedef struct _RequestClosure RequestClosure; + +struct _GrlNetWcPrivate { + SoupSession *session; + SoupLoggerLogLevel log_level; + guint throttling; + GTimeVal last_request; + GQueue *pending; /* closure queue for delayed requests */ +}; + +struct _RequestClosure { + GrlNetWc *self; + char *url; + GAsyncResult *result; + GCancellable *cancellable; + guint source_id; +}; + +GQuark +grl_net_wc_error_quark (void) +{ + return g_quark_from_static_string ("grl-wc-error-quark"); +} + +G_DEFINE_TYPE (GrlNetWc, grl_net_wc, G_TYPE_OBJECT); + +static void grl_net_wc_finalize (GObject *object); +static void grl_net_wc_set_property (GObject *object, + guint propid, + const GValue *value, + GParamSpec *pspec); +static void grl_net_wc_get_property (GObject *object, + guint propid, + GValue *value, + GParamSpec *pspec); + +static void +grl_net_wc_class_init (GrlNetWcClass *klass) +{ + GObjectClass *g_klass; + + g_klass = G_OBJECT_CLASS (klass); + g_klass->finalize = grl_net_wc_finalize; + g_klass->set_property = grl_net_wc_set_property; + g_klass->get_property = grl_net_wc_get_property; + + g_type_class_add_private (klass, sizeof (GrlNetWcPrivate)); + + g_object_class_install_property (g_klass, + PROP_LOG_LEVEL, + g_param_spec_uint ("loglevel", + "Log level", + "Log level for HTTP connections", + 0, 3, 0, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (g_klass, + PROP_THROTTLING, + g_param_spec_uint ("throttling", + "throttle timeout", + "Time to throttle connections", + 0, G_MAXUINT, 0, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); +} + +static void +grl_net_wc_init (GrlNetWc *wc) +{ + GRL_LOG_DOMAIN_INIT (wc_log_domain, "wc"); + + wc->priv = GRL_NET_WC_GET_PRIVATE (wc); + + wc->priv->session = soup_session_async_new (); + wc->priv->pending = g_queue_new (); +} + +static void +grl_net_wc_finalize (GObject *object) +{ + GrlNetWc *wc; + + wc = GRL_NET_WC (object); + grl_net_wc_flush_delayed_requests (wc); + g_queue_free (wc->priv->pending); + g_object_unref (wc->priv->session); + + G_OBJECT_CLASS (grl_net_wc_parent_class)->finalize (object); +} + +static void +grl_net_wc_set_property (GObject *object, + guint propid, + const GValue *value, + GParamSpec *pspec) +{ + GrlNetWc *wc; + + wc = GRL_NET_WC (object); + + switch (propid) { + case PROP_LOG_LEVEL: + grl_net_wc_set_log_level (wc, g_value_get_uint (value)); + break; + case PROP_THROTTLING: + grl_net_wc_set_throttling (wc, g_value_get_uint (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (wc, propid, pspec); + } +} + +static void +grl_net_wc_get_property (GObject *object, + guint propid, + GValue *value, + GParamSpec *pspec) +{ + GrlNetWc *wc; + + wc = GRL_NET_WC (object); + + switch (propid) { + case PROP_LOG_LEVEL: + g_value_set_uint (value, wc->priv->log_level); + break; + case PROP_THROTTLING: + g_value_set_uint (value, wc->priv->throttling); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (wc, propid, pspec); + } +} + +static inline void +parse_error (guint status, + const gchar *reason, + const gchar *response, + GSimpleAsyncResult *result) +{ + if (!response || *response == '\0') + response = reason; + + switch (status) { + case SOUP_STATUS_CANT_RESOLVE: + case SOUP_STATUS_CANT_CONNECT: + case SOUP_STATUS_SSL_FAILED: + case SOUP_STATUS_IO_ERROR: + g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, + GRL_NET_WC_ERROR_NETWORK_ERROR, + "Cannot connect to the server"); + return; + case SOUP_STATUS_CANT_RESOLVE_PROXY: + case SOUP_STATUS_CANT_CONNECT_PROXY: + g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, + GRL_NET_WC_ERROR_PROXY_ERROR, + "Cannot connect to the proxy server"); + return; + case SOUP_STATUS_INTERNAL_SERVER_ERROR: /* 500 */ + case SOUP_STATUS_MALFORMED: + case SOUP_STATUS_BAD_REQUEST: /* 400 */ + g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, + GRL_NET_WC_ERROR_PROTOCOL_ERROR, + "Invalid request URI or header: %s", + response); + return; + case SOUP_STATUS_UNAUTHORIZED: /* 401 */ + case SOUP_STATUS_FORBIDDEN: /* 403 */ + g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, + GRL_NET_WC_ERROR_AUTHENTICATION_REQUIRED, + "Authentication required: %s", response); + return; + case SOUP_STATUS_NOT_FOUND: /* 404 */ + g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, + GRL_NET_WC_ERROR_NOT_FOUND, + "The requested resource was not found: %s", + response); + return; + case SOUP_STATUS_CONFLICT: /* 409 */ + case SOUP_STATUS_PRECONDITION_FAILED: /* 412 */ + g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, + GRL_NET_WC_ERROR_CONFLICT, + "The entry has been modified since it was downloaded: %s", + response); + return; + case SOUP_STATUS_CANCELLED: + return; + default: + g_message ("Unhandled status: %s", soup_status_get_phrase (status)); + } +} + +static void +reply_cb (SoupSession *session, + SoupMessage *msg, + gpointer user_data) +{ + GSimpleAsyncResult *result; + gulong cancel_signal; + + cancel_signal = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (msg), + "cancel-signal")); + if (cancel_signal) { + GCancellable *cancellable; + + cancellable = g_object_get_data (G_OBJECT (msg), "cancellable"); + g_signal_handler_disconnect (cancellable, cancel_signal); + } + + result = G_SIMPLE_ASYNC_RESULT (user_data); + + if (msg->status_code != SOUP_STATUS_OK) { + parse_error (msg->status_code, + msg->reason_phrase, + msg->response_body->data, + result); + } + + g_simple_async_result_complete (result); +} + +static void +message_cancel_cb (GCancellable *cancellable, + SoupMessage *msg) +{ + if (msg) + soup_session_cancel_message (g_object_get_data (G_OBJECT (msg), "session"), + msg, SOUP_STATUS_CANCELLED); + +} + +static void +get_url_now (GrlNetWc *self, + const char *url, + GAsyncResult *result, + GCancellable *cancellable) +{ + SoupMessage *msg; + gulong cancel_signal; + + msg = soup_message_new (SOUP_METHOD_GET, url); + + if (!msg) { + g_simple_async_result_set_error (G_SIMPLE_ASYNC_RESULT (result), + GRL_NET_WC_ERROR, + GRL_NET_WC_ERROR_PROTOCOL_ERROR, + "Malformed URL: %s", url); + g_simple_async_result_complete_in_idle (G_SIMPLE_ASYNC_RESULT (result)); + + return; + } + + g_simple_async_result_set_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result), + msg, NULL); + + cancel_signal = 0; + if (cancellable) { + g_object_set_data (G_OBJECT (msg), + "cancellable", + cancellable); + cancel_signal = g_signal_connect (cancellable, + "cancelled", + G_CALLBACK (message_cancel_cb), + msg); + } + + g_object_set_data (G_OBJECT (msg), + "cancel-signal", + GUINT_TO_POINTER (cancel_signal)); + g_object_set_data_full (G_OBJECT (msg), + "session", + g_object_ref (self->priv->session), + g_object_unref); + + soup_session_queue_message (self->priv->session, + msg, + reply_cb, + result); +} + +static gboolean +get_url_delayed (gpointer user_data) +{ + RequestClosure *c, *d; + + c = (RequestClosure *) user_data; + d = g_queue_pop_tail (c->self->priv->pending); + + g_assert (c == d); + + get_url_now (c->self, + c->url, + G_ASYNC_RESULT (c->result), + c->cancellable); + + g_free (c->url); + g_free (c); + + return FALSE; +} + +static void +get_url (GrlNetWc *self, + const char *url, + GAsyncResult *result, + GCancellable *cancellable) +{ + GTimeVal now; + + + g_get_current_time (&now); + if (now.tv_sec - self->priv->last_request.tv_sec > self->priv->throttling) { + get_url_now (self, url, G_ASYNC_RESULT (result), cancellable); + g_get_current_time (&self->priv->last_request); + } else { + RequestClosure *c; + guint id; + + GRL_DEBUG ("delaying web request"); + + /* closure */ + c = g_new (RequestClosure, 1); + c->self = self; + c->url = g_strdup (url); + c->result = result; + c->cancellable = cancellable; + + self->priv->last_request.tv_sec += self->priv->throttling; + id = g_timeout_add_seconds (self->priv->last_request.tv_sec - now.tv_sec, + get_url_delayed, c); + + c->source_id = id; + g_queue_push_head (self->priv->pending, c); + } +} + +GrlNetWc * +grl_net_wc_new (void) +{ + return g_object_new (GRL_TYPE_NET_WC, NULL); +} + +void +grl_net_wc_request_async (GrlNetWc *self, + const char *uri, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GSimpleAsyncResult *result; + + result = g_simple_async_result_new (G_OBJECT (self), + callback, + user_data, + grl_net_wc_request_async); + + get_url (self, uri, G_ASYNC_RESULT (result), cancellable); +} + +gboolean +grl_net_wc_request_finish (GrlNetWc *self, + GAsyncResult *result, + gchar **content, + gsize *length, + GError **error) +{ + GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (result); + SoupMessage *msg; + gboolean ret = TRUE; + + g_warn_if_fail (g_simple_async_result_get_source_tag (res) == + grl_net_wc_request_async); + + if (g_simple_async_result_propagate_error (res, error) == TRUE) { + ret = FALSE; + goto end_func; + } + + msg = (SoupMessage *) g_simple_async_result_get_op_res_gpointer (res); + + if (content != NULL) + *content = (gchar *) msg->response_body->data; + + if (length != NULL) + *length = (gsize) msg->response_body->length; + +end_func: + g_object_unref (res); + return ret; +} + +void +grl_net_wc_set_log_level (GrlNetWc *self, + guint log_level) +{ + SoupLogger *logger; + + g_return_if_fail (log_level <= 3); + g_return_if_fail (GRL_IS_NET_WC (self)); + + if (self->priv->log_level == log_level) + return; + + soup_session_remove_feature_by_type (self->priv->session, SOUP_TYPE_LOGGER); + + logger = soup_logger_new ((SoupLoggerLogLevel) log_level, -1); + soup_session_add_feature (self->priv->session, SOUP_SESSION_FEATURE (logger)); + g_object_unref (logger); + + self->priv->log_level = (SoupLoggerLogLevel) log_level; +} + +void +grl_net_wc_set_throttling (GrlNetWc *self, + guint throttling) +{ + g_return_if_fail (GRL_IS_NET_WC (self)); + + if (throttling > 0) { + /* max conns per host = 1 */ + g_object_set (self->priv->session, + SOUP_SESSION_MAX_CONNS_PER_HOST, 1, NULL); + } else { + /* default value */ + g_object_set (self->priv->session, + SOUP_SESSION_MAX_CONNS_PER_HOST, 2, NULL); + } + + self->priv->throttling = throttling; +} + +void +grl_net_wc_flush_delayed_requests (GrlNetWc *self) +{ + RequestClosure *c; + + while ((c = g_queue_pop_head (self->priv->pending))) { + g_source_remove (c->source_id); + g_object_unref (c->cancellable); + g_free (c->url); + g_free (c); + } + + g_get_current_time (&self->priv->last_request); +} diff --git a/libs/net/grl-net-wc.h b/libs/net/grl-net-wc.h new file mode 100644 index 0000000..9f9ad9a --- /dev/null +++ b/libs/net/grl-net-wc.h @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2010 Igalia S.L. + * + * Contact: Iago Toral Quiroga + * + * Authors: Víctor M. Jáquez L. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef _GRL_NET_WC_H_ +#define _GRL_NET_WC_H_ + +#include + +G_BEGIN_DECLS + +typedef enum { + GRL_NET_WC_ERROR_UNAVAILABLE = 1, + GRL_NET_WC_ERROR_PROTOCOL_ERROR, + GRL_NET_WC_ERROR_AUTHENTICATION_REQUIRED, + GRL_NET_WC_ERROR_NOT_FOUND, + GRL_NET_WC_ERROR_CONFLICT, + GRL_NET_WC_ERROR_FORBIDDEN, + GRL_NET_WC_ERROR_NETWORK_ERROR, + GRL_NET_WC_ERROR_PROXY_ERROR, +} GrlNetWcError; + +#define GRL_TYPE_NET_WC \ + (grl_net_wc_get_type ()) + +#define GRL_NET_WC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRL_TYPE_NET_WC, GrlNetWc)) + +#define GRL_IS_NET_WC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRL_TYPE_NET_WC)) + +#define GRL_NET_WC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), GRL_TYPE_NET_WC, GrlNetWcClass)) + +#define GRL_IS_NET_WC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), GRL_TYPE_NET_WC)) + +#define GRL_NET_WC_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GRL_TYPE_NET_WC, GrlNetWcClass)) + +#define GRL_NET_WC_ERROR grl_net_wc_error_quark () + +typedef struct _GrlNetWc GrlNetWc; +typedef struct _GrlNetWcPrivate GrlNetWcPrivate; + +struct _GrlNetWc { + + GObject parent; + + /*< private >*/ + GrlNetWcPrivate *priv; + +}; + +typedef struct _GrlNetWcClass GrlNetWcClass; + +struct _GrlNetWcClass { + + GObjectClass parent_class; + +}; + +GType grl_net_wc_get_type (void) G_GNUC_CONST; + +GQuark grl_net_wc_error_quark (void) G_GNUC_CONST; + +GrlNetWc *grl_net_wc_new (void); + +void grl_net_wc_request_async (GrlNetWc *self, + const char *uri, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean grl_net_wc_request_finish (GrlNetWc *self, + GAsyncResult *result, + gchar **content, + gsize *length, + GError **error); + +void grl_net_wc_set_log_level (GrlNetWc *self, + guint log_level); + +void grl_net_wc_set_throttling (GrlNetWc *self, + guint throttling); + +void grl_net_wc_flush_delayed_requests (GrlNetWc *self); + +G_END_DECLS + +#endif /* _GRL_NET_WC_H_ */ -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:08 2010 Return-Path: X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D142B750741 for ; Mon, 4 Oct 2010 19:13:08 +0000 (UTC) X-Quarantine-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qH7OCsX1stoQ for ; Mon, 4 Oct 2010 19:13:06 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id C04D5750716 for ; Mon, 4 Oct 2010 19:13:05 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQLAKjDqUxbdWOb/2dsb2JhbACDHpEcjH6Bf7MZkhuBIniCOXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879371" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:50 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSw-0008GF-67 for ; Mon, 04 Oct 2010 21:12:50 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-00055J-SV for ; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1P2qSA-00028U-Bl for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: grilo-list@gnome.org Subject: [PATCH core 09/10] doc: add the GrlNetWc definition Date: Mon, 4 Oct 2010 21:12:00 +0200 Message-Id: <9fc21b21e2e6336c8480c25939a0a6d896135241.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:13:09 -0000 Signed-off-by: Víctor Manuel Jáquez Leal --- doc/reference/grilo-docs.sgml | 5 +++++ doc/reference/grilo-sections.txt | 26 ++++++++++++++++++++++++++ doc/reference/grilo.types | 1 + 3 files changed, 32 insertions(+), 0 deletions(-) diff --git a/doc/reference/grilo-docs.sgml b/doc/reference/grilo-docs.sgml index b1d6b7e..95ddc2f 100644 --- a/doc/reference/grilo-docs.sgml +++ b/doc/reference/grilo-docs.sgml @@ -72,6 +72,11 @@ + + + Helper libraries + + diff --git a/doc/reference/grilo-sections.txt b/doc/reference/grilo-sections.txt index 8adac7d..d991074 100644 --- a/doc/reference/grilo-sections.txt +++ b/doc/reference/grilo-sections.txt @@ -402,6 +402,32 @@ GRL_MEDIA_IMAGE_GET_CLASS
+grl-net-wc +GrlNetWc +GrlNetWcError +GrlNetWc +GrlNetWcClass +grl_net_wc_error_quark +grl_net_wc_new +grl_net_wc_request_async +grl_net_wc_request_finish +grl_net_wc_set_log_level +grl_net_wc_set_throttling +grl_net_wc_flush_delayed_requests + +GrlNetWcPrivate + +GRL_IS_NET_WC +GRL_NET_WC_ERROR +GRL_NET_WC +GRL_TYPE_NET_WC +grl_net_wc_get_type +GRL_NET_WC_CLASS +GRL_IS_NET_WC_CLASS +GRL_NET_WC_GET_CLASS +
+ +
grl-metadata-key GrlMetadataKey<TITLE> GRL_METADATA_KEY_GET_ID diff --git a/doc/reference/grilo.types b/doc/reference/grilo.types index 1a4886d..1e3b349 100644 --- a/doc/reference/grilo.types +++ b/doc/reference/grilo.types @@ -18,4 +18,5 @@ grl_media_image_get_type grl_media_plugin_get_type grl_media_source_get_type grl_metadata_source_get_type +grl_net_wc_get_type grl_plugin_registry_get_type -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:09 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id BF8E975062B for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:09 +0000 (UTC) X-Quarantine-ID: <OebtLGE2FCro> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OebtLGE2FCro for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:04 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id D6464750584 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:03 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpEcjn2zGZIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879367" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-0008Fv-RD for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-000557-JK for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qSA-00028I-3Z for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH core 05/10] build: compile libs Date: Mon, 4 Oct 2010 21:11:56 +0200 Message-Id: <f359ae591193568bded176126b88edb8808e082d.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:13:10 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- Makefile.am | 2 +- configure.ac | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8ce9435..9ffd14f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src bindings tools tests +SUBDIRS = src libs bindings tools tests if ENABLE_GTK_DOC SUBDIRS += doc diff --git a/configure.ac b/configure.ac index 2fa5934..bfd0623 100644 --- a/configure.ac +++ b/configure.ac @@ -104,6 +104,14 @@ PKG_CHECK_MODULES(GTU, gtk+-2.0 \ AM_CONDITIONAL(BUILD_GRILO_TEST_UI, test "x$BUILD_GRILO_TEST_UI" = "xyes") +# net library + +PKG_CHECK_MODULES(NET, libsoup-2.4, + HAVE_LIBSOUP=yes, + HAVE_LIBSOUP=no) + +AM_CONDITIONAL(BUILD_GRILO_NET, test "x$HAVE_LIBSOUP" = "xyes") + # ---------------------------------------------------------- # UNINSTALLED SUPPORT # ---------------------------------------------------------- @@ -220,10 +228,14 @@ AC_CONFIG_FILES([ Makefile grilo-uninstalled.pc grilo-0.1.pc + grilo-net-uninstalled.pc + grilo-net-0.1.pc src/Makefile tests/Makefile tests/python/Makefile tests/python/util.py + libs/Makefile + libs/net/Makefile tools/Makefile tools/grilo-test-ui/Makefile tools/grilo-inspect/Makefile -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:10 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5B00975062B for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:10 +0000 (UTC) X-Quarantine-ID: <CykS7h4G7HAi> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.744 X-Spam-Level: X-Spam-Status: No, score=-1.744 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_RL=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CykS7h4G7HAi for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:05 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id DE859750004 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:04 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpEcjn2zGZIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879369" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSw-0008G9-0X for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:50 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-00055D-Na for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qSA-00028O-82 for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH core 07/10] build: libgrlnet introspection Date: Mon, 4 Oct 2010 21:11:58 +0200 Message-Id: <36761f3da238a2e5b2434b2a8be01a960bc0004f.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:13:10 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- libs/net/Makefile.am | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/libs/net/Makefile.am b/libs/net/Makefile.am index 16a92ba..86163bc 100644 --- a/libs/net/Makefile.am +++ b/libs/net/Makefile.am @@ -49,3 +49,33 @@ MAINTAINERCLEANFILES = \ *~ DISTCLEANFILES = $(MAINTAINERCLEANFILES) +CLEANFILES = + +# introspection support +if HAVE_INTROSPECTION +-include $(INTROSPECTION_MAKEFILE) +gir_headers = $(patsubst %,$(srcdir)/%, $(libgrlnet_@GRL_MAJORMINOR@include_HEADERS)) +gir_sources = $(patsubst %,$(srcdir)/%, $(libgrlnet_@GRL_MAJORMINOR@_la_SOURCES)) + +INTROSPECTION_GIRS = + +introspection_sources = \ + $(gir_headers) \ + $(gir_sources) + +GrlNet-@GRL_MAJORMINOR@.gir: libgrlnet-@GRL_MAJORMINOR@.la +GrlNet_0_1_gir_SCANNERFLAGS = --warn-all -v +GrlNet_0_1_gir_INCLUDES = GObject-2.0 Gio-2.0 +GrlNet_0_1_gir_CFLAGS = -I$(top_srcdir)/libs $(libgrlnet_@GRL_MAJORMINOR@_la_CFLAGS) +GrlNet_0_1_gir_LIBS = libgrlnet-@GRL_MAJORMINOR@.la +GrlNet_0_1_gir_FILES = $(introspection_sources) +INTROSPECTION_GIRS += GrlNet-@GRL_MAJORMINOR@.gir + +girdir = $(datadir)/gir-1.0 +dist_gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) +endif -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:11 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 47869750741 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:11 +0000 (UTC) X-Quarantine-ID: <gcOGWq61thiD> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.667 X-Spam-Level: X-Spam-Status: No, score=-1.667 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_GT=0.077, TW_TK=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gcOGWq61thiD for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:07 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 96F9C750101 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:06 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAKjDqUxbdWOb/2dsb2JhbACDHqAZsxmSG4EigVGBYHQEhQmFNw X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879370" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:50 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSw-0008GE-62 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:50 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-00055F-Qi for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qSA-00028R-9k for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH core 08/10] wc: gtkdoc documentation Date: Mon, 4 Oct 2010 21:11:59 +0200 Message-Id: <756b9e309bbddb6a08503250b58f29f2a587fb73.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:13:11 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- libs/net/grl-net-wc.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ libs/net/grl-net-wc.h | 23 ++++++++++++++ 2 files changed, 100 insertions(+), 0 deletions(-) diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c index 0d45e66..c4ce7d0 100644 --- a/libs/net/grl-net-wc.c +++ b/libs/net/grl-net-wc.c @@ -22,6 +22,15 @@ * */ +/** + * SECTION:grl-net-wc + * @short_description: small and simple HTTP client + * + * Most of the Grilo's sources need to access to web resources. The purpose of + * this utility class is to provide an thin and lean mechanism for those plugins + * to interact with those resources. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -93,6 +102,11 @@ grl_net_wc_class_init (GrlNetWcClass *klass) g_type_class_add_private (klass, sizeof (GrlNetWcPrivate)); + /** + * GrlNetWc::loglevel + * + * The log lever for HTTP connections. This value is used by libsoup. + */ g_object_class_install_property (g_klass, PROP_LOG_LEVEL, g_param_spec_uint ("loglevel", @@ -102,6 +116,12 @@ grl_net_wc_class_init (GrlNetWcClass *klass) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GrlNetWc::throttling + * + * The timeout in seconds between connections. All the connections will be + * queued and each one will be dispatched after waiting this value. + */ g_object_class_install_property (g_klass, PROP_THROTTLING, g_param_spec_uint ("throttling", @@ -382,12 +402,29 @@ get_url (GrlNetWc *self, } } +/** + * grl_net_wc_new: + * + * Returns: (element-type Grl.NetWc): a new allocated instance of #GrlNetWc. + * Do g_object_unref() after use it. + */ GrlNetWc * grl_net_wc_new (void) { return g_object_new (GRL_TYPE_NET_WC, NULL); } +/** + * grl_net_wc_request_async: + * @self: a #GrlNetWc instance + * @uri: The URI of the resource to request + * @cancellable: (allow-none): a #GCancellable instance or %NULL to ignore + * @callback: The callback when the result is ready + * @user_data: User data set for the @callback + * + * Request the fetching of a web resource given the @uri. This request is + * asynchronous, thus the result will be returned within the @callback. + */ void grl_net_wc_request_async (GrlNetWc *self, const char *uri, @@ -405,6 +442,24 @@ grl_net_wc_request_async (GrlNetWc *self, get_url (self, uri, G_ASYNC_RESULT (result), cancellable); } +/** + * grl_net_wc_request_finish: + * @self: a #GrlNetWc instance + * @result: The result of the request + * @content: The contents of the resource + * @length: (allow-none): The length of the contents or %NULL if it is not + * needed + * @error: return location for a #GError, or %NULL + * + * Finishes an asynchronous load of the file's contents. + * The contents are placed in contents, and length is set to the size of the + * contents string. + * + * The content address will be invalidated at the next request. So if you + * want to keep it, please copy it into another address. + * + * Returns: %TRUE if the request was successfull. If %FALSE a error occurred. + */ gboolean grl_net_wc_request_finish (GrlNetWc *self, GAsyncResult *result, @@ -437,6 +492,14 @@ end_func: return ret; } +/** + * grl_net_wc_set_log_level: + * @self: a #GrlNetWc instance + * @log_level: the libsoup log level to set [0,3] + * + * Setting the log level the logger feature is added into + * the libsoup session. + */ void grl_net_wc_set_log_level (GrlNetWc *self, guint log_level) @@ -458,6 +521,14 @@ grl_net_wc_set_log_level (GrlNetWc *self, self->priv->log_level = (SoupLoggerLogLevel) log_level; } +/** + * grl_net_wc_set_throttling: + * @self: a #GrlNetWc instance + * @throttling: the number of seconds to wait between requests + * + * Setting this property, the #GrlNetWc will queue all the requests and + * will dispatch them with a pause between them of this value. + */ void grl_net_wc_set_throttling (GrlNetWc *self, guint throttling) @@ -477,6 +548,12 @@ grl_net_wc_set_throttling (GrlNetWc *self, self->priv->throttling = throttling; } +/** + * grl_net_wc_flush_delayed_requests: + * @self: a #GrlNetWc instance + * + * This method will flush all the pending request in the queue. + */ void grl_net_wc_flush_delayed_requests (GrlNetWc *self) { diff --git a/libs/net/grl-net-wc.h b/libs/net/grl-net-wc.h index 9f9ad9a..38dd84b 100644 --- a/libs/net/grl-net-wc.h +++ b/libs/net/grl-net-wc.h @@ -29,6 +29,21 @@ G_BEGIN_DECLS +/** + * GrlNetWcError: + * @GRL_NET_WC_ERROR_UNAVAILABLE: TBD + * @GRL_NET_WC_ERROR_PROTOCOL_ERROR: Invalid URI or header + * @GRL_NET_WC_ERROR_AUTHENTICATION_REQUIRED: Required authentication + * @GRL_NET_WC_ERROR_NOT_FOUND: Request resource not found + * @GRL_NET_WC_ERROR_CONFLICT: The entry has been modified since is was + * downloaded + * @GRL_NET_WC_ERROR_FORBIDDEN: TBD + * @GRL_NET_WC_ERROR_NETWORK_ERROR: Cannot connect to the server + * @GRL_NET_WC_ERROR_PROXY_ERROR: Cannot connect to the proxy server + * + * These constants identify all the available errors managed by + * the web client. + */ typedef enum { GRL_NET_WC_ERROR_UNAVAILABLE = 1, GRL_NET_WC_ERROR_PROTOCOL_ERROR, @@ -74,6 +89,14 @@ struct _GrlNetWc { typedef struct _GrlNetWcClass GrlNetWcClass; +/** + * GrlNetWcClass: + * @parent_class: the parent class structure + * + * Grilo web client helper class. + * + * It's a simple a thin web client for be used by the sources. + */ struct _GrlNetWcClass { GObjectClass parent_class; -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:11 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 42B2E75062B for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:11 +0000 (UTC) X-Quarantine-ID: <UJAqMfNXJ+3E> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.667 X-Spam-Level: X-Spam-Status: No, score=-1.667 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_GT=0.077, TW_TK=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UJAqMfNXJ+3E for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:08 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 3B3FE75009D for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:08 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpEcjn2zGZIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879372" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:50 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSw-0008GG-6y for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:50 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-00055M-Vx for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:50 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qSA-00028X-E6 for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH core 10/10] doc: fix the gtkdoc generation Date: Mon, 4 Oct 2010 21:12:01 +0200 Message-Id: <3074418a761f002a5c44e3151e08ea0ed84896a7.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:13:11 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- doc/reference/Makefile.am | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index b65bf81..37a63cc 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -22,14 +22,15 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. # e.g. DOC_SOURCE_DIR=../../../gtk -DOC_SOURCE_DIR=$(top_srcdir)/src +DOC_SOURCE_DIR=$(top_srcdir)/src \ + $(top_srcdir)/libs/net # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS=--source-dir=$(top_srcdir)/src +SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml @@ -54,11 +55,11 @@ CFILE_GLOB= # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h -EXTRA_HFILES= +EXTRA_HFILES = $(top_srcdir)/libs/net/grl-net.h # Header files to ignore when scanning. Use base file name, no paths # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES=config.h \ +IGNORE_HFILES = config.h \ grl-media-plugin-priv.h \ grl-metadata-source-priv.h \ grl-sync-priv.h \ @@ -70,7 +71,8 @@ HTML_IMAGES= # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files= +content_files = overview.xml \ + quick-start-using-grilo.xml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files @@ -82,8 +84,14 @@ expand_content_files= # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -GTKDOC_CFLAGS=-I$(top_srcdir)/src -I$(top_srcdir)/src/data $(DEPS_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/src/lib@GRL_NAME@.la $(DEPS_LIBS) +GTKDOC_CFLAGS = -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/data \ + -I$(top_srcdir)/libs/net \ + $(DEPS_CFLAGS) + +GTKDOC_LIBS = $(top_builddir)/src/lib@GRL_NAME@.la \ + $(top_builddir)/libs/net/libgrlnet-@GRL_MAJORMINOR@.la \ + $(DEPS_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:14 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 17D0875079E for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:14 +0000 (UTC) X-Quarantine-ID: <zsclrjivBJIV> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.744 X-Spam-Level: X-Spam-Status: No, score=-1.744 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_RL=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zsclrjivBJIV for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:10 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 1C1EE750584 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:01 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpEcjn2zGZIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879365" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-0008Fl-LN for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-000553-FY for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qS9-00028C-Vx for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH core 03/10] build: libgrlnet Date: Mon, 4 Oct 2010 21:11:54 +0200 Message-Id: <4517087ba2b51c4f8eadf73784e7628f1ad5fab5.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:13:14 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- libs/Makefile.am | 8 ++++++++ libs/net/Makefile.am | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 0 deletions(-) create mode 100644 libs/Makefile.am create mode 100644 libs/net/Makefile.am diff --git a/libs/Makefile.am b/libs/Makefile.am new file mode 100644 index 0000000..0991d18 --- /dev/null +++ b/libs/Makefile.am @@ -0,0 +1,8 @@ +# +# Makefile.am +# +# Author: Víctor M. Jáquez L. <vjaquez@igalia.com> +# +# Copyright (C) 2010 Igalia S.L. All rights reserved. + +SUBDIRS = net diff --git a/libs/net/Makefile.am b/libs/net/Makefile.am new file mode 100644 index 0000000..4e3f247 --- /dev/null +++ b/libs/net/Makefile.am @@ -0,0 +1,50 @@ +# +# Makefile.am +# +# Author: Víctor M. Jáquez L. <vjaquez@igalia.com> +# +# Copyright (C) 2010 Igalia S.L. All rights reserved. + +if BUILD_GRILO_NET +lib_LTLIBRARIES = libgrlnet-@GRL_MAJORMINOR@.la +noinst_PROGRAMS = wc-test +endif + +libgrlnet_@GRL_MAJORMINOR@_la_DEPENDENCIES = \ + $(top_builddir)/src/lib@GRL_NAME@.la + +libgrlnet_@GRL_MAJORMINOR@_la_SOURCES = \ + grl-net-wc.c + +libgrlnet_@GRL_MAJORMINOR@_la_CFLAGS = \ + -I $(top_srcdir)/src \ + -I $(top_srcdir)/src/data \ + $(DEPS_CFLAGS) \ + $(NET_CFLAGS) + +libgrlnet_@GRL_MAJORMINOR@_la_LIBADD = \ + $(top_builddir)/src/lib@GRL_NAME@.la \ + $(DEPS_LIBS) \ + $(NET_LIBS) + +libgrlnet_@GRL_MAJORMINOR@includedir = \ + $(includedir)/@GRL_NAME@/net + +libgrlnet_@GRL_MAJORMINOR@include_HEADERS = \ + grl-net-wc.h + +wc_test_SOURCES = \ + wc-test.c + +wc_test_CFLAGS = \ + $(DEPS_CFLAGS) + +wc_test_LDADD = \ + $(top_builddir)/libs/net/libgrlnet-@GRL_MAJORMINOR@.la \ + $(DEPS_LIBS) + +MAINTAINERCLEANFILES = \ + *.in \ + *~ + +DISTCLEANFILES = $(MAINTAINERCLEANFILES) -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:13:19 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E78047507AE for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:18 +0000 (UTC) X-Quarantine-ID: <2kSz4IXnDYAh> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2kSz4IXnDYAh for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:13 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id AC40975009D for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:13:04 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAKjDqUxbdWOb/2dsb2JhbACDHpEcjn2zGZIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="766879368" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:12:49 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-0008G3-T9 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qSv-00055C-MV for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:12:49 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qSA-00028L-5c for grilo-list@gnome.org; Mon, 04 Oct 2010 21:12:02 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH core 06/10] grl-net: new header file Date: Mon, 4 Oct 2010 21:11:57 +0200 Message-Id: <f752a2ab38eaa0dc76bd9533c093313c992f781b.1286219284.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:13:19 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- libs/net/Makefile.am | 3 ++- libs/net/grl-net.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletions(-) create mode 100644 libs/net/grl-net.h diff --git a/libs/net/Makefile.am b/libs/net/Makefile.am index 4e3f247..16a92ba 100644 --- a/libs/net/Makefile.am +++ b/libs/net/Makefile.am @@ -31,7 +31,8 @@ libgrlnet_@GRL_MAJORMINOR@includedir = \ $(includedir)/@GRL_NAME@/net libgrlnet_@GRL_MAJORMINOR@include_HEADERS = \ - grl-net-wc.h + grl-net-wc.h \ + grl-net.h wc_test_SOURCES = \ wc-test.c diff --git a/libs/net/grl-net.h b/libs/net/grl-net.h new file mode 100644 index 0000000..db55709 --- /dev/null +++ b/libs/net/grl-net.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010 Igalia S.L. + * + * Contact: Víctor M. Jáquez L. <vjaquez@igalia.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef _GRL_NET_H_ +#define _GRL_NET_H_ + +#include <net/grl-net-wc.h> + +#endif /* _GRL_NET_H_ */ -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:25 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id CF787750741 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:25 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.744 X-Spam-Level: X-Spam-Status: No, score=-1.744 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_KG=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wzaZQEkWMMDg for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:23 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id B70C5750101 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:14 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAB7FqUxbdWOb/2dsb2JhbACDHpEcjn2zIJIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686829998" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008Ja-G3 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005NU-7i for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWO-0002Km-OB for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:24 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 00/14] Use of GrlNet in plugins Date: Mon, 4 Oct 2010 21:16:10 +0200 Message-Id: <cover.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:26 -0000 These patch series are the implementation of the GrlNetWc among all the plugins which do async web requests. In order to implement this, several plugins need a private structure which had to be refactored. Víctor Manuel Jáquez Leal (14): build: detect through pkgconfig grilo-net jamendo: use GrlNet apple-trailers: screen resolution as param apple-trailers: use GrlNet apple-trailers: trivial cleanups flickr: add GrlNet flickr: trivial changes youtube: use private structure for gdata service youtube: add GrlNet shoutcast: add GrlNet shoutcast: remove unused includes podcasts: use GrlNet podcast: remove unused includes lastfm-albumart: use GrlNet configure.ac | 47 +++++---- src/apple-trailers/Makefile.am | 6 +- src/apple-trailers/grl-apple-trailers.c | 158 ++++++++++++++++++++++------- src/apple-trailers/grl-apple-trailers.h | 7 +- src/flickr/Makefile.am | 4 +- src/flickr/gflickr.c | 58 +++++++---- src/jamendo/Makefile.am | 12 ++- src/jamendo/grl-jamendo.c | 104 ++++++++++++++----- src/jamendo/grl-jamendo.h | 4 + src/lastfm-albumart/Makefile.am | 6 +- src/lastfm-albumart/grl-lastfm-albumart.c | 47 +++++---- src/podcasts/Makefile.am | 6 +- src/podcasts/grl-podcasts.c | 50 +++++---- src/shoutcast/Makefile.am | 4 +- src/shoutcast/grl-shoutcast.c | 65 +++++++----- src/youtube/Makefile.am | 6 +- src/youtube/grl-youtube.c | 141 ++++++++++++++++++++----- src/youtube/grl-youtube.h | 5 +- 18 files changed, 499 insertions(+), 231 deletions(-) From vjaquez@igalia.com Mon Oct 4 19:17:26 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4B28E750741 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:26 +0000 (UTC) X-Quarantine-ID: <bkm++Mi2F8ZP> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.59 X-Spam-Level: X-Spam-Status: No, score=-1.59 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_BX=0.077, TW_IB=0.077, TW_KG=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bkm++Mi2F8ZP for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:24 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id A9C3E7506D8 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:15 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAB7FqUxbdWOb/2dsb2JhbACDHpEcjn2zIJIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686829999" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008Jb-H4 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005NV-A6 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWO-0002Ko-QB for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:24 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 01/14] build: detect through pkgconfig grilo-net Date: Mon, 4 Oct 2010 21:16:11 +0200 Message-Id: <c7536ac94afddb1dccf5f51a99ae764fa778e7b2.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:26 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index bcbb518..d8d6e67 100644 --- a/configure.ac +++ b/configure.ac @@ -55,6 +55,7 @@ else fi GRL_NAME=grilo-${GRL_VERSION} +GRLNET_NAME=grilo-net-${GRL_VERSION} # ---------------------------------------------------------- # DEBUG SUPPORT @@ -97,6 +98,10 @@ AC_SUBST(GRL_PLUGINS_CONF_DIR) # EXTERNAL/OPTIONAL DEPENDENCIES # ---------------------------------------------------------- +PKG_CHECK_MODULES([GRLNET], [${GRLNET_NAME} = 0.1.6], + HAVE_GRLNET=yes, + HAVE_GRLNET=no) + PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_XML=yes, HAVE_XML=no) PKG_CHECK_MODULES(GIO, gio-2.0, HAVE_GIO=yes, HAVE_GIO=no) -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:27 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C818D75079E for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:27 +0000 (UTC) X-Quarantine-ID: <QeYDeOg53jr0> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QeYDeOg53jr0 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:25 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id C48F6750716 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:24 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAB7FqUxbdWOb/2dsb2JhbACDHpEcjn2zIJIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830005" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008Jw-SI for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005Nd-Io for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002L0-1o for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 05/14] apple-trailers: trivial cleanups Date: Mon, 4 Oct 2010 21:16:15 +0200 Message-Id: <265e8cb171dad341c881af1127b568bea42fc235.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:28 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/apple-trailers/Makefile.am | 2 +- src/apple-trailers/grl-apple-trailers.c | 4 ---- 2 files changed, 1 insertions(+), 5 deletions(-) diff --git a/src/apple-trailers/Makefile.am b/src/apple-trailers/Makefile.am index f62d2db..2fabdb1 100644 --- a/src/apple-trailers/Makefile.am +++ b/src/apple-trailers/Makefile.am @@ -21,7 +21,7 @@ libgrlappletrailers_la_SOURCES = \ grl-apple-trailers.c \ grl-apple-trailers.h -libdir=$(GRL_PLUGINS_DIR) +libdir = $(GRL_PLUGINS_DIR) appletrailersxmldir = $(GRL_PLUGINS_CONF_DIR) appletrailersxml_DATA = $(APPLE_TRAILERS_PLUGIN_ID).xml diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c index c32a15e..1ee070b 100644 --- a/src/apple-trailers/grl-apple-trailers.c +++ b/src/apple-trailers/grl-apple-trailers.c @@ -27,12 +27,8 @@ #endif #include <grilo.h> -#include <libxml/parser.h> -#include <libxml/xmlmemory.h> #include <net/grl-net.h> #include <libxml/xpath.h> -#include <string.h> -#include <stdlib.h> #include "grl-apple-trailers.h" -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:29 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 94962750716 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:29 +0000 (UTC) X-Quarantine-ID: <p+RBqZivOxMj> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p+RBqZivOxMj for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:24 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 93DDE75062B for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:23 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830000" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008Jh-IP for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005NW-C9 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWO-0002Kr-SV for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:24 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 02/14] jamendo: use GrlNet Date: Mon, 4 Oct 2010 21:16:12 +0200 Message-Id: <bd9e52471ab9f9a69b5ddd5ccc629f1add927f3e.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:30 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 6 +- src/jamendo/Makefile.am | 12 +++-- src/jamendo/grl-jamendo.c | 104 ++++++++++++++++++++++++++++++++------------ src/jamendo/grl-jamendo.h | 4 ++ 4 files changed, 89 insertions(+), 37 deletions(-) diff --git a/configure.ac b/configure.ac index d8d6e67..d6b88d5 100644 --- a/configure.ac +++ b/configure.ac @@ -198,8 +198,8 @@ AC_ARG_ENABLE(jamendo, [ case "$enableval" in yes) - if test "x$HAVE_GIO" = "xno"; then - AC_MSG_ERROR([GIO not found, install it or use --disable-jamendo]) + if test "x$HAVE_GRLNET" = "xno"; then + AC_MSG_ERROR([grilo-net not found, install it or use --disable-jamendo]) fi if test "x$HAVE_XML" = "xno"; then AC_MSG_ERROR([xml2 not found, install it or use --disable-jamendo]) @@ -208,7 +208,7 @@ AC_ARG_ENABLE(jamendo, esac ], [ - if test "x$HAVE_GIO" = "xyes" -a "x$HAVE_XML" = "xyes"; then + if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes"; then enable_jamendo=yes else enable_jamendo=no diff --git a/src/jamendo/Makefile.am b/src/jamendo/Makefile.am index 2a7e62a..9c29562 100644 --- a/src/jamendo/Makefile.am +++ b/src/jamendo/Makefile.am @@ -9,18 +9,20 @@ lib_LTLIBRARIES = libgrljamendo.la libgrljamendo_la_CFLAGS = \ $(DEPS_CFLAGS) \ - $(GIO_CFLAGS) \ + $(GRLNET_CFLAGS) \ $(XML_CFLAGS) libgrljamendo_la_LIBADD = \ $(DEPS_LIBS) \ - $(GIO_LIBS) \ + $(GRLNET_LIBS) \ $(XML_LIBS) -libgrljamendo_la_SOURCES = grl-jamendo.c grl-jamendo.h +libgrljamendo_la_SOURCES = \ + grl-jamendo.c \ + grl-jamendo.h -libdir=$(GRL_PLUGINS_DIR) -jamendoxmldir = $(GRL_PLUGINS_CONF_DIR) +libdir = $(GRL_PLUGINS_DIR) +jamendoxmldir = $(GRL_PLUGINS_CONF_DIR) jamendoxml_DATA = $(JAMENDO_PLUGIN_ID).xml EXTRA_DIR = $(jamendoxml_DATA) diff --git a/src/jamendo/grl-jamendo.c b/src/jamendo/grl-jamendo.c index 7a58400..ce86fa0 100644 --- a/src/jamendo/grl-jamendo.c +++ b/src/jamendo/grl-jamendo.c @@ -27,11 +27,10 @@ #endif #include <grilo.h> -#include <gio/gio.h> +#include <net/grl-net.h> #include <libxml/parser.h> #include <libxml/xmlmemory.h> #include <string.h> -#include <stdlib.h> #include "grl-jamendo.h" @@ -160,6 +159,16 @@ struct Feeds { JAMENDO_GET_TRACKS "&order=rating_desc", }, }; +struct _GrlJamendoSourcePriv { + GrlNetWc *wc; + GCancellable *cancellable; +}; + +#define GRL_JAMENDO_SOURCE_GET_PRIVATE(object) \ + (G_TYPE_INSTANCE_GET_PRIVATE((object), \ + GRL_JAMENDO_SOURCE_TYPE, \ + GrlJamendoSourcePriv)) + static GrlJamendoSource *grl_jamendo_source_new (void); gboolean grl_jamendo_plugin_init (GrlPluginRegistry *registry, @@ -218,30 +227,52 @@ grl_jamendo_source_new (void) NULL); } +G_DEFINE_TYPE (GrlJamendoSource, grl_jamendo_source, GRL_TYPE_MEDIA_SOURCE); + +static void +grl_jamendo_source_finalize (GObject *object) +{ + GrlJamendoSource *self; + + self = GRL_JAMENDO_SOURCE (object); + if (self->priv->wc) + g_object_unref (self->priv->wc); + + if (self->priv->cancellable + && G_IS_CANCELLABLE (self->priv->cancellable)) + g_object_unref (self->priv->cancellable); + + G_OBJECT_CLASS (grl_jamendo_source_parent_class)->finalize (object); +} + static void grl_jamendo_source_class_init (GrlJamendoSourceClass * klass) { GrlMediaSourceClass *source_class = GRL_MEDIA_SOURCE_CLASS (klass); GrlMetadataSourceClass *metadata_class = GRL_METADATA_SOURCE_CLASS (klass); + GObjectClass *g_class = G_OBJECT_CLASS (klass); source_class->metadata = grl_jamendo_source_metadata; source_class->browse = grl_jamendo_source_browse; source_class->query = grl_jamendo_source_query; source_class->search = grl_jamendo_source_search; source_class->cancel = grl_jamendo_source_cancel; metadata_class->supported_keys = grl_jamendo_source_supported_keys; + g_class->finalize = grl_jamendo_source_finalize; + + g_type_class_add_private (klass, sizeof (GrlJamendoSourcePriv)); } static void grl_jamendo_source_init (GrlJamendoSource *source) { + source->priv = GRL_JAMENDO_SOURCE_GET_PRIVATE (source); + /* If we try to get too much elements in a single step, Jamendo might return nothing. So limit the maximum amount of elements in each query */ grl_media_source_set_auto_split_threshold (GRL_MEDIA_SOURCE (source), MAX_ELEMENTS); } -G_DEFINE_TYPE (GrlJamendoSource, grl_jamendo_source, GRL_TYPE_MEDIA_SOURCE); - /* ======================= Utilities ==================== */ #if 0 @@ -619,23 +650,21 @@ read_done_cb (GObject *source_object, { XmlParseEntries *xpe = (XmlParseEntries *) user_data; gint error_code = -1; - GError *vfs_error = NULL; + GError *wc_error = NULL; GError *error = NULL; gchar *content = NULL; Entry *entry = NULL; /* Check if operation was cancelled */ if (xpe->cancelled) { - g_object_unref (source_object); goto invoke_cb; } - if (!g_file_load_contents_finish (G_FILE (source_object), - res, - &content, - NULL, - NULL, - &vfs_error)) { + if (!grl_net_wc_request_finish (GRL_NET_WC (source_object), + res, + &content, + NULL, + &wc_error)) { switch (xpe->type) { case METADATA: error_code = GRL_CORE_ERROR_METADATA_FAILED; @@ -654,16 +683,16 @@ read_done_cb (GObject *source_object, error = g_error_new (GRL_CORE_ERROR, error_code, "Failed to connect Jamendo: '%s'", - vfs_error->message); - g_error_free (vfs_error); - g_object_unref (source_object); + wc_error->message); + g_error_free (wc_error); goto invoke_cb; } - g_object_unref (source_object); - - xml_parse_result (content, &error, xpe); - g_free (content); + if (content) { + xml_parse_result (content, &error, xpe); + } else { + goto invoke_cb; + } if (error) { goto invoke_cb; @@ -732,16 +761,21 @@ read_done_cb (GObject *source_object, } static void -read_url_async (const gchar *url, gpointer user_data) +read_url_async (GrlJamendoSource *source, + const gchar *url, + gpointer user_data) { - GVfs *vfs; - GFile *uri; + if (!source->priv->wc) + source->priv->wc = g_object_new (GRL_TYPE_NET_WC, "throttling", 1, NULL); - vfs = g_vfs_get_default (); + source->priv->cancellable = g_cancellable_new (); GRL_DEBUG ("Opening '%s'", url); - uri = g_vfs_get_file_for_uri (vfs, url); - g_file_load_contents_async (uri, NULL, read_done_cb, user_data); + grl_net_wc_request_async (source->priv->wc, + url, + source->priv->cancellable, + read_done_cb, + user_data); } static void @@ -1029,7 +1063,7 @@ grl_jamendo_source_metadata (GrlMediaSource *source, xpe = g_slice_new0 (XmlParseEntries); xpe->type = METADATA; xpe->spec.ms = ms; - read_url_async (url, xpe); + read_url_async (GRL_JAMENDO_SOURCE (source), url, xpe); g_free (url); } else { if (ms->media) { @@ -1166,7 +1200,7 @@ grl_jamendo_source_browse (GrlMediaSource *source, grl_media_source_set_operation_data (source, bs->browse_id, xpe); - read_url_async (url, xpe); + read_url_async (GRL_JAMENDO_SOURCE (source), url, xpe); g_free (url); if (container_split) { g_strfreev (container_split); @@ -1244,7 +1278,7 @@ grl_jamendo_source_query (GrlMediaSource *source, grl_media_source_set_operation_data (source, qs->query_id, xpe); - read_url_async (url, xpe); + read_url_async (GRL_JAMENDO_SOURCE (source), url, xpe); g_free (url); return; @@ -1290,7 +1324,7 @@ grl_jamendo_source_search (GrlMediaSource *source, grl_media_source_set_operation_data (source, ss->search_id, xpe); - read_url_async (url, xpe); + read_url_async (GRL_JAMENDO_SOURCE (source), url, xpe); g_free (url); } @@ -1298,6 +1332,18 @@ static void grl_jamendo_source_cancel (GrlMediaSource *source, guint operation_id) { XmlParseEntries *xpe; + GrlJamendoSourcePriv *priv; + + g_return_if_fail (GRL_IS_JAMENDO_SOURCE (source)); + + priv = GRL_JAMENDO_SOURCE_GET_PRIVATE (source); + + if (priv->cancellable && G_IS_CANCELLABLE (priv->cancellable)) + g_cancellable_cancel (priv->cancellable); + priv->cancellable = NULL; + + if (priv->wc) + grl_net_wc_flush_delayed_requests (priv->wc); GRL_DEBUG ("grl_jamendo_source_cancel"); diff --git a/src/jamendo/grl-jamendo.h b/src/jamendo/grl-jamendo.h index 589dfbc..15a4b75 100644 --- a/src/jamendo/grl-jamendo.h +++ b/src/jamendo/grl-jamendo.h @@ -54,11 +54,15 @@ GrlJamendoSourceClass)) typedef struct _GrlJamendoSource GrlJamendoSource; +typedef struct _GrlJamendoSourcePriv GrlJamendoSourcePriv; struct _GrlJamendoSource { GrlMediaSource parent; + /*< private >*/ + GrlJamendoSourcePriv *priv; + }; typedef struct _GrlJamendoSourceClass GrlJamendoSourceClass; -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:31 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4018F750716 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:31 +0000 (UTC) X-Quarantine-ID: <dMk5t2iENw9V> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dMk5t2iENw9V for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:26 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 2F8DA750724 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:24 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830003" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008Jv-Rr for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005Ng-L1 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002L3-42 for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 06/14] flickr: add GrlNet Date: Mon, 4 Oct 2010 21:16:16 +0200 Message-Id: <482f14c9801f7445beb15a93b4554350189d1e59.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:32 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 6 ++-- src/flickr/Makefile.am | 4 +- src/flickr/gflickr.c | 57 +++++++++++++++++++++++++++++------------------ 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index a8f712f..8a699ff 100644 --- a/configure.ac +++ b/configure.ac @@ -362,8 +362,8 @@ AC_ARG_ENABLE(flickr, [ case "$enableval" in yes) - if test "x$HAVE_GIO" = "xno"; then - AC_MSG_ERROR([GIO not found, install it or use --disable-flickr]) + if test "x$HAVE_GRLNET" = "xno"; then + AC_MSG_ERROR([grilo-net not found, install it or use --disable-flickr]) fi if test "x$HAVE_XML" = "xno"; then AC_MSG_ERROR([xml2 not found, install it or use --disable-flickr]) @@ -372,7 +372,7 @@ AC_ARG_ENABLE(flickr, esac ], [ - if test "x$HAVE_GIO" = "xyes" -a "x$HAVE_XML" = "xyes"; then + if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes"; then enable_flickr=yes else enable_flickr=no diff --git a/src/flickr/Makefile.am b/src/flickr/Makefile.am index 624846d..3a80c7b 100644 --- a/src/flickr/Makefile.am +++ b/src/flickr/Makefile.am @@ -10,12 +10,12 @@ libplugin_LTLIBRARIES = libgrlflickr.la libgrlflickr_la_CFLAGS = \ $(DEPS_CFLAGS) \ $(XML_CFLAGS) \ - $(GIO_CFLAGS) + $(GRLNET_CFLAGS) libgrlflickr_la_LIBADD = \ $(DEPS_LIBS) \ $(XML_LIBS) \ - $(GIO_LIBS) + $(GRLNET_LIBS) libgrlflickr_la_SOURCES = \ grl-flickr.c \ diff --git a/src/flickr/gflickr.c b/src/flickr/gflickr.c index 9a51a68..447ef61 100644 --- a/src/flickr/gflickr.c +++ b/src/flickr/gflickr.c @@ -7,6 +7,7 @@ #include <string.h> #include <grilo.h> +#include <net/grl-net.h> #define G_FLICKR_GET_PRIVATE(object) \ @@ -127,6 +128,8 @@ struct _GFlickrPrivate { gchar *auth_secret; gchar *auth_token; gint per_page; + + GrlNetWc *wc; }; static void g_flickr_finalize (GObject *object); @@ -159,6 +162,9 @@ g_flickr_finalize (GObject *object) g_free (f->priv->auth_token); g_free (f->priv->auth_secret); + if (f->priv->wc) + g_object_unref (f->priv->wc); + G_OBJECT_CLASS (g_flickr_parent_class)->finalize (object); } @@ -567,37 +573,44 @@ process_token_result (const gchar *xml_result, gpointer user_data) xmlFreeDoc (doc); } +inline static GrlNetWc * +get_wc (GFlickr *f) +{ + if (!f->priv->wc) + f->priv->wc = grl_net_wc_new (); + + return f->priv->wc; +} + static void read_done_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { gchar *content = NULL; + GError *wc_error = NULL; GFlickrData *data = (GFlickrData *) user_data; - g_file_load_contents_finish (G_FILE (source_object), - res, - &content, - NULL, - NULL, - NULL); - - g_object_unref (source_object); + grl_net_wc_request_finish (GRL_NET_WC (source_object), + res, + &content, + NULL, + &wc_error); data->parse_xml (content, user_data); - g_free (content); } static void -read_url_async (const gchar *url, gpointer data) +read_url_async (GFlickr *f, + const gchar *url, + gpointer user_data) { - GVfs *vfs; - GFile *uri; - - vfs = g_vfs_get_default (); GRL_DEBUG ("Opening '%s'", url); - uri = g_vfs_get_file_for_uri (vfs, url); - g_file_load_contents_async (uri, NULL, read_done_cb, data); + grl_net_wc_request_async (get_wc (f), + url, + NULL, + read_done_cb, + user_data); } /* -------------------- PUBLIC API -------------------- */ @@ -651,7 +664,7 @@ g_flickr_photos_getInfo (GFlickr *f, gfd->hashtable_cb = callback; gfd->user_data = user_data; - read_url_async (request, gfd); + read_url_async (f, request, gfd); g_free (request); } @@ -723,7 +736,7 @@ g_flickr_photos_search (GFlickr *f, gfd->list_cb = callback; gfd->user_data = user_data; - read_url_async (request, gfd); + read_url_async (f, request, gfd); g_free (request); } @@ -855,7 +868,7 @@ g_flickr_tags_getHotList (GFlickr *f, gfd->list_cb = callback; gfd->user_data = user_data; - read_url_async (request, gfd); + read_url_async (f, request, gfd); g_free (request); } @@ -906,7 +919,7 @@ g_flickr_photosets_getList (GFlickr *f, gfd->list_cb = callback; gfd->user_data = user_data; - read_url_async (request, gfd); + read_url_async (f, request, gfd); g_free (request); } @@ -963,7 +976,7 @@ g_flickr_photosets_getPhotos (GFlickr *f, gfd->list_cb = callback; gfd->user_data = user_data; - read_url_async (request, gfd); + read_url_async (f, request, gfd); g_free (request); } @@ -1117,6 +1130,6 @@ g_flickr_auth_checkToken (GFlickr *f, gfd->hashtable_cb = callback; gfd->user_data = user_data; - read_url_async (request, gfd); + read_url_async (f, request, gfd); g_free (request); } -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:32 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E8912750724 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:31 +0000 (UTC) X-Quarantine-ID: <ICYKzPlIBtpy> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ICYKzPlIBtpy for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:27 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 09F78750757 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:26 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAB7FqUxbdWOb/2dsb2JhbACDHpEcjn2zIJIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830010" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0008KO-C0 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0005Nv-24 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002LI-Hs for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 11/14] shoutcast: remove unused includes Date: Mon, 4 Oct 2010 21:16:21 +0200 Message-Id: <5b27202ea59581276cdf3f0236baa34d4bc7372a.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:32 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/shoutcast/grl-shoutcast.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/shoutcast/grl-shoutcast.c b/src/shoutcast/grl-shoutcast.c index 6782f3d..146637e 100644 --- a/src/shoutcast/grl-shoutcast.c +++ b/src/shoutcast/grl-shoutcast.c @@ -29,10 +29,7 @@ #include <grilo.h> #include <net/grl-net.h> #include <libxml/parser.h> -#include <libxml/xmlmemory.h> #include <libxml/xpath.h> -#include <string.h> -#include <stdlib.h> #include "grl-shoutcast.h" -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:32 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C6E39750716 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:32 +0000 (UTC) X-Quarantine-ID: <s7oGI6-IzNFS> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s7oGI6-IzNFS for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:29 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 3E8FC7507DE for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:28 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAB7FqUxbdWOb/2dsb2JhbACDHpEcjn2zIJIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830013" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0008Ke-HH for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0005O0-6M for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002LO-Mi for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 13/14] podcast: remove unused includes Date: Mon, 4 Oct 2010 21:16:23 +0200 Message-Id: <e05543209264847b248b2495946a20c67d1ee712.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:33 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/podcasts/grl-podcasts.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/podcasts/grl-podcasts.c b/src/podcasts/grl-podcasts.c index ba6451a..30f5eaa 100644 --- a/src/podcasts/grl-podcasts.c +++ b/src/podcasts/grl-podcasts.c @@ -26,11 +26,9 @@ #include <grilo.h> #include <net/grl-net.h> -#include <libxml/parser.h> #include <libxml/xpath.h> #include <sqlite3.h> #include <string.h> -#include <stdlib.h> #include "grl-podcasts.h" -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:33 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DBDE8750716 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:33 +0000 (UTC) X-Quarantine-ID: <oah4hbrddv34> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oah4hbrddv34 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:26 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id A4173750739 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830004" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008Ju-Rr for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005NZ-GU for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002Kx-04 for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 04/14] apple-trailers: use GrlNet Date: Mon, 4 Oct 2010 21:16:14 +0200 Message-Id: <99f2337830b365ddfdff83ef7fc67525dbcb94d1.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:34 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 6 +- src/apple-trailers/Makefile.am | 4 +- src/apple-trailers/grl-apple-trailers.c | 79 +++++++++++++++++++++---------- 3 files changed, 59 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index d6b88d5..a8f712f 100644 --- a/configure.ac +++ b/configure.ac @@ -528,8 +528,8 @@ AC_ARG_ENABLE(apple_trailers, [ case "$enableval" in yes) - if test "x$HAVE_GIO" = "xno"; then - AC_MSG_ERROR([GIO not found, install it or use --disable-apple-trailers]) + if test "x$HAVE_GRLNET" = "xno"; then + AC_MSG_ERROR([grilo-net not found, install it or use --disable-apple-trailers]) fi if test "x$HAVE_XML" = "xno"; then AC_MSG_ERROR([xml2 not found, install it or use --disable-apple-trailers]) @@ -538,7 +538,7 @@ AC_ARG_ENABLE(apple_trailers, esac ], [ - if test "x$HAVE_GIO" = "xyes" -a "x$HAVE_XML" = "xyes"; then + if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes"; then enable_apple_trailers=yes else enable_apple_trailers=no diff --git a/src/apple-trailers/Makefile.am b/src/apple-trailers/Makefile.am index 2677676..f62d2db 100644 --- a/src/apple-trailers/Makefile.am +++ b/src/apple-trailers/Makefile.am @@ -9,12 +9,12 @@ lib_LTLIBRARIES = libgrlappletrailers.la libgrlappletrailers_la_CFLAGS = \ $(DEPS_CFLAGS) \ - $(GIO_CFLAGS) \ + $(GRLNET_CFLAGS) \ $(XML_CFLAGS) libgrlappletrailers_la_LIBADD = \ $(DEPS_LIBS) \ - $(GIO_LIBS) \ + $(GRLNET_LIBS) \ $(XML_LIBS) libgrlappletrailers_la_SOURCES = \ diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c index f922dcc..c32a15e 100644 --- a/src/apple-trailers/grl-apple-trailers.c +++ b/src/apple-trailers/grl-apple-trailers.c @@ -27,9 +27,9 @@ #endif #include <grilo.h> -#include <gio/gio.h> #include <libxml/parser.h> #include <libxml/xmlmemory.h> +#include <net/grl-net.h> #include <libxml/xpath.h> #include <string.h> #include <stdlib.h> @@ -75,6 +75,8 @@ enum { }; struct _GrlAppleTrailersSourcePriv { + GrlNetWc *wc; + GCancellable *cancellable; gboolean hd; gboolean large_poster; }; @@ -167,6 +169,25 @@ grl_apple_trailers_source_new (gboolean high_definition, return source; } +G_DEFINE_TYPE (GrlAppleTrailersSource, grl_apple_trailers_source, GRL_TYPE_MEDIA_SOURCE); + +static void +grl_apple_trailers_source_finalize (GObject *object) +{ + GrlAppleTrailersSource *self; + + self = GRL_APPLE_TRAILERS_SOURCE (object); + + if (self->priv->wc) + g_object_unref (self->priv->wc); + + if (self->priv->cancellable + && G_IS_CANCELLABLE (self->priv->cancellable)) + g_object_unref (self->priv->cancellable); + + G_OBJECT_CLASS (grl_apple_trailers_source_parent_class)->finalize (object); +} + static void grl_apple_trailers_source_set_property (GObject *object, guint propid, @@ -197,6 +218,7 @@ grl_apple_trailers_source_class_init (GrlAppleTrailersSourceClass * klass) source_class->browse = grl_apple_trailers_source_browse; source_class->cancel = grl_apple_trailers_source_cancel; metadata_class->supported_keys = grl_apple_trailers_source_supported_keys; + g_class->finalize = grl_apple_trailers_source_finalize; g_class->set_property = grl_apple_trailers_source_set_property; g_object_class_install_property (g_class, @@ -229,8 +251,6 @@ grl_apple_trailers_source_init (GrlAppleTrailersSource *source) source->priv->hd = TRUE; } -G_DEFINE_TYPE (GrlAppleTrailersSource, grl_apple_trailers_source, GRL_TYPE_MEDIA_SOURCE); - /* ==================== Private ==================== */ static gchar * @@ -472,51 +492,51 @@ read_done_cb (GObject *source_object, gpointer user_data) { GError *error = NULL; - GError *vfs_error = NULL; + GError *wc_error = NULL; OperationData *op_data = (OperationData *) user_data; gchar *content = NULL; - if (!g_file_load_contents_finish (G_FILE (source_object), - res, - &content, - NULL, - NULL, - &vfs_error)) { + if (!grl_net_wc_request_finish (GRL_NET_WC (source_object), + res, + &content, + NULL, + &wc_error)) { error = g_error_new (GRL_CORE_ERROR, GRL_CORE_ERROR_BROWSE_FAILED, "Failed to connect Apple Trailers: '%s'", - vfs_error->message); + wc_error->message); op_data->bs->callback (op_data->bs->source, op_data->bs->browse_id, NULL, 0, op_data->bs->user_data, error); - g_error_free (vfs_error); + g_error_free (wc_error); g_error_free (error); g_slice_free (OperationData, op_data); - goto end_func; + return; } xml_parse_result (content, op_data); - g_free (content); - -end_func: - g_object_unref (source_object); } static void -read_url_async (const gchar *url, gpointer user_data) +read_url_async (GrlAppleTrailersSource *source, + const gchar *url, + gpointer user_data) { - GVfs *vfs; - GFile *uri; + if (!source->priv->wc) + source->priv->wc = grl_net_wc_new (); - vfs = g_vfs_get_default (); + source->priv->cancellable = g_cancellable_new (); GRL_DEBUG ("Opening '%s'", url); - uri = g_vfs_get_file_for_uri (vfs, url); - g_file_load_contents_async (uri, NULL, read_done_cb, user_data); + grl_net_wc_request_async (source->priv->wc, + url, + source->priv->cancellable, + read_done_cb, + user_data); } /* ================== API Implementation ================ */ @@ -557,9 +577,9 @@ grl_apple_trailers_source_browse (GrlMediaSource *source, grl_media_source_set_operation_data (source, bs->browse_id, op_data); if (at_source->priv->hd) { - read_url_async (APPLE_TRAILERS_CURRENT_HD, op_data); + read_url_async (at_source, APPLE_TRAILERS_CURRENT_HD, op_data); } else { - read_url_async (APPLE_TRAILERS_CURRENT_SD, op_data); + read_url_async (at_source, APPLE_TRAILERS_CURRENT_SD, op_data); } } @@ -567,9 +587,18 @@ static void grl_apple_trailers_source_cancel (GrlMediaSource *source, guint operation_id) { OperationData *op_data; + GrlAppleTrailersSourcePriv *priv; GRL_DEBUG ("grl_apple_trailers_source_cancel"); + priv = GRL_APPLE_TRAILERS_SOURCE_GET_PRIVATE (source); + if (priv->cancellable && G_IS_CANCELLABLE (priv->cancellable)) + g_cancellable_cancel (priv->cancellable); + priv->cancellable = NULL; + + if (priv->wc) + grl_net_wc_flush_delayed_requests (priv->wc); + op_data = (OperationData *) grl_media_source_get_operation_data (source, operation_id); if (op_data) { -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:35 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1DD83750716 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:35 +0000 (UTC) X-Quarantine-ID: <U8v6EpTTmJCw> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U8v6EpTTmJCw for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:28 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 7487F7506D8 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:26 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830008" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0008KE-2l for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005Nm-RH for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002L9-9n for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 08/14] youtube: use private structure for gdata service Date: Mon, 4 Oct 2010 21:16:18 +0200 Message-Id: <7b7d52a818f98643f601f7568aebb4a6bf131787.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:35 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/youtube/grl-youtube.c | 87 +++++++++++++++++++++++++++++++++++++++----- src/youtube/grl-youtube.h | 5 ++- 2 files changed, 80 insertions(+), 12 deletions(-) diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c index 50c6836..5b02d9a 100644 --- a/src/youtube/grl-youtube.c +++ b/src/youtube/grl-youtube.c @@ -31,6 +31,16 @@ #include "grl-youtube.h" +enum { + PROP_0, + PROP_SERVICE, +}; + +#define GRL_YOUTUBE_SOURCE_GET_PRIVATE(object) \ + (G_TYPE_INSTANCE_GET_PRIVATE((object), \ + GRL_YOUTUBE_SOURCE_TYPE, \ + GrlYoutubeSourcePriv)) + /* --------- Logging -------- */ #define GRL_LOG_DOMAIN_DEFAULT youtube_log_domain @@ -161,11 +171,20 @@ typedef enum { YOUTUBE_MEDIA_TYPE_VIDEO, } YoutubeMediaType; +struct _GrlYoutubeSourcePriv { + GDataService *service; +}; #define YOUTUBE_CLIENT_ID "grilo" static GrlYoutubeSource *grl_youtube_source_new (const gchar *api_key, const gchar *client_id); +static void grl_youtube_source_set_property (GObject *object, + guint propid, + const GValue *value, + GParamSpec *pspec); +static void grl_youtube_source_finalize (GObject *object); + gboolean grl_youtube_plugin_init (GrlPluginRegistry *registry, const GrlPluginInfo *plugin, GList *configs); @@ -264,6 +283,8 @@ GRL_PLUGIN_REGISTER (grl_youtube_plugin_init, /* ================== Youtube GObject ================ */ +G_DEFINE_TYPE (GrlYoutubeSource, grl_youtube_source, GRL_TYPE_MEDIA_SOURCE); + static GrlYoutubeSource * grl_youtube_source_new (const gchar *api_key, const gchar *client_id) { @@ -286,15 +307,15 @@ grl_youtube_source_new (const gchar *api_key, const gchar *client_id) "source-desc", SOURCE_DESC, "auto-split-threshold", YOUTUBE_MAX_CHUNK, + "yt-service", service, NULL)); - source->service = GDATA_SERVICE (service); /* Build browse content hierarchy: - Query Youtube for available categories - Compute category childcounts We only need to do this once */ if (!categories_dir) { - build_directories (source->service); + build_directories (GDATA_SERVICE (service)); } return source; @@ -305,19 +326,65 @@ grl_youtube_source_class_init (GrlYoutubeSourceClass * klass) { GrlMediaSourceClass *source_class = GRL_MEDIA_SOURCE_CLASS (klass); GrlMetadataSourceClass *metadata_class = GRL_METADATA_SOURCE_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); source_class->search = grl_youtube_source_search; source_class->browse = grl_youtube_source_browse; source_class->metadata = grl_youtube_source_metadata; metadata_class->supported_keys = grl_youtube_source_supported_keys; metadata_class->slow_keys = grl_youtube_source_slow_keys; + gobject_class->set_property = grl_youtube_source_set_property; + gobject_class->finalize = grl_youtube_source_finalize; + + g_object_class_install_property (gobject_class, + PROP_SERVICE, + g_param_spec_object ("yt-service", + "youtube-service", + "gdata youtube service object", + GDATA_TYPE_YOUTUBE_SERVICE, + G_PARAM_WRITABLE + | G_PARAM_CONSTRUCT_ONLY + | G_PARAM_STATIC_NAME)); + + g_type_class_add_private (klass, sizeof (GrlYoutubeSourcePriv)); } static void grl_youtube_source_init (GrlYoutubeSource *source) { + source->priv = GRL_YOUTUBE_SOURCE_GET_PRIVATE (source); } -G_DEFINE_TYPE (GrlYoutubeSource, grl_youtube_source, GRL_TYPE_MEDIA_SOURCE); +static void +grl_youtube_source_set_property (GObject *object, + guint propid, + const GValue *value, + GParamSpec *pspec) + +{ + switch (propid) { + case PROP_SERVICE: { + GrlYoutubeSource *self; + self = GRL_YOUTUBE_SOURCE (object); + self->priv->service = g_value_get_object (value); + break; + } + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec); + } +} + +static void +grl_youtube_source_finalize (GObject *object) +{ + GrlYoutubeSource *self; + + self = GRL_YOUTUBE_SOURCE (object); + + if (self->priv->service) + g_object_unref (self->priv->service); + + G_OBJECT_CLASS (grl_youtube_source_parent_class)->finalize (object); +} /* ======================= Utilities ==================== */ @@ -852,7 +919,7 @@ metadata_cb (GObject *object, GrlMediaSourceMetadataSpec *ms = (GrlMediaSourceMetadataSpec *) user_data; source = GRL_YOUTUBE_SOURCE (ms->source); - service = GDATA_SERVICE (source->service); + service = GDATA_SERVICE (source->priv->service); #ifdef GDATA_API_SUBJECT_TO_CHANGE video = gdata_service_query_single_entry_finish (service, result, &error); @@ -907,7 +974,7 @@ search_cb (GObject *object, GAsyncResult *result, OperationSpec *os) gboolean need_extra_unref = FALSE; GrlYoutubeSource *source = GRL_YOUTUBE_SOURCE (os->source); - feed = gdata_service_query_finish (source->service, result, &error); + feed = gdata_service_query_finish (source->priv->service, result, &error); if (!error && feed) { /* If we are browsing a category, update the count for it */ if (os->category_info) { @@ -1079,7 +1146,7 @@ produce_from_directory (CategoryInfo *dir, guint dir_size, OperationSpec *os) remaining = MIN (dir_size - os->skip, os->count); do { - GDataService *service = GRL_YOUTUBE_SOURCE (os->source)->service; + GDataService *service = GRL_YOUTUBE_SOURCE (os->source)->priv->service; GrlMedia *content = produce_container_from_directory (service, NULL, dir, index); @@ -1138,7 +1205,7 @@ produce_from_feed (OperationSpec *os) * is invoked last, the spec will be freed only once. */ operation_spec_ref (os); - service = GRL_YOUTUBE_SOURCE (os->source)->service; + service = GRL_YOUTUBE_SOURCE (os->source)->priv->service; query = gdata_query_new_with_limits (NULL , os->skip, os->count); os->category_info = &feeds_dir[feed_type]; gdata_youtube_service_query_standard_feed_async (GDATA_YOUTUBE_SERVICE (service), @@ -1182,7 +1249,7 @@ produce_from_category (OperationSpec *os) /* Look for OPERATION_SPEC_REF_RATIONALE for details */ operation_spec_ref (os); - service = GRL_YOUTUBE_SOURCE (os->source)->service; + service = GRL_YOUTUBE_SOURCE (os->source)->priv->service; query = gdata_query_new_with_limits (NULL , os->skip, os->count); os->category_info = &categories_dir[category_index]; gdata_query_set_categories (query, category_term); @@ -1255,7 +1322,7 @@ grl_youtube_source_search (GrlMediaSource *source, operation_spec_ref (os); query = gdata_query_new_with_limits (ss->text, os->skip, os->count); - gdata_youtube_service_query_videos_async (GDATA_YOUTUBE_SERVICE (GRL_YOUTUBE_SOURCE (source)->service), + gdata_youtube_service_query_videos_async (GDATA_YOUTUBE_SERVICE (GRL_YOUTUBE_SOURCE (source)->priv->service), query, NULL, search_progress_cb, @@ -1327,7 +1394,7 @@ grl_youtube_source_metadata (GrlMediaSource *source, id = grl_media_get_id (ms->media); media_type = classify_media_id (id); - service = GRL_YOUTUBE_SOURCE (source)->service; + service = GRL_YOUTUBE_SOURCE (source)->priv->service; switch (media_type) { case YOUTUBE_MEDIA_TYPE_ROOT: diff --git a/src/youtube/grl-youtube.h b/src/youtube/grl-youtube.h index fdc251e..dc88589 100644 --- a/src/youtube/grl-youtube.h +++ b/src/youtube/grl-youtube.h @@ -24,7 +24,6 @@ #define _GRL_YOUTUBE_SOURCE_H_ #include <grilo.h> -#include <gdata/gdata.h> #define GRL_YOUTUBE_SOURCE_TYPE \ (grl_youtube_source_get_type ()) @@ -53,11 +52,13 @@ GrlYoutubeSourceClass)) typedef struct _GrlYoutubeSource GrlYoutubeSource; +typedef struct _GrlYoutubeSourcePriv GrlYoutubeSourcePriv; struct _GrlYoutubeSource { GrlMediaSource parent; - GDataService *service; + GrlYoutubeSourcePriv *priv; + }; typedef struct _GrlYoutubeSourceClass GrlYoutubeSourceClass; -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:36 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 26BC27507DF for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:36 +0000 (UTC) X-Quarantine-ID: <NHMh4Ld77Tiy> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NHMh4Ld77Tiy for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:25 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 7F8A575009D for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:24 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830001" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008Jp-LO for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005NX-Ds for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWO-0002Ku-UO for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:24 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 03/14] apple-trailers: screen resolution as param Date: Mon, 4 Oct 2010 21:16:13 +0200 Message-Id: <737f73e05e80efb102bcf0c9d748ec041386295e.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:36 -0000 Later we'll use the private structure for GrlNet Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/apple-trailers/grl-apple-trailers.c | 75 ++++++++++++++++++++++++++++--- src/apple-trailers/grl-apple-trailers.h | 7 ++- 2 files changed, 74 insertions(+), 8 deletions(-) diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c index 30e156d..f922dcc 100644 --- a/src/apple-trailers/grl-apple-trailers.c +++ b/src/apple-trailers/grl-apple-trailers.c @@ -68,6 +68,22 @@ typedef struct { gboolean cancelled; } OperationData; +enum { + PROP_0, + PROP_HD, + PROP_LARGE_POSTER, +}; + +struct _GrlAppleTrailersSourcePriv { + gboolean hd; + gboolean large_poster; +}; + +#define GRL_APPLE_TRAILERS_SOURCE_GET_PRIVATE(object) \ + (G_TYPE_INSTANCE_GET_PRIVATE((object), \ + GRL_APPLE_TRAILERS_SOURCE_TYPE, \ + GrlAppleTrailersSourcePriv)) + static GrlAppleTrailersSource *grl_apple_trailers_source_new (gboolean hd, gboolean xlarge); @@ -144,27 +160,73 @@ grl_apple_trailers_source_new (gboolean high_definition, "source-id", SOURCE_ID, "source-name", SOURCE_NAME, "source-desc", SOURCE_DESC, + "high-definition", high_definition, + "large-poster", xlarge, NULL); - source->hd = high_definition; - source->xlarge = xlarge; - return source; } static void +grl_apple_trailers_source_set_property (GObject *object, + guint propid, + const GValue *value, + GParamSpec *pspec) +{ + GrlAppleTrailersSource *self; + self = GRL_APPLE_TRAILERS_SOURCE (object); + + switch (propid) { + case PROP_HD: + self->priv->hd = g_value_get_boolean (value); + break; + case PROP_LARGE_POSTER: + self->priv->large_poster = g_value_get_boolean (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec); + } +} + +static void grl_apple_trailers_source_class_init (GrlAppleTrailersSourceClass * klass) { GrlMediaSourceClass *source_class = GRL_MEDIA_SOURCE_CLASS (klass); GrlMetadataSourceClass *metadata_class = GRL_METADATA_SOURCE_CLASS (klass); + GObjectClass *g_class = G_OBJECT_CLASS (klass); source_class->browse = grl_apple_trailers_source_browse; source_class->cancel = grl_apple_trailers_source_cancel; metadata_class->supported_keys = grl_apple_trailers_source_supported_keys; + g_class->set_property = grl_apple_trailers_source_set_property; + + g_object_class_install_property (g_class, + PROP_HD, + g_param_spec_boolean ("high-definition", + "hd", + "Hi/Low definition videos", + TRUE, + G_PARAM_WRITABLE + | G_PARAM_CONSTRUCT_ONLY + | G_PARAM_STATIC_NAME)); + + g_object_class_install_property (g_class, + PROP_LARGE_POSTER, + g_param_spec_boolean ("large-poster", + "xlarge", + "Pick large poster", + TRUE, + G_PARAM_WRITABLE + | G_PARAM_CONSTRUCT_ONLY + | G_PARAM_STATIC_NAME)); + + g_type_class_add_private (klass, sizeof (GrlAppleTrailersSourcePriv)); } static void grl_apple_trailers_source_init (GrlAppleTrailersSource *source) { + source->priv = GRL_APPLE_TRAILERS_SOURCE_GET_PRIVATE (source); + source->priv->hd = TRUE; } G_DEFINE_TYPE (GrlAppleTrailersSource, grl_apple_trailers_source, GRL_TYPE_MEDIA_SOURCE); @@ -316,7 +378,8 @@ send_movie_info (OperationData *op_data) GrlAppleTrailersSource *source = GRL_APPLE_TRAILERS_SOURCE (op_data->bs->source); - media = build_media_from_movie (op_data->xml_entries, source->xlarge); + media = build_media_from_movie (op_data->xml_entries, + source->priv->large_poster); last = !op_data->xml_entries->next || op_data->bs->count == 1; @@ -484,7 +547,7 @@ static void grl_apple_trailers_source_browse (GrlMediaSource *source, GrlMediaSourceBrowseSpec *bs) { - GrlAppleTrailersSource *at_source = (GrlAppleTrailersSource *) source; + GrlAppleTrailersSource *at_source = GRL_APPLE_TRAILERS_SOURCE (source); OperationData *op_data; GRL_DEBUG ("grl_apple_trailers_source_browse"); @@ -493,7 +556,7 @@ grl_apple_trailers_source_browse (GrlMediaSource *source, op_data->bs = bs; grl_media_source_set_operation_data (source, bs->browse_id, op_data); - if (at_source->hd) { + if (at_source->priv->hd) { read_url_async (APPLE_TRAILERS_CURRENT_HD, op_data); } else { read_url_async (APPLE_TRAILERS_CURRENT_SD, op_data); diff --git a/src/apple-trailers/grl-apple-trailers.h b/src/apple-trailers/grl-apple-trailers.h index 139e39c..74f8f9a 100644 --- a/src/apple-trailers/grl-apple-trailers.h +++ b/src/apple-trailers/grl-apple-trailers.h @@ -54,12 +54,15 @@ GrlAppleTrailersSourceClass)) typedef struct _GrlAppleTrailersSource GrlAppleTrailersSource; +typedef struct _GrlAppleTrailersSourcePriv GrlAppleTrailersSourcePriv; struct _GrlAppleTrailersSource { GrlMediaSource parent; - gboolean hd; - gboolean xlarge; + + /*< private >*/ + GrlAppleTrailersSourcePriv *priv; + }; typedef struct _GrlAppleTrailersSourceClass GrlAppleTrailersSourceClass; -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:37 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5BBF87507E8 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:37 +0000 (UTC) X-Quarantine-ID: <29Mz+88aqJEZ> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29Mz+88aqJEZ for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:26 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 2E3DE750101 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAB7FqUxbdWOb/2dsb2JhbACDHpEcjn2zIJIbgSKDMXQEikA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830006" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:12 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0008K9-VN for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005Nj-Nr for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002L6-6O for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 07/14] flickr: trivial changes Date: Mon, 4 Oct 2010 21:16:17 +0200 Message-Id: <931e239aea789da3c15c6e339f02c607b3e1af39.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:37 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/flickr/gflickr.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/flickr/gflickr.c b/src/flickr/gflickr.c index 447ef61..19e1677 100644 --- a/src/flickr/gflickr.c +++ b/src/flickr/gflickr.c @@ -1,7 +1,6 @@ #include "gflickr.h" #include "grl-flickr.h" /* log domain */ -#include <libxml/parser.h> #include <libxml/xpath.h> #include <gio/gio.h> #include <string.h> -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:38 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A19FA7507B4 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:38 +0000 (UTC) X-Quarantine-ID: <agtMp-YL5fQt> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id agtMp-YL5fQt for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:27 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id D7E6B750741 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:26 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830009" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0008KJ-6s for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005Nr-Tv for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:12 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002LC-CP for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 09/14] youtube: add GrlNet Date: Mon, 4 Oct 2010 21:16:19 +0200 Message-Id: <520a82bf1e777ab309e493f9f36ccc3dc496db7e.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:39 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 6 ++-- src/youtube/Makefile.am | 6 ++-- src/youtube/grl-youtube.c | 54 +++++++++++++++++++++++++++++--------------- 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index 8a699ff..32227cc 100644 --- a/configure.ac +++ b/configure.ac @@ -317,8 +317,8 @@ AC_ARG_ENABLE(youtube, [ case "$enableval" in yes) - if test "x$HAVE_GIO" = "xno"; then - AC_MSG_ERROR([GIO not found, install it or use --disable-youtube]) + if test "x$HAVE_GRLNET" = "xno"; then + AC_MSG_ERROR([grilo-net not found, install it or use --disable-youtube]) fi if test "x$HAVE_XML" = "xno"; then AC_MSG_ERROR([xml2 not found, install it or use --disable-youtube]) @@ -330,7 +330,7 @@ AC_ARG_ENABLE(youtube, esac ], [ - if test "x$HAVE_GIO" = "xyes" -a "x$HAVE_XML" = "xyes"; then + if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes"; then if test "x$HAVE_GDATA" = "xyes"; then enable_youtube=yes else diff --git a/src/youtube/Makefile.am b/src/youtube/Makefile.am index 83e4e47..7f230c2 100644 --- a/src/youtube/Makefile.am +++ b/src/youtube/Makefile.am @@ -9,21 +9,21 @@ lib_LTLIBRARIES = libgrlyoutube.la libgrlyoutube_la_CFLAGS = \ $(DEPS_CFLAGS) \ - $(GIO_CFLAGS) \ + $(GRLNET_CFLAGS) \ $(XML_CFLAGS) \ $(GTHREAD_CFLAGS) \ $(GDATA_CFLAGS) libgrlyoutube_la_LIBADD = \ $(DEPS_LIBS) \ - $(GIO_LIBS) \ + $(GRLNET_LIBS) \ $(XML_LIBS) \ $(GTHREAD_LIBS) \ $(GDATA_LIBS) libgrlyoutube_la_SOURCES = grl-youtube.c grl-youtube.h -libdir=$(GRL_PLUGINS_DIR) +libdir = $(GRL_PLUGINS_DIR) youtubexmldir = $(GRL_PLUGINS_CONF_DIR) youtubexml_DATA = $(YOUTUBE_PLUGIN_ID).xml diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c index 5b02d9a..9e05a06 100644 --- a/src/youtube/grl-youtube.c +++ b/src/youtube/grl-youtube.c @@ -25,7 +25,7 @@ #endif #include <grilo.h> -#include <gio/gio.h> +#include <net/grl-net.h> #include <gdata/gdata.h> #include <string.h> @@ -173,7 +173,10 @@ typedef enum { struct _GrlYoutubeSourcePriv { GDataService *service; + + GrlNetWc *wc; }; + #define YOUTUBE_CLIENT_ID "grilo" static GrlYoutubeSource *grl_youtube_source_new (const gchar *api_key, @@ -231,6 +234,8 @@ CategoryInfo feeds_dir[] = { CategoryInfo *categories_dir = NULL; +static GrlYoutubeSource *ytsrc = NULL; + /* =================== Youtube Plugin =============== */ gboolean @@ -310,6 +315,8 @@ grl_youtube_source_new (const gchar *api_key, const gchar *client_id) "yt-service", service, NULL)); + ytsrc = source; + /* Build browse content hierarchy: - Query Youtube for available categories - Compute category childcounts @@ -380,6 +387,9 @@ grl_youtube_source_finalize (GObject *object) self = GRL_YOUTUBE_SOURCE (object); + if (self->priv->wc) + g_object_unref (self->priv->wc); + if (self->priv->service) g_object_unref (self->priv->service); @@ -414,24 +424,31 @@ operation_spec_ref (OperationSpec *os) os->ref_count++; } +inline static GrlNetWc * +get_wc () +{ + if (ytsrc && !ytsrc->priv->wc) + ytsrc->priv->wc = grl_net_wc_new (); + + return ytsrc->priv->wc; +} + static void read_done_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { AsyncReadCb *arc = (AsyncReadCb *) user_data; - GError *vfs_error = NULL; + GError *wc_error = NULL; gchar *content = NULL; - g_file_load_contents_finish (G_FILE (source_object), - res, - &content, - NULL, - NULL, - &vfs_error); - g_object_unref (source_object); - if (vfs_error) { - GRL_WARNING ("Failed to open '%s': %s", arc->url, vfs_error->message); + grl_net_wc_request_finish (GRL_NET_WC (source_object), + res, + &content, + NULL, + &wc_error); + if (wc_error) { + GRL_WARNING ("Failed to open '%s': %s", arc->url, wc_error->message); arc->callback (NULL, arc->user_data); } else { arc->callback (content, arc->user_data); @@ -445,17 +462,19 @@ read_url_async (const gchar *url, AsyncReadCbFunc callback, gpointer user_data) { - GFile *uri; AsyncReadCb *arc; - GRL_DEBUG ("Opening async '%s'", url); - arc = g_slice_new0 (AsyncReadCb); arc->url = g_strdup (url); arc->callback = callback; arc->user_data = user_data; - uri = g_file_new_for_uri (url); - g_file_load_contents_async (uri, NULL, read_done_cb, arc); + + GRL_DEBUG ("Opening async '%s'", url); + grl_net_wc_request_async (get_wc (), + url, + NULL, + read_done_cb, + arc); } static void @@ -517,8 +536,6 @@ set_media_url_async_read_cb (gchar *data, gpointer user_data) } done: - g_free (data); - if (url) { grl_media_set_url (cb_data->media, url); g_free (url); @@ -731,7 +748,6 @@ build_categories_directory_read_cb (gchar *xmldata, gpointer user_data) parse_categories (doc, node, GDATA_SERVICE (user_data)); free_resources: - g_free (xmldata); xmlFreeDoc (doc); } -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:39 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id AFE477507E5 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:39 +0000 (UTC) X-Quarantine-ID: <M0HVNQOCA9my> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M0HVNQOCA9my for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:31 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 0E3E775062B for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:29 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830014" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0008Kd-Gv for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0005O3-8V for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002LR-OX for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 14/14] lastfm-albumart: use GrlNet Date: Mon, 4 Oct 2010 21:16:24 +0200 Message-Id: <b921ad9928e69296ea05ed5769d69fec9ee316e3.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:40 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 6 ++-- src/lastfm-albumart/Makefile.am | 6 ++-- src/lastfm-albumart/grl-lastfm-albumart.c | 47 +++++++++++++++++----------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index 17d1e67..a56e675 100644 --- a/configure.ac +++ b/configure.ac @@ -236,8 +236,8 @@ AC_ARG_ENABLE(lastfm_albumart, [ case "$enableval" in yes) - if test "x$HAVE_GIO" = "xno"; then - AC_MSG_ERROR([GIO not found, install it or use --disable-lastfm-albumart]) + if test "x$HAVE_GRLNET" = "xno"; then + AC_MSG_ERROR([grilo-net not found, install it or use --disable-lastfm-albumart]) fi if test "x$HAVE_XML" = "xno"; then AC_MSG_ERROR([xml2 not found, install it or use --disable-lastfm-albumart]) @@ -246,7 +246,7 @@ AC_ARG_ENABLE(lastfm_albumart, esac ], [ - if test "x$HAVE_GIO" = "xyes" -a "x$HAVE_XML" = "xyes"; then + if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes"; then enable_lastfm_albumart=yes else enable_lastfm_albumart=no diff --git a/src/lastfm-albumart/Makefile.am b/src/lastfm-albumart/Makefile.am index 757756d..66527f6 100644 --- a/src/lastfm-albumart/Makefile.am +++ b/src/lastfm-albumart/Makefile.am @@ -9,17 +9,17 @@ lib_LTLIBRARIES = libgrllastfm-albumart.la libgrllastfm_albumart_la_CFLAGS = \ $(DEPS_CFLAGS) \ - $(GIO_CFLAGS) \ + $(GRLNET_CFLAGS) \ $(XML_CFLAGS) libgrllastfm_albumart_la_LIBADD = \ $(DEPS_LIBS) \ - $(GIO_LIBS) \ + $(GRLNET_LIBS) \ $(XML_LIBS) libgrllastfm_albumart_la_SOURCES = grl-lastfm-albumart.c grl-lastfm-albumart.h -libdir=$(GRL_PLUGINS_DIR) +libdir = $(GRL_PLUGINS_DIR) lastfmalbumartxmldir = $(GRL_PLUGINS_CONF_DIR) lastfmalbumartxml_DATA = $(LASTFM_ALBUMART_PLUGIN_ID).xml diff --git a/src/lastfm-albumart/grl-lastfm-albumart.c b/src/lastfm-albumart/grl-lastfm-albumart.c index c448177..60ccbe6 100644 --- a/src/lastfm-albumart/grl-lastfm-albumart.c +++ b/src/lastfm-albumart/grl-lastfm-albumart.c @@ -26,7 +26,7 @@ #include "config.h" #endif -#include <gio/gio.h> +#include <net/grl-net.h> #include <libxml/parser.h> #include <libxml/xmlmemory.h> #include <libxml/xpath.h> @@ -55,9 +55,12 @@ GRL_LOG_DOMAIN_STATIC(lastfm_albumart_log_domain); #define LICENSE "LGPL" #define SITE "http://www.igalia.com" +static GrlNetWc *wc; static GrlLastfmAlbumartSource *grl_lastfm_albumart_source_new (void); +static void grl_lastfm_albumart_source_finalize (GObject *object); + static void grl_lastfm_albumart_source_resolve (GrlMetadataSource *source, GrlMetadataSourceResolveSpec *rs); @@ -113,6 +116,9 @@ grl_lastfm_albumart_source_class_init (GrlLastfmAlbumartSourceClass * klass) metadata_class->supported_keys = grl_lastfm_albumart_source_supported_keys; metadata_class->key_depends = grl_lastfm_albumart_source_key_depends; metadata_class->resolve = grl_lastfm_albumart_source_resolve; + + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = grl_lastfm_albumart_source_finalize; } static void @@ -124,6 +130,15 @@ G_DEFINE_TYPE (GrlLastfmAlbumartSource, grl_lastfm_albumart_source, GRL_TYPE_METADATA_SOURCE); +static void +grl_lastfm_albumart_source_finalize (GObject *object) +{ + if (wc && GRL_IS_NET_WC (wc)) + g_object_unref (wc); + + G_OBJECT_CLASS (grl_lastfm_albumart_source_parent_class)->finalize (object); +} + /* ======================= Utilities ==================== */ static gchar * @@ -175,30 +190,27 @@ read_done_cb (GObject *source_object, GrlMetadataSourceResolveSpec *rs = (GrlMetadataSourceResolveSpec *) user_data; GError *error = NULL; - GError *vfs_error = NULL; + GError *wc_error = NULL; gchar *content = NULL; gchar *image = NULL; - if (!g_file_load_contents_finish (G_FILE (source_object), - res, - &content, - NULL, - NULL, - &vfs_error)) { + if (!grl_net_wc_request_finish (GRL_NET_WC (source_object), + res, + &content, + NULL, + &wc_error)) { error = g_error_new (GRL_CORE_ERROR, GRL_CORE_ERROR_RESOLVE_FAILED, "Failed to connect to Last.FM: '%s'", - vfs_error->message); + wc_error->message); rs->callback (rs->source, rs->media, rs->user_data, error); - g_error_free (vfs_error); + g_error_free (wc_error); g_error_free (error); - g_object_unref (source_object); + return; } - g_object_unref (source_object); image = xml_get_image (content); - g_free (content); if (image) { grl_data_set_string (GRL_DATA (rs->media), GRL_METADATA_KEY_THUMBNAIL, @@ -212,14 +224,11 @@ read_done_cb (GObject *source_object, static void read_url_async (const gchar *url, gpointer user_data) { - GVfs *vfs; - GFile *uri; - - vfs = g_vfs_get_default (); + if (!wc) + wc = grl_net_wc_new (); GRL_DEBUG ("Opening '%s'", url); - uri = g_vfs_get_file_for_uri (vfs, url); - g_file_load_contents_async (uri, NULL, read_done_cb, user_data); + grl_net_wc_request_async (wc, url, NULL, read_done_cb, user_data); } /* ================== API Implementation ================ */ -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:41 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id ECE557507E5 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:40 +0000 (UTC) X-Quarantine-ID: <IapemrZ98WPM> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.744 X-Spam-Level: X-Spam-Status: No, score=-1.744 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_SX=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IapemrZ98WPM for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:29 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 2A8017507C3 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:27 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830012" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0008KQ-Cp for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0005Ny-4C for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002LL-K8 for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 12/14] podcasts: use GrlNet Date: Mon, 4 Oct 2010 21:16:22 +0200 Message-Id: <0a6d1df698c12c186360818083f0d569d4d288b0.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:41 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 6 ++-- src/podcasts/Makefile.am | 6 ++-- src/podcasts/grl-podcasts.c | 48 ++++++++++++++++++++++++------------------ 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index b78780c..17d1e67 100644 --- a/configure.ac +++ b/configure.ac @@ -400,8 +400,8 @@ AC_ARG_ENABLE(podcasts, [ case "$enableval" in yes) - if test "x$HAVE_GIO" = "xno"; then - AC_MSG_ERROR([GIO not found, install it or use --disable-podcasts]) + if test "x$HAVE_GRLNET" = "xno"; then + AC_MSG_ERROR([grilo-net not found, install it or use --disable-podcasts]) fi if test "x$HAVE_XML" = "xno"; then AC_MSG_ERROR([xml2 not found, install it or use --disable-podcasts]) @@ -413,7 +413,7 @@ AC_ARG_ENABLE(podcasts, esac ], [ - if test "x$HAVE_GIO" = "xyes" -a "x$HAVE_XML" = "xyes"; then + if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes"; then if test "x$HAVE_SQLITE" = "xyes"; then enable_podcasts=yes else diff --git a/src/podcasts/Makefile.am b/src/podcasts/Makefile.am index 9404254..09d5913 100644 --- a/src/podcasts/Makefile.am +++ b/src/podcasts/Makefile.am @@ -9,19 +9,19 @@ lib_LTLIBRARIES = libgrlpodcasts.la libgrlpodcasts_la_CFLAGS = \ $(DEPS_CFLAGS) \ - $(GIO_CFLAGS) \ + $(GRLNET_CFLAGS) \ $(XML_CFLAGS) \ $(SQLITE_CFLAGS) libgrlpodcasts_la_LIBADD = \ $(DEPS_LIBS) \ - $(GIO_LIBS) \ + $(GRLNET_LIBS) \ $(XML_LIBS) \ $(SQLITE_LIBS) libgrlpodcasts_la_SOURCES = grl-podcasts.c grl-podcasts.h -libdir=$(GRL_PLUGINS_DIR) +libdir = $(GRL_PLUGINS_DIR) podcastsxmldir = $(GRL_PLUGINS_CONF_DIR) podcastsxml_DATA = $(PODCASTS_PLUGIN_ID).xml diff --git a/src/podcasts/grl-podcasts.c b/src/podcasts/grl-podcasts.c index 74629f2..ba6451a 100644 --- a/src/podcasts/grl-podcasts.c +++ b/src/podcasts/grl-podcasts.c @@ -25,7 +25,7 @@ #endif #include <grilo.h> -#include <gio/gio.h> +#include <net/grl-net.h> #include <libxml/parser.h> #include <libxml/xpath.h> #include <sqlite3.h> @@ -187,6 +187,7 @@ typedef struct { struct _GrlPodcastsPrivate { sqlite3 *db; + GrlNetWc *wc; }; typedef struct { @@ -351,6 +352,9 @@ grl_podcasts_source_finalize (GObject *object) source = GRL_PODCASTS_SOURCE (object); + if (source->priv->wc) + g_object_unref (source->priv->wc); + sqlite3_close (source->priv->db); G_OBJECT_CLASS (grl_podcasts_source_parent_class)->finalize (object); @@ -388,21 +392,19 @@ read_done_cb (GObject *source_object, gpointer user_data) { AsyncReadCb *arc = (AsyncReadCb *) user_data; - GError *vfs_error = NULL; + GError *wc_error = NULL; gchar *content = NULL; GRL_DEBUG (" Done"); - g_file_load_contents_finish (G_FILE (source_object), - res, - &content, - NULL, - NULL, - &vfs_error); - g_object_unref (source_object); - if (vfs_error) { - GRL_WARNING ("Failed to open '%s': %s", arc->url, vfs_error->message); - g_error_free (vfs_error); + grl_net_wc_request_finish (GRL_NET_WC (source_object), + res, + &content, + NULL, + &wc_error); + if (wc_error) { + GRL_WARNING ("Failed to open '%s': %s", arc->url, wc_error->message); + g_error_free (wc_error); } else { arc->callback (content, arc->user_data); } @@ -411,24 +413,29 @@ read_done_cb (GObject *source_object, } static void -read_url_async (const gchar *url, +read_url_async (GrlPodcastsSource *source, + const gchar *url, AsyncReadCbFunc callback, gpointer user_data) { - GVfs *vfs; - GFile *uri; AsyncReadCb *arc; - vfs = g_vfs_get_default (); - GRL_DEBUG ("Opening async '%s'", url); arc = g_slice_new0 (AsyncReadCb); arc->url = g_strdup (url); arc->callback = callback; arc->user_data = user_data; - uri = g_vfs_get_file_for_uri (vfs, url); - g_file_load_contents_async (uri, NULL, read_done_cb, arc); + + /* We would need a different Wc if we change of URL. + * In this case, as we don't know the previous URL, + * we ditch the Wc and create another. It's cheap. + */ + if (!source->priv->wc) + g_object_unref (source->priv->wc); + + source->priv->wc = grl_net_wc_new (); + grl_net_wc_request_async (source->priv->wc, url, NULL, read_done_cb, arc); } static gint @@ -1074,7 +1081,6 @@ read_feed_cb (gchar *xmldata, gpointer user_data) "Failed to read data from podcast"); } else { parse_feed (os, xmldata, &error); - g_free (xmldata); } if (error) { @@ -1149,7 +1155,7 @@ produce_podcast_contents (OperationSpec *os) /* We have to read the podcast feed again */ GRL_DEBUG ("Refreshing podcast '%s'...", os->media_id); url = g_strdup ((gchar *) sqlite3_column_text (sql_stmt, PODCAST_URL)); - read_url_async (url, read_feed_cb, os); + read_url_async (GRL_PODCASTS_SOURCE (os->source), url, read_feed_cb, os); g_free (url); } else { /* We can read the podcast entries from the database cache */ -- 1.7.1 From vjaquez@igalia.com Mon Oct 4 19:17:43 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1E8987507DE for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:43 +0000 (UTC) X-Quarantine-ID: <KH71chf8j8aw> X-Virus-Scanned: by amavisd-new at gnome.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KH71chf8j8aw for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:29 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 37B5E7507DD for <grilo-list@gnome.org>; Mon, 4 Oct 2010 19:17:28 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAB7FqUxbdWOb/2dsb2JhbACDHqAZsyCSG4EigzF0BIpA X-IronPort-AV: E=Sophos;i="4.57,280,1283724000"; d="scan'208";a="686830011" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Oct 2010 21:17:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXB-0008KP-CN for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P2qXA-0005Nu-Vx for <grilo-list@gnome.org>; Mon, 04 Oct 2010 21:17:13 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P2qWP-0002LF-Fg for grilo-list@gnome.org; Mon, 04 Oct 2010 21:16:25 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH plugins 10/14] shoutcast: add GrlNet Date: Mon, 4 Oct 2010 21:16:20 +0200 Message-Id: <fde3ab058b726f0c107280b89522f80925569396.1286219579.git.vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 19:17:43 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- configure.ac | 6 ++-- src/shoutcast/Makefile.am | 4 +- src/shoutcast/grl-shoutcast.c | 62 +++++++++++++++++++++++++---------------- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index 32227cc..b78780c 100644 --- a/configure.ac +++ b/configure.ac @@ -490,8 +490,8 @@ AC_ARG_ENABLE(shoutcast, [ case "$enableval" in yes) - if test "x$HAVE_GIO" = "xno"; then - AC_MSG_ERROR([GIO not found, install it or use --disable-shoutcast]) + if test "x$HAVE_GRLNET" = "xno"; then + AC_MSG_ERROR([grilo-net not found, install it or use --disable-shoutcast]) fi if test "x$HAVE_XML" = "xno"; then AC_MSG_ERROR([xml2 not found, install it or use --disable-shoutcast]) @@ -500,7 +500,7 @@ AC_ARG_ENABLE(shoutcast, esac ], [ - if test "x$HAVE_GIO" = "xyes" -a "x$HAVE_XML" = "xyes"; then + if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes"; then enable_shoutcast=yes else enable_shoutcast=no diff --git a/src/shoutcast/Makefile.am b/src/shoutcast/Makefile.am index 470b386..f32eaee 100644 --- a/src/shoutcast/Makefile.am +++ b/src/shoutcast/Makefile.am @@ -9,12 +9,12 @@ lib_LTLIBRARIES = libgrlshoutcast.la libgrlshoutcast_la_CFLAGS = \ $(DEPS_CFLAGS) \ - $(GIO_CFLAGS) \ + $(GRLNET_CFLAGS) \ $(XML_CFLAGS) libgrlshoutcast_la_LIBADD = \ $(DEPS_LIBS) \ - $(GIO_LIBS) \ + $(GRLNET_LIBS) \ $(XML_LIBS) libgrlshoutcast_la_SOURCES = grl-shoutcast.c grl-shoutcast.h diff --git a/src/shoutcast/grl-shoutcast.c b/src/shoutcast/grl-shoutcast.c index f68d244..6782f3d 100644 --- a/src/shoutcast/grl-shoutcast.c +++ b/src/shoutcast/grl-shoutcast.c @@ -27,7 +27,7 @@ #endif #include <grilo.h> -#include <gio/gio.h> +#include <net/grl-net.h> #include <libxml/parser.h> #include <libxml/xmlmemory.h> #include <libxml/xpath.h> @@ -83,6 +83,8 @@ typedef struct { xmlNodePtr xml_entries; } OperationData; +static GrlNetWc *wc = NULL; +static GCancellable *cancellable; static gchar *cached_page = NULL; static gboolean cached_page_expired = TRUE; @@ -108,6 +110,8 @@ static void grl_shoutcast_source_cancel (GrlMediaSource *source, static void read_url_async (const gchar *url, OperationData *op_data); +static void grl_shoutcast_source_finalize (GObject *object); + /* =================== SHOUTcast Plugin =============== */ gboolean @@ -148,11 +152,13 @@ grl_shoutcast_source_class_init (GrlShoutcastSourceClass * klass) { GrlMediaSourceClass *source_class = GRL_MEDIA_SOURCE_CLASS (klass); GrlMetadataSourceClass *metadata_class = GRL_METADATA_SOURCE_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); source_class->metadata = grl_shoutcast_source_metadata; source_class->browse = grl_shoutcast_source_browse; source_class->search = grl_shoutcast_source_search; source_class->cancel = grl_shoutcast_source_cancel; metadata_class->supported_keys = grl_shoutcast_source_supported_keys; + gobject_class->finalize = grl_shoutcast_source_finalize; } static void @@ -162,6 +168,18 @@ grl_shoutcast_source_init (GrlShoutcastSource *source) G_DEFINE_TYPE (GrlShoutcastSource, grl_shoutcast_source, GRL_TYPE_MEDIA_SOURCE); +static void +grl_shoutcast_source_finalize (GObject *object) +{ + if (wc && GRL_IS_NET_WC (wc)) + g_object_unref (wc); + + if (cancellable && G_IS_CANCELLABLE (cancellable)) + g_cancellable_cancel (cancellable); + + G_OBJECT_CLASS (grl_shoutcast_source_parent_class)->finalize (object); +} + /* ======================= Private ==================== */ static gint @@ -468,32 +486,31 @@ read_done_cb (GObject *source_object, gpointer user_data) { GError *error = NULL; - GError *vfs_error = NULL; + GError *wc_error = NULL; OperationData *op_data = (OperationData *) user_data; gboolean cache; gchar *content = NULL; - if (!g_file_load_contents_finish (G_FILE (source_object), - res, - &content, - NULL, - NULL, - &vfs_error)) { + if (!grl_net_wc_request_finish (GRL_NET_WC (source_object), + res, + &content, + NULL, + &wc_error)) { error = g_error_new (GRL_CORE_ERROR, op_data->error_code, "Failed to connect SHOUTcast: '%s'", - vfs_error->message); + wc_error->message); op_data->result_cb (op_data->source, op_data->operation_id, NULL, 0, op_data->user_data, error); - g_error_free (vfs_error); + g_error_free (wc_error); g_error_free (error); g_slice_free (OperationData, op_data); - goto end_func; + return; } cache = op_data->cache; @@ -501,15 +518,10 @@ read_done_cb (GObject *source_object, if (cache && cached_page_expired) { GRL_DEBUG ("Caching page"); g_free (cached_page); - cached_page = content; + cached_page = g_strdup (content); cached_page_expired = FALSE; g_timeout_add_seconds (EXPIRE_CACHE_TIMEOUT, expire_cache, NULL); - } else { - g_free (content); } - -end_func: - g_object_unref (source_object); } static gboolean @@ -522,17 +534,15 @@ read_cached_page (OperationData *op_data) static void read_url_async (const gchar *url, OperationData *op_data) { - GVfs *vfs; - GFile *uri; - if (op_data->cache && !cached_page_expired) { GRL_DEBUG ("Using cached page"); g_idle_add ((GSourceFunc) read_cached_page, op_data); } else { - vfs = g_vfs_get_default (); - GRL_DEBUG ("Opening '%s'", url); - uri = g_vfs_get_file_for_uri (vfs, url); - g_file_load_contents_async (uri, NULL, read_done_cb, op_data); + if (!wc) + wc = grl_net_wc_new (); + + cancellable = g_cancellable_new (); + grl_net_wc_request_async (wc, url, cancellable, read_done_cb, op_data); } } @@ -707,6 +717,10 @@ grl_shoutcast_source_cancel (GrlMediaSource *source, guint operation_id) GRL_DEBUG ("grl_shoutcast_source_cancel"); + if (cancellable && G_IS_CANCELLABLE (cancellable)) + g_cancellable_cancel (cancellable); + cancellable = NULL; + op_data = (OperationData *) grl_media_source_get_operation_data (source, operation_id); if (op_data) { -- 1.7.1 From spenap@gmail.com Mon Oct 4 21:09:58 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D87917500CC for <grilo-list@gnome.org>; Mon, 4 Oct 2010 21:09:58 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.923 X-Spam-Level: X-Spam-Status: No, score=-1.923 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_RL=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TtXeeo7JeUIC for <grilo-list@gnome.org>; Mon, 4 Oct 2010 21:09:56 +0000 (UTC) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by menubar.gnome.org (Postfix) with ESMTP id 257EA7500C5 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 21:09:45 +0000 (UTC) Received: by wwb31 with SMTP id 31so5609582wwb.27 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 14:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=m0Kp7FlSOTCQaHDBvq8osqrdyzvzNRFxVzU4xnkvNNs=; b=CBtOjebbfKM3RWEWDE0XerQMKzwwRuOWtk559Gu3qcbcncZZYYqD8Zb0/1bqlUPp6t FRWHsVTnYkNc98ne6as+e/rVVevjVxOLOglXvkyW0OiO/sFA/k5Lrzkw/bMZSQvoalpn oqo/xUmJloOQeeb6tJXof9h19MGp3IZnlJpro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=XOev4suTTEFa5zmGIQWE2ozRA2SsDDKIY26TqXQCIJVhG2r7Tvei+SnaJlg2OrNR+C TcLrTJNiRqHhyVBCwgHdoYDBTscxa+hZiqB3nFcEANNgwuSVsmy/jlbkH3xtWhqglTJc lx4fx8sLgRFO9UWmvuRejVWGbAfmpXTZF6KAA= Received: by 10.227.142.84 with SMTP id p20mr8145451wbu.182.1286226583982; Mon, 04 Oct 2010 14:09:43 -0700 (PDT) Received: from [192.168.1.111] (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id fz1sm4557917wbb.6.2010.10.04.14.09.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 14:09:34 -0700 (PDT) Message-ID: <4CAA4287.9060808@gmail.com> Date: Mon, 04 Oct 2010 23:09:27 +0200 From: =?UTF-8?B?U2ltw7NuIFBlbmE=?= <spenap@gmail.com> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Grilo list <grilo-list@gnome.org> Subject: Re: [PATCH core 07/10] build: libgrlnet introspection References: <cover.1286219284.git.vjaquez@igalia.com> <36761f3da238a2e5b2434b2a8be01a960bc0004f.1286219284.git.vjaquez@igalia.com> In-Reply-To: <36761f3da238a2e5b2434b2a8be01a960bc0004f.1286219284.git.vjaquez@igalia.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 21:09:59 -0000 On 04/10/10 21:11, Víctor Manuel Jáquez Leal wrote: > Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> > --- > libs/net/Makefile.am | 30 ++++++++++++++++++++++++++++++ > 1 files changed, 30 insertions(+), 0 deletions(-) > > diff --git a/libs/net/Makefile.am b/libs/net/Makefile.am > index 16a92ba..86163bc 100644 > --- a/libs/net/Makefile.am > +++ b/libs/net/Makefile.am > @@ -49,3 +49,33 @@ MAINTAINERCLEANFILES = \ > *~ > > DISTCLEANFILES = $(MAINTAINERCLEANFILES) > +CLEANFILES = > + > +# introspection support > +if HAVE_INTROSPECTION > +-include $(INTROSPECTION_MAKEFILE) > +gir_headers = $(patsubst %,$(srcdir)/%, $(libgrlnet_@GRL_MAJORMINOR@include_HEADERS)) > +gir_sources = $(patsubst %,$(srcdir)/%, $(libgrlnet_@GRL_MAJORMINOR@_la_SOURCES)) > + > +INTROSPECTION_GIRS = > + > +introspection_sources = \ > + $(gir_headers) \ > + $(gir_sources) > + > +GrlNet-@GRL_MAJORMINOR@.gir: libgrlnet-@GRL_MAJORMINOR@.la > +GrlNet_0_1_gir_SCANNERFLAGS = --warn-all -v We need to bump the required introspection version to be able to use --warn-all > +GrlNet_0_1_gir_INCLUDES = GObject-2.0 Gio-2.0 > +GrlNet_0_1_gir_CFLAGS = -I$(top_srcdir)/libs $(libgrlnet_@GRL_MAJORMINOR@_la_CFLAGS) > +GrlNet_0_1_gir_LIBS = libgrlnet-@GRL_MAJORMINOR@.la > +GrlNet_0_1_gir_FILES = $(introspection_sources) > +INTROSPECTION_GIRS += GrlNet-@GRL_MAJORMINOR@.gir > + > +girdir = $(datadir)/gir-1.0 > +dist_gir_DATA = $(INTROSPECTION_GIRS) > + > +typelibdir = $(libdir)/girepository-1.0 > +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) > + > +CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) > +endif From spenap@gmail.com Mon Oct 4 21:13:05 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A69107500CC for <grilo-list@gnome.org>; Mon, 4 Oct 2010 21:13:05 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.846 X-Spam-Level: X-Spam-Status: No, score=-1.846 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077, TW_TK=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iAFyedIeuvlc for <grilo-list@gnome.org>; Mon, 4 Oct 2010 21:13:03 +0000 (UTC) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by menubar.gnome.org (Postfix) with ESMTP id 00E537500C5 for <grilo-list@gnome.org>; Mon, 4 Oct 2010 21:12:54 +0000 (UTC) Received: by wyb29 with SMTP id 29so5575382wyb.27 for <grilo-list@gnome.org>; Mon, 04 Oct 2010 14:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=m8EOlWY4VajIHGoxLWuTvivxP6bnZWpdmT+GG5mwtBo=; b=ckn39TopqB8TecIL8lZEMt26C68ciiUqLUUnMSbJ8Q29WYTJ4yLVW2frwV/Tnu0/1X sa4QpaLhWcr6P2Unz5VwLcj01fyOU0sw0U1scDtlx8qA6NqomA9O5hDo3nc2a8lDM5OO qbDE1CO3AJ4EIXdQup7rROFa6rbosOOCeWAuw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=Ti1WxD8ji87yaCNa20ScO8ROHNqAmGdqCf5xM77HM61PJbelRrYWigrIYpT+cvyn3M Vr4pdJ3ANCzQFhvY8KKeJypdJwHIHBVZ5oUxiVvlE1PaCoNuxdvwfr12IR3SO4FvvHN7 cFD3edj0bQgV4qRnpUC++5cU5Oc22CBnfFsuk= Received: by 10.227.142.75 with SMTP id p11mr8962708wbu.27.1286226772732; Mon, 04 Oct 2010 14:12:52 -0700 (PDT) Received: from [192.168.1.111] (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id w1sm3330903weq.25.2010.10.04.14.12.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 14:12:45 -0700 (PDT) Message-ID: <4CAA434A.70203@gmail.com> Date: Mon, 04 Oct 2010 23:12:42 +0200 From: =?UTF-8?B?U2ltw7NuIFBlbmE=?= <spenap@gmail.com> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Grilo list <grilo-list@gnome.org> Subject: Re: [PATCH core 08/10] wc: gtkdoc documentation References: <cover.1286219284.git.vjaquez@igalia.com> <756b9e309bbddb6a08503250b58f29f2a587fb73.1286219284.git.vjaquez@igalia.com> In-Reply-To: <756b9e309bbddb6a08503250b58f29f2a587fb73.1286219284.git.vjaquez@igalia.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 04 Oct 2010 21:13:05 -0000 On 04/10/10 21:11, Víctor Manuel Jáquez Leal wrote: > Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> > --- > libs/net/grl-net-wc.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ > libs/net/grl-net-wc.h | 23 ++++++++++++++ > 2 files changed, 100 insertions(+), 0 deletions(-) > > diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c > index 0d45e66..c4ce7d0 100644 > --- a/libs/net/grl-net-wc.c > +++ b/libs/net/grl-net-wc.c > @@ -22,6 +22,15 @@ > * > */ ... > @@ -382,12 +402,29 @@ get_url (GrlNetWc *self, > } > } > > +/** > + * grl_net_wc_new: > + * > + * Returns: (element-type Grl.NetWc): a new allocated instance of #GrlNetWc. > + * Do g_object_unref() after use it. > + */ > GrlNetWc * > grl_net_wc_new (void) > { > return g_object_new (GRL_TYPE_NET_WC, NULL); > } The annotation (element-type GrlNetWc) is not needed here. I'll read it in more depth tomorrow :) From vjaquez@igalia.com Tue Oct 5 14:13:26 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 908AA750915 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 14:13:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sBjMx1LwrY4k for <grilo-list@gnome.org>; Tue, 5 Oct 2010 14:13:24 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 9FF5A75068A for <grilo-list@gnome.org>; Tue, 5 Oct 2010 14:13:15 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiwGANPOqkxbdWOb/2dsb2JhbACUN45+wmiFRwQ X-IronPort-AV: E=Sophos;i="4.57,284,1283724000"; d="scan'208";a="290307662" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 05 Oct 2010 16:13:13 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P38GX-0004BC-3b for <grilo-list@gnome.org>; Tue, 05 Oct 2010 16:13:13 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P38GW-00047Y-WD for <grilo-list@gnome.org>; Tue, 05 Oct 2010 16:13:13 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P38Fl-0005yZ-SW for grilo-list@gnome.org; Tue, 05 Oct 2010 16:12:25 +0200 Date: Tue, 5 Oct 2010 16:12:25 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH core 0/2] enhance the pkg-config files Message-ID: <20101005141225.GB19463@lit.local.igalia.com> References: <cover.1286218769.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <cover.1286218769.git.vjaquez@igalia.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Tue, 05 Oct 2010 14:13:26 -0000 On Mon, Oct 04, 2010 at 09:03:55PM +0200, Víctor Manuel Jáquez Leal wrote: > Complete and enhance the the pkg-config of the project. > > Specially added GI information. > > Víctor Manuel Jáquez Leal (2): > build: improve gir support in grilo-0.1.pc > build: improve path definition in grilo-uninstalled.pc.in Pushed vmjl > > grilo-0.1.pc.in | 7 +++++-- > grilo-uninstalled.pc.in | 15 +++++++++------ > 2 files changed, 14 insertions(+), 8 deletions(-) > > _______________________________________________ > grilo-list mailing list > grilo-list@gnome.org > http://mail.gnome.org/mailman/listinfo/grilo-list From vjaquez@igalia.com Tue Oct 5 14:13:41 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6BF5C750932 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 14:13:41 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WxEFtjtYVp5g for <grilo-list@gnome.org>; Tue, 5 Oct 2010 14:13:39 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 50F9075068A for <grilo-list@gnome.org>; Tue, 5 Oct 2010 14:13:31 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiwGANPOqkxbdWOb/2dsb2JhbACUN45+wmiFRwQ X-IronPort-AV: E=Sophos;i="4.57,284,1283724000"; d="scan'208";a="290307727" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 05 Oct 2010 16:13:28 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P38Gm-0004BK-Ji for <grilo-list@gnome.org>; Tue, 05 Oct 2010 16:13:28 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P38Gm-00047h-FW for <grilo-list@gnome.org>; Tue, 05 Oct 2010 16:13:28 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P38G1-0005yh-CH for grilo-list@gnome.org; Tue, 05 Oct 2010 16:12:41 +0200 Date: Tue, 5 Oct 2010 16:12:41 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH core] vala: check for libvala-0.12 instead of vala-0.12 Message-ID: <20101005141241.GC19463@lit.local.igalia.com> References: <1286219198-7936-1-git-send-email-vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1286219198-7936-1-git-send-email-vjaquez@igalia.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Tue, 05 Oct 2010 14:13:41 -0000 On Mon, Oct 04, 2010 at 09:06:38PM +0200, Víctor Manuel Jáquez Leal wrote: > This is one of the risks to be living on the edge. > > Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> > --- > configure.ac | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) Pushed vmjl > > diff --git a/configure.ac b/configure.ac > index bfd0623..d8760ef 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -148,8 +148,8 @@ AC_ARG_ENABLE([vala], > [enable_vala=autodetect have_vala=yes]) > AC_MSG_RESULT([$enable_vala]) > if test "x$enable_vala" != "xno"; then > - PKG_CHECK_EXISTS([ vala-0.12 ], > - [ valapkg="vala-0.12" ], > + PKG_CHECK_EXISTS([ libvala-0.12 ], > + [ valapkg="libvala-0.12" ], > [ PKG_CHECK_EXISTS([ vala-0.10 ], > [ valapkg="vala-0.10" ], > [ PKG_CHECK_EXISTS([ vala-1.0 >= $VALA_REQS ], From spenap@gmail.com Tue Oct 5 18:20:03 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 663AF75011D for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:20:03 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.846 X-Spam-Level: X-Spam-Status: No, score=-1.846 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077, TW_TK=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iCTPZIXIM-Rb for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:20:00 +0000 (UTC) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by menubar.gnome.org (Postfix) with ESMTP id 452677500F1 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:19:51 +0000 (UTC) Received: by qyk35 with SMTP id 35so3255833qyk.6 for <grilo-list@gnome.org>; Tue, 05 Oct 2010 11:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=IbjBnNMe2Y5IRn+HHmfsSGcQYHCN+EKpvUT3nSmlOh4=; b=LZZTgOQtXmJuNCiWT0xVwbfxCHTVrljIFIoCcYqNWeRdKqE7HMOtK75OOXAk+U9tSB EUAHUY9howjqc4jWFfNT0WeM1A+JypEOoiYLnND0O35RTl8DvvDJp3JKZkHesuAdCuAD gKFv4lAeXS8ngLWtD5ZfOjSze8HwzKAS/2uao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=uByKtaVj2bPtuqia3+JRbvxu40sBIImH3gBb9f8mbOHmO2PvvoThIc1IQ8gUWKmocP zzKakcuC3/Jwqpj0WJffntcyqIWmgedoj9zyncbYn9PsngHUAyuctCW4t8j52aG/tlz3 m0BRAOWik/neXx1Da8/n7FjdqBA3ZokiQ/DKI= Received: by 10.229.84.204 with SMTP id k12mr8696628qcl.157.1286302790539; Tue, 05 Oct 2010 11:19:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.191.65 with HTTP; Tue, 5 Oct 2010 11:19:30 -0700 (PDT) In-Reply-To: <756b9e309bbddb6a08503250b58f29f2a587fb73.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> <756b9e309bbddb6a08503250b58f29f2a587fb73.1286219284.git.vjaquez@igalia.com> From: =?ISO-8859-1?Q?Sim=F3n_Pena_Placer?= <spenap@gmail.com> Date: Tue, 5 Oct 2010 20:19:30 +0200 Message-ID: <AANLkTinzL5XOVkZwkgJaorcmvEqRMgqGLWsqCun6Q3MH@mail.gmail.com> Subject: Re: [PATCH core 08/10] wc: gtkdoc documentation To: Grilo list <grilo-list@gnome.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Tue, 05 Oct 2010 18:20:03 -0000 Besides the element-type annotation I mentioned yesterday, there're a couple of typos 2010/10/4 V=EDctor Manuel J=E1quez Leal <vjaquez@igalia.com>: > Signed-off-by: V=EDctor Manuel J=E1quez Leal <vjaquez@igalia.com> > --- > =A0libs/net/grl-net-wc.c | =A0 77 +++++++++++++++++++++++++++++++++++++++= ++++++++++ > =A0libs/net/grl-net-wc.h | =A0 23 ++++++++++++++ > =A02 files changed, 100 insertions(+), 0 deletions(-) > > diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c > index 0d45e66..c4ce7d0 100644 > --- a/libs/net/grl-net-wc.c > +++ b/libs/net/grl-net-wc.c > @@ -22,6 +22,15 @@ > =A0* > =A0*/ > > +/** > + * SECTION:grl-net-wc > + * @short_description: small and simple HTTP client > + * > + * Most of the Grilo's sources need to access to web resources. The purp= ose of > + * this utility class is to provide an thin and lean mechanism for those= plugins > + * to interact with those resources. > + */ A* thin > =A0#ifdef HAVE_CONFIG_H > =A0#include "config.h" > =A0#endif > @@ -93,6 +102,11 @@ grl_net_wc_class_init (GrlNetWcClass *klass) > > =A0 g_type_class_add_private (klass, sizeof (GrlNetWcPrivate)); > > + =A0/** > + =A0 * GrlNetWc::loglevel > + =A0 * > + =A0 * The log lever for HTTP connections. This value is used by libsoup= . > + =A0 */ > =A0 g_object_class_install_property (g_klass, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PR= OP_LOG_LEVEL, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0g_= param_spec_uint ("loglevel", > @@ -102,6 +116,12 @@ grl_net_wc_class_init (GrlNetWcClass *klass) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 G_PARAM_READWRITE | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 G_PARAM_STATIC_STRINGS)); The log level* > +/** > + * grl_net_wc_request_finish: > + * @self: a #GrlNetWc instance > + * @result: The result of the request > + * @content: The contents of the resource > + * @length: (allow-none): The length of the contents or %NULL if it is n= ot > + * needed > + * @error: return location for a #GError, or %NULL > + * > + * Finishes an asynchronous load of the file's contents. > + * The contents are placed in contents, and length is set to the size of= the > + * contents string. > + * > + * The content address will be invalidated at the next request. So if yo= u > + * want to keep it, please copy it into another address. > + * > + * Returns: %TRUE if the request was successfull. If %FALSE a error occu= rred. > + */ > =A0gboolean > =A0grl_net_wc_request_finish (GrlNetWc *self, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0GAsyncResult *resu= lt, > @@ -437,6 +492,14 @@ end_func: > =A0 return ret; > =A0} If %FALSE an* error occurred > +/** > + * GrlNetWcClass: > + * @parent_class: the parent class structure > + * > + * Grilo web client helper class. > + * > + * It's a simple a thin web client for be used by the sources. > + */ > =A0struct _GrlNetWcClass { > > =A0 GObjectClass parent_class; It's a simple (and?) thin web client to be used by the sources From spenap@gmail.com Tue Oct 5 18:52:55 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 39DE1750192 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:52:55 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GHYvrNVoW1aa for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:52:53 +0000 (UTC) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by menubar.gnome.org (Postfix) with ESMTP id B943C750096 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:52:43 +0000 (UTC) Received: by wwb31 with SMTP id 31so6611931wwb.27 for <grilo-list@gnome.org>; Tue, 05 Oct 2010 11:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=HsHNP4YUtYRpGkTWIrrGG/YwCxI5wVWGP2dzuOHd3Eg=; b=lHfyZNSTPQl6fUH7s7wF7HBiyGSon28YJ4Y5UsExbHH4GGyDXgoocwAB8+MWy94tKI RF0b3HAPN91m6PWa1YBNeYj01qVO1CjtdrdBrt0jwmsMAWkocQAEwskMkE4oMz9XncPC f1Ocn8khDJkbryJZtYAqaUOvlDZJflWB+LLl0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=kFYWxv6gg/eliZTL3/sikxGwC08CObjEs9J19jobvehG7xb0wgCxhb0jfXTr4+tlZx xmTRh24xgWVGDc3cEImk25ZjH2Qd+i/FpIjhaI6X1/V6+wfRw2j19tyhnp4ndLT8GIOj xtesE1nka4wSB+I23Lx19IggnXarsSUJKgdFY= Received: by 10.216.188.209 with SMTP id a59mr1430108wen.87.1286304752751; Tue, 05 Oct 2010 11:52:32 -0700 (PDT) Received: from [192.168.1.111] (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id o84sm4128669wej.37.2010.10.05.11.52.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Oct 2010 11:52:31 -0700 (PDT) Message-ID: <4CAB73EB.2000209@gmail.com> Date: Tue, 05 Oct 2010 20:52:27 +0200 From: =?UTF-8?B?U2ltw7NuIFBlbmE=?= <spenap@gmail.com> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: grilo-list@gnome.org Subject: Re: [PATCH core 04/10] build: grilo-net pkg-config files References: <cover.1286219284.git.vjaquez@igalia.com> <de8a80d03013bf7d341819015938cb455f64ac0a.1286219284.git.vjaquez@igalia.com> In-Reply-To: <de8a80d03013bf7d341819015938cb455f64ac0a.1286219284.git.vjaquez@igalia.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Tue, 05 Oct 2010 18:52:55 -0000 On 04/10/10 21:11, Víctor Manuel Jáquez Leal wrote: > Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> > --- > grilo-net-0.1.pc.in | 15 +++++++++++++++ > grilo-net-uninstalled.pc.in | 15 +++++++++++++++ > 2 files changed, 30 insertions(+), 0 deletions(-) > create mode 100644 grilo-net-0.1.pc.in > create mode 100644 grilo-net-uninstalled.pc.in I'm missed the grilo-net-0.1.pc installation to test the plugins' changes. For that, I updated the main Makefile.am with pkgconfig_DATA += grilo-net-0.1.pc From spenap@gmail.com Tue Oct 5 18:53:14 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4C8AF750260 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:53:14 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.769 X-Spam-Level: X-Spam-Status: No, score=-1.769 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_KG=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aSZjrcya0SjB for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:53:12 +0000 (UTC) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by menubar.gnome.org (Postfix) with ESMTP id 4AB39750096 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 18:53:12 +0000 (UTC) Received: by gyg4 with SMTP id 4so3122349gyg.27 for <grilo-list@gnome.org>; Tue, 05 Oct 2010 11:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=x0PgWpqkgfcN22OwPivCIiDSU2EYp17p4A/CedD4b7s=; b=e6M78wRmXY3yU18Iz2q9f1AidDfyHzZ+Hpugz1dciKkLR2EYPQtRuvAnk6fS+rUK7o NepSaPYgUwyz6FNNcHinz0JqwIHt2TEuDC4V6YqkqlOqY1U3Xd5Htkkvarar2UcPP5mL br7LgzOWl/X/9aKa9j4gPtnCGg5lWcHoZOU+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=CmvNokycZnThx7vfGAmMh+EwRsWkzdZ6iSI3lybyZ6c5C/64QxYq9ao/kh1cg/xScm wYQvn8uOeRQgRJuReaUFqmKt0+vRS/MUaTUVFP1/Y1eWdcFFRXhnlo2svWt/o+JW3WXI FNB3j2wIJeajOz5rqmYJ4X8ATaeMvChi/hB6o= Received: by 10.229.84.204 with SMTP id k12mr8731532qcl.157.1286304790444; Tue, 05 Oct 2010 11:53:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.191.65 with HTTP; Tue, 5 Oct 2010 11:52:49 -0700 (PDT) In-Reply-To: <c7536ac94afddb1dccf5f51a99ae764fa778e7b2.1286219579.git.vjaquez@igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> <c7536ac94afddb1dccf5f51a99ae764fa778e7b2.1286219579.git.vjaquez@igalia.com> From: =?ISO-8859-1?Q?Sim=F3n_Pena_Placer?= <spenap@gmail.com> Date: Tue, 5 Oct 2010 20:52:49 +0200 Message-ID: <AANLkTikREpNCERiScm51jFgCBxd+YCntrN8C=ER=-1qj@mail.gmail.com> Subject: Re: [PATCH plugins 01/14] build: detect through pkgconfig grilo-net To: Grilo list <grilo-list@gnome.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Tue, 05 Oct 2010 18:53:14 -0000 2010/10/4 V=EDctor Manuel J=E1quez Leal <vjaquez@igalia.com>: > Signed-off-by: V=EDctor Manuel J=E1quez Leal <vjaquez@igalia.com> > --- > =A0configure.ac | =A0 =A05 +++++ > =A01 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/configure.ac b/configure.ac > index bcbb518..d8d6e67 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -55,6 +55,7 @@ else > =A0fi > > =A0GRL_NAME=3Dgrilo-${GRL_VERSION} > +GRLNET_NAME=3Dgrilo-net-${GRL_VERSION} > > =A0# ---------------------------------------------------------- > =A0# DEBUG SUPPORT > @@ -97,6 +98,10 @@ AC_SUBST(GRL_PLUGINS_CONF_DIR) > =A0# EXTERNAL/OPTIONAL DEPENDENCIES > =A0# ---------------------------------------------------------- > > +PKG_CHECK_MODULES([GRLNET], [${GRLNET_NAME} =3D 0.1.6], > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 HAVE_GRLNET=3Dyes, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 HAVE_GRLNET=3Dno) I get two trailing whitespaces: after "0.1.6]," and after "HAVE_GRLNET=3Dye= s," > =A0PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_XML=3Dyes, HAVE_XML=3Dno) > > =A0PKG_CHECK_MODULES(GIO, gio-2.0, HAVE_GIO=3Dyes, HAVE_GIO=3Dno) > -- > 1.7.1 > > _______________________________________________ > grilo-list mailing list > grilo-list@gnome.org > http://mail.gnome.org/mailman/listinfo/grilo-list > From spenap@gmail.com Tue Oct 5 19:10:51 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0337C750A0C for <grilo-list@gnome.org>; Tue, 5 Oct 2010 19:10:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Wq7e7pttvxi for <grilo-list@gnome.org>; Tue, 5 Oct 2010 19:10:48 +0000 (UTC) Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by menubar.gnome.org (Postfix) with ESMTP id 3DE7A7509C5 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 19:10:39 +0000 (UTC) Received: by wwb31 with SMTP id 31so6631502wwb.27 for <grilo-list@gnome.org>; Tue, 05 Oct 2010 12:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=dRZs1pWIxSTuKW+3q62kmV+/fgRc/DnQRrTtevLqB5E=; b=jchtVZ5W6IkwlKO00MrF8h8EJeZ6DUY1xqsSuR/S37hgB3TNdew47hgVsJ8fT/rCyl 9jqCyy/oJ4y5ogla75hQJckjt4wL5jUgzIjA4Bg+F2wxj0Cmpi1dU/3rouPm7Bw4IzMd /fdarcTOLZspd42mIYJWcGTm4EAsN4Cg01Ejc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=H/GXQ9W0P7kbH5aThnAFigSAmw87EXpl3QbPOiQHXOeSs7rdjY7J3oc3gUNgRafaBS RVf4NJgJW2WnEmhCB/kYG2JCqVrLhGWGSKiN6bYAOCiYkwQUZAYz+p69DredZPuAX3kq kCYq/oQnjpNrGitYwNydhDmGcXTKi+XohTyDQ= Received: by 10.216.154.133 with SMTP id h5mr9576673wek.93.1286305838115; Tue, 05 Oct 2010 12:10:38 -0700 (PDT) Received: from [192.168.1.111] (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id u11sm4142620weq.7.2010.10.05.12.10.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Oct 2010 12:10:37 -0700 (PDT) Message-ID: <4CAB7829.8090807@gmail.com> Date: Tue, 05 Oct 2010 21:10:33 +0200 From: =?UTF-8?B?U2ltw7NuIFBlbmE=?= <spenap@gmail.com> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: grilo-list@gnome.org Subject: Re: [PATCH core 02/10] wc: test app References: <cover.1286219284.git.vjaquez@igalia.com> <44359e31056801ac2855b7acb2bbe019911a9ee1.1286219284.git.vjaquez@igalia.com> In-Reply-To: <44359e31056801ac2855b7acb2bbe019911a9ee1.1286219284.git.vjaquez@igalia.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Tue, 05 Oct 2010 19:10:51 -0000 On 04/10/10 21:11, Víctor Manuel Jáquez Leal wrote: > Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> > --- > libs/net/wc-test.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 80 insertions(+), 0 deletions(-) > create mode 100644 libs/net/wc-test.c > > diff --git a/libs/net/wc-test.c b/libs/net/wc-test.c > new file mode 100644 > index 0000000..2721bc6 > --- /dev/null > +++ b/libs/net/wc-test.c > @@ -0,0 +1,80 @@ > +#include "grl-net-wc.h" > +#include <stdio.h> > + > +GMainLoop *loop; > +const gchar *uri; > + > +static void > +fetch_result (GObject *source, > + GAsyncResult *result, > + gpointer user_data) > +{ > + gchar *content; > + gsize length; > + GError *error = NULL; > + > + if (!grl_net_wc_request_finish (GRL_NET_WC (source), > + result, > + &content, > + &length, > + &error)) { > + g_print ("Error: %s\n", error->message); > + goto end_func; > + } > + > + fwrite (content, 1, length, stdout); This segfaults for me here when fwriting, when invoking the tests without arguments. Looks like the Yahoo address you're using by default replies with a 302 (Found [1]), and then content remains NULL. Passing another URL which doesn't result in a 302 works just fine. [1] http://tools.ietf.org/html/rfc2616#section-10.3.3 From spenap@gmail.com Tue Oct 5 19:11:59 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F15857502DB for <grilo-list@gnome.org>; Tue, 5 Oct 2010 19:11:58 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y6UOTwjfD7C0 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 19:11:57 +0000 (UTC) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by menubar.gnome.org (Postfix) with ESMTP id A19B8750260 for <grilo-list@gnome.org>; Tue, 5 Oct 2010 19:11:48 +0000 (UTC) Received: by wyb29 with SMTP id 29so7149935wyb.27 for <grilo-list@gnome.org>; Tue, 05 Oct 2010 12:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=kDLI0DtJFu4rGxDuHhveydV5OsuoKoRpqUA41jcFi54=; b=QH59B94geMSlSCYoVrFAOSZllTj3oF6EEq/UxZS1mDCJ/ZsQW0XkD4WzyfUMNonWa4 7DBhouWk56tLgH2ZvZSe1ncRvkqeJDYmSLqCxcWkxQKvXFhzy+xPxZ061lH5p8zjblqZ AzNGOH588Tm4pYXclf9AOiXKqmG/kDSiV2msU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=BTkVzkw5mdohhHLvy/znLG5NRaP2puX071vVlQkmAsawNB7beMTILal5/o+xQfZmxW 6u6Pzd4ypYXb7mZKriUZN7n2nTTLBlSrjXeLE4wegwXNVksZGuUTMVCQgLZwfaojFUsd CUhW3VCBpQ7TIzlVMUlUURpXItzkfqXH5EMBg= Received: by 10.216.188.132 with SMTP id a4mr9614664wen.61.1286305906398; Tue, 05 Oct 2010 12:11:46 -0700 (PDT) Received: from [192.168.1.111] (24.6.165.83.dynamic.mundo-r.com [83.165.6.24]) by mx.google.com with ESMTPS id p82sm4143879weq.3.2010.10.05.12.11.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Oct 2010 12:11:41 -0700 (PDT) Message-ID: <4CAB786A.5050702@gmail.com> Date: Tue, 05 Oct 2010 21:11:38 +0200 From: =?UTF-8?B?U2ltw7NuIFBlbmE=?= <spenap@gmail.com> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: grilo-list@gnome.org Subject: Re: [PATCH core 00/10] Grilo Net library References: <cover.1286219284.git.vjaquez@igalia.com> In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Tue, 05 Oct 2010 19:11:59 -0000 On 04/10/10 21:11, Víctor Manuel Jáquez Leal wrote: > This patch set add a new helper library: grl-net. The purpose of this > new helper library is to ease the development of plugins. > > Currently it only has an object: GrlNetWc, which is a simple and thin > web client. This web client will be enhanced later with cache > support. Other than the issues I mentioned, it works fine for me: tested grl-inspect, and both grilo-test-ui (C and Python's) without problems :) From jasuarez@igalia.com Wed Oct 6 17:41:11 2010 Return-Path: <jasuarez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C5F9E75017D for <grilo-list@gnome.org>; Wed, 6 Oct 2010 17:41:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.744 X-Spam-Level: X-Spam-Status: No, score=-1.744 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779, TW_GJ=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xO22zjZaW3yA for <grilo-list@gnome.org>; Wed, 6 Oct 2010 17:41:09 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id A24BF75006C for <grilo-list@gnome.org>; Wed, 6 Oct 2010 17:40:59 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEANZRrExbdWOb/2dsb2JhbACDHqAdtA+SGoEigzF0BI1C X-IronPort-AV: E=Sophos;i="4.57,291,1283724000"; d="scan'208";a="684962090" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 06 Oct 2010 19:40:58 +0200 Received: from [83.56.144.37] (helo=[192.168.50.20]) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim) id 1P3Xz8-0006Su-1f for <grilo-list@gnome.org>; Wed, 06 Oct 2010 19:40:58 +0200 Subject: Re: [PATCH 0/3] RFC: JavaScript alternative branch and GObject Introspection From: "Juan A. Suarez Romero" <jasuarez@igalia.com> To: grilo-list <grilo-list@gnome.org> In-Reply-To: <1286217240-17900-1-git-send-email-spenap@gmail.com> References: <1286217240-17900-1-git-send-email-spenap@gmail.com> Content-Type: text/plain; charset="UTF-8" Organization: Igalia, S.L. Date: Wed, 06 Oct 2010 19:40:44 +0200 Message-ID: <1286386844.7761.2.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: quoted-printable X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Wed, 06 Oct 2010 17:41:12 -0000 On Mon, 2010-10-04 at 20:33 +0200, Sim=C3=B3n Pena wrote: > What I suggest with this patches is to create a branch in the > repository: > either in gitorious or in the GNOME infrastructure. So, if I understand correctly, you propose pushing those patches to a branch because actually are more a hack than a final solution. In that case, I agree with making a gjs branch, so people can try (at their own risk) with this gjs bindings. > Besides, I think we > should close bug #616961 (about Grilo's lack of introspection data), > and > open a specific one about JavaScript's lack of support for GrlKeyIDs, > marking it as blocked by JavaScript's one. What do you think?=20 Yes, I agree. I think problems described in GB#61961 have been already fixed. J.A. From jasuarez@igalia.com Wed Oct 6 18:03:50 2010 Return-Path: <jasuarez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 8F6BE75017D for <grilo-list@gnome.org>; Wed, 6 Oct 2010 18:03:50 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iYnXRNh+r4D8 for <grilo-list@gnome.org>; Wed, 6 Oct 2010 18:03:48 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id E606975006C for <grilo-list@gnome.org>; Wed, 6 Oct 2010 18:03:39 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao0FAHZWrExbdWOb/2dsb2JhbACDH5EbjwK0ZpIagSKDMXQEjUI X-IronPort-AV: E=Sophos;i="4.57,291,1283724000"; d="scan'208";a="684967763" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 06 Oct 2010 20:03:37 +0200 Received: from [83.56.144.37] (helo=[192.168.50.20]) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim) id 1P3YL3-0006ra-Af for <grilo-list@gnome.org>; Wed, 06 Oct 2010 20:03:37 +0200 Subject: Re: [PATCH core 00/10] Grilo Net library From: "Juan A. Suarez Romero" <jasuarez@igalia.com> To: grilo-list@gnome.org In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> Content-Type: text/plain; charset="UTF-8" Organization: Igalia, S.L. Date: Wed, 06 Oct 2010 20:03:23 +0200 Message-ID: <1286388203.7761.12.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: quoted-printable X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Wed, 06 Oct 2010 18:03:50 -0000 On Mon, 2010-10-04 at 21:11 +0200, V=C3=ADctor Manuel J=C3=A1quez Leal wrot= e: > This patch set add a new helper library: grl-net. The purpose of this > new helper library is to ease the development of plugins. First of all, good job! This will improve plugins performance. Now, my doubt (or better said, clarification), is where this library should belong. The library provides an utility for plugins writers, but it doesn't provide a core functionality. And like this interesting but optional functionality, maybe in future new utilities can arise. So my question is if we should keep them in the same grilo core, or just having it completely separated as we have the plugins. It is not that I'm against having it in the core, but just to explicitly know others opinions about this issue. J.A. From vjaquez@igalia.com Fri Oct 8 13:24:19 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3FF9C750C07 for <grilo-list@gnome.org>; Fri, 8 Oct 2010 13:24:19 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4tc0yl7uQqJ5 for <grilo-list@gnome.org>; Fri, 8 Oct 2010 13:24:16 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id E189C750C0C for <grilo-list@gnome.org>; Fri, 8 Oct 2010 13:24:07 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhAFAAeIrkxbdWOb/2dsb2JhbACURY5ruXGFRwQ X-IronPort-AV: E=Sophos;i="4.57,302,1283724000"; d="scan'208";a="768142069" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 08 Oct 2010 11:56:34 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P49go-0007sM-5h for <grilo-list@gnome.org>; Fri, 08 Oct 2010 11:56:34 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P49gk-0001b2-H9; Fri, 08 Oct 2010 11:56:30 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P49gk-0002PV-8S; Fri, 08 Oct 2010 11:56:30 +0200 Date: Fri, 8 Oct 2010 11:56:30 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH core 00/10] Grilo Net library Message-ID: <20101008095630.GA3573@lit.local.igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> <1286388203.7761.12.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1286388203.7761.12.camel@localhost> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Fri, 08 Oct 2010 13:24:19 -0000 On Wed, Oct 06, 2010 at 08:03:23PM +0200, Juan A. Suarez Romero wrote: > On Mon, 2010-10-04 at 21:11 +0200, Víctor Manuel Jáquez Leal wrote: > > This patch set add a new helper library: grl-net. The purpose of this > > new helper library is to ease the development of plugins. > > First of all, good job! This will improve plugins performance. Thanks. > Now, my doubt (or better said, clarification), is where this library > should belong. > > The library provides an utility for plugins writers, but it doesn't > provide a core functionality. And like this interesting but optional > functionality, maybe in future new utilities can arise. > > So my question is if we should keep them in the same grilo core, or just > having it completely separated as we have the plugins. I wouldn't go to have another project just for plugins' utilities, that would imply much more effort in something that maybe won't worth. In the future, if we see that these utils make more sense as isolated library, we could decouple it. But for now, I think this is the right path. > > It is not that I'm against having it in the core, but just to explicitly > know others opinions about this issue. Agree. I'll wait for the Iago's ACK before push vmjl > > J.A. > > > _______________________________________________ > grilo-list mailing list > grilo-list@gnome.org > http://mail.gnome.org/mailman/listinfo/grilo-list From itoral@igalia.com Mon Oct 11 05:42:13 2010 Return-Path: <itoral@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 32C667500B4 for <grilo-list@gnome.org>; Mon, 11 Oct 2010 05:42:13 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3FivLGsbWtcL for <grilo-list@gnome.org>; Mon, 11 Oct 2010 05:42:10 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 398087500A7 for <grilo-list@gnome.org>; Mon, 11 Oct 2010 05:42:01 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AscRAIdAskxbdWOb/2dsb2JhbACDH4Y0mSmtD5FVgSKDMnQEikE X-IronPort-AV: E=Sophos;i="4.57,312,1283724000"; d="scan'208";a="686004589" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 11 Oct 2010 07:41:58 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P5B94-00086M-TH for <grilo-list@gnome.org>; Mon, 11 Oct 2010 07:41:58 +0200 Received: from webmail.local.igalia.com ([192.168.10.123] helo=webmail.igalia.com) by mail.igalia.com with smtp (Exim) id 1P5B93-0001PS-UJ; Mon, 11 Oct 2010 07:41:57 +0200 Received: (nullmailer pid 27403 invoked by uid 33); Mon, 11 Oct 2010 05:41:52 -0000 To: =?UTF-8?Q?V=C3=ADctor_M=2E_J=C3=A1quez_L=2E?= <vjaquez@igalia.com> Subject: Re: [PATCH core 00/10] Grilo Net library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 11 Oct 2010 05:41:52 +0000 From: Iago Toral <itoral@igalia.com> In-Reply-To: <20101008095630.GA3573@lit.local.igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> <1286388203.7761.12.camel@localhost> <20101008095630.GA3573@lit.local.igalia.com> Message-ID: <69eb956f820c92dd3b4756b96f105fe0@igalia.com> X-Sender: itoral@igalia.com User-Agent: Roundcube Webmail/0.4.1 Cc: grilo-list@gnome.org X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Mon, 11 Oct 2010 05:42:13 -0000 On Fri, 8 Oct 2010 11:56:30 +0200, Víctor M. Jáquez L. <vjaquez@igalia.com> wrote: > On Wed, Oct 06, 2010 at 08:03:23PM +0200, Juan A. Suarez Romero > wrote: >> On Mon, 2010-10-04 at 21:11 +0200, Víctor Manuel Jáquez Leal wrote: ... >> >> It is not that I'm against having it in the core, but just to >> explicitly >> know others opinions about this issue. > > Agree. I'll wait for the Iago's ACK before push > I think its is ok to put this in the core as well. Iago From vjaquez@igalia.com Wed Oct 13 11:09:06 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 476A8750284 for <grilo-list@gnome.org>; Wed, 13 Oct 2010 11:09:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OGSV1uhB4ShY for <grilo-list@gnome.org>; Wed, 13 Oct 2010 11:09:04 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 23F157500F7 for <grilo-list@gnome.org>; Wed, 13 Oct 2010 11:08:55 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYFALMvtUxbdWOb/2dsb2JhbACTV45mux+FSAQ X-IronPort-AV: E=Sophos;i="4.57,324,1283724000"; d="scan'208";a="292259111" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 13 Oct 2010 13:08:53 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P5zCX-0002Rd-NT for <grilo-list@gnome.org>; Wed, 13 Oct 2010 13:08:53 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P5zCX-0004Di-Ik for <grilo-list@gnome.org>; Wed, 13 Oct 2010 13:08:53 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P5zCX-0000C5-LQ for grilo-list@gnome.org; Wed, 13 Oct 2010 13:08:53 +0200 Date: Wed, 13 Oct 2010 13:08:53 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: update to vala bindings Message-ID: <20101013110853.GA10065@lit.local.igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Wed, 13 Oct 2010 11:09:06 -0000 I'd just pushed a couple updates to the vala bindings. No big deal, added a missing symbol and fixed an instance position in a callback. vmjl From vjaquez@igalia.com Thu Oct 14 17:45:18 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 96F78750180 for <grilo-list@gnome.org>; Thu, 14 Oct 2010 17:45:18 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cGnTFI7hgrMM for <grilo-list@gnome.org>; Thu, 14 Oct 2010 17:45:16 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 1FAFD750172 for <grilo-list@gnome.org>; Thu, 14 Oct 2010 17:45:07 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkkFAAPetkxbdWOb/2dsb2JhbACTMI5rwSyFSAQ X-IronPort-AV: E=Sophos;i="4.57,331,1283724000"; d="scan'208";a="687180779" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 14 Oct 2010 19:45:02 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P6RrS-0005dk-Gv for <grilo-list@gnome.org>; Thu, 14 Oct 2010 19:45:02 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P6RrS-0004Cv-AW for <grilo-list@gnome.org>; Thu, 14 Oct 2010 19:45:02 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P6RrS-0002CM-2p for grilo-list@gnome.org; Thu, 14 Oct 2010 19:45:02 +0200 Date: Thu, 14 Oct 2010 19:45:02 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH core 00/10] Grilo Net library Message-ID: <20101014174502.GA27146@lit.local.igalia.com> References: <cover.1286219284.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <cover.1286219284.git.vjaquez@igalia.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Thu, 14 Oct 2010 17:45:18 -0000 On Mon, Oct 04, 2010 at 09:11:51PM +0200, Víctor Manuel Jáquez Leal wrote: > This patch set add a new helper library: grl-net. The purpose of this > new helper library is to ease the development of plugins. > > Currently it only has an object: GrlNetWc, which is a simple and thin > web client. This web client will be enhanced later with cache > support. I've pushed this patch set with the fixes requested in the comments. Also added vala vapi generation. <snip> vmjl From vjaquez@igalia.com Thu Oct 14 17:46:28 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7868E750180 for <grilo-list@gnome.org>; Thu, 14 Oct 2010 17:46:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QA0aT66oflxU for <grilo-list@gnome.org>; Thu, 14 Oct 2010 17:46:26 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id CAAC0750172 for <grilo-list@gnome.org>; Thu, 14 Oct 2010 17:46:17 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkkFAC7ftkxbdWOb/2dsb2JhbACTMI5rwRmFSAQ X-IronPort-AV: E=Sophos;i="4.57,331,1283724000"; d="scan'208";a="689695605" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 14 Oct 2010 19:46:14 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P6Rsc-0005ec-OB for <grilo-list@gnome.org>; Thu, 14 Oct 2010 19:46:14 +0200 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P6Rsc-0004EI-K3 for <grilo-list@gnome.org>; Thu, 14 Oct 2010 19:46:14 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P6Rsc-0002Ca-Cx for grilo-list@gnome.org; Thu, 14 Oct 2010 19:46:14 +0200 Date: Thu, 14 Oct 2010 19:46:14 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH plugins 00/14] Use of GrlNet in plugins Message-ID: <20101014174614.GB27146@lit.local.igalia.com> References: <cover.1286219579.git.vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <cover.1286219579.git.vjaquez@igalia.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Thu, 14 Oct 2010 17:46:28 -0000 On Mon, Oct 04, 2010 at 09:16:10PM +0200, Víctor Manuel Jáquez Leal wrote: > These patch series are the implementation of the GrlNetWc among all > the plugins which do async web requests. > > In order to implement this, several plugins need a private structure > which had to be refactored. Pushed vmjl From spenap@gmail.com Wed Oct 20 08:56:35 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 740BA75018B for <grilo-list@gnome.org>; Wed, 20 Oct 2010 08:56:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id urLg+sE6poyT for <grilo-list@gnome.org>; Wed, 20 Oct 2010 08:56:33 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id 9A75975016E for <grilo-list@gnome.org>; Wed, 20 Oct 2010 08:56:23 +0000 (UTC) Received: by bwz15 with SMTP id 15so1076857bwz.27 for <grilo-list@gnome.org>; Wed, 20 Oct 2010 01:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Hw8LU//0nouOhBYo84N/t+n2dec48yoj5GSU406+0X4=; b=P3lXm0P96EdeUy5CgI+cBXJZBNyLdLhdtENVSpJwUBs2hAHEIFiih57xofd1eqG4Ct SVQ9xePQpBwlwkNecKfx5v+2ihRXU7OBrzW/CTrlQcJpkE49xX9cJjGYmHY39pMvjZ+7 VnGIi7vxLyg6TWLXPeya0ZTQBf++HpTOk+kPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=BjD70hr4GSLeHL3Ct3MAD+6sNlTOVtmui1xxJc2l+xxyWJnBEF5bjdXhrCYqUWy28G QgEmkp4OtUgC23ba4mjBi+z1pumJrCQRq3VztMSsJWFJXQIIgyEQ5YJbuHVR/N9JzeR7 lCGhNP89E1xrcg747Z1H5jVqIG02qGo1/3Mh8= Received: by 10.204.29.23 with SMTP id o23mr6765125bkc.13.1287564981510; Wed, 20 Oct 2010 01:56:21 -0700 (PDT) Received: from [85.130.18.233] (85-130-18-233.2073208125.ddns.cablebg.net [85.130.18.233]) by mx.google.com with ESMTPS id r21sm11072033bkj.10.2010.10.20.01.56.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 Oct 2010 01:56:20 -0700 (PDT) Message-ID: <4CBEAEB2.4010804@gmail.com> Date: Wed, 20 Oct 2010 11:56:18 +0300 From: =?UTF-8?B?U2ltw7NuIFBlbmE=?= <spenap@gmail.com> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4 MIME-Version: 1.0 To: Grilo list <grilo-list@gnome.org> Subject: Re: [PATCH 0/2] Reworked GrlMetadataSource's filters References: <1286212741-10120-1-git-send-email-spenap@gmail.com> In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Wed, 20 Oct 2010 08:56:35 -0000 Hi, On 04/10/10 20:18, Simón Pena wrote: > Hi, > > The following patches > > * Rework the GrlMetadataSource's filter methods, by extracting common > behavior into a generic filtering function > * Update the GrlMetadataSource's filter tests so that they check specific > behavior instead of just the "instrospectable" status > > Simón Pena (2): > core: reworked GrlMetadataSource's filter methods > tests: updated GrlMetadataSource filter tests > > src/grl-metadata-source.c | 142 +++++++++++----------------------- > tests/python/test_metadata_source.py | 18 ++++- > 2 files changed, 59 insertions(+), 101 deletions(-) > Looks like these patches got lost after GrlNet's ones. What do you think about them? Is the rewriting OK? From spenap@gmail.com Wed Oct 20 08:58:48 2010 Return-Path: <spenap@gmail.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 05D1C7501C0 for <grilo-list@gnome.org>; Wed, 20 Oct 2010 08:58:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wpyGawqq1qWR for <grilo-list@gnome.org>; Wed, 20 Oct 2010 08:58:45 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id AD45F75010A for <grilo-list@gnome.org>; Wed, 20 Oct 2010 08:58:36 +0000 (UTC) Received: by bwz15 with SMTP id 15so1078108bwz.27 for <grilo-list@gnome.org>; Wed, 20 Oct 2010 01:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=RGLqXCKG6LGSCJySDO0BV7eI5wr06ZPKzf1RmZNqO+E=; b=DzpHQq86MK1U3HEPb/BHuyqOFp1L6MLsJRklXXOn/Klqibm9/d+D8o+06cuCEEEwOe eeRh6ZZhMJ09HFDiSsGOGLuwdOHp5cT1PEZMnzE7cHTwLiYq0/vNUOwWiKaSYr9hQS+4 mDgAIlMblEAD3MhCscQg1aKIdlXSdYEonzrEM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=sP4vvvNl35RZ8YLe7TeBQlAABvJQu+9UABPskR3iHIzaiLICO25TmGRsAYJP4a24Fo uLd2r7Sz9wmpN0jGe6bm7HoptC8l8kLgV9W9ybhm8WOG8CH3J+7xDbnaI+olgcsLugN9 Qda9WuYaQEyBsHpHd5olBvk2hcY3whxyon/qI= Received: by 10.204.68.136 with SMTP id v8mr1418459bki.188.1287565114667; Wed, 20 Oct 2010 01:58:34 -0700 (PDT) Received: from [85.130.18.233] (85-130-18-233.2073208125.ddns.cablebg.net [85.130.18.233]) by mx.google.com with ESMTPS id a25sm16777821bks.8.2010.10.20.01.58.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 Oct 2010 01:58:34 -0700 (PDT) Message-ID: <4CBEAF38.7040809@gmail.com> Date: Wed, 20 Oct 2010 11:58:32 +0300 From: =?UTF-8?B?U2ltw7NuIFBlbmE=?= <spenap@gmail.com> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4 MIME-Version: 1.0 To: Grilo list <grilo-list@gnome.org> Subject: Re: [PATCH 0/2] Tested plugin configuration from GI References: <1286211912-9670-1-git-send-email-spenap@gmail.com> In-Reply-To: <1286211912-9670-1-git-send-email-spenap@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Wed, 20 Oct 2010 08:58:48 -0000 Hi, On 04/10/10 20:05, Simón Pena wrote: > Hi all, > > These patches fix and test GrlConfig in the GI realm. > > For that, grl_config_new annotations are updated to allow NULL > sources (which enables plugin-wide configuration), and the > transfer mode is set to 'none', as the configuration shouldn't > be freed while the plugin is still active. > > Then, Python's grilo-test-ui has been updated to configure > Flickr, Youtube and Vimeo plugins. > > Simón Pena (2): > annotations: fixed GrlConfig annotations > python: added plugin configuration to grilo-test-ui > > src/data/grl-config.c | 6 ++++-- > tools/python/grilo-test-ui.py | 34 ++++++++++++++++++++++++++++++++++ > 2 files changed, 38 insertions(+), 2 deletions(-) > The same happened to these patches. They should be OK to push, but I'd like to be sure that it's OK not freeing the configuration with the plugin still active. From vjaquez@igalia.com Thu Oct 21 13:46:58 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id ADCD37501C7 for <grilo-list@gnome.org>; Thu, 21 Oct 2010 13:46:58 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cGKT+Cc2Hq1R for <grilo-list@gnome.org>; Thu, 21 Oct 2010 13:46:56 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 8D5EE7501BB for <grilo-list@gnome.org>; Thu, 21 Oct 2010 13:46:46 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlEFAH/gv0xbdWOb/2dsb2JhbACDHZBKjmOucpF9gSKDNHQEik2DBA X-IronPort-AV: E=Sophos;i="4.58,217,1286143200"; d="scan'208";a="772194893" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 21 Oct 2010 15:46:40 +0200 Received: from [192.168.12.206] (helo=lit.local.igalia.com) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P8vTZ-0005TQ-6n for <grilo-list@gnome.org>; Thu, 21 Oct 2010 15:46:37 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P8vTW-0001Bu-C8 for grilo-list@gnome.org; Thu, 21 Oct 2010 15:46:34 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH] core: fix when no slow/writable keys available Date: Thu, 21 Oct 2010 15:46:33 +0200 Message-Id: <1287668793-4541-1-git-send-email-vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Thu, 21 Oct 2010 13:46:58 -0000 When the source doesn't have slow/writable keys (empty set) the key list is not filtered. This patch set to NULL the filtered key list, and the returned complement is the passed key list. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/grl-metadata-source.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c index 8395dbf..cbb56c0 100644 --- a/src/grl-metadata-source.c +++ b/src/grl-metadata-source.c @@ -795,8 +795,10 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source, slow_keys = grl_metadata_source_slow_keys (source); if (!slow_keys) { + GList *_keys = *keys; + *keys = NULL; if (return_filtered) { - return g_list_copy (*keys); + return _keys; } else { return NULL; } @@ -832,8 +834,10 @@ grl_metadata_source_filter_writable (GrlMetadataSource *source, writable_keys = grl_metadata_source_writable_keys (source); if (!writable_keys) { + GList *_keys = *keys; + *keys = NULL; if (return_filtered) { - return g_list_copy (*keys); + return _keys; } else { return NULL; } -- 1.7.1 From vjaquez@igalia.com Fri Oct 22 16:31:37 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 00339750122 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:31:36 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fi-v3xwFhQSQ for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:31:34 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 32B8C7500A5 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:31:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlAFALVYwUxbdWOb/2dsb2JhbACTcY5jwSOFSgSNUQ X-IronPort-AV: E=Sophos;i="4.58,224,1286143200"; d="scan'208";a="772665267" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 22 Oct 2010 18:31:23 +0200 Received: from [192.168.12.206] (helo=lit.local.igalia.com) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P9KWZ-0007Lx-5N for <grilo-list@gnome.org>; Fri, 22 Oct 2010 18:31:23 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P9KWY-0005RJ-Af for grilo-list@gnome.org; Fri, 22 Oct 2010 18:31:22 +0200 Date: Fri, 22 Oct 2010 18:31:22 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH] core: fix when no slow/writable keys available Message-ID: <20101022163122.GB8542@lit.local.igalia.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> <1287668793-4541-1-git-send-email-vjaquez@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1287668793-4541-1-git-send-email-vjaquez@igalia.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Fri, 22 Oct 2010 16:31:37 -0000 On Thu, Oct 21, 2010 at 03:46:33PM +0200, Víctor Manuel Jáquez Leal wrote: > When the source doesn't have slow/writable keys (empty set) the key list is > not filtered. > > This patch set to NULL the filtered key list, and the returned complement is > the passed key list. This one is obsolete in favor of the next ones. [snip] From vjaquez@igalia.com Fri Oct 22 16:32:09 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 51F0875013A for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T5pX6HXkHW+O for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:06 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 1F83B7500A5 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:31:57 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEALVYwUxbdWOb/2dsb2JhbACDHp82rzKRcYEieII8dASKTYME X-IronPort-AV: E=Sophos;i="4.58,224,1286143200"; d="scan'208";a="772665385" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 22 Oct 2010 18:31:52 +0200 Received: from [192.168.12.206] (helo=lit.local.igalia.com) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P9KX2-0007M7-Q0 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 18:31:52 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P9KX2-0005Rr-5t for grilo-list@gnome.org; Fri, 22 Oct 2010 18:31:52 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH 1/3] tests: key filter gtests for GrlMetadataSource Date: Fri, 22 Oct 2010 18:31:50 +0200 Message-Id: <1287765112-20917-1-git-send-email-vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Fri, 22 Oct 2010 16:32:09 -0000 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- tests/.gitignore | 1 + tests/Makefile.am | 4 + tests/metadata_source.c | 180 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 185 insertions(+), 0 deletions(-) create mode 100644 tests/metadata_source.c diff --git a/tests/.gitignore b/tests/.gitignore index 14bc599..615007e 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1 +1,2 @@ registry +metadata_source diff --git a/tests/Makefile.am b/tests/Makefile.am index ab52607..91d2bcd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,6 +15,10 @@ TEST_PROGS = registry registry_SOURCES = registry.c registry_LDADD = $(progs_ldadd) +TEST_PROGS += metadata_source +metadata_source_SOURCES = metadata_source.c +metadata_source_LDADD = $(progs_ldadd) + ### testing rules (from glib) GTESTER = gtester diff --git a/tests/metadata_source.c b/tests/metadata_source.c new file mode 100644 index 0000000..f636083 --- /dev/null +++ b/tests/metadata_source.c @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2010 Víctor M. Jáquez Leal <vjaquez@igalia.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#include <glib.h> +#include <grilo.h> +#include <stdbool.h> + +GList *sources; +const GList *keys; + +/* #define DUMP 1 */ + +#if GLIB_CHECK_VERSION(2,22,0) + +#include <string.h> /* for strstr */ + +#define CHECK_MESSAGE(domain, error_message) \ + (g_strcmp0 (log_domain, domain) == 0 && strstr (message, error_message)) + +static gboolean +registry_load_error_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data) +{ + if (CHECK_MESSAGE ("Grilo", "Failed to initialize plugin") || + CHECK_MESSAGE ("Grilo", "Configuration not provided") || + CHECK_MESSAGE ("Grilo", "Missing configuration") || + CHECK_MESSAGE ("Grilo", "Could not open plugin directory") || + CHECK_MESSAGE ("Grilo", "Could not read XML file")) { + return FALSE; + } + + return TRUE; +} + +#endif + +static bool +load_metadata_sources () +{ + GrlPluginRegistry *reg; + + reg = grl_plugin_registry_get_default (); + if (!reg) + return false; + +#if GLIB_CHECK_VERSION(2,22,0) + g_test_log_set_fatal_handler (registry_load_error_handler, NULL); +#endif + + if (!grl_plugin_registry_load_all (reg)) + return false; + + keys = grl_plugin_registry_get_metadata_keys (reg); + if (!keys) + return false; + + sources = grl_plugin_registry_get_sources (reg, false); + if (!sources) + return false; + + return true; +} + +#if DUMP +static void +print_keys (GrlMetadataSource *source, + GList *keys) +{ + GList *iter; + + g_print ("%s:\n", grl_metadata_source_get_name (source)); + for (iter = keys; iter; iter = g_list_next (iter)) { + g_print ("\t%s\n", g_param_spec_get_name (iter->data)); + } +} +#endif + +enum filter_types { SUPPORTED, SLOW, WRITABLE, LAST_FILTER }; + +typedef GList* (*KeyFilterFunc) (GrlMetadataSource *source, + GList **keys, + gboolean return_filtered); + +KeyFilterFunc key_filter[LAST_FILTER] = { + grl_metadata_source_filter_supported, + grl_metadata_source_filter_slow, + grl_metadata_source_filter_writable +}; + +static void +test_key_filters (enum filter_types filter) +{ + GList *iter; + unsigned int keys_num; + + keys_num = g_list_length (keys); + + for (iter = sources; iter; iter = g_list_next (iter)) { + GList *filtered, *unfiltered; + GrlMetadataSource *source; + unsigned int fil_num, unfil_num; + + source = GRL_METADATA_SOURCE (iter->data); + filtered = g_list_copy (keys); + unfiltered = key_filter[filter] (source, &filtered, true); + +#if DUMP + print_keys (source, filtered); +#endif + + fil_num = g_list_length (filtered); + unfil_num = g_list_length (unfiltered); + + g_list_free (filtered); + g_list_free (unfiltered); + + g_assert_cmpuint (fil_num + unfil_num, ==, keys_num); + } +} + +static void +test_metadata_source_supported_keys (void) +{ + test_key_filters (SUPPORTED); +} + +static void +test_metadata_source_slow_keys (void) +{ + test_key_filters (SLOW); +} + +static void +test_metadata_source_writable_keys (void) +{ + test_key_filters (WRITABLE); +} + +int +main (int argc, char **argv) +{ + /* initialize the gtester */ + g_test_init (&argc, &argv, NULL); + + /* initialize grilo */ + grl_init (&argc, &argv); + + g_assert (load_metadata_sources ()); + + /* registry tests */ + g_test_add_func ("/metadata_source/filter_supported_keys", + test_metadata_source_supported_keys); + + g_test_add_func ("/metadata_source/filter_slow_keys", + test_metadata_source_slow_keys); + + g_test_add_func ("/metadata_source/filter_writable_keys", + test_metadata_source_writable_keys); + + return g_test_run (); +} -- 1.7.1 From vjaquez@igalia.com Fri Oct 22 16:32:09 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D6EC97500A5 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IOyi2oOVdg0d for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:07 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 60619750123 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:07 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlEFALVYwUxbdWOb/2dsb2JhbACDHpBTjmOvMpFxgSKDNHQEik2DBA X-IronPort-AV: E=Sophos;i="4.58,224,1286143200"; d="scan'208";a="772665387" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 22 Oct 2010 18:31:52 +0200 Received: from [192.168.12.206] (helo=lit.local.igalia.com) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P9KX2-0007MC-To for <grilo-list@gnome.org>; Fri, 22 Oct 2010 18:31:52 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P9KX2-0005Rt-9N for grilo-list@gnome.org; Fri, 22 Oct 2010 18:31:52 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH 2/3] core: fix when no slow/writable keys available Date: Fri, 22 Oct 2010 18:31:51 +0200 Message-Id: <1287765112-20917-2-git-send-email-vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Fri, 22 Oct 2010 16:32:10 -0000 When the source doesn't have slow/writable keys (empty set) the key list is not filtered. Also, that code is repeated in each filter type. This patch set to NULL the filtered key list, and the returned complement is the passed key list. The code is isolated in the generic_filter() too. Finally, added a description of the function. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/grl-metadata-source.c | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c index 8395dbf..3d9625d 100644 --- a/src/grl-metadata-source.c +++ b/src/grl-metadata-source.c @@ -497,6 +497,15 @@ analyze_keys_to_write (GrlMetadataSource *source, return maps; } +/** + * This method will _intersect two key lists_: + * + * @keys_to_filter: user provided set we want to filter leaving only the keys that + * intersects with the @source_keys set. + * @source_keys: the %GrlMetadataSource<!-- -->'s key set + * if @return_filtered is %TRUE a copy of the filtered set *complement* will be + * returned (a list of the filtered out keys). + */ static GList * generic_filter (GrlMetadataSource *source, GList **keys_to_filter, @@ -509,6 +518,13 @@ generic_filter (GrlMetadataSource *source, gboolean got_match; GrlKeyID filtered_key; + if (!source_keys) { + if (return_filtered) + filtered_keys = *keys_to_filter; + *keys_to_filter = NULL; + goto end_func; + } + iter_source_keys = (GList *) source_keys; while (iter_source_keys) { got_match = FALSE; @@ -535,6 +551,7 @@ generic_filter (GrlMetadataSource *source, } } +end_func: return filtered_keys; } @@ -794,13 +811,6 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source, g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), NULL); slow_keys = grl_metadata_source_slow_keys (source); - if (!slow_keys) { - if (return_filtered) { - return g_list_copy (*keys); - } else { - return NULL; - } - } return generic_filter (source, keys, return_filtered, slow_keys); } @@ -831,13 +841,6 @@ grl_metadata_source_filter_writable (GrlMetadataSource *source, g_return_val_if_fail (keys != NULL, NULL); writable_keys = grl_metadata_source_writable_keys (source); - if (!writable_keys) { - if (return_filtered) { - return g_list_copy (*keys); - } else { - return NULL; - } - } return generic_filter (source, keys, return_filtered, writable_keys); } -- 1.7.1 From vjaquez@igalia.com Fri Oct 22 16:32:13 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7AEC4750185 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:13 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bVgLj2QGjBsI for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:08 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id 4083F75012E for <grilo-list@gnome.org>; Fri, 22 Oct 2010 16:32:08 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlEFALVYwUxbdWOb/2dsb2JhbACDHpBTjmOvMpFxgSKDNHQEik2DBIF9 X-IronPort-AV: E=Sophos;i="4.58,224,1286143200"; d="scan'208";a="772665388" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 22 Oct 2010 18:31:53 +0200 Received: from [192.168.12.206] (helo=lit.local.igalia.com) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P9KX3-0007MH-1M for <grilo-list@gnome.org>; Fri, 22 Oct 2010 18:31:53 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P9KX2-0005Rv-Da for grilo-list@gnome.org; Fri, 22 Oct 2010 18:31:52 +0200 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: [PATCH 3/3] core: rename generic_filter() into filter_key_list() Date: Fri, 22 Oct 2010 18:31:52 +0200 Message-Id: <1287765112-20917-3-git-send-email-vjaquez@igalia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Fri, 22 Oct 2010 16:32:13 -0000 It makes more sense. I would like to name it something like intersect_key_list() but the function parameters doesn't follow a logical structure for that, so I adhered to the filter semantic. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> --- src/grl-metadata-source.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c index 3d9625d..6828c88 100644 --- a/src/grl-metadata-source.c +++ b/src/grl-metadata-source.c @@ -507,10 +507,10 @@ analyze_keys_to_write (GrlMetadataSource *source, * returned (a list of the filtered out keys). */ static GList * -generic_filter (GrlMetadataSource *source, - GList **keys_to_filter, - gboolean return_filtered, - const GList *source_keys) +filter_key_list (GrlMetadataSource *source, + GList **keys_to_filter, + gboolean return_filtered, + const GList *source_keys) { GList *iter_source_keys; GList *iter_keys; @@ -783,7 +783,7 @@ grl_metadata_source_filter_supported (GrlMetadataSource *source, supported_keys = grl_metadata_source_supported_keys (source); - return generic_filter (source, keys, return_filtered, supported_keys); + return filter_key_list (source, keys, return_filtered, supported_keys); } /** @@ -812,7 +812,7 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source, slow_keys = grl_metadata_source_slow_keys (source); - return generic_filter (source, keys, return_filtered, slow_keys); + return filter_key_list (source, keys, return_filtered, slow_keys); } /** @@ -842,7 +842,7 @@ grl_metadata_source_filter_writable (GrlMetadataSource *source, writable_keys = grl_metadata_source_writable_keys (source); - return generic_filter (source, keys, return_filtered, writable_keys); + return filter_key_list (source, keys, return_filtered, writable_keys); } void -- 1.7.1 From vjaquez@igalia.com Fri Oct 22 17:00:15 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 326C9750185 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 17:00:15 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XWTv1uDsOFRX for <grilo-list@gnome.org>; Fri, 22 Oct 2010 17:00:12 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id AFF9B7501BF for <grilo-list@gnome.org>; Fri, 22 Oct 2010 17:00:03 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlAFALJfwUxbdWOb/2dsb2JhbACTcY5jwGaCGoMwBI1R X-IronPort-AV: E=Sophos;i="4.58,224,1286143200"; d="scan'208";a="692522894" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 22 Oct 2010 19:00:01 +0200 Received: from [192.168.12.206] (helo=lit.local.igalia.com) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P9KyH-0007aj-2j for <grilo-list@gnome.org>; Fri, 22 Oct 2010 19:00:01 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P9KyG-0005gJ-9v for grilo-list@gnome.org; Fri, 22 Oct 2010 19:00:00 +0200 Date: Fri, 22 Oct 2010 19:00:00 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH 0/2] Reworked GrlMetadataSource's filters Message-ID: <20101022170000.GC8542@lit.local.igalia.com> References: <1286212741-10120-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1286212741-10120-1-git-send-email-spenap@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Fri, 22 Oct 2010 17:00:16 -0000 On Mon, Oct 04, 2010 at 07:18:59PM +0200, Simón Pena wrote: > Hi, > > The following patches > > * Rework the GrlMetadataSource's filter methods, by extracting common > behavior into a generic filtering function > * Update the GrlMetadataSource's filter tests so that they check specific > behavior instead of just the "instrospectable" status Pushed. vmjl From vjaquez@igalia.com Fri Oct 22 17:20:13 2010 Return-Path: <vjaquez@igalia.com> X-Original-To: grilo-list@gnome.org Delivered-To: grilo-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id ED136750122 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 17:20:12 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.821 X-Spam-Level: X-Spam-Status: No, score=-1.821 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kGgZkjqivGMh for <grilo-list@gnome.org>; Fri, 22 Oct 2010 17:20:11 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id D647C750123 for <grilo-list@gnome.org>; Fri, 22 Oct 2010 17:20:10 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlAFAGNkwUxbdWOb/2dsb2JhbACTco5jwFaFSgSNUQ X-IronPort-AV: E=Sophos;i="4.58,224,1286143200"; d="scan'208";a="689995697" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 22 Oct 2010 19:20:08 +0200 Received: from [192.168.12.206] (helo=lit.local.igalia.com) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1P9LHk-00080H-Rd for <grilo-list@gnome.org>; Fri, 22 Oct 2010 19:20:08 +0200 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from <vjaquez@igalia.com>) id 1P9LHk-0006Gh-7P for grilo-list@gnome.org; Fri, 22 Oct 2010 19:20:08 +0200 Date: Fri, 22 Oct 2010 19:20:08 +0200 From: =?iso-8859-1?Q?V=EDctor_M=2E_J=E1quez_L=2E?= <vjaquez@igalia.com> To: grilo-list@gnome.org Subject: Re: [PATCH 0/2] Tested plugin configuration from GI Message-ID: <20101022172008.GA23935@lit.local.igalia.com> References: <1286211912-9670-1-git-send-email-spenap@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1286211912-9670-1-git-send-email-spenap@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: grilo-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Grilo is a framework focused on making media discovery and browsing easy for application developers. " <grilo-list.gnome.org> List-Unsubscribe: <http://mail.gnome.org/mailman/options/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=unsubscribe> List-Archive: <http://mail.gnome.org/archives/grilo-list/> List-Post: <mailto:grilo-list@gnome.org> List-Help: <mailto:grilo-list-request@gnome.org?subject=help> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/grilo-list>, <mailto:grilo-list-request@gnome.org?subject=subscribe> X-List-Received-Date: Fri, 22 Oct 2010 17:20:13 -0000 On Mon, Oct 04, 2010 at 07:05:10PM +0200, Simón Pena wrote: > Hi all, > > These patches fix and test GrlConfig in the GI realm. > > For that, grl_config_new annotations are updated to allow NULL > sources (which enables plugin-wide configuration), and the > transfer mode is set to 'none', as the configuration shouldn't > be freed while the plugin is still active. > > Then, Python's grilo-test-ui has been updated to configure > Flickr, Youtube and Vimeo plugins. Pushed. Independently of this patch I could run the python test-ui. It get stuck consuming all my CPU. I didn't debug it, so I don't know what it could be. vmjl