[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Demexp-dev] Questions
From: |
David MENTRE |
Subject: |
Re: [Demexp-dev] Questions |
Date: |
Sun, 14 Oct 2007 19:28:15 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hello Lyu,
Lyu ABE <address@hidden> writes:
> I'd like to know how I can retrieve questions, answers, votes, etc. I
> tried to use the "question_info" method, but I do not understand the
> server's reply because I only got a int value.
No, the question_info() method returns a quite complex data
structure. Here is part of its XDR (ONC-RPC) description:
struct response_t {
response_desc_t r_info_desc;
external_link_t r_info_link;
};
enum question_status_e { tagging_only = 1, public = 2 };
struct question_t {
_int32 int q_timestamp;
question_id_t q_id;
question_desc_t q_desc;
date_t q_info_limit_date; /* if set to zero, there is no limit date */
question_status_e q_info_status;
response_t q_info_responses<MAX_NUMBER_RESPONSES>;
int q_info_num_votes;
int q_info_elected_responses<MAX_NUMBER_RESPONSES>;
};
struct question_info_return_t {
return_code_t question_info_rc;
question_t question_info<MAX_NUMBER_IDS>;
};
Roughly speaking, you have a basic structure (question_info_return_t)
that contains a return code (question_info_rc) and an array of question
information (question_info). Each entry of the `question_info' array is
a structure (question_t) that contains the question timestamp, its id,
its description, etc.
question_info() is probably not the simplest RPC to start with. Maybe
Diogene might help you on this.
> My question is not "What am I doing wrong?", but rather "How to properly
> do that?".
Without some code, it is quite difficult to answer such a question.
Yours,
d.
--
GPG/PGP key: A3AD7A2A David MENTRE <address@hidden>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A
- [Demexp-dev] Questions, Lyu ABE, 2007/10/13
- Re: [Demexp-dev] Questions,
David MENTRE <=
- Re: [Demexp-dev] Questions, Lyu Abe, 2007/10/15
- Re: [Demexp-dev] Questions, David MENTRE, 2007/10/16
- Re: [Demexp-dev] Questions, David MENTRE, 2007/10/16
- Re: [Demexp-dev] Questions, Lyu Abe, 2007/10/17
- Re: [Demexp-dev] Questions, David MENTRE, 2007/10/17
- Re: [Demexp-dev] Questions, David MENTRE, 2007/10/17
- Re: [Demexp-dev] Questions, Lyu Abe, 2007/10/17
- Re: [Demexp-dev] Questions, Lyu Abe, 2007/10/18
- Re: [Demexp-dev] Questions, David MENTRE, 2007/10/18
- Re: [Demexp-dev] Questions, Lyu Abe, 2007/10/18