changeset 13:92df9433aeb9

Merge
author Thnan < >
date Sun, 10 Mar 2013 03:38:18 -0400
parents 1596550d1db5 (current diff) 5947b9721b9c (diff)
children 1dd07f05ecac
files Changelog.txt
diffstat 2 files changed, 15 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/Changelog.txt	Sat Mar 09 15:58:22 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-LibModuleDBShare-1.0 Changelog:
-
-
-r3:
-
-- I know what I'm doing now... mostly. Initial .pkgmeta complete.
-- Initial file structure complete.
-
-r2:
-
-- More mucking around.
-
-r1:
-
-- Mucked around with .pkgmeta and toc files.
-
-r0:
-
-- Added .pkgmeta and toc files.
--- a/LibModuleDBShare-1.0/LibModuleDBShare-1.0.lua	Sat Mar 09 15:58:22 2013 -0500
+++ b/LibModuleDBShare-1.0/LibModuleDBShare-1.0.lua	Sun Mar 10 03:38:18 2013 -0400
@@ -10,18 +10,29 @@
 
 if not LibModuleDBShare then return end -- No upgrade needed
 
+local AceDB = LibStub("AceDB-3.0");
+
 LibModuleDBShare.groups = LibModuleDBShare.groups or {};
 
 local DBGroup = {};
 
 --- Creates a new DB group.
 -- @param groupName The name of the new DB group.
--- @param usesDualSpec True if this group should use LibDualSpec, false otherwise.
+-- @param usesDualSpec True if this group should use LibDualSpec, false otherwise. (NYI)
+-- @param initialProfile The name of the profile to start with.
 -- @usage
 -- local myAddonDBGroup = LibStub("LibModuleDBShare-1.0"):NewGroup("MyAddonGroupName", true)
 -- @return the new DB group object
-function LibModuleDBShare:NewGroup(groupName, usesDualSpec)
-	
+function LibModuleDBShare:NewGroup(groupName, usesDualSpec, initialProfile)
+	-- param checks go here
+	local group = {}
+	group.name = groupName;
+	group.syncDBTable = {};
+	group.syncDB = AceDB:New(group.syncDBTable, nil, true);
+	for k, v in pairs(DBGroup) do
+		group[k] = v;
+	end
+	return group;
 end
 
 --- Retrieves an existing DB group.
@@ -30,7 +41,7 @@
 -- local myAddonDBGroup = LibStub("LibModuleDBShare-1.0"):GetGroup("MyAddonGroupName")
 -- @return the DB group object, or nil if not found
 function LibModuleDBShare:GetGroup(groupName)
-
+	return LibModuleDBShare.groups[groupName];
 end
 
 --- Adds a database to the group.