﻿/**
 * Copyright 2007 Fox Interactive Media
 * <DISCLAIMER HERE>
 * @fileoverview Interface for container and associated classes; everything needed to query/update MySpace API data via OpenSocial interface.
 * 
 * @author mnewbould [_at_] myspace [_dot_] com (Max Newbould)
 * @author crussell [_at_] myspace [_dot_] com (Chad Russell)
 */
 
/**
 * Defines the default page size for paginated requests.
 * Used as max/default for MAX of PeopleRequestFields
 * @static
 */
MyOpenSpace.DefaultPageSize = 40;

/**
 * @static MyOpenSpace.Formats
 * @internal
 * Enumeration of formats available in intersection of MySpace API/OS supported formats.
 * This is deprecated, JSON format is now forced throughout.
 */
MyOpenSpace.Formats = { JSON: "JSON", XML: "XML" };

/**
 * @static OperationModes
 * @internal
 * Defines types of operation modes (where data should be pulled from)
 */
MyOpenSpace.OperationModes = { AUTO: "AUTO", STAGE: "STAGE", PRODUCTION: "PRODUCTION", LOCALHOST : "LOCALHOST", LOCAL : "LOCAL", DEVELOPMENT: "DEVELOPMENT" };

/**
 * Enumerates the types of Person objects that will be mapped to internally
 * @static
 * @class
 * @name MyOpenSpace.DetailType
 * @internal
 */
MyOpenSpace.DetailType = {
    /**
     * Used internally to map Person requests in order to cache things better, contains basic public information.
     * @memberOf MyOpenSpace.DetailType
     */
	BASIC:"BASIC",
	
	/**
	 * Used internally to map Person requests in order to cache things better, contains some private data.
     * @memberOf MyOpenSpace.DetailType
     */
	FULL:"FULL",
	
	/**
	 * Used internally to map Person requests in order to cache things better, contains full profile data.
     * @memberOf MyOpenSpace.DetailType
     */
	EXTENDED:"EXTENDED",
	
	/**
	 * Gets online now information
     * @memberOf MyOpenSpace.DetailType
     */
	GET_ONLINE:"GET_ONLINE",
	
	/**
	 * Gets status information
     * @memberOf MyOpenSpace.DetailType
     */
	GET_STATUS:"GET_STATUS",
	
	/**
	 * Gets mood information
     * @memberOf MyOpenSpace.DetailType
     */
	GET_MOOD:"GET_MOOD"
};

/**
 * Enumerates the extended filter types
 * @static
 * @class
 * @name MyOpenSpace.DataRequest.FilterType
 */
MyOpenSpace.DataRequest.FilterType = {
    /**
     * The friends that are currently online.
     * @memberOf MyOpenSpace.DataRequest.FilterType
     */
    ONLINE_FRIENDS:"ONLINE_FRIENDS"
};

/**
 * Enumerates the request fields used by the Photo entity
 * @static
 * @class
 * @name MyOpenSpace.DataRequest.AlbumRequestFields
 */
MyOpenSpace.DataRequest.PhotoRequestFields = {
    /**
     * Used to filter a photos request by album id, returns all photos for a particular album.
     * @memberOf MyOpenSpace.DataRequest.PhotoRequestFields
     */
    ALBUM_ID:"ALBUM_ID"
};

//stub
MyOpenSpace.PostTo = {};

/**
 * Enumerates the targets for PostTo
 * @static
 * @class
 * @internal
 * @name MyOpenSpace.PostTo.Targets
 */
MyOpenSpace.PostTo.Targets = {
    /**
     * A user's profile, the specific section is specified on the Post To UI
     * @memberOf MyOpenSpace.PostTo.Targets
     */
    PROFILE:"PROFILE",
    
    /**
     * A message to another user's inbox
     * @memberOf MyOpenSpace.PostTo.Targets
     */
    SEND_MESSAGE:"SEND_MESSAGE",
    
    /**
     * A user's comments
     * @memberOf MyOpenSpace.PostTo.Targets
     */
    COMMENTS:"COMMENTS",
    
    /**
     * A user's bulletins
     * @memberOf MyOpenSpace.PostTo.Targets
     */
    BULLETINS:"BULLETINS",
    
    /**
     * A user's blog
     * @memberOf MyOpenSpace.PostTo.Targets
     */
    BLOG:"BLOG"
};

/**
 * Just a place-holder in order to extend MyOpenSpace.Surface.Field
 * @ignore
 */
MyOpenSpace.Surface = {};

/**
 * Enumerates the types of surfaces supported
 * @static
 * @class
 * @name MyOpenSpace.Surface.Field
 */
MyOpenSpace.Surface.Field = {
    /**
     * The canvas.
     * @memberOf MyOpenSpace.Surface.Field
     */
    CANVAS:"canvas",
    /**
     * The left column on a profile page.
     * @memberOf MyOpenSpace.Surface.Field
     */
    PROFILE_LEFT:"profile.left",
    /**
     * The right column on a profile page.
     * @memberOf MyOpenSpace.Surface.Field
     */
    PROFILE_RIGHT:"profile.right",
    /**
     * Used for passing into requestNavigateTo
     * @memberOf MyOpenSpace.Surface.Field
     * @internal
     */
    PROFILE:"profile",
    /**
     * The home page.
     * @memberOf MyOpenSpace.Surface.Field
     */
    HOME:"home"
};

/**
 * Additional parameter to be used with gadgets.io.makeRequest
 * Multiple requests using the same value for this parameter will block each other, usually used for polling a service
 * @static
 * @class
 * @name MyOpenSpace.RequestParameters
 */
MyOpenSpace.RequestParameters = { 
 /**
     * The parameter name for blocking multiple requests when polling.
     * @memberOf MyOpenSpace.RequestParameters
     */
    USE_KEY_FOR_POLLING : "USE_KEY_FOR_POLLING" 
};
