Sha256: ede58ffa8beab7787feb87ce5f60f09f36952287bbc1cee910160febb8406518

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

#--
# Copyright (c) 2007, 2008 by Mike Mondragon (mikemondragon@gmail.com)
#
# Please see the LICENSE file for licensing information.
#++

module MMS2R

  ##
  # A hash of MMS2R processors keyed by MMS carrier domain.

  CARRIERS = {}
  
  ##
  # Registers a class as a processor for a MMS domain.  Should only be 
  # used in special cases such as MMS2R::Media::Sprint for 'pm.sprint.com'

  def self.register(domain, processor_class)
    MMS2R::CARRIERS[domain] = processor_class
  end

  ##
  # A hash of file extensions for common mime-types

  EXT = {
    'text/plain' => 'txt',
    'text/html' => 'html',
    'image/png' => 'png',
    'image/gif' => 'gif',
    'image/jpeg' => 'jpg',
    'video/quicktime' => 'mov',
    'video/3gpp2' => '3g2'
  }

  class MMS2R::Media

    ##
    # MMS2R library version

    VERSION = '2.0.1'

  end

end

require File.join(File.dirname(__FILE__), 'mms2r', 'media')
require File.join(File.dirname(__FILE__), 'mms2r', 'media', 'sprint')
MMS2R.register('pm.sprint.com', MMS2R::Media::Sprint)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mms2r-2.0.1 lib/mms2r.rb