[Ocs] problem adding a content with a download

Mateu Batle mateu.batle at collabora.co.uk
Tue Aug 24 15:53:01 PDT 2010


Hi Frank,

can you give a quick look to the code below to check if I'm missing
something here.
I want to create a new content with a download of type package download.
The new content gets added but the download is never reported from the
server.
I have tried with downloadtype 0 and 2 (although I guess type 2 for
packages is not implemented yet)

Also I don't get the video links, are they implemented ?

cheers
  Mat


    Attica::Content content;
    content.addAttribute("downloadtyp1", "0");
    content.addAttribute("downloadname1", "download name 1");
    content.addAttribute("downloadlink1", "");
    content.addAttribute("downloaddistributiontype1", "MeeGo");
    content.addAttribute("downloadbuy1", "0");
    content.addAttribute("downloadbuyreason1", "buy buy buy");
    content.addAttribute("downloadbuyprice1", "100");
    content.addAttribute("downloadgpgfingerprint1", "6AD9 150F D8CC 941B
4541  2DCC 68B7 AB89 5754 8D2D");
    content.addAttribute("downloadgpgsignature1",
"iEYEABECAAYFAkxT52oACgkQMNASEGDVgdegPAbDSMHn/xDQCfSplogMr9x0G0ZNqMUAn3WLVmXADVzWdEToTJ8B5wpdm3zb=A6Dy");
    content.addAttribute("downloadpackagename1", "gdb-gdbserver");
    content.addAttribute("downloadpackagerepository1", "");
    content.addAttribute("description", "a description");
    content.setName("awesome app 2");
    content.addAttribute("version", "1.0");
    content.addAttribute("summary", "a summary");
    content.addAttribute("licensetype", "2");
    content.addAttribute("license", "");
    content.addAttribute("feedbackurl", "http://www.meego.com/");
    content.addAttribute("video1",
"http://mirror.bigbuckbunny.de/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg");
    content.addAttribute("changelog", "a changelog");
    Attica::ItemPostJob<Attica::Content> * addContentJob =
provider.addNewContent(category, content);



More information about the Ocs mailing list