identica-mode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Identica-mode-devel] [RFC PATCH 1/4] Define structures to encapsulate a


From: identica-mode-devel
Subject: [Identica-mode-devel] [RFC PATCH 1/4] Define structures to encapsulate a statusnet account and (optionally) the associated OAuth data.
Date: Sat, 21 Jan 2012 13:24:58 -0600

>From fbb5372660eb1ba3aa82eb964437e9d2fe3d97d6 Mon Sep 17 00:00:00 2001

This patch just sets the stage by creating the cl structs that encapsulate
the data needed to access an account and the list and reference that are used
to store instances of the structs.

As I'm looking at these again, I'm thinking they should probably use
the existing defcustom variables to populate themselves by defult,
I think that will work right.

---
 identica-mode.el |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/identica-mode.el b/identica-mode.el
index f4a385c..02c88ea 100644
--- a/identica-mode.el
+++ b/identica-mode.el
@@ -368,6 +368,36 @@ ur1ca, tighturl, tinyurl, toly, google and isgd"
     (setq method "friends_timeline"))
   (get-buffer-create identica-buffer))
 
+(defstruct (statusnet-oauth-data
+           (:conc-name sn-oauth-))
+  "The oauth configuration associated with a statusnet account."
+  consumer-key ; string
+  consumer-secret ; string
+  request-url ; string
+  access-url ; string
+  authorize-url ; string
+  access-token ; string
+)
+
+(defstruct (statusnet-account
+           (:conc-name sn-account-))
+  "Container for account information."
+  server ; string
+  port ; integer
+  username ; string
+  auth-mode ; string, either "password" or "oauth"
+  password ; string
+  textlimit ; integer
+  oauth-data ; statusnet-account-oauth-data
+  last-timeline-retrieved ; string
+)
+
+(defvar statusnet-accounts nil
+  "A list of login credentials for statusnet instances.")
+
+(defvar sn-current-account nil
+  "A pointer to the statusnet account being processed.")
+
 (defvar identica-http-buffer nil
   "Pointer to the current http response buffer.")
 
-- 
1.7.6.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]