Re: [anjuta-list] Vala / Anjuta Issues?
- From: bsquared <bwcode4u gmail com>
- To: anjuta-list gnome org
- Subject: Re: [anjuta-list] Vala / Anjuta Issues?
- Date: Tue, 5 Jul 2011 09:17:12 -0700
On Tue, Jul 5, 2011 at 9:02 AM, bsquared <bwcode4u gmail com> wrote:
> namespace TheApplication.RestfulApi {
>
> private Json.Parser _parser = null;
> protected Json.Parser parser {
> get {
> if (_parser == null) {
> _parser = new Json.Parser();
> }
> return _parser;
> }
> }
>
> private Soup.Session _session = null;
> protected Soup.Session session {
> get {
> if (_session == null) {
> _session = new Soup.SessionSync();
> }
> return _session;
> }
> }
>
> private Soup.Message _message = null;
> protected Soup.Message message {
> get {
> if (_message == null) {
> _message = new Soup.Message();
> _message.MessageHeaders.append("Referrer","bwcs.googlecode.com");
> }
> }
> }
> }
Apologies, I made an error transcribing / proofing, and forgot to add
the class declaration.
namespace TheApplication.RestfulApi {
public class HttpRequest : GLib.Object
{
private Json.Parser _parser = null;
protected Json.Parser parser {
get {
if (_parser == null) {
_parser = new Json.Parser();
}
return _parser;
}
}
private Soup.Session _session = null;
protected Soup.Session session {
get {
if (_session == null) {
_session = new Soup.SessionSync();
}
return _session;
}
}
private Soup.Message _message = null;
protected Soup.Message message {
get {
if (_message == null) {
_message = new Soup.Message();
_message.MessageHeaders.append("Referrer","bwcs.googlecode.com");
}
}
}
}
}
--
Regards,
-Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]